:root {
  --anil: #2335f5;
  --anil-deep: #1626b8;
  --faixa: #ffd21f;
  --chiclete: #ff4fa3;
  --ink: #0e1352;

  --bg: #f2f3fa;
  --surface: #ffffff;
  --text: #0e1352;
  --text-2: #3b4177;
  --muted: #5d628f;
  --border: #dcdef0;
  --grid: #eceef8;
  --accent: #2335f5;
  --accent-hover: #1626b8;
  --accent-soft: #d9ddff;
  --good: #0e7a45;
  --bad: #c8233a;
  --warn: #7a5200;
  --warn-soft: #fff1bf;
  --heading: #2335f5;
  --line-strong: #0e1352;
  --shadow-ink: #0e1352;
  --focus: #2335f5;
  --brand-pink: #c8126f;
  --band: #ffd21f;

  --display: "Bungee", "Arial Black", sans-serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e2e;
    --surface: #141a45;
    --text: #eef0ff;
    --text-2: #c9cdf2;
    --muted: #a3a8d6;
    --border: #262d68;
    --grid: #1c2356;
    --accent: #7380ff;
    --accent-hover: #a2abff;
    --accent-soft: #2a3480;
    --good: #4fd08d;
    --bad: #ff7a8a;
    --warn: #ffd21f;
    --warn-soft: #3a3210;
    --heading: #9aa4ff;
    --line-strong: #c9cdf2;
    --shadow-ink: #5a66e6;
    --focus: #ffd21f;
    --brand-pink: #ff4fa3;
    --band: #e0b400;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0e2e;
  --surface: #141a45;
  --text: #eef0ff;
  --text-2: #c9cdf2;
  --muted: #a3a8d6;
  --border: #262d68;
  --grid: #1c2356;
  --accent: #7380ff;
  --accent-hover: #a2abff;
  --accent-soft: #2a3480;
  --good: #4fd08d;
  --bad: #ff7a8a;
  --warn: #ffd21f;
  --warn-soft: #3a3210;
  --heading: #9aa4ff;
  --line-strong: #c9cdf2;
  --shadow-ink: #5a66e6;
  --focus: #ffd21f;
  --brand-pink: #ff4fa3;
  --band: #e0b400;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 17px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero, .anon-banner, .first-run, .signup-aside, .sticky-cta, body.landing .nav { --focus: var(--faixa); }

input, select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  height: 38px;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
input[type="checkbox"] { height: auto; accent-color: var(--accent); width: 16px; height: 16px; }

select {
  appearance: none;
  cursor: pointer;
  font-weight: 600;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select:hover { border-color: var(--accent); }

@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: inline-flex; align-items: center; gap: 10px; padding-right: 12px; background-image: none; }
  select::picker-icon {
    content: ""; width: 6px; height: 6px; margin: -3px 2px 0 auto;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform 0.15s ease, margin 0.15s ease;
  }
  select:open { border-color: var(--accent); }
  select:open::picker-icon { transform: rotate(225deg); margin-top: 3px; }
  ::picker(select) {
    margin-top: 4px; padding: 4px; max-height: 320px; min-width: anchor-size(width);
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
    background: var(--surface); color: var(--text);
    border: 1.5px solid var(--line-strong); border-radius: 12px; box-shadow: 4px 4px 0 var(--shadow-ink);
  }
  option { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
  option:hover, option:focus-visible { background: var(--faixa); color: var(--ink); outline: none; }
  option:checked { font-weight: 800; }
  option::checkmark { order: 1; margin-left: auto; color: var(--accent); }
  option:hover::checkmark, option:focus-visible::checkmark { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  select::picker-icon { transition: none; }
}

:where(button, input[type="submit"]), .button, .link-button { font: inherit; cursor: pointer; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px; text-decoration: none; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
}
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.pop {
  background: var(--faixa); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow-ink); transition: transform .08s, box-shadow .08s;
}
.button.pop:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-ink); }
.button.pop:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
.button.ink { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.button.ink:hover { background: var(--anil); border-color: var(--anil); }
.button.big { height: 52px; padding: 0 24px; font-size: 17px; border-radius: 12px; }
.button.small { height: 28px; padding: 0 10px; font-size: 12px; margin-top: 6px; border-radius: 8px; }
.button.small.pop { box-shadow: 2px 2px 0 var(--shadow-ink); border-width: 1.5px; }
.link-button { border: 0; background: transparent; color: var(--text-2); padding: 0; }
.link-button:hover { color: var(--text); }
.link-button.danger { color: var(--bad); margin-top: 16px; }

.nav { background: var(--surface); border-bottom: 1.5px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand { display: inline-flex; color: var(--text); text-decoration: none; margin-right: auto; --logo-accent: var(--brand-pink); }
.brand .logo { height: 34px; width: auto; display: block; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.nav-links form { display: inline; }
.nav-link { color: var(--text-2); text-decoration: none; font-weight: 600; }
.nav-link.active, .nav-link:hover { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--chiclete); }
.credits-pill { background: var(--faixa); color: var(--ink); border-radius: 999px; padding: 4px 12px; text-decoration: none; font-weight: 700; font-size: 13px; }

.flash-area { max-width: 1200px; margin: 0 auto; padding: 12px 16px 0; }
.flash-area:empty { display: none; }
.flash { margin: 0 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; }
.flash.alert { background: var(--warn-soft); }

main.narrow, main.page { max-width: 1200px; margin: 0 auto; padding: 28px 16px 40px; }
main.narrow { max-width: 480px; }
main.prose { max-width: 720px; }
.prose h2 { margin-top: 28px; font-size: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 4px; }
.page-head h1 { margin-right: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.stack label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.stack input:not([type="checkbox"]):not([type="submit"]), .stack select { width: 100%; }
.stack input[type="submit"] { align-self: flex-start; }
.errors { color: var(--bad); margin: 0; padding-left: 18px; }

.card { position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head .muted { margin-left: auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td.num { font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
td { font-size: 14px; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
td .sub, .facts .sub { display: block; color: var(--muted); font-size: 12px; }
td.mono { white-space: nowrap; }
th.num, td.num { text-align: right; }
td.small { font-size: 12px; max-width: 260px; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 4px; background: var(--grid); color: var(--text-2); white-space: nowrap; }
.badge.ok { color: var(--good); }
.badge.off { color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.tag { font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 0 5px; margin-left: 4px; color: var(--text-2); }
.status-ok { color: var(--good); font-weight: 600; }
.status-off { color: var(--bad); font-weight: 600; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 18px 0 22px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
code { font-size: 12px; background: var(--grid); padding: 2px 5px; border-radius: 5px; word-break: break-all; }
.hero-number { font-family: var(--display); font-size: 56px; margin: 8px 0; color: var(--accent); }
.hero-number .muted { font-family: var(--body); font-size: 16px; font-weight: 600; }

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }
.pager button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); }
.pager button:disabled { opacity: .4; cursor: default; }

.footer { max-width: 1200px; margin: 32px auto 0; padding: 20px 16px 32px; display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1.5px solid var(--border); font-size: 13px; }

@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

td.nowrap { white-space: nowrap; }
.empty-row { color: var(--muted); padding: 28px 10px; text-align: center; }
.lede { font-size: 17px; color: var(--text-2); max-width: 46em; margin: 6px 0 20px; }
.inline-form { display: inline-flex; }
.inline-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

.empty-state {
  background: var(--surface); border: 1.5px dashed var(--border); border-radius: 18px;
  padding: 40px 24px; text-align: center;
}
.empty-state h2 { font-size: 22px; color: var(--heading); margin-bottom: 8px; }
.empty-state p { max-width: 34em; margin: 0 auto 18px; color: var(--text-2); }

main.signup {
  max-width: 1040px; margin: 0 auto; padding: 36px 16px 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start;
}
.signup-form .stack input[type="submit"] { align-self: stretch; }
.signup-aside { background: var(--anil); color: #fff; border-radius: 20px; padding: 26px; }
.signup-aside-title { margin: 0 0 14px; font-weight: 700; color: #dfe3ff; }
.sample-lead {
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px;
  padding: 18px; box-shadow: 5px 5px 0 var(--faixa); transform: rotate(-1deg);
}
.sample-lead p { margin: 0; }
.sample-name { font-family: var(--display); font-size: 20px; }
.sample-meta { color: #5d628f; font-size: 14px; margin-bottom: 12px !important; }
.sample-lead dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.sample-lead dt { color: #5d628f; font-weight: 700; }
.sample-lead dd { margin: 0; overflow-wrap: anywhere; }
.sample-lead .badge.ok { background: #e3f6ec; color: #0e7a45; }
.sample-note { font-size: 12px; color: #5d628f; margin-top: 10px !important; }
.signup-points { margin: 22px 0 0; padding-left: 18px; display: grid; gap: 6px; color: #e7eaff; }

@media (max-width: 820px) {
  main.signup { grid-template-columns: 1fr; gap: 28px; }
}

.more-credits {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  background: var(--warn-soft); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px;
}
.more-credits h2 { font-size: 18px; margin-bottom: 4px; }
.more-credits p { margin: 0; color: var(--text-2); }
.empty-state { margin-top: 16px; }

.ac-wrap { position: relative; display: block; }
.ac-wrap input { width: 100%; }
.ac-list {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px;
  list-style: none; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--shadow-ink); max-height: 280px; overflow-y: auto;
}
.ac-list li { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text); }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--faixa); color: var(--ink); }

.pricing-head { max-width: 760px; }
.pricing-head h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.02; text-wrap: balance; }
.pricing-head .button { margin-top: 4px; }
.pricing-status { margin: 28px 0 22px; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); font-weight: 600; max-width: 760px; }

.plans { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; align-items: start; }
.plan {
  position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: 26px 22px 22px;
}
.plan.featured { border: 2px solid var(--line-strong); box-shadow: 6px 6px 0 var(--faixa); padding-top: 40px; }
.plan-ribbon {
  position: absolute; top: -14px; left: 18px; margin: 0; padding: 6px 30px 6px 18px;
  background: var(--chiclete); color: var(--ink); font-weight: 800; font-size: 13px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%); transform: rotate(-2deg);
}
.plan h2 { font-size: 24px; }
.plan-price { font-family: var(--display); font-size: 52px; line-height: 1; margin: 12px 0 8px; color: var(--heading); }
.plan-currency { font-size: 22px; margin-right: 4px; vertical-align: 0.9em; }
.plan-period { font-family: var(--body); font-size: 16px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.plan-pitch { color: var(--text-2); margin: 0 0 14px; }
.plan ul { margin: 0 0 20px; padding-left: 18px; display: grid; gap: 6px; }
.plan-form { display: grid; gap: 8px; }
.plan-form input[type="email"] { width: 100%; }
.plan-form .button { width: 100%; }
.plan-joined { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-weight: 700; text-align: center; }

.pricing-faq { margin-top: 48px; max-width: 900px; }
.pricing-faq h2 { font-size: 24px; margin-bottom: 14px; }
.pricing-faq dl { margin: 0; display: grid; gap: 18px; }
.pricing-faq dt { font-weight: 800; }
.pricing-faq dd { margin: 4px 0 0; color: var(--text-2); }

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
}
.signup-points a { color: #fff; font-weight: 700; }

@media (max-width: 720px) {
  input, select { font-size: 16px; }
  .button.small { min-height: 40px; }
  .nav-inner { flex-wrap: nowrap; gap: 10px; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 14px; padding-bottom: 2px; }
  .nav-links > * { flex: none; }
  .brand .logo { height: 28px; }
}
.chip button { min-width: 28px; min-height: 28px; }

.return-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-weight: 600; color: var(--text); }
.field-error { color: var(--bad); font-weight: 700; font-size: 13px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 84px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 10px;
  border: 0; border-radius: 8px; background: var(--grid); color: var(--text); font-weight: 700; font-size: 13px;
}

.mascot { display: block; width: 120px; height: auto; margin: 0 auto 12px; color: var(--text); }
