/* =====================================================================
   Caskaide v3 — Nordic Private Banking × Master Cooperage
   Obsidian charcoal + architectural alabaster + burnished copper + sage.
   Cormorant Garamond (display), Plus Jakarta Sans (UI), JetBrains Mono.
   ===================================================================== */

:root {
  --obsidian: #0e0d0b;
  --charcoal: #171512;
  --charcoal-2: #211e1a;
  --alabaster: #f8f6f1;
  --stone: #efebe2;
  --surface: #ffffff;
  --ink: #151310;
  --ink-2: #3a352e;
  --muted: #6f675b;
  --cream: #f5f1e8;
  --cream-muted: #b6ada0;
  --copper: #c87a32;
  --copper-deep: #9c591a;
  --copper-soft: rgba(200, 122, 50, 0.14);
  --ok: #2e7d4f;
  --ok-bright: #49c17c;
  --warn: #b63b2a;
  --line: #ddd6c9;
  --line-dark: rgba(245, 241, 232, 0.12);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1220px;
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--alabaster);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
}
p { margin: 0; }
em { font-style: italic; padding-right: 0.12em; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(200, 122, 50, 0.11);
  color: var(--copper-deep);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.soft { color: var(--muted); }
.text-light { color: var(--cream); }
.text-copper { color: var(--copper-deep); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ==================== NAVIGATION ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(14, 13, 11, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--cream);
}
.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0.8rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.wordmark-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--copper);
  display: inline-block;
  box-shadow: inset 0 0 0 2px rgba(200, 122, 50, 0.25);
}
.tm { font-size: 0.45em; vertical-align: super; color: var(--cream-muted); margin-left: 0.08em; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-link {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--cream-muted); font-size: 0.875rem; font-weight: 500;
  padding: 0.35rem 0; border-bottom: 1.5px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link.active { color: var(--cream); border-bottom-color: var(--copper); }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-pdf {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cream-muted); padding: 0.42rem 0.75rem;
  border: 1px solid var(--line-dark); border-radius: 4px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-pdf:hover { border-color: var(--copper); color: var(--cream); }
.nav-cta {
  appearance: none; border: 0; cursor: pointer;
  background: var(--copper); color: #fff;
  font-size: 0.84rem; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-cta:hover { background: var(--copper-deep); }

/* ==================== BUTTONS & EYEBROWS ==================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 0.85rem;
}
.eyebrow-light { color: var(--copper); }
.eyebrow-copper { color: var(--copper); }

.btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  padding: 0.8rem 1.35rem; border-radius: 4px; border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-copper { background: var(--copper); color: #fff; }
.btn-copper:hover { background: var(--copper-deep); }
.btn-dark { background: var(--obsidian); color: var(--cream); }
.btn-dark:hover { background: var(--copper-deep); }
.btn-dark-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-dark-outline:hover { border-color: var(--ink); }
.btn-ghost-light { background: rgba(255,255,255,0.06); color: var(--cream); border-color: rgba(245,241,232,0.24); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.14); border-color: var(--cream); }
.btn-sm { padding: 0.6rem 0.95rem; font-size: 0.82rem; }
.btn-xs { padding: 0.48rem 0.78rem; font-size: 0.76rem; white-space: nowrap; flex-shrink: 0; }

.link-btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--copper-deep); font-size: 0.84rem; font-weight: 600;
  border-bottom: 1px solid rgba(156, 89, 26, 0.35); padding: 0 0 0.1rem;
}
.link-btn:hover { border-color: var(--copper-deep); color: var(--ink); }

.view { display: none; }
.view.active { display: block; }

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--obsidian);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 45%;
  opacity: 0.72;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(14,13,11,0.88) 0%, rgba(14,13,11,0.62) 52%, rgba(14,13,11,0.32) 100%),
    linear-gradient(180deg, rgba(14,13,11,0.18) 0%, rgba(14,13,11,0.82) 100%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy h1 {
  color: var(--cream);
  font-size: clamp(3.1rem, 6.2vw, 5.2rem);
  font-weight: 600;
  line-height: 0.96;
  max-width: 13ch;
}
.hero-sub {
  color: rgba(245, 241, 232, 0.84);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  max-width: 54ch;
  margin-top: 1.35rem;
}
.hero-sub em { color: var(--cream); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-downloads {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem;
  margin-top: 1.4rem;
  font-size: 0.84rem; font-weight: 500; color: var(--cream-muted);
}
.hero-downloads a:hover { color: var(--copper); }

/* Floating Hero Deed Card */
.hero-card {
  background: rgba(23, 21, 18, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(200, 122, 50, 0.35);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--cream);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}
.hero-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.hero-card-id { font-size: 0.76rem; color: var(--copper); font-weight: 600; }
.hero-card-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; margin-top: 0.25rem; }
.hero-card-sub { font-size: 0.82rem; color: var(--cream-muted); margin-top: 0.2rem; }

.demo-pill {
  display: inline-block; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.6rem; border-radius: 3px;
  background: rgba(200, 122, 50, 0.12); border: 1px solid rgba(200, 122, 50, 0.4); color: var(--copper-deep);
}
.demo-pill-dark {
  background: rgba(200, 122, 50, 0.16); border-color: rgba(200, 122, 50, 0.45); color: var(--copper);
  margin-bottom: 0.9rem;
}
.view-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--ok-bright); background: rgba(73, 193, 124, 0.12);
  border: 1px solid rgba(73, 193, 124, 0.35);
  padding: 0.32rem 0.6rem; border-radius: 99px; white-space: nowrap;
}
.status-pill-sm { font-size: 0.64rem; padding: 0.22rem 0.5rem; }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok-bright);
  box-shadow: 0 0 0 3px rgba(73, 193, 124, 0.25);
}

.hero-card-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-block: 1.25rem; padding-block: 1.15rem;
  border-block: 1px solid var(--line-dark);
}
.hero-card-meta span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-muted); }
.hero-card-meta strong { display: block; font-size: 0.88rem; font-weight: 600; margin-top: 0.2rem; color: var(--cream); }

.hero-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--cream-muted); }
.hero-card-link {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--copper); font-weight: 600; font-size: 0.82rem;
}
.hero-card-link:hover { color: var(--cream); }

/* ==================== BANDS & STORY SECTIONS ==================== */
.band { padding-block: clamp(4rem, 7.5vw, 6.5rem); }
.band-charcoal { background: var(--charcoal); color: var(--cream); }
.band-light { background: var(--alabaster); }
.band-stone { background: var(--stone); }

.band h2 { font-size: clamp(2.1rem, 4vw, 3.25rem); max-width: 19ch; }
.band h2.wide { max-width: 24ch; }
.prose { max-width: 66ch; margin-top: 1rem; color: var(--ink-2); }

.section-head-split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end; margin-bottom: 2.75rem;
}
.lead-muted { color: var(--cream-muted); font-size: 0.98rem; max-width: 48ch; }
.lead-copy { color: var(--ink-2); font-size: 0.98rem; max-width: 48ch; }

/* Bento 4 */
.bento-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }
.bento-card {
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  border-top: 2px solid var(--copper);
  border-radius: var(--radius);
  padding: 1.45rem;
}
.bento-num { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 3.5vw, 3rem); font-weight: 600; color: var(--cream); line-height: 1; }
.bento-title { font-size: 0.88rem; font-weight: 600; color: var(--copper); margin-top: 0.7rem; }
.bento-desc { font-size: 0.84rem; color: var(--cream-muted); margin-top: 0.45rem; line-height: 1.5; }
.footnote-dark { font-size: 0.76rem; color: var(--cream-muted); margin-top: 1.5rem; opacity: 0.8; max-width: 76ch; }

/* Interactive Triad Showcase */
.triad-layout {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; margin-top: 2.5rem;
}
.triad-tabs { display: grid; gap: 0.85rem; }
.triad-tab {
  appearance: none; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 36px 1fr; gap: 0.85rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.triad-tab:hover { border-color: var(--copper); }
.triad-tab.active {
  border-color: var(--copper);
  box-shadow: 0 10px 28px rgba(21, 19, 16, 0.06);
  background: #fffdf9;
}
.triad-idx { font-size: 0.82rem; font-weight: 600; color: var(--copper); padding-top: 0.25rem; }
.triad-tab h3 { font-size: 1.45rem; margin-bottom: 0.35rem; color: var(--ink); }
.triad-tab p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.52; }

.triad-visual { margin: 0; }
.triad-visual img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); box-shadow: 0 20px 50px rgba(14,13,11,0.14);
}
.triad-visual figcaption {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
  margin-top: 0.8rem; letter-spacing: 0.03em;
}

/* Dual Role Cards */
.dual-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; margin-top: 2.5rem; }
.role-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.role-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.role-card-body { padding: 1.85rem; flex: 1; display: flex; flex-direction: column; }
.role-card-body h3 { font-size: 1.85rem; margin-bottom: 0.75rem; }
.role-card-body > p { color: var(--ink-2); font-size: 0.92rem; }
.check-list { margin: 1.25rem 0 1.65rem; display: grid; gap: 0.5rem; }
.check-list li { position: relative; padding-left: 1.25rem; font-size: 0.88rem; color: var(--ink-2); }
.check-list li::before { content: "→"; position: absolute; left: 0; color: var(--copper); font-weight: 700; }
.role-card-body .btn { margin-top: auto; align-self: flex-start; }

/* Geo Grid */
.geo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }
.geo-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem;
}
.geo-active { border-color: var(--copper); border-top: 3px solid var(--copper); background: #fffdf9; }
.geo-phase { font-size: 0.7rem; color: var(--copper-deep); font-weight: 600; text-transform: uppercase; }
.geo-card h3 { font-size: 1.65rem; margin-top: 0.45rem; }
.geo-ceiling { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--ink); margin: 0.35rem 0 0.7rem; }
.geo-card p:last-child { font-size: 0.86rem; color: var(--ink-2); line-height: 1.5; }

/* CTA Band */
.cta-band { position: relative; overflow: hidden; background: var(--obsidian); padding-block: clamp(4.5rem, 8vw, 7rem); }
.cta-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.36; }
.cta-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,13,11,0.92) 0%, rgba(14,13,11,0.68) 65%, rgba(14,13,11,0.45) 100%); }
.cta-copy { position: relative; color: var(--cream); }
.cta-copy h2 { color: var(--cream); font-size: clamp(2.2rem, 4.2vw, 3.4rem); max-width: 18ch; }
.cta-copy p { color: rgba(245,241,232,0.82); max-width: 56ch; margin-top: 1rem; }

/* ==================== 2. LIVE VAULT VIEW ==================== */
.vault-page, .admin-page, .brief-page { padding-block: clamp(2.5rem, 5vw, 4rem) 5rem; }
.view-header {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}
.view-header h2 { font-size: clamp(2rem, 3.8vw, 2.85rem); }
.view-header-meta { font-size: 0.8rem; color: var(--muted); }

.vault-split { display: grid; grid-template-columns: 410px 1fr; gap: 2.25rem; align-items: start; }

/* Sleek Dark Mobile Phone Shell */
.phone-shell {
  background: var(--obsidian);
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 28px 65px rgba(14,13,11,0.28), inset 0 0 0 1px rgba(255,255,255,0.1);
}
.phone-notch {
  width: 96px; height: 18px; background: #050504; border-radius: 99px;
  margin: 0 auto 10px;
}
.phone-screen {
  background: var(--charcoal);
  border-radius: 22px;
  padding: 1.15rem;
  color: var(--cream);
  border: 1px solid var(--line-dark);
}
.phone-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; color: var(--cream-muted); margin-bottom: 1rem;
}

.cask-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.cask-tab {
  appearance: none; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-dark); border-radius: 6px;
  padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem; color: var(--cream-muted);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cask-tab .mono { font-size: 0.72rem; color: var(--copper); font-weight: 600; }
.cask-tab span:last-child { font-size: 0.76rem; }
.cask-tab.active { background: rgba(200, 122, 50, 0.12); border-color: var(--copper); color: var(--cream); }

.vault-hero-card {
  background: linear-gradient(160deg, #211d17 0%, #14120f 100%);
  border: 1px solid rgba(200, 122, 50, 0.25);
  border-radius: 10px;
  padding: 1.15rem;
  margin-bottom: 1rem;
}
.vault-id { font-size: 0.74rem; color: var(--copper); font-weight: 600; }
.vault-hero-card h3 { font-size: 1.75rem; color: var(--cream); margin-top: 0.2rem; }
.vault-sub { font-size: 0.8rem; color: var(--cream-muted); margin-top: 0.2rem; }

.nfc-verify-box {
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
  background: rgba(73, 193, 124, 0.08); border: 1px solid rgba(73, 193, 124, 0.28);
  border-radius: 6px; padding: 0.65rem 0.75rem; margin-top: 1rem;
}
.nfc-verify-left { display: flex; align-items: center; gap: 0.6rem; }
.nfc-verify-left strong { display: block; font-size: 0.74rem; color: var(--ok-bright); }
.nfc-verify-left span.mono { display: block; font-size: 0.68rem; color: var(--cream-muted); margin-top: 0.1rem; }
.nfc-ring {
  width: 12px; height: 12px; border-radius: 50%; background: var(--ok-bright); flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(73, 193, 124, 0.22);
}
.nfc-verify-box.is-pulsing .nfc-ring { animation: nfcPulse 0.8s ease-out; }
@keyframes nfcPulse {
  0% { box-shadow: 0 0 0 0 rgba(73, 193, 124, 0.85); }
  100% { box-shadow: 0 0 0 18px rgba(73, 193, 124, 0); }
}

.vault-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line-dark);
}
.vault-stats dt { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-muted); }
.vault-stats dd { font-size: 0.88rem; font-weight: 600; color: var(--cream); margin-top: 0.2rem; }

.maturation { margin-top: 1rem; }
.maturation-head { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--cream-muted); margin-bottom: 0.4rem; }
.maturation-track { height: 5px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.maturation-track span { display: block; height: 100%; background: var(--copper); border-radius: 99px; transition: width 0.35s var(--ease); }

.vault-actions { display: grid; gap: 0.55rem; }
.vault-actions .btn { width: 100%; }
.phone-screen .btn-dark-outline { color: var(--cream); border-color: var(--line-dark); }
.phone-screen .btn-dark-outline:hover { border-color: var(--copper); background: rgba(200,122,50,0.08); }
.vault-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }

/* Right: Legal Custody Certificate */
.cert-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.cert-head h3 { font-size: 1.9rem; }
.cert-badge {
  font-size: 0.7rem; font-weight: 600; padding: 0.35rem 0.65rem;
  background: var(--stone); border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2);
}
.cert-intro { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; max-width: 62ch; }

.cert-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem;
  margin-block: 1.5rem; padding-block: 1.25rem;
  border-block: 1px solid var(--line);
}
.cert-grid dt { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cert-grid dd { font-size: 0.9rem; font-weight: 500; color: var(--ink); margin-top: 0.25rem; }

.audit-log h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.audit-log li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--stone); font-size: 0.86rem; color: var(--ink-2);
}
.audit-log li:last-child { border-bottom: 0; }
.audit-log li .mono { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

/* ==================== 3. DISTILLERY OS (ADMIN) ==================== */
.admin-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.admin-head h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
.admin-head-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--ink);
  border-radius: var(--radius); padding: 1.25rem 1.35rem;
}
.kpi-attn { border-top-color: var(--copper); }
.kpi-label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.kpi-num { display: block; font-size: clamp(1.4rem, 2.1vw, 1.95rem); font-weight: 600; color: var(--ink); margin-top: 0.45rem; white-space: nowrap; }
.kpi-num small { font-size: 0.55em; color: var(--muted); }

.console-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: 1.5rem;
}
.panel-head, .ledger-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.panel-head h3, .ledger-head h3 { font-size: 1.6rem; }
.panel-note { font-size: 0.86rem; color: var(--muted); max-width: 52ch; margin-top: 0.25rem; }

.track-toggle {
  display: inline-flex; background: var(--stone); padding: 3px; border-radius: 6px; border: 1px solid var(--line);
}
.seg-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 0.48rem 0.9rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg-btn.active { background: var(--obsidian); color: var(--cream); }

.sim-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.75rem; align-items: center; }
.sim-controls { display: grid; gap: 1.1rem; }
.sim-label { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.88rem; color: var(--ink-2); }
.sim-label span { display: flex; justify-content: space-between; }
.sim-label input[type="range"] { width: 100%; accent-color: var(--copper); cursor: pointer; }
.sim-desc { font-size: 0.84rem; color: var(--muted); }
.sim-compare {
  font-size: 0.82rem; font-weight: 600; color: var(--ok);
  background: rgba(46, 125, 79, 0.08); border-left: 2.5px solid var(--ok);
  padding: 0.5rem 0.75rem; border-radius: 0 4px 4px 0;
}

.sim-results { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.sim-metric { background: var(--alabaster); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.95rem 1rem; }
.sim-metric-accent { background: var(--obsidian); border-color: var(--obsidian); color: var(--cream); }
.sim-k { display: block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sim-metric-accent .sim-k { color: var(--cream-muted); }
.sim-v { display: block; font-size: 1.18rem; font-weight: 600; margin-top: 0.3rem; }
.sim-metric-accent .sim-v { color: var(--copper); }

/* Tables & Ledger */
.ledger-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.search {
  font-size: 0.86rem; padding: 0.5rem 0.8rem; min-width: 220px;
  background: var(--alabaster); border: 1px solid var(--line); border-radius: 4px; color: var(--ink);
}
.search:focus { outline: none; border-color: var(--copper); }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip {
  appearance: none; cursor: pointer; background: var(--alabaster); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.36rem 0.7rem; font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.chip.active { background: var(--obsidian); border-color: var(--obsidian); color: var(--cream); }

.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.tbl th {
  text-align: left; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  padding: 0 0.9rem 0.7rem 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
.tbl td { padding: 0.78rem 0.9rem 0.78rem 0; border-bottom: 1px solid var(--stone); color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: 0; }
.row-sum td { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--ink); }
.tag { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.tag-ok { color: var(--ok); }
.ledger-empty { text-align: center; color: var(--muted); padding: 2rem 0; }

/* ==================== 4. INTERACTIVE MARKET BRIEF ==================== */
.brief-banner {
  background: var(--charcoal); color: var(--cream); border-radius: 8px;
  padding: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 1.75rem;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap;
}
.brief-banner h2 { color: var(--cream); font-size: clamp(2rem, 3.8vw, 2.9rem); }
.brief-banner .lead-muted { margin-top: 0.6rem; }
.brief-downloads { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.quadrant { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.quad-cell {
  background: var(--alabaster); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.95rem;
}
.quad-win { background: var(--obsidian); border-color: var(--copper); color: var(--cream); }
.quad-axis { display: block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; color: var(--copper-deep); margin-bottom: 0.4rem; }
.quad-win .quad-axis { color: var(--copper); }
.quad-cell p { font-size: 0.82rem; line-height: 1.45; color: var(--ink-2); }
.quad-win p { color: var(--cream); }

/* ==================== 5. INVESTOR DECK (11 SLIDES) ==================== */
.deck { display: flex; flex-direction: column; min-height: calc(100vh - 58px); background: var(--alabaster); }
.deck-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.8rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--stone); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.deck-bar-right { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.deck-count { color: var(--ink); }
.deck-pdf {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.42rem 0.75rem; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface);
}
.deck-pdf-primary { background: var(--obsidian); border-color: var(--obsidian); color: var(--cream); }
.deck-pdf:hover { border-color: var(--copper); }

.deck-stage { flex: 1; display: flex; }
.slide { display: none; width: 100%; min-height: calc(100vh - 58px - 110px); }
.slide.active { display: flex; }
.slide-body {
  flex: 1; width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding: clamp(2rem, 5vw, 4.25rem) clamp(1.25rem, 5vw, 3.5rem);
  display: flex; flex-direction: column; justify-content: center;
}
.slide-kicker {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--copper-deep); margin-bottom: 1rem;
}
.slide h2 { font-size: clamp(2.1rem, 4.2vw, 3.45rem); max-width: 21ch; }
.slide-lead { font-size: clamp(1rem, 1.4vw, 1.24rem); line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin-top: 1.25rem; }

.slide-title { position: relative; overflow: hidden; background: var(--obsidian); }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.slide-scrim { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(14,13,11,0.92), rgba(14,13,11,0.6) 62%, rgba(14,13,11,0.35)); }
.slide-title .slide-body { position: relative; }
.slide-title .slide-kicker { color: var(--copper); }
.slide-title h2, .slide-title .slide-lead { color: var(--cream); }
.slide-title .slide-lead { opacity: 0.88; }
.slide-byline, .slide-contact { margin-top: 1.5rem; font-size: 0.92rem; font-weight: 500; color: var(--cream-muted); }

.slide-aside { flex: 0 0 36%; margin: 0; position: relative; }
.slide-aside img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.slide-split { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: clamp(1.5rem, 5vw, 4rem); margin-top: 2rem; align-items: start; }
.slide-split p { color: var(--ink-2); margin-bottom: 1rem; max-width: 52ch; }
.big-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(4.2rem, 10vw, 7.5rem); line-height: 0.9; color: var(--copper-deep); }
.big-cap { color: var(--muted) !important; margin-top: 0.85rem; max-width: 24ch; }

.slide-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3.5vw, 2.75rem); margin-top: 2rem; }
.slide-cols > div { border-top: 1.5px solid var(--line); padding-top: 1.15rem; }
.col-no { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; color: var(--copper-deep); margin-bottom: 0.65rem; }
.slide-cols h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.slide-cols p { color: var(--ink-2); font-size: 0.9rem; }
.slide-cols-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; margin-bottom: 0.9rem; }

.slide-tables { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 1.75rem; }
.slide-tables h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.slide-note-box { margin-top: 1.4rem; padding: 1rem 1.25rem; border-left: 3px solid var(--copper); background: var(--surface); border-radius: 0 4px 4px 0; max-width: 60ch; }
.slide-note-box p { font-size: 0.92rem; color: var(--ink-2); }
.aside { margin-top: 1.5rem; padding-left: 1rem; border-left: 2.5px solid var(--copper); max-width: 72ch; color: var(--ink-2); font-size: 0.92rem; }

.deck-controls {
  display: flex; justify-content: center; align-items: center; gap: 1.25rem;
  padding: 1rem; border-top: 1px solid var(--line); background: var(--stone);
}
body[data-view="investors"] .footer { display: none; }
.deck-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--ink);
}
.deck-btn:hover { border-color: var(--copper); }
.deck-btn:disabled { opacity: 0.32; cursor: default; }
.deck-dots { display: flex; gap: 0.5rem; }
.deck-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #c5bdb0; cursor: pointer; }
.deck-dot.active { background: var(--copper); transform: scale(1.25); }

/* ==================== FOOTER ==================== */
.footer { background: var(--obsidian); color: var(--cream-muted); padding-block: 3.5rem 2.25rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.wordmark-footer { font-size: 1.35rem; margin-bottom: 0.45rem; }
.footer-brand { max-width: 44ch; font-size: 0.88rem; color: var(--cream-muted); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer .link-btn { color: var(--cream-muted); border-color: var(--line-dark); font-weight: 500; }
.footer .link-btn:hover { color: var(--cream); border-color: var(--copper); }
.footer-legal {
  margin-top: 2.25rem; padding-top: 1.35rem; border-top: 1px solid var(--line-dark);
  display: grid; gap: 0.35rem; font-size: 0.76rem; color: var(--cream-muted);
}
.footer-copy { color: var(--cream); }

/* ==================== MODALS & TOASTS ==================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(14, 13, 11, 0.7); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
}
.modal-backdrop.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--alabaster); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.85rem; max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto;
  transform: translateY(10px); transition: transform 0.2s var(--ease);
}
.modal-wide { max-width: 540px; }
.modal-backdrop.show .modal { transform: none; }
.modal h3 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.modal-body { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal-fields { display: grid; gap: 0.95rem; margin-bottom: 1.4rem; }
.modal-fields label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.modal-fields input, .modal-fields select {
  font-family: var(--font-body); font-size: 0.92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.55rem 0.7rem;
}
.modal-fields .check-row {
  flex-direction: row; align-items: flex-start; gap: 0.6rem;
  font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-2); font-size: 0.86rem; cursor: pointer;
}
.modal-fields .check-row input { width: auto; padding: 0; margin-top: 0.2rem; accent-color: var(--copper); }
.calc-summary { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1rem; margin-bottom: 1.25rem; font-size: 0.86rem; }
.calc-summary div { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid var(--stone); }
.calc-summary div:last-child { border-bottom: 0; font-weight: 700; color: var(--ink); padding-top: 0.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.7rem; flex-wrap: wrap; }

.toast-wrap { position: fixed; left: 50%; bottom: 1.75rem; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; pointer-events: none; }
.toast {
  background: var(--obsidian); color: var(--cream); border: 1px solid rgba(200,122,50,0.45);
  border-left: 3px solid var(--copper); padding: 0.75rem 1.2rem; border-radius: 5px; font-size: 0.86rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28); animation: toastIn 0.22s var(--ease); pointer-events: auto;
}
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.print-watermark { display: none; }

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 1024px) {
  .hero-grid, .triad-layout, .vault-split, .brief-grid, .sim-grid { grid-template-columns: 1fr; }
  .bento-4, .geo-grid, .kpis { grid-template-columns: 1fr 1fr; }
  .section-head-split, .dual-cards, .slide-split, .slide-cols, .slide-tables { grid-template-columns: 1fr; }
  .slide-aside { display: none; }
  .phone-shell { max-width: 420px; margin-inline: auto; width: 100%; }
}
.hero-grid > *, .vault-split > *, .brief-grid > *, .sim-grid > * { min-width: 0; }

@media screen and (max-width: 680px) {
  .nav-right, .deck-copy { display: none; }
  .nav-inner { flex-wrap: wrap; gap: 0.35rem 0.75rem; padding-block: 0.55rem 0.25rem; }
  .nav-links { width: 100%; gap: 0.9rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line-dark); padding-top: 0.15rem; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 0.8rem; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; padding: 0.35rem 0; }
  .hero { min-height: auto; padding-block: 2rem 2.5rem; }
  .hero-copy h1 { font-size: 2.55rem; }
  .hero-card { padding: 1.15rem; }
  .hero-card-top { flex-direction: column; gap: 0.5rem; }
  .hero-card-meta { grid-template-columns: 1fr; gap: 0.7rem; }
  .hero-card-foot { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .phone-shell { padding: 0; background: transparent; box-shadow: none; border-radius: 10px; max-width: 100%; }
  .phone-screen { padding: 0.95rem; }
  .phone-notch { display: none; }
  .nfc-verify-box { flex-wrap: wrap; }
  .search, .modal-fields input, .modal-fields select { font-size: 16px; }
  .view-header-right { align-items: flex-start; }
  .bento-4, .geo-grid, .kpis, .cert-grid, .sim-results, .quadrant { grid-template-columns: 1fr; }
}

/* ==================== PRINT / 11-SLIDE A4 LANDSCAPE PDF ==================== */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .nav, .deck-bar, .deck-controls, .footer, .toast-wrap, .modal-backdrop, .hero-actions { display: none !important; }

  .deck { counter-reset: slideno; }
  .deck, .deck-stage { display: block !important; min-height: 0 !important; }
  .slide {
    position: relative;
    counter-increment: slideno;
    display: flex !important;
    box-sizing: border-box;
    width: 297mm;
    height: 210mm;
    min-height: 0;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    background: var(--alabaster);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .slide-title { background: var(--obsidian) !important; }
  .slide:last-child { page-break-after: auto; }
  .slide-body { flex: 1; height: 210mm; padding: 18mm 22mm 20mm; justify-content: flex-start; }
  .slide-title .slide-body { justify-content: center; }

  .slide-split { grid-template-columns: 0.78fr 1.22fr !important; }
  .slide-cols, .slide-cols-img { grid-template-columns: repeat(3, 1fr) !important; gap: 9mm !important; }
  .slide-tables { grid-template-columns: 1fr 1fr !important; gap: 11mm !important; }
  .slide-aside { display: block !important; flex: 0 0 36% !important; }

  .slide h2 { font-size: 31pt; max-width: 24ch; }
  .slide-lead { font-size: 12.2pt; }
  .slide-kicker { font-size: 8pt; margin-bottom: 6mm; }
  .slide-cols h3 { font-size: 13.5pt; }
  .slide-cols p, .slide-split p { font-size: 9.8pt; }
  .big-num { font-size: 62pt; }
  .big-cap { font-size: 9.8pt; }
  .slide-cols-img img { aspect-ratio: 16 / 10; max-height: 44mm; object-fit: cover; }
  .table-scroll { overflow: visible !important; }
  .tbl { font-size: 8.6pt; }
  .tbl th, .tbl td { padding: 2mm 2.8mm 2mm 0; white-space: normal; }
  .slide-note-box { margin-top: 6mm; padding: 3.5mm 5mm; }
  .slide-note-box p, .aside { font-size: 9.4pt; }
  .slide img, .slide-aside img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .slide::before {
    content: "Caskaide™";
    position: absolute; left: 22mm; bottom: 11mm;
    font-family: var(--font-display); font-size: 10pt; font-weight: 600; color: #9c9284;
  }
  .slide::after {
    content: counter(slideno, decimal-leading-zero) " / 11";
    position: absolute; right: 22mm; bottom: 11mm;
    font-family: var(--font-mono); font-size: 8pt; font-weight: 600; letter-spacing: 0.12em; color: #9c9284;
  }
  .slide-title::before, .slide-title::after { color: #c7bdb0; }

  .print-watermark {
    display: block; position: fixed; bottom: 4mm; left: 0; right: 0; text-align: center;
    font-family: var(--font-mono); font-size: 6.8pt; letter-spacing: 0.12em; text-transform: uppercase; color: #9c9284;
  }
}
