/* Hole Monitor marketing pages: the warning-bulletin world.
   Locked palette, no tints: fog ground, storm ink, four hazard fields. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --fog: #e9edf1;
  --ink: #0b1a2b;
  --warning: #d7191c;   /* KEV added. One item on screen at a time. */
  --advisory: #f28c28;  /* updated */
  --watch: #ffd400;     /* published */
  --cancelled: #9aa5b1; /* withdrawn */
  --on-warning: #ffffff;
  --paper: #ffffff;
  --rule: 4px solid var(--ink);
  --hair: 2px solid var(--ink);
  --gutter: clamp(16px, 3.4vw, 48px);
  --broadcast: "Archivo", "Arial Narrow", sans-serif;
  --teletype: "Courier Prime", "Courier New", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fog: #0b1a2b;
    --ink: #e9edf1;
    --paper: #102438;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--broadcast);
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--watch); color: #0b1a2b; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--advisory); }
:focus-visible { outline: 4px solid var(--advisory); outline-offset: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--fog); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--fog); }
html { scrollbar-color: var(--ink) var(--fog); }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--watch); color: #0b1a2b; padding: 0.5em 1em; z-index: 10; }

/* Broadcast lettering */
.cast {
  font-family: var(--broadcast);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
}

/* Top bar */
.topbar {
  background: #0b1a2b;
  color: #e9edf1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 2rem;
  padding: 0.85rem var(--gutter);
  font-family: var(--broadcast);
  font-stretch: 75%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.topbar .brand { margin-right: auto; text-decoration: none; font-weight: 900; letter-spacing: 0.12em; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.topbar nav a { text-decoration: none; padding: 0.3rem 0; border-bottom: 3px solid transparent; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { border-bottom-color: var(--watch); }

/* Crawl: steps from item to item, never glides */
.crawl {
  background: var(--warning);
  color: var(--on-warning);
  font-family: var(--broadcast);
  font-stretch: 75%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  height: 2.6em;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.crawl .tag { background: #0b1a2b; color: var(--watch); padding: 0 var(--gutter); display: flex; align-items: center; flex: none; }
.crawl ol { list-style: none; margin: 0; padding: 0 var(--gutter); position: relative; flex: 1; }
.crawl li { height: 2.6em; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* First viewport */
.front {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  border-bottom: var(--rule);
  min-height: min(calc(100svh - 6.6rem), 46rem);
}
.front .pitch { padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(2rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
.front h1 { font-size: clamp(3.5rem, 8vw, 6rem); margin: 0 0 1.2rem; max-width: none; }
.front .line { font-size: clamp(1.15rem, 1.7vw, 1.45rem); max-width: 30ch; margin: 0 0 2rem; }
.front .line strong { background: var(--watch); color: #0b1a2b; padding: 0 0.2em; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.slab {
  display: inline-flex;
  align-items: center;
  min-height: 3.6rem;
  padding: 0 1.8rem;
  background: #0b1a2b;
  color: var(--watch);
  font-family: var(--broadcast);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 4px solid #0b1a2b;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.slab:hover { background: var(--watch); color: #0b1a2b; }
.textlink { font-family: var(--broadcast); font-stretch: 75%; font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Bulletin stack */
.stack { border-left: var(--rule); display: flex; flex-direction: column; min-width: 0; }
.stack-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 1.2rem; border-bottom: var(--rule);
  font-family: var(--broadcast); font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem;
}
.bulletins { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.bulletin { border-bottom: var(--rule); padding: 1rem 1.2rem 1.1rem; color: #0b1a2b; font-size: 0.98rem; line-height: 1.4; }
.bulletin .kind { display: block; text-transform: uppercase; font-family: var(--broadcast); font-stretch: 68%; font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: 0.02em; margin-bottom: 0.35rem; }
.bulletin pre { margin: 0; font: inherit; white-space: pre-wrap; }
.bulletin.kev_added { background: var(--warning); color: var(--on-warning); }
.bulletin.updated { background: var(--advisory); }
.bulletin.published { background: var(--watch); }
.bulletin.withdrawn { background: var(--cancelled); }
.bulletin.withdrawn .id { text-decoration: line-through; text-decoration-thickness: 3px; }
.bulletin.lead { flex: 1.25; padding: 1.4rem 1.2rem; font-size: clamp(1rem, 1.3vw, 1.2rem); display: flex; flex-direction: column; justify-content: flex-end; }
.bulletin.lead .kind { font-size: clamp(2.4rem, 4.2vw, 3.6rem); margin-bottom: 0.7rem; }

/* UTC ruler */
.ruler { border-top: 0; padding: 0.4rem 1.2rem 0.6rem; font-size: 0.8rem; }
.ruler svg { display: block; width: 100%; height: 22px; }
.ruler .ticks { display: flex; justify-content: space-between; }

/* Sections */
.band { border-bottom: var(--rule); padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.band h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin: 0 0 1.4rem; }
.band .sub { max-width: 60ch; margin: 0 0 2rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }

/* Product text: the payload as a paper strip */
.strip { background: var(--paper); border: var(--rule); padding: 1.2rem 1.4rem; overflow-x: auto; font-size: 0.92rem; line-height: 1.45; margin: 0; }
.strip .hdr { color: var(--warning); font-weight: 700; }
/* Payload format tabs: square label-caps tabs sitting on the strip's top rule. */
.format-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: -4px; }
.format-tabs [role="tab"] {
  min-height: 2.6rem;
  padding: 0 1.1rem;
  background: var(--paper);
  color: var(--ink);
  border: var(--rule);
  margin-right: -4px;
  font-family: var(--broadcast);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.format-tabs [role="tab"]:hover { background: var(--fog); }
.format-tabs [role="tab"][aria-selected="true"] { background: #0b1a2b; color: var(--watch); border-color: var(--ink); }
.formats { min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .strip .hdr { color: var(--advisory); } }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: var(--hair); }
.legend li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: var(--hair); align-items: baseline; }
.legend .swatch { font-family: var(--broadcast); font-stretch: 68%; font-weight: 800; font-size: 1.35rem; text-transform: uppercase; padding: 0.1rem 0.5rem; color: #0b1a2b; justify-self: start; }
.swatch.kev_added { background: var(--warning); color: var(--on-warning); }
.swatch.updated { background: var(--advisory); }
.swatch.published { background: var(--watch); }
.swatch.withdrawn { background: var(--cancelled); }

/* Stations reporting */
.stations { width: 100%; border-collapse: collapse; font-size: 1rem; }
.stations th, .stations td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: var(--hair); vertical-align: baseline; }
.stations thead th { font-family: var(--broadcast); font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; border-bottom: var(--rule); }
.stations td:last-child, .stations th:last-child { text-align: right; white-space: nowrap; }
.stations tbody th { font-family: var(--broadcast); font-stretch: 75%; font-weight: 800; font-size: 1.35rem; text-transform: uppercase; }

/* Rates */
.rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: var(--rule); }
.rate { padding: 1.6rem 1.4rem 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; }
.rate + .rate { border-left: var(--rule); }
.rate h3 { font-size: 2rem; margin: 0; }
.rate .price { font-family: var(--broadcast); font-stretch: 68%; font-weight: 800; font-size: clamp(3.4rem, 6vw, 5rem); line-height: 0.9; }
.rate .price small { font-size: 1.2rem; font-stretch: 75%; font-weight: 700; margin-left: 0.2rem; }
.rate ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.rate li { padding: 0.35rem 0; border-bottom: var(--hair); }
.rate.free { background: var(--watch); color: #0b1a2b; }
.rate.free .slab { background: #0b1a2b; color: var(--watch); }
.rate .slab { align-self: flex-start; font-size: 1.2rem; min-height: 3rem; padding: 0 1.2rem; }
.rate:not(.free) .slab { background: transparent; color: var(--ink); border-color: var(--ink); }
.rate:not(.free) .slab:hover { background: var(--ink); color: var(--fog); }

/* Full plan table */
.limits { width: 100%; border-collapse: collapse; margin-top: 2.5rem; font-size: 1rem; }
.limits th, .limits td { padding: 0.7rem 0.6rem; border-bottom: var(--hair); text-align: right; }
.limits th:first-child { text-align: left; }
.limits thead th { font-family: var(--broadcast); font-stretch: 75%; font-weight: 800; font-size: 1.4rem; text-transform: uppercase; border-bottom: var(--rule); }
.limits tbody th { font-weight: 400; }

.qa dt { font-family: var(--broadcast); font-stretch: 75%; font-weight: 800; font-size: 1.4rem; text-transform: uppercase; margin-top: 1.6rem; }
.qa dd { margin: 0.4rem 0 0; max-width: 62ch; }

/* Close */
.close { background: #0b1a2b; color: #e9edf1; padding: clamp(3rem, 7vw, 5rem) var(--gutter); display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.close h2 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 0; max-width: 16ch; }
.close .slab { background: var(--watch); color: #0b1a2b; border-color: var(--watch); }
.close .slab:hover { background: transparent; color: var(--watch); }

/* Footer */
.foot { padding: 2rem var(--gutter) 2.6rem; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); font-size: 0.95rem; }
.foot h2 { font-family: var(--broadcast); font-stretch: 75%; font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.6rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0.3rem 0; }
.foot .note { grid-column: 1 / -1; border-top: var(--hair); padding-top: 1rem; }

@media (max-width: 900px) {
  .front { grid-template-columns: 1fr; min-height: 0; }
  .stack { border-left: 0; border-top: var(--rule); }
  .bulletins { max-height: none; }
  .split { grid-template-columns: 1fr; }
  .rates { grid-template-columns: 1fr; }
  .rate + .rate { border-left: 0; border-top: var(--rule); }
}
@media (max-width: 520px) {
  .legend li { grid-template-columns: 1fr; gap: 0.3rem; }
  .stations td:nth-child(2), .stations th:nth-child(2) { display: none; }
  .limits { font-size: 0.9rem; }
  .limits thead th { font-size: 1.1rem; }
}
.stack-head { align-items: center; }
.stack-head > span:first-child { margin-right: auto; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .slab { background: var(--watch); color: #0b1a2b; border-color: var(--watch); }
  :root:not([data-theme="light"]) .slab:hover { background: transparent; color: var(--watch); }
  :root:not([data-theme="light"]) .rate.free .slab { background: #0b1a2b; color: var(--watch); border-color: #0b1a2b; }
  :root:not([data-theme="light"]) .rate:not(.free) .slab { background: transparent; color: var(--ink); border-color: var(--ink); }
  :root:not([data-theme="light"]) .format-tabs [role="tab"][aria-selected="true"] { background: var(--watch); color: #0b1a2b; }
}

.lc { text-transform: none; }

/* Teletype only where the world prints product text or data */
.bulletin pre, .strip, .id, .stations td:last-child, .ruler, .limits td, .crawl li { font-family: var(--teletype); }
.crawl li { font-family: var(--broadcast); }

/* 1, 7: let grid tracks and the crawl shrink so nothing widens the page */
.crawl ol, .stack, .strip, .pitch { min-width: 0; }
.stack-head { flex-wrap: wrap; }
@media (max-width: 900px) {
  .front, .split { grid-template-columns: minmax(0, 1fr); }
  .rates { grid-template-columns: minmax(0, 1fr); }
}

/* 4: the free claim in the action row */
.free-tag { background: var(--watch); color: #0b1a2b; font-family: var(--broadcast); font-stretch: 75%; font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.35rem 0.6rem; }

/* 2: dark scheme follows the visitor's OS setting; the bar keeps a rule so it still reads as a band */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar { border-bottom: 4px solid #e9edf1; }
}

/* 6: pricing caption and fine print */
.limits caption { text-align: left; font-family: var(--broadcast); font-stretch: 68%; font-weight: 800; font-size: 2rem; text-transform: uppercase; padding-bottom: 0.6rem; }
.band.tight { padding-top: clamp(2rem, 4vw, 3rem); }
.qa { columns: 2 22rem; column-gap: 3rem; margin: 0; }
.qa dt { break-after: avoid; }
.qa dd { break-inside: avoid; }

/* Withdrawn reads cancelled as a whole row */
.bulletin.withdrawn pre { text-decoration: line-through; text-decoration-thickness: 2px; }
.nb { white-space: nowrap; }
.qa dt { margin-top: 0; }
.qa dd { margin-bottom: 1.6rem; }

/* Agent setup prompt */
.prompt .strip { white-space: pre-wrap; font-size: 1rem; line-height: 1.5; margin: 0 0 1rem; }
.prompt .copy { cursor: pointer; }
.prompt .copied { margin-left: 1rem; font-family: var(--broadcast); font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.band .sub code { font-family: var(--teletype); background: var(--paper); border: 2px solid var(--ink); padding: 0 0.3em; }
