/* ResultKey.ng — shared styles
   Layout: one narrow reading column on phones; on desktop the hero splits into
   copy (left) and the buy box (right) so buying is always above the fold. */
:root {
  --navy: #142B45;
  --navy-2: #1C3A5C;
  --gold: #E7B967;
  --gold-ink: #7A5512;
  --bg: #FFFFFF;
  --surface: #F4F6F8;
  --line: #DCE2E9;
  --fg: #1F2937;
  --muted: #5A6675;
  --hero-bg: #142B45;
  --hero-fg: #FFFFFF;
  --hero-muted: #C5D0DC;
  --card: #FFFFFF;
  --ok: #17784A;
  --ok-bg: #E5F4EC;
  --warn: #8A5A00;
  --warn-bg: #FFF4DB;
  --err: #B3261E;
  --focus: #2F6FB3;
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 10px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1723; --surface: #152234; --line: #263850; --fg: #E6EBF1; --muted: #9BA9B9;
    --hero-bg: #0A1A2C; --hero-fg: #FFFFFF; --hero-muted: #B4C2D1; --card: #13202F;
    --navy: #E6EBF1; --navy-2: #C9D4E0; --gold-ink: #E7B967;
    --ok: #5BC48D; --ok-bg: #12301F; --warn: #F0C46A; --warn-bg: #2E2410; --err: #FF8A80; --focus: #7FB2EA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1723; --surface: #152234; --line: #263850; --fg: #E6EBF1; --muted: #9BA9B9;
  --hero-bg: #0A1A2C; --hero-fg: #FFFFFF; --hero-muted: #B4C2D1; --card: #13202F;
  --navy: #E6EBF1; --navy-2: #C9D4E0; --gold-ink: #E7B967;
  --ok: #5BC48D; --ok-bg: #12301F; --warn: #F0C46A; --warn-bg: #2E2410; --err: #FF8A80; --focus: #7FB2EA;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; margin: 0; color: var(--navy); }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Preview banner */
.preview-bar { background: var(--warn-bg); color: var(--warn); font-size: .85rem; border-bottom: 1px solid var(--line); }
.preview-bar .wrap { padding-block: 8px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.logo-text small { font-size: .68rem; color: var(--muted); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-ink); }
.header-cta { margin-left: 8px; }
@media (max-width: 860px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .logo-text small { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--font-display); padding: 14px 20px; border-radius: var(--r); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .12s ease; min-height: 48px; }
.btn-gold { background: var(--gold); color: #142B45; }
.btn-gold:hover { background: #F0C77F; }
.btn-gold:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-sm { padding: 10px 14px; min-height: 40px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; grid-template-areas: "head box" "details box"; grid-template-rows: auto 1fr; gap: 0 40px; align-items: start; padding-block: 40px 48px; }
.hero .head { grid-area: head; min-width: 0; }
.hero .details { grid-area: details; min-width: 0; }
.hero .buybox { grid-area: box; }
.hero h1 { color: var(--hero-fg); }
.hero .lede { color: var(--hero-muted); font-size: 1.1rem; margin-top: 14px; max-width: 36ch; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--hero-fg); }
.facts svg { margin-top: 3px; }
.facts div > span:not(.tag) { color: var(--hero-muted); display: block; font-size: .92rem; }
.hero .disclaim { margin-top: 24px; font-size: .85rem; color: var(--hero-muted); border-left: 3px solid var(--gold); padding-left: 12px; max-width: 46ch; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; grid-template-areas: "head" "box" "details"; grid-template-rows: auto; gap: 20px; padding-block: 20px 32px; }
  .hero .lede { font-size: 1rem; }
  .hero .facts { margin-top: 18px; }
}

/* Buy box */
.buybox { background: var(--card); color: var(--fg); border-radius: 14px; padding: 22px; box-shadow: 0 12px 32px rgba(5, 15, 28, .28); min-width: 0; }
.buybox h2 { font-size: 1.2rem; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.price { font: 800 2rem/1 var(--font-display); color: var(--navy); font-variant-numeric: tabular-nums; }
.price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.price-date { font-size: .8rem; color: var(--muted); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); vertical-align: middle; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field input, .field select { font: inherit; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-height: 48px; width: 100%; }
.field input[aria-invalid="true"] { border-color: var(--err); }
.err { color: var(--err); font-size: .82rem; min-height: 0; }
.qty { display: grid; grid-template-columns: 48px 1fr 48px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { font: 700 1.3rem/1 var(--font-display); background: var(--surface); color: var(--fg); border: 0; cursor: pointer; }
.qty input { border: 0; border-radius: 0; text-align: center; font-weight: 700; min-height: 46px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 14px; font-weight: 600; }
.total strong { font: 800 1.35rem/1 var(--font-display); color: var(--navy); }
.secure { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: center; }

/* Sections */
.section { padding-block: 56px; }
.section.alt { background: var(--surface); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 62ch; }
.section-head p { color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #142B45; font: 800 1rem/1 var(--font-display); }
.steps p { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.price-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table th { width: 38%; font-weight: 600; color: var(--muted); font-size: .92rem; }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.price-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.price-grid > * { min-width: 0; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }

.guides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.guide { display: grid; gap: 6px; align-content: start; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--fg); min-width: 0; }
.guide:hover { border-color: var(--gold); }
.guide h3 { color: var(--navy); }
.guide p { font-size: .9rem; color: var(--muted); }
.guide .path { font-size: .75rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.guide .go { font-weight: 600; font-size: .9rem; color: var(--focus); }
@media (max-width: 960px) { .guides { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .guides { grid-template-columns: 1fr; } }

.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; list-style: none; padding: 0; margin: 0; }
.promises li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; min-width: 0; }
.promises h3 { margin-bottom: 4px; }
.promises p { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--font-display); padding: 16px 0; color: var(--navy); list-style-position: outside; }
.faq details p { padding-bottom: 16px; color: var(--fg); }

.notice { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px 18px; font-size: .92rem; }

/* Footer */
.site-footer { background: #0D1E31; color: #C5D0DC; font-size: .92rem; }
.site-footer .wrap { padding-block: 40px 24px; display: grid; gap: 28px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.foot-cols > * { min-width: 0; }
.site-footer h3 { color: #FFFFFF; font-size: .95rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #C5D0DC; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .logo { color: #FFFFFF; }
.site-footer .logo-text small { color: #9BA9B9; display: block; }
.legal { border-top: 1px solid #263850; padding-top: 18px; display: grid; gap: 6px; font-size: .82rem; }
.legal strong { color: #FFFFFF; }
@media (max-width: 860px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols > :first-child { grid-column: 1 / -1; } }

/* Breadcrumb */
.crumbs { font-size: .85rem; color: var(--hero-muted); margin-bottom: 12px; }
.crumbs a { color: var(--hero-muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }

/* Checkout modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5, 12, 22, .6); padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { background: var(--card); color: var(--fg); width: 100%; max-width: 440px; border-radius: 14px; padding: 22px; max-height: 100%; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.sheet h2 { font-size: 1.25rem; }
.sheet .rows { display: grid; gap: 8px; margin: 16px 0; padding: 14px; background: var(--surface); border-radius: 8px; font-size: .95rem; }
.sheet .rows div { display: flex; justify-content: space-between; gap: 12px; }
.sheet .rows span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sheet .actions { display: grid; gap: 10px; }
.linkish { background: none; border: 0; color: var(--focus); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; padding: 6px; }
.token-slip { margin: 14px 0; border: 2px dashed var(--gold); border-radius: 10px; padding: 14px; text-align: center; }
.token-slip code { display: block; font: 700 1.25rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; color: var(--navy); overflow-wrap: anywhere; }
.status { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.bad { background: var(--warn-bg); color: var(--warn); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #142B45; color: #fff; padding: 12px 16px; border-radius: 8px; font-size: .9rem; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* Sticky mobile buy bar */
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .mobile-bar[hidden] { display: none !important; }
  .mobile-bar .p { font: 800 1.15rem/1.1 var(--font-display); color: var(--navy); }
  .mobile-bar small { display: block; font: 500 .75rem/1.2 var(--font-body); color: var(--muted); }
  body.has-bar { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Guide pages */
.guide-hero .wrap { display: block; padding-block: 28px 32px; }
.guide-hero h1 { font-size: clamp(1.75rem, 4.4vw, 2.5rem); max-width: 22ch; }
.guide-hero .lede { max-width: 60ch; }
.byline { margin-top: 14px; font-size: .85rem; color: var(--hero-muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-block: 36px 56px; align-items: start; }
.article > * { min-width: 0; }
.prose { max-width: 68ch; display: grid; gap: 18px; }
.prose h2 { margin-top: 22px; scroll-margin-top: 90px; }
.prose h3 { margin-top: 6px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r); padding: 16px 18px; }
.answer strong:first-child { display: block; font-family: var(--font-display); color: var(--navy); margin-bottom: 4px; }
.howto { list-style: none; padding: 0 !important; counter-reset: s; gap: 14px !important; }
.howto > li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.howto > li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #142B45; font: 800 .95rem/1 var(--font-display); }
.howto div > b:first-child { display: block; color: var(--navy); }
.callout { border-radius: var(--r); padding: 14px 16px; font-size: .95rem; }
.callout.warn { background: var(--warn-bg); color: var(--fg); border: 1px solid var(--line); }
.callout.warn strong { color: var(--warn); }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--card); }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--surface); font-family: var(--font-display); color: var(--navy); }
.figure { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.figure figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.figure svg { width: 100%; height: auto; display: block; }
.aside { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); display: grid; gap: 16px; }
.toc { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; font-size: .9rem; }
.toc h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.toc a { color: var(--fg); text-decoration: none; }
.toc a:hover { color: var(--focus); }
.cta-box { background: var(--hero-bg); color: var(--hero-fg); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; }
.cta-box h2, .cta-box h3 { color: var(--hero-fg); font-size: 1.05rem; }
.cta-box p { color: var(--hero-muted); font-size: .9rem; }
.cta-box .price { color: var(--hero-fg); font-size: 1.5rem; }
.sources { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.sources ul { padding-left: 1.2em; }
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; gap: 28px; } .aside { display: none; } }
@media (max-width: 560px) { .related { grid-template-columns: 1fr; } }

/* Trust strip under the hero */
.trust-strip { border-bottom: 1px solid var(--line); background: var(--bg); }
.trust-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding-block: 0; }
.trust-strip p { padding: 16px 18px; border-left: 1px solid var(--line); display: grid; gap: 2px; font-size: .88rem; min-width: 0; }
.trust-strip p:first-child { border-left: 0; padding-left: 0; }
.trust-strip b { font-family: var(--font-display); color: var(--navy); font-size: .92rem; }
.trust-strip span { color: var(--muted); }
@media (max-width: 860px) {
  .trust-strip .wrap { grid-template-columns: 1fr 1fr; }
  .trust-strip p { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0; }
  .trust-strip p:nth-child(-n+2) { border-top: 0; }
  .trust-strip p:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
}
/* Order page */
.order-card { max-width: 560px; }
.order-card .token-slip code { font-size: 1.15rem; }
