:root {
  color-scheme: dark;
  --bg: #111113;
  --surface: #19191c;
  --ink: #f3f2ee;
  --muted: #c1c0bd;
  --line: #f3f2ee32;
  --focus: #e1c79b;
  --edge: clamp(1rem, 5vw, 4.75rem);
  --bar: 62px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--bar) + 1.25rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 system-ui, "PingFang SC", "Microsoft YaHei UI", sans-serif;
}
:where(h1, h2, p, dl, figure) { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
button { font: inherit; }
a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--focus); text-decoration-thickness: 2px; }
.visually-hidden, .role-tabs input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.proposal-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: var(--bar);
  gap: .5rem 1.5rem;
  padding: .35rem var(--edge);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.proposal-bar .brand { font-size: .93rem; font-weight: 750; letter-spacing: .12em; text-decoration: none; }
.proposal-bar nav { display: flex; flex-wrap: wrap; gap: .1rem clamp(.45rem, 2.7vw, 1.6rem); font-size: .88rem; }
main { max-width: 90rem; margin-inline: auto; padding-inline: var(--edge); }
.proposal-intro { padding-block: clamp(1.8rem, 5.6vw, 4.4rem) clamp(1.15rem, 2.8vw, 2.2rem); }
h1 { font-size: clamp(2.4rem, 6vw, 5.6rem); line-height: 1.09; font-weight: 690; letter-spacing: -.055em; }
:lang(zh) h1 { letter-spacing: 0; }
h2 { font-size: clamp(1.35rem, 2.65vw, 2.6rem); line-height: 1.2; font-weight: 650; text-wrap: balance; }
.proposal-intro p, .proof-result > p { max-width: 38rem; margin-top: .6rem; color: var(--muted); }

.role-picker { position: sticky; top: var(--bar); z-index: 3; min-inline-size: 0; margin: 0; padding: 0; border: 0; background: var(--bg); }
.role-tabs {
  --position: 0%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.role-tabs::after {
  position: absolute;
  bottom: -1px;
  left: var(--position);
  width: calc(100% / 3);
  height: 2px;
  background: var(--focus);
  content: "";
  pointer-events: none;
  transition: left .24s cubic-bezier(.2,.75,.32,1);
}
.role-tabs:has(#for-visual:checked) { --position: calc(100% / 3); }
.role-tabs:has(#for-data:checked) { --position: calc(200% / 3); }
.role-tabs label {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: .45rem .25rem;
  color: var(--muted);
  font-size: clamp(.8rem, 1.4vw, .98rem);
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}
.role-tabs label:hover { background: var(--surface); color: var(--ink); }
.role-tabs input:checked + label { color: var(--ink); font-weight: 660; background: var(--surface); }
.role-tabs input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: -3px; }
.role-panels { padding-block: clamp(1rem, 2.8vw, 2rem) 2.1rem; }

@supports selector(:has(*)) {
  .role-panels > article { display: none; }
  body:has(#for-engineering:checked) #panel-engineering,
  body:has(#for-visual:checked) #panel-visual,
  body:has(#for-data:checked) #panel-data { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .role-panels > article:not([hidden]) { animation: appear .26s cubic-bezier(.21,.62,.34,1) both; }
}
@keyframes appear { from { opacity: .68; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.review-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: stretch;
  gap: clamp(1.25rem, 4.3vw, 4rem);
}
.specimen { min-width: 0; background: var(--surface); border: 1px solid var(--line); align-self: start; }
.specimen img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: contain; }
.specimen figcaption, .file-preview header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  padding: .65rem .85rem;
  color: var(--muted);
  font-size: .83rem;
  overflow-wrap: anywhere;
}
.specimen b { color: var(--ink); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.specimen-apparel { background: var(--surface); }
.specimen-apparel img { aspect-ratio: 4 / 5; width: auto; max-width: 100%; max-height: 19rem; margin-inline: auto; }
.proof-result { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.proof-facts { margin-block: .65rem .25rem; }
.proof-facts div {
  display: grid;
  grid-template-columns: minmax(0, .6fr) minmax(0, 1fr);
  gap: .3rem .6rem;
  padding: .48rem 0;
}
table { border-collapse: collapse; width: 100%; }
.proof-table { margin-top: .85rem; font-size: .88rem; }
.proof-table caption { text-align: start; padding-bottom: .36rem; font-weight: 650; }
.proof-table caption span { color: var(--muted); font-weight: 400; }
th, td { padding: .42rem .5rem; border-block-start: 1px solid var(--line); text-align: start; }
thead th { color: var(--muted); font-weight: 550; }
td:last-child { font-variant-numeric: tabular-nums; }
.file-preview { padding-block: .25rem .8rem; }
.file-preview .proof-table { width: calc(100% - 1.7rem); margin: .3rem .85rem 0; }
.proposal-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .95rem; margin-top: .6rem; font-size: .88rem; }
.proposal-evidence .primary-link { gap: .3rem; color: var(--focus); font-weight: 650; }
.proposal-evidence .primary-link:hover { color: var(--ink); }

.handoff {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.4rem;
  padding-block-start: .75rem;
  margin-block-start: clamp(1rem, 2.8vw, 1.9rem);
  border-top: 1px solid var(--line);
}
.handoff > div { padding: .55rem .45rem .65rem 0; min-width: 0; }
dt { font-weight: 640; }
dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.handoff dd { margin-top: .3rem; font-size: .9rem; max-width: 32rem; }
details { margin-top: .75rem; border-block: 1px solid var(--line); }
summary { list-style: none; min-height: 46px; padding: .4rem .25rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2em; color: var(--focus); }
details[open] summary::after { content: "−"; }
details > p { padding: .1rem .25rem .72rem; color: var(--muted); max-width: 54rem; }
@supports selector(details::details-content) {
  details { interpolate-size: allow-keywords; }
  details::details-content {
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition: block-size .26s ease, opacity .19s ease, content-visibility .26s allow-discrete;
  }
  details[open]::details-content { block-size: auto; opacity: 1; }
}

#proposal-selection, .proposal-pricing { padding-block: 1.25rem 1.7rem; border-top: 1px solid var(--line); }
.selection-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .2rem .7rem; margin-bottom: .6rem; }
.selection-head a { font-size: .88rem; }
.selection-table :is(th, td) { padding: .55rem .45rem; }
.selection-table :is(th, td):last-child { width: 6rem; text-align: end; }
.selection-table td:first-child b { color: var(--muted); font-size: .8rem; margin-inline-end: .65rem; }
.proposal-pricing h2 { margin-bottom: .8rem; font-size: clamp(1.12rem, 2vw, 1.6rem); }
.quote-rules div { display: grid; grid-template-columns: minmax(5.25em,.3fr) minmax(0,1fr); gap: .3rem 1rem; border-top: 1px solid var(--line); padding-block: .65rem; }
.quote-estimate { display: block; margin-block-start: .2rem; color: var(--muted); font-size: .8em; font-variant-numeric: tabular-nums; }
.proposal-pricing > p { margin-top: .65rem; color: var(--muted); font-size: .87rem; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: .65rem; padding-block: .15rem 3.4rem; }
.proposal-actions a, .proposal-actions button {
  min-height: 46px;
  padding: .52rem .95rem;
  border: 1px solid var(--line);
  text-decoration: none;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.proposal-actions a:hover, .proposal-actions button:hover { border-color: var(--focus); color: var(--focus); }
.proposal-actions .proposal-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 620; }
.proposal-actions .proposal-primary:hover { background: var(--focus); color: var(--bg); }

@media (max-width: 760px) {
  .review-proof, .handoff { grid-template-columns: minmax(0, 1fr); }
  .review-proof { gap: 1.15rem; }
  .handoff { margin-top: .85rem; padding-top: 0; }
  .handoff > div { padding-block: .64rem; border-bottom: 1px solid var(--line); }
  .specimen-apparel img { max-height: 15rem; }
  .role-picker { position: static; }
  .proposal-bar { position: static; }
  html { scroll-padding-top: 1rem; }
}
@media (max-width: 400px) {
  .proposal-bar nav { font-size: .79rem; }
  .proof-table { font-size: .85rem; }
  .quote-rules div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .role-tabs::after, details::details-content { transition: none; }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --ink: #000; --muted: #333; --line: #999; --surface: #fff; }
  body { font-size: 10.5pt; }
  main { padding: 0; }
  .proposal-bar, .proposal-actions, .role-picker, .proposal-evidence, .selection-head a { display: none; }
  .proposal-intro, .role-panels, .proposal-pricing { padding-block: 0 .6rem; }
  h1 { font-size: 30pt; }
  h2 { font-size: 18pt; }
  .review-proof { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .8rem; break-inside: avoid; }
  .proof-result { justify-content: start; }
  .handoff { display: block; margin-top: .6rem; }
  .handoff > div, .quote-rules div, .selection-table tr { break-inside: avoid; }
  details::details-content { block-size: auto; opacity: 1; overflow: visible; content-visibility: visible; }
}
