/*
  Daylight, the third 2026 look: the parts every page shares, all with the "t-" prefix. The design language is written up in
  content/DESIGN.md. A page reads like a day: a sky at the top with the sun on its real path over Melbourne, paper in the
  middle, dusk at the foot. Solar yellow is the one accent and is only ever a fill or the sun; text that needs its warmth
  uses ember.
*/

:root {
  /* colour: see content/DESIGN.md section 2 */
  --t-paper: #FAFBFA;
  --t-ink: #172033; --t-body: #222B3C; --t-muted: #566173; --t-line: #DDE3E8; --t-soft: #EEF2F4; --t-idle: #E6ECF0;
  --t-sky: #D5E3EE; --t-light: #EAF1F6; --t-night: #1F2D47;
  --t-sun: #F2A900; --t-sun-deep: #DB9600; --t-ember: #87500B; --t-gum: #356B50; --t-gum-dusk: #7FC69B; --t-alert: #B3261E;
  /* charts: section 7 */
  --t-chart-1: #172033; --t-chart-2: #F2A900; --t-chart-3: #356B50; --t-chart-4: #36628A; --t-chart-5: #87500B; --t-chart-grid: #DDE3E8;
  /* type: section 3. --t-data is for every number, stat and piece of small text */
  --t-sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-serif: 'Newsreader', Georgia, serif;
  --t-data: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --t-mono: var(--t-data);
  --t-hand: var(--t-serif);
  --t-figs: lining-nums tabular-nums;
  /* spacing: section 4, a 4px base */
  --t-s1: 4px; --t-s2: 8px; --t-s3: 12px; --t-s4: 16px; --t-s5: 24px; --t-s6: 32px; --t-s7: 48px; --t-s8: 64px; --t-s9: 96px; --t-s10: 128px;
  --t-ease: ease-out;
  /* layers: one fixed z-index scale (baseline-ui); nothing else uses a raw number */
  --t-z-under: -1; --t-z-base: 1; --t-z-raised: 2; --t-z-peek: 60; --t-z-pill: 70; --t-z-menu: 79; --t-z-bar: 80; --t-z-tip: 85; --t-z-tabbar: 90;
  --t-max: 1180px;
}

/* ---------- base for the redesigned pages: their content sits inside <main class="t-page"> ---------- */
body:has(.t-page) { margin: 0; background: var(--t-paper); color: var(--t-ink); font: 400 16.5px/1.6 var(--t-sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
.t-page *, .t-page *::before, .t-page *::after, .t-bar, .t-bar *, .t-menu, .t-menu * { box-sizing: border-box; }
:where(.t-page, .t-bar, .t-menu) a { color: inherit; text-decoration: none; }
:where(.t-page) img { max-width: 100%; height: auto; }
:where(.t-page) :where(h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl, dd) { margin: 0; }
.t-bar, .t-menu { font-family: var(--t-sans); -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 90px; }
.t-wrap { max-width: var(--t-max); margin: 0 auto; padding: 0 var(--t-s6); }
.t-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.t-page, .tf, .t-bar) :focus-visible { outline: 2px solid var(--t-ember); outline-offset: 3px; border-radius: 3px; }

/* ---------- small labels: sentence case, never capitals, in the data face ---------- */
.t-k { font-family: var(--t-data); font-size: 13.5px; letter-spacing: 0; text-transform: none; font-weight: 600; line-height: 1.35; font-variant-numeric: var(--t-figs); }
.t-mark { font-family: '3Dumb', var(--t-sans); font-size: 24px; line-height: 1; white-space: nowrap; }

/* ---------- buttons: round, outlined at rest; the main one is the sun ---------- */
.t-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--t-s2);
  font: 600 14px/1 var(--t-sans); letter-spacing: 0; text-transform: none; padding: 11px 18px; border-radius: 999px; border: 1.5px solid currentColor;
  background: transparent; color: var(--t-ink); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.t-btn::before { content: none; }
.t-btn:hover, .t-btn:focus-visible { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-paper); }
.t-btn.go { background: var(--t-sun); border-color: var(--t-sun); color: var(--t-ink); }
.t-btn.go:hover, .t-btn.go:focus-visible { background: var(--t-sun-deep); border-color: var(--t-sun-deep); color: var(--t-ink); }
.t-btn.on { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-paper); }
.t-btn.on-dark { color: #fff; border-color: rgba(255,255,255,.6); }
.t-btn.on-dark:hover { background: #fff; border-color: #fff; color: var(--t-ink); }
/* on a sky the light button turns back into the ordinary one */
:is(.t-dark, .t-light-grid) .t-btn.on-dark { color: var(--t-ink); border-color: currentColor; }
:is(.t-dark, .t-light-grid) .t-btn.on-dark:hover { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-paper); }
.t-btn.ico { width: 38px; height: 38px; padding: 0; }
.t-btn svg, .t-btn .icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t-btn small { opacity: .65; margin-left: 2px; font-size: inherit; }

/* ---------- the menu bar: a flush band of paper across the top ---------- */
.t-bar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--t-z-bar); display: flex; align-items: center; gap: 36px; height: 64px;
  padding: 0 max(var(--t-s6), calc((100% - var(--t-max)) / 2 + var(--t-s6)), env(safe-area-inset-right)); background: rgba(250,251,250,.9); color: var(--t-ink);
  padding-top: env(safe-area-inset-top); box-sizing: content-box;
  border-bottom: 1px solid rgba(23,32,51,.08); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.t-bar.dark { background: rgba(250,251,250,.9); color: var(--t-ink); }
.t-bar .t-mark { color: inherit; }
.t-bar nav { display: flex; gap: 26px; font: 500 15px var(--t-sans); margin-right: auto; }
.t-bar nav a { position: relative; padding: var(--t-s1) 0; }
.t-bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--t-sun); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--t-ease); }
.t-bar nav a:hover::after, .t-bar nav a[aria-current]::after { transform: none; }
.t-bar .t-tools { display: flex; gap: var(--t-s2); align-items: center; }
.t-bar .t-btn { padding: 9px var(--t-s4); }
.t-bar .t-btn.ico { padding: 0; border-color: transparent; }
.t-bar .t-btn.ico:hover { background: var(--t-idle); color: var(--t-ink); }
.t-burger { display: none; width: 40px; height: 40px; margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.t-burger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.t-menu { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 0; right: 0; z-index: var(--t-z-menu); background: var(--t-paper); border-bottom: 1px solid var(--t-line);
  padding: var(--t-s2) 20px 18px; display: grid; gap: 0; box-shadow: 0 24px 40px -24px rgba(23,32,51,.35); }
.t-menu[hidden] { display: none; }
.t-menu a { font: 700 26px var(--t-sans); letter-spacing: -.02em; padding: 10px 0; border-bottom: 1px solid var(--t-line); color: var(--t-ink); }
.t-menu a[aria-current] { color: var(--t-ember); }

/* ---------- headlines no longer type themselves in; the classes stay harmless if a page still uses them ---------- */
.t-w { display: inline; white-space: normal; }
.t-c, .t-c.on { opacity: 1; }
.t-c.lead { color: inherit; }

/* ---------- nothing waits to rise into place: the sun's climb is the page's one moment ---------- */
.t-rise, .t-fade, .t-rise.on, .t-fade.on { opacity: 1; transform: none; transition: none; }

/* ---------- section headings ---------- */
.t-sech { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 14px; margin-bottom: 30px; border-bottom: 2px solid var(--t-ink); }
.t-sech h2 { font: 800 40px/1.02 var(--t-sans); letter-spacing: -.03em; }
.t-sech p { color: var(--t-muted); max-width: 420px; line-height: 1.5; }

/* ---------- sky sections: the old dark heads are the midday sky, the old light ones a paler morning sky.
   The canvas carries the sun's path (t.js draws it) ---------- */
.t-dark { position: relative; background: var(--t-sky); color: var(--t-ink); overflow: hidden; }
.t-light-grid { position: relative; background: var(--t-light); color: var(--t-ink); overflow: hidden; }
.t-dark > canvas.t-circuit, .t-light-grid > canvas.t-circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.t-dark > *:not(canvas), .t-light-grid > *:not(canvas) { position: relative; }
/* where a sky meets the paper: a plain horizon, no notch */
.t-notch { display: none; }

/* ---------- the handwritten line ("Hey, it's Shawn") is now Newsreader italic with a sun-yellow stroke under it ---------- */
.t-hand { position: relative; display: inline-block; font: italic 400 52px/1.05 var(--t-serif); color: inherit; margin: 0 0 18px; }
.t-hand svg { display: block; width: 96%; height: 14px; margin-top: 2px; overflow: visible; }
.t-hand path { fill: none; stroke: var(--t-sun); stroke-width: 4; stroke-linecap: round; }

/* ---------- the live dot: gum green, still unless something is live ---------- */
.t-ping { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--t-gum); box-shadow: 0 0 0 3px rgba(53,107,80,.2); }

/* ---------- the footer (partials/t-footer.hbs): dusk under every page; .plain leaves the sign-up out ---------- */
.tf { position: relative; overflow: hidden; font-family: var(--t-sans); -webkit-font-smoothing: antialiased; background: var(--t-night); color: #F3F1EA;
  --tf-mut: rgba(243,241,234,.62); --tf-line: rgba(243,241,234,.16); --tf-field: rgba(243,241,234,.08); --tf-hi: var(--t-sun); }
.tf, .tf * { box-sizing: border-box; }
.tf { margin-top: 120px; }
.tf a { color: inherit; text-decoration: none; }
.tf :where(h2, h3, p) { margin: 0; }
.tf > canvas.t-circuit, .tf-tab { display: none; }
.tf > *:not(canvas) { position: relative; }
.tf > .tf-glow { position: absolute; }
/* the last of the sun, sinking below the footer's top edge */
.tf-glow { position: absolute; left: 0; right: 0; top: 0; height: 260px; pointer-events: none;
  background: radial-gradient(420px 150px at 78% 0%, rgba(242,169,0,.32), rgba(242,169,0,.08) 55%, transparent 75%); }
.tf-in { max-width: var(--t-max); margin: 0 auto; padding: 0 var(--t-s6); }
.tf .t-k { color: var(--tf-mut); }
.tf-sign { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--t-s5) var(--t-s8); align-items: end; padding: 110px 0 80px; }
.tf-sign > .t-k { grid-column: 1 / -1; color: var(--t-sun); }
.tf-sign h2 { grid-column: 1; font: 800 64px/.98 var(--t-sans); letter-spacing: -.035em; max-width: 640px; }
.tf-sign h2 em { font-style: normal; color: inherit; }
.tf-sign > p { grid-column: 1; color: var(--tf-mut); font-size: 17px; line-height: 1.6; max-width: 460px; }
.tf-sign .tf-form-wrap, .tf-sign .tf-signed { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
.tf-form { display: flex; gap: 6px; background: var(--tf-field); padding: 6px; border-radius: 999px; border: 1px solid var(--tf-line); }
.tf-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: 16px var(--t-data); padding: 0 14px; outline: none; color: inherit; }
.tf-form input::placeholder { color: var(--tf-mut); }
.tf-form:focus-within { border-color: var(--t-sun); }
.tf-ok, .tf-err { display: none; margin-top: var(--t-s3); font: 14px var(--t-data); color: var(--tf-mut); }
.tf-form-wrap.success .tf-ok, .tf-form-wrap.error .tf-err { display: block; }
.tf-form-wrap.success .tf-form { display: none; }
.tf-form-wrap.loading .t-btn { opacity: .6; pointer-events: none; }
.tf-signed { color: var(--tf-mut); }
.tf-signed a { text-decoration: underline; text-decoration-color: var(--t-sun); text-decoration-thickness: 2px; text-underline-offset: 3px; color: inherit; }
.tf.plain .tf-sign { display: none; }
.tf.plain .tf-cols { border-top: 0; padding-top: 90px; }
.tf-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding: 52px 0 60px; border-top: 1px solid var(--tf-line); }
.tf-brand .t-mark { font-size: 34px; display: inline-block; }
.tf-brand p { color: var(--tf-mut); margin-top: 18px; max-width: 280px; line-height: 1.55; font-size: 15px; }
.tf-col h3 { margin-bottom: 14px; }
.tf-col a.l { position: relative; display: table; font: 600 20px/1.25 var(--t-sans); letter-spacing: -.01em; padding: 5px 0; }
.tf-col a.l::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--tf-hi); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--t-ease); }
.tf-col a.l:hover::after, .tf-col a.l:focus-visible::after { transform: none; }
.tf-reach p { font: 500 19px/1.35 var(--t-sans); }
.tf-reach p span { color: var(--tf-mut); }
.tf-reach .t-btn { margin-top: 20px; color: inherit; }
.tf-reach .t-btn:hover { background: #F3F1EA; border-color: #F3F1EA; color: var(--t-night); }
.tf-now { display: none; align-items: center; gap: 10px; margin-top: var(--t-s5); }
.tf-now.t-hs-ok { display: flex; }
.tf .t-ping { background: var(--t-gum-dusk); box-shadow: 0 0 0 3px rgba(127,198,155,.22); }
.tf-base { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0 34px; border-top: 1px solid var(--tf-line); font-weight: 500; font-family: var(--t-data); }
.tf-base nav { display: flex; gap: 20px; }
.tf-base a { transition: color .2s; }
.tf-base a:hover { color: var(--tf-hi); }

/* ---------- the phone menu at the bottom of the screen (partials/tabbar.hbs) ---------- */
.tabwrap { display: none; }
@media (max-width: 759px) {
  /* room for the tab bar is kept inside the dusk footer (.tf-base), so no paper strip shows under it */
  body:has(.t-page) { padding-bottom: 0; }
  .tabwrap { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: var(--t-z-tabbar); gap: 10px; align-items: center;
    transform: translateY(40px); opacity: 0; pointer-events: none; transition: transform .5s var(--t-ease), opacity .4s ease; }
  .tabwrap.show { transform: none; opacity: 1; pointer-events: auto; }
  .tab2, .srch { background: rgba(250,251,250,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(23,32,51,.1);
    box-shadow: 0 12px 30px -12px rgba(23,32,51,.35); color: var(--t-ink); }
  .tab2 { flex: 1; min-width: 0; height: 62px; border-radius: 31px; display: flex; align-items: center; justify-content: space-around; padding: 0 var(--t-s1); }
  .tab2 a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 12px var(--t-data); color: var(--t-ink); opacity: .72; padding: 7px var(--t-s2); border-radius: 24px; min-width: 0; }
  .tab2 a .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tab2 a.on { opacity: 1; color: var(--t-ink); background: var(--t-sky); }
  .tab2 .tab-share { opacity: 1; }
  .shr { position: relative; width: 34px; height: 34px; display: grid; place-items: center; margin: -6px 0 -2px; }
  .shr .ring { position: absolute; inset: 0; width: 34px; height: 34px; transform: rotate(-90deg); }
  .shr .tr { fill: none; stroke: rgba(86,97,115,.25); stroke-width: 2.6; }
  .shr .pg { fill: none; stroke: var(--t-sun); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--read, 0)); }
  .shr .icon { width: 17px !important; height: 17px !important; }
  .srch { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer; }
  .srch .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .t-wrap { padding: 0 20px; }
  .t-bar { height: 58px; padding: env(safe-area-inset-top) max(var(--t-s3), env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); gap: var(--t-s3); }
  .t-menu { top: calc(58px + env(safe-area-inset-top)); }
  .t-bar nav, .t-bar .t-tools { display: none; }
  .t-burger { display: grid; place-items: center; }
  .t-sech { flex-direction: column; align-items: flex-start; }
  .t-sech h2 { font-size: 32px; }
  .t-hand { font-size: 40px; }
  .tf-in { padding: 0 20px; }
  .tf-sign { grid-template-columns: 1fr; padding: 80px 0 56px; }
  .tf-sign h2 { font-size: 42px; }
  .tf-sign .tf-form-wrap, .tf-sign .tf-signed { grid-column: 1; grid-row: auto; }
  .tf-cols { grid-template-columns: 1fr 1fr; gap: 34px 20px; }
  .tf-brand, .tf-reach { grid-column: 1 / -1; }
  .tf-base { flex-direction: column; align-items: flex-start; padding-bottom: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .t-btn, .t-bar nav a, .tf-col a.l { transition: none; }
}

/* ---------- numbers, stats and small text in the data face: Atkinson Hyperlegible Next with lining, even-width figures (content/DESIGN.md, section 3) ---------- */
.tf-brand p, .tf-sign > p, .tf-signed { font-family: var(--t-data); font-variant-numeric: var(--t-figs); letter-spacing: 0; }

/* ---------- polish (impeccable polish) ---------- */
/* the parts the browser draws carry the palette too: selection, caret, form controls, scrollbars, placeholders */
::selection { background: rgba(242,169,0,.35); color: var(--t-ink); }
.tf ::selection { background: rgba(242,169,0,.45); color: #fff; }
html { accent-color: var(--t-ink); scrollbar-color: rgba(23,32,51,.35) transparent; }
input, textarea { caret-color: var(--t-ember); }
::placeholder { color: var(--t-muted); opacity: 1; }
.tf ::placeholder { color: var(--tf-mut); }

/* line breaks: headings balance, short paragraphs avoid a lone last word */
:where(.t-page, .tf) :where(h1, h2, h3, blockquote) { text-wrap: balance; }
:where(.t-page) :where(p, li, figcaption) { text-wrap: pretty; }

/* the menu bar is on every screen, so its Subscribe is the outlined button; the one sun-yellow button belongs to the page.
   On the sign-up page it is hidden, because it would lead to the page you are on. */
.t-bar .t-btn.go { background: transparent; border-color: currentColor; color: var(--t-ink); }
.t-bar .t-btn.go:hover, .t-bar .t-btn.go:focus-visible { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-paper); }
body:has(form[data-members-form="signup"]) .t-bar .t-btn.go { display: none; }

/* buttons inside article text never pick up the link underline */
.t-prose a.t-btn, .t-prose .t-btn { text-decoration: none; }

/* the footer form has a visible label */
.tf-lab { display: block; margin-bottom: var(--t-s2); color: var(--tf-mut); }

/* ---------- web interface guidelines ---------- */
/* skip link: hidden until focused, then the first thing on the page */
.t-skip { position: fixed; left: var(--t-s4); top: var(--t-s3); z-index: calc(var(--t-z-tabbar) + 1); padding: 10px 16px; border-radius: 999px; background: var(--t-ink); color: var(--t-paper); font: 600 14px var(--t-sans); text-decoration: none; transform: translateY(-200%); }
.t-skip:focus, .t-skip:focus-visible { transform: none; outline: 2px solid var(--t-sun); outline-offset: 2px; }
#t-main { outline: none; }
#t-main:focus-visible { outline: none; }
/* taps: no double-tap zoom delay, a tap highlight in the palette */
html { touch-action: manipulation; -webkit-tap-highlight-color: rgba(242,169,0,.25); }
/* the phone menu doesn't scroll the page behind it */
.t-menu { overscroll-behavior: contain; max-height: calc(100dvh - 64px); overflow-y: auto; }
/* on phones the tab bar sits over the bottom of the screen, so focused and linked-to things stop above it */
@media (max-width: 759px) { html { scroll-padding-bottom: 110px; } }
/* while a form is sending, its button says so with a small turning ring (and stays put) */
form.loading button[type="submit"]::after, .tf-form-wrap.loading .t-btn::after, .tl-form.loading .tl-send .t-btn::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: t-spin .7s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { form.loading button[type="submit"]::after, .tf-form-wrap.loading .t-btn::after, .tl-form.loading .tl-send .t-btn::after { animation: none; border-right-color: currentColor; opacity: .5; } }
