/* InsertPress Planner v5 — the step panes: part, holes, review. */

/* ---------- part ---------- */
.part-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pc-thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--img, none) center / contain no-repeat, var(--thumb-bg); flex: none; }
.pc-main { min-width: 0; flex: 1; }
.pc-main h2 { font-size: 18px; line-height: 1.2; font-weight: 700; font-stretch: 82%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.align { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.al { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.al:hover:not(:disabled) { border-color: var(--brass); color: var(--ink); background: #fffaf0; }
.al:disabled { opacity: .4; cursor: default; }
.al svg { width: 30px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.al svg rect:not(.fence) { fill: var(--brass-soft); stroke: var(--brass-deep); }
.al svg .fence { stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; }
.al svg .dash { stroke-width: 1.2; stroke-dasharray: 3 2.5; }
.lock-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 7px; height: 28px; padding: 0 9px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lock-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.lock-btn[aria-pressed="false"] .shackle { transform: translate(3px, -1.5px) rotate(18deg); transform-origin: 13px 9px; }
.lock-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.fld { display: flex; align-items: center; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 0 8px; gap: 5px; cursor: text; min-width: 0; }
.fld:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(192, 144, 54, .18); }
.fld span { color: var(--ink-3); font-size: 12px; font-weight: 650; }
.fld input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: none; text-align: right; font: 500 14px var(--mono); }
.fld input:disabled { color: var(--ink-3); }
.fld i { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.card .fine { margin-top: 10px; }
.card .btn-row { margin-top: 10px; }
.array-info { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.array-info.warn { color: var(--hot); }

/* ---------- holes ---------- */
.holes-sum { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.count-line { font-size: 15px; }
.count-line b { font-weight: 750; font-size: 20px; font-stretch: 80%; margin-right: 2px; }
.tools-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin-bottom: 12px; }
.tools-box .btn-row { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 4px 11px 4px 9px; cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip b { font: 600 12.5px var(--mono); }
.chip .cnt { font: 500 11.5px var(--mono); color: var(--ink-3); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px dashed #9aa3a6; }
.chip.all .dot { background: var(--brass); border: 0; }
.chip.some .dot { background: linear-gradient(90deg, var(--brass) 50%, transparent 50%); border: 1.5px solid var(--brass); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on .cnt { color: #b9c3c2; }
.list-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.seg.filt .seg-btn { padding: 5px 8px; font-size: 12.5px; display: inline-flex; gap: 5px; align-items: center; }
.seg.filt .seg-btn span { font: 500 11px var(--mono); color: var(--ink-3); }
.seg.filt .seg-btn.warn span { color: var(--hot); font-weight: 700; }
.sort-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.sort-ctl select { height: 30px; }
.dir-btn { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.dir-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dir-btn.desc { color: var(--ink); border-color: var(--ink); }
.list-head { display: flex; align-items: center; gap: 8px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--line); }
.list-head .shown { font-size: 12.5px; color: var(--ink-2); margin-right: auto; }
.ck { position: relative; width: 16px; height: 16px; flex: none; cursor: pointer; display: inline-block; }
.ck input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ck span { position: absolute; inset: 0; border: 1.5px solid #b4bbbd; border-radius: 4px; background: var(--surface); pointer-events: none; }
.ck input:checked + span, .ck input:indeterminate + span { background: var(--ink); border-color: var(--ink); }
.ck input:checked + span::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg); }
.ck input:indeterminate + span::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 2px; background: #fff; }
.ck input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.bulk { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(20, 28, 32, .18); }
.bulk b { font-size: 13px; margin-right: 2px; }
.bulk .btn.small { min-height: 28px; background: #2c373d; border-color: #46545b; color: #fff; }
.bulk select { height: 28px; border-color: #46545b; color: #fff; background-color: #2c373d; font-size: 12.5px; }
.bk-sink { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #b9c3c2; }
.bk-sink input { width: 50px; height: 28px; border-radius: 7px; border: 1px solid #46545b; background: #2c373d; color: #fff; text-align: right; padding: 0 6px; font: 12.5px var(--mono); }
.bulk .x-btn { color: #b9c3c2; margin-left: auto; }
.holes { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.holes:empty { display: none; }
.hole { display: grid; grid-template-columns: 18px 30px minmax(0, 1fr) auto 26px; align-items: center; column-gap: 9px; padding: 9px 12px; cursor: pointer; position: relative; border-top: 1px solid var(--line); transition: background-color .1s; }
.hole:first-child { border-top: 0; }
.hole:hover, .hole.hover { background: #f6f7f5; }
.hole.active { background: var(--brass-soft); }
.hole.sel { background: #f3efe4; box-shadow: inset 3px 0 0 var(--brass); }
.hole.dragging { opacity: .35; }
.hole.drop-before { box-shadow: inset 0 2px 0 var(--brass); }
.hole.drop-after { box-shadow: inset 0 -2px 0 var(--brass); }
.hole .ck { grid-column: 1; grid-row: 1; }
.tag { grid-column: 2; grid-row: 1 / 3; align-self: start; width: 30px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--brass); color: var(--brass-ink); cursor: grab; }
.tag.add, .tag.off { background: transparent; border: 1.5px dashed #b4bbbd; color: var(--ink-3); cursor: pointer; font-weight: 500; }
.tag.add { font-size: 16px; }
.tag.add:hover { border-color: var(--brass); color: var(--brass-deep); border-style: solid; }
.tag.bad { background: var(--hot); color: #fff; border: 0; }
.xy { grid-column: 3; grid-row: 1; font: 500 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xy i { font-style: normal; color: var(--ink-3); margin-right: 3px; }
.xy i + span { margin-right: 10px; }
.ins { grid-column: 4; grid-row: 1; }
.ins select { height: 28px; padding: 0 24px 0 9px; background-position: right 8px center; }
.hole .x-btn { grid-column: 5; grid-row: 1; opacity: 0; }
.hole:hover .x-btn, .hole.active .x-btn, .hole .x-btn:focus-visible, .hole.skip .x-btn { opacity: 1; }
/* hole details: whole pieces with a dot between; a dot that would start a line is clipped away */
.facts { grid-column: 3 / 6; display: flex; flex-wrap: wrap; align-items: baseline; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); margin: 2px 0 0 -14px; clip-path: inset(0 0 0 14px); }
.facts > * { white-space: nowrap; padding-left: 14px; position: relative; }
.facts > *::before { content: ""; position: absolute; left: 5.5px; top: 50%; width: 3px; height: 3px; margin-top: -1px; border-radius: 50%; background: #aab1b4; }
.dia { font: 600 14px var(--mono); color: var(--ink); letter-spacing: -0.01em; }
.dia.hand { font: 650 13.5px var(--ui); }
.facts .dia { font-size: 12.5px; }
.hole.skip .xy span, .hole.skip .facts, .hole.skip .dia { color: var(--ink-3); }
.insp, .sink, .flag { grid-column: 3 / 6; }
.holes .divider { list-style: none; padding: 10px 12px 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: #fafaf8; border-top: 1px solid var(--line); }
/* simple rows: switch and number on the left, size and insert on top, details below */
.hole.simple { grid-template-columns: 40px 30px minmax(0, 1fr) auto; padding: 10px 12px; }
.hole.simple .tog, .hole.simple .tag { grid-row: 1 / 3; align-self: center; }
.hole.simple .head { grid-column: 3; grid-row: 1; min-width: 0; line-height: 1.2; }
.hole.simple .ins { grid-column: 4; grid-row: 1; }
.hole.simple .facts { grid-column: 3 / 5; grid-row: 2; }
.hole.simple .insp, .hole.simple .sink, .hole.simple .flag { grid-column: 2 / 5; }
.tog { grid-column: 1; grid-row: 1; width: 36px; height: 21px; border: 0; padding: 0; border-radius: 11px; background: #cfd4d5; position: relative; cursor: pointer; transition: background-color .15s; }
.tog i { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.tog[aria-checked="true"] { background: var(--brass); }
.tog[aria-checked="true"] i { transform: translateX(15px); }
.flag { position: relative; margin-top: 8px; padding: 6px 9px 6px 24px; border-radius: 7px; background: #f7f1e3; font-size: 12.5px; color: #6b5220; line-height: 1.42; }
.flag::before { content: ""; position: absolute; left: 10px; top: 11.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.flag + .flag { margin-top: 4px; }
.flag.err { background: var(--hot-soft); color: #8a2c10; font-weight: 550; }
.flag.err::before { background: var(--hot); }
.insp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #ead9b3; border-radius: 7px; overflow: hidden; margin-top: 10px; }
.insp div { background: #fbf5e7; padding: 6px 8px; min-width: 0; }
.insp span { display: block; color: #85754f; font-size: 11px; }
.insp b { font: 500 12.5px var(--mono); white-space: nowrap; }
.insp .bad b { color: var(--hot); }
.sink { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.sink input { width: 72px; height: 28px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 8px; text-align: right; background: var(--surface); }
.empty { text-align: center; padding: 28px 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); }
.empty svg { width: 40px; height: 40px; fill: none; stroke: var(--ink-3); stroke-width: 2; margin-bottom: 6px; }
.empty b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
#ignored-note { margin-top: 12px; }

/* ---------- review ---------- */
.hero-time { margin-bottom: 4px; }
.hero-time b { display: block; font-size: 48px; line-height: 1; font-weight: 750; font-stretch: 66%; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hero-time span { color: var(--ink-2); font-size: 13px; }
.time-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 14px 0 11px; background: var(--line); }
.time-bar:empty { display: none; }
.time-bar i { display: block; height: 100%; }
.time-bar i + i { box-shadow: inset 1.5px 0 0 var(--side); }
.time-legend { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; font-size: 12.5px; }
.time-legend li { display: flex; align-items: center; gap: 7px; }
.time-legend i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.time-legend b { margin-left: auto; font: 500 12px var(--mono); }
.feed-lab { margin-top: 12px; }
.feed-note { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.feed-note span b { color: var(--ink); }
.feed-note span i { font-style: normal; color: var(--ink-3); }
.feed-note span.short, .feed-note span.short b { color: var(--hot); }
.feed-note .link { margin-left: auto; font-size: 12.5px; }
.bom { width: 100%; border-collapse: collapse; font-size: 13px; }
.bom th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 0 0 6px; }
.bom td { padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bom td:not(:first-child), .bom th:not(:first-child) { text-align: right; }
.bom tr.total td { font-weight: 700; border-top: 1.5px solid var(--line-2); }
.actions { margin-top: 16px; display: grid; gap: 8px; }
.actions .btn.primary svg { width: 14px; height: 14px; }
.more-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.code-box { margin-top: 16px; }
.code-box > summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 6px 0; }
.code { margin-top: 6px; padding: 10px 0; border-radius: var(--r); background: var(--night); color: #d9e0dd; font: 12px/1.6 var(--mono); overflow: auto; max-height: 420px; counter-reset: ln; position: relative; }
.code .ln { display: block; white-space: pre; padding: 0 14px 0 52px; position: relative; min-height: 19px; }
.code .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 38px; text-align: right; color: #556366; }
.code .ln.now { background: rgba(217, 171, 79, .2); }
.code .ln.now::before { color: var(--brass-hi); }
.code .c { color: #7f8e8c; }
.code .g { color: var(--brass-hi); }
.code .m { color: #f0936a; }
