:root {
  --page: #f4f1ea;
  --surface: #fbfaf6;
  --ink: #17201d;
  --muted: #6d746f;
  --line: #dcd9d1;
  --accent: #b55432;
  --accent-soft: #f0ddd4;
  --dark: #18211e;
  --white: #fffefa;
  --radius: 20px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 10; padding: 10px 14px;
  background: var(--dark); color: var(--white); border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.site-header, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-header {
  height: 88px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 25px; height: 25px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; display: inline-block; }
.brand-mark::before { content: ""; position: absolute; width: 1px; height: 23px; background: currentColor; left: 11px; top: 0; }
.brand-mark i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); top: 4px; left: 9px; }
.header-nav { display: flex; align-items: center; gap: 21px; }
.header-nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.header-nav a:hover, .header-nav a.active { color: var(--ink); }
.header-nav a.active { font-weight: 650; }

.hero {
  min-height: 520px; padding: 76px 6%; display: grid; grid-template-columns: 1.2fr .8fr;
  align-items: center; gap: 72px; border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.time-display { margin: 0; font-family: var(--serif); font-size: clamp(84px, 12vw, 162px); line-height: .83; font-weight: 400; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.time-display > #local-time > span { color: var(--accent); font-size: .42em; letter-spacing: -.02em; vertical-align: top; line-height: 1.1; margin-left: 8px; }
.full-date { margin: 28px 0 20px; font-family: var(--serif); font-size: clamp(21px, 2vw, 28px); color: #404944; }
.location-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.location-line strong { color: var(--ink); font-weight: 600; }
.location-pin { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.utc-pill { padding: 5px 9px; border-radius: 999px; background: var(--accent-soft); color: #7e3722; font-size: 12px; font-weight: 650; }

.day-arc { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.arc-track { position: relative; height: 138px; border: 1px solid var(--line); border-bottom: 0; border-radius: 160px 160px 0 0; }
.arc-track::after { content: ""; position: absolute; bottom: 0; left: -8px; right: -8px; border-bottom: 1px solid var(--line); }
.arc-track span { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); left: 0; bottom: -7px; transform: translateX(-50%); box-shadow: 0 0 0 7px rgba(181, 84, 50, .13); transition: left .6s linear, bottom .6s linear; }
.arc-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-top: 13px; letter-spacing: .05em; }
.day-arc p { margin: 28px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.city-strip { padding: 58px 0 66px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-heading.compact { margin-bottom: 22px; }
h2 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 50px); font-weight: 400; letter-spacing: -.035em; }
.zone-count { color: var(--muted); font-size: 13px; margin: 0 0 5px; }
.city-row { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.22); }
.city-card { min-width: 0; padding: 22px 20px; border-right: 1px solid var(--line); }
.city-card:last-child { border-right: 0; }
.city-card p { margin: 0; }
.city-name { font-size: 12px; color: var(--muted); margin-bottom: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-time { font-family: var(--serif); font-size: 25px; font-variant-numeric: tabular-nums; }
.city-day { color: var(--accent); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; margin-top: 7px !important; }

.world-section { padding: 72px 0 92px; }
.map-intro { max-width: 760px; padding: 86px 0 64px; }
.map-intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(49px, 7vw, 82px); font-weight: 400; line-height: .98; letter-spacing: -.05em; }
.map-intro > p:not(.eyebrow):not(.map-now) { max-width: 610px; margin: 25px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.map-now { display: inline-block; margin: 27px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: #77412a; background: var(--accent-soft); font-size: 13px; font-weight: 600; }
.map-frame { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.map-topline { display: flex; justify-content: space-between; align-items: center; padding: 3px 2px 22px; }
.map-topline h2 { font-family: var(--sans); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.map-topline span { color: var(--muted); font-size: 12px; }
.timezone-map { margin: 0; }
.timezone-map svg { display: block; width: 100%; height: auto; }
.timezone-map figcaption { max-width: 650px; margin: 18px 2px 1px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ocean { fill: #e8efec; }
.map-border { fill: none; stroke: #b8c6bd; stroke-width: 1.2; }
.graticule line { stroke: #c8d4cd; stroke-width: .75; opacity: .78; }
.country { fill: #819187; stroke: #f7f8f4; stroke-width: .72; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.country:hover { fill: #687970; }
.city-marker circle { fill: var(--accent); stroke: var(--white); stroke-width: 2; }
.city-marker text { fill: #26332d; font-family: var(--sans); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #e8efec; stroke-width: 3px; stroke-linejoin: round; }
.city-marker tspan + tspan { fill: #9d472c; font-size: 10px; font-weight: 650; }
.land { fill: #5e6b64; opacity: .92; stroke: #f0f3ee; stroke-width: 2; stroke-linejoin: round; }
.timezone-bands rect { transition: fill .25s ease; }
.timezone-bands rect.current-zone { fill: #cd8a71; }
.map-labels { fill: #657069; font-family: var(--sans); font-size: 12px; font-weight: 650; }
.map-labels text:last-child { text-anchor: end; }
.map-notes { display: grid; grid-template-columns: repeat(3, 1fr); padding: 66px 0 90px; }
.map-notes article { min-height: 218px; padding: 0 30px; border-left: 1px solid var(--line); }
.map-notes article:first-child { padding-left: 0; border-left: 0; }
.map-notes article:last-child { padding-right: 0; }
.map-notes article > span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.map-notes h2 { margin-top: 22px; font-size: 29px; }
.map-notes p { max-width: 290px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.map-notes a { color: var(--ink); display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 650; text-decoration: none; border-bottom: 1px solid currentColor; }
.map-notes a span { color: var(--accent); margin-left: 5px; }
.clock-explainer { max-width: 740px; padding: 76px 0 90px; border-top: 1px solid var(--line); }
.clock-explainer h2 { font-size: clamp(31px, 4vw, 46px); }
.clock-explainer > p:last-child { max-width: 660px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.noscript-message { margin: 0; padding: 16px 24px; background: #fff4e9; color: #70401f; text-align: center; }
.toolbar { display: grid; grid-template-columns: 1fr 190px auto; gap: 10px; margin-bottom: 20px; }
.search-field, .select-wrap { min-height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search-field { display: flex; align-items: center; gap: 11px; padding: 0 16px; color: var(--muted); }
.search-field:focus-within, .select-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 84, 50, .12); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-field input::placeholder { color: #939792; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 15px; top: 12px; color: var(--muted); pointer-events: none; }
.select-wrap select { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 36px 0 15px; color: var(--ink); background: transparent; appearance: none; }
.format-toggle, .empty-state button { min-height: 48px; padding: 0 18px; border: 1px solid var(--dark); border-radius: 10px; background: var(--dark); color: var(--white); font-weight: 650; }
.format-toggle:hover, .empty-state button:hover { background: #2a3531; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(181, 84, 50, .35); outline-offset: 2px; }

.timezone-list { border-top: 1px solid var(--ink); }
.zone-row { min-height: 78px; display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 1fr) 110px 130px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.zone-place { min-width: 0; }
.zone-place strong { display: block; font-size: 15px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-place span, .zone-abbr { color: var(--muted); font-size: 12px; }
.zone-time { font-family: var(--serif); font-size: 25px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zone-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.zone-offset { justify-self: end; font-size: 12px; font-weight: 650; padding: 6px 9px; background: #e8e5de; border-radius: 999px; white-space: nowrap; }
.empty-state { text-align: center; padding: 78px 24px; border-bottom: 1px solid var(--line); }
.empty-state h3 { font-family: var(--serif); font-size: 30px; font-weight: 400; margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 22px; }

footer { min-height: 110px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; }
footer .small { color: var(--ink); margin-right: auto; }
footer .small .brand-mark { transform: scale(.8); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 64px 0; gap: 62px; }
  .day-arc { width: min(460px, 88%); margin: auto; }
  .city-row { grid-template-columns: repeat(3, 1fr); }
  .city-card:nth-child(3) { border-right: 0; }
  .city-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .toolbar { grid-template-columns: 1fr 180px; }
  .format-toggle { grid-column: 2; grid-row: 1; }
  .select-wrap { grid-column: 1 / -1; }
  .map-notes { grid-template-columns: 1fr; padding: 46px 0 66px; }
  .map-notes article, .map-notes article:first-child, .map-notes article:last-child { min-height: 0; padding: 24px 0; border: 0; border-top: 1px solid var(--line); }
  .map-notes article:first-child { border-top: 0; padding-top: 0; }
}

@media (max-width: 640px) {
  .site-header, main, footer { width: min(100% - 30px, 1180px); }
  .site-header { height: 72px; }
  .header-nav { gap: 13px; }
  .header-nav a { font-size: 12px; }
  .hero { padding: 52px 0 58px; }
  .time-display { font-size: clamp(67px, 22vw, 100px); }
  .time-display > #local-time > span { display: block; margin: 14px 0 0 4px; font-family: var(--sans); font-size: 18px; letter-spacing: .08em; color: var(--accent); }
  .day-arc { width: 82%; }
  .city-row { grid-template-columns: repeat(2, 1fr); }
  .city-card { border-bottom: 1px solid var(--line); }
  .city-card:nth-child(2n) { border-right: 0; }
  .city-card:nth-last-child(-n+2) { border-bottom: 0; }
  .toolbar { grid-template-columns: 1fr auto; }
  .format-toggle { min-width: 102px; }
  .zone-row { grid-template-columns: 1.25fr .75fr auto; gap: 10px; min-height: 86px; }
  .zone-time { font-size: 21px; text-align: right; }
  .zone-abbr { display: none; }
  .zone-date { grid-column: 1 / 3; grid-row: 2; margin-top: -20px; }
  .zone-offset { grid-column: 3; grid-row: 1 / 3; }
  .section-heading { align-items: start; flex-direction: column; }
  .map-intro { padding: 58px 0 42px; }
  .map-frame { margin-inline: -4px; padding: 12px; border-radius: 14px; }
  .map-topline { padding: 2px 2px 12px; }
  .map-topline span { display: none; }
  .timezone-map { overflow-x: auto; }
  .timezone-map svg { width: 720px; max-width: none; }
  .timezone-map figcaption { margin: 14px 2px 2px; }
  footer { flex-wrap: wrap; padding: 26px 0; gap: 8px 18px; }
  footer .small { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
