/* CCD Reports — shared design system
 * brand: red #FD3737 / black #0A0A0A / Work Sans (body) + N27 Bold (display)
 */

@font-face {
  font-family: "N27";
  src: url("/brand/N27-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --bg-card: #131313;
  --fg: #fafafa;
  --fg-secondary: #e4e4e9;
  --fg-dim: #b8b8c0;
  --fg-muted: rgba(250, 250, 250, 0.45);
  --fg-faint: rgba(250, 250, 250, 0.28);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #fd3737;
  --accent-dim: rgba(253, 55, 55, 0.12);
  --accent-glow: rgba(253, 55, 55, 0.35);
  --warn: #ffb547;
  --warn-dim: rgba(255, 181, 71, 0.12);
  --pause: rgba(250, 250, 250, 0.4);

  --font-display: "N27", "Work Sans", -apple-system, system-ui, sans-serif;
  --font-body: "Work Sans", -apple-system, "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  position: relative;
}
/* Defensive: nothing in the report should ever exceed the viewport horizontally */
nav.top, .hero, section.block, footer.bottom, #cc-content { max-width: 100vw; }
.hero, section.block, footer.bottom { width: 100%; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }

/* Headings use N27 */
h1, h2, h3, h4, h5, h6,
.display, .heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Grain overlay */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* ---- TOP NAV ---- */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 32px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav.top .wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
}
nav.top .wordmark img { height: 22px; width: auto; display: block; }
nav.top .wordmark .x {
  font-family: var(--font-mono);
  color: var(--fg-faint);
  font-size: 11px;
  font-weight: 300;
}
nav.top .wordmark .client {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
nav.top .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
nav.top .meta-mobile { display: none; }

/* ---- HERO ---- */
.hero {
  min-height: 62vh;
  padding: 124px 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 80px;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 30%; left: -15%;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero-top {
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
  margin-right: 14px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.hero-eyebrow .seg { white-space: nowrap; }
@media (max-width: 480px) {
  .hero-eyebrow .seg { white-space: normal; }
  .hero-eyebrow { letter-spacing: 0.18em; }
}
.hero-eyebrow .sep { margin: 0 10px; color: var(--accent); opacity: 0.55; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10.5vw, 9rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--fg);
  max-width: 14ch;
}
.hero-subtitle {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  position: relative;
  z-index: 2;
}
.hero-meta .block { min-width: 0; }
.hero-meta .block .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 8px;
}
.hero-meta .block .value {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.hero-meta .block .value.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* ---- SECTION SHELL ---- */
section.block {
  padding: 88px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.container { max-width: 1320px; margin: 0 auto; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 24px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  text-transform: uppercase;
  max-width: 18ch;
}
.section-head .desc {
  max-width: 34ch;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
  font-family: var(--font-body);
}

/* ---- KPI ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.kpi {
  padding: 36px 28px 32px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.kpi:last-child { border-right: none; }
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 2px;
  background: var(--accent);
}
.kpi .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 22px;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fg);
  text-transform: uppercase;
}
.kpi .value .unit {
  font-size: 0.5em;
  color: var(--fg-faint);
  margin-left: 6px;
  font-weight: 700;
}
.kpi .delta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent);
  line-height: 1.5;
}
.kpi .delta.muted { color: var(--fg-faint); }

/* ---- STATUS STRIP ---- */
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.status-card {
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
}
.status-card .indicator {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.status-card .indicator .light { width: 8px; height: 8px; border-radius: 50%; }
.status-card.live .indicator { color: var(--accent); }
.status-card.live .indicator .light { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.status-card.pacing .indicator { color: var(--warn); }
.status-card.pacing .indicator .light { background: var(--warn); }
.status-card.pending .indicator { color: var(--fg-dim); }
.status-card.pending .indicator .light { background: var(--fg-dim); }
.status-card .big {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.status-card .copy { font-size: 13px; color: var(--fg-dim); line-height: 1.55; }

/* ---- CHARTS ---- */
.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.chart-card {
  padding: 36px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.chart-card .chart-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 4px;
}
.chart-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.chart-wrap { position: relative; height: 380px; width: 100%; min-width: 0; }
.chart-wrap canvas { max-width: 100% !important; }
.charts-grid { min-width: 0; }
.chart-legend {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  text-transform: uppercase;
  flex-wrap: wrap;
}
.chart-legend .item { display: flex; align-items: center; gap: 10px; }
.chart-legend .dot { width: 10px; height: 10px; }
.chart-legend .dot.budget { background: rgba(250,250,250,0.18); }
.chart-legend .dot.spent { background: var(--accent); }

/* ---- MARKETS GRID ---- */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.market {
  padding: 32px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.market:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.market::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.market:hover::after { width: 100%; }
.market.pacing::after { background: var(--warn); }
.market.pending::after { background: var(--pause); }

.market-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.market-head .city {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.market-head .city .country {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-faint);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0;
}
.market-head .date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.4;
}
.market-venue {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--fg-dim);
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.market-pacing { margin-bottom: 24px; }
.market-pacing .row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.market-pacing .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.market-pacing .val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
}
.market-pacing .val .pct { color: var(--accent); margin-left: 8px; }
.market.pacing .pct { color: var(--warn); }
.market.pending .pct { color: var(--fg-faint); }
.progress {
  height: 4px;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.progress .bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--accent);
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.market.pacing .progress .bar { background: var(--warn); }
.market.pending .progress .bar { background: var(--pause); }

.market-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.market-metrics .m .l {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.market-metrics .m .v {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.market-metrics .m .v .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  font-weight: 400;
  margin-left: 4px;
}

.market-status-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 3px 9px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  margin-bottom: 6px;
  align-self: flex-end;
}
.market.live .market-status-tag { display: none; }
.market.pacing .market-status-tag { color: var(--warn); }
.market.pending .market-status-tag { color: var(--fg-faint); }
.market-head .date-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

/* ---- RAW TABLE ---- */
.table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  overflow-x: auto;
  position: relative;
  width: 100%;
  max-width: 100%;
  /* iOS smooth-scroll inside */
  -webkit-overflow-scrolling: touch;
}
table.raw {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 900px;
}
/* Mobile: explicit horizontal-scroll hint above the raw table. */
.table-scroll-hint {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  background: rgba(253, 55, 55, 0.06);
  border-radius: 999px;
  width: fit-content;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.table-scroll-icon {
  width: 22px;
  height: 13px;
  color: var(--accent);
  flex-shrink: 0;
  animation: scroll-nudge 2.4s ease-in-out infinite;
}
@keyframes scroll-nudge {
  0%, 100% { transform: translateX(0); opacity: 1; }
  25% { transform: translateX(-3px); opacity: 0.7; }
  75% { transform: translateX(3px); opacity: 0.7; }
}
.table-scroll-label {
  letter-spacing: 0.18em;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .table-scroll-hint { display: inline-flex; }
  .table-wrap {
    border: 1px solid var(--border-strong);
    /* Edge fade tells the eye there's more content off-screen right. */
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), rgba(0,0,0,0.55) 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), rgba(0,0,0,0.55) 100%);
  }
  table.raw { font-size: 11px; }
  table.raw th, table.raw td { padding: 12px 12px; }
}
table.raw th, table.raw td {
  padding: 16px 20px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.raw th {
  text-align: right;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-size: 10px;
}
table.raw th:first-child, table.raw td:first-child { text-align: left; }
table.raw td.city {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
table.raw tbody tr:hover { background: rgba(255,255,255,0.02); }
table.raw tfoot td {
  border-top: 1px solid var(--border-strong);
  border-bottom: none;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  padding-top: 22px;
  font-family: var(--font-display);
}

/* ---- FOOTER ---- */
footer.bottom {
  padding: 80px 32px 60px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
  background: var(--bg);
}
footer.bottom .row {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 32px;
}
footer.bottom .wordmark { display: flex; align-items: center; gap: 18px; min-width: 0; }
footer.bottom .wordmark img { height: 32px; width: auto; display: block; flex-shrink: 0; }
footer.bottom .wordmark .x { color: var(--fg-faint); font-size: 22px; font-weight: 300; font-family: var(--font-mono); flex-shrink: 0; }
footer.bottom .wordmark .client {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
footer.bottom .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  text-transform: uppercase;
  text-align: right;
}
footer.bottom .meta .line { margin-bottom: 6px; }
footer.bottom .meta a { color: inherit; transition: color 0.15s ease; }
footer.bottom .meta a:hover { color: var(--accent); }

/* ---- REVEAL ANIMATION ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- PASSWORD GATE ---- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.gate::after {
  content: "";
  position: absolute;
  top: 30%; left: 50%;
  transform: translateX(-50%);
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}
.gate-inner {
  position: relative;
  z-index: 2;
  max-width: 460px;
  width: 100%;
  text-align: center;
}
.gate .wordmark {
  display: inline-flex; align-items: center; gap: 16px;
  margin-bottom: 56px;
}
.gate .wordmark img { height: 32px; width: auto; }
.gate .wordmark .x { font-family: var(--font-mono); color: var(--fg-faint); font-size: 16px; font-weight: 300; }
.gate .wordmark .client {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gate-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.gate h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 20px;
}
.gate p {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}
.gate form {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.gate form:focus-within { border-color: var(--accent); background: rgba(253, 55, 55, 0.04); }
.gate input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 16px 20px;
  color: var(--fg);
  font-family: var(--font-mono);
  /* iOS Safari auto-zooms inputs under 16px and sometimes the zoom sticks
     after the gate is removed, leaving the whole page horizontally scrolled.
     Keep this at 16px+ on every viewport. */
  font-size: 16px;
  letter-spacing: 0.1em;
}
.gate input::placeholder { color: var(--fg-faint); letter-spacing: 0.1em; }
.gate button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
  font-weight: 600;
}
.gate button:hover { background: #ff5050; }
.gate-error {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gate-error.show { opacity: 1; }

/* ---- PIN KEYPAD (mobile only) ---- */
.gate-keypad {
  display: none;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.gate-pin-display {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  height: 16px;
  align-items: center;
}
.gate-pin-display .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.gate-pin-display .dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: scale(1.1);
}
.gate-pin-display.shake {
  animation: shake 0.4s cubic-bezier(.36, .07, .19, .97);
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
.gate-pin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gate-keypad .gate-pin-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  padding: 22px 0;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.gate-keypad .gate-pin-btn:active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(0.96);
}
.gate-keypad .gate-pin-btn.gate-pin-aux {
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.gate-keypad .gate-pin-btn.gate-pin-aux:active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  border-color: var(--border-strong);
  transform: scale(0.96);
}
.gate-pin-busy .gate-pin-grid { opacity: 0.5; pointer-events: none; }
.gate-foot {
  margin-top: 56px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.gate-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero { padding: 120px 32px 56px; min-height: 72vh; }
  .hero-meta { gap: 32px; }
  section.block { padding: 72px 32px; }
  .charts-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: none; }
  .kpi:nth-child(1), .kpi:nth-child(2) { border-bottom: 1px solid var(--border); }
  .markets-grid { grid-template-columns: repeat(2, 1fr); }
  .status-strip { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  nav.top {
    padding: 14px 18px;
    gap: 14px;
  }
  nav.top .wordmark img { height: 18px; }
  /* Mobile: keep just the CCD wordmark, drop × ÆON:MODE (it's already in the hero meta) */
  nav.top .wordmark .x,
  nav.top .wordmark .client { display: none; }
  nav.top .meta-desktop { display: none; }
  nav.top .meta-mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1;
    text-align: right;
  }
  nav.top .meta-mobile-label {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--fg-faint);
  }
  nav.top .meta-mobile-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg);
  }

  .hero {
    padding: 104px 22px 48px;
    min-height: auto;
    gap: 56px;
  }
  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 0.24em;
    margin-bottom: 22px;
    flex-wrap: wrap;
  }
  .hero-title {
    font-size: clamp(3rem, 14vw, 5rem);
    line-height: 0.9;
    max-width: 100%;
  }
  .hero-subtitle {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 0.22em;
  }
  .hero-meta {
    gap: 22px 32px;
  }
  .hero-meta .block { flex: 1 1 calc(50% - 32px); min-width: 130px; }

  section.block { padding: 56px 22px; }
  .section-head { margin-bottom: 36px; gap: 16px; }
  .section-head h2 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .section-head .desc { font-size: 13px; max-width: 100%; }

  .kpi-grid { grid-template-columns: 1fr; }
  .kpi {
    padding: 28px 24px 26px;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }
  .kpi:last-child { border-bottom: none; }
  .kpi .label { margin-bottom: 16px; }
  .kpi .value { font-size: clamp(2rem, 11vw, 2.8rem); }

  .status-strip { gap: 12px; margin-top: 28px; }
  .status-card { padding: 22px; }
  .status-card .big { font-size: 28px; margin-bottom: 10px; }
  .status-card .copy { font-size: 12.5px; }

  .charts-grid { gap: 16px; }
  .chart-card { padding: 22px; }
  .chart-card h3 { font-size: 17px; margin-bottom: 22px; }
  .chart-wrap { height: 300px; }
  .chart-legend { gap: 16px; font-size: 10px; margin-top: 18px; }

  .markets-grid { grid-template-columns: 1fr; gap: 12px; }
  .market { padding: 26px 22px; }
  .market-head .city { font-size: 22px; }
  .market-head .city .country { font-size: 12px; }
  .market-head .date { font-size: 9px; letter-spacing: 0.16em; }
  .market-venue { font-size: 13px; padding-bottom: 16px; margin-bottom: 22px; }
  .market-metrics { grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 20px; margin-top: 22px; }
  .market-metrics .m .v { font-size: 16px; }

  table.raw th, table.raw td { padding: 12px 14px; }
  table.raw td.city { font-size: 12px; }

  footer.bottom { padding: 48px 22px 36px; }
  footer.bottom .row { flex-direction: column; align-items: flex-start; gap: 24px; }
  /* Mobile: drop × and ÆON:MODE — keep just the [CCD] wordmark.
     The fact that this is the AEON:MODE report is already obvious from the hero. */
  footer.bottom .wordmark .x,
  footer.bottom .wordmark .client { display: none; }
  footer.bottom .wordmark img { height: 22px; }
  footer.bottom .meta { text-align: left; font-size: 10px; line-height: 1.6; }
  footer.bottom .meta .line { margin-bottom: 4px; }

  /* Gate */
  .gate { padding: 24px; }
  .gate .wordmark { margin-bottom: 32px; gap: 12px; }
  .gate .wordmark img { height: 22px; }
  .gate .wordmark .client { font-size: 13px; }
  .gate h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .gate p { font-size: 13px; margin-bottom: 28px; }
  /* On phones: hide the text-input form entirely, show the keypad. No <input> = no iOS zoom. */
  .gate-desktop-form { display: none !important; }
  .gate-keypad { display: block; }
  .gate-foot { margin-top: 32px; }
}

@media (max-width: 380px) {
  nav.top { padding: 12px 16px; }
  nav.top .meta { display: none; }
  .hero { padding: 96px 18px 44px; }
  section.block { padding: 48px 18px; }
  .market { padding: 22px 18px; }
  .hero-meta .block { flex: 1 1 100%; }
}
