/* Squawk Talk site — one shared stylesheet.
   Layout: paper ground, white sheets with thin borders, a narrow reading column,
   wide column only for the puzzle and tables. Orange is reserved for the wordmark
   slash, the primary button, test points and focus rings. */

:root {
  --paper: #e9edf1;      /* page ground */
  --sheet: #fbfcfd;      /* panels, tables */
  --sheet-2: #f1f4f7;    /* insets, diagram ground */
  --ink: #16263a;        /* text, wires */
  --ink-2: #4c5c70;      /* secondary text (7:1 on paper) */
  --line: #c6cfd9;       /* thin borders */
  --line-2: #8696a8;     /* stronger rules, control borders */
  --accent: #bf400c;     /* orange, sparingly */
  --on-accent: #ffffff;
  --ok: #1c6b3b;
  --bad: #a8261b;
  --lcd: #c5d0b4;
  --lcd-ink: #1b2318;

  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --read: 38rem;         /* reading width */
  --wide: 66rem;         /* page width */
  --r: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1620; --sheet: #152230; --sheet-2: #1a2938; --ink: #e2e9f0; --ink-2: #a3b2c2;
    --line: #2b3c4e; --line-2: #5f7891; --accent: #ff7a3d; --on-accent: #1a0d05;
    --ok: #5fd08a; --bad: #ff8a7a; --lcd: #2a3a2c; --lcd-ink: #d6e4c6; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1620; --sheet: #152230; --sheet-2: #1a2938; --ink: #e2e9f0; --ink-2: #a3b2c2;
  --line: #2b3c4e; --line-2: #5f7891; --accent: #ff7a3d; --on-accent: #1a0d05;
  --ok: #5fd08a; --bad: #ff8a7a; --lcd: #2a3a2c; --lcd-ink: #d6e4c6; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--f-body);
}
img, svg { max-width: 100%; }
p, ul, ol, h1, h2, h3, figure, table, dl, dd { margin: 0; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; border: 1px solid var(--line-2); }
.skip:focus { left: 16px; z-index: 5; }

/* Page gutter */
.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 18px; }
.wordmark {
  font: 700 1.6rem/1 var(--f-display);
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-right: auto; font-size: .95rem; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--line-2); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Type */
h1 {
  font: 700 clamp(2.4rem, 5.2vw, 3.6rem)/1 var(--f-display);
  letter-spacing: .01em;
  text-wrap: balance;
}
h2 {
  font: 600 clamp(1.7rem, 3vw, 2.1rem)/1.1 var(--f-display);
  text-wrap: balance;
}
h3 { font: 600 1.25rem/1.25 var(--f-display); letter-spacing: .01em; }
.lede { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); }
.small { font-size: .875rem; line-height: 1.55; color: var(--ink-2); }
.mono { font-family: var(--f-mono); }
.prose { max-width: var(--read); display: grid; gap: 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; display: grid; gap: .4rem; }

/* Sections */
main > section { padding-block: 64px; border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }
.sec-head { max-width: var(--read); display: grid; gap: .6rem; margin-bottom: 28px; }
.sec-head p { color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  font: 600 1.05rem/1.2 var(--f-display); letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: transparent; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(.94); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.site-head .btn { min-height: 38px; padding: 6px 14px; font-size: .95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 48px; align-items: start; }
.hero-text { display: grid; gap: 1.1rem; padding-top: 8px; }
.hero-text .btn-row { margin-top: .4rem; }

/* Sheet (the one boxed object type) */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }

/* Puzzle */
.pz { display: grid; gap: 14px; }
.pz-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font: .8rem/1.4 var(--f-mono); color: var(--ink-2); }
.pz-squawk { font-weight: 600; font-size: 1.05rem; line-height: 1.45; }
.pz-diagram { background: var(--sheet-2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.pz-diagram svg { display: block; width: 100%; height: auto; }
.w { fill: none; stroke: var(--ink); stroke-width: 2; }
.cmp { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.5; }
.t { font: 13px var(--f-mono); fill: var(--ink); }
.tl { font: 13px var(--f-mono); fill: var(--accent); }
.tp { cursor: pointer; }
.tp .hit { fill: transparent; }
.tp .dia { fill: var(--sheet); stroke: var(--accent); stroke-width: 2; }
.tp.done .dia { fill: var(--accent); }
.tp.sel .dia { stroke-width: 3.5; }
.tp:focus { outline: none; }
.tp:focus-visible .dia { stroke-width: 4; }

.pz-tps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pz-tps .lbl { font-size: .875rem; color: var(--ink-2); margin-right: 4px; }
.chip {
  min-height: 40px; min-width: 52px; padding: 6px 10px;
  font: 14px var(--f-mono); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.done { background: var(--sheet-2); }

.pz-bench { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.lcd { background: var(--lcd); color: var(--lcd-ink); border-radius: var(--r); padding: 6px 12px 8px; min-width: 9.5rem; }
.lcd span { display: block; font: 600 .7rem/1.4 var(--f-display); letter-spacing: .12em; text-transform: uppercase; }
.lcd b { display: block; font: 400 2rem/1.1 var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
.pz-log { font: .875rem/1.5 var(--f-mono); color: var(--ink-2); display: grid; gap: 2px; }
.pz-log .ok { color: var(--ok); }
.pz-log .no { color: var(--bad); }

.pz-predict { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r); }
.pz-predict p { font-size: .95rem; }
.pz-predict .btn-row button { min-height: 40px; padding: 6px 12px; font: 500 .95rem var(--f-body); color: var(--ink); background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; }
.pz-predict .btn-row button:hover { border-color: var(--ink); }

.pz-call { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.pz-call label { font-size: .95rem; }
select {
  min-height: 44px; max-width: 100%; padding: 8px 10px;
  font: 400 .95rem var(--f-body); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r);
}
.pz-result { display: grid; gap: .8rem; border-top: 1px solid var(--line); padding-top: 14px; }
.pz-result .verdict { font-weight: 600; }
.pz-result .verdict.ok { color: var(--ok); }
.pz-result .verdict.no { color: var(--bad); }
.share { font: .85rem/1.5 var(--f-mono); white-space: pre-wrap; background: var(--sheet-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.pz-msg { font-size: .875rem; color: var(--ink-2); min-height: 1.4em; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); counter-reset: s; }
.steps li { counter-increment: s; padding: 14px 16px 0 0; display: grid; gap: .35rem; align-content: start; }
.steps li::before { content: counter(s); font: .85rem var(--f-mono); color: var(--ink-2); }
.steps h3 { font-size: 1.15rem; }
.steps p { font-size: .925rem; line-height: 1.5; color: var(--ink-2); }

/* Figure placeholder for owner screenshots */
.shot { display: grid; gap: 10px; }
.shot-frame {
  aspect-ratio: 16 / 9; max-width: 100%;
  display: grid; place-items: center; text-align: center; padding: 20px;
  background: var(--sheet-2); border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--ink-2); font-size: .95rem;
}
.shot figcaption { font-size: .875rem; color: var(--ink-2); }

/* Two-column text blocks */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; max-width: 54rem; }
.cols > div { display: grid; gap: .45rem; align-content: start; }
.cols p { color: var(--ink-2); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
thead th { font: 600 .8rem/1.3 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--sheet-2); }
td.code { font-family: var(--f-mono); font-size: .875rem; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acs-table td:first-child { min-width: 14rem; }
.fit { white-space: nowrap; font-size: .875rem; }
.price-table td:first-child { font-weight: 600; }
.price-table a { white-space: nowrap; }

/* Callout for offers: thin rule, no fill */
.offer { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; max-width: var(--read); display: grid; gap: .6rem; }

/* Waitlist / contact block */
.cta-block { max-width: var(--read); display: grid; gap: 1rem; }
.contact-line { font-family: var(--f-mono); font-size: .95rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 28px 40px; display: grid; gap: 14px; font-size: .875rem; color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot p { max-width: 46rem; }

.draft-flag { font: .8rem/1.4 var(--f-mono); color: var(--ink-2); border: 1px dashed var(--line-2); padding: 6px 10px; border-radius: var(--r); justify-self: start; }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-text { max-width: var(--read); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .steps li:nth-child(4) { border-top: 0; }
}
@media (max-width: 640px) {
  main > section { padding-block: 44px; }
  .sheet { padding: 14px; }
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; row-gap: 0; }
  .steps li { grid-template-columns: 2rem minmax(0, 1fr); column-gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
  .steps li::before { grid-row: span 2; padding-top: 3px; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pz-bench { grid-template-columns: minmax(0, 1fr); }
  .lcd { justify-self: start; }
  .site-head .wrap { gap: 10px 16px; }
  .nav { order: 3; width: 100%; gap: 2px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .steps.steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps.steps-4 { grid-template-columns: minmax(0, 1fr); } }
[hidden] { display: none !important; }
.table-wrap, th { position: relative; }
.shot { max-width: 54rem; }
@media (max-width: 640px) {
  /* diagram keeps readable labels and scrolls sideways; the TP buttons below work without it */
  .pz-diagram { overflow-x: auto; }
  .pz-diagram svg { min-width: 520px; }
  /* pricing rows stack on phones */
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .price-table tr:last-child { border-bottom: 0; }
  .price-table td { padding: 0; border: 0; }
  .price-table td:nth-child(3), .price-table td:nth-child(4) { grid-column: 1 / -1; }
  .price-table td.num { text-align: right; }
  .price-table td:nth-child(3) { color: var(--ink-2); font-size: .925rem; }
}
@media (max-width: 640px) {
  .site-head .btn { min-height: 36px; padding: 6px 10px; font-size: .85rem; }
  .acs-table thead { display: none; }
  .acs-table, .acs-table tbody, .acs-table tr, .acs-table td { display: block; width: 100%; }
  .acs-table td:first-child { min-width: 0; }
  .acs-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
  .acs-table tr:last-child { border-bottom: 0; }
  .acs-table td { padding: 0; border: 0; }
  .acs-table td.code { white-space: normal; color: var(--ink); }
  .acs-table td.fit { color: var(--ink-2); white-space: normal; }
}
/* Real app screenshots */
.job-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
.shot-stack { display: grid; gap: 32px; min-width: 0; }
.shot { display: grid; gap: 10px; min-width: 0; max-width: none; margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fbfcfd; }
.shot figcaption { font-size: .875rem; line-height: 1.5; color: var(--ink-2); max-width: 36rem; }
@media (max-width: 760px) {
  .job-shots { grid-template-columns: minmax(0, 1fr); }
  .shot-tall img { max-width: 420px; }
}
.pz-setup { font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.pz-log .note { color: var(--ink-2); font-family: var(--f-body); font-size: .85rem; }

/* Stage 2 pages */
.plain-list { padding-left: 1.2rem; display: grid; gap: .4rem; color: var(--ink-2); }
.calc { display: grid; gap: 6px; max-width: 24rem; }
.calc label { font-size: .9rem; margin-top: 6px; }
.calc input {
  min-height: 44px; padding: 8px 10px; font: 400 1rem var(--f-mono); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r); width: 100%;
}
.calc-out { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--line-2); color: var(--ink); font-size: .95rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.cols.cols-1 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.levels-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; max-width: 54rem; }
.levels-list > div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.levels-list dt { font: 600 1.15rem/1.25 var(--f-display); }
.levels-list dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
.faq { max-width: var(--read); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style-position: outside; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }
.sotw-head { margin-bottom: 28px; }
.sotw-current { max-width: 46rem; }
.archive { display: grid; max-width: 46rem; border-top: 1px solid var(--line); }
.arc { border-bottom: 1px solid var(--line); }
.arc summary { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 14px 0; cursor: pointer; list-style: none; }
.arc summary::-webkit-details-marker { display: none; }
.arc-t { display: grid; gap: 2px; }
.arc-t span { color: var(--ink-2); font-size: .925rem; }
.arc-no, .arc-d { color: var(--ink-2); font-size: .9rem; }
.arc[open] summary .arc-t b { text-decoration: underline; text-underline-offset: 3px; }
.arc-body { margin-bottom: 16px; }
.contact { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact dt { font: 600 .8rem/1.3 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.contact dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.legal h2 { font-size: 1.4rem; margin-top: 1rem; }
.legal ul { color: var(--ink); }
@media (max-width: 760px) {
  .split, .levels-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .arc summary { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .arc-d { grid-column: 2; }
}
@media (max-width: 640px) {
  th, td { padding: 10px; }
  thead th.num { white-space: normal; }
  td.num { white-space: normal; }
}
