:root {
  color-scheme: dark;
  --ink: #f8f5ed;
  --muted: #aaa9b3;
  --panel: rgba(24, 26, 38, 0.88);
  --panel-2: #11131d;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #ffb547;
  --gold-2: #ffe08a;
  --orange: #ff7048;
  --mint: #65e6c4;
  --danger: #ff7187;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 181, 71, 0.14), transparent 28rem),
    radial-gradient(circle at 90% 28%, rgba(83, 100, 255, 0.13), transparent 30rem),
    #0b0c12;
  line-height: 1.6;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: var(--gold-2); }
a:hover { color: #fff0b8; }
.wrap { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 99; padding: 10px 16px; background: white; color: black; }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(11, 12, 18, 0.77);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav-links a:hover { color: var(--ink); }

.hero { padding: 76px 0 34px; text-align: center; }
.eyebrow { margin: 0 0 13px; color: var(--gold); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0 auto; font-size: clamp(2.7rem, 7vw, 5.8rem); line-height: 0.96; letter-spacing: -0.075em; }
.lede { max-width: 690px; margin: 24px auto 0; color: var(--muted); font-size: clamp(1rem, 2.3vw, 1.22rem); }
.trust-row { margin-top: 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.trust-row span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #d6d3ca; background: rgba(255,255,255,.035); font-size: 0.8rem; }

.tool-shell { padding: 24px 0 72px; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.counter-panel { padding: clamp(22px, 4vw, 42px); position: relative; overflow: hidden; }
.counter-panel::before { content: ""; position: absolute; inset: -30% auto auto 48%; width: 340px; height: 340px; border-radius: 50%; background: rgba(255, 181, 71, .09); filter: blur(35px); pointer-events: none; }
.panel-kicker { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; }
.status-dot { width: 8px; height: 8px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.count { margin: 18px 0 4px; font: 900 clamp(5rem, 17vw, 10rem)/.9 ui-rounded, "Arial Rounded MT Bold", system-ui; letter-spacing: -.07em; color: var(--gold-2); text-shadow: 0 8px 34px rgba(255,181,71,.12); }
.count-label { color: var(--muted); }
.tap-button { width: 100%; min-height: 88px; margin-top: 28px; border: 0; border-radius: 22px; background: linear-gradient(135deg, #ffd66b, #ff8b45); color: #2c1609; font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 950; cursor: pointer; box-shadow: 0 14px 38px rgba(255, 139, 69, .22); transition: transform .12s ease, filter .12s ease; }
.tap-button:hover { filter: brightness(1.05); }
.tap-button:active { transform: scale(.985); }
.quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 12px; }
.quick-actions button, .ghost-button, .mode-button { border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.045); cursor: pointer; }
.quick-actions button { min-height: 44px; font-weight: 800; }
.quick-actions button:hover, .ghost-button:hover, .mode-button:hover { background: rgba(255,255,255,.085); }
.session-bar { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.session-bar strong { display: block; color: var(--ink); font-size: 1.2rem; }
.danger-link { align-self: center; border: 0; background: none; color: var(--danger); cursor: pointer; }

.odds-panel { padding: 24px; display: flex; flex-direction: column; }
.odds-panel h2 { margin: 0; font-size: 1.25rem; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 18px 0; }
.mode-button { min-height: 42px; color: var(--muted); font-size: .82rem; font-weight: 800; }
.mode-button[aria-pressed="true"] { border-color: rgba(255,181,71,.55); background: rgba(255,181,71,.13); color: var(--gold-2); }
.odds-big { margin: 7px 0 0; font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 950; letter-spacing: -.06em; }
.odds-copy { color: var(--muted); font-size: .9rem; }
.progress { height: 10px; margin: 16px 0; border-radius: 20px; background: #090a0f; overflow: hidden; }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--gold-2)); transition: width .25s ease; }
.stat-list { display: grid; gap: 10px; margin-top: 6px; }
.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.stat-row strong { color: var(--ink); text-align: right; }
.goal-form { margin-top: auto; padding-top: 18px; }
.goal-form label { color: var(--muted); font-size: .82rem; }
.goal-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 7px; }
.goal-line input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0c0e16; color: var(--ink); padding: 10px 12px; }
.goal-line button { padding: 0 14px; }
.goal-result { min-height: 25px; margin: 10px 0 0; color: var(--gold-2); font-size: .87rem; }

.data-tools { margin-top: 18px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.data-tools p { margin: 0; color: var(--muted); font-size: .88rem; }
.data-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ghost-button { padding: 9px 13px; }

.content-section { padding: 74px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 720px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.section-heading p { color: var(--muted); }
.three-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.info-card { padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.025); }
.info-card b { display: block; margin-bottom: 7px; color: var(--gold-2); font-size: 1.05rem; }
.info-card p { margin: 0; color: var(--muted); }
.formula-card { margin-top: 26px; padding: 24px; border-left: 3px solid var(--gold); background: rgba(255,181,71,.06); border-radius: 0 18px 18px 0; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-2); word-break: break-word; }
.odds-table { width: 100%; margin-top: 28px; border-collapse: collapse; overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.025); }
.odds-table th, .odds-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.odds-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.odds-table tr:last-child td { border: 0; }

.faq-list { display: grid; gap: 10px; margin-top: 26px; }
details { border: 1px solid var(--line); border-radius: 16px; padding: 0 18px; background: rgba(255,255,255,.025); }
summary { padding: 17px 0; cursor: pointer; font-weight: 800; }
details p { margin-top: 0; color: var(--muted); }
.site-footer { padding: 42px 0 54px; color: var(--muted); font-size: .84rem; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.footer-row p { max-width: 700px; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.footer-links a { white-space: nowrap; }

.page-hero { padding: 68px 0 34px; }
.page-hero h1 { margin: 0; max-width: 860px; font-size: clamp(2.4rem, 6vw, 4.8rem); }
.page-hero .lede { margin-left: 0; margin-right: 0; }
.breadcrumbs { margin-bottom: 18px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--muted); }
.article-shell { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 82px; }
.article-shell h2 { margin-top: 42px; line-height: 1.18; letter-spacing: -.025em; }
.article-shell h3 { margin-top: 28px; }
.article-shell p, .article-shell li { color: #c6c4ca; }
.article-shell li + li { margin-top: 8px; }
.article-shell .panel { padding: clamp(20px, 4vw, 34px); }
.tool-page-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(270px, .9fr); gap: 18px; margin: 22px 0 36px; }
.calculator-form { padding: clamp(20px, 4vw, 32px); }
.calculator-form h2 { margin: 0 0 20px; }
.field-grid { display: grid; gap: 14px; }
.field-grid label { display: grid; gap: 6px; color: var(--muted); font-size: .88rem; }
.field-grid input, .field-grid select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0c0e16; color: var(--ink); padding: 11px 12px; }
.primary-button { min-height: 48px; border: 0; border-radius: 13px; background: linear-gradient(135deg, #ffd66b, #ff8b45); color: #2c1609; font-weight: 900; cursor: pointer; }
.result-panel { padding: clamp(20px, 4vw, 32px); display: flex; flex-direction: column; justify-content: center; }
.result-label { color: var(--muted); font-size: .85rem; }
.result-value { margin: 5px 0; color: var(--gold-2); font-size: clamp(2.25rem, 7vw, 4.4rem); font-weight: 950; letter-spacing: -.055em; }
.result-detail { margin: 0; color: var(--muted); }
.tool-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.tool-link { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); color: var(--ink); text-decoration: none; }
.tool-link:hover { color: var(--ink); background: rgba(255,255,255,.055); }
.tool-link strong { display: block; color: var(--gold-2); }
.tool-link span { display: block; margin-top: 5px; color: var(--muted); font-size: .88rem; }
.legal-note { padding: 18px 20px; border-left: 3px solid var(--gold); background: rgba(255,181,71,.06); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 25px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: #f7f0dc; color: #23170d; font-weight: 800; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .tool-grid { grid-template-columns: 1fr; }
  .three-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .data-tools, .footer-row { align-items: stretch; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .tool-page-grid { grid-template-columns: 1fr; }
  .tool-links { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wrap { width: min(100% - 20px, 1160px); }
  .hero { padding-top: 52px; }
  .panel { border-radius: 21px; }
  .counter-panel, .odds-panel { padding: 18px; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .quick-actions button:last-child { grid-column: span 2; }
  .session-bar { font-size: .85rem; }
  .odds-table th, .odds-table td { padding: 11px 9px; font-size: .82rem; }
}

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