/* Maker Quote v0.2.0 — cool neutral surfaces, navy ink, one indigo action colour, sans type.
   Decoration never sits on top of inputs or decisions. No external fonts or assets. */
:root {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --sunken: #F7F8FB;
  --line: #DEE3EC;
  --line-2: #C3CBDA;
  --ink: #0F1C3F;
  --ink-2: #3E4A66;
  --muted: #536079;
  --action: #3247D1;
  --action-hover: #2537B3;
  --action-soft: #ECEEFD;
  --action-ink: #23309A;
  --gain: #0B6E52;
  --gain-soft: #E2F3EC;
  --loss: #B3261E;
  --loss-soft: #FDECEA;
  --warn-ink: #7A4300;
  --warn-soft: #FFF3DD;
  --warn-line: #EBB867;
  --zone-loss: #F6D7D3;
  --zone-low: #FBE8C8;
  --zone-ok: #D5EBE2;
  --focus: #3247D1;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:lang(ja) { --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo UI", "Noto Sans CJK JP", sans-serif; }
:lang(ko) { --font: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
:lang(zh-Hans) { --font: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .q-num, .big, .v, td { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.loss { color: var(--loss); }
.gain { color: var(--gain); }
.warn { color: var(--warn-ink); }
.noscript { padding: 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; line-height: 1.25; cursor: pointer; text-align: center;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn-danger { background: var(--loss); border-color: var(--loss); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--action-ink); }
.btn-ghost:hover { background: var(--action-soft); border-color: transparent; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.0625rem; }
.btn-small { min-height: 44px; padding: 8px 12px; font-size: .9375rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 10px 2px; min-height: 44px; color: var(--action-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 4px; min-height: 44px; cursor: pointer; font-weight: 750; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand .mark { flex: none; display: block; }
.nav { display: flex; gap: 4px; }
.nav button { min-height: 44px; padding: 8px 14px; border: 0; background: none; border-radius: 10px; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.nav button:hover { background: var(--sunken); }
.nav button[aria-current="page"] { background: var(--action-soft); color: var(--action-ink); }
.spacer { flex: 1; }
.lang select { min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 8px 12px; }

/* ---------- page ---------- */
.banners { max-width: 1320px; margin: 12px auto 0; padding: 0 24px; display: grid; gap: 8px; }
.banner { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--action); border-radius: var(--r-s); padding: 8px 14px; font-size: .9375rem; }
.banner.warn { border-left-color: var(--warn-line); background: var(--warn-soft); }
.page { max-width: 1320px; margin: 0 auto; padding: 24px 24px 48px; }
.sitefoot { max-width: 1320px; margin: 0 auto; padding: 8px 24px 40px; color: var(--muted); font-size: .875rem; }
h1 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 750; }
h2 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 700; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head-row .muted { margin-top: 4px; max-width: 70ch; }
.section-h { margin: 32px 0 4px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head .hint { max-width: 70ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel > h2 + .hint, .panel > h2 + .fields { margin-top: 8px; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-m); }

/* ---------- start ---------- */
.start { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 32px; align-items: start; padding-top: 24px; }
.start h1 { font-size: 2.5rem; max-width: 18ch; }
.lede { margin-top: 12px; font-size: 1.125rem; color: var(--ink-2); max-width: 56ch; }
.start-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.benefits { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.benefits li { border-top: 3px solid var(--line-2); padding-top: 12px; }
.benefits li:first-child { border-top-color: var(--action); }
.benefits strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.benefits span { color: var(--ink-2); font-size: .9375rem; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; display: grid; gap: 10px; justify-items: start; }
.demo-card p { color: var(--ink-2); }

/* ---------- lists ---------- */
.qlist, .plist { display: grid; gap: 8px; }
.qrow, .prow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 150px auto; gap: 16px; align-items: center; }
.prow { grid-template-columns: minmax(0, 1fr) auto; }
.qrow.legacy { grid-template-columns: minmax(0, 1fr) auto; background: var(--sunken); }
.q-title { font-weight: 700; overflow-wrap: anywhere; }
.q-sub { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.q-num { display: grid; text-align: right; }
.q-num .lbl { font-size: .8125rem; color: var(--muted); }
.q-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- forms ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }
.fields.one { grid-template-columns: 1fr; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label { font-weight: 600; font-size: .9375rem; }
.control { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-height: 44px; overflow: hidden; }
.control:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.control input, .control select, .control textarea { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; outline: none; }
.control textarea { resize: vertical; min-height: 88px; }
.control select { cursor: pointer; }
.control.unset { border-style: dashed; }
.control.sm { min-height: 44px; }
.control.sm input { padding: 8px 10px; width: 100%; }
.affix { display: flex; align-items: center; padding: 0 12px; background: var(--sunken); color: var(--muted); font-size: .875rem; border-left: 1px solid var(--line); white-space: nowrap; }
.field.invalid .control { border-color: var(--loss); }
.hint { color: var(--muted); font-size: .875rem; }
.err { color: var(--loss); font-size: .875rem; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--action); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-row .field { flex: 1 1 200px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; }
.seg-opt { position: relative; display: inline-flex; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.seg-opt input:checked + span { background: var(--surface); color: var(--action-ink); box-shadow: 0 1px 2px rgba(15, 28, 63, .12), inset 0 0 0 1px var(--line-2); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

.group { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.group:first-child { border-top: 0; padding-top: 0; }
.group legend { font-weight: 700; font-size: 1.0625rem; float: left; width: 100%; margin-bottom: 4px; }
.group legend + * { clear: both; }
.state-note { background: var(--sunken); border-radius: var(--r-s); padding: 10px 12px; color: var(--ink-2); font-size: .9375rem; }
.mats { display: grid; gap: 12px; margin: 12px 0; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mat-row .btn { margin-bottom: 0; }
.mat-row .err:empty + * { margin: 0; }

/* ---------- quote editor ---------- */
.demo-band { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: var(--r-m); padding: 10px 14px; font-weight: 600; margin-bottom: 16px; }
.qhead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.qtitle { min-width: 0; flex: 1 1 320px; }
.qtitle h1 { font-size: 1.625rem; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.qhead-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; line-height: 1.3; }
.chip-demo { background: var(--warn-soft); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.chip-ok { background: var(--gain-soft); color: var(--gain); }
.chip-warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip-loss { background: var(--loss-soft); color: var(--loss); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: thin; }
.tabs [role="tab"] { min-height: 48px; padding: 10px 16px; border: 0; background: none; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs [role="tab"][aria-selected="true"] { color: var(--action-ink); border-bottom-color: var(--action); }

.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(260px, .62fr); gap: 16px; align-items: start; }
.col-in { display: grid; gap: 18px; }
.col-in > h2 { margin-bottom: -6px; }
.costs-card { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; display: grid; gap: 12px; }
.costs-line { font-size: .9375rem; overflow-wrap: anywhere; }
.basis { display: grid; gap: 8px; }
.basis legend { font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
details.more { border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 14px; background: var(--surface); }
details.more > summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style-position: inside; }
details.more[open] { padding-bottom: 14px; }
details.more[open] > summary { margin-bottom: 4px; }
details.more > .hint { margin-bottom: 10px; }
.quick-mat .fields { margin-bottom: 4px; }
.quick-mat .btn { margin-top: 6px; }
.price-box { border: 2px solid var(--action); border-radius: var(--r-m); padding: 14px; display: grid; gap: 10px; }
.applied { font-weight: 600; color: var(--action-ink); }
.applied:empty { display: none; }

.decision { position: sticky; top: 76px; display: grid; gap: 14px; }
.q-question { font-size: 1.25rem; }
.dec-empty { background: var(--sunken); border-radius: var(--r-m); padding: 16px; color: var(--ink-2); }
.dec-note { color: var(--ink-2); }
.dec-err { color: var(--loss); font-weight: 600; }
.status-box { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: var(--r-m); padding: 12px 14px; font-size: .9375rem; }
.status-box.info { background: var(--action-soft); border-color: #C7CDF7; color: var(--action-ink); }
.dec-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.big-label { font-size: .9375rem; color: var(--ink-2); font-weight: 600; }
.big { font-size: 2.25rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.big .bound { font-size: 1rem; font-weight: 600; color: var(--warn-ink); margin-right: 6px; letter-spacing: 0; }
.big-sub { color: var(--muted); font-size: .875rem; }
.be-line { font-size: 1rem; }
.plate-facts { font-size: .9375rem; color: var(--ink-2); background: var(--sunken); border-radius: var(--r-s); padding: 8px 12px; }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.outcome { background: var(--sunken); border-radius: var(--r-m); padding: 12px; min-width: 0; }
.outcome .l { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.outcome .v { font-size: 1.25rem; font-weight: 750; overflow-wrap: anywhere; line-height: 1.25; margin-top: 2px; }
.outcome .v.gain { color: var(--gain); }
.outcome .v.loss { color: var(--loss); }
.outcome .x { font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.ok-line { color: var(--gain); font-size: .9375rem; font-weight: 600; }

/* price track */
.track-wrap { display: grid; gap: 6px; }
.track { padding: 34px 0 40px; }
.track.two-rows { padding-top: 58px; }
.track-bar { position: relative; height: 12px; border-radius: 999px; background: var(--zone-ok); }
.track-bar.partial { background: repeating-linear-gradient(135deg, #E4E8F0 0 8px, #EEF1F6 8px 16px); }
.track-bar .z { position: absolute; top: 0; bottom: 0; left: 0; }
.track-bar .z-loss { background: var(--zone-loss); border-radius: 999px 0 0 999px; }
.track-bar .z-low { background: var(--zone-low); }
.track-bar.partial .z { display: none; }
.track-bar .mark { position: absolute; top: -6px; width: 2px; height: 24px; background: var(--ink-2); transform: translateX(-1px); }
.track-bar .mark .tag { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.track-bar .mark.drop .tag { bottom: 50px; }
.track-bar .mark.target { background: var(--action); }
.track-bar .knob { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(15, 28, 63, .35); transform: translate(-50%, -50%); }
.track-bar .knob .bubble { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: #fff; font-size: .8125rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.track-bar .tag.edge-l, .track-bar .bubble.edge-l { left: 0; transform: none; }
.track-bar .tag.edge-r, .track-bar .bubble.edge-r { left: auto; right: 0; transform: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-loss { background: var(--zone-loss); }
.lg-low { background: var(--zone-low); }
.lg-ok { background: var(--zone-ok); }

details.internal { border-top: 1px solid var(--line); padding-top: 8px; }
details.internal > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink-2); }
details.internal[open] { display: grid; gap: 10px; }
table { border-collapse: collapse; width: 100%; }
.layers th, .layers td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: .9375rem; }
.layers th { font-weight: 500; color: var(--ink-2); }
.layers td.num { text-align: right; white-space: nowrap; }
.layers tr.off td { color: var(--warn-ink); font-style: italic; }
.layers tfoot th, .layers tfoot td { font-weight: 700; color: var(--ink); border-bottom: 0; }
.notes { display: grid; gap: 4px; }
.notes li { font-size: .875rem; color: var(--ink-2); padding-left: 14px; position: relative; }
.notes li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }

.col-doc { position: sticky; top: 76px; display: grid; gap: 12px; }
.mini-doc { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; display: grid; gap: 6px; }
.mrow { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; }
.mrow span:first-child { overflow-wrap: anywhere; min-width: 0; }
.mrow span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mrow.total { font-weight: 750; border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 2px; }

/* quantities */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.qty-table th, .qty-table td, .cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: .9375rem; }
.qty-table thead th, .cmp-table thead th { font-size: .8125rem; color: var(--muted); font-weight: 700; background: var(--sunken); white-space: nowrap; }
.qty-table td.num, .cmp-table .num { text-align: right; white-space: nowrap; }
.qty-table .control.sm { width: 96px; }
.qty-table td:nth-child(2) .control.sm { width: 110px; }
.qty-table tr.neg td.o-po, .qty-table tr.neg td.o-pp { color: var(--loss); }
.qty-table .o-act { white-space: nowrap; text-align: right; }
.qty-table .num.loss { color: var(--loss); }
.qty-table .num.warn { color: var(--warn-ink); }
.cmp-table tr.chg th { font-weight: 700; color: var(--ink); }
.cmp-table .delta { font-weight: 700; }
.cmp-table tfoot th, .cmp-table tfoot td { font-weight: 700; background: var(--sunken); }
.cmp-field { min-width: 260px; }
.sub-h { margin: 24px 0 10px; }
.changes-list { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.changes-list li { overflow-wrap: anywhere; }
#tabpanel > .hint, #tabpanel > .check { margin-top: 12px; }
#tabpanel > .row-actions { margin-top: 20px; }
#tabpanel > .status-box { margin-bottom: 12px; }

/* customer document */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.doc-preview { background: #E7EAF1; border-radius: var(--r-l); padding: 24px; }
.doc { background: #fff; color: #0F1C3F; border-radius: 6px; box-shadow: 0 1px 3px rgba(15, 28, 63, .12), 0 8px 24px rgba(15, 28, 63, .06); padding: 36px 36px 40px; display: grid; gap: 18px; overflow-wrap: anywhere; }
.doc-empty { color: var(--muted); text-align: center; padding: 48px 24px; }
.doc-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.doc-biz { min-width: 0; flex: 1 1 200px; }
.doc-shop { font-weight: 750; font-size: 1.125rem; }
.doc-contact { white-space: pre-wrap; color: #3E4A66; font-size: .9375rem; }
.doc-head { text-align: right; min-width: 0; }
.doc-title { font-size: 1.75rem; font-weight: 750; letter-spacing: -.01em; }
.doc-meta { display: grid; grid-template-columns: auto auto; gap: 2px 12px; justify-content: end; font-size: .9375rem; margin-top: 6px; }
.doc-meta dt { color: #536079; }
.doc-meta dd { text-align: right; }
.doc-to { display: flex; gap: 8px; flex-wrap: wrap; font-size: 1rem; }
.doc-to .lbl { color: #536079; }
.doc-table th { text-align: left; font-size: .8125rem; color: #3E4A66; border-bottom: 2px solid #0F1C3F; padding: 6px 4px; }
.doc-table td { padding: 12px 4px; border-bottom: 1px solid #DEE3EC; vertical-align: top; }
.doc-table .num { text-align: right; white-space: nowrap; }
.doc-item { font-weight: 600; }
.doc-totals { margin-left: auto; width: min(100%, 340px); display: grid; gap: 4px; }
.doc-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.doc-totals > div span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-totals .grand { font-weight: 750; font-size: 1.1875rem; border-top: 2px solid #0F1C3F; padding-top: 8px; margin-top: 4px; }
.doc-options h3 { font-size: 1rem; }
.doc-options .muted { font-size: .875rem; }
.doc-note { white-space: pre-wrap; color: #3E4A66; border-top: 1px solid #DEE3EC; padding-top: 14px; }
.doc-form { display: grid; gap: 14px; position: sticky; top: 76px; }
.private { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; font-size: .9375rem; }
.private p { color: var(--ink-2); margin-top: 2px; }
.doc-actions { display: grid; gap: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 12px 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- toast, dialog, mobile bar ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 28, 63, .25); font-size: .9375rem; }
.toast-ok { background: #0B5640; }
.toast-warn { background: #6B3A00; }
dialog { border: 0; border-radius: var(--r-l); padding: 24px; width: min(480px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 20px 60px rgba(15, 28, 63, .3); }
dialog::backdrop { background: rgba(15, 28, 63, .45); }
dialog h2 { font-size: 1.25rem; margin-bottom: 8px; }
dialog p { color: var(--ink-2); }
#dlg-extra:not(:empty) { margin-top: 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.mbar { display: none; }
.internal-print { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .col-doc { grid-column: 1 / -1; position: static; }
}
@media (max-width: 900px) {
  .start { grid-template-columns: 1fr; gap: 24px; padding-top: 4px; }
  .benefits { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .work { grid-template-columns: 1fr; }
  .decision { position: static; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-form { position: static; }
  .qrow { grid-template-columns: minmax(0, 1fr) auto auto; }
  .qrow .q-main { grid-column: 1 / -1; }
  .qrow .q-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .qrow .q-num { text-align: left; }
}
@media (max-width: 760px) {
  body { padding-bottom: 84px; }
  .topbar-in { padding: 4px 12px; gap: 4px 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav button { padding: 8px 12px; }
  .banners { padding: 0 16px; }
  .page { padding: 16px 16px 32px; }
  .sitefoot { padding: 8px 16px 24px; }
  h1 { font-size: 1.5rem; }
  .start h1 { font-size: 1.75rem; }
  .lede { font-size: 1rem; margin-top: 8px; }
  .start-actions { margin-top: 16px; }
  .start-actions .btn { width: 100%; }
  .panel { padding: 16px; border-radius: var(--r-m); }
  .outcomes { grid-template-columns: 1fr 1fr; }
  .outcomes .outcome:last-child { grid-column: 1 / -1; }
  .big { font-size: 1.875rem; }
  .mat-row { grid-template-columns: 1fr 1fr; }
  .mat-row .field:first-child { grid-column: 1 / -1; }
  .doc-preview { padding: 10px; border-radius: var(--r-m); }
  .doc { padding: 20px 16px 24px; }
  .doc-title { font-size: 1.375rem; }
  .doc-head { text-align: left; }
  .doc-meta { justify-content: start; }
  .doc-meta dd { text-align: left; }
  .qhead-acts { width: 100%; }
  .qty-table thead { display: none; }
  .qty-table, .qty-table tbody, .qty-table tr, .qty-table td { display: block; width: 100%; }
  .qty-table tr { border-bottom: 1px solid var(--line-2); padding: 8px 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .qty-table td { border: 0; padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .qty-table td[data-l]::before { content: attr(data-l); font-size: .8125rem; color: var(--muted); font-weight: 600; }
  .qty-table .o-act { grid-column: 1 / -1; justify-content: flex-end; }
  .qty-table .control.sm, .qty-table td:nth-child(2) .control.sm { width: 92px; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 10px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15, 28, 63, .08); }
  .mbar .sum { flex: 1; min-width: 0; display: grid; }
  .mbar .sum .l { font-size: .8125rem; color: var(--muted); }
  .mbar .sum .v { font-weight: 750; font-size: 1.125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar .grow { flex: 1; }
  .toast { bottom: 96px; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 1rem; }
  .fields { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .qty-table tr { grid-template-columns: 1fr; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; padding: 0; }
  .topbar, .banners, .sitefoot, .mbar, .toast, dialog, .tabs, .qhead-acts, .demo-band { display: none !important; }
  .page { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  body[data-print="customer"] #app > *:not(main), body[data-print="customer"] main > *:not(#tabpanel) { display: none !important; }
  body[data-print="customer"] .doc-form { display: none !important; }
  body[data-print="customer"] .doc-layout { display: block; }
  body[data-print="customer"] .doc-preview { background: none; padding: 0; }
  body[data-print="customer"] .doc { box-shadow: none; padding: 0; }
  body[data-print="internal"] #app { display: none !important; }
  body[data-print="internal"] .internal-print { display: block; }
  .internal-print h1 { font-size: 20pt; margin-bottom: 6pt; }
  .internal-print .warnline { font-weight: 700; border: 1px solid #000; padding: 4pt 8pt; margin-bottom: 8pt; }
  .internal-print p { margin: 4pt 0; }
  .internal-print .layers { margin: 8pt 0; }
}
.costs-card > .link, .status-box .link { justify-self: start; padding-left: 0; }
.status-box .link { color: inherit; }
/* Printed/PDF text must stay searchable and copyable: tabular-number glyph substitution breaks the PDF text layer in Chromium. */
@media print { *, .doc, .doc * { font-variant-numeric: normal !important; } }
@media (max-width: 760px) { .tabs [role="tab"] { padding: 10px 10px; font-size: .9375rem; } }

/* ---------- v0.2.1: core-first price workbench, tax state, mobile steps ---------- */
html { scroll-padding-top: 72px; }
.flabel { font-weight: 600; font-size: .9375rem; }
.basis-row { gap: 6px; }
.basis-row .seg { justify-self: start; }
.fields.core { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.col-in { gap: 16px; }
.price-box { gap: 12px; }
fieldset.tax { display: grid; gap: 6px; }
fieldset.tax legend { font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
fieldset.tax.invalid .seg { border-color: var(--loss); }
.tax-legacy .row-actions { margin-top: 8px; }
details.more > summary { gap: 10px; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; }
details.more > summary .sum-val { font-weight: 500; color: var(--muted); font-size: .875rem; margin-left: auto; text-align: right; overflow-wrap: anywhere; }
.costs-fold .costs-card { margin-bottom: 4px; }
.sub-h0 { font-size: .9375rem; margin-bottom: 8px; }
.quick-mat { border-top: 1px solid var(--line); padding-top: 12px; }
.status-box.alert { background: var(--loss-soft); border-color: #F0B4AE; color: var(--loss); margin-bottom: 14px; }
.status-box.alert .row-actions { margin-top: 10px; }
.open-work { border: 2px solid var(--action); margin-bottom: 16px; }
.open-work p { margin: 6px 0 12px; }
.meta.warn { color: var(--warn-ink); }
.msteps { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-bottom: 104px; scroll-padding-top: 116px; }
  .msteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; position: sticky; top: 100px; z-index: 15; }
  .msteps button { min-height: 44px; border: 0; background: none; border-radius: 9px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; cursor: pointer; }
  .msteps button .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font-size: .8125rem; }
  .msteps button[aria-pressed="true"] { background: var(--surface); color: var(--action-ink); box-shadow: 0 1px 2px rgba(15, 28, 63, .12), inset 0 0 0 1px var(--line-2); }
  .msteps button[aria-pressed="true"] .n { background: var(--action); color: #fff; }
  .work > [data-mp] { display: none; }
  .work[data-m="in"] > [data-mp="in"], .work[data-m="result"] > [data-mp="result"], .work[data-m="doc"] > [data-mp="doc"] { display: grid; }
  .fields.core { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mbar .sum .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) { .fields.core { grid-template-columns: 1fr 1fr; } .msteps button { font-size: .875rem; } }
.fields.core { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.basis-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.basis-row .hint { flex-basis: 100%; }
.basis-row .seg-opt span { min-height: 36px; padding: 6px 12px; }
.col-in > h2 { margin-bottom: -4px; }
@media (max-width: 760px) { .fields.core { grid-template-columns: 1fr 1fr; } .basis-row .seg-opt span { min-height: 40px; } }
.basis-row .seg-opt span { min-height: 40px; }
@media (max-width: 760px) { .basis-row .seg-opt span, .seg-opt span { min-height: 44px; } }
@media (max-width: 760px) {
  .mbar .btn { flex: none; max-width: 48%; white-space: normal; }
  .mbar .sum .v { font-size: 1.0625rem; }
  .msteps { top: var(--tb-h, 100px); }
}
.status-box .link { text-align: left; }
/* phones: the quote header scrolls away; tabs + step bar stay reachable so switching keeps your place */
@media (max-width: 760px) {
  .topbar { position: static; }
  .job-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .qhead { flex-wrap: nowrap; align-items: center; margin-bottom: 8px; }
  .qtitle { flex: 1 1 auto; }
  .qtitle h1 { font-size: 1.25rem; }
  .qhead-acts { width: auto; flex: none; }
  .tabs { position: sticky; top: 0; z-index: 16; background: var(--bg); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: visible; margin-bottom: 10px; }
  .tabs [role="tab"] { white-space: normal; line-height: 1.2; padding: 6px 4px; font-size: .875rem; min-height: 48px; }
  .msteps { top: var(--tabs-h, 48px); }
  .fields.core .mat-field { grid-column: auto; }
  .price-box .fields { grid-template-columns: 1fr 1fr; gap: 12px; }
  .basis-row .flabel { font-size: .875rem; }
  html { scroll-padding-top: 120px; }
}
.fields.core > .field:not(.wide):not(.basis-row) { align-content: end; }
@media (max-width: 760px) {
  .price-box .fields > .field:first-child { grid-column: 1 / -1; }
  .fields.core > .mat-field { align-content: start; }
}
@media (max-width: 760px) { .qhead { flex-wrap: wrap; } .qtitle { flex: 1 1 140px; min-width: 0; } .qhead-acts { flex-wrap: wrap; } }
@media (max-width: 760px) { .qtitle { flex: 1 1 100%; } .qhead-acts { flex: 1 1 100%; } }
@media (min-width: 361px) and (max-width: 760px) { .qhead-acts .btn { padding: 10px 14px; } }
@media (max-width: 760px) { .mbar .sum .v { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; } }
@media (max-width: 360px) { .mbar .sum .v { font-size: .9375rem; } .mbar .btn { padding: 10px 12px; } }

/* v0.3: decisions have their own space; illustrations explain a workflow. */
:root { --bg: #f4f6f9; --r-l: 20px; }
.btn { transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.btn-primary { box-shadow: 0 3px 8px #2537b318; }
.page { max-width: 1320px; }
.evolution-start { padding-top: 10px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 60px; background: #102339; border-radius: 28px; padding: 48px; color: #fff; }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .07em; line-height: 1.5; color: var(--action-ink); margin-bottom: 16px; }
.hero .eyebrow { color: #91d6c5; }
.hero h1 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.25; max-width: 16ch; overflow-wrap: anywhere; }
:lang(ko) .hero h1, :lang(ja) .hero h1, :lang(zh-Hans) .hero h1 { max-width: 14ch; word-break: keep-all; }
.hero-lede { margin-top: 22px; max-width: 43ch; color: #d0dbe7; font-size: 1.0625rem; line-height: 1.8; }
.hero .start-actions { margin-top: 28px; }
.hero .btn-primary { background: #d5f7eb; color: #0c392d; border-color: #d5f7eb; box-shadow: none; }
.hero .btn-primary:hover { background: #b4e9d7; }
.hero-secondary { color: white; background: transparent; border-color: #7b8a9b; }
.hero-secondary:hover { background: #263c53; border-color: #adbdcc; }
.hero-trust { margin-top: 18px; font-size: .8125rem; color: #b6c8db; line-height: 1.7; }
.hero-preview { color: var(--ink); background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 20px 60px #0002; min-width: 0; transform: rotate(-1deg); }
.preview-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: .75rem; color: var(--muted); }
.plate-picture { display: block; width: 100%; height: auto; max-height: 190px; margin: 8px 0; }
.print-nozzle { animation: trace-plate 1800ms ease-in-out 1; }
@keyframes trace-plate { 0% { transform: translate(-70px, 15px); } 50% { transform: translate(30px, -8px); } 100% { transform: none; } }
.hero-preview h2 { font-size: 1.1875rem; margin-top: 4px; }
.hero-preview > .hint { margin-top: 6px; }
.preview-numbers { margin: 18px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-numbers .v { font-size: 1.65rem; }
.preview-numbers .x { font-size: .75rem; }
.hero-preview .link { text-align: left; font-size: .9375rem; }
.job-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.job-card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 24px; }
.job-no { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--action-soft); color: var(--action-ink); border-radius: 10px; font-size: .8125rem; font-weight: 700; margin-bottom: 14px; }
.job-card h2 { font-size: 1.0625rem; line-height: 1.5; margin-bottom: 8px; }
.job-card p { color: var(--ink-2); font-size: .9375rem; line-height: 1.8; }
.start-bottom { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin: 26px 8px 0; }
.start-bottom p { font-size: .9375rem; color: var(--muted); }
.start-bottom .btn { flex-shrink: 0; }
.studio-heading { max-width: 820px; margin: 28px 0 24px; }
.studio-heading .eyebrow { margin-bottom: 8px; }
.studio-heading h2 { font-size: 1.875rem; letter-spacing: -.035em; line-height: 1.35; }
.studio-heading .muted { margin-top: 12px; line-height: 1.8; }
.studio-baseline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 22px; margin-bottom: 24px; background: #e9edf5; border: 1px solid #d6deeb; border-radius: 14px; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.studio-baseline > span:first-child { color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.studio-grid > .panel { margin: 0; padding: 28px; border-radius: 20px; min-width: 0; }
.studio-grid h3 { font-size: 1.25rem; letter-spacing: -.025em; line-height: 1.5; margin-bottom: 8px; }
.section-kicker { font-size: .75rem; font-weight: 700; color: var(--action-ink); letter-spacing: .025em; margin-bottom: 12px; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.boundary-grid .v { font-size: 1.55rem; line-height: 1.4; overflow-wrap: anywhere; }
.boundary-grid .l { font-size: .8125rem; }
.boundary-grid .x { font-size: .75rem; }
.negotiate > .boundary-grid { background: var(--sunken); padding: 16px; border-radius: 12px; }
.offer-result { margin-top: 20px; padding: 18px; border: 1px dashed var(--line-2); border-radius: 14px; min-height: 64px; }
.offer-covers { background: var(--warn-soft); border: 1px solid #e9d5a7; }
.offer-target { background: var(--gain-soft); border: 1px solid #b4d7c8; }
.offer-loss { background: var(--loss-soft); border: 1px solid #ecc1bb; }
.offer-verdict { font-weight: 700; line-height: 1.65; }
.offer-result .boundary-grid { margin: 16px 0; }
.offer-result .btn { margin: 14px 0 8px; width: 100%; background: white; }
.stress-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 20px 0 4px; }
.stress-inputs label { font-size: .8125rem; }
.stress-results { margin-top: 18px; display: grid; gap: 10px; }
.stress-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.stress-row:last-child { border: 0; }
.stress-row .hint { font-size: .8125rem; margin-top: 3px; }
.stress-value { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.stress-value > strong { font-size: 1.125rem; }
.stress-row.combined { background: #edf1fa; border-radius: 12px; padding: 16px; }
.stress-target { grid-column: 1 / -1; font-size: .8125rem; border-top: 1px solid #cdd7e9; padding-top: 10px; margin-top: 4px; }
.batch-body > p { margin-top: 12px; }
.plate-slots { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; padding: 20px; border: 1px solid #c8d2e2; border-radius: 14px; background: #f1f4f9; margin: 18px 0 8px; }
.plate-slot { aspect-ratio: 1.3; border: 1px dashed #9caac0; border-radius: 6px; background: white; }
.plate-slot.filled { background: #5973dc; border: 1px solid #324aaf; box-shadow: inset 0 4px 0 #93a7f0; }
.batch-opportunity { margin: 20px 0 12px; border-left: 3px solid var(--gain); padding: 8px 14px; background: #edf7f2; line-height: 1.8; font-size: .9375rem; }
.batch-body > .btn { width: 100%; margin-top: 16px; }
.batch-empty { display: grid; gap: 16px; font-size: .9375rem; color: var(--ink-2); }
.batch-empty .plate-picture { max-height: 120px; opacity: .7; }
.cost-mix { display: flex; height: 18px; overflow: hidden; border-radius: 5px; margin: 24px 0 20px; background: var(--sunken); }
.mix-segment { display: block; flex: none; min-width: 0; }
.mix-material { background: #3b57cc; }
.mix-electricity { background: #bb8100; }
.mix-machine { background: #8391ad; }
.mix-attemptLabor { background: #137d71; }
.mix-failExtra { background: #9c5b92; }
.mix-finishing { background: #71bfa4; }
.mix-setup { background: #37a1c3; }
.mix-other { background: #b5becc; }
.mix-list { display: grid; gap: 12px; }
.mix-list li, .mix-total { display: flex; justify-content: space-between; gap: 18px; font-size: .9375rem; }
.mix-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; }
.mix-total { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.studio-note { margin: 24px 0; max-width: 85ch; font-size: .8125rem; color: var(--muted); line-height: 1.9; }
.studio-entry { margin: 18px 0; }
.studio-locked { display: grid; gap: 18px; justify-items: start; max-width: 680px; }
.tabs { background: var(--bg); }
@media (max-width: 1100px) { .hero { gap: 28px; padding: 32px; } .stress-inputs { grid-template-columns: 1fr 1fr; } .stress-inputs > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 26px 22px; border-radius: 20px; }
  .hero h1 { font-size: 2.125rem; }
  .hero-lede { font-size: .9375rem; margin-top: 16px; }
  .hero .start-actions { margin-top: 20px; }
  .hero .start-actions .btn { width: 100%; }
  .hero-preview { padding: 18px; transform: none; }
  .hero-preview .plate-picture { max-height: 130px; }
  .preview-numbers .v { font-size: 1.4rem; }
  .job-cards { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .job-card { padding: 20px; }
  .job-no { float: left; margin-right: 14px; margin-bottom: 0; }
  .job-card p { clear: both; padding-top: 6px; }
  .start-bottom { align-items: stretch; flex-direction: column; margin: 24px 0 0; }
  .tabs { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .tabs [role=tab] { font-size: .8125rem; overflow-wrap: anywhere; }
  .studio-heading { margin: 20px 0; }
  .studio-heading h2 { font-size: 1.5rem; }
  .studio-heading .muted { font-size: .9375rem; }
  .studio-grid { grid-template-columns: 1fr; gap: 16px; }
  .studio-grid > .panel { padding: 20px; border-radius: 16px; }
  .studio-baseline { padding: 14px; gap: 6px 12px; }
  .studio-baseline > :last-child { flex-basis: 100%; }
  .boundary-grid { gap: 10px; }
  .boundary-grid .v { font-size: 1.3rem; }
  .offer-result { padding: 14px; }
  .stress-row.combined { padding: 12px; }
  .plate-slots { padding: 14px; gap: 8px; }
}
@media (max-width: 360px) { .hero { padding: 24px 16px; } .hero h1 { font-size: 1.875rem; } .studio-grid > .panel { padding: 16px; } .studio-grid h3 { font-size: 1.125rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* First-use corrections: explicit task destinations with room under sticky navigation. */
.studio-jumps { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.studio-jumps .btn { color: var(--action-ink); background: white; }
.studio-grid h3[id] { scroll-margin-top: 100px; }
.studio-grid h3[id]:focus { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: 4px; }
@media screen and (max-width: 760px) {
  /* Keep a semantic table and its column headers available to assistive technology.
     On a phone the title gets a full row; labelled numeric cells sit beneath it.
     Screen-only rules leave print/PDF layout unchanged. */
  .doc-items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc-items tbody tr { display: grid; grid-template-columns: .6fr 1fr 1fr; gap: 6px 12px; }
  .doc-items td { border-bottom: 0; min-width: 0; padding: 10px 0; }
  .doc-items td.doc-item { grid-column: 1 / -1; border-top: 2px solid var(--ink); font-weight: 700; padding-top: 14px; }
  .doc-items td.num { text-align: left; border-bottom: 1px solid var(--line); font-size: .9375rem; white-space: normal; }
  .doc-items td.num::before { content: attr(data-label); display: block; font-size: .8125rem; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
}
@media (max-width: 760px) {
  .studio-jumps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .studio-jumps .btn { min-height: 44px; font-size: .875rem; padding: 8px 6px; }
  .studio-grid h3[id] { scroll-margin-top: 80px; }
}
