:root {
  --white: #FFFFFF;
  --off: #F7F7F5;
  --ink: #1A1A1A;
  --ink-soft: #2D3748;
  --muted: #4B5563;
  --light: #6B7280;
  --rule: #E5E5E5;
  --teal: #0d7680;
  --teal-dark: #0a5c64;
  --teal-light: #e8f4f5;
  --teal-mist: #f0f9fa;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
}

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4.5rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0 0.8rem;
}

.brand,
.top-link,
.button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--ink);
}

.brand-noah {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}

.brand-edge {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.header-nav a.active,
.header-nav a:hover {
  color: var(--teal);
  font-weight: 700;
}

.header-rule {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 0;
}

.strapline {
  padding: 0.7rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.strapline-text {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

.strapline-text strong {
  font-weight: 700;
  font-style: normal;
  color: var(--teal);
}

.strapline-link a {
  font-size: 0.72rem;
  color: var(--teal);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  margin: 1.45rem 0 2.15rem;
}

.hero-copy,
.hero-panel,
.panel,
.clock-band,
.swarm-grid article,
.roadmap article {
  background: var(--off);
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  border-top: 2px solid var(--teal);
}

.hero-copy {
  padding: 1.8rem 1.8rem 1.65rem;
}

.hero-panel {
  padding: 1rem;
  display: flex;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 0.72rem;
}

h2 {
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.14rem;
  line-height: 1.2;
  margin-bottom: 0.72rem;
}

.hero-text,
.section-footnote {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.button {
  padding: 0.62rem 0.92rem;
  border-radius: 0;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-secondary {
  background: #fff;
  color: var(--teal);
  border: 1px solid var(--teal);
}

.signal-card {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  border-radius: 0;
  padding: 1.05rem;
}

.hero-proof {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-proof p {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.8);
}

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

.signal-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  background: var(--teal);
  border-radius: 0;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
}

.status-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.stat {
  padding: 0.68rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.35rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.stat-value {
  font-size: 1.02rem;
  font-weight: 900;
}

.section {
  margin-top: 1.15rem;
}

.section-head {
  margin-bottom: 0.8rem;
}

.driver-grid,
.current-grid,
.field-grid,
.augment-grid,
.transparency-grid,
.governor-grid,
.swarm-grid,
.roadmap {
  display: grid;
  gap: 1rem;
}

.driver-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.current-grid,
.field-grid,
.augment-grid,
.failure-grid,
.transparency-grid,
.governor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swarm-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.swarm-grid article,
.roadmap article {
  padding: 0.98rem 0.96rem;
}

.accent-panel {
  background: var(--teal-mist);
}

.driver-card-title,
.swarm-title,
.roadmap-step {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.driver-card-copy,
.swarm-copy,
.roadmap-copy,
.panel-list div {
  color: var(--ink-soft);
  line-height: 1.6;
}

.panel-list {
  display: grid;
  gap: 0.7rem;
}

.panel-list strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.2rem;
  font-family: "Montserrat", sans-serif;
}

.bullet-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.62;
  font-size: 0.88rem;
}

.clock-band {
  padding: 1.08rem;
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.clock-node {
  padding: 0.82rem;
  border-radius: 0;
  background: #fff;
  border-left: 2px solid var(--teal);
}

.clock-stage {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

.clock-value {
  font-size: 1rem;
  font-weight: 900;
}

.clock-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.transparency-grid article:first-child {
  grid-column: span 1;
}

.transparency-grid article:last-child {
  grid-column: span 2;
}

.governor-grid article:first-child {
  grid-column: span 2;
}

.governor-grid article:last-child {
  grid-column: span 1;
}

.field-grid article:first-child {
  grid-column: span 1;
}

.field-grid article:last-child {
  grid-column: span 2;
}

.failure-grid article:first-child {
  grid-column: span 1;
}

.failure-grid article:last-child {
  grid-column: span 2;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mini-stat {
  padding: 0.72rem;
  border-radius: 0;
  background: #fff;
  border-left: 2px solid var(--teal);
}

.mini-stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.3rem;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

.mini-stat-value {
  font-size: 1rem;
  font-weight: 700;
}

.tone-green {
  color: var(--green);
}

.tone-amber {
  color: var(--amber);
}

.tone-red {
  color: var(--red);
}

.download-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.history-panel {
  margin-top: 1rem;
}

.history-head {
  margin-bottom: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.compact-table {
  min-width: 640px;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 0.72rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.history-table th {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-family: "Montserrat", sans-serif;
}

.table-bias,
.table-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bias-up,
.chip-open {
  background: #dcfce7;
  color: var(--green);
}

.bias-mixed,
.chip-flat {
  background: var(--teal-light);
  color: var(--teal);
}

.bias-down,
.chip-closed {
  background: #fde8e8;
  color: var(--red);
}

.return-pos {
  color: var(--green);
  font-weight: 700;
}

.return-neg {
  color: var(--red);
  font-weight: 700;
}

.chart-shell {
  width: 100%;
}

.chart-caption {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.6;
}

.governor-copy p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.65;
}

.failure-list {
  display: grid;
  gap: 0.9rem;
}

.failure-item {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.failure-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.failure-item p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.failure-meta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.subhead {
  font-size: 0.96rem;
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer-brand {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.72rem;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--teal);
}

@media (max-width: 980px) {
  .site-header,
  .strapline,
  .footer-inner,
  .hero,
  .driver-grid,
  .current-grid,
  .field-grid,
  .augment-grid,
  .failure-grid,
  .transparency-grid,
  .governor-grid,
  .swarm-grid,
  .roadmap,
  .clock-grid {
    grid-template-columns: 1fr;
  }

  .transparency-grid article:last-child {
    grid-column: span 1;
  }

  .field-grid article:first-child,
  .field-grid article:last-child,
  .failure-grid article:first-child,
  .failure-grid article:last-child,
  .governor-grid article:first-child,
  .governor-grid article:last-child {
    grid-column: span 1;
  }

  .page-shell {
    padding: 0 0.9rem 3rem;
  }

  .hero-copy {
    padding: 1.5rem;
  }
}

/* ── Hamburger menu ── */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: var(--ink, #222);
  position: absolute;
  right: 0;
  top: 1.1rem;
  z-index: 1201;
}

@media (max-width: 900px) {
  .hamburger-btn {
    display: block;
  }
  .header-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: #1a1a2e;
    flex-direction: column;
    padding: 4rem 2rem 2rem;
    z-index: 1200;
    box-shadow: -2px 0 12px rgba(0,0,0,.3);
  }
  .header-nav.open {
    display: flex;
  }
  .header-nav a {
    color: #fff;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 1.05rem;
  }
  .header-nav a:hover,
  .header-nav a.active {
    color: #0d7680;
  }
  .site-header {
    position: relative;
  }
}

/* ── Commodity sub-links: hidden on desktop, shown in hamburger ── */
.header-nav a.sub-link {
  display: none;
}
@media (max-width: 900px) {
  .header-nav.open a.sub-link {
    display: block;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,.7);
    border-bottom: 1px solid rgba(255,255,255,.04);
  }
  .header-nav.open a.sub-link:hover {
    color: #0d7680;
  }
}
