/* PrintHook public site. Tokens are the console's brand tokens (console/src/index.css): teal
   #0F766E, ink #0B1F1D, paper #F5F7F6, amber #FBBF24 (the LED; always carries ink text). Space
   Grotesk is the display face; body text stays on the system stack. Light only. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/spacegrotesk/SpaceGrotesk-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 111.3%;
  ascent-override: 88.4%;
  descent-override: 26.2%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --ink: #0b1f1d;
  --paper: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #e9efed;
  --surface-3: #f8faf9;
  --border: #d3ddda;
  --border-strong: #708f8b;
  --fg: #0b1f1d;
  --muted: #4e6461;
  --accent: #0f766e;
  --accent-strong: #0b5c56;
  --accent-soft: #d8eeea;
  --accent-line: #c3e3dd;
  --accent-on-ink: #30bdaf;
  --amber: #fbbf24;
  --amber-soft: #feecbd;
  --danger: #b42318;
  --danger-soft: #f4e0df;
  --warning: #876202;
  --info: #1f6f8b;
  --ink-surface: #12302b;
  --ink-border: #24504a;
  --ink-fg: #eaf3f1;
  --ink-muted: #9db7b2;

  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgb(11 31 29 / 0.06), 0 1px 3px rgb(11 31 29 / 0.05);
  --shadow-2: 0 4px 12px rgb(11 31 29 / 0.1), 0 12px 32px rgb(11 31 29 / 0.12);

  --measure: 62ch;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font: 16px/1.6 var(--font-sans);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: pretty;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem); letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; max-width: var(--measure); }
li { margin: 0.25em 0; }
li p { margin: 0; }
a { color: var(--accent); text-decoration: underline; text-decoration-color: rgb(15 118 110 / 0.4); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
pre { margin: 0; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 13px; line-height: 1.55; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
img, svg { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7em 0.9em; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--surface-3); white-space: nowrap; }
td code { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* Header ----------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; }
.brand img { width: 28px; height: 28px; }
/* Keep every destination visible, including on narrow screens. */
.site-header .wrap { flex-wrap: wrap; gap: 4px 20px; padding-top: 10px; padding-bottom: 10px; }
.site-header .brand { flex-shrink: 0; min-height: 44px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--fg); padding: 8px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.875rem; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current='page'] { color: var(--accent-strong); }
.site-nav .cta { margin-left: 4px; }
@media (max-width: 1100px) {
  .site-nav { width: 100%; margin-left: 0; }
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease;
}
/* Outrank navigation link defaults in both normal and hover states. */
.btn.btn-primary { background: var(--accent); color: #fff; }
.btn.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-inverse { background: #fff; color: var(--ink); }
.btn-inverse:hover { background: var(--surface-2); }
.btn-inverse-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.4); }
.btn-inverse-ghost:hover { background: rgb(255 255 255 / 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-note { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-ink { background: var(--ink); color: var(--ink-fg); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p { color: var(--ink-fg); }
.section-ink .muted { color: var(--ink-muted); }
.section-ink a { color: var(--accent-on-ink); text-decoration-color: rgb(48 189 175 / 0.5); }
.section-ink code { background: rgb(255 255 255 / 0.08); color: var(--ink-fg); }
.section-teal { background: var(--accent); color: #fff; }
.section-teal h2 { color: #fff; }
.section-teal p { color: rgb(255 255 255 / 0.92); }
.eyebrow { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 12px; }
.section-ink .eyebrow, .section-teal .eyebrow { color: var(--accent-on-ink); }
.section-teal .eyebrow { color: rgb(255 255 255 / 0.85); }
.lede { font-size: 1.15rem; color: var(--muted); }
.section-ink .lede { color: var(--ink-muted); }
.muted { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split > *, .doc > *, .steps > li, .plans > li, .rail > li { min-width: 0; }
@media (max-width: 860px) { .split, .split-even { grid-template-columns: minmax(0, 1fr); } }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero .lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); max-width: 54ch; }
.hero h1 { max-width: 16ch; }

/* Code panels ------------------------------------------------------------ */
.code {
  background: var(--ink); color: var(--ink-fg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2); overflow: hidden; font-size: 13px;
}
.code-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--ink-border); font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.code-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-on-ink); flex: none; }
.code-head .dot-amber { background: var(--amber); }
.code-body { padding: 16px 18px; }
.code-body + .code-body { border-top: 1px solid var(--ink-border); }
.code pre code { color: var(--ink-fg); }
.code .k { color: var(--accent-on-ink); }
.code .s { color: #ffd98a; }
.code .c { color: var(--ink-muted); }
.code .n { color: #9fd7ff; }
.section-ink .code { box-shadow: none; border: 1px solid var(--ink-border); }
.code-light { background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-1); }
.code-light pre code { color: var(--fg); }

/* Numbered steps --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: none; }
.steps > li { margin: 0; counter-increment: step; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; color: var(--accent-on-ink); }
.steps h3 { margin-bottom: 0; }
.steps p { margin: 0; color: var(--ink-muted); }
.steps .code { margin-top: auto; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Status rail ------------------------------------------------------------ */
.rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; max-width: none; }
.rail > li { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 14px 12px; min-width: 0; }
.rail code { display: block; font-weight: 600; font-size: 0.95rem; background: none; padding: 0; color: var(--accent-strong); }
.rail .terminal code { color: var(--fg); }
.rail small { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-top: 4px; }
.rail .flag { display: inline-block; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.rail .terminal .flag { background: var(--surface-2); color: var(--fg); }
@media (max-width: 860px) { .rail { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .rail { grid-template-columns: repeat(2, 1fr); } }

/* Definition lists (facts) ---------------------------------------------- */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 40px; margin: 0; }
.facts > div { padding: 14px 0; border-top: 1px solid var(--border); }
.facts dt { font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--muted); font-size: 0.95rem; }
.section-ink .facts > div { border-color: var(--ink-border); }
.section-ink .facts dt { color: #fff; }
.section-ink .facts dd { color: var(--ink-muted); }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } }

/* Plain feature list (checks) ------------------------------------------- */
.checks { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; max-width: none; }
.checks li { break-inside: avoid; padding-left: 1.4em; position: relative; margin: 0.35em 0; }
.checks li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 0.7em; height: 0.35em; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 700px) { .checks { columns: 1; } }

/* Pricing ---------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 32px 0 0; max-width: none; }
.plans > li { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plans > li.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plans h3 { margin: 0; font-size: 1.05rem; }
.plans .price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 6px 0 2px; }
.plans .price small { font-size: 0.9rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plans .allow { margin: 0; padding: 0; list-style: none; color: var(--fg); font-size: 0.93rem; }
.plans .allow li { margin: 0.2em 0; }
.plans .allow strong { font-weight: 600; }
.plans .note { color: var(--muted); font-size: 0.85rem; margin: 0; }
.plans .btn { margin-top: auto; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plans-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .plans-compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .plans-compact { grid-template-columns: 1fr; } }
/* Inside a split (half the width), four compact cards side by side leave ~130px each and the price
   clips; two by two keeps every price on one line. Prices never wrap or overflow their card. */
.split > .plans-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .split > .plans-compact { grid-template-columns: 1fr; } }
.plans .price { white-space: nowrap; }
.plans .price .from { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 2px; }
.callout { background: var(--amber-soft); color: var(--ink); border-radius: var(--radius-md); padding: 14px 18px; font-size: 0.95rem; max-width: none; }
.callout p { margin: 0; max-width: none; }

/* FAQ -------------------------------------------------------------------- */
.faq { max-width: 72ch; }
.faq details { border-top: 1px solid var(--border); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 500; flex: none; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > *:not(summary) { padding-bottom: 14px; }

/* Platform table --------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.table-wrap table { min-width: 560px; }
.table-wrap tr:last-child td { border-bottom: 0; }

/* Prose pages ------------------------------------------------------------ */
.prose h2 { margin-top: 2.2em; padding-top: 0.6em; }
.prose h3 { margin-top: 1.6em; }
.prose .code { margin: 1.2em 0; }
.prose :not(pre) > code { overflow-wrap: anywhere; }
.prose .table-wrap { margin: 1.2em 0; }
.prose > .code:first-child { margin-top: 0; }
.toc { position: sticky; top: 24px; font-size: 0.92rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 10px 0; min-height: 44px; display: flex; align-items: center; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
.toc .toc-title { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.doc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; }
@media (max-width: 860px) { .doc { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--ink-muted); padding: 48px 0 40px; font-size: 0.92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: #fff; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--ink-fg); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.site-footer .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--ink-border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer .legal p { margin: 0; max-width: none; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .site-footer .cols { grid-template-columns: 1fr; } }
