:root {
  color-scheme: light;
  --ink: #102c28;
  --ink-soft: #49605c;
  --paper: #f4f0e8;
  --paper-raised: #fffdf8;
  --forest: #173b35;
  --forest-deep: #0d2925;
  --line: #cdd2c8;
  --level-1: #a4cc87;
  --level-2: #ff9700;
  --level-3: #e83d35;
  --stale: #747c7a;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid var(--level-2);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--forest-deep);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 5rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-decoration: none;
}

.brand small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0;
}

.brand__mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: var(--forest);
  border-radius: 50% 50% 50% 12%;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.85rem;
  font-weight: 700;
}

nav a {
  padding: 0.6rem 0;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 40rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.55fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  background:
    linear-gradient(90deg, transparent 49.8%, rgb(23 59 53 / 10%) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgb(23 59 53 / 10%) 50%, transparent 50.2%);
  background-size: 6rem 6rem;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(18rem, 38vw, 33rem);
  aspect-ratio: 1;
  top: 2rem;
  right: -8rem;
  border: 1px solid rgb(23 59 53 / 25%);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgb(23 59 53 / 4%), 0 0 0 8rem rgb(23 59 53 / 3%);
}

.eyebrow {
  margin: 0 0 1rem;
  color: #9b3b31;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.75rem;
  font-size: clamp(3.25rem, 7.5vw, 6.8rem);
}

h1 em {
  color: #b13930;
  font-weight: 400;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
}

h3 {
  font-size: 1.1rem;
}

.hero__summary {
  max-width: 43rem;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.button--primary {
  color: var(--white);
  background: var(--forest);
}

.button--primary:hover {
  background: var(--forest-deep);
}

.button--quiet:hover {
  background: rgb(23 59 53 / 7%);
}

.hero__note {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

.hero__note-number {
  color: #a13d33;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-style: italic;
}

.hero__note p {
  margin: 0.25rem 0 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.status-section,
.meaning-section,
.limits-section {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3.5rem);
}

.status-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading h2 {
  margin: 0;
}

.text-link {
  flex: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.period-selector {
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.25rem;
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.period-selector__button {
  min-width: 7rem;
  padding: 0.65rem 1rem;
  color: var(--ink);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.period-selector__button[aria-pressed="true"] {
  color: var(--white);
  background: var(--forest);
}

.period-selector__button:focus-visible {
  outline: 3px solid var(--level-2);
  outline-offset: 2px;
}

.status-card {
  min-height: 8.5rem;
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  color: var(--white);
  background: var(--stale);
}

.status-card--current {
  background: var(--forest);
}

.status-card--forecast {
  background: #31544d;
}

.status-card--stale,
.status-card--unavailable {
  background: #596360;
}

.status-card__symbol {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 1.65rem;
}

.status-card__label,
.status-card__detail,
.status-card__time {
  margin-bottom: 0;
}

.status-card__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-card__title {
  margin-bottom: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.status-card__detail,
.status-card__time {
  color: rgb(255 255 255 / 80%);
  font-size: 0.8rem;
}

.status-card__time {
  max-width: 14rem;
  text-align: right;
}

.no-script {
  padding: 1rem;
  background: #eee4cc;
  border-left: 4px solid #9b3b31;
}

.zone-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
}

.zone-card {
  --zone-level: var(--stale);
  position: relative;
  min-height: 10rem;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  border: solid var(--line);
  border-width: 1px 1px 1px 0;
  background: var(--paper-raised);
}

.zone-card:first-child {
  border-left-width: 1px;
}

.zone-card::before {
  content: "";
  height: 0.45rem;
  position: absolute;
  inset: 0 0 auto;
  background: var(--stale);
}

.zone-card--level-1 { --zone-level: var(--level-1); }
.zone-card--level-2 { --zone-level: var(--level-2); }
.zone-card--level-3 { --zone-level: var(--level-3); }
.zone-card--level-1::before,
.zone-card--level-2::before,
.zone-card--level-3::before { background: var(--zone-level); }
.zone-card--forecast::before {
  background:
    repeating-linear-gradient(135deg, transparent 0 6px, rgb(16 44 40 / 70%) 6px 8px),
    var(--zone-level);
}
.zone-card--stale::before,
.zone-card--unavailable::before { background: var(--stale); }

.zone-card__code {
  margin-bottom: 1rem;
  font-family: Georgia, serif;
  font-size: 2.3rem;
}

.zone-card__name {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.zone-card__level {
  margin-top: auto;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.meaning-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: clamp(3rem, 9vw, 9rem);
  border-top: 1px solid var(--line);
}

.meaning-copy > p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.mandatory-notice {
  margin-top: 2rem;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  border: 1px solid #b54d44;
  background: #f8e8df;
}

.mandatory-notice > span {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  color: var(--white);
  background: #9b3b31;
  border-radius: 50%;
  font-weight: 900;
}

.mandatory-notice p {
  margin: 0;
  font-size: 0.86rem;
}

.legend {
  align-self: end;
}

.legend h3 {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.legend__swatch {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  color: #10201d;
  border: 1px solid rgb(16 44 40 / 35%);
  font-weight: 900;
}

.legend__swatch--level-1 { background: var(--level-1); }
.legend__swatch--level-2 { background: var(--level-2); }
.legend__swatch--level-3 { color: #180807; background: var(--level-3); }
.legend__swatch--stale { color: var(--white); background: var(--stale); }
.legend__swatch--forecast {
  color: var(--white);
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgb(16 44 40 / 72%) 8px 11px),
    var(--level-2);
}

.legend strong,
.legend small {
  display: block;
}

.legend small {
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.install-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  color: var(--white);
  background: var(--forest);
}

.install-intro,
.install-steps {
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem);
}

.install-intro {
  background: var(--forest-deep);
}

.install-intro .eyebrow {
  color: #ffb54a;
}

.install-intro > p:not(.eyebrow) {
  color: rgb(255 255 255 / 72%);
}

.button--light {
  color: var(--forest-deep);
  background: var(--white);
  border-color: var(--white);
}

.button--light:hover {
  background: #f2eadb;
}

.install-intro .install-intro__availability {
  max-width: 34rem;
  margin: 1rem 0 0;
  font-size: 0.74rem;
}

.install-steps ol {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.install-steps li {
  padding: 1.25rem 0;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.install-steps li > span {
  color: #ffb54a;
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

.install-steps strong {
  font-size: 1.05rem;
}

.install-steps li p,
.platform-note {
  margin: 0.25rem 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: 0.82rem;
}

.platform-note {
  margin-bottom: 1.25rem;
}

.text-link--light {
  color: var(--white);
}

.limits-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(3rem, 8vw, 8rem);
}

.limits-section ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
}

.limits-section li {
  padding: 1.5rem;
  background: var(--paper-raised);
  font-size: 0.85rem;
}

.limits-section li strong {
  display: block;
  margin-bottom: 0.35rem;
}

footer {
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 0.75fr 1.5fr auto;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  color: rgb(255 255 255 / 76%);
  background: #0b211e;
  font-size: 0.72rem;
}

footer a {
  color: var(--white);
}

.footer__brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.footer__brand p,
.attribution p,
.emergency {
  margin: 0;
}

.attribution {
  display: grid;
  gap: 0.65rem;
}

.emergency {
  color: var(--white);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .zone-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .zone-card:nth-child(5) {
    border-left-width: 1px;
  }

  .meaning-section,
  .limits-section {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr 2fr;
  }

  .emergency {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 4.5rem;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero__note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
  }

  .hero__note p {
    margin-bottom: 0.8rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

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

  .status-card__time {
    grid-column: 1 / -1;
    max-width: none;
    text-align: left;
  }

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

  .zone-card:nth-child(odd) {
    border-left-width: 1px;
  }

  .install-section {
    grid-template-columns: 1fr;
  }

  .limits-section ul {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 380px) {
  h1 {
    font-size: 2.85rem;
  }

  .hero__actions,
  .button {
    width: 100%;
  }

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

  .zone-card {
    border-left-width: 1px;
  }
}

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

@media (forced-colors: active) {
  .zone-card::before,
  .legend__swatch {
    border: 2px solid CanvasText;
  }
}
