:root {
  --bg: #0a0d13;
  --bg-glow: #10141d;
  --panel: #111623;
  --panel-2: #161c2c;
  --line: #26304a;
  --gold: #d9b45b;
  --gold-bright: #f2d78f;
  --gold-dim: #8a7440;
  --text: #e9e4d7;
  --muted: #a09a86;
  --faint: #6e6a5d;
  --danger: #c4453c;
  --serif-display: "Cinzel", Georgia, "Times New Roman", serif;
  --serif-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -100px, var(--bg-glow), transparent 70%),
    radial-gradient(900px 600px at 90% 20%, rgba(217, 180, 91, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.55;
}

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  background: #06080d;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold);
  padding: 7px 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
  opacity: 0.85;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 13, 19, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.brand-name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-clock {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.topbar-time {
  display: block;
  font-family: var(--serif-display);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.topbar-date {
  display: block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- hero ---------- */
.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  text-align: center;
}

.kicker {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.06;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 34px;
  color: var(--gold-bright);
  text-shadow: 0 0 46px rgba(217, 180, 91, 0.24);
}

.hero-verse {
  margin: 0 auto 30px;
  padding: 22px 26px;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
}

.hero-verse p {
  margin: 0;
  font-size: clamp(19px, 2.6vw, 25px);
  font-style: italic;
  line-height: 1.5;
}

.hero-verse cite {
  display: block;
  margin-top: 12px;
  font-family: var(--serif-display);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.thesis {
  margin: 0;
  font-size: 19px;
  color: var(--text);
  text-align: left;
}

.thesis strong {
  color: var(--gold-bright);
  font-weight: 600;
}

.thesis em {
  color: var(--gold);
}

.thesis-tag {
  display: block;
  margin-top: 14px;
  font-family: var(--serif-display);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- panels ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 64px;
}

.panel {
  margin-bottom: 34px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.panel h2 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.panel-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 64ch;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px;
}

/* ---------- hour panel ---------- */
.hour-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.hour-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--gold-dim);
}

.hour-card--next {
  border-color: var(--line);
  opacity: 0.94;
}

.hour-time-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

.hour-big {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.hour-big--small {
  font-size: clamp(30px, 4vw, 40px);
}

.hour-name {
  font-family: var(--serif-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hour-justification {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
}

.hour-card--next .hour-justification {
  font-size: 17px;
  color: var(--text);
}

.verse {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-style: italic;
}

.verse:empty {
  display: none;
}

.hour-progress {
  margin-top: auto;
}

.hour-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

#hour-countdown {
  color: var(--gold-bright);
}

.bar {
  height: 8px;
  background: #070a10;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  transition: width 0.9s linear;
}

.hour-progress-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--faint);
}

.hour-footnote {
  margin-top: auto;
  font-size: 13px;
  color: var(--faint);
}

.panel-subhead .next-title {
  margin: 2px 0 0;
  font-family: var(--serif-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- day card ---------- */
.day-card {
  border-color: var(--gold-dim);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.day-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.day-date {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.day-weekday {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--gold);
  white-space: nowrap;
}

.badge--anchor {
  background: rgba(217, 180, 91, 0.12);
}

.day-reason {
  margin: 0;
  font-size: 19px;
  line-height: 1.62;
}

/* ---------- week list ---------- */
.week-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.week-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.week-row--loading {
  display: block;
  color: var(--faint);
}

.week-row--today {
  background: linear-gradient(90deg, rgba(217, 180, 91, 0.1), transparent 70%);
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

.week-day-label {
  font-family: var(--serif-display);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-day-label .week-day-date {
  font-family: var(--serif-body);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
}

.week-day-today {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--gold-bright);
}

.week-day-reason {
  margin: 0;
  font-size: 17px;
  line-height: 1.58;
}

.week-day-verse {
  margin: 8px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

/* ---------- year ---------- */
.year-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-btn {
  font-family: var(--serif-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.year-btn:hover {
  background: rgba(217, 180, 91, 0.14);
}

.year-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.year-current {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  min-width: 92px;
  text-align: center;
}

.year-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: start;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.month-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
}

.month-title {
  margin: 0 0 8px;
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.dow {
  font-family: var(--serif-display);
  font-size: 9px;
  text-align: center;
  color: var(--faint);
  padding-bottom: 3px;
}

.day-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: #0c101a;
  color: var(--muted);
  font-family: var(--serif-body);
  font-size: 13px;
  border-radius: 2px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.day-cell:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}

.day-cell.is-today {
  color: var(--bg);
  background: var(--gold);
  font-weight: 600;
}

.day-cell.is-selected {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(217, 180, 91, 0.16);
}

.day-cell.is-today.is-selected {
  background: var(--gold-bright);
  color: var(--bg);
}

.day-cell.is-anchor::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-bright);
}

.day-cell.is-today.is-anchor::after {
  background: var(--bg);
}

.day-detail {
  position: sticky;
  top: 86px;
  border-color: var(--gold-dim);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
}

.day-detail .day-reason {
  font-size: 17px;
}

.data-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #07090e;
  padding: 44px 24px 60px;
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  margin: 0 0 14px;
  font-family: var(--serif-display);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-verse {
  margin: 0 0 18px;
  font-style: italic;
  color: var(--text);
  font-size: 17px;
}

.footer-disclaimer {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--faint);
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hour-grid,
  .year-layout {
    grid-template-columns: 1fr;
  }

  .year-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-detail {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .topbar-inner {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 12px;
    max-width: 170px;
    line-height: 1.25;
    letter-spacing: 0.08em;
  }

  .hero {
    padding-top: 48px;
  }

  main {
    padding: 8px 16px 48px;
  }

  .card {
    padding: 20px;
  }

  .week-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .year-grid {
    grid-template-columns: 1fr;
  }
}
