/* Invoir design system. One stylesheet for invoir.dev (static, built by site-src/build.py) and
   validate.invoir.dev (the app: validator, login, dashboard, admin). The build copies this file to
   site/assets/site.css and app/src/main/resources/static/assets/site.css: edit it here only.

   Rules that keep pages from jumping when you move between them:
   - one header (64 px, same links on every page), one footer, one container width;
   - the scrollbar's space is always reserved (scrollbar-gutter), so short and long pages line up;
   - the font is self-hosted with font-display: optional, so text never re-flows when it arrives;
   - light theme only. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-muted: #eef1f4;
  --surface: #ffffff;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5e8ec;
  --line-strong: #d3d8df;
  --brand: #0d7a5f;
  --brand-hover: #0a6550;
  --brand-ink: #075240;
  --brand-soft: #e8f5f0;
  --brand-line: #b9e2d4;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn: #9a5b00;
  --warn-soft: #fff8e6;
  --info: #1d4ed8;
  --info-soft: #eef4ff;
  --code-bg: #0b1220;
  --code-ink: #e2e8f0;
  --code-muted: #8392a7;
  --code-green: #6ee7b7;
  --code-amber: #fcd34d;
  --code-blue: #93c5fd;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px -12px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 24px 48px -16px rgba(16, 24, 40, 0.18);
  --header-h: 64px;
  --container: 1160px;
  --prose: 720px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---- base -------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
body > main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; font-weight: 650; }
h1 { font-size: clamp(32px, 4.4vw, 44px); margin: 0 0 16px; letter-spacing: -0.03em; }
h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 56px 0 14px; }
h3 { font-size: 18px; margin: 28px 0 8px; letter-spacing: -0.01em; }
p, li { overflow-wrap: break-word; }
p { margin: 0 0 16px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 20px; max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code, pre, kbd, .mono { font-family: var(--mono); }
code { font-size: 0.88em; }
:not(pre) > code { background: var(--bg-muted); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
pre {
  margin: 20px 0; padding: 18px 20px; overflow-x: auto; border-radius: var(--radius-lg);
  background: var(--code-bg); color: var(--code-ink); font-size: 13.5px; line-height: 1.65; tab-size: 2;
}
pre code { font-size: inherit; }
pre .m, pre .c { color: var(--code-muted); }
pre .ok, pre .s { color: var(--code-green); }
pre .k { color: var(--code-blue); }
pre .n { color: var(--code-amber); }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.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; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--prose); }

/* ---- header (identical on every page of both domains) ---------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; flex: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1 1 auto; min-width: 0; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { background: var(--bg-subtle); color: var(--ink); }
.nav-links a[aria-current] { color: var(--ink); background: var(--bg-muted); }
.nav-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.menu { display: none; position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 20px; height: 20px; }
.menu-panel {
  position: absolute; right: 0; top: 48px; width: min(320px, calc(100vw - 32px)); padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: grid; gap: 2px;
}
.menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-panel a:hover { background: var(--bg-subtle); }
.menu-panel .btn { margin-top: 6px; justify-content: center; }
.menu-panel a.btn-primary, .menu-panel a.btn-primary:hover { color: #fff; background: var(--brand); }
@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .site-header .bar { gap: 12px; justify-content: space-between; }
  .nav-actions { margin-left: auto; }
  .menu { display: block; }
}
@media (max-width: 340px) { .nav-actions > .btn-primary { display: none; } }
@media (max-width: 600px) { .nav-actions > .btn-primary { height: 36px; padding: 0 12px; font-size: 14px; } .container { padding: 0 16px; } .hero h1 { font-size: 38px; } .cta-band { padding: 24px; } }

/* ---- buttons ------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-subtle); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; color: #fff; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- footer ------------------------------------------------------------------------------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-subtle); color: var(--muted); font-size: 14.5px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 48px 24px 32px; }
.site-footer h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .about p { margin: 12px 0 0; max-width: 34ch; }
.site-footer .base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 24px 28px; border-top: 1px solid var(--line); }
.lang-switch { display: inline-flex; gap: 4px; }
.lang-switch a { padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.lang-switch a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ---- page layouts ------------------------------------------------------------------------- */
.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head .eyebrow { margin-bottom: 14px; }
.article { padding-bottom: 24px; }
.article .prose > h2:first-child { margin-top: 24px; }
.crumbs { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.updated { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.with-toc { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 56px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 14px; border-left: 1px solid var(--line); padding-left: 16px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
@media (max-width: 1000px) { .with-toc { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

/* ---- content components ------------------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-title { margin: 0 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.note, .callout { margin: 24px 0; padding: 16px 18px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink); }
.note p, .callout p { margin: 0; }
.note p + p, .callout p + p { margin-top: 8px; }
.callout.warn { background: var(--warn-soft); border-color: #f5d9a8; }
.callout.danger { background: var(--danger-soft); border-color: #fecdca; }
.callout.info { background: var(--info-soft); border-color: #c7d7fe; }
.cta-band { margin: 64px 0 0; padding: 36px; border-radius: 20px; background: var(--ink); color: #cbd5e1; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2, .cta-band strong { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; max-width: 60ch; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: #475569; }
.cta-band .btn-secondary:hover { background: #1e293b; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 20px; white-space: nowrap; background: var(--bg-muted); color: var(--ink-2); }
.badge.pass, .badge.green { background: var(--brand-soft); color: var(--brand-ink); }
.badge.fail, .badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.warn, .badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.info, .badge.blue { background: var(--info-soft); color: var(--info); }
ul.checks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
ul.checks li { position: relative; padding-left: 28px; }
ul.checks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
ol.steps li { counter-increment: step; position: relative; padding: 20px 22px 20px 64px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
ol.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
ol.timeline { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
ol.timeline li { padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
ol.timeline li strong { display: block; color: var(--ink); }
dl.faq { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
dl.faq dt { font-weight: 600; padding-top: 20px; color: var(--ink); }
dl.faq dd { margin: 6px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
dl.fields dt, dl.rules dt { margin-top: 18px; font-weight: 600; }
dl.fields dd, dl.rules dd { margin: 4px 0 0; color: var(--ink-2); }
ul.sources { padding-left: 20px; font-size: 14.5px; color: var(--ink-2); }
ul.sources li { margin-top: 6px; }
ul.guides { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
ul.guides li { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
ul.guides li:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
ul.guides li a { font-weight: 650; color: var(--ink); text-decoration: none; }
ul.guides li a::after { content: " →"; color: var(--brand); }
ul.guides li span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 4px; }
@media (max-width: 640px) { ul.guides { grid-template-columns: minmax(0, 1fr); } }
.more { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }
.more ul { padding-left: 20px; columns: 2 240px; column-gap: 32px; font-size: 15px; }
.more li { break-inside: avoid; margin-bottom: 6px; }

/* ---- tables -------------------------------------------------------------------------------- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.scroll table { margin: 0; border: 0; }
.scroll table.wide { min-width: 640px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-subtle); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.scroll td code { white-space: normal; overflow-wrap: anywhere; }
table.list th { background: transparent; }
table.list td { vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- forms --------------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field label, label.label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field .hint { font-size: 13.5px; color: var(--muted); }
input[type=email], input[type=text], input[type=search], input[type=url], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 15.5px; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input.code-input { font-family: var(--mono); font-size: 26px; letter-spacing: 0.5em; text-align: center; height: 60px; padding-left: 0.5em; }
.error-text { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.error-text:empty { display: none; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); margin: 8px 0 16px; }
label.check input { margin-top: 4px; accent-color: var(--brand); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- landing page ------------------------------------------------------------------------- */
.hero { padding-top: 72px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.04em; margin: 18px 0 18px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: 19.5px; }
.hero .trust { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.hero .trust span::before { content: "✓ "; color: var(--brand); font-weight: 700; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; gap: 36px; } }
.window { border-radius: 16px; background: var(--code-bg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #1e293b; }
.window .chrome { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #1e293b; color: var(--code-muted); font-size: 12.5px; font-family: var(--mono); }
.window .chrome i { width: 11px; height: 11px; border-radius: 50%; background: #334155; display: inline-block; }
.window .chrome span { margin-left: 8px; }
.window pre { margin: 0; border-radius: 0; background: transparent; font-size: 13px; }
.window .result { border-top: 1px solid #1e293b; padding: 14px 18px; display: grid; gap: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--code-ink); }
.window .result b { color: var(--code-green); font-weight: 500; }
.formats { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center; padding: 20px 0 8px; }
.formats span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--surface); }
.section { padding-top: 72px; }
.section-head { max-width: 640px; margin: 0 0 32px; }
.section-head h2 { margin: 10px 0 10px; font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); font-size: 17.5px; margin: 0; }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---- pricing ------------------------------------------------------------------------------ */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan .tag { position: absolute; top: -11px; left: 22px; padding: 2px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.plan h3 { margin: 0; font-size: 16px; color: var(--ink-2); }
.plan .price { margin: 12px 0 0; font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .docs { margin: 14px 0 0; font-weight: 600; }
.plan .extra { margin: 2px 0 18px; color: var(--muted); font-size: 14px; }
.plan .gap { flex: 1 1 auto; }
.plan .btn, .plan form { margin-top: 8px; }
.plan form .btn { width: 100%; }
.plan .fine { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* ---- auth pages (login, signup, code) ------------------------------------------------------- */
.auth { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: start center; padding: 64px 16px 0; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 26px; margin: 0 0 8px; }
.auth-card .lede { font-size: 15.5px; margin-bottom: 24px; }
.auth-card .switch { margin: 20px 0 0; text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-card .legal { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.auth-aside { max-width: 440px; margin: 20px auto 0; display: grid; gap: 8px; color: var(--muted); font-size: 14px; }

/* ---- app shell (dashboard, admin) ------------------------------------------------------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); background: var(--bg-subtle); }
.sidebar { border-right: 1px solid var(--line); background: var(--surface); padding: 20px 12px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.sidebar .section-label { margin: 16px 12px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.sidebar a svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.sidebar a:hover { background: var(--bg-subtle); color: var(--ink); }
.sidebar a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); }
.sidebar a[aria-current] svg { color: var(--brand); }
.sidebar .plan-box { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-subtle); font-size: 13.5px; }
.sidebar .plan-box strong { display: block; font-size: 14px; color: var(--ink); }
.sidebar .plan-box .meter { margin: 10px 0 6px; }
.sidebar .plan-box a.btn { color: #fff; justify-content: center; padding: 0 12px; }
.sidebar .plan-box a.btn:hover { background: var(--brand-hover); color: #fff; }
.app-main { padding: 32px 40px 64px; min-width: 0; }
.app-main .page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.app-main .page-title h1 { font-size: 28px; margin: 0; }
.app-main .page-title p { margin: 4px 0 0; color: var(--muted); }
.app-main h2 { font-size: 18px; margin: 32px 0 12px; }
.app-main .card + .card { margin-top: 16px; }
.app-tabs { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .app-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: var(--header-h); z-index: 10; }
  .app-tabs a { padding: 7px 12px; border-radius: 8px; white-space: nowrap; color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
  .app-tabs a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); }
  .app-main { padding: 24px 16px 48px; }
}
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat .label { margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat .value { margin: 6px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--bg-muted); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.meter.warn > i { background: #d97706; }
.meter.full > i { background: var(--danger); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--brand); }
.chart .bar.alt { fill: #93c5b4; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; margin-top: 1px; }
.checklist li.done .tick { background: var(--brand); border-color: var(--brand); }
.checklist li.done .tick::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.checklist li.done .what { color: var(--muted); text-decoration: line-through; }
.checklist .what { font-weight: 500; }
.keybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.keybox code { flex: 1 1 auto; padding: 12px 14px; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.banner { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); border: 1px solid #c7d7fe; font-size: 14.5px; color: var(--ink); }
.banner.warn { background: var(--warn-soft); border-color: #f5d9a8; }
.banner.success { background: var(--brand-soft); border-color: var(--brand-line); }
.banner a { color: inherit; font-weight: 600; }
.banner form.inline { display: inline-block; margin-left: 6px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.tabs-code { border-radius: var(--radius-lg); overflow: hidden; background: var(--code-bg); }
.tabs-code .tab-row { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid #1e293b; }
.tabs-code .tab-row button { background: none; border: 0; color: var(--code-muted); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 8px 8px 0 0; cursor: pointer; }
.tabs-code .tab-row button[aria-selected=true] { color: #fff; background: #1e293b; }
.tabs-code pre { margin: 0; border-radius: 0; }
.tabs-code pre[hidden] { display: none; }

/* ---- class names used inside page bodies (guides, docs, pricing) --------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 10px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-sm); }
.button:hover { background: var(--brand-hover); color: #fff; }
.button.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.button.secondary:hover { background: var(--bg-subtle); color: var(--ink); }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.cta { margin: 40px 0; padding: 24px 26px; border-radius: 16px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.cta p { margin: 0; }
.cta .buttons { margin-top: 16px; }
ul.included { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
ul.included li { position: relative; padding-left: 28px; color: var(--ink-2); }
ul.included li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
ul.included li strong { color: var(--ink); }
@media (max-width: 640px) { ul.included { grid-template-columns: minmax(0, 1fr); } }
.prose-wide { max-width: 960px; }

/* ---- app top bar (dashboard, admin): the site header's look, app links ------------------- */
.in-app .site-header .app-bar { padding: 0 24px; }
.in-app .nav-links { flex: 1 1 auto; }
.in-app .who { color: var(--muted); font-size: 14px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-app .nav-actions form { margin: 0; }
.app-col { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 900px) { .in-app .nav-links { display: none; } .in-app .who { display: none; } .in-app .site-header .app-bar { padding: 0 16px; justify-content: space-between; } }
button.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
button.linkish:hover { color: var(--brand-hover); }
form.switch { margin: 20px 0 0; text-align: center; font-size: 14.5px; color: var(--muted); }
.plans.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
@media (max-width: 1100px) { .plans.three { grid-template-columns: minmax(0, 1fr); } }
