/* legal.css - the public info pages of chessrecaps.com (privacy, terms, refunds, contact, about, faq, 404).
   Midnight & Gold (brand/tokens.css), Manrope, mobile-first, dark by default, light by system setting or the app's own choice. */

:root {
  --bg: #0E1322; --bg-deep: #0A0E1A; --surface: #161D30; --surface-2: #1F2840; --surface-3: #2A3452;
  --text: #F4EFE4; --text-2: #B9BFCF; --text-3: #8F98AE;
  --border: rgba(244, 239, 228, .08); --border-strong: rgba(244, 239, 228, .15);
  --accent: #F5B83D; --accent-2: #FFCB62; --accent-deep: #B07D12; --accent-ink: #1A1406; --accent-text: #F5B83D; --accent-soft: rgba(245, 184, 61, .14);
  --glow-1: rgba(245, 184, 61, .08); --glow-2: rgba(168, 139, 255, .10);
  --good: #4CC38A; --purple: #A88BFF;
  --c-openings: #4FD1A5; --c-middlegame: #FF7A45; --c-endgame: #38C4E8;
  --shadow: 0 1px 0 rgba(244, 239, 228, .04) inset, 0 10px 30px rgba(0, 0, 0, .28);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F3EC; --bg-deep: #FFFFFF; --surface: #FFFFFF; --surface-2: #F3EFE6; --surface-3: #E4DED1;
    --text: #141A2E; --text-2: #4A5268; --text-3: #636B82;
    --border: rgba(20, 26, 46, .09); --border-strong: rgba(20, 26, 46, .16);
    --accent: #F2B02E; --accent-2: #F7C04F; --accent-text: #8A5C00; --accent-soft: rgba(242, 176, 46, .16);
    --glow-1: rgba(242, 176, 46, .14); --glow-2: rgba(107, 72, 240, .06);
    --good: #127548; --purple: #6B48F0;
    --c-openings: #0F8A63; --c-middlegame: #D4501A; --c-endgame: #0B83A4;
    --shadow: 0 1px 0 rgba(20, 26, 46, .03), 0 8px 24px rgba(20, 26, 46, .07);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F6F3EC; --bg-deep: #FFFFFF; --surface: #FFFFFF; --surface-2: #F3EFE6; --surface-3: #E4DED1;
  --text: #141A2E; --text-2: #4A5268; --text-3: #636B82;
  --border: rgba(20, 26, 46, .09); --border-strong: rgba(20, 26, 46, .16);
  --accent: #F2B02E; --accent-2: #F7C04F; --accent-text: #8A5C00; --accent-soft: rgba(242, 176, 46, .16);
  --glow-1: rgba(242, 176, 46, .14); --glow-2: rgba(107, 72, 240, .06);
  --good: #127548; --purple: #6B48F0;
  --c-openings: #0F8A63; --c-middlegame: #D4501A; --c-endgame: #0B83A4;
  --shadow: 0 1px 0 rgba(20, 26, 46, .03), 0 8px 24px rgba(20, 26, 46, .07);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(900px 420px at 100% -80px, var(--glow-2), transparent 70%), radial-gradient(700px 380px at -10% -60px, var(--glow-1), transparent 70%), var(--bg);
  background-repeat: no-repeat; background-color: var(--bg);
  color: var(--text); font: 500 16px/1.65 var(--font); overflow-wrap: anywhere;
}
a { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
/* the wordmark is inline SVG (brand/logo-wordmark.svg): letters in --text, the gold R leg in --logo-gold */
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: 0 1 auto; min-width: 0; color: var(--text); --logo-gold: #F5B83D; }
.brand .wm { height: 30px; width: auto; max-width: 100%; display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand { --logo-gold: #B7790A; } }
:root[data-theme="light"] .brand { --logo-gold: #B7790A; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px;
  font: 800 15px/1.2 var(--font); text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 var(--accent-deep);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 var(--accent-deep); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-2 { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong), 0 3px 0 rgba(0, 0, 0, .18); }
.btn-2:hover { background: var(--surface-3); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- page ---------- */
main { flex: 1 0 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 56px; }
.eyebrow { display: inline-block; margin: 0 0 10px; color: var(--accent-text); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 7.2vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; }
h2 { margin: 40px 0 10px; font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -.015em; scroll-margin-top: 84px; }
h3 { margin: 22px 0 6px; font-size: 16.5px; font-weight: 800; scroll-margin-top: 84px; }
p, li { color: var(--text-2); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 7px; }
li::marker { color: var(--text-3); }
b, strong { color: var(--text); font-weight: 800; }
.lead { font-size: 17.5px; line-height: 1.6; color: var(--text-2); margin-bottom: 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3); font-size: 13px; font-weight: 700; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 18px 6px; box-shadow: var(--shadow); margin: 0 0 18px; }
.card > :last-child { margin-bottom: 14px; }
.tldr { border-left: 4px solid var(--accent); }
.tldr h2 { margin-top: 0; font-size: 17px; }
.tldr ul { padding-left: 0; list-style: none; }
.tldr li { position: relative; padding-left: 28px; }
.tldr li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tldr li::after { content: ""; position: absolute; left: 7px; top: calc(.42em + 4px); width: 4px; height: 7px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* table of contents */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin: 0 0 26px; }
.toc summary { cursor: pointer; list-style: none; padding: 13px 16px; font-weight: 800; color: var(--text); display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 9px; height: 9px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s ease; margin-right: 4px; }
.toc[open] summary::after { transform: rotate(-135deg); }
.toc ol { margin: 0; padding: 0 16px 14px 38px; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
.toc a { font-weight: 600; color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }

/* plans table */
.tbl-wrap { overflow-x: auto; margin: 0 0 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
th { color: var(--text); font-weight: 800; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.note { font-size: 14px; color: var(--text-3); }
.cta { margin: 34px 0 0; padding: 22px 20px; border-radius: 20px; text-align: center; color: #F4EFE4;
  background: radial-gradient(60% 90% at 105% -10%, rgba(168, 139, 255, .30), transparent 70%), radial-gradient(60% 80% at -10% 110%, rgba(245, 184, 61, .18), transparent 70%), linear-gradient(160deg, #1D2645 0%, #121a31 58%, #0B0F1C 100%);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 228, .07), 0 14px 34px rgba(0, 0, 0, .25); }
.cta h2 { margin: 0 0 6px; color: #F4EFE4; }
.cta p { color: rgba(244, 239, 228, .80); }
.cta .btn { margin: 6px 4px 4px; }
.cta .btn-2 { background: rgba(244, 239, 228, .12); color: #F4EFE4; box-shadow: inset 0 0 0 1px rgba(244, 239, 228, .18); }

/* ---------- FAQ ---------- */
.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.faq-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; text-decoration: none; }
.faq-nav a:hover { color: var(--text); border-color: var(--border-strong); }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin: 0 0 10px; transition: border-color .15s ease; }
.qa[open] { border-color: var(--border-strong); }
.qa summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; min-height: 52px; font-weight: 800; color: var(--text); line-height: 1.4; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); font-size: 18px; font-weight: 800; line-height: 1; transition: transform .15s ease; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa .a { padding: 0 16px 6px; }
.qa .a > :last-child { margin-bottom: 14px; }

/* ---------- contact ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 22px; }
@media (min-width: 620px) { .grid { grid-template-columns: 1fr 1fr; } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
a.tile:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.tile b { font-size: 16px; }
.tile span { color: var(--text-2); font-weight: 500; font-size: 14.5px; line-height: 1.5; }
.tile em { font-style: normal; color: var(--accent-text); font-weight: 800; font-size: 14px; margin-top: 4px; }
.mail { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); margin: 0 0 22px; box-shadow: var(--shadow); }
.mail-a { font-size: clamp(18px, 5vw, 22px); font-weight: 800; color: var(--text); text-decoration: none; }
.mail-a:hover { color: var(--accent-text); }
.copy[data-done="1"] { background: var(--good); color: #fff; box-shadow: none; }

/* ---------- about ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.steps b { display: block; }
.areas { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 22px; }
@media (min-width: 560px) { .areas { grid-template-columns: 1fr 1fr; } }
.area { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--c, var(--accent)); }
.area b { display: block; margin-bottom: 2px; }
.area span { color: var(--text-2); font-size: 14.5px; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding-top: 28px; }
.nf svg { width: min(220px, 62vw); height: auto; margin: 0 auto 18px; display: block; }
.nf .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg-deep) 60%, var(--bg)); }
.foot-in { max-width: 1040px; margin: 0 auto; padding: 26px 16px calc(26px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { color: var(--text-2); font-weight: 700; font-size: 14.5px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot nav a:hover, .foot nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.foot p { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.6; }
.foot p a { color: var(--text-3); font-weight: 600; }

@media print {
  .top, .foot, .toc, .cta, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  p, li { color: #000; }
  a { color: #000; }
}
