:root {
  color-scheme: dark;
  --bg: #07110e;
  --bg-soft: #0a1713;
  --panel: #10211b;
  --panel-2: #142a22;
  --line: rgba(196, 238, 220, 0.12);
  --text: #f3f8f5;
  --muted: #96aaa1;
  --green: #58e6a9;
  --green-dark: #0f7c56;
  --cream: #e8dfc4;
  --danger: #ff8d82;
  --warning: #f0c36d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  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-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 10%, rgba(34, 141, 99, 0.15), transparent 30rem),
    radial-gradient(circle at 5% 45%, rgba(232, 223, 196, 0.05), transparent 26rem),
    var(--bg);
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 14, 0.86);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(88, 230, 169, 0.42);
  border-radius: 22px;
  color: var(--green);
  background: linear-gradient(145deg, rgba(88, 230, 169, 0.12), rgba(88, 230, 169, 0.02));
  box-shadow: inset 0 0 0 7px rgba(88, 230, 169, 0.03);
  font-family: Georgia, serif;
  font-size: 34px;
  font-style: italic;
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 13px; font-size: 21px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.provider-pill, .test-label {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
}
.icon-button, .text-button, .dialog-close {
  border: 0;
  color: var(--muted);
  background: transparent;
}
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 64px;
  align-items: center;
  min-height: 610px;
  padding: 70px 0;
}
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 7vw, 86px); font-weight: 400; line-height: 0.98; letter-spacing: -0.045em; }
h1 em { color: var(--green); font-weight: 400; }
h2 { margin-bottom: 8px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.035em; }
.hero-copy { max-width: 600px; color: var(--muted); font-size: 19px; line-height: 1.65; }

.action-card {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(88, 230, 169, 0.2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(20, 42, 34, 0.98), rgba(11, 27, 22, 0.98));
  box-shadow: var(--shadow);
}
.action-card::after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 260px; height: 260px; border-radius: 50%; background: rgba(88, 230, 169, 0.07); filter: blur(8px); }
.action-card > * { position: relative; z-index: 1; }
.action-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #06110d; background: var(--green); font-size: 25px; font-weight: 900; }
.capture .action-icon { color: var(--danger); background: rgba(255, 141, 130, 0.12); border: 1px solid rgba(255, 141, 130, 0.28); }
.capture.recording .action-icon { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(255, 141, 130, 0.06); } }
.action-kicker { margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.action-card h2 { margin: 0 0 5px; font-size: 28px; }
.action-card p { margin-bottom: 0; color: var(--muted); }
.button { min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--panel-2); font-weight: 750; }
.button.primary { border-color: transparent; color: #07110e; background: var(--green); box-shadow: 0 12px 34px rgba(88, 230, 169, 0.13); }
.button.primary:hover { background: #7ceebb; transform: translateY(-1px); }
.button.full { width: 100%; }
.consent-row { display: flex; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.consent-row input { accent-color: var(--green); }
.compliance-note { font-size: 12px; }
.progress-track, .usage-track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,0.07); }
.progress-track span, .usage-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.progress-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }

.metrics-section, .sessions-section, .pricing-section { padding: 70px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 0; }
.text-button { color: var(--green); font-weight: 700; }
.metrics-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; }
.metric-card { min-height: 158px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(16, 33, 27, 0.7); }
.metric-card.featured { border-color: rgba(88, 230, 169, 0.25); background: linear-gradient(145deg, rgba(17, 55, 42, .9), rgba(13, 37, 30, .8)); }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card strong { display: block; margin: 16px 0 9px; font-family: Georgia, serif; font-size: 36px; font-weight: 400; }
.positive { color: var(--green) !important; }
.negative { color: var(--danger) !important; }

.stats-section { padding: 0 0 8px; display: grid; gap: 18px; }
.stats-warning { align-self: center; padding: 7px 13px; border: 1px solid rgba(240, 195, 109, .35); border-radius: 999px; color: var(--warning); font-size: 12px; font-weight: 700; }
.bankroll-chart { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(16, 33, 27, 0.7); }
.bankroll-chart svg { display: block; width: 100%; height: auto; }
.bankroll-chart .grid { stroke: rgba(196, 238, 220, 0.08); stroke-width: 1; }
.bankroll-chart .zero { stroke: rgba(196, 238, 220, 0.28); stroke-width: 1; stroke-dasharray: 4 4; }
.bankroll-chart .axis { fill: var(--muted); font-size: 11px; }
.bankroll-chart .line-positive { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; }
.bankroll-chart .line-negative { fill: none; stroke: var(--danger); stroke-width: 2.5; stroke-linejoin: round; }
.bankroll-chart .area-positive { fill: rgba(88, 230, 169, 0.12); stroke: none; }
.bankroll-chart .area-negative { fill: rgba(255, 141, 130, 0.12); stroke: none; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stats-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(16, 33, 27, 0.7); }
.stats-card span, .stats-card small { display: block; color: var(--muted); font-size: 13px; }
.stats-card strong { display: block; margin: 12px 0 7px; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }

.breakdowns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.breakdowns h3 { margin: 0 0 11px; font-size: 15px; }
.breakdown-table { display: grid; gap: 7px; }
.breakdown-row { display: grid; grid-template-columns: .7fr 1fr .6fr .9fr; gap: 12px; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 33, 27, .62); font-size: 13px; }
.breakdown-row span { color: var(--muted); }
.breakdown-row strong:last-child { text-align: right; }

.usage-card { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 35px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: rgba(232, 223, 196, 0.045); }
.usage-card h2 { margin: 0; font-size: 25px; }
.usage-item > div:first-child { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.usage-item strong { color: var(--text); }
.usage-message { max-width: 34ch; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.usage-actions { display: grid; gap: 9px; }

.sessions-list { display: grid; gap: 10px; }
.session-row { display: grid; grid-template-columns: 1.5fr .7fr .7fr .7fr auto; gap: 15px; align-items: center; min-height: 82px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 18px; color: inherit; background: rgba(16, 33, 27, .62); text-align: left; }
.session-row:hover { border-color: rgba(88, 230, 169, .3); background: rgba(20, 42, 34, .78); }
.session-row strong, .session-row span { display: block; }
.session-row .sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.status { display: inline-flex !important; width: fit-content; padding: 6px 9px; border-radius: 999px; color: var(--warning); background: rgba(240, 195, 109, .08); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.status.completed { color: var(--green); background: rgba(88, 230, 169, .08); }
.status.failed { color: var(--danger); background: rgba(255, 141, 130, .08); }
.empty-state { padding: 65px 20px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); text-align: center; }
.empty-state > span { display: block; margin-bottom: 15px; color: var(--green); font-size: 30px; }
.empty-state h3 { color: var(--text); }

.pricing-heading { align-items: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.price-card { position: relative; min-height: 330px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: rgba(16, 33, 27, .62); }
.price-card.popular { border-color: rgba(88, 230, 169, .36); background: linear-gradient(160deg, rgba(20, 54, 42, .95), rgba(15, 35, 28, .9)); }
.popular-tag { position: absolute; top: 15px; right: 15px; color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.price-card > p { color: var(--green); font-weight: 750; }
.price-card h3 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.price-card h3 small { color: var(--muted); font-family: inherit; font-size: 15px; }
.price-card > span { color: var(--muted); font-size: 13px; }
.price-card ul { margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); }
.price-card li { padding: 10px 0; border-top: 1px solid var(--line); }
.price-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 24px; }
.price-actions .button:last-child { grid-column: 1 / -1; }

footer { display: flex; justify-content: space-between; gap: 30px; width: min(1180px, calc(100% - 40px)); margin: 30px auto 0; padding: 35px 0 max(35px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.login-shell { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 28px; background: rgba(16, 33, 27, .9); box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 30px; }
.login-card h1 { font-size: 46px; line-height: 1.02; }
.login-card h1 em { display: block; }
.muted { color: var(--muted); line-height: 1.6; }
.login-card form { display: grid; gap: 12px; margin-top: 30px; }
.login-card label { color: var(--muted); font-size: 12px; }
.login-card input { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(0,0,0,.15); outline: none; }
.login-card input:focus { border-color: var(--green); }
.form-error { min-height: 20px; color: var(--danger); font-size: 13px; }
.form-notice { min-height: 20px; margin-bottom: 0; color: var(--green); font-size: 13px; }
.auth-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.auth-links .text-button { padding: 5px 0; font-size: 12px; }
.oauth-options { display: grid; gap: 10px; margin-top: 22px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: var(--muted); }
.auth-divider span { flex: 1; height: 1px; background: var(--line); }
.button.social { display: grid; place-items: center; text-decoration: none; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 390px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
dialog { width: min(720px, calc(100% - 30px)); max-height: 85vh; overflow: auto; padding: 30px; border: 1px solid var(--line); border-radius: 24px; color: var(--text); background: #0c1b16; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 15px; right: 15px; font-size: 28px; }
.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 25px 0; }
.detail-metrics div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.detail-metrics span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.game-line { display: grid; grid-template-columns: 40px 1fr repeat(3, .7fr); gap: 10px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.game-line span { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 35px; min-height: auto; padding: 70px 0 35px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .usage-card { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  main { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 64px; padding: 0 14px; }
  .provider-pill { display: none; }
  .hero { padding-top: 48px; }
  h1 { font-size: 49px; }
  .hero-copy { font-size: 16px; }
  .action-card { padding: 23px; border-radius: 22px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stats-grid, .breakdowns { grid-template-columns: 1fr; }
  .breakdown-row { grid-template-columns: .8fr 1fr .8fr; }
  .breakdown-row span:nth-child(3) { display: none; }
  .metric-card { min-height: 135px; padding: 17px; }
  .metric-card strong { font-size: 28px; }
  .sessions-section, .metrics-section, .pricing-section { padding: 52px 0; }
  .session-row { grid-template-columns: 1fr auto; }
  .session-row .hide-mobile { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-actions { grid-template-columns: 1fr; }
  .price-actions .button:last-child { grid-column: auto; }
  .test-label { display: none; }
  footer { display: block; width: calc(100% - 28px); }
  .detail-metrics { grid-template-columns: 1fr; }
  .game-line { grid-template-columns: 28px 1fr 1fr; }
  .game-line .optional { display: none; }
}
