/* Reckoner — the premium layer. Loaded after each page's own styles; later rules win.
   Refinement, not redesign: the ink-and-brass identity stays; depth, typography, and
   finish go up. Falls back gracefully offline (Georgia / system stacks remain). */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

/* ---------- atmosphere: glow + lattice depth behind everything ---------- */
body { background: #101315; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 18% -8%, rgba(201,169,106,0.11), transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 12%, rgba(143,174,130,0.06), transparent 55%),
    #101315;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(236,231,220,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(236,231,220,0.035) 1px, transparent 1px),
    linear-gradient(to right, rgba(201,169,106,0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201,169,106,0.022) 1px, transparent 1px);
  background-size: 84px 84px, 84px 84px, 21px 21px, 21px 21px;
  mask-image: radial-gradient(ellipse 95% 70% at 50% 12%, #000 0%, rgba(0,0,0,0.45) 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 95% 70% at 50% 12%, #000 0%, rgba(0,0,0,0.45) 60%, transparent 100%);
}

/* ---------- brand + headings ---------- */
.brand { letter-spacing: -0.03em; text-shadow: 0 2px 34px rgba(201,169,106,0.18); }
.brand .dot {
  background: linear-gradient(135deg, #C9A96A 20%, #E0C68C 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.defline { color: #CFC9BC; }
.tagline { color: #D4B87E; }
.card h2 { letter-spacing: -0.012em; }
.q { letter-spacing: -0.008em; }

/* ---------- cards: gradient border, layered depth, gentle rise ---------- */
.card {
  border: 1px solid transparent;
  background-image:
    linear-gradient(180deg, rgba(28,33,38,0.96), rgba(23,27,32,0.96)),
    linear-gradient(160deg, rgba(236,231,220,0.18) 0%, rgba(201,169,106,0.12) 42%, rgba(0,0,0,0.55) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 26px 52px -14px rgba(0,0,0,0.62),
    0 10px 22px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(236,231,220,0.075);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 32px 60px -14px rgba(0,0,0,0.66),
    0 14px 26px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(236,231,220,0.09);
}
@keyframes rk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card { animation: rk-rise .55s cubic-bezier(.22,1,.36,1) both; }
.card:nth-of-type(2) { animation-delay: .06s; }
.card:nth-of-type(3) { animation-delay: .12s; }
.card:nth-of-type(4) { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card, .card:hover { transform: none; }
}

/* ---------- controls: finish and focus ---------- */
.btn { transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #E0C68C; outline-offset: 2px; }
input[type="text"], input[type="date"], select, textarea {
  background: #0F1316;
  border-color: rgba(236,231,220,0.14);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
  outline: 2px solid #C9A96A;
  box-shadow: 0 0 0 5px rgba(201,169,106,0.13);
}
input[type="range"] { height: 4px; }

/* ---------- details that read as money ---------- */
.stat { border-color: rgba(236,231,220,0.10); background: linear-gradient(180deg, #101418, #0D1013); }
.stat .n {
  background: linear-gradient(135deg, #E9D6A8 10%, #C9A96A 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pages a { transition: color .15s ease; }
.pages a.here { text-shadow: 0 0 22px rgba(201,169,106,0.35); }
.verdict { font-weight: 500; }
.stair { transition: transform .15s ease; }
.stair:hover { transform: translateY(-2px); }
.due-banner { box-shadow: inset 0 1px 0 rgba(224,198,140,0.10); }
.seal-confirm { background: rgba(201,169,106,0.045); }
.entry .claim, .win .what { letter-spacing: -0.005em; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #101315; }
::-webkit-scrollbar-thumb { background: #2A2F35; border-radius: 8px; border: 2px solid #101315; }
::-webkit-scrollbar-thumb:hover { background: #3A4048; }

/* ---------- legal footer ---------- */
.legal { margin-top: 56px; padding-top: 18px; border-top: 1px solid rgba(236,231,220,0.12); display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8B877C; }
.legal a { color: #8B877C; text-decoration: none; transition: color .15s ease; }
.legal a:hover { color: #E0C68C; }
