/* Sleek Digitizer. Colors follow the Sleek Attire estimator (slate ground, stitch blue, gold). */
@font-face { font-family: "Graduate"; src: url("graduate.woff2") format("woff2"); font-display: block; }   /* the wordmark only */
@font-face { font-family: "Roboto"; src: url("roboto.woff2") format("woff2"); font-weight: 100 900; font-display: block; }

:root {
  --ground: #0E1418;
  --surface: #151E24;
  --surface-2: #1A252C;
  --line: #2A3740;
  --ink: #E4ECF0;
  --muted: #93A4AF;
  --brand: #62A8CF;
  --brand-ink: #0A1318;
  --brand-hover: #7DB9DB;
  --gold: #D9AE55;
  --good: #5CBF86;
  --warn: #E38B4F;
  --bad: #E8686B;
  --cloth: #1B252C;
  --ui: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Graduate", "Rockwell", Georgia, serif;   /* the wordmark only; headings use --ui */
}

* { box-sizing: border-box; }
.outline-pts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.outline-pts button { padding: 5px 9px; font-size: 13px; }
.nudge { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.nudge button { min-width: 36px; min-height: 36px; padding: 0; font-size: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); }
.nudge .hint { margin: 0 0 0 6px; }
@media (pointer: coarse) { .nudge button, .outline-pts button, .zoom button { min-width: 44px; min-height: 44px; } }
/* the editors' Undo step, Reset angles and Cancel were 23 px tall on a phone (the outline editor's too) */
@media (pointer: coarse) { #angle-tools .adv-actions .link, #outline-tools .adv-actions .link, .edit-bar button { min-height: 44px; } }
/* words for a mouse or for a finger: double-click or double-tap, and the keyboard keys only where there is a mouse */
@media (pointer: coarse) { .on-mouse { display: none; } }
@media not all and (pointer: coarse) { .on-touch { display: none; } }
.glossary { margin: 10px 0 4px; font-size: 13.5px; }
.glossary summary { cursor: pointer; color: var(--brand); }
.glossary dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.glossary dt { font-weight: 600; color: var(--ink); }
.glossary dd { margin: 0; color: var(--muted); }
@media (max-width: 1280px) { .glossary dl { grid-template-columns: 1fr; } .glossary dd { margin-bottom: 4px; } }
#size-hint.bad { color: var(--bad); }
.save-what { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.save-what b { color: var(--ink); font-weight: 600; }
.save-what .warn { display: block; color: var(--warn); margin-top: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.45 var(--ui); display: flex; flex-direction: column; overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* A button that cannot be used now looks it, everywhere: Apply angles, Turn, Undo step and the rest looked live while
   greyed out. Rows with a look of their own for it (.seg, .seg3, .zoom, the thread arrows, Make the stitches) keep it. */
button:disabled:not(.primary) { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
code { font-family: Consolas, ui-monospace, monospace; font-size: 12.5px; color: var(--gold); }
[hidden] { display: none !important; }

/* ---- top bar */
.bar { display: flex; align-items: center; gap: 28px; padding: 0 18px; height: 54px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-size: 19px; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand.big { font-size: 26px; justify-content: center; }
/* the mark: a needle carrying a gold thread */
.needle { width: 22px; height: 22px; position: relative; flex: none; }
.needle::before { content: ""; position: absolute; left: 10px; top: 0; width: 2px; height: 22px; background: var(--ink); border-radius: 2px 2px 1px 1px; transform: rotate(38deg); }
.needle::after { content: ""; position: absolute; left: 2px; top: 9px; width: 18px; height: 9px; border: 2px solid var(--gold); border-color: var(--gold) transparent transparent transparent; border-radius: 50%; transform: rotate(-14deg); }
.tabs { display: flex; gap: 2px; height: 100%; }
.tabs button { background: none; border: 0; padding: 0 14px; color: var(--muted); border-bottom: 3px solid transparent; border-top: 3px solid transparent; font-weight: 600; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.bar-right { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ---- three columns */
.work { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr) 384px; }
.panel { background: var(--surface); overflow-y: auto; padding: 16px; }
.panel.left { border-right: 1px solid var(--line); }
.panel.right { border-left: 1px solid var(--line); }
.panel::-webkit-scrollbar { width: 10px; }
.panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--surface); }

.drop { display: flex; gap: 12px; align-items: center; min-height: 104px; padding: 14px; border: 1.5px dashed #3A4B57; border-radius: 10px;
  background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--brand); background: #1D2B34; }
.drop img { width: 76px; height: 76px; object-fit: contain; border-radius: 6px; flex: none;
  background: repeating-conic-gradient(#2a343b 0% 25%, #222b31 0% 50%) 50% / 14px 14px; }
.drop-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drop-text strong { font-size: 15px; overflow-wrap: anywhere; }
.drop-text span { color: var(--muted); font-size: 13.5px; }

.group { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.group[disabled] { opacity: .42; }
.group legend, .panel h2 { font-size: 15px; letter-spacing: 0; color: var(--gold); padding: 0; margin: 0 0 8px; font-weight: 600; }
.panel h2 { margin-top: 22px; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: block; color: var(--muted); font-size: 13.5px; }
.unit { display: flex; align-items: center; margin-top: 4px; background: var(--ground); border: 1px solid var(--line); border-radius: 7px; }
.unit:focus-within { border-color: var(--brand); }
.unit input { flex: 1; min-width: 0; background: none; border: 0; padding: 8px 10px; font-size: 16px; font-weight: 600; color: var(--ink); outline: none; font-variant-numeric: tabular-nums; }
.unit span { padding-right: 10px; color: var(--muted); }
select, .folder input, .name { width: 100%; background: var(--ground); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: var(--ink); }
select:focus, .folder input:focus, .name:focus { border-color: var(--brand); outline: none; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.lede { color: var(--muted); margin: 0 0 12px; }

.slider { display: block; color: var(--ink); font-size: 14px; }
.slider output { font-weight: 700; color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--brand); margin: 8px 0 2px; }
.colors { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 4px; }
.colors li { display: grid; grid-template-columns: auto 30px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.colors li:hover { background: var(--surface-2); }
.colors li.off .sw, .colors li.off .nm { opacity: .35; }
.colors li.off .nm { text-decoration: line-through; }
.sw { width: 30px; height: 18px; border-radius: 9px; border: 1px solid rgba(255,255,255,.45); box-shadow: inset 0 -5px 6px rgba(0,0,0,.22), inset 0 3px 3px rgba(255,255,255,.18); }
.nm { color: var(--ink); font-size: 13.5px; }
.pc { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; margin-top: 10px; color: var(--ink); font-size: 14px; cursor: pointer; }
.check em { color: var(--muted); font-style: normal; }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 2px 0 0; }

.primary { width: 100%; margin-top: 20px; padding: 12px 14px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink);
  font-weight: 700; font-size: 15px; }
.primary:hover:not(:disabled) { background: var(--brand-hover); }
.primary:disabled { background: #2A3740; color: #6C7C87; cursor: default; }
.progress { margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.fill { height: 100%; width: 0; background: var(--gold); border-radius: 3px; transition: width .25s; }
.fill.indet { width: 35%; animation: slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 65%; } }

.designs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.designs button { width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.designs button:hover:not(:disabled) { border-color: #3F5261; }
.designs button[aria-pressed="true"] { border-color: var(--gold); background: #1F2A31; }
.designs b { display: block; font-weight: 600; }
.designs span { color: var(--muted); font-size: 13.5px; }
.designs small { display: block; margin-top: 3px; color: var(--warn); font-size: 12px; }
.designs .design-group { margin-top: 10px; }
.designs .design-group:first-child { margin-top: 0; }
.designs .design-group h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.designs .design-group .hint { margin: 0 0 4px; }
#design-params { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- the fabric */
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ground); }
.stage-top { display: flex; align-items: center; gap: 16px; padding: 10px 14px; flex: none; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { background: none; border: 0; padding: 5px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--line); color: var(--ink); }
.show-opts { display: inline-flex; gap: 12px; font-size: 13px; color: var(--muted); }
.show-opts label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.show-opts[hidden] { display: none; }
.mock-opts { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; }
.mock-opts[hidden] { display: none; }
.hotspots { margin: 6px 14px 0; font-size: 13px; color: var(--muted); }
.hotspots[hidden] { display: none; }
.hotspots ol { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.hotspots button { background: none; border: 1px solid #FF3B30; color: inherit; border-radius: 6px; padding: 2px 8px; font-size: 13px; }
.pbp { flex-basis: 100%; margin: 0; min-height: 1.3em; font-size: 13px; color: var(--muted); }
.guest-bar { margin: 0 0 6px; padding: 6px 10px; border: 1px solid var(--brand); border-radius: 8px; font-size: 13.5px; }
.guest-bar[hidden] { display: none; }
.guest-bar button { margin-left: 8px; }
.precheck { margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--line, #3a4652); border-radius: 10px; font-size: 14px; }
.precheck h3 { margin: 0 0 4px; font-size: 14px; }
.precheck p { margin: 4px 0; }
.precheck ul { margin: 2px 0 4px; padding-left: 18px; color: var(--warn, #c98a1b); }
.quote-line { font-size: 14px; margin: 6px 0 0; }
.quote-line input { width: 4.8em; padding: 2px 6px; background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; font: inherit; }
#hoop { width: auto; height: auto; min-height: 0; flex: none; padding: 3px 6px; font-size: 13px; }
#hoop-note { white-space: nowrap; }
.show-opts { align-items: center; flex-wrap: wrap; }
.template-line { margin: 8px 0 0; }
.thread-pick { width: 11.5em; margin-left: 6px; padding: 2px 6px; font-size: 12.5px; background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; }
.thread-tools { margin: 6px 0 0; font-size: 13.5px; }
.thread-tools[hidden], .tweaks[hidden], .swatch-box[hidden] { display: none; }
.swatch-box, .spots-box { margin: 8px 0; font-size: 13.5px; }
.lt-pairs { margin: 6px 0 10px; font-size: 13.5px; }
.result-box { margin: 8px 0; font-size: 13.5px; }
.result-box[hidden], .result-why[hidden] { display: none; }
.result-why { border: 0; padding: 0; margin: 6px 0; }
.result-box > label { display: grid; gap: 4px; margin: 6px 0; }
#result-name { background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; padding: 5px 8px; font: inherit; }
.result-why legend { font-weight: 600; margin-top: 6px; }
.result-why textarea { width: 100%; box-sizing: border-box; background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; padding: 6px; font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; }
.adv-start { display: grid; gap: 4px; align-content: start; justify-items: start; color: var(--muted); font-size: 13px; }
#adv-start-now, #adv-end-now { color: var(--muted); }
.adv-points { display: grid; gap: 10px; align-content: start; }     /* the end row under the start row */
/* the key to the marks on the canvas: a green dot for the start, a red ring with a white middle for the end */
.adv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(14,20,24,.9); vertical-align: -1px; }
.adv-dot.start { background: #3ddc84; }
.adv-dot.end { background: radial-gradient(circle, #fff 0 30%, #ff4d4f 34%); }
.pair-list { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; }
.pair { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.pair-chars { font-weight: 700; letter-spacing: 0.05em; min-width: 1.8em; }
.pair input { width: 4.2em; padding: 2px 4px; font-size: 13px; }
.spots-box[hidden] { display: none; }
.swatch-row select { width: auto; margin-left: 4px; padding: 3px 6px; font-size: 13px; }
.thread-tools textarea, .change-ask textarea { width: 100%; box-sizing: border-box; background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; padding: 6px; font: inherit; }
.tweaks { margin-top: 10px; }
.proof-box[hidden], .proof-link-row[hidden] { display: none; }
.proof-field { display: block; margin: 6px 0; font-size: 13.5px; }
.proof-field input, #proof-link { width: 100%; box-sizing: border-box; background: transparent; color: inherit; border: 1px solid var(--line, #3a4652); border-radius: 6px; padding: 5px 8px; font: inherit; }
.proof-link-row { display: flex; gap: 6px; }
.trim-option { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--brand); font-size: 13.5px; }
.trim-option p { margin: 0 0 4px; }
.change-ask { display: block; margin: 8px 0 4px; font-size: 13.5px; }
#play-speed, .mock-opts select { width: auto; flex: none; padding: 4px 8px; font-size: 13px; }
.mock-opts .hint { max-width: 22em; margin: 0; }
.measure-btn { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.measure-btn[aria-pressed="true"] { background: var(--line); color: var(--ink); }
.measure-out { color: var(--ink); font-variant-numeric: tabular-nums; }
#canvas.measuring { cursor: crosshair; }
.sew-steps { display: flex; flex-wrap: wrap; gap: 6px; order: 3; flex-basis: 100%; }
.sew-steps button { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.sew-steps button:hover:not(:disabled) { border-color: #3F5261; }
.sew-steps #sew-pick { margin-left: auto; }
button.small { margin-top: 6px; padding: 4px 10px; font-size: 12px; }
button.small[aria-pressed="true"] { outline: 2px solid var(--accent, #7FD3FF); }
.seg button:disabled { opacity: .35; cursor: default; }
.fabrics { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.fabrics button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ground); outline: 1px solid var(--line); padding: 0; }
.fabrics button[aria-pressed="true"] { outline: 2px solid var(--gold); }
.zoom { display: flex; gap: 4px; }
.zoom button, #play { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; color: var(--ink); font-size: 13px; font-weight: 600; }
.zoom button:hover:not(:disabled), #play:hover:not(:disabled) { border-color: #3F5261; }
.cloth { position: relative; flex: 1; min-height: 0; margin: 0 14px; border-radius: 10px; overflow: hidden; background: var(--cloth);
  /* twill: fine diagonal ribs */
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.022) 0 2px, rgba(0,0,0,.03) 2px 4px); }
#mock { position: absolute; inset: 0; width: 100%; height: 100%; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#canvas.drag { cursor: grabbing; }
#flat { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; pointer-events: none; }
.empty h1 { font-weight: 600; font-size: clamp(20px, 2.4vw, 28px); margin: 0 0 10px; }
.empty p { color: var(--muted); margin: 0; max-width: 46ch; }
.scale { position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: 12px; pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.scale span { display: block; height: 7px; border: 1.5px solid currentColor; border-top: 0; }
.scale em { font-style: normal; font-variant-numeric: tabular-nums; }
.scale .untested { margin-left: 10px; font-weight: 500; color: rgba(255,255,255,.75); background: rgba(14,20,24,.6); padding: 2px 7px; border-radius: 9px; }
.sew { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px 12px; flex: none; color: var(--muted); font-size: 13.5px; }
.sew input { flex: 1 1 160px; margin: 0; }
#sew-text { min-width: 150px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- the report */
.report-empty { color: var(--muted); }
.report-empty p { margin: 0 0 10px; }
.name { font-size: 16px; font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin: 12px 0 0; }
.facts div { background: var(--surface-2); padding: 9px 11px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 1px 0 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; counter-reset: t; }
.threads li { display: grid; grid-template-columns: 18px 34px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; counter-increment: t; }
.threads li::before { content: counter(t); color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.threads li:hover { background: var(--surface-2); }
.threads input[type=color] { width: 34px; height: 20px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 10px; background: none; cursor: pointer; overflow: hidden; }
.threads input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.threads input[type=color]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.threads .k { color: var(--muted); font-size: 13px; }
/* 3D puff (Oct 27 2026): the foam stop is a row with no thread, and a puff thread carries a tag */
.threads li.foam { color: var(--muted); }
.threads .foam-mark { width: 34px; height: 20px; border: 1px dashed rgba(255,255,255,.45); border-radius: 10px; }
.threads .puff-tag { display: inline-block; padding: 0 7px; border: 1px solid var(--gold); border-radius: 9px; color: var(--gold); font-size: 11.5px; white-space: nowrap; }
.piece-card .piece-puff { margin-top: 8px; }
.threads.movable li { grid-template-columns: 18px 34px 1fr auto auto; }
/* the Madeira pick box on a line of its own, as on flat rows, also on a 3D puff row, which has no arrows: in the
   arrows' place it pushed every row wider than the panel (review, Oct 27 2026) */
.threads .thread-pick { grid-column: 1; }
.threads .mv { display: inline-grid; grid-auto-flow: column; gap: 2px; }
.threads .mv button { width: 22px; height: 20px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; background: none; color: var(--muted); font-size: 9px; line-height: 1; cursor: pointer; }
.threads .mv button:hover:not(:disabled) { color: var(--text, #fff); border-color: var(--brand, #62A8CF); }
.threads .mv button:focus-visible { outline: 2px solid var(--brand, #62A8CF); outline-offset: 1px; }
.threads .mv button:disabled { opacity: .3; cursor: default; }
.threads-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: baseline; padding: 5px 6px; border-radius: 6px; }
.checks li:hover { background: var(--surface-2); }
.checks i { width: 9px; height: 9px; border-radius: 50%; background: var(--good); align-self: center; }
.checks li.warn i { background: var(--warn); border-radius: 2px; }
.checks li.bad i { background: var(--bad); border-radius: 0; transform: rotate(45deg); }
.checks li.info i { background: transparent; border: 1.5px solid var(--muted); box-sizing: border-box; }
.checks b { font-weight: 400; }
.checks span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; }
.checks li.warn span { color: var(--warn); }
.checks li.bad span { color: var(--bad); }
.checks p { grid-column: 2 / 4; margin: 0; color: var(--muted); font-size: 13.5px; display: none; }
.checks li:hover p, .checks li.warn p, .checks li.bad p { display: block; }
.notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.notes li { border-left: 3px solid var(--gold); padding: 3px 0 3px 10px; color: var(--ink); font-size: 14px; -webkit-user-select: text; user-select: text; }
.formats { display: grid; grid-template-columns: 1fr; gap: 4px; }
.formats label { display: flex; gap: 7px; align-items: center; color: var(--ink); font-size: 14px; cursor: pointer; }
.formats input { margin: 0; }
.folder { margin-top: 12px; }
.folder small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; -webkit-user-select: text; user-select: text; }
.folder input { margin-top: 4px; font-size: 13.5px; -webkit-user-select: text; user-select: text; }
.saved { margin: 10px 0 0; color: var(--good); font-size: 14px; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.saved button { background: none; border: 0; color: var(--brand); padding: 0; text-decoration: underline; }
.saved em { display: block; margin-top: 4px; font-style: normal; color: var(--muted); }

/* ---- overlays */
.setup { position: fixed; inset: 0; background: var(--ground); display: flex; align-items: center; justify-content: center; z-index: 20; }
.setup-card { width: min(440px, 86vw); text-align: center; }
.setup-card p { color: var(--muted); margin: 18px 0 14px; min-height: 2.9em; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: min(680px, 90vw); background: #3A1D1F; color: #FFD9DA; border: 1px solid #7A3336;
  padding: 11px 16px; border-radius: 9px; z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.5); -webkit-user-select: text; user-select: text; }
.toast:not(.ok) { cursor: pointer; padding-right: 34px; }
.toast:not(.ok)::after { content: '\00d7'; position: absolute; right: 12px; top: 8px; font-size: 18px; opacity: .8; }
.toast.ok { background: #15301F; color: #CFF3DD; border-color: #2E6B48; }
.dropveil { position: fixed; inset: 0; background: rgba(14,20,24,.82); border: 3px dashed var(--brand); z-index: 25; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.dropveil span { font-size: 30px; font-weight: 600; color: var(--ink); }

@media (max-width: 1080px) {
  .work { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .panel.right { grid-column: 1 / 3; border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; }
  .bar { gap: 14px; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .work { display: block; }
  .stage { height: 70vh; }
  .panel.right { max-height: none; }
  .tabs button { padding: 0 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* the main button of each side panel stays in view while the panel scrolls */
.dock { position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 4px 16px 16px; background: var(--surface);
  box-shadow: 0 -10px 14px -10px rgba(0,0,0,.6); z-index: 2; }
.dock .primary { margin-top: 12px; min-height: 46px; }
/* the stitches no longer match the settings */
.stale { margin: 0 14px 10px; padding: 9px 12px; border-radius: 8px; background: rgba(217,174,85,.14); border: 1px solid rgba(217,174,85,.5);
  color: var(--ink); font-size: 14px; flex: none; }
.stale b { color: var(--gold); font-weight: 600; }
/* what needs a look, above the details */
.summary { margin: 12px 0 0; padding: 9px 12px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.summary.ok { border-color: rgba(92,191,134,.45); }
.summary.warn { border-color: rgba(227,139,79,.6); color: var(--ink); }
.summary.bad { border-color: rgba(232,104,107,.7); color: var(--ink); }
/* passed checks fold away when something needs a look */
.passed { margin-top: 6px; }
.passed summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 6px; }
.passed summary:hover { color: var(--ink); }

.fabrics-label { color: var(--muted); font-size: 13px; margin-right: 2px; white-space: nowrap; }
.placeholder { margin: 0 14px 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 14px; flex: none; }
.name-label { display: block; color: var(--muted); font-size: 13.5px; }
.name-label .name { margin-top: 4px; }
.facts-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.threads-head { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 0 6px 4px; color: var(--muted); font-size: 12.5px; }
.threads-head span:nth-child(2) { padding-left: 34px; }
.threads li { min-height: 40px; }
.threads .mv button { width: 30px; height: 28px; font-size: 12px; }
.picked { margin: 12px 0 0; font-weight: 600; color: var(--ink); }
#design-params:empty { display: none; }
.drive { margin-top: 12px; }
.drive summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.drive summary:hover { color: var(--ink); }
.passed[open] summary { margin-bottom: 4px; }

/* Adjust the stitches: four rows of choices */
.adjust { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; }
.adjust > span { color: var(--ink); font-size: 14px; }
.seg3 { display: flex; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg3 button { flex: 1; background: none; border: 0; border-radius: 6px; padding: 6px 4px; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.seg3 button:hover:not(:disabled) { color: var(--ink); }
.seg3 button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.seg3 button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg3 button:disabled { opacity: .45; cursor: default; }
fieldset:disabled .seg3 button { cursor: default; opacity: .6; }
/* Script lettering: its label sits above the buttons, which take the room their words need */
#adjust-script { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; }
#adjust-script .seg3 button { flex: 1 1 auto; padding: 6px 8px; }

/* ---- UX round 7 (ChatGPT review, Oct 11 2026) */
/* the preview toolbar wraps instead of pushing Fit and life size off the edge at 1280 px */
.stage-top { flex-wrap: wrap; gap: 8px 14px; }
.stage-top .seg button { white-space: nowrap; }
.fabrics { flex-wrap: wrap; }
.zoom button:disabled { opacity: .4; cursor: default; }
/* thread colors come first; the four stitch adjustments fold away until wanted */
.adjust-details { margin-top: 18px; }
.adjust-details > summary { cursor: pointer; color: var(--gold); font-weight: 600; font-size: 15px; padding: 2px 0; }
.adjust-details > summary span { color: var(--muted); font-weight: 400; font-size: 13.5px; margin-left: 4px; }
.adjust-details[open] > summary { margin-bottom: 4px; }
.adjust-details .group { margin-top: 8px; }
.adjust-details .group legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#color-status:empty { display: none; }
#color-status { margin: 0 0 6px; }
.panel, .pane, #report { min-width: 0; }
@media (max-width: 720px) {
  .bar { height: auto; flex-wrap: wrap; gap: 4px 12px; padding: 8px 12px 0; }
  /* the tabs wrap onto a second row: with every tab of the PC app shown they made a 390 px phone page 448 px wide */
  .tabs { order: 3; width: 100%; height: auto; flex-wrap: wrap; }
  .tabs button { flex: 1 1 90px; min-height: 44px; }
  .dock { position: static; margin-top: 12px; }
  .adjust { grid-template-columns: 1fr; }
}
/* window review, pass 2: full folder path on demand, fabric note folded, room for the colors in short windows */
.path-details, .fabric-help { margin-top: 6px; }
.path-details > summary, .fabric-help > summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.path-details > summary:hover, .fabric-help > summary:hover { color: var(--ink); }
.full-path { margin: 6px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--ink); font-size: 13.5px; -webkit-user-select: text; user-select: text; }
.drive summary { overflow-wrap: anywhere; }
#passed[open] .checks p { display: block; }
.summary.info { color: var(--muted); }
@media (max-height: 760px) {
  #drop-picture.loaded { min-height: 80px; padding: 10px; gap: 10px; }
  #drop-picture.loaded img { width: 56px; height: 56px; }
  #pane-picture > .group { margin-top: 14px; }
}

/* Stitch order list and the piece picked on the design (Oct 11 2026) */
.pieces { margin-top: 12px; }
.pieces > summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.pieces-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; max-height: 340px; overflow-y: auto; counter-reset: p; }
.pieces-list li { display: grid; grid-template-columns: 30px 14px 1fr auto; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 6px; counter-increment: p; cursor: pointer; font-size: 13.5px; }
.pieces-list li::before { content: counter(p); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.pieces-list li:hover { background: var(--surface-2); }
.pieces-list li:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.pieces-list li[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brand); }
.pieces-list i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); }
.pieces-list .k { color: var(--muted); font-variant-numeric: tabular-nums; }
.threads li.picked { box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-2); }

/* ---- test version: sign-in gate, badge and feedback (Oct 11 2026) */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 12, 15, .92); -webkit-user-select: text; user-select: text; }
.gate-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.gate-card h1 { margin: 18px 0 8px; font-size: 21px; font-weight: 600; }
.gate-card p { margin: 0 0 12px; color: var(--ink); }
.gate .field { display: grid; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.gate .field input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); font-size: 16px; }
.gate .field input:focus { border-color: var(--brand); outline: none; }
#gate-code-in { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.gate .link { display: block; margin: 12px auto 0; padding: 4px; border: 0; background: none; color: var(--brand); text-decoration: underline; }
.disclosure { margin: 0 0 12px; padding: 12px 14px; white-space: pre-wrap; font: 14px/1.5 var(--ui);
  background: var(--ground); border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow-y: auto; }
.gate-error { margin: 12px 0 0 !important; color: var(--bad) !important; min-height: 1em; }
.beta-badge { display: inline-flex; align-items: center; gap: 8px; margin-right: 14px; padding: 3px 4px 3px 10px;
  border: 1px solid var(--gold); border-radius: 14px; color: var(--gold); font-size: 13px; }
.beta-badge span { color: var(--muted); }
.beta-badge button { padding: 2px 8px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 12.5px; }
.feedback { margin: 18px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.feedback h2 { margin-top: 0; }
.feedback .rate { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; align-items: center; }
.feedback .rate-q { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.feedback .rate button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.feedback .rate button[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.feedback textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground);
  color: var(--ink); font: inherit; resize: vertical; -webkit-user-select: text; user-select: text; }
.secondary { margin-top: 8px; padding: 8px 14px; border: 1px solid var(--brand); border-radius: 8px; background: none; color: var(--brand); font-weight: 600; }
.secondary:hover:not(:disabled) { background: var(--surface-2); }
.secondary:disabled { opacity: .45; cursor: default; }   /* Pick the end on satin, Draw the direction: plainly off */

/* ---- feedback and marks beside the preview (ChatGPT, window review round 4) */
.markup-launch { flex: none; padding: 8px 14px 0; }
.markup-launch button { min-height: 40px; padding: 6px 14px; border: 1px solid var(--gold); border-radius: 8px;
  background: var(--surface); color: var(--gold); font-weight: 600; }
.markup-launch button:hover:not(:disabled) { background: var(--surface-2); }
#markup-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; touch-action: none; cursor: crosshair; }
#markup-panel { flex: 0 1 auto; min-height: 0; max-height: 42%; margin: 0 14px 10px; padding: 10px 12px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.markup-heading, .markup-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.markup-heading { justify-content: space-between; margin-bottom: 8px; }
.markup-tools label { display: grid; gap: 3px; color: var(--muted); font-size: 13px; }
#markup-panel button, #markup-panel select { min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
#markup-panel button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
#markup-panel button:disabled { opacity: .5; cursor: default; }
#markup-panel .feedback { border: 0; margin: 0; padding: 0; }
.sewout { display: grid; gap: 8px; margin: 10px 0; }
.fabric-tips { margin-top: 8px; }
.fabric-key { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--gold); font-size: 13px; color: var(--ink); }
.step-n { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin-right: 8px; border-radius: 50%;
  background: var(--gold); color: var(--ground); font-size: .8em; font-weight: 700; vertical-align: 1px; }
.step-head { margin: 0 0 10px; font-size: 15px; color: var(--gold); font-weight: 600; }
legend em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .85em; }
.verdict { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.verdict.ok { color: var(--ok, #6cc28a); } .verdict.warn { color: var(--gold); } .verdict.bad { color: var(--bad); }
.fabric-tips dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 6px 0; font-size: 13px; }
.fabric-tips dt { color: var(--gold); font-weight: 600; }
.fabric-tips dd { margin: 0; color: var(--ink); }
.fabric-tips ul { margin: 6px 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.sewout label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.sewout input:not([type="file"]), .sewout select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); color: var(--ink); }
.reward-terms { margin-top: 10px; font-size: 13px; }
.reward-terms summary { cursor: pointer; color: var(--gold); }
.reward-terms p { white-space: pre-line; color: var(--muted); }
#beta-credits { color: var(--gold); }
#markup-panel .feedback h2 { display: none; }
#markup-panel textarea { min-height: 64px; max-height: 140px; }
#markup-panel .hint { margin: 6px 0; }
#markup-panel #feedback-send { border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---- what are you sewing on */
.garment { display: grid; gap: 5px; margin-top: 12px; color: var(--ink); font-size: 14px; }
.garment em { color: var(--muted); font-style: normal; }
.garment select { margin: 0; }
#garment-pick { width: 64px; height: 32px; margin-top: 6px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--ground); }
.garment input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); -webkit-user-select: text; user-select: text; }

/* ---- first-run card */
.firstrun { max-width: 420px; margin: 18px auto 0; padding: 14px 18px; text-align: left; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); pointer-events: auto; }
.firstrun h2 { margin: 0 0 6px; font-size: 16px; color: var(--gold); }
.firstrun ol { margin: 0 0 8px; padding-left: 20px; }
.firstrun p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---- selected piece and its Advanced panel */
.piece-card { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: 10px; background: var(--surface-2); }
.piece-head { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; }
.piece-head i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); }
.piece-card .link { padding: 2px 4px; border: 0; background: none; color: var(--brand); text-decoration: underline; font-size: 13px; }
.piece-card .hint { margin: 6px 0; }
.piece-thread { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.piece-thread em { color: var(--muted); font-style: normal; }
.piece-thread input[type=color] { width: 34px; height: 20px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 10px; background: none; }
.piece-adv { margin-top: 10px; }
.piece-del { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.piece-adv > summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.adv-grid label { display: grid; gap: 4px; align-content: start; color: var(--muted); font-size: 13px; }   /* a tall neighbour must not stretch a dropdown */
.adv-grid select, .adv-grid input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--ground); color: var(--ink); width: 100%; }
.adv-grid .unit { display: flex; align-items: center; gap: 4px; }
.adv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* On wide windows the open drawer sits over the report column, so the preview keeps its full height
   and the pen and note stay in view (1280 x 720 left them scrolled away under a small preview). */
.work { position: relative; }
@media (min-width: 1081px) {
  #markup-panel:not([hidden]) { position: absolute; top: 0; right: 0; bottom: 0; width: 384px; max-height: none; margin: 0;
    border-width: 0 0 0 1px; border-radius: 0; padding: 16px; z-index: 6; box-shadow: -12px 0 24px -12px rgba(0,0,0,.6); }
}

/* outline points (Pulse-style reshaping) and satin angle lines */
.outline-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
#canvas.editing { cursor: default; }
#angle-bad { color: var(--bad); }
#angle-bad:empty, #angle-what:empty, #angle-out:empty, #angle-note:empty, #angle-warn:empty { display: none; }
#angles-dormant, #angle-warn { margin: 0 0 10px; padding-left: 8px; border-left: 3px solid #FFB020; color: var(--ink); }
#angle-warn { margin: 6px 0 0; }
#angles-dormant .link { padding: 0; border: 0; background: none; color: var(--brand); text-decoration: underline; font-size: 13.5px; }
/* room under Undo the deletion: the Before you sew heading (no margin of its own there) sat right on it */
#undo-delete { margin-bottom: 14px; }
/* a finger's size on a phone: Forget these lines was 20 px tall, Undo the deletion and Bring the angle lines back 27 */
@media (pointer: coarse) {
  #angles-dormant .link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  #undo-delete { min-height: 44px; }
}
.how-to { margin: 8px 0 0; font-size: 13.5px; }
.how-to summary { cursor: pointer; color: var(--brand); }
/* A narrow screen: while an editor is open, the rows above the preview fold away (view boxes, hoop, background) and
   so does the player under it, and a bar right under the preview carries what the editor says, Turn, Apply and
   Cancel. The card with the full tools sat about 1000 px below a preview 204 px tall. */
.edit-bar { display: none; }
@media (max-width: 720px) {
  .edit-bar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: none; margin: 8px 14px 10px;
    padding: 8px 10px; border: 1px solid var(--brand); border-radius: 8px; background: var(--surface); }
  .edit-bar p { flex-basis: 100%; margin: 0; color: var(--ink); font-size: 13.5px; }
  .edit-bar p.bad { color: var(--bad); }
  /* the buttons and Cancel on one row at 390 px (Cancel sat alone on a second one: 349 to 358 px of buttons in 340) */
  .edit-bar .secondary { margin: 0; padding: 8px 10px; }
  .edit-bar .link { margin-left: auto; padding: 4px 6px; border: 0; background: none; color: var(--brand); text-decoration: underline; }
  .stage.editing .show-opts, .stage.editing .fabrics, .stage.editing .hotspots, .stage.editing .sew { display: none; }
}

/* scrolling and selection feedback in short windows (ChatGPT, window review round 5) */
.panel { scrollbar-gutter: stable; scrollbar-color: var(--muted) var(--surface); }
.panel::-webkit-scrollbar-thumb { background: var(--muted); }
#piece-result:empty, #adv-status:empty, #outline-note:empty { display: none; }
#piece-result { margin: 0 0 10px; color: var(--brand); }
@media (max-height: 760px) {
  .group { margin-top: 12px; }
  .piece-card { padding: 8px 10px; }
}

/* pick up where you left off (web version) */
.resume { max-width: 440px; margin: 18px auto 0; padding: 14px 16px; border: 1px solid var(--brand); border-radius: 10px; background: var(--surface); text-align: left; }
.resume h2 { margin: 0 0 6px; font-size: 16px; }
.resume p { margin: 0 0 10px; color: var(--muted); }
.resume .link { border: 0; background: none; color: var(--brand); text-decoration: underline; margin-left: 8px; }
.piece-card .piece-thread { margin-top: 10px; }
#piece-now { margin: 4px 0 8px; }

/* report order (ChatGPT, round 3): what to check first; reorder arrows only on request */
.panel.right h2.first { margin-top: 0; }
.threads.movable:not(.reorder) .mv { display: none; }
.threads.movable:not(.reorder) li { grid-template-columns: 18px 34px 1fr auto; }
.checklist { margin: 4px 0 0; padding-left: 18px; }
.checklist li { margin: 2px 0; }

#progress-cancel { margin-left: 8px; border: 0; background: none; color: var(--brand); text-decoration: underline; }

.credit-line { margin: 10px 0 0; font-size: 14px; }
.credit-line.short { color: var(--warn, #c98a1b); }
.tips { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--brand); font-size: 14px; color: var(--muted); }
.tips ul { margin: 4px 0 0; padding-left: 18px; }
.tips li { margin: 2px 0; }
.hint.tip { border-left: 3px solid var(--brand); padding-left: 8px; }
.match-box { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line, #3a4652); border-radius: 10px; }
.match-box h3 { margin: 0 0 4px; font-size: 14px; }
.cleanup-box { margin: 8px 0; }
.cleanup-box .warn-note { margin: 0 0 6px; padding: 6px 8px; border-left: 3px solid var(--gold, #d9a441); font-size: 13px; }

/* ---- get the art ready: remove background, vectorize */
.prep { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line, #3a4048); border-radius: 8px; }
.prep-title { margin: 0 0 8px; font-weight: 600; }
.prep-title em { font-weight: 400; color: var(--muted); font-style: normal; }
.prep-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.prep-row select { flex: 1 1 200px; min-width: 0; padding: 6px 8px; border-radius: 6px; }
.prep .btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line, #3a4048); background: var(--panel-2, transparent); }
.prep .btn:focus-visible { outline: 2px solid var(--accent, #7FD3FF); outline-offset: 2px; }
.prep .btn.link { border: 0; background: none; color: var(--brand); text-decoration: underline; padding: 2px 4px; }
.prep .hint { margin: 0; }
.prep label.check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.prep label.check input { margin-top: 3px; flex: none; }
.prep label.check em { color: var(--muted); font-style: normal; }

/* Is the art ready? (Michael, Oct 12 2026): ready, cleaned up, or needs vectoring first */
.ready-box { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--ok, #3c8d5a); background: rgba(60, 141, 90, .07); }
.ready-box.cleanup { border-left-color: var(--gold, #d9a441); background: rgba(217, 164, 65, .08); }
.ready-box.not_ready { border-left-color: var(--bad, #c0392b); background: rgba(192, 57, 43, .08); }
.ready-box .ready-title { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.ready-box .hint { margin: 0 0 4px; }
.ready-box .ready-reasons { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }

/* lettering (typed text in an installed font) */
#lt-form label { margin-top: 14px; }
#lt-form label:first-child { margin-top: 0; }
#lt-form select, #lt-form .unit { margin-top: 4px; }
#lt-text { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--ground);
  color: var(--ink); font: inherit; font-size: 16px; resize: vertical; min-height: 52px; }
#lt-text:focus { border-color: var(--brand); outline: none; }
#pane-letter .dock { margin-top: 18px; }
#lt-refresh { padding: 0; border: 0; background: none; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; }

/* Teardown tab */
.td-files { list-style: none; padding: 0; margin: 12px 0 0; }
.td-files li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.td-files .td-what { font-size: 13.5px; }
.td-files .td-what small { color: var(--muted); display: block; }
.td-files .secondary { margin-top: 0; }
.td-files .td-name { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.td-result { margin-top: 12px; font-size: 13.5px; }
.td-result table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.td-result th, .td-result td { text-align: left; padding: 3px 4px; border-bottom: 1px solid var(--line); font-weight: normal; }
.td-result td { text-align: right; }
.td-result ul { padding-left: 18px; margin: 6px 0; }

/* Twill orders tab */
.tw-piece { margin: 12px 0 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.tw-piece legend { padding: 0 6px; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.tw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.tw-field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.tw-field.tw-wide { grid-column: 1 / -1; }
.tw-field input, .tw-field select { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--ground); color: var(--ink); font: inherit; font-size: 14px; }
.tw-field input:focus, .tw-field select:focus { border-color: var(--brand); outline: none; }
.tw-field input:disabled { opacity: .5; }
/* a greyed choice on the piece card (a 3D puff piece) looks greyed, not just a little faded */
.piece-card select:disabled, .piece-card input:disabled { opacity: .45; cursor: not-allowed; }
.tw-greek { display: block; margin-top: 6px; color: var(--gold); font-size: 13px; }
.tw-greek:empty { display: none; }
.tw-adv { margin-top: 8px; font-size: 13px; }
.tw-adv summary { cursor: pointer; color: var(--brand); }
.tw-adv .tw-grid { margin-top: 8px; }
.tw-remove { padding: 4px 10px; font-size: 12.5px; }
.tw-add { display: flex; flex-wrap: wrap; gap: 0 8px; }
.tw-results { list-style: none; padding: 0 !important; }
.tw-results li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tw-results div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tw-thumb { width: 76px; height: 76px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: #464a52; cursor: pointer; }
.tw-thumb:hover, .tw-thumb:focus-visible { border-color: var(--brand); }
.tw-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tw-ok { color: var(--good); }
.tw-warn { color: var(--warn); }
