/* Aurudex site. Tokens mirror the app's asset catalog (PRD section 3). */

@font-face {
  font-family: "Bangers";
  src: url("/assets/fonts/Bangers.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f2f1ec;
  --divider: #e4e4e0;
  --text: #111111;
  --text-muted: #5a5a5a;
  --gold-text: #8a6100;
  --gold-fill: #ffd60a;
  --gold-line: #ffd60a;
  --gold-underlay: #111111;
  --up: #0b7a3b;
  --down: #c8102e;
  --dollar: #18a558;
  --ink: #111111;
  --pop-orange: #ff6a13;
  --pop-pink: #ff3ea5;
  --pop-cyan: #3ec1f3;
  --era: rgba(17, 17, 17, 0.045);
  --era-alt: rgba(255, 214, 10, 0.16);
  --grid: #e4e4e0;
  --shadow: #111111;

  --font-brand: "Bangers", "Impact", "Arial Narrow", sans-serif;
  --font-data: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --max: 980px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10;
    --surface: #1c1c20;
    --divider: #26262c;
    --text: #ffffff;
    --text-muted: #b8b8c0;
    --gold-text: #ffd60a;
    --gold-underlay: #000000;
    --up: #7fe0a0;
    --down: #ff7aa8;
    --era: rgba(255, 255, 255, 0.05);
    --era-alt: rgba(255, 214, 10, 0.1);
    --grid: #26262c;
    --shadow: #000000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #1c1c20;
  --divider: #26262c;
  --text: #ffffff;
  --text-muted: #b8b8c0;
  --gold-text: #ffd60a;
  --gold-underlay: #000000;
  --up: #7fe0a0;
  --down: #ff7aa8;
  --era: rgba(255, 255, 255, 0.05);
  --era-alt: rgba(255, 214, 10, 0.1);
  --grid: #26262c;
  --shadow: #000000;
  color-scheme: dark;
}

/* Light/dark-only artwork follows the same rules as the tokens. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: inline-block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: inline-block; }
:root[data-theme="dark"] .only-light { display: none; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-data);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 3px solid var(--pop-cyan); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--gold-fill); color: var(--ink); padding: 8px 12px; z-index: 10; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.brand { font-family: var(--font-brand); letter-spacing: 0.03em; font-weight: 400; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.topbar a.home { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 26px; }
.topbar img { width: 36px; height: 36px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------------------------------------------------------------- hero */

.hero {
  text-align: center;
  padding: 24px var(--gutter) 56px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero .mark { width: min(240px, 60vw); height: auto; aspect-ratio: 1; }
.hero .wordmark { font-size: clamp(44px, 11vw, 72px); margin: 4px 0 0; line-height: 1; }
.hero h1 {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(38px, 9vw, 76px);
  line-height: 1.02;
  margin: 24px auto 16px;
  max-width: 14ch;
}
.hero h1 .melt { color: var(--dollar); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.hero .sub { color: var(--text-muted); font-size: 19px; max-width: 34ch; margin: 0 auto 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  font-family: var(--font-brand);
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--gold-fill);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--shadow);
  text-decoration: none;
}
.btn[aria-disabled="true"] { cursor: default; }
.btn svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- dividers */

.drip { display: block; width: 100%; height: 44px; color: var(--dollar); }

/* ---------------------------------------------------------------- sections */

section { padding: 48px 0; }
.kicker {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 18px;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--gold-fill);
  padding: 2px 10px;
  transform: rotate(-2deg);
}
h2 {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.05;
  margin: 12px 0 16px;
}
.lede { max-width: 62ch; font-size: 18px; }
.lede p { margin: 0 0 12px; }

/* ---------------------------------------------------------------- timeline */

.timeline {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 4px solid var(--text);
}
.timeline li { position: relative; padding: 0 0 22px 22px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--gold-fill);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.timeline li.big::before { background: var(--down); width: 24px; height: 24px; left: -14px; }
.timeline .when { font-family: var(--font-brand); font-size: 24px; letter-spacing: 0.03em; line-height: 1.1; display: block; }
.timeline .what { display: block; }
.timeline cite { font-style: normal; font-size: 14px; color: var(--text-muted); }

@media (min-width: 860px) {
  .timeline {
    grid-template-columns: repeat(7, 1fr);
    border-left: 0;
    border-top: 4px solid var(--text);
    gap: 12px;
  }
  .timeline li { padding: 26px 0 0; }
  .timeline li::before { left: 0; top: -12px; }
  .timeline li.big::before { left: 0; top: -14px; }
}

/* ---------------------------------------------------------------- charts */

.chart-block {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  border-top: 1px solid var(--divider);
}
.chart-block h3 {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.05;
  margin: 0 0 6px;
}
.chart-block .num { color: var(--text-muted); margin: 0 0 18px; font-size: 16px; }
.chart-block .num strong { color: var(--gold-text); }

figure { margin: 0; }
.chart {
  position: relative;
  width: 100%;
  min-height: 260px;
  touch-action: pan-y;
}
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart:focus-visible { outline-offset: 6px; }
.chart .axis text { fill: var(--text-muted); font-size: 12px; font-family: var(--font-data); }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .era { fill: var(--era); }
.chart .era.alt { fill: var(--era-alt); }
.chart .era-label { fill: var(--text-muted); font-size: 11px; font-family: var(--font-data); }
.chart .marker line { stroke: var(--text); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .marker text { fill: var(--text); font-family: var(--font-brand); font-size: 17px; letter-spacing: 0.03em; }
.chart .line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.gold-under { stroke: var(--gold-underlay); stroke-width: 7; }
.chart .line.gold { stroke: var(--gold-line); stroke-width: 3.5; }
.chart .line.dollar { stroke: var(--dollar); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .line.plain { stroke: var(--text); stroke-width: 2.5; }
.chart .scrub line { stroke: var(--text); stroke-width: 1; }
.chart .scrub circle { stroke: var(--ink); stroke-width: 2; }
.chart .scrub circle.gold { fill: var(--gold-fill); }
.chart .scrub circle.dollar { fill: var(--dollar); }
.chart .scrub circle.plain { fill: var(--text); }
.tip {
  position: absolute;
  top: 0;
  pointer-events: none;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--shadow);
  opacity: 0;
  transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip .d { color: var(--text-muted); font-size: 12px; }
.tip .g { color: var(--gold-text); font-weight: 700; }
.tip .u { color: var(--dollar); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 26px; height: 0; border-top: 4px solid; }
.legend i.gold { border-color: var(--gold-fill); box-shadow: 0 0 0 1.5px var(--ink); }
.legend i.dollar { border-top: 3px dashed var(--dollar); }
.legend i.plain { border-color: var(--text); }

figcaption.source { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
figcaption.source a { color: var(--text-muted); }

.noscript { padding: 16px; background: var(--surface); border-radius: 8px; }

/* ---------------------------------------------------------------- calculator */

.calc {
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 24px var(--gutter);
  max-width: 640px;
}
.calc form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; flex: 1 1 140px; }
.calc input {
  font: inherit;
  font-size: 20px;
  min-height: 48px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--text);
  border-radius: 10px;
  width: 100%;
}
.calc output { display: block; margin-top: 20px; }
.calc .result { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.calc .result li { font-size: 17px; }
.calc .result strong { font-size: 22px; }
.calc .result .g { color: var(--gold-text); }
.calc .result .u { color: var(--dollar); }
.calc .fine { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------------------------------------------------------------- app */

.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin: 32px 0 8px; }
.phone {
  width: 250px;
  border: 6px solid var(--ink);
  border-radius: 38px;
  padding: 18px 14px 22px;
  box-shadow: 8px 8px 0 var(--pop-orange);
  text-align: center;
  font-family: var(--font-data);
}
.phone.light { background: #ffffff; color: #111111; --pg: #8a6100; --pu: #0b7a3b; --pd: #c8102e; --pm: #5a5a5a; --pdiv: #e4e4e0; --psurf: #f2f1ec; }
.phone.dark { background: #0e0e10; color: #ffffff; --pg: #ffd60a; --pu: #7fe0a0; --pd: #ff7aa8; --pm: #b8b8c0; --pdiv: #26262c; --psurf: #1c1c20; box-shadow: 8px 8px 0 var(--pop-cyan); }
.phone .ph-head { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-brand); font-size: 18px; letter-spacing: 0.03em; }
.phone .ph-head img { width: 22px; height: 22px; }
.phone .pill {
  display: inline-block;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #111111;
  background: #ffd60a;
  border: 2px solid #111111;
  border-radius: 999px;
  padding: 2px 10px;
}
.phone .ph-title { font-family: var(--font-brand); font-size: 26px; letter-spacing: 0.03em; margin: 4px 0 0; }
.phone .ph-drip { width: 54px; height: 10px; margin: 0 auto 6px; color: #18a558; display: block; }
.phone ul { list-style: none; margin: 0; padding: 0; }
.phone li { padding: 9px 0; border-top: 1px solid var(--pdiv); }
.phone .t { font-weight: 800; letter-spacing: 0.08em; font-size: 17px; }
.phone .v { color: var(--pg); font-weight: 700; font-size: 14px; }
.phone .c { font-size: 12px; }
.phone .c.up { color: var(--pu); }
.phone .c.down { color: var(--pd); }
.phone .asof { font-size: 10px; color: var(--pm); margin-top: 8px; }
.phones-note { text-align: center; font-size: 13px; color: var(--text-muted); }

.callout { text-align: center; margin: 24px auto 0; max-width: 46ch; font-size: 18px; }

.tiers { width: 100%; border-collapse: collapse; margin: 32px 0 12px; font-size: 16px; }
.tiers th, .tiers td { padding: 10px 8px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
.tiers thead th { font-family: var(--font-brand); font-weight: 400; font-size: 24px; letter-spacing: 0.03em; border-bottom: 3px solid var(--text); }
.tiers td:not(:first-child), .tiers th:not(:first-child) { text-align: center; width: 24%; }
.tiers .pro-head { color: var(--gold-text); }
.tiers .yes { color: var(--up); font-weight: 700; }
.tiers .no { color: var(--text-muted); }
.tip-jar { font-size: 17px; }

/* ---------------------------------------------------------------- footer */

footer { margin-top: 32px; padding: 40px 0 56px; background: var(--surface); border-top: 4px solid var(--text); }
footer h2 { font-size: 32px; margin-top: 0; }
.sources { margin: 0 0 24px; padding-left: 20px; font-size: 14px; }
.sources li { margin-bottom: 8px; }
.sources .lic { color: var(--text-muted); }
.disclaimer { font-weight: 700; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; list-style: none; }
.copy { color: var(--text-muted); font-size: 14px; }

/* ---------------------------------------------------------------- legal pages */

.page { max-width: 720px; margin: 0 auto; padding: 16px var(--gutter) 64px; }
.page h1 { font-family: var(--font-brand); font-weight: 400; letter-spacing: 0.02em; font-size: clamp(40px, 9vw, 64px); margin: 16px 0 8px; line-height: 1; }
.page h2 { font-size: 30px; margin-top: 32px; }
.page .meta { color: var(--text-muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
