/* The Print Bench — a workshop bench, not the studio sheet.
   Graphite ground, steel panels, amber filament, lime fit, coral fail. */

:root {
  --ground: #12171a;
  --ground-2: #171d21;
  --panel: #1b2227;
  --panel-2: #222b30;
  --line: rgba(226, 238, 234, 0.14);
  --line-strong: rgba(226, 238, 234, 0.28);
  --ink: #f1ead9;
  --muted: #9fb0ad;
  --faint: #849795;
  --amber: #f5a83c;
  --amber-deep: #c67c1f;
  --lime: #b7e06a;
  --coral: #e4654b;
  --steel: #7e9291;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, SFMono-Regular, monospace;
  --max: 1380px;
  --gutter: clamp(16px, 3.4vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(226, 238, 234, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(226, 238, 234, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(1200px 620px at 78% -10%, #1e292d 0%, transparent 60%),
    var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
svg { display: block; }

.mono, .eyebrow, .bar-tool, .bar-state {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber);
  color: #1a1206;
  padding: 12px 16px;
  z-index: 30;
}
.skip:focus { left: 12px; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* header */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 23, 26, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  letter-spacing: -0.03em;
}
.brand-a { font-weight: 800; font-size: 1.15rem; }
.brand-b { font-weight: 500; font-size: 1.15rem; color: var(--amber); }
.bar-tool { color: var(--faint); }
.bar-state {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: none;
}
.reset {
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 40px;
}
.reset:hover { border-color: var(--amber); color: var(--amber); }

/* intro */
.intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 86px) var(--gutter) clamp(28px, 4vw, 48px);
}
.eyebrow {
  color: var(--amber);
  margin-bottom: 18px;
}
.intro h1 {
  font-size: clamp(2.3rem, 5.6vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 18ch;
}
.intro-note {
  margin-top: 22px;
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* work surface */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(50px, 7vw, 90px);
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 34px);
  align-items: start;
}

.ticket {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 0 18px 18px;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  margin-bottom: 4px;
}
.ticket-head .mono:last-child { color: var(--faint); }

.field {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 14px 0 16px;
}
.field legend {
  padding: 0;
  margin-bottom: 10px;
  color: var(--muted);
  width: 100%;
}
.opts { display: grid; gap: 6px; }
.opts-jobs { grid-template-columns: 1fr 1fr; }
.opts-materials { grid-template-columns: 1fr 1fr; }
.opts-envs { grid-template-columns: 1fr 1fr; }
.opts-finish { grid-template-columns: repeat(3, 1fr); }
.opts-priority { grid-template-columns: 1fr 1fr; }

.opt {
  position: relative;
  text-align: left;
  background: var(--ground-2);
  border: 1px solid var(--line);
  padding: 9px 10px 10px;
  cursor: pointer;
  min-height: 46px;
  transition: border-color 120ms ease, background 120ms ease;
}
.opt:hover { border-color: var(--line-strong); background: var(--panel-2); }
.opt[aria-pressed="true"] {
  border-color: var(--amber);
  background: #2a2418;
  box-shadow: inset 3px 0 0 var(--amber);
}
.opt-name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.opt-note {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--faint);
}
.opt[aria-pressed="true"] .opt-note { color: #c9b68c; }
.opts-priority .opt, .opts-finish .opt { padding: 8px 9px; }
.opts-priority .opt-name, .opts-finish .opt-name { font-size: 0.76rem; font-weight: 500; }

.field-budget { border-bottom: 0; padding-bottom: 6px; }
.field-budget label { display: block; color: var(--muted); margin-bottom: 10px; }
.budget-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--line-strong);
}
input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--line-strong);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  background: var(--amber);
  border: 0;
  border-radius: 50%;
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--amber);
  border: 0;
  border-radius: 50%;
}
#budgetOut {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--amber);
  min-width: 64px;
  text-align: right;
}
.fine { font-size: 0.72rem; color: var(--faint); line-height: 1.45; margin-top: 8px; }

.run {
  width: 100%;
  border: 0;
  background: var(--amber);
  color: #1b1307;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  cursor: pointer;
  margin-top: 12px;
}
.run:hover { background: #ffbe5c; }
.run:active { transform: translateY(1px); }
.run svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.run:disabled { opacity: 0.55; cursor: wait; }
.hint {
  margin-top: 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--faint);
  min-height: 2.9em;
}
.hint b { color: var(--muted); font-weight: 600; }

/* stage */
.stage { min-width: 0; }

.stage-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  margin-bottom: 12px;
}
.part-card { padding: 18px 20px 16px; }
.part-card > .mono { color: var(--faint); }
.part-card h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 4px 0 5px;
}
.part-card > p { color: var(--muted); font-size: 0.9rem; }
.part-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.part-facts div { min-width: 80px; }
.part-facts dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.part-facts dd { font-size: 0.84rem; color: var(--ink); margin-top: 2px; }
.part-draw {
  border-left: 1px solid var(--line);
  background:
    linear-gradient(rgba(226, 238, 234, 0.04) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(226, 238, 234, 0.04) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--ground-2);
  padding: 12px 14px 8px;
  position: relative;
}
.part-draw svg { width: 100%; height: auto; max-height: 190px; }
.part-draw figcaption {
  color: var(--faint);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

/* bays */
.bays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bay {
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.bay.is-first { border-color: var(--lime); }
.bay.is-fail { border-color: rgba(228, 101, 75, 0.5); }
.bay-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--line);
}
.bay-rank {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--faint);
  margin-top: 3px;
}
.bay-title { min-width: 0; flex: 1; }
.bay-title h3 {
  font-size: 0.98rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bay-title p {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 2px;
}
.bay-score {
  font-family: var(--mono);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--lime);
}
.bay.is-fail .bay-score { color: var(--coral); }

.bay-scene {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 15%, #243034 0%, #161c20 70%);
  border-bottom: 1px solid var(--line);
}
.bay-scene svg { width: 100%; height: auto; }
.bay-tag {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(18, 23, 26, 0.82);
  padding: 3px 6px;
}
.bay-tag.fail { color: var(--coral); }
.bay-tag.done { color: var(--lime); }
.bay-clock {
  position: absolute;
  right: 10px;
  top: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink);
  background: rgba(18, 23, 26, 0.8);
  padding: 3px 6px;
  letter-spacing: 0.04em;
}
.bay-clock.run { color: var(--amber); }

.bay-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.bay-metrics div { padding: 8px 12px; }
.bay-metrics div + div { border-left: 1px solid var(--line); }
.bay-metrics dt {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.bay-metrics dd {
  margin: 2px 0 0;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--ink);
}
.bay-why {
  padding: 10px 12px 4px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}
.bay-caveat {
  padding: 0 12px 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #d9a08f;
}
.bay-foot {
  margin-top: auto;
  padding: 10px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.bay-price {
  font-family: var(--mono);
  font-size: 0.9rem;
}
.bay-price span {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}
.cta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--amber);
  border-bottom: 1px solid rgba(245, 168, 60, 0.45);
  padding-bottom: 2px;
  white-space: nowrap;
}
.cta:hover { border-color: var(--amber); }

.bay-color {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 12px 8px;
}
.swatch { width: 14px; height: 5px; background: var(--steel); }
.swatch.a { background: var(--amber); }
.swatch.b { background: var(--lime); }
.swatch.c { background: var(--coral); }
.bay-color span {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: 4px;
}

.finish-line {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--ground-2);
  padding: 12px 16px;
  display: flex;
  gap: 18px;
  align-items: baseline;
}
.finish-line .mono { color: var(--amber); white-space: nowrap; }
.finish-line p { font-size: 0.86rem; color: var(--muted); }
.finish-line p b { color: var(--ink); font-weight: 600; }

/* board */
.board {
  border-top: 1px solid var(--line-strong);
  padding: clamp(44px, 6vw, 76px) 0;
}
.board > .sec-head, .board > .table-wrap, .board > .table-note {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}
.sec-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.sec-note {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 820px;
}
th {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--faint);
  text-align: left;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:hover { background: rgba(226, 238, 234, 0.025); }
td.name { font-weight: 600; }
td.name span { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--faint); letter-spacing: 0.05em; font-weight: 400; }
td.num { font-family: var(--mono); white-space: nowrap; }
td.fit { font-family: var(--mono); font-size: 1rem; }
td.fit.good { color: var(--lime); }
td.fit.tight { color: var(--amber); }
td.fit.fail { color: var(--coral); }
tr.dim td { color: var(--faint); }
tr.dim td.fit { color: var(--coral); }
td .mini-link {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 168, 60, 0.4);
  white-space: nowrap;
}
.table-note { margin-top: 14px; font-size: 0.74rem; color: var(--faint); max-width: 76ch; }

/* method */
.method {
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(50px, 6vw, 80px);
}
.method details { border-bottom: 1px solid var(--line); }
.method summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  color: var(--muted);
}
.method summary::-webkit-details-marker { display: none; }
.method summary:hover { color: var(--amber); }
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 46px);
  padding: 8px 0 32px;
}
.method-grid h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.method-grid p { font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.weights { border-top: 1px solid var(--line); margin: 12px 0; }
.weights li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
}
.weights li span:last-child { font-family: var(--mono); color: var(--ink); }
.conflicts li, .sources li {
  font-size: 0.76rem;
  color: var(--muted);
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.conflicts b { color: var(--ink); }
.sources a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(245, 168, 60, 0.3); }
.sources a:hover { border-color: var(--amber); }

/* footer */
.foot { border-top: 1px solid var(--line-strong); }
.foot-disclosure {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.foot-disclosure p { max-width: 88ch; font-size: 0.74rem; line-height: 1.6; color: var(--faint); }
.foot-disclosure b { color: var(--muted); }
.foot-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter) 30px;
  display: flex;
  gap: 20px;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--muted);
}
.foot-mark { font-weight: 700; color: var(--ink); }
.foot-in p:last-child { margin-left: auto; }

/* responsive */
@media (max-width: 1080px) {
  .work { grid-template-columns: 1fr; }
  .ticket { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .ticket-head, .run, .hint { grid-column: 1 / -1; }
  .field { align-self: start; }
  .field-budget { grid-column: 1 / -1; }
  .bays { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .bays { grid-template-columns: 1fr; }
  .stage-top { grid-template-columns: 1fr; }
  .part-draw { border-left: 0; border-top: 1px solid var(--line); }
  .method-grid { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .sec-note { text-align: left; }
  .bar-state { display: none; }
}

@media (max-width: 640px) {
  .ticket { display: block; }
  .opts-jobs, .opts-materials, .opts-envs, .opts-priority { grid-template-columns: 1fr 1fr; }
  .bar-tool { display: none; }
  .finish-line { flex-direction: column; gap: 4px; }
  .intro h1 { max-width: 100%; }
  .foot-in p:last-child { margin-left: 0; }
  .mono, .eyebrow, .bar-state { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
/* Related decisions, last-checked line and touch targets (added 2026-11-06) */
.related-tools { padding-top: 1.6rem; }
.related-title { margin: 0 0 0.5rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
.related-tools ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.related-tools a { color: inherit; opacity: 0.9; }
.related-tools a:hover { opacity: 1; text-decoration: underline; }
.last-checked { margin: 0.55rem 0 0; font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.7; }

/* The quotable answer under the h1. */
.lede-answer { max-width: 62ch; margin: 0 0 0.9rem; font-size: 1.06em; line-height: 1.6; }
