/* Keythentic site — hand-written CSS, no build step, nothing loaded from anyone else.

   Design system: the Android app's default theme, Midnight.
     page    near-black #0B0D10 with #15181D panels and hairline borders; no gradients
     accent  lime #C6F432 for fills (buttons, icon glyphs, the countdown), with ink text on it
     status  green = stays on device / safe, amber = leaves the phone / caution, red = danger
   Type: Space Grotesk, with JetBrains Mono for codes (both OFL, self-hosted), as in the app.
   Dark by default, like Midnight; the header toggle switches to a light version. The legacy token
   names (blue, grad, pine, mint, brass, paper, sand) are kept so every rule keeps working; their
   values are Midnight's. --blue is the accent FILL and --blue-ink the accent TEXT tier. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-var-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #0b0d10;
  --card: #15181d;
  --card-2: #1b1f25;
  --sand: #1c2026;
  --rule: #23272e;
  --rule-strong: #333944;
  --ink: #f2f4f7;
  --ink-2: #c3c9d3;
  --muted: #8d95a3;
  --faint: #8d95a3;

  --blue: #c6f432;
  --blue-ink: #c6f432;
  --blue-soft: rgba(198, 244, 50, .12);
  --indigo: #c6f432;
  --violet: #c6f432;
  /* No gradients in Midnight: the old gradient tokens are solid colours now. */
  --grad: #c6f432;
  --grad-text: #c6f432;
  --navy: #f2f4f7;
  --on-dark-dim: #8d95a3;

  /* Panels that used to be gradient heroes (the code demo, the tools band). */
  --hero: #15181d;
  --on-hero: #f2f4f7;
  --on-hero-dim: #8d95a3;
  --hero-line: #23272e;
  --hero-tile: #1c2026;
  /* Icon tiles: lime glyph on a dark tile. */
  --tile-bg: #1c2026;
  --tile-fg: #c6f432;

  --pine: var(--hero);
  --pine-2: var(--blue-ink);
  --pine-deep: var(--hero);
  --on-pine: var(--on-hero);
  --mint: #34c785;
  --mint-ink: #5fd9a0;
  --mint-soft: rgba(52, 199, 133, .13);
  --brass: #e8b45c;
  --brass-ink: #e8b45c;
  --brass-soft: rgba(224, 162, 60, .14);
  --danger: #f2645e;
  --danger-soft: rgba(242, 100, 94, .14);

  --link: var(--blue-ink);
  --btn: #c6f432;
  --btn-hover: #d9ff6b;
  --on-btn: #0b0d10;
  --focus: #c6f432;

  --r-lg: 22px;
  --r: 18px;
  --r-sm: 14px;
  --lift: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 36px -22px rgba(0, 0, 0, .8);
  --glow: none;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Names the tool and content pages use. */
  --bg: var(--paper);
  --surface: var(--card);
  --surface-2: var(--card-2);
  --subtle: var(--sand);
  --line: var(--rule);
  --line-soft: var(--rule);
  --line-strong: var(--rule-strong);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --brand: var(--blue-ink);
  --brand-soft: var(--blue-soft);
  --in: var(--mint-ink);
  --in-soft: var(--mint-soft);
  --out: var(--danger);
  --out-soft: var(--danger-soft);
  --warn: var(--brass-ink);
  --warn-soft: var(--brass-soft);
  --text: var(--ink);
  --text-dim: var(--muted);
  --text-faint: var(--faint);
  --border: var(--rule);
  --border-strong: var(--rule-strong);
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --accent-text: var(--link);
  --success: var(--mint-ink);
  --success-soft: var(--mint-soft);
  --danger-text: var(--danger);
  color-scheme: dark;
}

/* The light version, only when chosen with the header toggle. Lime can't carry text on white, so
   accent TEXT drops to a dark olive; lime stays for fills with ink on them. */
:root[data-theme="light"] {
  --paper: #f5f6f8; --card: #ffffff; --card-2: #fafbfc; --sand: #eef0f3;
  --rule: #e2e5ea; --rule-strong: #c9ced6;
  --ink: #0b0d10; --ink-2: #3a4150; --muted: #5a6272; --faint: #636b7b;
  --blue-ink: #3f5a00; --blue-soft: #eef9cf; --grad-text: #3f5a00; --navy: #0b0d10; --on-dark-dim: #9aa2b1;
  --hero: #0b0d10; --on-hero: #f2f4f7; --on-hero-dim: #9aa2b1; --hero-line: #23272e; --hero-tile: #1c2026;
  --tile-bg: #0b0d10; --tile-fg: #c6f432;
  --mint-ink: #087a4c; --mint-soft: #e3f7ee;
  --brass: #e0a23c; --brass-ink: #8a5a12; --brass-soft: #fcf1de;
  --danger: #c2362f; --danger-soft: #fdeceb;
  --btn-hover: #b5e61e; --focus: #3f5a00;
  --lift: 0 1px 2px rgba(11, 13, 16, .04), 0 16px 36px -24px rgba(11, 13, 16, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.62;
  background: var(--paper); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue-soft); color: var(--ink); }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }

/* Highlighted word: brand-gradient text, as on the app's hero cards. */
.mark { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .04em; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.025em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; list-style: none; padding: 0; }
.nav-links a { color: var(--ink-2); font-size: .95rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { color: var(--ink); background: var(--sand); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--sand); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  background: transparent; border: 1px solid var(--rule-strong); color: var(--ink);
  border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s;
}
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 12px; }
  .nav-actions .btn { display: none; }
  .nav-actions { margin-left: auto; }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: .78em 1.35em; border-radius: 14px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover { transform: translateY(-1px); background: var(--btn-hover); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-ink); }
.btn-brass { background: var(--on-hero); color: var(--hero); }
.btn-brass:hover { background: #e8edff; }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }

/* ── Labels ─────────────────────────────────────────────────────────────── */
.kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-ink);
}
.kicker::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--grad); }
.pill-note {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--rule); font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 22px;
}
.pill-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.lede { font-size: clamp(1.1rem, 1rem + .35vw, 1.28rem); line-height: 1.55; color: var(--muted); max-width: 34em; }
.fine { font-size: .92rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: .93rem; color: var(--ink-2); font-weight: 600; }
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.proof svg { width: 18px; height: 18px; color: var(--blue); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .hero .cta-row .btn { width: 100%; white-space: normal; text-align: center; } }

/* Live vault demo: the app's Codes screen in Midnight — a dark panel, hairline rows, lime countdown. */
.vault {
  position: relative; color: var(--on-hero); border-radius: 26px; padding: 22px;
  background: var(--hero); border: 1px solid var(--hero-line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55);
}
.vault > * { position: relative; }
.vault-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 16px; }
.vault-head b { font-size: 1.05rem; letter-spacing: -0.01em; color: var(--on-hero); }
.vault-head small { display: block; color: var(--on-hero-dim); font-size: .8rem; font-weight: 500; }
.vault-lock { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--hero-tile); border: 1px solid var(--hero-line); color: #c6f432; }
.vault-lock svg { width: 20px; height: 20px; }
.vault-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vrow { display: flex; align-items: center; gap: 14px; padding: 14px 6px; color: var(--on-hero); border-bottom: 1px solid var(--hero-line); }
.vrow:last-child { border-bottom: 0; }
.vrow .av { width: 40px; height: 40px; border-radius: 28%; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--hero-tile); color: var(--on-hero); }
.vrow .who { min-width: 0; flex: 1; }
.vrow .who b { display: block; color: var(--on-hero); font-size: .98rem; line-height: 1.25; }
.vrow .who small { color: var(--on-hero-dim); font-size: .8rem; }
.vrow .code { font-family: var(--mono); font-size: 1.32rem; font-weight: 700; letter-spacing: .03em; color: var(--on-hero); font-variant-numeric: tabular-nums; }
.vrow .tick { width: 30px; height: 30px; flex: none; }
.vrow .tick circle { fill: none; stroke-width: 4; }
.vrow .tick .t-bg { stroke: var(--hero-tile); }
.vrow .tick .t-fg { stroke: #c6f432; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }
.vrow.ending .tick .t-fg { stroke: #e8b45c; }
.vrow.ending .code { color: #e8b45c; }
.vault-foot { display: flex; align-items: center; gap: 8px; margin: 16px 6px 2px; font-size: .8rem; color: var(--on-hero-dim); }
.vault-foot svg { width: 15px; height: 15px; color: #c6f432; flex: none; }
@media (max-width: 520px) { .vrow .code { font-size: 1.12rem; } }
.vrow .who b, .vrow .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .code { white-space: nowrap; }
@media (max-width: 400px) {
  .vault { padding: 16px; }
  .vrow { gap: 10px; padding: 10px 12px; }
  .vrow .av { width: 34px; height: 34px; }
  .vrow .code { font-size: 1rem; letter-spacing: .02em; }
  .vrow .tick { width: 24px; height: 24px; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section { scroll-margin-top: 88px; }
.section { padding-block: clamp(60px, 8vw, 110px); }
.section.alt, .section--sand { background: var(--sand); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker::after { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--grad); }
.section-head p { color: var(--muted); font-size: clamp(1.08rem, 1rem + .3vw, 1.25rem); line-height: 1.55; margin-top: 14px; }
.rule-top { border-top: 1px solid var(--rule); }

/* The ledger: what stays vs what leaves */
.ledger { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--lift); }
.ledger-col { padding: clamp(24px, 3.4vw, 44px); }
.ledger-col + .ledger-col { border-left: 1px solid var(--rule); background: var(--card-2); }
.ledger-col h3 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin-bottom: 6px; }
.ledger-col h3 .badge { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ledger-col h3 .badge svg { width: 20px; height: 20px; }
.badge.mint { background: var(--mint-soft); color: var(--mint-ink); }
.badge.brass { background: var(--brass-soft); color: var(--brass-ink); }
.ledger-col > p { color: var(--muted); font-size: .98rem; }
.ledger-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.ledger-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-top: 1px dashed var(--rule-strong); }
.ledger-list li:first-child { border-top: 0; }
.ledger-list b { font-weight: 700; font-size: 1rem; }
.ledger-list span { grid-column: 1 / -1; color: var(--muted); font-size: .93rem; }
.ledger-list em { font-style: normal; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; align-self: start; }
.ledger-list em.never { background: var(--mint-soft); color: var(--mint-ink); }
.ledger-list em.when { background: var(--brass-soft); color: var(--brass-ink); }
@media (max-width: 860px) { .ledger { grid-template-columns: 1fr; } .ledger-col + .ledger-col { border-left: 0; border-top: 1px solid var(--rule); } }

/* Feature rows (not a card grid) */
.rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); }
.frow { display: flex; gap: 18px; padding: 26px 0; border-top: 1px solid var(--rule); }
.frow .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--tile-bg); color: var(--tile-fg); }
.frow .ic svg { width: 22px; height: 22px; }
.frow h3 { margin: 2px 0 6px; font-size: 1.12rem; }
.frow p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 760px) { .rows { grid-template-columns: 1fr; } }

/* Numbered steps */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; margin-top: 8px; }
.step { position: relative; padding: 26px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); counter-increment: s; box-shadow: var(--lift); }
.step::before { content: counter(s, decimal-leading-zero); display: block; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 16px; }
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 820px) { .steps-row { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split p { color: var(--ink-2); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.import-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--rule); color: var(--ink-2); padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; }

/* Tools band: a dark panel with tiles, like the app's Midnight cards. */
.band { position: relative; color: var(--on-hero); border-radius: 30px; padding: clamp(32px, 5vw, 64px); background: var(--hero); border: 1px solid var(--hero-line); overflow: hidden; }
.band h2, .band h3 { color: var(--on-hero); }
.band .section-head p { color: var(--on-hero-dim); }
.band .kicker { color: #c6f432; }
.band .kicker::before, .band .section-head.center .kicker::after { background: #c6f432; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-tile { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 20px; background: var(--hero-tile); border: 1px solid var(--hero-line); color: var(--on-hero); transition: background .15s, border-color .15s, transform .15s; }
.tool-tile:hover { text-decoration: none; border-color: #c6f432; transform: translateY(-2px); }
.tool-tile .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: #c6f432; color: #0b0d10; }
.tool-tile .ic svg { width: 21px; height: 21px; }
.tool-tile b { display: block; color: var(--on-hero); font-size: 1.02rem; margin-bottom: 3px; }
.tool-tile span { color: var(--on-hero-dim); font-size: .9rem; line-height: 1.5; }
@media (max-width: 960px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } }

/* FAQ: heading column + questions */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq-wrap .section-head { position: sticky; top: 100px; margin-bottom: 0; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } .faq-wrap .section-head { position: static; } }
.faq { display: grid; }
.faq { gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 26px; height: 26px; flex: none; border-radius: 9px; background: linear-gradient(var(--blue-ink), var(--blue-ink)) center / 10px 2px no-repeat, linear-gradient(var(--blue-ink), var(--blue-ink)) center / 2px 10px no-repeat, var(--blue-soft); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: -6px 0 20px; max-width: 40em; }

/* Closing CTA */
.closer { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--lift); border-radius: 32px; padding: clamp(32px, 5vw, 64px); overflow: hidden; position: relative; }
.closer h2 { margin-bottom: 10px; }
.closer p { color: var(--muted); margin: 0; font-size: 1.1rem; }
.closer .cta-row { margin: 26px 0 0; }
.closer-key { width: clamp(120px, 14vw, 170px); }
.closer-key img { width: 100%; height: auto; border-radius: 28%; box-shadow: 0 30px 60px -24px rgba(198, 244, 50, .35); transform: rotate(-8deg); }
@media (max-width: 760px) { .closer { grid-template-columns: 1fr; } .closer-key { display: none; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--rule); padding: 60px 0 32px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--blue-ink); margin-bottom: 14px; font-weight: 700; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 9px; }
.foot-grid a { color: var(--ink-2); }
.foot-grid a:hover { color: var(--ink); }
.foot-grid .about p { color: var(--muted); max-width: 30em; margin-top: 12px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .88rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .about { grid-column: 1 / -1; } }

/* ── Inner pages ─────────────────────────────────────────────────────────── */
.page-head { padding-top: clamp(40px, 6vw, 76px); padding-bottom: clamp(24px, 3vw, 40px); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.page-head h1 { max-width: 15em; margin-bottom: 18px; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); }
.page-head p { color: var(--muted); font-size: clamp(1.08rem, 1rem + .3vw, 1.25rem); line-height: 1.55; max-width: 40em; }
.local-note { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--mint-ink); background: var(--mint-soft); padding: 7px 13px; border-radius: 999px; font-weight: 700; }
.local-note svg { width: 16px; height: 16px; }
.local-note.net { color: var(--brass-ink); background: var(--brass-soft); }

.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(22px, 2.6vw, 30px); box-shadow: 0 1px 2px rgba(20, 23, 28, .03); }
.card > h3 { margin-bottom: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.tool-card { display: flex; flex-direction: column; gap: 4px; color: var(--ink); transition: border-color .15s, transform .15s; }
.tool-card:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--lift); }
.tool-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--tile-bg); color: var(--tile-fg); margin-bottom: 16px; }
.tool-card .ico svg { width: 22px; height: 22px; }
.tool-card h3 { margin-bottom: 6px; }
.tool-card p { color: var(--muted); font-size: .96rem; margin: 0; }
.tool-card .go { margin-top: auto; padding-top: 16px; font-size: .95rem; font-weight: 700; color: var(--link); }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; color: var(--ink-2); overflow-wrap: anywhere; }
.check-list svg { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; color: var(--blue); }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding-bottom: clamp(60px, 8vw, 110px); }
@media (max-width: 960px) { .tool-layout { grid-template-columns: 1fr; } }
.tool-main { display: grid; gap: 16px; min-width: 0; }
.aside h3 { font-size: 1.05rem; }
.aside p, .aside li { color: var(--ink-2); font-size: .95rem; }
.aside ul { padding-left: 18px; margin: 0; }
.aside .card + .card { margin-top: 16px; }
.aside .card:last-child { background: var(--blue-soft); border-color: transparent; }

.output { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 14px 14px 18px; }
.output .value { flex: 1; min-width: 0; font-family: var(--mono); font-size: clamp(1.05rem, 2.6vw, 1.45rem); word-break: break-all; line-height: 1.4; color: var(--ink); }
.output .value .d { color: var(--blue-ink); }
.output .value .s { color: var(--violet); }
.output-actions { display: flex; gap: 6px; flex: none; }

.meter { height: 8px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }
.meter-row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); margin-top: 8px; gap: 12px; flex-wrap: wrap; }
.meter-row strong { color: var(--ink); }

.field { display: grid; gap: 8px; }
.field > label, .field-label { font-weight: 700; font-size: .95rem; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.input, select.input, textarea.input { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--rule-strong); border-radius: 12px; padding: 11px 14px; min-height: 48px; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.input.mono { font-family: var(--mono); }
textarea.input { resize: vertical; min-height: 96px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; }

input[type="range"] { width: 100%; accent-color: var(--blue); }
.range-row { display: grid; grid-template-columns: 1fr 72px; gap: 14px; align-items: center; }
.range-row .input { text-align: center; padding: 8px; }

.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .toggles { grid-template-columns: 1fr; } }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; cursor: pointer; font-size: .96rem; font-weight: 600; }
.toggle small { color: var(--muted); font-family: var(--mono); font-weight: 400; }
.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--rule-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(18px); }

.seg { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .92rem; font-weight: 700; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--blue-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.notice { border-radius: 16px; padding: 14px 16px; font-size: .97rem; }
.notice.ok { background: var(--mint-soft); color: var(--mint-ink); }
.notice.bad { background: var(--danger-soft); color: var(--danger); }
.notice.warn { background: var(--brass-soft); color: var(--brass-ink); }
.notice.info { background: var(--blue-soft); color: var(--ink-2); }
.notice strong { display: block; font-size: 1.06rem; margin-bottom: 2px; }

.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; }
.panel-title { font-size: .76rem; color: var(--blue-ink); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 14px; }
.flow { display: grid; gap: 8px; }
.flow-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 12px; padding: 11px 14px; font-size: .95rem; }
.flow-row code { color: var(--ink); }
.flow-row svg { width: 18px; height: 18px; color: var(--blue); display: block; }
.tag { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.tag.ok { background: var(--mint-soft); color: var(--mint-ink); }
.tag.no { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--brass-soft); color: var(--brass-ink); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .95rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.list-plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.list-plain .b { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }

.totp-code { font-family: var(--mono); font-size: clamp(2.4rem, 8vw, 3.4rem); letter-spacing: .06em; font-weight: 600; text-align: center; color: var(--ink); line-height: 1.1; }
.ring { width: 54px; height: 54px; flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--sand); }
.ring .fg { stroke: var(--blue); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .9s linear; }

.history { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.history button { font-family: var(--mono); font-size: .9rem; text-align: left; background: var(--card-2); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; color: var(--ink-2); cursor: pointer; word-break: break-all; }
.history button:hover { color: var(--ink); border-color: var(--blue); }

.dropzone { border: 1.5px dashed var(--rule-strong); border-radius: 16px; padding: 24px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone svg { width: 36px; height: 36px; margin: 0 auto; display: block; color: var(--blue); }
.dropzone:hover { border-color: var(--blue); }
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); }

.check-row { display: flex; gap: 12px; align-items: stretch; }
.check-row .input-wrap { flex: 1; min-width: 0; }
@media (max-width: 480px) { .check-row { flex-direction: column; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 14px; font-size: .95rem; font-weight: 700; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: var(--lift); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Long-form pages */
.prose { max-width: 740px; padding-bottom: clamp(60px, 8vw, 110px); font-size: 1.08rem; }
.prose-wide { max-width: none; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; padding-top: 1.4em; border-top: 1px solid var(--rule); font-weight: 800; letter-spacing: -0.025em; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.18rem; margin: 1.8em 0 .5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 3px; }
.prose code { background: var(--blue-soft); padding: 1px 6px; border-radius: 6px; }
.callout-box { background: var(--blue-soft); border-left: 3px solid var(--blue); border-radius: 0 14px 14px 0; padding: 16px 20px; margin: 1.4em 0; color: var(--ink-2); }
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.prose ol.steps > li { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px 18px 66px; margin: 0; }
.prose ol.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 16px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.support-info h2 { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 860px) { .support-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(22px, 2.6vw, 30px); display: grid; gap: 16px; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-weight: 700; font-size: .95rem; color: var(--ink); }
.form-group input, .form-group textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--rule-strong); border-radius: 12px; padding: 11px 14px; }
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert-success { background: var(--mint-soft); color: var(--mint-ink); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; font-weight: 700; }
.form-errors { background: var(--danger-soft); color: var(--danger); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.form-errors li { color: var(--danger); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.small { font-size: .88rem; }

/* Long URLs and emails must wrap or truncate instead of widening the column. */
.prose { overflow-wrap: anywhere; }
.vrow .who b, .vrow .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .code { flex: none; }
