/* Digital Mirror — page layout on top of tokens.css + bundle.css.
 * No inline styles anywhere (strict CSP: style-src 'self'). */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
main { flex: 1 0 auto; }

.skip { position: absolute; left: var(--space-4); top: -48px; background: var(--signal); color: var(--on-signal); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); z-index: 100; font-family: var(--font-mono); font-size: 12px; }
.skip:focus { top: var(--space-2); }

/* mobile type scale (tokens are desktop-first) */
@media (max-width: 640px) {
  .display-xl { font-size: 36px; line-height: 40px; }
  .display-lg { font-size: 29px; line-height: 35px; }
  .data-xl { font-size: 52px; line-height: 52px; }
  .dm-section { padding: var(--space-7) 0; }
}

/* ---------- small utilities ---------- */
.u-muted { color: var(--ink-muted); }
.u-faint { color: var(--ink-faint); }
.u-signal { color: var(--signal); }
.u-secure { color: var(--secure); }
.u-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack--3 { gap: var(--space-3); }
.stack--5 { gap: var(--space-5); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.pt-0 { padding-top: 0; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.maxw-480 { max-width: 480px; }
.maxw-740 { max-width: 740px; }
.nolink { text-decoration: none; color: inherit; }

/* ---------- nav extras ---------- */
.dm-nav__links .dm-btn { padding: var(--space-2) var(--space-4); }
.nav__theme { padding: var(--space-2); line-height: 0; }
.nav__theme svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.nav__theme .i-sun { display: none; }
[data-theme="light"] .nav__theme .i-sun { display: block; }
[data-theme="light"] .nav__theme .i-moon { display: none; }
.dm-nav__link { text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding-top: var(--space-7); padding-bottom: var(--space-7); }
.hero__grid { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.hero__copy { flex: 1 1 440px; min-width: 0; }
.hero__scan { flex: 1 1 520px; min-width: 0; }
.hero .dm-scan { box-shadow: var(--glow-signal); }
.score-slot { margin-top: var(--space-1); }
.breakdown { margin-top: var(--space-3); border: 1px solid var(--edge); border-radius: var(--radius-md); background: var(--surface); }
.breakdown summary { cursor: pointer; padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.breakdown summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.breakdown ul { list-style: none; margin: 0; padding: 0 var(--space-4) var(--space-3); display: grid; gap: var(--space-2); }
.breakdown li { display: grid; grid-template-columns: 52px 1fr; gap: var(--space-3); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.breakdown li b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }

/* ---------- journey strip ---------- */
/* pb:0 so only #fix's own padding-top creates the gap below, matching the gap above from the previous section */
.journey-sec { padding-bottom: 0; }
.journey { border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); padding: var(--space-5) 0; display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-6); }
.journey__step { flex: 1 1 180px; min-width: 0; text-decoration: none; display: block; }
.journey__step:hover .journey__name { text-decoration: underline; }
.journey__n { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); margin-bottom: var(--space-1); }
.journey__step--good .journey__n { color: var(--secure); }
.journey__name { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.journey__sub { font-size: 13px; line-height: 18px; color: var(--ink-faint); margin-top: var(--space-1); }
html { scroll-padding-top: 88px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- fix section ---------- */
.split { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: stretch; }
.split__a { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.split__b { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.split__a > :last-child, .split__b > :last-child { flex-grow: 1; }
.panel { border: 1px solid var(--edge); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.ba { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.ba__was { font-family: var(--font-mono); font-weight: 600; font-size: 38px; line-height: 38px; color: var(--score-high); text-decoration: line-through; text-decoration-thickness: 3px; }
.ba__now { font-family: var(--font-mono); font-weight: 600; font-size: 50px; line-height: 50px; color: var(--secure); }
.ba__arrow { font-family: var(--font-mono); font-size: 22px; color: var(--ink-faint); }
.dm-score--tight { gap: var(--space-2); }
.dm-score--tight .dm-score__pct { font-size: 14px; line-height: 22px; }

/* ---------- duality: light half / dark half stay two-sided in both themes ---------- */
.duo { display: flex; flex-wrap: wrap; border: 1px solid var(--edge); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.duo__light, .duo__dark { flex: 1 1 320px; min-width: 0; padding: var(--space-6) var(--space-5); }
.duo__light { background: var(--void); color: var(--ink); }
.duo__dark { background: var(--surface); color: var(--ink); border-left: 2px solid var(--edge-strong); }
@media (max-width: 679px) { .duo__dark { border-left: 0; border-top: 2px solid var(--edge-strong); } }
.duo--compact .duo__light, .duo--compact .duo__dark { padding: var(--space-4) var(--space-5); }

/* ---------- case cards ---------- */
.case { border: 1px solid var(--edge); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.case__light { background: var(--void); color: var(--ink); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.case__dark { background: var(--surface); color: var(--ink); padding: var(--space-5); border-top: 2px solid var(--edge-strong); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.case .dm-caught__check { color: var(--ink-faint); }
.case--teaser { pointer-events: none; cursor: default; opacity: 0.55; }
.case--teaser:hover { transform: none; box-shadow: none; }
.dm-caught__check--soon { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); opacity: 0.7; }

/* ---------- tool cards ---------- */
.dm-card--tool .caption, .dm-card--tool .dm-card__desc { overflow-wrap: anywhere; }
.dm-card--soon { cursor: default; }

/* ---------- share card ---------- */
.share { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; }
.share__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.share__card-wrap { flex: 1 1 480px; min-width: 0; }
.ogcard { border: 1px solid var(--edge-strong); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-pop); background: var(--surface); }
.ogcard__in { aspect-ratio: 1.91 / 1; padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); background-image: repeating-linear-gradient(0deg, var(--scanline) 0 1px, transparent 1px 3px); }
.ogcard__top, .ogcard__bot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ogcard__mid { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.ogcard__was { font-family: var(--font-mono); font-weight: 600; font-size: 42px; line-height: 42px; color: var(--score-high); text-decoration: line-through; text-decoration-thickness: 3px; }
.ogcard__now { font-family: var(--font-mono); font-weight: 600; font-size: 56px; line-height: 56px; color: var(--secure); text-shadow: 0 0 24px var(--secure-tint-edge); }
.ogcard__bar { flex: 1 1 150px; min-width: 140px; }
@media (max-width: 520px) { .ogcard__in { aspect-ratio: auto; padding: var(--space-4); } .ogcard__was { font-size: 32px; line-height: 32px; } .ogcard__now { font-size: 44px; line-height: 44px; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--edge); background: var(--surface); margin-top: auto; }
.foot__in { padding-top: var(--space-7); padding-bottom: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-6); }
.foot__brand { flex: 2 1 280px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.foot__col { flex: 1 1 150px; min-width: 0; }
.foot__col .label { color: var(--ink-faint); margin-bottom: var(--space-3); }
.foot__links { display: flex; flex-direction: column; gap: var(--space-2); }
.foot__links a { border: 0; }
.foot__mirror { font-size: 15px; transform: scaleY(-1); opacity: 0.26; -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 88%); mask-image: linear-gradient(0deg, #000 0%, transparent 88%); }

/* ---------- tool page ---------- */
.tool-head { padding-top: var(--space-7); padding-bottom: 0; }
.tool-sec { padding-top: var(--space-6); padding-bottom: 0; }
.crumb a { border: 0; color: var(--ink-faint); }
.prose { max-width: 740px; }
.prose p + p { margin-top: var(--space-3); }
.scan-note { margin-top: var(--space-3); text-align: center; color: var(--ink-faint); }
.dm-scan__more[disabled] { opacity: .6; cursor: progress; }
.verdict-detail { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.legal { max-width: 740px; }
.legal h2 { margin: var(--space-6) 0 var(--space-2); }
.legal ul { color: var(--ink-muted); padding-left: var(--space-5); }
.legal li { margin: var(--space-1) 0; }
.mt-0 { margin-top: 0; }
/* reading column on /tools/ and /vpn/ pages: 740px, centred (dm-wrap keeps the 16px side padding on mobile) */
.tool-wrap { margin-inline: auto; }
.crumb { margin: 0; }
/* tool sections have no bottom padding (they stack with top padding only) — give the last one room before the footer */
main > .tool-sec:last-child { padding-bottom: var(--space-8); }
/* FAQ blocks (<h3 class="label"> + <p>) read as separate Q&A pairs */
.prose h3 { margin-top: var(--space-6); }
.prose h2 + h3 { margin-top: var(--space-4); }
.prose h3 + p { padding-bottom: var(--space-5); border-bottom: 1px solid var(--edge); }
.prose h3 + p:last-child { padding-bottom: 0; border-bottom: 0; }
/* ---------- file drop zone (metadata stripper) ---------- */
.drop { display: block; border: 2px dashed var(--edge-strong); border-radius: var(--radius-lg); background: var(--surface); padding: var(--space-6) var(--space-5); text-align: center; cursor: pointer; }
.drop:hover, .drop:focus-within, .drop--over { border-color: var(--accent); background: var(--accent-tint); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* ---------- raw text input (email header analyzer) ---------- */
.paste { display: block; width: 100%; min-height: 240px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--edge-strong); border-radius: var(--radius-lg); padding: var(--space-4); }
.paste:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.urlbox { flex: 1 1 280px; min-width: 0; font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--ink); background: var(--surface); border: 1px solid var(--edge-strong); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.urlbox:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.flags { margin: 0; padding-left: var(--space-5); color: var(--ink-muted); font-size: 14px; line-height: 22px; }

/* ---------- generator panel (password generator) ---------- */
.gen { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.gen + .gen { border-top: 1px solid var(--edge); }
.gen__pw { display: block; font-family: var(--font-mono); font-size: 20px; line-height: 30px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.gen__row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.gen__row label { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.gen__row--sets { gap: var(--space-2) var(--space-5); }
.gen__row input[type="range"] { flex: 1 1 160px; min-width: 0; accent-color: var(--accent); }
.gen__row input[type="number"] { width: 64px; font-family: var(--font-mono); font-size: 14px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--edge-strong); border-radius: var(--radius-sm); padding: 2px 6px; }
.gen__row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.gen__bar { grid-template-columns: repeat(4, 1fr); }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface-raised); border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 1px 5px; }
