/* Tokens mirror the app's src/ui.tsx: navy, red accent, cool greys on white. */
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/SchibstedGrotesk_400Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/SchibstedGrotesk_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/SchibstedGrotesk_700Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #fff; --ink: #0E1B2C; --primary: #1B2F4E; --primarySoft: #E6ECF4; --sky: #E9F1FC; --blue: #2747D6;
  --red: #C8372F; --redSoft: #FCEBEA; --green: #1F7A55; --greenSoft: #E3F1EA; --grey: #54627A; --surface: #F2F5F9; --line: #DFE5EE;
  --r: 16px; --rc: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 "Schibsted Grotesk", system-ui, -apple-system, sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 9; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Header + menu (details/summary: works without JS) */
header.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); z-index: 5; }
header.top .wrap { max-width: 1120px; display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { flex-shrink: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
nav.menu summary { list-style: none; cursor: pointer; padding: 10px 14px; border-radius: 12px; background: var(--surface); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
nav.menu summary::-webkit-details-marker { display: none; }
nav.menu ul { list-style: none; margin: 0; padding: 8px; position: absolute; right: 20px; top: 56px; background: #fff; border: 1px solid var(--line); border-radius: var(--rc); min-width: 220px; box-shadow: 0 8px 30px rgba(14,27,44,.12); }
nav.menu li a { display: block; padding: 12px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
nav.menu li a:hover { background: var(--surface); }
@media (min-width: 1000px) {
  nav.menu summary { display: none; }
  nav.menu ul { position: static; display: flex; border: 0; box-shadow: none; padding: 0; min-width: 0; gap: 2px; }
  nav.menu li a { padding: 8px 10px; font-size: 15px; white-space: nowrap; }
}

/* Typography */
main { padding: 24px 0 48px; }
h1, h2, h3, .big { font-family: Fraunces, Georgia, serif; font-weight: 600; }
h1 { font-size: 32px; line-height: 1.15; margin: 8px 0 16px; letter-spacing: -.01em; }
h2 { font-size: 23px; line-height: 1.25; margin: 36px 0 10px; }
h3 { font-size: 19px; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: 19px; color: var(--grey); }
.meta { color: var(--grey); font-size: 14px; }
.crumbs { font-size: 14px; color: var(--grey); margin-bottom: 4px; }
.crumbs a { color: var(--grey); }
@media (min-width: 700px) { h1 { font-size: 42px; } h2 { font-size: 26px; } }

/* Blocks */
.hero { padding: 16px 0 8px; }
.hero h1 { font-size: 36px; }
@media (min-width: 700px) { .hero h1 { font-size: 52px; } }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: var(--r); font-weight: 600; text-decoration: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--blue); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--ink); }
.btn.secondary:hover { background: var(--line); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 16px 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: block; background: var(--surface); border-radius: var(--rc); padding: 18px; color: var(--ink); text-decoration: none; }
a.card:hover { background: var(--primarySoft); color: var(--ink); }
.card strong { display: block; font-size: 17px; margin-bottom: 4px; }
.card span { color: var(--grey); font-size: 15px; line-height: 1.45; display: block; }
.box { background: var(--primarySoft); border-radius: var(--rc); padding: 18px 20px; margin: 20px 0; }
.box > :last-child { margin-bottom: 0; }
.box.cta { background: var(--primary); color: #fff; }
.box.cta a:not(.btn) { color: #fff; }
.box.cta .btn.primary { background: #fff; color: var(--ink); }
.tldr { border-left: 4px solid var(--red); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 16px 0 24px; }
.tldr > :last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--surface); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details.faq { background: var(--surface); border-radius: var(--r); margin: 8px 0; }
details.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; min-height: 44px; }
details.faq > div { padding: 0 18px 14px; }
dl.terms dt { font-weight: 700; margin-top: 18px; }
dl.terms dd { margin: 2px 0 0; color: var(--ink); }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.letters a { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; background: var(--surface); border-radius: 10px; text-decoration: none; font-weight: 600; }
input[type=date], input[type=number], input[type=search], select { font: inherit; min-height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; }
label { font-weight: 600; display: block; margin: 14px 0 6px; font-size: 15px; }

/* Quiz */
.quiz .opts { display: grid; gap: 10px; margin: 16px 0; }
.quiz .opt { text-align: left; min-height: 52px; padding: 12px 16px; border-radius: var(--r); border: 2px solid transparent; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.quiz .opt:hover:not(:disabled) { background: var(--primarySoft); }
.quiz .opt.right { background: var(--greenSoft); border-color: var(--green); }
.quiz .opt.wrong { background: var(--redSoft); border-color: var(--red); }
.quiz .bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.quiz .bar i { display: block; height: 100%; background: var(--red); transition: width .25s ease-out; }
.quiz .q { font-size: 21px; font-weight: 600; line-height: 1.35; margin: 16px 0 0; }
.quiz .why { background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.big { font-size: 56px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

footer.bottom { background: var(--surface); padding: 32px 0 40px; font-size: 15px; color: var(--grey); }
footer.bottom ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
footer.bottom a { color: var(--ink); display: inline-block; padding: 6px 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* iPhone mockup: three app screens that cross-fade (12 s loop, 4 s each). */
.hero-grid { display: grid; gap: 8px; }
@media (min-width: 760px) { .hero-grid { grid-template-columns: 1fr 250px; align-items: center; gap: 32px; } }
.phone { position: relative; width: min(250px, 68vw); aspect-ratio: 553 / 1200; margin: 8px auto 24px; padding: 9px; border-radius: 46px; background: #0E1B2C; box-shadow: 0 0 0 2px #2B3A52, 0 24px 60px rgba(14,27,44,.28); }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%); border-radius: 12px; background: #0E1B2C; z-index: 2; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #F8F9FB; }
/* Captures have no status bar, so leave room under the Dynamic Island. */
.phone img { position: absolute; left: 0; top: 7%; width: 100%; height: 93%; object-fit: contain; object-position: top center; opacity: 0; animation: shot 12s ease-in-out infinite; }
/* Negative start so the first screen is already showing on load. */
.phone img:nth-child(1) { animation-delay: -0.6s; }
.phone img:nth-child(2) { animation-delay: 3.4s; }
.phone img:nth-child(3) { animation-delay: 7.4s; }
@keyframes shot { 0% { opacity: 0; transform: scale(1.03); } 5%, 33% { opacity: 1; transform: none; } 38%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .phone img { animation: none; } .phone img:first-child { opacity: 1; } }
