/* What the site needs on top of styles.css, which is the local application's
 * stylesheet copied here so both front ends look like one product. Keep this
 * file for things only the public page has: the two board slots, the marketing
 * sections, the serial console. Anything that exists in both belongs in
 * styles.css, and tools/sync_styles.py keeps the copy honest. */

html { scroll-behavior: smooth; }
.hide { display: none !important; }

/* The page is one long document, not the application's switched views, so the
 * sections carry their own rhythm and the anchors clear the sticky rail. */
main section { padding-top: 34px; scroll-margin-top: 24px; }
main section:first-child { padding-top: 0; }
.sec-lede { max-width: 68ch; margin: -4px 0 18px; color: var(--mute); }
h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 42px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 680; text-wrap: balance; }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 660; }
.note { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }

/* Two board slots side by side: the device under test and the optional
 * reference it is compared against. */
.boards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 16px; }
.board { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.board-bar { display: flex; align-items: center; gap: 8px; padding: 11px 15px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.board-bar h3 { margin: 0; margin-right: auto; font-size: 13px; }
.board-body { padding: 15px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--mute); font: 12px var(--mono); }
.kv { display: flex; gap: 10px; margin: 9px 0 0; padding-left: 11px; border-left: 2px solid var(--border); }
.kv dt { flex: none; width: 74px; color: var(--faint); font: 10.5px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; padding-top: 2px; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--mute); font-size: 13px; }
.check input { width: 17px; min-height: 17px; flex: none; margin: 0; padding: 0; box-shadow: none; accent-color: var(--accent); }
.bar { height: 6px; margin-top: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width 140ms ease; }
#stage { margin: 12px 0 0; color: var(--mute); font: 12.5px var(--mono); }
#ssid, #password { width: 100%; }
#profile { min-width: 190px; }

/* Verdict and its reasoning. */
.verdict { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 99px; font: 12px var(--mono); letter-spacing: 0.07em; }
.verdict.small { padding: 2px 9px; font-size: 10.5px; }
.v-pass { background: var(--ok-soft); color: var(--ok); }
.v-warn { background: var(--warn-soft); color: var(--warn); }
.v-fail { background: var(--err-soft); color: var(--err); }
.v-inconclusive { background: var(--accent-soft); color: var(--accent); }
ul.findings { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
ul.findings li { padding: 9px 13px; border-left: 3px solid var(--border-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); font-size: 14px; }
li.why { border-left-color: var(--accent); background: var(--accent-soft); }
li.bad { border-left-color: var(--err); background: var(--err-soft); }
li.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.msg { padding: 12px 15px; border-radius: var(--r-md); font-size: 14.5px; margin-bottom: 16px; }
.msg.bad { background: var(--err-soft); border-left: 3px solid var(--err); }

/* Serial console. The application has one too, but it lives in a run monitor
 * there and is pinned to the bottom of the run section here. */
#console { margin-top: 20px; }
.log { max-height: 210px; overflow-y: auto; padding: 13px 15px; border-radius: var(--r-md); background: var(--console-bg); color: var(--console-fg); font: 11.5px/1.65 var(--mono); }
.log .c { color: var(--console-dim); }

/* Explanatory sections. */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { padding: 20px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.card .badge { margin: 0 0 10px; }
ol.steps { margin: 0 0 18px; padding-left: 20px; }
ol.steps li { margin-bottom: 7px; }
.yes { color: var(--ok); font-weight: 600; }
.no { color: var(--mute); }

@media (max-width: 900px) {
  .shell { padding: 24px 20px 60px; }
  .layout { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; max-height: none; padding: 0 0 18px; }
  .rail-inner { min-height: 0; gap: 18px; }
  .toc { flex-direction: row; flex-wrap: wrap; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .toc-item { margin-left: 0; border-radius: 99px; }
  .toc-item.is-active::before { display: none; }
  main section { padding-top: 26px; }
}

/* Board comparison. The bars are plain SVG, drawn in js/compare.js, because a
 * chart library would cost more than this page is willing to download. */
.cmp-wrap { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow-x: auto; }
.cmp { display: block; min-width: 560px; }
.cmp-name { fill: var(--ink); font: 600 12.5px var(--mono); }
.cmp-sub { fill: var(--faint); font: 10.5px var(--mono); letter-spacing: 0.04em; }
.cmp-value { fill: var(--mute); font: 11.5px var(--mono); text-anchor: end; }
.cmp-track { fill: var(--surface-2); }
.cmp-bar.cmp-a { fill: var(--accent); }
.cmp-bar.cmp-b { fill: var(--accent-line); }
#cmp-help { margin-top: 12px; }

/* Commands and inline code in the marketing copy read as code, not prose. The
 * block is the same console surface the serial log uses, and it scrolls sideways
 * rather than letting a long command widen the page. */
pre { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--console-bg); color: var(--console-fg); font: 12.5px/1.6 var(--mono); overflow-x: auto; }
pre .c { color: var(--console-dim); }
code { padding: 2px 6px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font: 0.92em var(--mono); overflow-wrap: anywhere; }
pre code { padding: 0; border: 0; background: none; }
