/* =================================================================
   Exact Time stylesheet
   Palette: enamel dial (light) / night dial (dark), blued-steel
   accent, signal red reserved for the seconds.
   Type: Barlow Semi Condensed for numerals and headings, Barlow for text.
   ================================================================= */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f3f5f8;          /* enamel dial */
  --surface: #ffffff;
  --ink: #141a26;
  --muted: #566073;
  --rule: #cdd3dd;
  --rule-soft: #e2e6ed;
  --accent: #2445a6;      /* blued steel */
  --accent-ink: #ffffff;
  --accent-soft: #e3e9f8;
  --signal: #d0202e;      /* seconds hand red */
  --good: #1d7a4d;
  --bad: #b3261e;
  --ad: #e8ebf0;

  --f-display: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2.125rem;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1424;        /* night dial */
    --surface: #141e33;
    --ink: #e8ecf3;
    --muted: #97a3ba;
    --rule: #2b3752;
    --rule-soft: #1f2a42;
    --accent: #8aa8ff;
    --accent-ink: #0d1424;
    --accent-soft: #1d2a4d;
    --signal: #ff5a60;
    --good: #5cc98f;
    --bad: #ff7a72;
    --ad: #18233b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1424;
  --surface: #141e33;
  --ink: #e8ecf3;
  --muted: #97a3ba;
  --rule: #2b3752;
  --rule-soft: #1f2a42;
  --accent: #8aa8ff;
  --accent-ink: #0d1424;
  --accent-soft: #1d2a4d;
  --signal: #ff5a60;
  --good: #5cc98f;
  --bad: #ff7a72;
  --ad: #18233b;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--f-text);
  font-variant-numeric: tabular-nums;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
code { font-family: var(--f-code); font-size: 0.88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { 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; left: 1rem; top: -3rem; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 0.5rem); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons and controls ---------- */
.btn, .chip, .seg__btn, .copy, .nav-toggle, .theme-toggle, .linklike {
  font: inherit; color: inherit; cursor: pointer; background: none; border: 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: 0.5em 1.1em;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); font-weight: 500; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; border-color: var(--rule); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { filter: brightness(1.08); }

.chip {
  min-height: 40px; padding: 0.35em 0.95em;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: var(--step--1); font-weight: 500; color: var(--ink);
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip--strong { border-color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg--wrap { flex-wrap: wrap; border-radius: 22px; }
.seg__btn { min-height: 36px; padding: 0.25em 0.95em; border-radius: 999px; font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.seg__btn:hover { color: var(--ink); }
.seg__btn[aria-pressed="true"], .seg__btn[aria-selected="true"] { background: var(--ink); color: var(--bg); }

.linklike { color: var(--muted); text-decoration: underline; text-underline-offset: 0.18em; padding: 0; }
.linklike:hover { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: var(--step--1); color: var(--muted); }
.field > span { font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: var(--step-0); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  min-height: 44px; padding: 0.45em 0.7em; width: 100%;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: var(--step--1); margin: -0.5rem 0 1rem; }
.check { display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--step--1); font-weight: 500; min-height: 40px; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---------- Header ---------- */
.site-header { padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--rule-soft); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font: 500 1.3rem/1 var(--f-display); letter-spacing: 0.01em; }
.brand__mark { width: 28px; height: 28px; color: var(--accent); }
.brand__mark path { stroke: var(--ink); }
.brand__dot { fill: var(--signal); }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--radius); font-weight: 500; font-size: var(--step--1); }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; margin-left: 0.25rem; }
.theme-toggle:hover { color: var(--ink); background: var(--rule-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.nav-toggle { display: none; min-height: 40px; padding: 0 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius); font-weight: 500; font-size: var(--step--1); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.75rem; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.75rem 0.25rem; font-size: var(--step-0); border-bottom: 1px solid var(--rule-soft); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--signal); padding-left: 0.75rem; }
  .theme-toggle { align-self: flex-start; margin: 0.5rem 0 0; }
}

/* ---------- Ads ---------- */
.ad { display: grid; place-items: center; margin-inline: auto; background: var(--ad); border: 1px dashed var(--rule); border-radius: 4px; color: var(--muted); font-size: 0.75rem; overflow: hidden; }
.ad--live { background: transparent; border: 0; }
.ad--live .ad__label { display: none; }
.ad--top { width: min(728px, calc(100% - 2 * var(--gutter))); height: 90px; margin-block: 1rem; }
.ad--bottom { width: min(728px, calc(100% - 2 * var(--gutter))); height: 90px; margin-block: 2.5rem 1.5rem; }
.ad--side { width: 300px; max-width: 100%; height: 250px; }
.ad__mob { display: none; }
/* Your own banners */
.ad--banner { position: relative; display: block; background: none; border: 0; border-radius: 0; overflow: visible; }
.ad__link { display: block; width: 100%; height: 100%; }
.ad__link picture, .ad__link img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ad__tag { position: absolute; top: 0; right: 0; font-size: 0.625rem; line-height: 1; padding: 2px 4px; background: rgb(0 0 0 / 0.55); color: #fff; border-radius: 0 0 0 3px; pointer-events: none; }
@media (max-width: 760px) {
  .ad--top { width: 320px; max-width: calc(100% - 2 * var(--gutter)); height: 50px; margin-block: 0.75rem; }
  .ad--bottom { width: 320px; max-width: calc(100% - 2 * var(--gutter)); height: 100px; }
  .ad__desk { display: none; }
  .ad__mob { display: inline; }
}

/* =================================================================
   Clock page
   ================================================================= */
.clock { padding-block: clamp(1rem, 3vw, 2.5rem) 2rem; }
.clock__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.clock__main { min-width: 0; }
.clock__zone { font-size: var(--step-1); font-weight: 500; color: var(--muted); margin-bottom: 0.25rem; letter-spacing: 0.01em; }

.clock__face { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.digits {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(4rem, 12.5vw, 11.25rem);
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: var(--ink);
  transition: color 0.4s;
}
.has-dial .digits { font-size: clamp(3rem, 8vw, 6.5rem); }
.digits .d { display: inline-block; width: 0.54em; text-align: center; }
.digits .c { display: inline-block; width: 0.26em; text-align: center; position: relative; top: -0.07em; color: var(--muted); }
.digits__ms { font-size: 0.42em; color: var(--muted); margin-left: 0.04em; }
.digits__ms .p { display: inline-block; width: 0.26em; text-align: center; }
.digits__ap { font-size: 0.3em; margin-left: 0.35em; color: var(--muted); letter-spacing: 0.04em; vertical-align: 0.15em; }
.is-unsynced .digits { color: var(--muted); }

/* Analogue dial */
.dial { width: clamp(150px, 22vw, 240px); height: auto; flex: none; }
.dial__rim { fill: var(--surface); stroke: var(--rule); stroke-width: 1.5; }
.dial__tick { stroke: var(--muted); stroke-width: 1; }
.dial__tick--five { stroke: var(--ink); stroke-width: 3; }
.dial__hour { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.dial__min { stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round; }
.dial__sec { stroke: var(--signal); stroke-width: 1.6; }
.dial__sec-tip { fill: var(--signal); }
.dial__cap { fill: var(--signal); }

/* The minute track: a watch's chapter ring, unrolled */
.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(60, 1fr);
  align-items: end;
  height: 30px;
  margin-top: clamp(0.75rem, 2vw, 1.25rem);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.track__tick { justify-self: center; width: 2px; height: 9px; background: var(--rule); }
.track__tick--five { height: 18px; width: 3px; }
.track__tick.is-past { background: var(--ink); }
.track__tick.is-now { background: var(--signal); height: 26px; }
.track__sweep { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.track__sweep::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--signal); opacity: 0.55; }
.is-unsynced .track__sweep { display: none; }

.clock__next { margin: 0.5rem 0 0; font-size: var(--step--1); color: var(--muted); }
.clock__date { margin: 1.5rem 0 0.25rem; font: 500 var(--step-1)/1.3 var(--f-display); }
.clock__verdict { margin: 0 0 1.5rem; color: var(--muted); }
.clock__verdict strong { color: var(--ink); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.toolbar__hint { margin: 0.75rem 0 0; font-size: var(--step--1); color: var(--muted); max-width: 60ch; }

/* Flash on the full minute */
.clock.is-flash .digits { animation: minute-flash 0.6s ease-out; }
@keyframes minute-flash { 0% { color: var(--signal); } 100% { color: var(--ink); } }
.clock.is-flash .track { animation: track-flash 0.6s ease-out; }
@keyframes track-flash { 0% { background: color-mix(in srgb, var(--signal) 25%, transparent); } 100% { background: transparent; } }

/* Side column */
.clock__side { display: flex; flex-direction: column; gap: 1.5rem; }
.sync { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.25rem; }
.sync__title { font-size: var(--step-1); margin-bottom: 0.75rem; }
.sync__list { margin: 0 0 1rem; }
.sync__list > div { padding: 0.55rem 0; border-top: 1px solid var(--rule-soft); }
.sync__list dt { font-size: 0.8125rem; color: var(--muted); }
.sync__list dd { margin: 0.1rem 0 0; font-weight: 500; overflow-wrap: anywhere; }
#s-ref { font-weight: 400; font-size: 0.9375rem; line-height: 1.45; }
.sync__note { font-size: var(--step--1); background: var(--accent-soft); color: var(--ink); padding: 0.6rem 0.75rem; border-radius: var(--radius); }

/* Watch tips */
.watch-tips { padding-block: 1.5rem 1rem; border-top: 1px solid var(--rule-soft); margin-top: 1rem; }
.watch-tips h2 { margin: 1.5rem 0 1.25rem; }
.watch-tips__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.watch-tips h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.watch-tips p { color: var(--muted); font-size: 0.97rem; }

@media (max-width: 980px) {
  .clock__grid { grid-template-columns: 1fr; }
  .clock__side { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .watch-tips__cols { grid-template-columns: 1fr; gap: 0.5rem; }
}
@media (max-width: 680px) {
  .clock__side { grid-template-columns: 1fr; }
  .ad--side { margin-inline: auto; }
  .clock__face { flex-direction: column; align-items: flex-start; }
  .digits { font-size: clamp(3.4rem, 19vw, 6rem); }
  .has-dial .digits { font-size: clamp(3rem, 15vw, 5rem); }
  .digits__ms { display: block; font-size: 0.36em; margin: 0.2em 0 0; }
  .track { height: 22px; }
  .track__tick { width: 1px; height: 6px; }
  .track__tick--five { width: 2px; height: 13px; }
  .track__tick.is-now { height: 20px; width: 2px; }
}

/* Full screen / focus mode */
body.is-focus { overflow: hidden; }
body.is-focus .site-header, body.is-focus .ad, body.is-focus .site-footer,
body.is-focus .watch-tips, body.is-focus .clock__side, body.is-focus .toolbar__hint,
body.is-focus .clock__verdict, body.is-focus .cd__head, body.is-focus .cd__panel,
body.is-focus .cd__sync, body.is-focus .consent { display: none !important; }
body.is-focus .clock, body.is-focus .cd {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem max(1rem, env(safe-area-inset-bottom, 0px));
}
body.is-focus .clock__grid { display: block; width: min(100%, 1600px); }
body.is-focus .clock__main { display: flex; flex-direction: column; align-items: center; text-align: center; }
body.is-focus .clock__face { justify-content: center; }
body.is-focus .digits { font-size: min(21vw, 42vh); }
body.is-focus .has-dial .digits, body.is-focus.has-dial .digits { font-size: min(13vw, 30vh); }
body.is-focus .has-dial .dial { width: min(30vw, 50vh); }
body.is-focus .track { width: 100%; }
body.is-focus .toolbar { justify-content: center; margin-top: 1rem; }
body.is-focus .toolbar > :not(#fullscreen):not(#cd-full) { display: none; }
@media (max-width: 680px) {
  body.is-focus .digits { font-size: min(19vw, 40vh); }
  body.is-focus .digits__ms { display: inline; font-size: 0.42em; }
}

/* =================================================================
   Countdown page
   ================================================================= */
.cd { padding-block: clamp(1rem, 3vw, 2.5rem) 1rem; }
.cd__head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.cd__head h1 { margin: 0; }
.cd__display { padding-block: 1.5rem 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.75rem; }
.cd__title { font: 500 var(--step-2)/1.2 var(--f-display); margin: 0 0 0.25rem; color: var(--muted); }
.cd__digits { margin: 0; font: 500 clamp(3.5rem, 13vw, 9.5rem)/1 var(--f-display); white-space: nowrap; }
.cd__digits .d { display: inline-block; width: 0.54em; text-align: center; }
.cd__digits .c { display: inline-block; width: 0.26em; text-align: center; color: var(--muted); position: relative; top: -0.07em; }
.cd__days { margin-right: 0.3em; }
.cd__days small { font-size: 0.35em; color: var(--muted); margin-left: 0.1em; }
.cd__tenth { font-size: 0.45em; color: var(--muted); }
.cd__target { margin: 0.75rem 0 0; color: var(--muted); }
.cd.is-done .cd__digits { color: var(--signal); animation: done-pulse 1s ease-in-out 3; }
@keyframes done-pulse { 50% { opacity: 0.35; } }
.cd__form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.cd__form .field { min-width: 10rem; }
.field--wide { flex: 1 1 16rem; }
.field--num { width: 6.5rem; min-width: 0 !important; }
.cd__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.form-msg { margin: 0.75rem 0 0; font-size: var(--step--1); color: var(--muted); min-height: 1.4em; }
.cd__options { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-soft); }
.cd__sync { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }
body.is-focus .cd { flex-direction: column; }
body.is-focus .cd__display { border: 0; text-align: center; }
body.is-focus .cd__digits { font-size: min(17vw, 38vh); }
body.is-focus .cd__options > :not(#cd-full) { display: none; }
body.is-focus .cd__options { border: 0; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .cd.is-done .cd__digits, .clock.is-flash .digits, .clock.is-flash .track { animation-duration: 0.01s; animation-iteration-count: 1; }
}

/* =================================================================
   Servers page
   ================================================================= */
.srv { padding-block: clamp(1rem, 3vw, 2.5rem) 1rem; }
.srv__intro { max-width: 70ch; margin-bottom: 1.75rem; }
.srv__live { font-size: var(--step--1); color: var(--muted); border-left: 3px solid var(--accent); padding-left: 0.75rem; }
.filters { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1rem; }
.filters__row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.filters__row .field { min-width: 11rem; }
.field--grow { flex: 1 1 14rem; }
.filters__count { margin: 0; font-size: var(--step--1); color: var(--muted); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.srv-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.srv-table th { text-align: left; font: 500 0.8125rem/1.3 var(--f-text); color: var(--muted); padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.srv-table td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.srv-table .num { text-align: right; white-space: nowrap; }
.srv-table tr.is-picked td { background: var(--accent-soft); }
.srv-table__host code { font-size: 0.9rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.srv-table__note, .srv-table__sub { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 0.15rem; }
.copy { font-size: 0.75rem; color: var(--accent); margin-left: 0.35rem; padding: 0.1rem 0.3rem; border-radius: 3px; }
.copy:hover { background: var(--accent-soft); }
.cmp { display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer; }
.cmp input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); cursor: pointer; }
.tag { font-size: 0.8125rem; color: var(--muted); }
.tag--yes { color: var(--good); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status--up::before { background: var(--good); }
.status--down { color: var(--bad); }
.status--down::before { background: var(--bad); }
.srv__empty { padding: 2rem 0; color: var(--muted); }
.srv__explain { margin-top: 3rem; max-width: 75ch; }
.defs > div { padding: 0.9rem 0; border-top: 1px solid var(--rule-soft); }
.defs dt { font-weight: 600; }
.defs dd { margin: 0.2rem 0 0; color: var(--muted); }

@media (max-width: 760px) {
  .srv-table thead { display: none; }
  .srv-table, .srv-table tbody, .srv-table tr, .srv-table td { display: block; width: 100%; }
  .srv-table tr { position: relative; padding: 0.9rem 0 0.9rem 2.5rem; border-bottom: 1px solid var(--rule); }
  .srv-table tr[hidden] { display: none; }
  .srv-table td { border: 0; padding: 0.15rem 0; display: flex; gap: 0.75rem; text-align: left !important; }
  .srv-table td::before { content: attr(data-label); flex: 0 0 6.5rem; font-size: 0.8125rem; color: var(--muted); }
  .srv-table td:first-child { position: absolute; left: 0; top: 0.75rem; width: auto; }
  .srv-table td:first-child::before, .srv-table td.srv-table__host::before { display: none; }
  .srv-table td.srv-table__host { display: block; padding-bottom: 0.35rem; }
}

.compare-bar { position: sticky; bottom: 0; z-index: 20; background: var(--ink); color: var(--bg); padding-bottom: env(safe-area-inset-bottom, 0px); }
.compare-bar__inner { display: flex; align-items: center; gap: 0.75rem; min-height: 60px; }
.compare-bar__inner span { margin-right: auto; font-weight: 500; }
.compare-bar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.compare-bar .btn--solid { background: var(--bg); color: var(--ink); border-color: var(--bg); }

.compare { width: min(1100px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); color: var(--ink); padding: 1.25rem 1.5rem 1.5rem; }
.compare::backdrop { background: rgb(8 12 22 / 0.55); }
.compare__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.compare__head h2 { margin: 0; }
.compare__table { border-collapse: collapse; min-width: 100%; font-size: 0.9375rem; }
.compare__table th, .compare__table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
.compare__table thead th { border-bottom: 1px solid var(--rule); }
.compare__table tbody th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.compare__table mark { background: color-mix(in srgb, var(--good) 18%, transparent); color: inherit; padding: 0 0.2em; border-radius: 3px; font-weight: 600; }
.compare__warn { margin-top: 1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.compare h3 { margin: 1.75rem 0 0.75rem; }
.compare .check { margin-top: 0.5rem; }
.code { font: 0.875rem/1.55 var(--f-code); background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 0.9rem 1rem; overflow-x: auto; white-space: pre; margin: 0.75rem 0; }
.compare__hint { font-size: var(--step--1); color: var(--muted); }

/* =================================================================
   Text pages
   ================================================================= */
.prose { max-width: calc(68ch + 2 * var(--gutter)); padding-block: clamp(1.5rem, 4vw, 3rem) 1rem; }
.prose h2 { margin-top: 2.25rem; }
.prose .lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.contact-form .field { font-size: var(--step--1); }
.form-note { font-size: var(--step--1); color: var(--muted); margin: 0; }
.contact-form .btn { align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 0.9rem 1rem; border-radius: var(--radius); border-left: 3px solid; }
.notice--good { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.notice--bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }


/* =================================================================
   Time zones and meeting planner
   ================================================================= */
.tz { padding-block: clamp(1rem, 3vw, 2.5rem) 1rem; }
.tz__intro { max-width: 70ch; margin-bottom: 1.5rem; }
.tz__add { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.combo { position: relative; flex: 1 1 18rem; display: flex; flex-direction: column; gap: 0.3rem; }
.combo .field { flex: none; }
.combo__input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); min-height: 44px; padding: 0.45em 0.7em; width: 100%; }
.combo__input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.combo__list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(8 12 22 / 0.15); max-height: 22rem; overflow-y: auto; }
.combo__list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.7rem; border-radius: 4px; cursor: pointer; }
.combo__list li small { color: var(--muted); }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--accent-soft); }
.combo__list .combo__empty { color: var(--muted); cursor: default; }
.combo__list .combo__empty:hover { background: none; }
.combo__time { font-variant-numeric: tabular-nums; color: var(--muted); }
.tz__date { min-width: 10rem; }
.tz__dur { min-width: 9rem; }

.planner { margin-top: 0.5rem; }
.planner__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule-soft); border-radius: var(--radius); background: var(--surface); }
.planner__table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-variant-numeric: tabular-nums; }
.planner__table th, .planner__table td { padding: 0; }
.planner__corner { text-align: left; font: 500 0.8125rem var(--f-text); color: var(--muted); padding: 0.5rem 0.75rem !important; }
.planner__city, .planner__corner { position: sticky; left: 0; z-index: 2; background: var(--surface); width: 11.5rem; min-width: 11.5rem; border-right: 1px solid var(--rule); }
.planner__city { text-align: left; font-weight: 400; padding: 0.6rem 0.75rem !important; border-top: 1px solid var(--rule-soft); vertical-align: top; }
.planner__name { display: block; font: 500 1.0625rem/1.2 var(--f-display); }
.planner__home { font: 500 0.6875rem var(--f-text); color: var(--accent); margin-left: 0.25rem; }
.planner__live { display: block; font-size: 0.875rem; margin-top: 0.1rem; }
.planner__meta { display: block; font-size: 0.75rem; color: var(--muted); }
.planner__btns { display: flex; gap: 0.75rem; margin-top: 0.2rem; font-size: 0.75rem; }
.planner__col { height: 18px; }
.planner__pick { display: block; width: 100%; height: 18px; border: 0; background: none; cursor: pointer; padding: 0; }
.planner__pick span { display: block; width: 6px; height: 6px; margin: 6px auto; border-radius: 50%; }
.is-best .planner__pick span { background: var(--good); }
.planner__pick[aria-pressed="true"] span { background: var(--accent); width: 10px; height: 10px; margin-top: 4px; }
.planner__table td { text-align: center; font-size: 0.9375rem; height: 4.6rem; min-width: 2.05rem; border-top: 1px solid var(--rule-soft); border-left: 1px solid var(--rule-soft); cursor: pointer; position: relative; vertical-align: middle; }
.planner__table td small { display: block; font-size: 0.7em; color: var(--muted); line-height: 1; }
.planner__table td.is-work { background: color-mix(in srgb, var(--good) 16%, transparent); }
.planner__table td.is-edge { background: color-mix(in srgb, var(--good) 5%, transparent); }
.planner__table td.is-night { color: var(--muted); }
.planner__table td.is-newday { border-left: 2px solid var(--ink); }
.planner__day { display: block; font-size: 0.625rem; color: var(--muted); line-height: 1.1; white-space: nowrap; }
.planner__table td.is-now { box-shadow: inset 0 3px 0 var(--signal); }
.planner__table td.is-sel { background: var(--accent); color: var(--accent-ink); }
.planner__table td.is-sel small, .planner__table td.is-sel .planner__day { color: var(--accent-ink); }
.planner__table td:hover:not(.is-sel) { outline: 2px solid var(--accent); outline-offset: -2px; }
.planner__help { font-size: var(--step--1); color: var(--muted); margin-top: 0.75rem; }

.meeting { margin-top: 1.75rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.meeting__title { font-size: var(--step-1); margin-bottom: 0.75rem; }
.meeting__list { list-style: none; margin: 0 0 1rem; padding: 0; }
.meeting__list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--rule-soft); }
.meeting__list strong { min-width: 9rem; font-weight: 600; }
.meeting__list em { font-style: normal; font-size: 0.8125rem; color: var(--bad); }
.meeting__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 760px) {
  .planner__city, .planner__corner { width: 8.5rem; min-width: 8.5rem; }
  .planner__name { font-size: 0.9375rem; }
  .planner__live { font-size: 0.75rem; }
  .planner__table { min-width: 820px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule-soft); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: var(--step--1); color: var(--muted); }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 2rem; }
.site-footer__about { max-width: 60ch; margin: 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; }
.site-footer__nav a { color: var(--muted); }
.site-footer__nav a:hover { color: var(--ink); }
.site-footer__copy { margin: 0; }
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Consent banner ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.consent[hidden] { display: none; }
.consent__inner { pointer-events: auto; max-width: 640px; margin-inline: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: 0 10px 40px rgb(8 12 22 / 0.18); }
.consent__title { font-size: var(--step-1); margin-bottom: 0.35rem; }
.consent p { font-size: var(--step--1); margin-bottom: 0.9rem; color: var(--muted); }
.consent__actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ---------- Hosting check tool ---------- */
.tool-page { display: block; }
.tool-table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; font-size: 0.95rem; }
.tool-table th, .tool-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule-soft); }
.tool-pre { font: 0.875rem/1.5 var(--f-code); background: var(--surface); border: 1px solid var(--rule); padding: 0.9rem; overflow-x: auto; border-radius: var(--radius); }
.good { color: var(--good); }
.bad { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  .digits { transition: none; }
}
@media print {
  .site-header, .site-footer, .ad, .toolbar, .consent, .compare-bar { display: none !important; }
}
