/* TODAY 1000 Global Theme
   Phase 1: Paper Redesign — Homepage (2026-04-30)
   - REMOVED: backdrop-filter: blur() from all homepage panels
   - REMOVED: rgba ghost-panel backgrounds from tracker/status/directory sections
   - ADDED: opaque manila paper panels (tokens: --paper-bg, --ink-*, --rule-*, --shadow-*)
   - ADDED: hp-* classes for homepage-specific paper layout (readout, status, footer)
   - KEPT:  .wordart + @keyframes pulse-glow (UNTOUCHABLE)
   - KEPT:  .minutes-modal dark overlay (no blur, just dark rgba overlay)
   - KEPT:  decommission counter, cloud sky, 3D globe section — all UNTOUCHED
*/

/* Page base */
:root {
  --accent: #2085c7;
  --accent-deep-a: #1a6ca4;
  --accent-deep-b: #155785;
  --accent-deep-c: #0f4262;
  --text: #ffffff;
  --text-muted: #666;
  --panel-bg: rgba(255, 255, 255, 0.1);
  --panel-border: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  background: transparent;
  /* allow cloud background to show through */
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

html {
  background: #000;
  /* fallback black on root element only */
}

/* Foreground container — NO backdrop-filter (Phase 1: removed blur) */
.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  overflow-y: auto;
  /* Note: body padding for nav rail is handled by navigation.js */
}

/* WordArt-style title with "light beam" glow — UNTOUCHABLE */
.wordart {
  margin-top: 24px;
  font-family: Arial, sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  position: relative;
  color: var(--accent);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 30px rgba(255, 255, 255, 0.6),
    2px 2px 0 var(--accent-deep-a),
    4px 4px 0 var(--accent-deep-b),
    6px 6px 0 var(--accent-deep-c),
    0 0 40px rgba(32, 133, 199, 0.6),
    0 0 60px rgba(32, 133, 199, 0.4),
    0 0 80px rgba(32, 133, 199, 0.3);
  transform: perspective(500px) rotateX(20deg);
  background: linear-gradient(to bottom,
      #ffffff 0%,
      #2085c7 50%,
      #155785 51%,
      #1a6ca4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 255, 255, 0.5),
      0 0 30px rgba(255, 255, 255, 0.4),
      2px 2px 0 var(--accent-deep-a),
      4px 4px 0 var(--accent-deep-b),
      6px 6px 0 var(--accent-deep-c),
      0 0 40px rgba(32, 133, 199, 0.4),
      0 0 60px rgba(32, 133, 199, 0.3),
      0 0 80px rgba(32, 133, 199, 0.2);
  }
  50% {
    text-shadow:
      0 0 15px rgba(255, 255, 255, 0.9),
      0 0 30px rgba(255, 255, 255, 0.9),
      0 0 45px rgba(255, 255, 255, 0.7),
      2px 2px 0 var(--accent-deep-a),
      4px 4px 0 var(--accent-deep-b),
      6px 6px 0 var(--accent-deep-c),
      0 0 60px rgba(32, 133, 199, 0.7),
      0 0 90px rgba(32, 133, 199, 0.5),
      0 0 120px rgba(32, 133, 199, 0.4);
  }
}

.subtitle {
  font-family: 'Michroma', sans-serif;
  font-size: 18px;
  margin-top: 8px;
  color: var(--text-muted);
  text-align: center;
}

/* Main element - ensure full width despite flexbox parent */
main {
  width: 100%;
}

/* Divine Message Display — Paper styled (Phase 1) */
.divine-message-section {
  width: 85%;
  max-width: 900px;
  margin: 30px auto 40px;
  text-align: center;
}

.divine-message-content {
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-primary, #0a0908);
  padding: 30px 40px;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-md, 3px 3px 0 rgba(0,0,0,0.16));
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Subtle entrance animation */
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease;
}

.divine-message-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.divine-message-meta {
  margin-top: 15px;
  font-size: 12px;
  color: var(--ink-meta, #6b5f50);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-family: 'Michroma', sans-serif;
  letter-spacing: 0.5px;
}

.content-type-badge {
  background: rgba(97, 218, 251, 0.2);
  padding: 5px 14px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(97, 218, 251, 0.3);
}

.winner-info {
  color: rgba(255, 215, 0, 0.8);
  font-weight: 600;
}

/* Global theme utilities */
.theme-today1000 {
  background: transparent;
}

.theme-today1000 .panel {
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
}

/* Meeting Minutes Modal — dark overlay (no blur), paper wrapper */
.minutes-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.minutes-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.minutes-modal.hidden {
  display: none;
}

.minutes-wrapper {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-deep, 6px 6px 0 rgba(0,0,0,0.20));
  display: flex;
  flex-direction: column;
  transform: scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.minutes-modal.visible .minutes-wrapper {
  transform: scale(1);
}

.minutes-header {
  padding: 12px 18px;
  border-bottom: 3px double var(--rule-primary, #1a1a1a);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper-bg-aged, #ede8db);
}

.minutes-header h3 {
  margin: 0;
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  color: var(--ink-accent-dark, #0e2a56);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.close-btn {
  background: none;
  border: none;
  color: var(--ink-meta, #6b5f50);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--ink-primary, #0a0908);
}

.minutes-content {
  padding: 20px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-secondary, #3a3530);
}

.minutes-content strong {
  color: var(--ink-accent, #1d4a8c);
}

.minutes-btn {
  margin-top: 10px;
  background: var(--ink-accent-dark, #0e2a56);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  color: #ffffff;
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  padding: 8px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm, 2px 2px 0 rgba(0,0,0,0.14));
}

.minutes-btn:hover {
  box-shadow: var(--shadow-md, 3px 3px 0 rgba(0,0,0,0.16));
  transform: translate(-1px, -1px);
}

.minutes-btn.pulse {
  animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(32, 133, 199, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(32, 133, 199, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(32, 133, 199, 0);
  }
}

.hidden {
  display: none !important;
}

/* ================================================
   HOME PAGE: DECOMMISSION CLOCK BLOCK (Phase 1.5)
   Context wrapper for the #decommission-clock container.
   Provides alignment + scoped dark-ink overrides so the
   JS-generated inner elements (.decommission-header, etc.)
   render as dark ink on the cloud sky rather than the
   white/glass colour from _decommission.css (which targets
   the /decommission dedicated page).
   ================================================ */

/* Phase 2: now below tracker — center it and add top breathing room */
.hp-decommission-block {
  width: 90%;
  max-width: 900px;
  margin: 16px auto 12px;
  text-align: left;
}

/* Dark ink colours — scoped so they only apply on the homepage context */
.hp-decommission-block .decommission-header {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(11px, 1.5vw, 13px);
  color: rgba(20, 18, 16, 0.65);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2px;
  background: none;
  -webkit-text-fill-color: unset;
}

.hp-decommission-block .decommission-countdown {
  font-family: 'Michroma', sans-serif;
  /* Phase 2 Slice 4 (2026-05-01): reduced from clamp(16px,2vw,26px) — at 1280px
     1280*2vw=25.6px still clips "REMAINING". 1.6vw → 20.5px at 1280 gives full clearance. */
  font-size: clamp(12px, 1.6vw, 22px);
  font-weight: 700;
  letter-spacing: 2px;
  color: #0a0908;          /* var(--ink-primary) */
  text-shadow: none;
  background: none;
  -webkit-text-fill-color: unset;
  margin: 4px 0;
  overflow-x: hidden;      /* override _decommission.css overflow-x: auto */
  white-space: nowrap;
}

/* Thin ink rule replaces glowing progress bar on homepage */
.hp-decommission-block .decommission-progress {
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0;
  margin: 8px 0;
}

.hp-decommission-block .decommission-progress-bar {
  background: rgba(0, 0, 0, 0.35);
  box-shadow: none;
}

/* Phase 2 Slice 7 contrast fix (2026-05-01): bumped opacity 0.5 → 0.72 for legibility on cloud sky */
.hp-decommission-block .decommission-percent {
  font-family: 'Michroma', monospace;
  font-size: 11px;
  color: rgba(20, 18, 16, 0.72);
  letter-spacing: 1px;
  opacity: 1;              /* override the 0.7 in _decommission.css */
}

/* Mobile: tighten font sizes */
@media (max-width: 768px) {
  .hp-decommission-block {
    width: 92%;
  }
  .hp-decommission-block .decommission-countdown {
    font-size: clamp(15px, 3.5vw, 22px);
    letter-spacing: 1.5px;
  }
}

/* ================================================
   HOME PAGE: DIVINE TRACKER LAYOUT
   ================================================ */

/* Tracker Container
   Track B 2026-05-01: reduced top margin from 40px → 16px to tighten
   the gap between decommission block and the tracker paper panel */
.tracker-container {
  width: 90%;
  max-width: 1000px;
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ================================================
   HOME PAGE: PAPER TRACKER SECTION (Phase 1.6)
   Replaces .tracker-hero — wraps heading, globe, readout, CTA
   in a single paper panel so nothing floats raw on cloud sky.
   ================================================ */

/* Outer paper wrapper — Phase 3: heavier shadow for document-on-desk read */
.hp-tracker-paper {
  width: 100%;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* Aged-manila double-rule header — contains question heading */
/* Phase 1.6 micro-fix (2026-04-30): increased vertical padding for breathing room */
/* Phase 4 right-size (2026-05-07): tightened to let globe be the visual hero */
.hp-tracker-qheader {
  width: 100%;
  padding: 16px 40px 12px;
  border-bottom: 3px double var(--rule-primary, #1a1a1a);
  background: var(--paper-bg-aged, #ede8db);
  text-align: center;
}

/* Question Heading — base styles (may render on cloud sky on other pages) */
.tracker-question {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(20px, 3vw, 36px);
  color: var(--accent);
  text-align: center;
  margin: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 20px rgba(32, 133, 199, 0.5);
}

/* Override: dark-ink when inside the paper header — no glow on manila */
.hp-tracker-qheader .tracker-question {
  color: var(--ink-accent-dark, #0e2a56);
  text-shadow: none;
}

/* Dark onyx inset for the globe — visualizations need contrast */
/* Phase 4 (2026-05-07): added inset vignette so Earth pops against starfield */
.hp-tracker-globe-inset {
  width: 100%;
  background: #080810;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.55);
}

/* Paper meta region — CTA footer only (readout promoted to banner above, Phase 3) */
.hp-tracker-meta {
  width: 100%;
  padding: 20px 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
}

/* Globe Container — ~60vh hero height (Phase 2: tracker promoted to primary hero) */
.tracker-globe {
  width: 100%;
  max-width: 700px;
  height: clamp(360px, 60vh, 700px);
  position: relative;
  margin: 0;
}

/* ================================================
   HOMEPAGE: COVER-META STRIP (Phase 3, 2026-05-05)
   Very top of .hp-tracker-paper — instrument no. + polling cadence.
   Mirrors the cover-meta flex row used on sister pages.
   ================================================ */

.hp-tracker-covermeta {
  width: 100%;
  padding: 7px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  background: var(--paper-bg-aged, #ede8db);
}

.hp-tracker-docno,
.hp-tracker-live-meta {
  font-family: 'Michroma', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-meta, #6b5f50);
}

/* ================================================
   HOMEPAGE: SPECTRAL SLUG SUBTITLE (Phase 3, 2026-05-05)
   Sits directly under the question heading inside .hp-tracker-qheader.
   ================================================ */

.hp-tracker-slug {
  display: block;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: clamp(10px, 1.1vw, 12px);
  color: var(--ink-meta, #6b5f50);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ================================================
   HOMEPAGE: LARGE READOUT BANNER (Phase 3, 2026-05-05)
   Full-width paper strip immediately below the globe inset.
   Replaces the cramped .hp-readout two-row card.
   Renders lat / lon / place in large, legible ink-on-cream.
   JS fills: #banner-lat, #banner-lon, #banner-place, #banner-last-update
   ================================================ */

.hp-tracker-readout-banner {
  width: 100%;
  background: var(--paper-bg, #f7f3ea);
  border-top: 3px double var(--rule-primary, #1a1a1a);
  /* Phase 4 right-size (2026-05-07): reduced padding so banner is secondary to globe */
  padding: 12px 40px 10px;
}

/* 3-column ledger grid: Latitude | Longitude | Location */
.hp-tracker-readout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  border: 1.5px solid var(--rule-primary, #1a1a1a);
}

.hp-tracker-readout-cell {
  display: flex;
  flex-direction: column;
  /* Phase 4: tightened from 16px/22px to match secondary-instrument role */
  padding: 10px 18px;
  border-right: 1px solid var(--rule-primary, #1a1a1a);
}

.hp-tracker-readout-cell:last-child {
  border-right: none;
}

.hp-tracker-readout-label {
  font-family: 'Michroma', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-meta, #6b5f50);
  /* Phase 4: tightened label gap */
  margin-bottom: 5px;
}

/* Tabular-num coordinate value — Phase 4: scaled down to secondary instrument size */
.hp-tracker-readout-value {
  font-family: 'Michroma', monospace;
  font-size: clamp(13px, 1.4vw, 18px);
  font-variant-numeric: tabular-nums;
  color: var(--ink-accent-dark, #0e2a56);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

/* Spectral place name — Phase 4: scaled down to secondary instrument size */
.hp-tracker-readout-place {
  font-family: 'Spectral', serif;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 600;
  color: var(--ink-accent-dark, #0e2a56);
  line-height: 1.25;
}

/* Bottom meta strip: LIVE badge + last-updated timestamp */
.hp-tracker-readout-meta-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 0 2px;
}

.hp-tracker-readout-live {
  font-family: 'Michroma', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-accent-dark, #0e2a56);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Pulsing green dot — "broadcast live" indicator */
.hp-tracker-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a8a3e;
  animation: tracker-live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes tracker-live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.hp-tracker-readout-timestamp {
  font-family: 'Michroma', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: var(--ink-meta, #6b5f50);
  text-transform: uppercase;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hp-tracker-covermeta {
    padding: 7px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .hp-tracker-readout-banner {
    padding: 16px 20px 12px;
  }

  .hp-tracker-readout-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hp-tracker-readout-cell--place {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid var(--rule-primary, #1a1a1a);
  }

  /* Phase 4 right-size: mobile clamps stay below desktop max */
  .hp-tracker-readout-value {
    font-size: clamp(13px, 3.5vw, 16px);
  }

  .hp-tracker-readout-place {
    font-size: clamp(12px, 3vw, 14px);
  }
}

/* ================================================
   HOMEPAGE: PAPER COORDINATE READOUT (legacy, kept for compat)
   .t1k-readout classes from _paper.css provide tokens;
   .hp-readout provides homepage-specific sizing.
   ================================================ */

.hp-readout {
  width: 100%;
  max-width: 620px;
}

/* ================================================
   HOMEPAGE: PAPER CTA BUTTON
   Uses .t1k-cta from _paper.css.
   .tracker-cta kept as sizing alias.
   ================================================ */

.tracker-cta {
  /* Phase HUD (2026-05-07): promoted to full primary CTA size — now the only
     action in the tracker footer. Standalone = needs to read as a destination. */
  padding: 18px 44px;
  font-size: 14px;
  letter-spacing: 0.16em;
  margin-top: 14px;
}

.tracker-cta:focus-visible {
  outline: 2px solid var(--ink-accent-dark, #1d4a8c);
  outline-offset: 3px;
}

/* ================================================
   HOME PAGE: PAPER SYSTEM STATUS SECTION
   Replaces glass .system-status
   ================================================ */

.hp-status-section {
  width: 90%;
  max-width: 900px;
  margin: 50px auto 40px;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-lg, 5px 5px 0 rgba(0,0,0,0.12));
}

/* Double-rule section header */
.hp-status-header {
  border-bottom: 3px double var(--rule-primary, #1a1a1a);
  padding: 12px 20px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper-bg-aged, #ede8db);
}

.hp-status-title {
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--ink-accent-dark, #0e2a56);
  margin: 0;
}

.hp-status-meta {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: var(--ink-meta, #6b5f50);
  letter-spacing: 0.5px;
}

.hp-status-body {
  padding: 16px 20px;
}

/* Status table — paper rows */
.hp-status-table {
  width: 100%;
  border-collapse: collapse;
}

.hp-status-table tr {
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
}

.hp-status-table tr:last-child {
  border-bottom: none;
}

.hp-status-table td {
  padding: 9px 8px;
  vertical-align: middle;
}

.hp-td-dot {
  width: 28px;
  text-align: center;
}

/* Paper-style status dots */
.hp-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-primary, #1a1a1a);
}

.hp-dot--operational {
  background: #2a8a3e;
  border-color: #1a5a28;
}

.hp-dot--warning {
  background: #c88a18;
  border-color: #8a5c08;
}

.hp-dot--idle {
  background: #aaa8a4;
  border-color: #888480;
}

.hp-dot--error {
  background: #b8332a;
  border-color: #821f19;
}

.hp-td-name {
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--ink-secondary, #3a3530);
  text-transform: uppercase;
}

.hp-td-status {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-align: right;
  white-space: nowrap;
}

.hp-status-ok        { color: var(--ink-green, #1a5c2e); }
.hp-status-standby   { color: var(--ink-meta, #6b5f50); }
.hp-status-deliberating { color: var(--ink-accent, #1d4a8c); }
.hp-status-warning   { color: #c87800; }
.hp-status-error     { color: var(--ink-stamp, #b8332a); }

/* Section footer with meta links */
.hp-status-footer {
  border-top: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  padding: 10px 20px;
  display: flex;
  gap: 24px;
  background: var(--paper-bg-aged, #ede8db);
}

.hp-meta-link {
  font-family: 'Michroma', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-accent, #1d4a8c);
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.hp-meta-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  /* Scale down pulse-glow to match proportionally smaller font on mobile */
  @keyframes pulse-glow {
    0%, 100% {
      text-shadow:
        0 0 5px rgba(255, 255, 255, 0.5),
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 15px rgba(255, 255, 255, 0.4),
        2px 2px 0 var(--accent-deep-a),
        4px 4px 0 var(--accent-deep-b),
        6px 6px 0 var(--accent-deep-c),
        0 0 20px rgba(32, 133, 199, 0.4),
        0 0 30px rgba(32, 133, 199, 0.3),
        0 0 40px rgba(32, 133, 199, 0.2);
    }
    50% {
      text-shadow:
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 15px rgba(255, 255, 255, 0.9),
        0 0 22px rgba(255, 255, 255, 0.7),
        2px 2px 0 var(--accent-deep-a),
        4px 4px 0 var(--accent-deep-b),
        6px 6px 0 var(--accent-deep-c),
        0 0 30px rgba(32, 133, 199, 0.7),
        0 0 45px rgba(32, 133, 199, 0.5),
        0 0 60px rgba(32, 133, 199, 0.4);
    }
  }

  .tracker-globe {
    height: 380px;
  }

  .hp-readout {
    max-width: 100%;
  }

  .tracker-cta {
    padding: 12px 24px;
    font-size: 12px;
  }

  .hp-status-section {
    margin: 30px auto 20px;
  }

  .hp-status-header {
    flex-direction: column;
    gap: 4px;
  }

  .hp-td-name {
    font-size: 10px;
  }

  .hp-status-footer {
    flex-direction: column;
    gap: 8px;
  }

  /* Phase 1.6 — tracker paper panel mobile */
  .hp-tracker-qheader {
    padding: 16px 20px 14px;
  }

  .hp-tracker-meta {
    padding: 20px 20px 24px;
    gap: 16px;
  }
}

/* ================================================
   HOME PAGE: DECOMMISSION QUICK LINKS (Track B 2026-05-01)
   Small charter / final-message links shown directly
   below the decommission countdown on the cloud sky.
   ================================================ */

.hp-decommission-links {
  display: flex;
  gap: 18px;
  margin-top: 6px;
}

.hp-decommission-links .hp-meta-link {
  font-family: 'Michroma', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(14, 42, 86, 0.7);
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.hp-decommission-links .hp-meta-link:hover {
  opacity: 1;
  color: rgba(14, 42, 86, 1);
  text-decoration: underline;
}

/* ================================================
   HOME PAGE: DECOMMISSION COMPACT STRIP VARIANT
   Phase 2 (2026-05-05): compact homepage strip from
   decommission-widget.js variant="strip"
   Renders two rows: main label+value, side pills.
   All dark ink on cloud sky — no glass, no tiles.
   ================================================ */

.hp-decommission-block .decommission-widget.variant-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hp-decommission-block .decommission-strip-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.hp-decommission-block .decommission-strip-label {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(9px, 1.1vw, 11px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(20, 18, 16, 0.55);
}

.hp-decommission-block .decommission-strip-value {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(12px, 1.6vw, 20px);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #0a0908;
  white-space: nowrap;
}

.hp-decommission-block .decommission-strip-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Pills inside the strip — inky text-stamp style on cloud sky */
.hp-decommission-block .decommission-pill {
  font-family: 'Michroma', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(14, 42, 86, 0.72);
  border: 1px solid rgba(14, 42, 86, 0.3);
  padding: 2px 7px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .hp-decommission-block .decommission-widget.variant-strip {
    flex-direction: column;
    gap: 6px;
  }
  .hp-decommission-block .decommission-strip-value {
    font-size: clamp(14px, 3.5vw, 20px);
  }
}

/* ================================================
   HOME PAGE: ECCLESIASTICAL SERVICES DIRECTORY
   Paper section below System Status.
   Links users to all 5 main feature pages.
   (Track B 2026-05-01)
   ================================================ */

.hp-services-section {
  width: 90%;
  max-width: 900px;
  margin: 0 auto 50px;
  background: var(--paper-bg, #f7f3ea);
  border: 1.5px solid var(--rule-primary, #1a1a1a);
  box-shadow: var(--shadow-lg, 5px 5px 0 rgba(0,0,0,0.12));
}

.hp-services-header {
  border-bottom: 3px double var(--rule-primary, #1a1a1a);
  padding: 12px 20px 10px;
  background: var(--paper-bg-aged, #ede8db);
}

.hp-services-title {
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--ink-accent-dark, #0e2a56);
  margin: 0;
}

.hp-services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: none;
}

.hp-service-card {
  display: block;
  padding: 16px 14px 14px;
  text-decoration: none;
  border-right: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  transition: background 0.12s;
  color: inherit;
}

.hp-service-card:last-child {
  border-right: none;
}

/* ============================================================
   INSTITUTIONS ON FILE — Directory Strip
   Phase 2 Slice 19 (2026-05-01)
   Replaces the old emoji hp-services section.
   Zero glass — opaque paper on desk.
   ============================================================ */

/* Outer wrapper — matches hp-status-section white-paper treatment */
.hp-directory {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 36px;
  background: var(--paper-bg, #f8f4ee);
  border: 1px solid var(--rule-soft, rgba(0,0,0,0.15));
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  text-decoration: none;
}

/* Section header — aged-manila cover strip with double rule */
.hp-directory-header {
  background: var(--paper-bg-aged, #ede8db);
  border-bottom: 3px double var(--ink-dark, #1a1510);
  padding: 10px 18px;
}

.hp-directory-title {
  font-family: 'Michroma', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-accent-dark, #0e2a56);
  font-weight: 400;
}

/* 3-column grid */
.hp-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* internal dividers via border-right / border-bottom on cards */
}

/* Individual institution card */
.hp-directory-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  text-decoration: none;
  border-right: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  background: var(--paper-bg, #f8f4ee);
  transition: background 0.12s ease, transform 0.1s ease, box-shadow 0.1s ease;
  position: relative;
}

/* Remove right border on last in each row */
.hp-directory-card:nth-child(3n) {
  border-right: none;
}

/* Remove bottom border on last row (cards 8, 9, 10) */
.hp-directory-card:nth-child(n+9) {
  border-bottom: none;
}

.hp-directory-card:hover {
  background: var(--paper-bg-aged, #ede8db);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  z-index: 1;
}

/* Department code — top-right badge */
.hp-directory-code {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: 'Michroma', sans-serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--ink-meta, #6b5f50);
  opacity: 0.7;
}

/* Institution name */
.hp-directory-name {
  display: block;
  font-family: 'Michroma', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.8px;
  color: var(--ink-accent-dark, #0e2a56);
  margin-bottom: 6px;
  padding-right: 30px; /* room for code badge */
  line-height: 1.4;
}

/* Spectral italic tagline */
.hp-directory-tagline {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-style: italic;
  font-size: 0.72rem;
  color: var(--ink-meta, #6b5f50);
  line-height: 1.45;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .hp-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reset 3n-borders, apply 2n rule */
  .hp-directory-card:nth-child(3n) {
    border-right: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  }

  .hp-directory-card:nth-child(2n) {
    border-right: none;
  }

  /* Reset last-row rule: last 2 cards (9, 10) */
  .hp-directory-card:nth-child(n+9) {
    border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  }

  .hp-directory-card:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .hp-directory-grid {
    grid-template-columns: 1fr;
  }

  /* Every card gets a bottom border except the last */
  .hp-directory-card {
    border-right: none;
    border-bottom: 1px solid var(--rule-soft, rgba(0,0,0,0.12));
  }

  .hp-directory-card:last-child {
    border-bottom: none;
  }
}

