/* ==========================================================================
   COMMON — a design study in the International Fixed Calendar
   Warm paper, near-black ink, one electric cobalt. No external assets.
   ========================================================================== */

:root {
  --paper: #f5f3ed;
  --paper-raised: #fbfaf6;
  --paper-sunk: #f1efe7;
  --ink: #16150f;
  --ink-soft: #3b3931;
  --muted: #625f55;
  --faint: #8b877b;
  --line: rgba(22, 21, 15, 0.16);
  --line-strong: rgba(22, 21, 15, 0.32);
  --cobalt: #244df5;
  --cobalt-deep: #173bd6;
  --cobalt-wash: rgba(36, 77, 245, 0.065);
  --green: #16713d;
  --green-bright: #2fae6b;
  --red: #a92c20;
  --on-cobalt: #f7f5ef;
  --on-cobalt-dim: rgba(247, 245, 239, 0.88);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1280px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--cobalt);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#top,
#clock,
#unit,
#calendar,
#convert,
#idea {
  scroll-margin-top: 88px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--cobalt);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.accent {
  color: var(--cobalt);
}

.mono-label {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 243, 237, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  flex: none;
}

.brand-word {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
}

.brand-ratio {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 3px 4px;
  border: 1px solid rgba(36, 77, 245, 0.38);
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.03em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.brand-ratio span {
  opacity: 0.5;
}

.brand:hover .brand-ratio {
  background: var(--cobalt);
  color: var(--paper);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover {
  color: var(--cobalt);
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */

.nojs,
.app-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--cobalt);
  background: var(--cobalt-wash);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.nojs strong {
  font-weight: 650;
}

.app-status {
  border-color: var(--red);
  background: rgba(169, 44, 32, 0.06);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(40px, 3.5vw, 50px);
  padding-bottom: clamp(30px, 3.5vw, 40px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(14px, 1.8vw, 20px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow-mark {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--cobalt);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 9vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.hero h1 em {
  font-style: italic;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(18px, 2.2vw, 26px);
  padding-top: clamp(14px, 1.6vw, 18px);
  border-top: 1px solid var(--line);
}

.hero-intro {
  max-width: 58ch;
}

.hero-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.7;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 650;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-jump span {
  transition: transform 0.2s var(--ease);
}

.hero-jump:hover span {
  transform: translateY(3px);
}

.live-panel {
  padding-left: clamp(16px, 2.2vw, 28px);
  border-left: 1px solid var(--line);
}

.live-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(47, 174, 107, 0.14);
  animation: live-pulse 2.4s var(--ease) infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(47, 174, 107, 0.14);
  }
  50% {
    opacity: 0.65;
    box-shadow: 0 0 0 6px rgba(47, 174, 107, 0.04);
  }
}

.live-word {
  color: var(--green);
  font-weight: 600;
}

.zone-chip {
  padding: 3px 5px;
  border: 1px solid rgba(36, 77, 245, 0.35);
  color: var(--cobalt);
  line-height: 1;
  letter-spacing: 0.08em;
}

.live-date {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.live-time {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.live-time #hero-ordinary {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.live-time-label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-zone-name {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */

.section-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--cobalt);
}

.section-tag-cobalt {
  color: var(--cobalt);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.section-head h2 em {
  font-style: italic;
}

.section-lede {
  max-width: 44ch;
  margin: 0;
  padding-bottom: 6px;
  justify-self: end;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Clock + today card
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.clock-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  border-radius: var(--radius);
}

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

.panel-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.zone-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: var(--radius);
}

.zone-btn {
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.zone-btn:hover {
  color: var(--cobalt);
}

.zone-btn[aria-pressed="true"] {
  background: var(--cobalt);
  color: var(--paper);
}

.zone-btn[aria-pressed="true"]:hover {
  background: var(--cobalt-deep);
  color: var(--paper);
}

.clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-top: clamp(26px, 3.4vw, 44px);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(3rem, 9.6vw, 8.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.clock > :nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.clock > :nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.clock > :nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.clock > :nth-child(4) {
  grid-column: 4;
  grid-row: 1;
}

.clock > :nth-child(5) {
  grid-column: 5;
  grid-row: 1;
}

.clock > :nth-child(6) {
  grid-column: 1;
  grid-row: 2;
}

.clock > :nth-child(7) {
  grid-column: 3;
  grid-row: 2;
}

.clock > :nth-child(8) {
  grid-column: 5;
  grid-row: 2;
}

.clock-num {
  min-width: 0;
  text-align: center;
}

.clock-sep {
  align-self: center;
  color: var(--cobalt);
  font-size: 0.55em;
  line-height: 1;
  opacity: 0.72;
}

.clock.day-measure {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
}

.clock.day-measure .clock-label {
  grid-column: 1;
  grid-row: 2;
}

.clock-label {
  padding-top: clamp(12px, 1.7vw, 20px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(8px, 0.8vw, 10px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.clock-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(18px, 2.4vw, 24px);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.clock-zone {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.clock-zone::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 1px;
}

.clock-note {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-align: right;
}

.day-progress {
  margin-top: auto;
  padding-top: clamp(22px, 3vw, 32px);
}

.day-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rail {
  position: relative;
  height: 2px;
  background: rgba(22, 21, 15, 0.14);
}

.rail-fill {
  position: absolute;
  inset: 0;
  background: var(--cobalt);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.rail-tick {
  position: absolute;
  top: -3px;
  z-index: 2;
  width: 1px;
  height: 8px;
  background: var(--line-strong);
}

.rail-tick-start {
  left: 0;
}

.rail-tick-mid {
  left: 50%;
}

.rail-tick-end {
  right: 0;
}

.rail-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.rail-labels span:nth-child(1) {
  justify-self: start;
}

.rail-labels span:nth-child(2) {
  justify-self: center;
}

.rail-labels span:nth-child(3) {
  justify-self: end;
  text-align: right;
}

/* How to read the dial (linked from the landing clock) ---------------------- */

.dial-help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.dial-help-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dial-help-lede {
  margin: 0 0 12px;
  max-width: 60ch;
  line-height: 1.65;
}

.dial-help-list {
  margin: 0 0 16px;
  padding-inline-start: 18px;
  display: grid;
  gap: 8px;
  max-width: 72ch;
  line-height: 1.65;
  color: var(--ink-soft);
}

.dial-help-list strong {
  color: var(--ink);
}

.dial-help-figure {
  margin: 0 0 14px;
  max-width: 350px;
}

.dial-help-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.dial-help-figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dial-help-note {
  margin: 0;
  max-width: 60ch;
  line-height: 1.65;
  color: var(--ink-soft);
}

.dial-help-note + .dial-help-note {
  margin-top: 12px;
}

.dh-ring {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.4;
  stroke-width: 1.2;
}

.dh-tick {
  stroke: var(--ink);
  stroke-linecap: round;
}

.dh-minor {
  stroke-opacity: 0.45;
}

.dh-medium {
  stroke-opacity: 0.62;
}

.dh-major {
  stroke-opacity: 0.8;
}

html[data-theme="dark"] .dh-minor {
  stroke-opacity: 0.35;
}

html[data-theme="dark"] .dh-medium {
  stroke-opacity: 0.5;
}

html[data-theme="dark"] .dh-major {
  stroke-opacity: 0.75;
}

.dh-label {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.dh-hand line {
  stroke: var(--ink);
  stroke-linecap: round;
}

.dh-minute line {
  stroke: var(--cobalt);
}

/* Today card --------------------------------------------------------------- */

.date-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--cobalt);
  color: var(--on-cobalt);
}

.date-card::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(247, 245, 239, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.date-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -38px;
  width: 176px;
  height: 176px;
  border: 1px solid rgba(247, 245, 239, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.date-card > * {
  position: relative;
  z-index: 1;
}

.date-card :focus-visible {
  outline-color: var(--on-cobalt);
}

.date-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.date-kicker,
.date-zone {
  margin: 0;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.date-zone {
  padding: 3px 6px;
  border: 1px solid rgba(247, 245, 239, 0.45);
  line-height: 1;
}

.date-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(24px, 4vw, 44px);
}

.date-month {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.date-day {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5.5rem, 10vw, 8rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.78;
  letter-spacing: -0.06em;
}

.date-weekday {
  margin: 14px 0 0;
  color: var(--on-cobalt-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.date-special {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.date-special-note {
  margin: 12px 0 0;
  color: var(--on-cobalt-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.date-card-foot {
  padding-top: 14px;
  border-top: 1px solid rgba(247, 245, 239, 0.3);
}

.date-gregorian {
  margin: 0 0 12px;
  color: var(--on-cobalt);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.year-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-light {
  background: rgba(247, 245, 239, 0.28);
}

.rail-light .rail-fill {
  background: var(--on-cobalt);
}

.date-week {
  margin: 8px 0 0;
  color: var(--on-cobalt-dim);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   The beat — COMMON unit of time
   -------------------------------------------------------------------------- */

.unit {
  padding-top: clamp(72px, 10vw, 140px);
}

.unit-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.unit-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
}

.unit-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.unit-symbol {
  margin: 0;
  color: var(--cobalt);
  font-family: var(--serif);
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  font-style: italic;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.unit-card h3 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.unit-value {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.unit-exact {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.unit-facts {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.unit-facts div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.unit-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.unit-facts dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.unit-facts dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.unit-copy {
  min-width: 0;
}

.unit-definition {
  max-width: 62ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.unit-definition strong {
  font-weight: 600;
}

.unit-copy .unit-note {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.unit-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.unit-chain li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 20px 16px 0;
  border-right: 1px solid var(--line);
}

.unit-chain li:last-child {
  padding-right: 0;
  border-right: 0;
}

.unit-chain li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 14px;
  right: 6px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 12px;
}

.unit-chain-index {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.unit-chain-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.1;
}

.unit-chain-value {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.unit-chain-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.unit-closing {
  max-width: 70ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.unit-paper {
  margin: 18px 0 0;
}

.unit-paper a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.unit-paper a:hover {
  color: var(--cobalt-deep);
}

/* --------------------------------------------------------------------------
   Facts strip
   -------------------------------------------------------------------------- */

.facts {
  margin-top: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-sunk);
}

.facts-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(36px, 5vw, 64px);
}

.facts-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.facts-copy h2 em {
  font-style: italic;
}

.facts-note {
  max-width: 36ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}

.fact-num {
  margin: 0 0 8px;
  color: var(--cobalt);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.fact-name {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fact-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Calendar
   -------------------------------------------------------------------------- */

.calendar {
  padding-top: clamp(72px, 10vw, 140px);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 10px;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  border-color: var(--cobalt);
  background: var(--cobalt-wash);
  color: var(--cobalt);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn:disabled:hover {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.year-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.year-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#calendar-year {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.follow-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--green-bright);
}

.follow-note.is-browsing .dot {
  background: var(--cobalt);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 8px;
}

.btn-primary {
  background: var(--cobalt);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--cobalt-deep);
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.selection {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
  background: var(--cobalt-wash);
}

.selection-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.selection-today {
  padding: 2px 5px;
  border: 1px solid var(--cobalt);
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.selection-sub {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.selection-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.selection-meta > div {
  min-width: 0;
}

.selection-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.selection-meta strong {
  display: block;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.selection-meta .mono-value {
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.months-grid {
  display: contents;
}

.month-card {
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 250, 246, 0.72);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.month-card:hover {
  border-color: var(--line-strong);
  background: var(--paper-raised);
}

.month-card.is-sol {
  padding-top: 13px;
  border-top: 2px solid var(--cobalt);
}

.month-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.month-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.month-card.is-sol .month-index {
  color: var(--cobalt);
}

.month-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.month-days {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 4px;
}

.weekdays span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
}

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

.cal-day {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: clamp(10px, 0.95vw, 12px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}

.cal-day:hover {
  background: var(--cobalt-wash);
  color: var(--cobalt);
}

.cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--cobalt);
  color: var(--cobalt);
  font-weight: 600;
}

.cal-day.is-selected {
  background: var(--cobalt);
  color: var(--paper);
  font-weight: 600;
}

.cal-day.is-selected:hover {
  background: var(--cobalt-deep);
  color: var(--paper);
}

.cal-day.is-selected.is-today {
  box-shadow: inset 0 0 0 2px rgba(247, 245, 239, 0.7);
}

.cal-day:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 1px;
}

/* Outside the week -------------------------------------------------------- */

.outside-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 24px;
  align-items: center;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px dashed rgba(36, 77, 245, 0.55);
  border-radius: var(--radius);
  background: var(--cobalt-wash);
}

.outside-copy h3 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.outside-copy p {
  max-width: 54ch;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.outside-copy .outside-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.outside-copy .outside-status {
  margin: 12px 0 0;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.special-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.special-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 124px;
  padding: 12px 14px;
  border: 1px solid var(--cobalt);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cobalt);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.special-badge:hover,
.special-badge.is-selected {
  background: var(--cobalt);
  color: var(--paper);
}

.special-badge.is-today {
  box-shadow: inset 0 0 0 1px var(--cobalt);
}

.special-badge.is-today.is-selected {
  box-shadow: inset 0 0 0 2px rgba(247, 245, 239, 0.7);
}

.special-name {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.special-day {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.special-badge.is-muted,
.special-badge.is-unavailable {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
  background: transparent;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Converter
   -------------------------------------------------------------------------- */

.converter {
  padding-top: clamp(72px, 10vw, 140px);
}

.converter-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.converter-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 4vw, 48px);
  border-right: 1px solid var(--line);
  background: var(--paper-sunk);
}

.converter-intro h2 {
  margin: 8px 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.converter-intro p {
  max-width: 40ch;
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.converter-zone-note {
  margin-top: 12px !important;
  color: var(--cobalt) !important;
  font-family: var(--mono);
  font-size: 9px !important;
  line-height: 1.6 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.converter-intro .zone-switch {
  margin-top: 10px;
}

.converter-card {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
}

#converter-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#converter-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.4;
  color-scheme: light;
}

#converter-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.form-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--red);
  background: rgba(169, 44, 32, 0.06);
  color: var(--red);
  font-size: 13px;
  line-height: 1.55;
}

.converter-result {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.result-date {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.result-time {
  margin: 4px 0;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.result-sub {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.result-source {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   The idea + FAQ
   -------------------------------------------------------------------------- */

.idea {
  padding-top: clamp(72px, 10vw, 140px);
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
}

.idea-card {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.idea-index {
  margin: 0 0 18px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.idea-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.idea-card p:last-child {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(56px, 8vw, 100px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line-strong);
}

.faq-intro h3 {
  margin: 8px 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

.faq-intro h3 em {
  font-style: italic;
}

.faq-intro p {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.faq-list {
  min-width: 0;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: none;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "\2212";
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.faq-list details p {
  max-width: 62ch;
  margin: 0;
  padding: 0 24px 16px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.closing {
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
}

.closing em {
  color: var(--cobalt);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 32px 0 44px;
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: start;
}

.footer-brand p {
  max-width: 32ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer-nav a {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.15s var(--ease);
}

.footer-nav a:hover {
  color: var(--cobalt);
}

.footer-fine {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
  text-align: right;
}

.footer-fine span {
  display: inline-block;
  margin-top: 6px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .feature {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  }

  .outside-card {
    grid-template-columns: 1fr;
  }

  .special-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 999px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-lede {
    justify-self: start;
    max-width: 52ch;
    padding-bottom: 0;
  }

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

  .outside-card {
    grid-column: span 1;
  }

  .facts-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .idea-grid {
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-fine {
    grid-column: span 2;
    text-align: left;
  }
}

@media (max-width: 860px) {
  .hero-foot {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .live-panel {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

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

  .unit-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-chain li:nth-child(2n) {
    padding-right: 0;
    border-right: 0;
  }

  .unit-chain li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .unit-chain li:nth-child(2n)::after {
    display: none;
  }

  .date-card {
    min-height: 360px;
  }

  .converter-panel {
    grid-template-columns: 1fr;
  }

  .converter-intro {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .faq-intro p {
    max-width: 46ch;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 4px 16px;
    padding-block: 8px;
  }

  .site-nav {
    flex: 1 1 100%;
    justify-content: flex-end;
    margin-left: 0;
    gap: 8px 14px;
  }

  #top,
  #clock,
  #unit,
  #calendar,
  #convert,
  #idea {
    scroll-margin-top: 112px;
  }

  .calendar-toolbar {
    align-items: flex-start;
  }

  .calendar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-fine {
    grid-column: auto;
  }

  .unit-chain {
    grid-template-columns: 1fr;
  }

  .unit-chain li,
  .unit-chain li:nth-child(2n) {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .unit-chain li:last-child {
    border-bottom: 0;
  }

  .unit-chain li::after {
    display: none;
  }
}

@media (max-width: 700px) {
  .selection {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .selection-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .selection-meta > div:last-child {
    grid-column: span 2;
  }

  .idea-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .idea-card {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .idea-card p:last-child {
    max-width: 52ch;
  }

  .facts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fact {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: baseline;
  }

  .fact-num {
    grid-row: span 2;
    margin: 0;
  }

  .fact-name {
    margin-bottom: 2px;
  }

  .fact-desc {
    max-width: 40ch;
  }
}

@media (max-width: 560px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .outside-card {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .header-inner {
    min-height: 62px;
    gap: 4px 14px;
  }

  .brand {
    gap: 7px;
  }

  .brand-word {
    font-size: 11px;
    letter-spacing: 0.17em;
  }

  .brand-ratio {
    font-size: 7px;
    padding: 2px 3px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav a {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10.5vw, 3.2rem);
  }

  .clock-card,
  .date-card {
    padding: 20px;
  }

  .clock {
    margin-top: 34px;
    font-size: clamp(2.9rem, 13vw, 4.2rem);
  }

  .clock-label {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .clock-note {
    max-width: none;
    text-align: left;
  }

  .rail-labels {
    font-size: 8px;
  }

  .panel-head {
    align-items: center;
  }

  .date-day {
    font-size: clamp(5.2rem, 24vw, 7rem);
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .converter-card,
  .converter-intro {
    padding: 22px 20px;
  }

  .selection {
    padding: 14px 16px;
  }

  .special-badge {
    flex: 1 1 120px;
  }

  .closing {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .site-nav {
    gap: 8px;
  }

  .site-nav a {
    font-size: 7.5px;
  }

  .clock {
    font-size: 2.8rem;
  }

  .clock-note {
    font-size: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .live-dot {
    animation: none;
  }
}
