/* ============================================================
   RAH/OS · styles.css
   Cinematic command center. Near-black base, one warm accent.
   ============================================================ */

:root {
  --bg: #0b0a08;
  --bg-2: #100e0a;
  --panel: #14110c;
  --panel-2: #181410;
  --ink: #ede6da;
  --ink-dim: #a89f8e;
  --ink-faint: #6f6759;
  --amber: #e3a44b;
  --amber-bright: #f2c078;
  --amber-deep: #a06a22;
  --hairline: rgba(237, 230, 218, 0.10);
  --hairline-soft: rgba(237, 230, 218, 0.06);
  --good: #9ab87a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- atmosphere ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}
.glow {
  position: fixed; top: -30vh; left: 50%;
  width: 130vw; height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(227, 164, 75, 0.07), transparent 65%);
  pointer-events: none; z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

main { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 8, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.wordmark { font-family: var(--serif); font-size: 20px; letter-spacing: 0.02em; white-space: nowrap; }
.wordmark-rah { font-weight: 600; }
.wordmark-slash { color: var(--amber); font-weight: 300; margin: 0 1px; }
.wordmark-os { font-weight: 300; font-style: italic; }
.wordmark-ver {
  font-size: 10px; color: var(--ink-faint);
  margin-left: 10px; letter-spacing: 0.14em;
}
.topbar-right { font-size: 11px; color: var(--ink-dim); display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.topbar-clock { color: var(--amber); }
.topbar-sep { width: 1px; height: 12px; background: var(--hairline); display: inline-block; }
.topbar-progress { height: 2px; background: rgba(237, 230, 218, 0.05); }
.topbar-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 96px) 0; border-top: 1px solid var(--hairline-soft); position: relative; }
.section-dark { background: var(--bg-2); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: clamp(24px, 4vw, 40px);
  flex-wrap: wrap;
}
.section-label {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--amber);
}
.section-note { font-size: 10px; color: var(--ink-faint); letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px); position: relative; }
.hero-eyebrow {
  font-size: 11px; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: 0.2em;
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.hero-eyebrow .accent { color: var(--amber); }
.hero-eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); display: inline-block; }
.hero-title {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(46px, 10vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-title em { font-style: italic; color: var(--amber); font-weight: 380; }
.hero-sub {
  margin-top: 20px;
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--ink-dim);
  max-width: 560px;
  text-wrap: pretty;
}
.hero-banner {
  margin-top: 24px;
  border: 1px solid rgba(227, 164, 75, 0.35);
  background: rgba(227, 164, 75, 0.06);
  padding: 12px 16px;
  font-size: 13px; color: var(--amber-bright);
  display: flex; gap: 10px; align-items: baseline;
  border-radius: 2px;
}
.hero-banner .mono { font-size: 10px; letter-spacing: 0.18em; color: var(--amber); flex-shrink: 0; }
.hero-blocks {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline-soft);
}
.hero-block {
  background: var(--bg);
  padding: 20px 18px 22px;
  min-height: 150px;
  display: flex; flex-direction: column;
  position: relative;
  transition: background 0.3s ease;
}
.hero-block:hover { background: #121009; }
.hero-block-label {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-faint); text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.hero-block-time { color: var(--amber-deep); letter-spacing: 0.06em; }
.hero-block-title {
  font-family: var(--serif);
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 420; line-height: 1.15;
  margin-bottom: 8px;
  text-wrap: balance;
}
.hero-block-title.is-rest { color: var(--ink-dim); font-style: italic; font-weight: 340; }
.hero-block-sub { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; text-wrap: pretty; }
.hero-block.is-accent { box-shadow: inset 0 2px 0 var(--amber); }
.hero-block.is-accent .hero-block-label { color: var(--amber); }

/* ---------- anchors timeline ---------- */
.anchors { position: relative; max-width: 640px; }
.anchor-row {
  display: grid;
  grid-template-columns: 92px 20px 1fr;
  gap: 0 14px;
  position: relative;
  padding: 13px 0;
}
.anchor-time {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-faint); letter-spacing: 0.06em;
  text-align: right; padding-top: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.anchor-node { position: relative; display: flex; justify-content: center; }
.anchor-node::before {
  content: ""; position: absolute; top: 0; bottom: -1px; left: 50%;
  width: 1px; margin-left: -0.5px;
  background: var(--hairline);
}
.anchor-row:first-child .anchor-node::before { top: 10px; }
.anchor-row:last-child .anchor-node::before { bottom: auto; height: 10px; }
.anchor-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ink-faint);
  position: relative; z-index: 1; margin-top: 6px;
}
.anchor-body { padding-bottom: 2px; }
.anchor-name { font-size: 15px; font-weight: 500; letter-spacing: 0.01em; }
.anchor-desc { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; text-wrap: pretty; }
.anchor-row.is-faith .anchor-dot { border-color: var(--amber); }
.anchor-row.is-faith .anchor-name { font-family: var(--serif); font-style: italic; font-weight: 420; font-size: 16px; }
.anchor-row.is-now .anchor-dot {
  background: var(--amber); border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(227, 164, 75, 0.18), 0 0 18px rgba(227, 164, 75, 0.35);
}
.anchor-row.is-now .anchor-name { color: var(--amber-bright); }
.anchor-row.is-now .anchor-time { color: var(--amber); }
.anchor-row.is-past .anchor-name,
.anchor-row.is-past .anchor-time { color: var(--ink-faint); }
.anchor-row.is-past .anchor-desc { color: var(--ink-faint); }
.anchor-now-tag {
  display: inline-block; margin-left: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--bg); background: var(--amber);
  padding: 2px 7px 1px; border-radius: 2px;
  vertical-align: 2px;
}

/* ---------- countdown ---------- */
.countdown-primary { text-align: center; padding: clamp(8px, 2vw, 24px) 0 clamp(28px, 5vw, 48px); }
.countdown-label {
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--amber); margin-bottom: clamp(18px, 3vw, 28px);
}
.countdown-digits {
  display: flex; justify-content: center; align-items: baseline;
  gap: clamp(10px, 3.5vw, 36px);
  flex-wrap: nowrap;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: clamp(56px, 16vw, 130px); }
.cd-num {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(44px, 12vw, 118px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.cd-unit-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.28em;
  color: var(--ink-faint); text-transform: uppercase; margin-top: 10px;
}
.cd-colon {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(30px, 8vw, 72px);
  color: var(--ink-faint);
  transform: translateY(clamp(-4px, -1vw, -12px));
}
.countdown-secondary {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  text-align: center;
}
.countdown-secondary .countdown-label { margin-bottom: 0; color: var(--ink-dim); }
.countdown-line { font-family: var(--serif); font-size: clamp(20px, 4vw, 30px); font-weight: 360; }
.countdown-line em { color: var(--amber); font-style: normal; font-variant-numeric: tabular-nums; }

/* ---------- phase bar ---------- */
.phasebar {
  display: flex; gap: 3px;
  margin-bottom: 28px;
}
.phase-seg {
  position: relative;
  border: none;
  background: var(--panel);
  border-top: 2px solid var(--hairline);
  padding: 12px 6px 10px;
  cursor: pointer;
  font-family: var(--mono);
  color: var(--ink-faint);
  text-align: left;
  min-width: 0;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.phase-seg:hover { background: var(--panel-2); color: var(--ink-dim); }
.phase-seg:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.phase-seg .seg-id { font-size: 13px; font-weight: 600; display: block; letter-spacing: 0.05em; }
.phase-seg .seg-range { font-size: 8.5px; letter-spacing: 0.08em; display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase-seg.is-selected { background: var(--panel-2); border-top-color: var(--amber); color: var(--ink); }
.phase-seg.is-selected .seg-id { color: var(--amber); }
.phase-seg.is-current::after {
  content: ""; position: absolute; top: 6px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .phase-seg.is-current::after { animation: none; }
}
.phase-seg .seg-fill {
  position: absolute; left: 0; top: -2px; height: 2px;
  background: var(--amber);
  pointer-events: none;
}

.phase-detail {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: clamp(24px, 4vw, 40px);
}
.pd-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 6px; }
.pd-name {
  font-family: var(--serif); font-weight: 380;
  font-size: clamp(26px, 5vw, 40px); line-height: 1.05;
}
.pd-name .pd-id { color: var(--amber); font-style: italic; margin-right: 10px; }
.pd-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; }
.pd-focus { color: var(--ink-dim); font-size: 15px; max-width: 620px; margin-bottom: 24px; text-wrap: pretty; }
.pd-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 28px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 22px;
}
.pd-item-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 6px; }
.pd-item-value { font-size: 14px; line-height: 1.5; }
.pd-item-value .mono { font-size: 13px; letter-spacing: 0.02em; color: var(--amber-bright); }
.pd-note {
  margin-top: 22px;
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 16px;
  font-size: 13.5px; color: var(--ink-dim);
  text-wrap: pretty;
}
.pd-note strong { color: var(--amber-bright); font-weight: 500; }

/* ---------- weekly grid ---------- */
.week-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad);
  scrollbar-width: thin;
  scrollbar-color: var(--amber-deep) transparent;
}
.week-grid {
  display: grid;
  grid-template-columns: 88px repeat(7, minmax(148px, 1fr));
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline-soft);
  min-width: 1130px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.wg-cell { background: var(--bg); padding: 14px 12px; font-size: 12.5px; min-height: 54px; }
.wg-corner { background: var(--bg); }
.wg-rowlabel {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em;
  color: var(--ink-faint); text-transform: uppercase;
  display: flex; align-items: center;
  background: var(--bg);
  padding: 14px 12px;
}
.wg-day {
  background: var(--bg);
  padding: 14px 12px 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-dim); text-transform: uppercase;
  border-bottom: 1px solid var(--hairline-soft);
}
.wg-day .wg-daynum { display: block; font-size: 9px; color: var(--ink-faint); margin-top: 3px; letter-spacing: 0.1em; }
.wg-cell .primary { font-weight: 500; color: var(--ink); display: block; }
.wg-cell .secondary { color: var(--ink-dim); font-size: 11.5px; display: block; margin-top: 3px; line-height: 1.45; }
.wg-cell .quiet { color: var(--ink-faint); font-style: italic; }
.week-grid .is-today { background: #191510; }
.wg-day.is-today { color: var(--amber); border-bottom-color: var(--amber); position: relative; }
.wg-day.is-today .wg-daynum { color: var(--amber-deep); }

/* ---------- non-negotiables ---------- */
.nn-score-row { display: flex; align-items: baseline; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.nn-score { display: flex; align-items: baseline; gap: 8px; }
.nn-score-num {
  font-family: var(--serif); font-weight: 320;
  font-size: clamp(56px, 10vw, 88px); line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.nn-score-den { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 4vw, 32px); color: var(--ink-faint); }
.nn-score-caption { font-size: 13px; color: var(--ink-dim); max-width: 300px; text-wrap: pretty; }
.nn-list { list-style: none; border-top: 1px solid var(--hairline-soft); }
.nn-item { border-bottom: 1px solid var(--hairline-soft); }
.nn-item label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 16px;
  padding: 15px 4px;
  cursor: pointer;
  align-items: start;
  transition: background 0.2s;
}
.nn-item label:hover { background: rgba(237, 230, 218, 0.02); }
.nn-check {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin-top: 2px;
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.nn-check:checked { border-color: var(--amber); background: var(--amber); }
.nn-check:checked::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--bg);
  clip-path: polygon(18% 46%, 40% 66%, 82% 22%, 90% 32%, 40% 82%, 10% 56%);
}
.nn-check:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.nn-text .nn-title { display: block; font-size: 14.5px; font-weight: 500; transition: color 0.2s; }
.nn-text .nn-sub { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.nn-item.is-done .nn-title { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--amber-deep); text-decoration-thickness: 1px; }
.nn-history { margin-top: 32px; }
.nn-history-label { font-size: 9.5px; letter-spacing: 0.22em; color: var(--ink-faint); margin-bottom: 12px; }
.nn-history-strip { display: flex; gap: 6px; align-items: flex-end; height: 56px; }
.nn-hist-col { flex: 1; max-width: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.nn-hist-bar { width: 100%; background: var(--panel-2); border-top: 2px solid var(--ink-faint); min-height: 3px; }
.nn-hist-bar.has-score { background: rgba(227, 164, 75, 0.16); border-top-color: var(--amber); }
.nn-hist-bar.is-current { border-top-color: var(--amber-bright); background: rgba(227, 164, 75, 0.3); }
.nn-hist-label { font-family: var(--mono); font-size: 8.5px; color: var(--ink-faint); letter-spacing: 0.05em; white-space: nowrap; }

/* ---------- targets ---------- */
.targets { display: flex; flex-direction: column; gap: 26px; margin-bottom: 48px; }
.target { border-top: 1px solid var(--hairline-soft); padding-top: 18px; }
.target-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.target-name { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim); }
.target-delta { font-family: var(--mono); font-size: 10.5px; color: var(--amber); letter-spacing: 0.08em; }
.target-nums { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 14px; }
.target-current {
  font-family: var(--serif); font-weight: 340;
  font-size: clamp(34px, 6vw, 52px); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.target-arrow { color: var(--ink-faint); font-size: 18px; }
.target-goal {
  font-family: var(--serif); font-weight: 340; font-style: italic;
  font-size: clamp(22px, 4vw, 32px); color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.target-unit { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.14em; }
.target-track { height: 3px; background: var(--panel-2); position: relative; border-radius: 2px; overflow: visible; }
.target-track-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--amber-deep), var(--amber)); border-radius: 2px; width: 0; transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.target-track-goal { position: absolute; right: 0; top: -3.5px; width: 1px; height: 10px; background: var(--amber-bright); }
.target-caption { font-size: 11.5px; color: var(--ink-faint); margin-top: 10px; }

.macros { border-top: 1px solid var(--hairline); padding-top: 28px; margin-bottom: 44px; }
.macros-label { font-size: 10px; letter-spacing: 0.24em; color: var(--amber); margin-bottom: 18px; }
.macros-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hairline-soft); border: 1px solid var(--hairline-soft); }
.macro { background: var(--bg); padding: 18px 14px; text-align: center; }
.macro-num { font-family: var(--serif); font-weight: 340; font-size: clamp(24px, 5vw, 40px); line-height: 1; font-variant-numeric: tabular-nums; }
.macro-num sup { font-size: 0.4em; color: var(--ink-faint); font-family: var(--mono); font-weight: 400; margin-left: 2px; letter-spacing: 0.08em; }
.macro-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; color: var(--ink-faint); text-transform: uppercase; margin-top: 8px; }
.macros-note, .run-base .macros-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 16px; max-width: 620px; text-wrap: pretty; }

.run-base { border-top: 1px solid var(--hairline); padding-top: 28px; }
.run-base-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline-soft); border: 1px solid var(--hairline-soft); max-width: 480px; }
.run-base-cell { background: var(--bg); padding: 18px 16px; }
.run-base-cell .macro-label { margin-top: 0; margin-bottom: 8px; }
.run-pace { font-family: var(--serif); font-weight: 340; font-size: clamp(24px, 5vw, 36px); line-height: 1; font-variant-numeric: tabular-nums; }
.run-pace span { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.1em; margin-left: 6px; }

/* ---------- jakarta ---------- */
.clocks {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 4vw, 40px);
  align-items: center;
  margin-bottom: 28px;
}
.clock { text-align: center; }
.clock-city { font-size: 10px; letter-spacing: 0.26em; color: var(--ink-faint); margin-bottom: 10px; }
.clock-time {
  font-family: var(--serif); font-weight: 320;
  font-size: clamp(40px, 9vw, 76px); line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock-time .ampm { font-size: 0.32em; font-family: var(--mono); color: var(--ink-faint); letter-spacing: 0.1em; margin-left: 6px; }
.clock-sub { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.2em; margin-top: 10px; }
.clock-divider { width: 1px; height: clamp(48px, 10vw, 80px); background: var(--hairline); }
.sync-status {
  border: 1px solid var(--hairline);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
  border-radius: 2px;
}
.sync-status.is-live { border-color: rgba(227, 164, 75, 0.5); background: rgba(227, 164, 75, 0.05); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0; }
.sync-status.is-live .sync-dot { background: var(--amber); box-shadow: 0 0 12px rgba(227, 164, 75, 0.6); animation: pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .sync-status.is-live .sync-dot { animation: none; } }
.sync-text .sync-mode { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.sync-status.is-live .sync-mode { color: var(--amber-bright); }
.sync-text .sync-detail { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; }
.sync-rule { font-size: 12.5px; color: var(--ink-faint); max-width: 620px; text-wrap: pretty; }

/* ---------- milestones ---------- */
.ms-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px var(--pad) 16px; scrollbar-width: thin; scrollbar-color: var(--amber-deep) transparent; }
.ms-strip { display: flex; gap: 0; min-width: max-content; position: relative; padding-top: 10px; }
.ms-item {
  position: relative;
  padding: 22px 22px 4px 0;
  min-width: 148px; max-width: 190px;
  flex-shrink: 0;
}
.ms-item::before {
  content: ""; position: absolute; top: 10px; left: 0; right: 0;
  height: 1px; background: var(--hairline);
}
.ms-item::after {
  content: ""; position: absolute; top: 7px; left: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ink-faint);
}
.ms-date { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--ink-faint); text-transform: uppercase; }
.ms-label { font-size: 13.5px; font-weight: 500; margin-top: 5px; line-height: 1.35; text-wrap: balance; padding-right: 6px; }
.ms-sub { font-size: 11px; color: var(--ink-faint); margin-top: 3px; padding-right: 6px; }
.ms-item.is-past { opacity: 0.38; }
.ms-item.is-past::after { background: var(--ink-faint); }
.ms-item.is-next::after { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 4px rgba(227, 164, 75, 0.15), 0 0 14px rgba(227, 164, 75, 0.35); }
.ms-item.is-next .ms-label { color: var(--amber-bright); font-family: var(--serif); font-size: 17px; font-weight: 420; }
.ms-item.is-next .ms-date { color: var(--amber); }
.ms-item.is-race .ms-label { text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: clamp(56px, 10vw, 110px) 0 40px; background: var(--bg-2); }
.footer-inner { text-align: center; }
.footer-big {
  font-family: var(--serif); font-weight: 320;
  font-size: clamp(28px, 6vw, 54px); line-height: 1.1;
  margin-bottom: 28px;
  text-wrap: balance;
}
.footer-big em { color: var(--amber); }
.footer-small { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.2em; }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .target-track-fill, .topbar-progress-fill { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-blocks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .clocks { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .macros-grid { grid-template-columns: repeat(2, 1fr); }
  .anchor-row { grid-template-columns: 74px 18px 1fr; gap: 0 10px; }
  .topbar-right { font-size: 10px; gap: 8px; }
  .wordmark { font-size: 17px; }
  .wordmark-ver { display: none; }
}
@media (max-width: 420px) {
  .hero-blocks { grid-template-columns: 1fr; }
  .hero-block { min-height: 0; }
  .cd-unit { min-width: 60px; }
  .countdown-digits { gap: 8px; }
}

/* ---------- daily quote ---------- */
.daily-quote { margin: 0 0 30px; max-width: 580px; }
.dq-text {
  font-family: var(--serif);
  font-style: italic; font-weight: 340;
  font-size: 16px; line-height: 1.6;
  color: var(--ink-dim); margin: 0;
}
.dq-author {
  margin-top: 8px; font-size: 9px;
  letter-spacing: 0.2em; color: var(--ink-faint);
}

/* ---------- calendar dropdown ---------- */
.cal-btn {
  background: none; border: 1px solid var(--hairline);
  color: var(--ink-dim); font-family: inherit;
  font-size: 10px; letter-spacing: 0.14em;
  padding: 4px 9px; border-radius: 3px; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cal-btn:hover, .cal-btn[aria-expanded="true"] { color: var(--amber); border-color: var(--amber-deep); }
.cal-btn-active { color: var(--amber); border-color: var(--amber-deep); }
.cal-panel {
  position: absolute; top: 100%; right: 12px;
  width: 312px; max-width: calc(100vw - 20px);
  background: var(--bg-2); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 14px; z-index: 60;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink); }
.cal-nav {
  background: none; border: none; color: var(--ink-dim);
  font-size: 18px; line-height: 1; padding: 2px 10px; cursor: pointer;
}
.cal-nav:hover:not(:disabled) { color: var(--amber); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span {
  font-family: var(--mono); text-align: center;
  font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-faint); padding: 2px 0 6px;
}
.cal-cell {
  position: relative; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink);
  background: none; border: 1px solid transparent; border-radius: 4px;
}
button.cal-cell { cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }
button.cal-cell:hover, button.cal-cell:focus-visible { border-color: var(--amber-deep); color: var(--amber-bright); outline: none; }
.cal-empty, .cal-out { color: var(--ink-faint); opacity: 0.3; }
.cal-past { color: var(--ink-faint); }
.cal-today { border-color: var(--amber); color: var(--amber-bright); }
.cal-viewing { background: rgba(227, 164, 75, 0.16); }
.cal-race { color: var(--amber-bright); font-weight: 600; }
.cal-ms {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--amber);
}
.cal-foot { margin-top: 10px; text-align: center; }
.cal-hint { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.13em; color: var(--ink-faint); }
.cal-back {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.13em;
  color: var(--amber); text-decoration: underline; text-underline-offset: 3px;
}
@media (max-width: 560px) {
  .cal-panel { right: 8px; }
  .daily-quote { margin-bottom: 24px; }
  .dq-text { font-size: 14px; }
}
