/* UPMON: shared tokens, header/footer shell, home hero + chapters (single file; avoid @import). */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #555555;
  --faint: #6a6a6a;
  --logo-red: #006400;
  --city-bg: #efefef;
  --header-pad-x: clamp(16px, 4vw, 28px);
  --header-pad-y: clamp(10px, 2vw, 14px);
  --chapter-server-bg: #dcdcdc;
  --chapter-server-text: #1a2836;
  --chapter-api-bg: #d3d3d3;
  --chapter-api-text: #1a2a1f;
  --chapter-about-bg: #c0c0c0;
  --chapter-about-text: #261a2e;
  --chapter-contacts-bg: #808080;
  --chapter-contacts-text: #ffffff;
  --chapter-copyright-bg: #696969;
  --chapter-copyright-text: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

.hero {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: var(--text);
}

.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(12px, 3vh, 32px);
  padding-bottom: clamp(16px, 4vh, 40px);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero .cities {
  margin-top: auto;
  padding-top: clamp(20px, 4vh, 40px);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--header-pad-y) + env(safe-area-inset-top, 0px))
    calc(var(--header-pad-x) + env(safe-area-inset-right, 0px))
    var(--header-pad-y)
    calc(var(--header-pad-x) + env(safe-area-inset-left, 0px));
  background: #ffffff;
  position: relative;
  z-index: 100;
}

.brand {
  display: inline-block;
  background: var(--logo-red);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  text-decoration: none;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.top-actions button {
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-actions svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-wrap {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  padding: 8px 0;
  background: var(--bg);
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.nav-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: #f5f5f5;
  outline: none;
}

.chapter {
  scroll-margin-top: 12px;
  width: 100%;
  padding: clamp(48px, 12vmin, 120px) calc(var(--header-pad-x) + env(safe-area-inset-left, 0px))
    calc(var(--header-pad-x) + env(safe-area-inset-right, 0px));
  padding-bottom: clamp(56px, 14vmin, 140px);
}

.chapter-inner {
  max-width: 640px;
  margin: 0 auto;
}

.chapter h2 {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.chapter p {
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.6;
  margin-bottom: 0.85em;
}

.chapter p:last-child {
  margin-bottom: 0;
}

.chapter code {
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 3px;
}

.chapter--server {
  background: var(--chapter-server-bg);
  color: var(--chapter-server-text);
}

.chapter--server p {
  color: rgba(26, 40, 54, 0.88);
}

.chapter--server code {
  background: rgba(255, 255, 255, 0.65);
  color: var(--chapter-server-text);
}

.chapter--api {
  background: var(--chapter-api-bg);
  color: var(--chapter-api-text);
}

.chapter--api p {
  color: rgba(26, 42, 31, 0.88);
}

.chapter--api code {
  background: rgba(255, 255, 255, 0.65);
  color: var(--chapter-api-text);
}

.chapter--about {
  background: var(--chapter-about-bg);
  color: var(--chapter-about-text);
}

.chapter--about p {
  color: rgba(38, 26, 46, 0.88);
}

.chapter--about strong {
  color: var(--chapter-about-text);
}

.chapter--contacts {
  background: var(--chapter-contacts-bg);
  color: var(--chapter-contacts-text);
}

.chapter--contacts h2 {
  color: #1a1a1a;
}

.chapter--contacts p {
  color: var(--chapter-contacts-text);
}

.chapter--contacts a {
  color: var(--chapter-contacts-text);
  font-weight: 600;
  text-decoration: none;
}

.chapter--contacts a:hover,
.chapter--contacts a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.chapter--copyright {
  background: var(--chapter-copyright-bg);
  color: var(--chapter-copyright-text);
  text-align: center;
  padding-top: clamp(12px, 2.5vw, 20px);
  padding-bottom: clamp(12px, 2.5vw, 20px);
  padding-left: calc(var(--header-pad-x) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--header-pad-x) + env(safe-area-inset-right, 0px));
}

.chapter--copyright p {
  color: var(--chapter-copyright-text);
  font-size: clamp(0.82rem, 1.8vw, 0.9rem);
  margin-bottom: 0;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--header-pad-x);
  padding-right: var(--header-pad-x);
}

.status-block {
  text-align: left;
  margin-bottom: 8px;
}

.status-head {
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  margin-bottom: 6px;
}

.status-sub {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 10px;
}

.status-tz {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.status-loc {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 18px;
}

.clock-zone {
  text-align: center;
  margin-bottom: 12px;
}

.clock {
  font-weight: 900;
  font-size: clamp(3.5rem, 17vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.clock .sep {
  display: inline-block;
  transform: translateY(-0.02em);
  font-weight: 900;
}

.below-clock {
  text-align: right;
  max-width: 100%;
  padding-right: 0;
  margin-top: 4px;
}

.date-line {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  margin-bottom: 4px;
}

.holiday-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.links-line {
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.5;
  max-width: 720px;
  margin-left: auto;
}

.links-line a {
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.links-line a:hover {
  color: var(--muted);
}

.cities {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 12px;
  margin-top: 36px;
}

.city-card {
  background: var(--city-bg);
  padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 16px) clamp(10px, 2vw, 12px);
  min-width: min(118px, 28vw);
  text-align: center;
}

.city-card .name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.2;
}

.city-card .time {
  font-weight: 400;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .below-clock {
    text-align: left;
  }
  .links-line {
    margin-left: 0;
  }
  .cities {
    justify-content: flex-start;
  }
  .city-card {
    min-width: 104px;
  }
}

@media (min-height: 800px) {
  .hero .wrap {
    padding-top: clamp(24px, 5vh, 48px);
  }
}

/* Injected header from layout.js: full-width bar (home hero + inner pages) */
[data-upmon-header] {
  display: block;
  width: 100%;
  flex: 0 0 auto;
}
