/* WhatTimeIsIt.blog — loud flat poster, with clockmaker ornament */
:root {
  --bg: #ffffff;
  --paper: #f7f6ef;
  --surface: #f0f0ea;
  --ink: #000000;
  --muted: #4d4d4d;
  --line: #000000;
  --yellow: #f0ff1c;
  --orange: #fe7141;
  --sage: #d1ddd3;
  --night: #000000;
  --night-ink: #f4f4f0;
  --accent: var(--orange);

  --step-xs: clamp(0.8125rem, 0.8rem + 0.05vw, 0.875rem);
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-h3: clamp(1.25rem, 1.12rem + 0.6vw, 1.5rem);
  --step-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(4.5rem, 12vw, 12rem);

  --m: clamp(20px, 2.4vw, 36px);
  --gap-section: clamp(88px, 9vw, 160px);
  --measure: 68ch;
  --ease: cubic-bezier(.2,.7,.2,1);
  --font: 'Cabinet Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Gambetta', Georgia, 'Times New Roman', serif;
  --ticks: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 12px);
  --ticks-5: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 60px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; font-weight: 400; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 60; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { padding-left: var(--m); padding-right: var(--m); }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 0 26px; background: var(--accent); color: var(--ink); border: 0; border-radius: 0; font-weight: 800; font-size: var(--step-body); text-decoration: none; transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease); box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--night-ink); box-shadow: 4px 4px 0 var(--orange); }
.btn-ink:hover { box-shadow: 6px 6px 0 var(--orange); }
.btn-quiet { background: var(--night-ink); color: var(--ink); box-shadow: none; }
.btn-quiet:hover { box-shadow: none; transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: var(--step-small); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: var(--step-small); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .field textarea { min-height: 52px; width: 100%; padding: 0 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); font-size: var(--step-body); font-weight: 500; font-variant-numeric: tabular-nums; }
.field textarea { padding: 12px 14px; min-height: 120px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus { outline: 3px solid var(--orange); outline-offset: 0; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }

/* ---------- ornaments ---------- */
.ticks { height: 14px; background: var(--ticks); position: relative; }
.ticks::after { content: ''; position: absolute; inset: 0; background: var(--ticks-5); height: 22px; top: -4px; }
.ticks-wrap { padding: 0 var(--m); }
.rule-dial { display: flex; align-items: center; gap: 16px; margin: 56px 0 28px; }
.rule-dial::before, .rule-dial::after { content: ''; flex: 1; height: 10px; background: var(--ticks); }
.rule-dial svg { width: 34px; height: 34px; flex: none; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: var(--step-small); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kicker::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.roman { font-family: var(--serif); font-style: italic; font-weight: 500; }
.ornament { pointer-events: none; }
.guilloche { position: absolute; inset: 0; opacity: .16; pointer-events: none; overflow: hidden; }
.guilloche svg { position: absolute; width: min(1100px, 140vw); height: auto; right: -18%; top: 50%; transform: translateY(-50%); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--ink); color: var(--night-ink); font-size: var(--step-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.badge-y { background: var(--yellow); color: var(--ink); }
.badge-o { background: var(--orange); color: var(--ink); }

/* ---------- header ---------- */
.site-top { position: sticky; top: 0; z-index: 40; background: var(--ink); color: var(--night-ink); }
.site-top .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 0 var(--m); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.wordmark svg { width: 30px; height: 30px; }
.wordmark b { color: var(--yellow); font-weight: 800; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); }
.topnav a { text-decoration: none; font-weight: 500; position: relative; padding: 8px 0; white-space: nowrap; }
.topnav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.topnav a:hover::after, .topnav a[aria-current="page"]::after { transform: scaleX(1); }
.top-clock { font-weight: 800; font-variant-numeric: tabular-nums; background: var(--yellow); color: var(--ink); padding: 6px 12px; white-space: nowrap; }
.menu-btn { display: none; background: var(--yellow); color: var(--ink); border: 0; font-weight: 800; min-height: 44px; padding: 0 16px; }
.mobile-menu { background: var(--ink); color: var(--night-ink); padding: 8px var(--m) 24px; display: grid; border-top: 1px solid #333; }
.mobile-menu a { padding: 12px 0; font-weight: 800; font-size: var(--step-lead); text-decoration: none; border-bottom: 1px solid #262626; }
.mobile-menu[hidden] { display: none; }
.site-top .ticks { height: 8px; background: repeating-linear-gradient(90deg, var(--yellow) 0 2px, transparent 2px 10px); }
.site-top .ticks::after { display: none; }

/* ---------- crumbs ---------- */
.crumbs { padding: 18px var(--m) 0; font-size: var(--step-small); font-weight: 500; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- page hero (inner pages) ---------- */
.phero { position: relative; overflow: hidden; background: var(--yellow); padding: clamp(28px, 4vw, 64px) var(--m) clamp(40px, 5vw, 80px); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: center; isolation: isolate; }
.phero[data-c="o"] { background: var(--orange); }
.phero[data-c="s"] { background: var(--sage); }
.phero[data-c="k"] { background: var(--ink); color: var(--night-ink); }
.phero[data-c="k"] .kicker::before { background: var(--yellow); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--yellow); }
.phero-copy { grid-column: 1 / 8; position: relative; z-index: 2; }
.phero h1 { font-weight: 800; font-size: clamp(2.25rem, 1rem + 4.2vw, 4.75rem); line-height: .95; letter-spacing: -0.035em; margin: 16px 0 18px; max-width: 18ch; text-wrap: balance; }
.phero .dek { font-size: var(--step-lead); line-height: 1.35; max-width: 46ch; }
.phero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: var(--step-small); font-weight: 500; }
.phero-meta a { font-weight: 800; }
.phero-art { grid-column: 8 / 13; position: relative; z-index: 1; justify-self: end; width: 100%; max-width: 520px; }
.phero-art .dial { width: 100%; height: auto; }
.phero-photo { grid-column: 8 / 13; position: relative; z-index: 1; }
.phero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.phero-photo.arch img { aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; }
.phero-photo figcaption { margin-top: 18px; font-size: var(--step-xs); max-width: 56ch; }
.phero-photo .ring { position: absolute; width: 38%; right: -6%; top: -8%; z-index: 2; }

/* ---------- live clock block ---------- */
.liveclock { grid-column: 1 / -1; margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; position: relative; z-index: 2; }
.liveclock .t { font-weight: 800; font-size: clamp(4rem, 2rem + 9vw, 10.5rem); line-height: .85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.liveclock .t small { font-size: .32em; letter-spacing: -0.02em; margin-left: .15em; }
.liveclock .d { font-size: var(--step-lead); font-weight: 500; }

/* ---------- tool stage ---------- */
.stage { background: var(--ink); color: var(--night-ink); padding: clamp(28px, 3.2vw, 52px) var(--m); position: relative; overflow: hidden; }
.stage .field > span, .stage .field > label { color: var(--yellow); }
.stage .field input, .stage .field select { background: var(--night-ink); color: var(--ink); border-color: var(--night-ink); }
.stage-inner { position: relative; z-index: 1; display: grid; gap: 24px; }
.readout { font-weight: 800; font-size: clamp(2.25rem, 1rem + 4.5vw, 5rem); line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--yellow); overflow-wrap: anywhere; }
.readout-sub { font-size: var(--step-lead); font-weight: 500; }
.readout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px; background: #333; border: 2px solid #333; }
.readout-grid > div { background: var(--ink); padding: 16px 18px; }
.readout-grid b { display: block; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.05; font-weight: 800; color: var(--night-ink); font-variant-numeric: tabular-nums; }
.readout-grid span { font-size: var(--step-small); color: #bdbdb5; }
.seg { display: inline-flex; flex-wrap: wrap; background: rgba(255,255,255,.12); padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 10px 16px; font-weight: 800; min-height: 44px; transition: background-color .18s var(--ease), color .18s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.light .seg { background: rgba(0,0,0,.08); }
.light .seg button[aria-pressed="true"] { background: var(--ink); color: var(--night-ink); }
.out-note { font-size: var(--step-small); color: #bdbdb5; }
.stage .dial-bg { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 520px; opacity: .12; z-index: 0; }

/* timers */
.timer-read { font-weight: 800; font-size: clamp(4.5rem, 2rem + 13vw, 15rem); line-height: .85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; color: var(--night-ink); }
.timer-ring { width: min(420px, 80vw); aspect-ratio: 1; position: relative; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .trk { stroke: #2a2a2a; }
.timer-ring .prg { stroke: var(--yellow); transition: stroke-dashoffset .25s linear; }
.timer-ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-weight: 800; font-size: clamp(2.5rem, 1.5rem + 5vw, 5rem); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.timer-done { min-height: 1.5em; font-weight: 800; font-size: var(--step-lead); color: var(--yellow); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets a, .presets button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: #1c1c1c; color: var(--night-ink); border: 1px solid #3a3a3a; text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.presets a:hover, .presets button:hover, .presets a[aria-current="page"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.laps { display: grid; gap: 2px; max-height: 320px; overflow: auto; font-variant-numeric: tabular-nums; }
.laps li { display: flex; justify-content: space-between; padding: 8px 12px; background: #161616; }
.stage.full { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; }

/* ---------- layout: body + aside ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 88px); padding: clamp(48px, 5vw, 88px) var(--m) 0; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
.aside { position: sticky; top: 96px; display: grid; gap: 20px; }
.aside-box { border: 2px solid var(--ink); padding: 20px; background: var(--bg); }
.aside-box h2 { font-size: var(--step-small); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.aside-box ol, .aside-box ul { display: grid; gap: 8px; font-size: var(--step-small); }
.aside-box a { text-decoration: none; font-weight: 500; }
.aside-box a:hover { text-decoration: underline; }
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 2.4em 1fr; }
.toc li::before { content: counter(toc, upper-roman); font-family: var(--serif); font-style: italic; color: var(--muted); }
.aside-y { background: var(--yellow); }
.aside-k { background: var(--ink); color: var(--night-ink); border-color: var(--ink); }

/* ---------- prose ---------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { line-height: 1.68; }
.prose h2 { font-weight: 800; font-size: var(--step-h2); line-height: 1.04; letter-spacing: -0.025em; margin-top: 0; text-wrap: balance; }
.prose h3 { font-weight: 800; font-size: var(--step-h3); line-height: 1.2; letter-spacing: -0.01em; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 0; display: grid; gap: .5em; }
.prose ul li { position: relative; padding-left: 1.6em; }
.prose ul li::before { content: ''; position: absolute; left: .2em; top: .62em; width: .55em; height: .55em; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); }
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; position: relative; padding-left: 2.2em; }
.prose ol li::before { content: counter(li); position: absolute; left: 0; top: .05em; width: 1.6em; height: 1.6em; display: grid; place-content: center; background: var(--ink); color: var(--night-ink); font-weight: 800; font-size: .8em; border-radius: 50%; }
.prose a { text-decoration-color: var(--orange); text-decoration-thickness: 3px; font-weight: 500; }
.prose a:hover { background: var(--yellow); }
.prose blockquote { border-left: 6px solid var(--orange); padding: 4px 0 4px 20px; font-size: var(--step-lead); line-height: 1.4; }
.prose code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .88em; background: var(--surface); padding: .1em .35em; }
.prose strong { font-weight: 800; }
.sec { position: relative; padding-top: 8px; }
.sec + .sec { margin-top: 64px; }
.sec-num { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sec-num .roman { font-size: 1.6rem; line-height: 1; min-width: 1.6em; }
.sec-num::after { content: ''; flex: 1; height: 10px; background: var(--ticks); opacity: .9; }

/* tables */
.tbl { width: 100%; overflow-x: auto; border: 2px solid var(--ink); background: var(--bg); }
.prose .tbl { margin-top: 1.4em; }
.tbl table, .prose table { width: 100%; border-collapse: collapse; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.tbl caption, .prose caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: var(--step-xs); color: var(--muted); border-top: 2px solid var(--ink); background: var(--paper); }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #d9d9d2; vertical-align: top; }
.tbl thead th { background: var(--ink); color: var(--night-ink); font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.tbl tbody tr:nth-child(even) td { background: var(--paper); }
.tbl tbody tr:hover td { background: #fbffd0; }
.tbl tr.now td { background: var(--yellow) !important; font-weight: 800; }
.tbl tr.off td { color: var(--muted); }
.tbl td.ok { background: var(--sage) !important; }

/* answer and facts */
.answer { position: relative; background: var(--yellow); border: 3px solid var(--ink); padding: clamp(20px, 2.4vw, 32px); box-shadow: 10px 10px 0 var(--ink); max-width: var(--measure); }
.answer .kicker { margin-bottom: 10px; }
.answer p { font-size: var(--step-lead); line-height: 1.4; font-weight: 500; }
.answer a { text-decoration-color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 0; border: 2px solid var(--ink); margin-top: 40px; max-width: var(--measure); overflow: hidden; }
.facts li { flex: 1 1 200px; padding: 18px 18px 20px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin: 0 -2px -2px 0; font-weight: 500; line-height: 1.35; position: relative; }
.facts li .roman { display: block; font-size: 1.2rem; margin-bottom: 6px; color: var(--orange); }
.facts li:nth-child(3n+1) { background: var(--sage); }
.facts li:nth-child(3n+2) { background: var(--bg); }
.facts li:nth-child(3n) { background: var(--paper); }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 2px solid var(--ink); }
.dl > div { padding: 16px 18px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin: 0 -2px -2px 0; }
.dl dt { font-size: var(--step-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dl dd { font-size: var(--step-lead); font-weight: 800; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dl dd small { display: block; font-size: var(--step-small); font-weight: 500; margin-top: 4px; }

/* hero image in article */
.fig-hero { margin: 0; }
.fig-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid var(--ink); }
.fig-hero figcaption { font-size: var(--step-xs); color: var(--muted); margin-top: 8px; }

/* editor box */
.editor { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; border: 2px solid var(--ink); padding: 22px; background: var(--paper); max-width: var(--measure); }
.editor .mono { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-content: center; font-weight: 800; font-size: 1.5rem; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink); }
.editor h2 { font-size: var(--step-body); font-weight: 800; }
.editor p { font-size: var(--step-small); margin-top: 6px; }

/* sources */
.sources { max-width: var(--measure); counter-reset: src; display: grid; gap: 10px; font-size: var(--step-small); }
.sources li { counter-increment: src; display: grid; grid-template-columns: 2.4em 1fr; }
.sources li::before { content: counter(src) '.'; font-weight: 800; }
.sources a { overflow-wrap: anywhere; }

/* FAQ */
.faq-list { display: grid; gap: 6px; max-width: var(--measure); }
.faq-list details { background: var(--surface); border: 2px solid transparent; transition: background-color .25s var(--ease); }
.faq-list details[open] { background: var(--orange); border-color: var(--ink); }
.faq-list summary { list-style: none; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; font-size: var(--step-body); font-weight: 800; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-weight: 800; font-size: 28px; line-height: 1; flex: none; }
.faq-list details[open] summary::after { content: '\2212'; }
.faq-list .a { padding: 0 22px 22px; max-width: 60ch; }
.faq-list .a a { text-decoration-color: var(--ink); }

/* ---------- cards ---------- */
.section { padding: var(--gap-section) var(--m) 0; }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: end; margin-bottom: 40px; }
.section-head h2 { grid-column: 1 / 8; font-weight: 800; font-size: var(--step-head); line-height: .92; letter-spacing: -0.035em; text-wrap: balance; }
.section-head p { grid-column: 8 / 13; max-width: 42ch; }
.section-head .kicker { grid-column: 1 / -1; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--bg); border: 2px solid var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); min-width: 0; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 2px solid var(--ink); }
.card .body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.card .cat { font-size: var(--step-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card h3 { font-size: var(--step-h3); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.card p { font-size: var(--step-small); color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.tile-link { position: relative; display: grid; gap: 8px; align-content: space-between; min-height: 150px; padding: 18px; background: var(--surface); text-decoration: none; overflow: hidden; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.tile-link:hover { background: var(--yellow); transform: translateY(-3px); }
.tile-link:nth-child(4n+2):hover { background: var(--orange); }
.tile-link:nth-child(4n+3):hover { background: var(--sage); }
.tile-link b { font-weight: 800; font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.01em; }
.tile-link span { font-size: var(--step-small); }
.tile-link .t { font-weight: 800; font-variant-numeric: tabular-nums; font-size: var(--step-lead); }
.tile-link svg.mini { position: absolute; right: -18px; bottom: -18px; width: 96px; opacity: .25; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); text-decoration: none; font-weight: 500; font-size: var(--step-small); background: var(--bg); }
.chips a:hover { background: var(--yellow); }
.cols { columns: 4 220px; column-gap: 32px; }
.cols li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid #e1e1da; display: flex; justify-content: space-between; gap: 12px; }
.cols a { text-decoration: none; font-weight: 500; }
.cols a:hover { text-decoration: underline; }
.cols .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--step-small); white-space: nowrap; }

/* ---------- home ---------- */
.hero { position: relative; display: grid; overflow: hidden; }
.hero-field { position: relative; background: var(--yellow); padding: 0 var(--m); min-height: min(78svh, 820px); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; isolation: isolate; }
.hero-time { grid-column: 1 / 9; align-self: center; padding: clamp(48px, 9svh, 110px) 0 clamp(40px, 6svh, 80px); font-weight: 800; font-size: var(--step-display); line-height: .86; letter-spacing: -0.045em; text-transform: lowercase; position: relative; z-index: 2; }
.hero-line { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero-kick { display: block; font-size: var(--step-lead); letter-spacing: 0; text-transform: none; font-weight: 500; margin-bottom: 18px; }
.hero-photo { grid-column: 9 / 13; align-self: end; margin-bottom: -6svh; position: relative; z-index: 3; transform: rotate(4deg); }
.hero-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 0 0; border: 3px solid var(--ink); }
.hero-photo .ring { position: absolute; width: 46%; left: -22%; top: 6%; transform: rotate(-4deg); z-index: 4; }
.hero-band { background: var(--ink); color: var(--night-ink); padding: 28px var(--m) 32px; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: start; position: relative; z-index: 2; }
.hero-sentence { grid-column: 1 / 6; font-size: var(--step-lead); line-height: 1.3; max-width: 40ch; }
.city-search { grid-column: 6 / 13; display: flex; flex-wrap: wrap; gap: 0; position: relative; }
.city-search input { flex: 1 1 220px; min-height: 56px; border: 0; border-radius: 0; padding: 0 18px; background: var(--night-ink); color: var(--ink); font-size: var(--step-body); }
.city-search .btn { box-shadow: none; }
.search-result { flex-basis: 100%; margin-top: 12px; font-size: var(--step-lead); font-weight: 500; min-height: 1.4em; }
.search-result a { color: var(--yellow); }
.suggest { position: absolute; top: 56px; left: 0; right: 0; z-index: 30; background: var(--night-ink); color: var(--ink); border: 2px solid var(--ink); display: grid; max-height: 320px; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid #ddd; }
.suggest a:hover, .suggest a.on { background: var(--yellow); }
.suggest small { color: var(--muted); }

.calc { position: relative; padding: clamp(72px, 8vw, 128px) var(--m); background: var(--orange); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: start; transition: background-color .35s var(--ease); overflow: hidden; isolation: isolate; }
.calc > .dial-bg { position: absolute; right: -180px; bottom: -260px; width: 760px; max-width: none; opacity: .13; z-index: 0; pointer-events: none; }
.clockwork { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: center; background: var(--ink); color: var(--night-ink); padding: clamp(64px, 7vw, 112px) var(--m); margin-top: var(--gap-section); }
.clockwork video { grid-column: 1 / 7; width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 3px solid var(--yellow); }
.clockwork .cw-copy { grid-column: 8 / 13; }
.clockwork h2 { font-size: var(--step-h2); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 18px; }
.clockwork p { max-width: 46ch; margin-bottom: 14px; }
.clockwork a { color: var(--yellow); }
.clockwork .credits { font-size: var(--step-xs); opacity: .8; }
@media (max-width: 860px) { .clockwork video, .clockwork .cw-copy { grid-column: 1 / 13; } .clockwork .cw-copy { margin-top: 28px; } }
.calc[data-field="b"] { background: var(--sage); }
.calc-copy { grid-column: 1 / 6; position: relative; z-index: 1; }
.calc-title { font-weight: 800; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; margin: 16px 0 20px; }
.calc-copy p { max-width: 34ch; }
.calc-copy .btn { margin-top: 28px; }
.calc-ui { grid-column: 7 / 13; font-size: clamp(14px, 1.45vw, 22px); display: grid; gap: 1em; justify-items: start; padding-top: 1em; position: relative; z-index: 1; }
.calc-ui .seg { background: rgba(0,0,0,.12); }
.calc-ui .seg button[aria-pressed="true"] { background: var(--ink); color: var(--night-ink); }
.calc-ui .seg button { font-size: 1.05em; }
.stepper { display: flex; align-items: stretch; }
.stepper .step { width: 1.6em; border: 0; background: var(--ink); color: var(--night-ink); font-size: 3.4em; font-weight: 800; line-height: 1; }
.stepper input { width: 3.6ch; font-size: 7em; font-weight: 800; line-height: .95; letter-spacing: -0.04em; border: 0; background: transparent; padding: 0 .12em; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-result { display: block; font-size: 3em; font-weight: 800; line-height: 1; letter-spacing: -0.035em; }
.calc-note { font-size: 1.05em; font-weight: 500; }

.bands { border-top: 2px solid var(--ink); }
.band { min-height: 120px; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; align-items: center; padding: 18px var(--m); background: var(--bg); border-bottom: 2px solid var(--ink); transition: background-color .3s var(--ease); text-decoration: none; }
.band:nth-child(4n+1):hover { background: var(--yellow); }
.band:nth-child(4n+2):hover { background: var(--sage); }
.band:nth-child(4n+3):hover { background: var(--orange); }
.band:nth-child(4n):hover { background: var(--yellow); }
.band .nm { grid-column: 1 / 6; font-weight: 800; font-size: clamp(28px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.03em; }
.band .nm small { display: block; font-size: var(--step-small); font-weight: 500; letter-spacing: 0; margin-top: 6px; }
.band .tm { grid-column: 6 / 10; font-weight: 800; font-size: clamp(28px, 3.4vw, 52px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.band .df { grid-column: 10 / 13; justify-self: end; font-weight: 500; text-align: right; }
.band svg { width: 56px; height: 56px; }

.stats { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 10px; row-gap: 10px; align-items: start; }
.tile { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; text-decoration: none; position: relative; overflow: hidden; }
.fig { font-weight: 800; font-size: clamp(56px, 5.4vw, 96px); line-height: .9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.cap { font-weight: 500; max-width: 34ch; }
.tile-a { grid-column: 1 / 7; grid-row: 1 / 3; min-height: 560px; background: var(--orange); }
.stats-title { grid-column: 7 / 13; grid-row: 1; font-weight: 800; font-size: var(--step-head); line-height: .92; letter-spacing: -0.035em; padding: 8px 0 0 4px; }
.tile-b { grid-column: 7 / 10; grid-row: 2; min-height: 340px; background: var(--ink); color: var(--night-ink); }
.tile-c { grid-column: 10 / 13; grid-row: 2; min-height: 300px; background: var(--sage); margin-top: 60px; }
.tile .dial { position: absolute; right: -60px; bottom: -60px; width: 280px; opacity: .22; }

.marquee { margin-top: var(--gap-section); background: var(--yellow); overflow: hidden; padding: 18px 0; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { font-weight: 800; font-size: clamp(36px, 5vw, 84px); line-height: 1; letter-spacing: -0.035em; white-space: nowrap; padding-right: .5em; font-variant-numeric: tabular-nums; text-decoration: none; }
.marquee-item::after { content: ''; display: inline-block; width: .22em; height: .22em; border-radius: 50%; background: var(--ink); margin-left: .5em; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

.giant { font-weight: 800; font-size: clamp(5rem, 16vw, 15rem); line-height: .8; letter-spacing: -0.06em; margin-left: -0.04em; }

.ad { margin: 48px 0; background: var(--paper); border: 1px dashed #b8b8ae; min-height: 120px; display: grid; place-content: center; text-align: center; padding: 12px; }
.ad::before { content: 'Advertisement'; font-size: var(--step-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad ins { min-width: 250px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad.wide { margin: var(--gap-section) var(--m) 0; }

/* ---------- planner / bars ---------- */
.hours { display: grid; gap: 4px; overflow-x: auto; }
.hours-row { display: grid; grid-template-columns: 160px repeat(24, minmax(30px, 1fr)); gap: 2px; align-items: stretch; min-width: 880px; }
.hours-row > b { font-size: var(--step-small); padding: 8px 8px 8px 0; display: flex; flex-direction: column; justify-content: center; }
.hours-row > b small { font-weight: 500; color: #bdbdb5; }
.hours-row > span { display: grid; place-content: center; font-size: 12px; font-weight: 800; min-height: 44px; background: #262626; color: #aaa; font-variant-numeric: tabular-nums; }
.hours-row > span.w { background: var(--sage); color: var(--ink); }
.hours-row > span.e { background: #6b6f5f; color: var(--night-ink); }
.hours-row > span.all { outline: 3px solid var(--yellow); outline-offset: -3px; }
.hours-row > span.n { background: var(--yellow); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--step-small); }
.legend i { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

/* offsets / world map */
.offsets { display: grid; gap: 2px; }
.offset { display: grid; grid-template-columns: 110px 130px 1fr; gap: 16px; align-items: center; padding: 12px 16px; background: var(--surface); }
.offset:nth-child(even) { background: var(--paper); }
.offset.mine { background: var(--yellow); }
.offset b { font-weight: 800; font-variant-numeric: tabular-nums; }
.offset .t { font-weight: 800; font-size: var(--step-lead); font-variant-numeric: tabular-nums; }
.offset .p { font-size: var(--step-small); }
.mapfig img { width: 100%; border: 3px solid var(--ink); background: #fff; }

/* moon */
.moon-disc { width: min(280px, 60vw); aspect-ratio: 1; }
.moon-cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.moon-cal div { background: #151515; padding: 8px 4px; text-align: center; font-size: 12px; display: grid; gap: 4px; justify-items: center; }
.moon-cal svg { width: 30px; height: 30px; }
.moon-cal .today { outline: 2px solid var(--yellow); }

/* ---------- footer ---------- */
.foot { margin-top: var(--gap-section); background: var(--ink); color: var(--night-ink); padding: clamp(64px, 7vw, 112px) var(--m) 0; overflow: hidden; position: relative; }
.foot-top { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: 16px; row-gap: 40px; align-items: start; position: relative; z-index: 1; }
.foot-invite { grid-column: 1 / 6; }
.foot-invite h2 { font-weight: 800; font-size: clamp(2rem, 1rem + 3vw, 3.75rem); line-height: .95; letter-spacing: -0.035em; margin-bottom: 24px; max-width: 13ch; }
.foot-invite p { max-width: 40ch; color: #cfcfc6; }
.foot-col { grid-column: span 2; display: grid; gap: 10px; align-content: start; font-size: var(--step-small); }
.foot-col h3 { font-size: var(--step-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); margin-bottom: 4px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }
.credits { margin-top: 64px; font-size: var(--step-xs); line-height: 1.6; color: #b6b6ad; max-width: 100ch; position: relative; z-index: 1; }
.credits a { color: inherit; }
.legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 8px; font-size: var(--step-small); border-top: 1px solid #333; margin-top: 32px; position: relative; z-index: 1; }
.legal a { text-decoration: none; }
.foot-mark { font-weight: 800; font-size: 17.5vw; line-height: .8; letter-spacing: -0.06em; white-space: nowrap; transform: translateY(16%); margin-left: -0.04em; color: var(--orange); position: relative; z-index: 1; }
.foot .dial-bg { position: absolute; right: -10%; top: -6%; width: min(760px, 90vw); opacity: .08; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.spin { animation: spin 120s linear infinite; transform-origin: 50% 50%; transform-box: fill-box; }
.spin-r { animation: spin 180s linear infinite reverse; transform-origin: 50% 50%; transform-box: fill-box; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .topnav .hide-md { display: none; }
  .layout { grid-template-columns: minmax(0,1fr); }
  .aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .calc-copy, .calc-ui { grid-column: 1 / 13; }
  .calc-copy { margin-bottom: 32px; }
  .calc-ui { font-size: clamp(14px, 2.3vw, 22px); }
  .foot-invite { grid-column: 1 / 13; }
  .foot-col { grid-column: span 3; }
}
@media (max-width: 860px) {
  .topnav { display: none; }
  .menu-btn { display: block; }
  .phero-copy, .phero-art, .phero-photo { grid-column: 1 / 13; }
  .phero-art { max-width: 300px; justify-self: start; margin-top: 28px; }
  .phero-photo { margin-top: 32px; max-width: 560px; }
  .phero-photo .ring { width: 30%; }
  .section-head h2, .section-head p { grid-column: 1 / 13; }
  .section-head p { margin-top: 16px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-field { grid-template-columns: 1fr; min-height: 0; }
  .hero-time { grid-column: 1; padding: 56px 0 0; font-size: 18vw; }
  .hero-photo { grid-column: 1; width: 54vw; justify-self: end; margin: 28px -2vw -40px 0; }
  .hero-photo .ring { width: 40%; left: -24%; }
  .hero-band { grid-template-columns: 1fr; gap: 20px; }
  .hero-sentence, .city-search { grid-column: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats-title { grid-column: 1 / 3; grid-row: 1; padding: 0 0 8px; }
  .tile-a { grid-column: 1 / 3; grid-row: 2; min-height: 360px; }
  .tile-b { grid-column: 1; grid-row: 3; min-height: 280px; }
  .tile-c { grid-column: 2; grid-row: 3; min-height: 260px; margin-top: 30px; }
  .band .nm { grid-column: 1 / 8; }
  .band .tm { grid-column: 8 / 13; justify-self: end; }
  .band .df { grid-column: 1 / 13; justify-self: start; text-align: left; margin-top: 6px; }
  .foot-col { grid-column: span 6; }
  .offset { grid-template-columns: 90px 1fr; }
  .offset .p { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0,1fr); }
  .stepper input { font-size: 6em; }
  .calc-ui { font-size: 3.6vw; }
  .tile { padding: 18px; }
  .tile-b .fig, .tile-c .fig { font-size: 11vw; }
  .editor { grid-template-columns: 1fr; }
  .city-search .btn { flex: 1 1 100%; }
  .wordmark span.tld { display: none; }
  .foot-mark { font-size: 22vw; }
  .liveclock .t { font-size: 22vw; }
  .facts { flex-direction: column; }
}
@media print {
  .site-top, .foot, .ad, .aside, .stage { display: none !important; }
}

/* sources list inside prose: plain numbered rows */
.prose ol.sources { counter-reset: src; }
.prose ol.sources li { counter-increment: src; display: grid; grid-template-columns: 2.4em 1fr; padding-left: 0; }
.prose ol.sources li::before { content: counter(src) '.'; position: static; width: auto; height: auto; display: block; background: none; color: var(--ink); font-size: 1em; border-radius: 0; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile-link { min-height: 120px; padding: 14px; }
  .tile-link span { display: none; }
  .tile-link b { font-size: 1.125rem; }
}
