/* ATE·IQ product guide — shared stylesheet.
   Mirrors the application's clinical light design system (app/globals.css):
   pure white surfaces, slate ink, blueprint-blue signal, hairline rules.
   The register is a technical datasheet, not a landing page: numbered
   sections, figure captions, mono annotations, no gradients, no shadows
   heavier than 1px lines. Works offline (system-font fallbacks). */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Instrument+Serif&display=swap');

:root {
  --panel: #FFFFFF;
  --panel-2: #F6F8FB;
  --panel-3: #EEF2F7;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --ink-4: #94A3B8;
  --signal: #2563EB;
  --signal-2: #1D4ED8;
  --signal-soft: #EFF4FE;
  --probe: #B45309;
  --probe-soft: #FEF3C7;
  --fault: #B91C1C;
  --fault-soft: #FEE2E2;
  --pass: #047857;
  --pass-soft: #D1FAE5;
  --info: #0369A1;
  --violet: #6D28D9;
  --code-bg: #0F172A;
  --code-ink: #E2E8F0;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── chrome ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 28px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar .wordmark { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.topbar .wordmark .dot-sep { color: var(--signal); }
.topbar .crumb { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .14em; }
.topbar .spacer { flex: 1; }
.topbar a.back { font-family: var(--mono); font-size: 12px; color: var(--signal); text-decoration: none; }
.topbar a.back:hover { text-decoration: underline; }
/* persistent top-nav tab (Contact) — present on every page, marked
   aria-current="page" on the page it points at */
.topbar a.tab {
  font-family: var(--mono); font-size: 12px; color: var(--signal); text-decoration: none;
  padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 5px;
  align-self: center; white-space: nowrap; transition: border-color .12s ease, background-color .12s ease;
}
.topbar a.tab:hover { border-color: var(--signal); background: var(--signal-soft); }
.topbar a.tab[aria-current="page"] { color: var(--ink-3); background: var(--panel-2); border-color: var(--line); }
/* narrow viewports: drop the breadcrumb text so the wordmark, the back link
   and the Contact tab still fit on one row without pushing the page wide */
@media (max-width: 620px) {
  .topbar { gap: 10px; padding: 12px 16px; }
  .topbar .crumb { display: none; }
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 28px; }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 40px; }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .18em; color: var(--signal);
  margin: 0 0 14px;
}
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: 46px; line-height: 1.12; letter-spacing: -0.01em;
  margin: 0 0 18px; max-width: 21ch;
}
.standfirst { font-size: 17px; color: var(--ink-2); max-width: 62ch; margin: 0; }
.standfirst strong { color: var(--ink); font-weight: 600; }

/* ── sections ────────────────────────────────────────────────────────── */
section { padding: 34px 0 10px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 14px; }
.sec-num { font-family: var(--mono); font-size: 12px; color: var(--ink-4); letter-spacing: .08em; }
h2 { font-family: var(--display); font-weight: 400; font-size: 27px; margin: 0; letter-spacing: -0.005em; }
h3 { font-size: 15px; font-weight: 600; margin: 26px 0 8px; }
p { margin: 0 0 14px; color: var(--ink-2); max-width: 74ch; }
p.lede { font-size: 16px; color: var(--ink-2); }
a { color: var(--signal); }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--ink-2); }

/* ── figures ─────────────────────────────────────────────────────────── */
figure { margin: 22px 0 26px; }
figure.shot { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
figure.shot img { width: 100%; display: block; border: 1px solid var(--line); border-radius: 4px; }
figure.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px 18px 14px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figcaption { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); padding: 9px 4px 0; line-height: 1.5; }
figcaption .fig-n { color: var(--signal); font-weight: 600; }

/* ── step lists (how it works) ───────────────────────────────────────── */
ol.steps { list-style: none; counter-reset: step; margin: 18px 0; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 52px; }
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--signal); background: var(--signal-soft);
  border: 1px solid #D6E4FD; border-radius: 5px;
  width: 34px; height: 24px; display: grid; place-items: center;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 30px; bottom: 2px;
  width: 1px; background: var(--line);
}
ol.steps b, ol.steps strong { color: var(--ink); font-weight: 600; }
ol.steps p { margin: 2px 0 0; }

/* ── tables ──────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 13.5px; }
/* narrow viewports: let prose-heavy tables scroll rather than force the page wide */
@media (max-width: 700px) { table { display: block; overflow-x: auto; } }
th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
td:first-child { color: var(--ink); }
td .mono, th .mono { font-family: var(--mono); }
tr:hover td { background: var(--panel-2); }

/* ── cards / grids ───────────────────────────────────────────────────── */
.grid { display: grid; gap: 14px; margin: 20px 0; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } .side-by-side { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; transition: border-color .12s ease; }
a.card:hover { border-color: var(--signal); }
.card .card-kicker { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-4); margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.card p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.card .card-go { font-family: var(--mono); font-size: 11.5px; color: var(--signal); margin-top: 10px; display: inline-block; }
.callout { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: 6px; padding: 14px 18px; margin: 18px 0; font-size: 14px; color: var(--ink-2); max-width: none; }
.callout.honest { border-left-color: var(--probe); }
.callout .callout-title { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); display: block; margin-bottom: 5px; }

/* ── stats strip ─────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px; background: var(--panel); }
.stat .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .13em; color: var(--ink-3); margin-bottom: 3px; }
.stat .v { font-family: var(--mono); font-size: 21px; font-weight: 600; color: var(--ink); }
.stat .v .unit { font-size: 12px; color: var(--ink-4); font-weight: 400; }

/* ── LED dots ────────────────────────────────────────────────────────── */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.dot-pass { background: var(--pass); }
.dot-warn { background: var(--probe); }
.dot-fault { background: var(--fault); }
.dot-signal { background: var(--signal); }

/* ── page-to-page nav ────────────────────────────────────────────────── */
.pagenav { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); margin-top: 44px; padding: 22px 0 8px; }
.pagenav a { font-family: var(--mono); font-size: 12.5px; text-decoration: none; color: var(--signal); }
.pagenav a:hover { text-decoration: underline; }
.pagenav .pn-label { display: block; font-size: 10.5px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 3px; }

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 28px 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 11px; color: var(--ink-4); padding: 0; }

/* ── inline schematic-grid backdrop for hero diagrams ────────────────── */
.schem-grid {
  background-image: linear-gradient(var(--panel-3) 1px, transparent 1px), linear-gradient(90deg, var(--panel-3) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--line); border-radius: 8px;
}

/* ── side-by-side ────────────────────────────────────────────────────── */
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

@media print {
  .topbar, .pagenav { display: none; }
  body { font-size: 12px; }
  figure.shot { break-inside: avoid; }
}
