/* ==========================================================================
   HERITANCE — cinematic visual system
   Thesis: EVIDENCED · SEALED · COPPER
   One dark canvas, one hot accent (copper), one motion idea (the ledger).
   Type: DM Serif Display (display) + DM Sans (everything else).
   ========================================================================== */

:root {
  /* Canvas — dark is the primary surface */
  --h-bg:        #07141B;
  --h-surface:   #0C2029;
  --h-surface-2: #122B36;

  /* Ink — never pure white on the dark canvas */
  --h-text:      #F5F1EB;
  --h-muted:     #93A5AB;

  /* The one hot accent */
  --h-copper:    #C8956C;
  --h-copper-hi: #E2B389;

  /* Semantic status (portals only — quiet, never decorative) */
  --h-green:     #4E8A73;
  --h-amber:     #C9A24B;
  --h-red:       #C4726A;

  /* Structure */
  --h-line:      rgba(245, 241, 235, 0.13);
  --h-line-soft: rgba(245, 241, 235, 0.07);

  /* Light variant (client portal) */
  --h-cream:     #F5F1EB;
  --h-cream-2:   #EDE6DB;
  --h-card:      #FFFFFF;
  --h-ink:       #17323F;
  --h-ink-soft:  #5C6E74;
  --h-line-l:    #E0D9CE;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Fluid type scale */
  --t-hero:    clamp(46px, 7.2vw, 96px);
  --t-display: clamp(30px, 4.4vw, 54px);
  --t-section: clamp(26px, 3.6vw, 40px);
  --t-body:    clamp(15px, 1.1vw, 17px);
  --t-kicker:  11px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--h-bg);
  color: var(--h-text);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .serif {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
}

h1 em, h2 em, .serif em { font-style: italic; color: var(--h-copper); }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--h-copper); color: #12100D; }

.num {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------------------------
   Shared atoms
   -------------------------------------------------------------------------- */

.shell { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

.kicker {
  display: inline-block;
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--h-copper);
}

.prototype-notice {
  position: relative;
  z-index: 60;
  background: #04090D;
  color: rgba(245, 241, 235, 0.62);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--h-line-soft);
}
.prototype-notice strong { color: var(--h-copper); font-weight: 600; }

/* Buttons — lift on hover, press on active. Physical reciprocity. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              background .35s var(--ease), border-color .35s var(--ease),
              color .35s var(--ease);
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn span.arr { transition: transform .35s var(--ease); display: inline-block; }
.btn:hover span.arr { transform: translateX(4px); }

.btn-copper {
  background: var(--h-copper);
  color: #12100D;
  box-shadow: 0 0 0 rgba(200, 149, 108, 0);
}
.btn-copper:hover { background: var(--h-copper-hi); box-shadow: 0 14px 34px -12px rgba(200, 149, 108, .55); }

.btn-ghost {
  border-color: var(--h-line);
  color: var(--h-text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--h-copper); color: var(--h-copper-hi); }

.btn-small { padding: 9px 18px; font-size: 13px; }

/* Light-surface variants */
.btn-ink { background: var(--h-ink); color: var(--h-cream); }
.btn-ink:hover { background: #1E4152; box-shadow: 0 12px 28px -14px rgba(23, 50, 63, .6); }
.btn-outline {
  border-color: var(--h-line-l);
  color: var(--h-ink);
  background: transparent;
}
.btn-outline:hover { border-color: var(--h-copper); color: #A87546; }

/* Tags — status chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(78, 138, 115, 0.16);
  color: #8CC3AC;
  border: 1px solid rgba(78, 138, 115, 0.3);
  white-space: nowrap;
}
.tag.amber { background: rgba(201, 162, 75, .13); color: #DDBE77; border-color: rgba(201, 162, 75, .32); }
.tag.red   { background: rgba(196, 114, 106, .13); color: #DE9A93; border-color: rgba(196, 114, 106, .32); }
.tag.copper{ background: rgba(200, 149, 108, .13); color: var(--h-copper-hi); border-color: rgba(200, 149, 108, .35); }

/* Scroll reveal choreography — one axis, staggered by --d */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--h-surface-2);
  color: var(--h-text);
  border: 1px solid var(--h-line);
  border-left: 3px solid var(--h-copper);
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  max-width: min(520px, 88vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  z-index: 120;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.muted { color: var(--h-muted); }
.small { font-size: 13px; }

/* ==========================================================================
   PUBLIC SITE
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 20, 27, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--h-line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.2px;
  color: var(--h-text);
}
.brand .dot { color: var(--h-copper); }

.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 500; }
.nav-links > a:not(.btn) {
  color: var(--h-muted);
  transition: color .3s var(--ease);
  position: relative;
}
.nav-links > a:not(.btn):hover { color: var(--h-text); }
.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--h-copper);
  transition: right .35s var(--ease);
}
.nav-links > a:not(.btn):hover::after { right: 0; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--h-line);
  color: var(--h-text);
  border-radius: 8px;
  width: 42px; height: 42px;
  font-size: 18px;
  line-height: 1;
}

/* ----- Hero — the one big cinematic moment ----- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--h-line-soft);
}

/* Hero atmosphere — a warm study light behind the pack, breathing slowly.
   No diagrams, no abstractions: the artefact carries the meaning. */
.hero-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 100%, rgba(200, 149, 108, 0.17), transparent 55%),
    radial-gradient(90% 70% at 10% -20%, rgba(18, 43, 54, 0.9), transparent 70%);
}
.hero-field::before {
  content: "";
  position: absolute;
  inset: -15%;
  background: radial-gradient(42% 38% at 72% 52%, rgba(200, 149, 108, 0.13), transparent 70%);
  animation: hero-breathe 13s ease-in-out infinite alternate;
}
@keyframes hero-breathe {
  from { opacity: .45; transform: translate3d(-2.5%, 1.5%, 0) scale(.95); }
  to   { opacity: 1;   transform: translate3d(2.5%, -1.5%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .hero-field::before { animation: none; } }
.hero-field::after {
  /* vignette keeps the type legible over the motion */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(7, 20, 27, .92) 0%, rgba(7, 20, 27, .55) 46%, rgba(7, 20, 27, .15) 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding-top: clamp(70px, 9vh, 120px);
  padding-bottom: clamp(70px, 9vh, 120px);
}

.hero h1 {
  font-size: var(--t-hero);
  line-height: 1.02;
  margin: 22px 0 26px;
  text-wrap: balance;
}

.lede {
  font-size: clamp(16px, 1.35vw, 19px);
  color: var(--h-muted);
  max-width: 46ch;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 34px;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: rgba(245, 241, 235, 0.42);
}
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note span::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--h-copper);
  opacity: .7;
}

/* ----- The ledger window — hero plate ----- */

.ledger-plate { position: relative; }

.ledger-window {
  position: relative;
  background: linear-gradient(160deg, var(--h-surface-2), var(--h-surface) 60%);
  border: 1px solid var(--h-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(245, 241, 235, 0.08);
}

.window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--h-line-soft);
  font-size: 11.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--h-muted);
  background: rgba(7, 20, 27, 0.45);
}
.window-top .live { color: var(--h-copper); }
.window-top .live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--h-copper);
  margin-right: 7px;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .window-top .live::before { animation: none; } }

.ledger-body { padding: 22px 24px 24px; }

.ledger-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.ledger-title h3 { font-size: 26px; }
.ledger-title .kicker { font-size: 9.5px; letter-spacing: 3.5px; }

.year-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.year-cell {
  border: 1px solid var(--h-line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--h-muted);
  display: grid;
  gap: 2px;
  transition: border-color .4s var(--ease);
}
.year-cell strong { color: var(--h-text); font-size: 12.5px; letter-spacing: .4px; }
.year-cell.sealed strong { color: #8CC3AC; }
.year-cell.open { border-color: rgba(200, 149, 108, .5); }
.year-cell.open strong { color: var(--h-copper-hi); }

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--h-line-soft);
  font-size: 14px;
  color: var(--h-muted);
}
.ledger-row strong {
  font-size: 17px;
  color: var(--h-text);
  font-weight: 600;
}
.ledger-row.accent strong { color: var(--h-copper-hi); }

.approval-strip {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(200, 149, 108, 0.08);
  border: 1px solid rgba(200, 149, 108, 0.25);
  font-size: 13px;
}
.approval-strip .seal {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--h-copper);
  color: var(--h-copper);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-family: "DM Serif Display", Georgia, serif;
}
.approval-strip strong { color: var(--h-text); }
.approval-strip span { color: var(--h-muted); font-size: 12.5px; }

.floating-note {
  position: absolute;
  right: -18px;
  bottom: -52px;
  max-width: 300px;
  background: var(--h-cream);
  color: var(--h-ink);
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  transform: rotate(-1.2deg);
}
.floating-note strong { display: block; font-weight: 700; margin-bottom: 3px; }
.floating-note span { color: var(--h-ink-soft); }

/* ----- Proof strip ----- */

.proof-strip { border-bottom: 1px solid var(--h-line-soft); background: rgba(12, 32, 41, .5); }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.proof-item {
  padding: 30px 26px;
  border-left: 1px solid var(--h-line-soft);
  display: grid;
  gap: 5px;
  align-content: start;
}
.proof-item:first-child { border-left: none; padding-left: 0; }
.proof-item strong {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 18.5px;
}
.proof-item span { color: var(--h-muted); font-size: 13.5px; line-height: 1.55; }

/* ----- Sections ----- */

.section { padding: clamp(80px, 11vh, 130px) 0; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vh, 64px); }
.section-head h2 { font-size: var(--t-display); line-height: 1.12; margin: 18px 0 16px; text-wrap: balance; }
.section-head p { color: var(--h-muted); font-size: 16.5px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Story — numbered editorial list beside a sticky statement */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.sticky-title { position: sticky; top: 120px; }
.sticky-title h2 { font-size: var(--t-display); line-height: 1.12; margin: 18px 0 16px; text-wrap: balance; }
.sticky-title p { color: var(--h-muted); font-size: 16px; max-width: 42ch; }

.story-list { display: grid; gap: 0; }
.story-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 34px 0;
  border-top: 1px solid var(--h-line-soft);
}
.story-card:last-child { border-bottom: 1px solid var(--h-line-soft); }
.story-num {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 42px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200, 149, 108, 0.6);
  line-height: 1;
  padding-top: 4px;
}
.story-card h3 { font-size: 22px; margin-bottom: 8px; }
.story-card p { color: var(--h-muted); font-size: 15px; max-width: 52ch; }

/* Rhythm — four steps under a copper thread */
.rhythm-section {
  background:
    radial-gradient(90% 120% at 50% 120%, rgba(200, 149, 108, 0.08), transparent 60%),
    var(--h-surface);
  border-top: 1px solid var(--h-line-soft);
  border-bottom: 1px solid var(--h-line-soft);
}
.rhythm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.rhythm::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 4%; right: 4%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200, 149, 108, 0.5), transparent);
}
.rhythm-card { position: relative; padding-top: 58px; }
.rhythm-card .step {
  position: absolute;
  top: 0;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--h-bg);
  border: 1px solid rgba(200, 149, 108, 0.5);
  color: var(--h-copper);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 19px;
}
.rhythm-card h3 { font-size: 21px; margin-bottom: 8px; }
.rhythm-card p { color: var(--h-muted); font-size: 14.5px; }

/* Portals duo */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.portal-card {
  position: relative;
  border-radius: 20px;
  padding: 38px 36px 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--h-line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.portal-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 149, 108, .45);
  box-shadow: 0 40px 80px -35px rgba(0, 0, 0, .8);
}
.portal-card.dark {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(200, 149, 108, 0.12), transparent 55%),
    linear-gradient(160deg, var(--h-surface-2), var(--h-surface));
}
.portal-card.cream { background: var(--h-cream); color: var(--h-ink); border-color: transparent; }
.portal-card.cream p { color: var(--h-ink-soft); }
.portal-card h3 { font-size: clamp(22px, 2vw, 27px); line-height: 1.2; text-wrap: balance; }
.portal-card p { color: var(--h-muted); font-size: 15px; }

.demo-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(200, 149, 108, 0.45);
  color: var(--h-copper);
}
.portal-card.cream .demo-pill { color: #A87546; border-color: rgba(168, 117, 70, .45); }

.portal-mini {
  width: 100%;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--h-line);
  background: rgba(7, 20, 27, 0.55);
  font-size: 13px;
}
.portal-card.cream .portal-mini { background: #fff; border-color: var(--h-line-l); }
.mini-bar { height: 30px; border-bottom: 1px solid var(--h-line-soft); background: rgba(245, 241, 235, .04); }
.portal-card.cream .mini-bar { border-color: var(--h-line-l); background: var(--h-cream); }
.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--h-line-soft);
}
.portal-card.cream .mini-row { border-color: #F0EBE2; }
.mini-row:last-child { border-bottom: none; }
.mini-row > div:nth-child(2) { flex: 1; min-width: 0; }
.mini-row .muted { font-size: 12px; }
.portal-card.cream .mini-row .muted { color: var(--h-ink-soft); }

.avatar {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--h-surface-2);
  color: var(--h-copper-hi);
  border: 1px solid rgba(200, 149, 108, 0.35);
}
.portal-card.cream .avatar { background: var(--h-cream-2); color: #A87546; border-color: rgba(168, 117, 70, .3); }

/* Boundary — the cream editorial statement */
.boundary-section {
  background: var(--h-cream);
  color: var(--h-ink);
  border-top: 1px solid var(--h-line-soft);
}
.boundary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
.boundary-grid h2 { font-size: var(--t-display); line-height: 1.12; margin: 18px 0 16px; text-wrap: balance; }
.boundary-grid .lede-l { color: var(--h-ink-soft); font-size: 16.5px; max-width: 48ch; }
.boundary-grid .kicker { color: #A87546; }

.guardrail-panel {
  background: var(--h-card);
  border-radius: 18px;
  padding: 14px 26px;
  box-shadow: 0 30px 70px -30px rgba(23, 50, 63, 0.35);
  border: 1px solid var(--h-line-l);
}
.guardrail-line {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #F0EBE2;
  align-items: flex-start;
}
.guardrail-line:last-child { border-bottom: none; }
.guardrail-line .check {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(78, 138, 115, 0.14);
  color: #3A7059;
  margin-top: 2px;
}
.guardrail-line .check.no { background: rgba(196, 114, 106, 0.14); color: #A8544B; font-size: 16px; }
.guardrail-line strong { font-size: 15.5px; color: var(--h-ink); }
.guardrail-line p { color: var(--h-ink-soft); font-size: 13.5px; margin-top: 2px; }

/* Final CTA */
.final-cta {
  position: relative;
  text-align: center;
  padding: clamp(90px, 13vh, 150px) 0;
  overflow: hidden;
  border-top: 1px solid var(--h-line-soft);
  background:
    radial-gradient(70% 90% at 50% 115%, rgba(200, 149, 108, 0.18), transparent 60%),
    var(--h-bg);
}
.final-cta h2 {
  font-size: var(--t-display);
  line-height: 1.12;
  margin: 20px auto 16px;
  max-width: 20ch;
  text-wrap: balance;
}
.final-cta p { color: var(--h-muted); max-width: 52ch; margin: 0 auto 34px; }
.final-cta .hero-actions { justify-content: center; margin-top: 0; }

.site-footer {
  border-top: 1px solid var(--h-line-soft);
  padding: 34px 0;
  font-size: 12.5px;
  color: rgba(245, 241, 235, 0.4);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .brand { font-size: 19px; }

/* ==========================================================================
   IFA PORTAL — dark utility register, same canvas, calmer
   ========================================================================== */

.portal-body { background: var(--h-bg); }

.portal-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--h-line-soft);
  background: rgba(4, 12, 17, 0.6);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { padding: 0 10px; }

.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--h-muted);
  font-size: 14px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.sidebar-nav a:hover { background: rgba(245, 241, 235, 0.05); color: var(--h-text); }
.sidebar-nav a.active {
  background: rgba(200, 149, 108, 0.1);
  color: var(--h-copper-hi);
  border-left-color: var(--h-copper);
}
.nav-icon { width: 20px; text-align: center; opacity: .85; }

.sidebar-bottom { margin-top: auto; }
.user-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-top: 1px solid var(--h-line-soft);
  font-size: 13px;
}
.user-chip strong { display: block; }
.user-chip span { color: var(--h-muted); font-size: 11.5px; }

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--h-line-soft);
  background: rgba(7, 20, 27, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.portal-topbar h1 { font-size: 23px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--h-line);
  background: transparent;
  color: var(--h-muted);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.icon-btn:hover { color: var(--h-copper-hi); border-color: rgba(200, 149, 108, .5); }

.portal-content { padding: 34px; }

.portal-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.portal-heading h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 10px 0 8px; }
.portal-heading p { color: var(--h-muted); }

.card {
  background: linear-gradient(170deg, var(--h-surface-2), var(--h-surface) 70%);
  border: 1px solid var(--h-line-soft);
  border-radius: 16px;
}

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.metric { padding: 20px 22px; position: relative; overflow: hidden; }
.metric::after {
  content: "";
  position: absolute;
  left: 22px; bottom: 0;
  width: 34px; height: 2px;
  background: var(--h-copper);
  opacity: .8;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  color: var(--h-muted);
  font-size: 12.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.metric strong {
  display: block;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  color: var(--h-text);
  font-variant-numeric: tabular-nums lining-nums;
}
.metric small { color: var(--h-muted); font-size: 12.5px; display: block; margin-top: 8px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.panel { padding: 24px; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head h3 { font-size: 19px; }
.panel-head > div > span { color: var(--h-muted); font-size: 13px; }

.search-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-row input, .search-row select {
  background: rgba(7, 20, 27, 0.6);
  border: 1px solid var(--h-line);
  color: var(--h-text);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
}
.search-row input { flex: 1; min-width: 160px; }
.search-row input:focus, .search-row select:focus {
  outline: none;
  border-color: rgba(200, 149, 108, 0.6);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.12);
}
.search-row select option { background: var(--h-surface); }

.client-list { display: grid; gap: 8px; }
.client-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) 70px auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--h-line-soft);
  border-radius: 12px;
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.client-row:hover {
  border-color: rgba(200, 149, 108, 0.4);
  background: rgba(200, 149, 108, 0.04);
  transform: translateX(3px);
}
.client-row h4 { margin: 0; font-size: 15px; font-family: "DM Sans", sans-serif; font-weight: 600; }
.client-row p { color: var(--h-muted); font-size: 12.5px; margin-top: 2px; }
.client-row strong { font-size: 16px; font-variant-numeric: tabular-nums; }

.progress-line {
  height: 4px;
  border-radius: 4px;
  background: rgba(245, 241, 235, 0.1);
  overflow: hidden;
  margin-top: 6px;
}
.progress-line i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to right, #A87546, var(--h-copper-hi));
  transition: width 1.2s var(--ease);
}

.queue-list { display: grid; gap: 10px; }
.queue-card {
  border: 1px solid var(--h-line-soft);
  border-left: 2px solid var(--h-copper);
  border-radius: 12px;
  padding: 15px 17px;
  display: grid;
  gap: 5px;
  font-size: 13.5px;
}
.queue-card strong { font-size: 14.5px; }
.queue-card p { color: var(--h-muted); font-size: 13px; }
.queue-card a { justify-self: start; margin-top: 4px; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 150px;
  padding-top: 10px;
}
.chart .bar {
  flex: 1;
  position: relative;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(to top, rgba(200, 149, 108, 0.16), rgba(200, 149, 108, 0.55));
  border: 1px solid rgba(200, 149, 108, 0.3);
  border-bottom: none;
  min-height: 20px;
  transform-origin: bottom;
}
.chart .bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--h-muted);
}
.chart { margin-bottom: 26px; }

.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.case-person { display: flex; gap: 16px; align-items: center; }
.case-person .avatar { width: 46px; height: 46px; font-size: 15px; }
.case-person h3 { font-size: 22px; }
.case-person p { color: var(--h-muted); font-size: 13px; margin-top: 3px; }

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none; } }

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--h-line-soft);
  margin: -6px -6px 22px;
  padding: 0 6px;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--h-muted);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.tab-btn:hover { color: var(--h-text); }
.tab-btn.active { color: var(--h-copper-hi); border-bottom-color: var(--h-copper); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panel-in .5s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tab-panel.active { animation: none; } }

.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-card {
  border: 1px solid var(--h-line-soft);
  border-radius: 12px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}
.summary-card span { color: var(--h-muted); font-size: 12px; letter-spacing: .3px; }
.summary-card strong {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  font-variant-numeric: tabular-nums lining-nums;
}
.summary-card.accent strong { color: var(--h-copper-hi); }

.no-advice {
  border: 1px solid rgba(200, 149, 108, 0.3);
  background: rgba(200, 149, 108, 0.06);
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 13.5px;
  color: rgba(245, 241, 235, 0.8);
  line-height: 1.6;
}
.no-advice strong { color: var(--h-copper-hi); }

.task-list { display: grid; gap: 8px; }
.task-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid var(--h-line-soft);
  border-radius: 12px;
}
.task-item > div:nth-child(2) { flex: 1; min-width: 0; }
.task-icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(200, 149, 108, 0.1);
  color: var(--h-copper);
  font-size: 14px;
}
.task-item h4 { margin: 0; font-size: 14.5px; font-family: "DM Sans", sans-serif; font-weight: 600; }
.task-item p { color: var(--h-muted); font-size: 12.5px; margin-top: 2px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--h-muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--h-line);
}
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--h-line-soft);
  vertical-align: middle;
}
.data-table td:nth-child(3) { font-variant-numeric: tabular-nums; font-weight: 600; }
.data-table tr.resolved td { opacity: .55; }
.data-table tr { transition: background .3s var(--ease); }
.data-table tbody tr:hover { background: rgba(245, 241, 235, 0.025); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.action-chip {
  border: 1px solid var(--h-line);
  background: transparent;
  color: var(--h-text);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 600;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.action-chip:hover {
  border-color: var(--h-copper);
  color: var(--h-copper-hi);
  background: rgba(200, 149, 108, 0.08);
}

.register-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.register-card {
  border: 1px solid var(--h-line-soft);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.register-card .provider {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--h-copper);
  font-weight: 700;
}
.register-card h4 { margin: 0; font-size: 15.5px; font-family: "DM Sans", sans-serif; font-weight: 600; }
.treatment {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--h-muted);
  border-top: 1px dashed var(--h-line-soft);
  padding-top: 8px;
}
.treatment strong { color: var(--h-text); font-weight: 600; }

/* Evidence pack — deliberately paper-white inside the dark portal */
.pack-preview {
  background: #FDFBF7;
  color: var(--h-ink);
  border-radius: 14px;
  padding: 40px 44px;
  max-width: 720px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}
.pack-brand {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 21px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--h-ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pack-brand small { font-family: "DM Sans", sans-serif; font-size: 10px; letter-spacing: 2px; color: #A87546; font-weight: 700; }
.pack-title h3 { font-size: 27px; margin: 10px 0 6px; }
.pack-title p { color: var(--h-ink-soft); font-size: 14px; }
.pack-title .kicker { color: #A87546; }
.pack-table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 14px; }
.pack-table td { padding: 12px 4px; border-bottom: 1px solid #E7E0D4; }
.pack-table td:nth-child(2) { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pack-table td:nth-child(3) { text-align: right; color: var(--h-ink-soft); font-size: 12px; width: 130px; }
.pack-note {
  margin-top: 28px;
  border: 1px solid rgba(168, 117, 70, .4);
  background: rgba(200, 149, 108, .08);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #6B4F35;
  line-height: 1.6;
}
.pack-note strong { color: #A8544B; }

.audit-list { display: grid; gap: 0; position: relative; padding-left: 22px; }
.audit-list::before {
  content: "";
  position: absolute;
  left: 5px; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--h-line);
}
.audit-item { position: relative; padding: 12px 0 12px 8px; }
.audit-item::before {
  content: "";
  position: absolute;
  left: -21px; top: 18px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--h-bg);
  border: 1.5px solid var(--h-copper);
}
.audit-item strong { display: block; font-size: 14px; }
.audit-item span { color: var(--h-muted); font-size: 12.5px; }

/* ==========================================================================
   CLIENT PORTAL — light cream register, calm and legible
   ========================================================================== */

.client-body {
  background:
    radial-gradient(100% 60% at 100% 0%, rgba(200, 149, 108, 0.1), transparent 55%),
    var(--h-cream);
  color: var(--h-ink);
  font-size: 16px;
}
.client-body .prototype-notice { background: var(--h-ink); border-bottom: none; color: rgba(245, 241, 235, .75); }

.client-topbar {
  background: rgba(245, 241, 235, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--h-line-l);
  position: sticky;
  top: 0;
  z-index: 40;
}
.client-shell { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.client-topbar .client-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.client-topbar .brand { color: var(--h-ink); }
.client-user { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px; }
.client-user .avatar { background: var(--h-cream-2); color: #A87546; border-color: rgba(168, 117, 70, .3); }
.client-user .demo-pill { color: #A87546; border-color: rgba(168, 117, 70, .4); }

.client-main { padding: 44px 0 90px; }

.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 34px;
}
.welcome .kicker { color: #A87546; }
.welcome h1 { font-size: clamp(32px, 4.5vw, 46px); margin: 12px 0 10px; }
.welcome p { color: var(--h-ink-soft); max-width: 54ch; }

.adviser-badge {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  font-size: 13px;
  background: var(--h-card);
  border: 1px solid var(--h-line-l);
  border-radius: 14px;
  box-shadow: 0 16px 40px -24px rgba(23, 50, 63, .35);
}
.adviser-badge span { display: block; color: var(--h-ink-soft); font-size: 12px; }
.adviser-badge strong { font-size: 15px; }
.adviser-badge .avatar { width: 42px; height: 42px; }

.client-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }

.client-body .card {
  background: var(--h-card);
  border: 1px solid var(--h-line-l);
  border-radius: 16px;
  box-shadow: 0 18px 44px -30px rgba(23, 50, 63, .3);
}
.client-section { padding: 24px 26px; }
.client-body .panel-head h3 { font-size: 20px; }
.client-body .panel-head > div > span { color: var(--h-ink-soft); font-size: 13px; }

/* Completion plate — dark island in the cream page; carries the ledger motif */
.completion {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(200, 149, 108, 0.22), transparent 55%),
    linear-gradient(160deg, var(--h-surface-2), var(--h-bg)) !important;
  border: none !important;
  color: var(--h-text);
}
.completion::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
    transparent 0, transparent 23px,
    rgba(245, 241, 235, 0.05) 23px, rgba(245, 241, 235, 0.05) 24px);
  pointer-events: none;
}
.completion .kicker { position: relative; z-index: 2; }
.completion strong {
  position: relative;
  z-index: 2;
  display: block;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 44px;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums lining-nums;
}
.completion p { position: relative; z-index: 2; color: rgba(245, 241, 235, 0.68); font-size: 14px; margin-bottom: 18px; }
.completion .progress-line { position: relative; z-index: 2; height: 6px; background: rgba(245, 241, 235, 0.12); }

.client-body .task-item { border-color: #EFE9DF; }
.client-body .task-icon { background: rgba(200, 149, 108, 0.14); color: #A87546; }
.client-body .task-item h4 { color: var(--h-ink); font-size: 15.5px; }
.client-body .task-item p { color: var(--h-ink-soft); font-size: 13px; }

.upload-zone {
  border: 1.5px dashed rgba(168, 117, 70, 0.45);
  border-radius: 14px;
  background: rgba(200, 149, 108, 0.05);
  text-align: center;
  padding: 34px 24px;
  display: grid;
  gap: 8px;
  justify-items: center;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
.upload-zone:hover { border-color: #A87546; background: rgba(200, 149, 108, 0.09); }
.upload-zone .glyph { font-size: 30px; color: #A87546; }
.upload-zone h4 { margin: 0; font-size: 17px; }
.upload-zone p { color: var(--h-ink-soft); font-size: 13.5px; max-width: 44ch; }

.uploaded-list { display: grid; gap: 8px; margin-top: 14px; }
.uploaded-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #EFE9DF;
  background: #FDFBF7;
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 13.5px;
}
.uploaded-file span:last-child { color: var(--h-ink-soft); font-size: 12px; }
.uploaded-file.new { animation: file-in .6s var(--ease); }
@keyframes file-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.year-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.client-body .summary-card { border-color: #EFE9DF; }
.client-body .summary-card span { color: var(--h-ink-soft); }
.client-body .summary-card strong { color: var(--h-ink); }
.client-body .summary-card.accent strong { color: #A87546; }

.client-body .no-advice {
  border-color: rgba(168, 117, 70, .35);
  background: rgba(200, 149, 108, .07);
  color: #5A4632;
}
.client-body .no-advice strong { color: #A8544B; }

.bank-option {
  display: flex;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid #F0EBE2;
  align-items: flex-start;
}
.bank-option:last-child { border-bottom: none; padding-bottom: 4px; }
.bank-icon {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--h-cream-2);
  color: #A87546;
  font-size: 13px;
  font-weight: 700;
}
.bank-option h4 { margin: 0 0 3px; font-size: 15.5px; }
.bank-option p { color: var(--h-ink-soft); font-size: 13px; margin-bottom: 8px; }

.intent-box {
  border-left: 3px solid var(--h-copper);
  background: #FDFBF7;
  border-radius: 0 12px 12px 0;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}
.intent-box h4 { margin: 0; font-size: 15px; }
.intent-box p {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--h-ink);
}
.intent-box .tag { justify-self: start; }

.client-body .audit-list::before { background: var(--h-line-l); }
.client-body .audit-item::before { background: var(--h-card); border-color: #A87546; }
.client-body .audit-item strong { color: var(--h-ink); }
.client-body .audit-item span { color: var(--h-ink-soft); }

.faq-note {
  border: 1px solid var(--h-line-l);
  border-radius: 14px;
  background: var(--h-cream-2);
  padding: 18px 20px;
  font-size: 13.5px;
  color: var(--h-ink-soft);
  line-height: 1.6;
}
.faq-note strong { color: var(--h-ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .metrics, .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .register-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .portal-layout { grid-template-columns: 210px minmax(0, 1fr); }
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 60px; }
  .floating-note { position: static; transform: none; margin-top: 16px; max-width: none; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-item { border-left: none; padding-left: 0; }
  .story-grid, .boundary-grid, .portal-grid { grid-template-columns: 1fr; }
  .sticky-title { position: static; }
  .rhythm { grid-template-columns: 1fr 1fr; gap: 34px 22px; }
  .rhythm::before { display: none; }
  .client-grid { grid-template-columns: 1fr; }

  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: 74px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(7, 20, 27, 0.97);
    border-bottom: 1px solid var(--h-line);
    padding: 18px 28px 26px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }

  .portal-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--h-line-soft);
    padding: 14px 18px;
  }
  .sidebar-nav { display: flex; gap: 4px; }
  .sidebar-nav a { white-space: nowrap; padding: 9px 12px; border-left: none; }
  .sidebar-bottom { display: none; }
  .portal-content { padding: 22px 18px; }
  .client-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .client-row > div:nth-child(3), .client-row > div:nth-child(4) { display: none; }
  .data-table th:nth-child(4), .data-table td:nth-child(4),
  .data-table th:nth-child(5), .data-table td:nth-child(5) { display: none; }
  .mobile-hide { display: none; }
  .pack-preview { padding: 26px 22px; }
}

@media (max-width: 560px) {
  .metrics, .summary-cards, .year-summary, .proof-grid, .rhythm { grid-template-columns: 1fr; }
  .proof-item { padding: 20px 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .welcome { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   PUBLIC SITE — marketing rework (2026-08-24)
   The hero artefact is the sales pitch: the finished evidence pack,
   writing itself in and taking the seal. The motion IS the meaning.
   ========================================================================== */

/* ----- The evidence pack cover ----- */

.pack-plate { position: relative; z-index: 2; }

.pack-cover {
  position: relative;
  background: linear-gradient(176deg, #FDFBF7, #F3EDE1);
  color: var(--h-ink);
  border-radius: 5px;
  padding: 36px 38px 32px;
  transform: rotate(-1.4deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .8) inset,
    0 50px 90px -30px rgba(0, 0, 0, 0.85);
}
/* the sheets beneath the cover — this is a pack, not a page */
.pack-cover::before, .pack-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #EFE8DA;
  border-radius: 5px;
  z-index: -1;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7);
}
.pack-cover::before { transform: rotate(1.6deg) translateY(5px); }
.pack-cover::after  { transform: rotate(3.1deg) translateY(10px); background: #E9E1D1; }

.pack-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #A87546;
}
.pack-rule {
  border-top: 2px solid var(--h-ink);
  margin: 12px 0 22px;
  position: relative;
}
.pack-rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 2px;
  border-top: 1px solid rgba(23, 50, 63, .35);
}

.pack-cover-title .kicker { color: #A87546; font-size: 9.5px; letter-spacing: 3.5px; }
.pack-cover-title h3 { font-size: clamp(26px, 2.4vw, 32px); margin: 8px 0 8px; }
.pack-cover-title p { color: var(--h-ink-soft); font-size: 13.5px; line-height: 1.6; }

.pack-checks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.pack-checks li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px dashed #DED5C4;
  font-size: 14px;
  font-weight: 500;
}
.pc-tick {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  align-self: center;
  font-size: 11px;
  background: rgba(200, 149, 108, 0.16);
  color: #A87546;
}

.pack-sign {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
}
.pack-motto {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--h-ink);
}

.wax-seal {
  flex: none;
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 30%, var(--h-copper-hi), var(--h-copper) 55%, #9A6B44);
  color: #2A1A0E;
  box-shadow:
    0 10px 24px -8px rgba(122, 82, 48, .55),
    inset 0 2px 4px rgba(255, 255, 255, .35),
    inset 0 -3px 6px rgba(0, 0, 0, .25);
  transform: rotate(-6deg);
}
.wax-seal span {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 30px;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(42, 26, 14, .55);
  display: grid;
  place-items: center;
}

/* Glint — every so often, light crosses the paper. Sealed, kept, alive. */
.pack-cover .glint {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  overflow: hidden;
  pointer-events: none;
}
.pack-cover .glint::after {
  content: "";
  position: absolute;
  top: -30%; bottom: -30%;
  width: 34%;
  left: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-140%) skewX(-14deg);
  animation: pack-glint 9s var(--ease) infinite;
  animation-delay: 4.5s;
}
@keyframes pack-glint {
  0%   { transform: translateX(-140%) skewX(-14deg); }
  16%  { transform: translateX(420%) skewX(-14deg); }
  100% { transform: translateX(420%) skewX(-14deg); }
}

/* The pack writes itself in — left to right, line by line, then the seal. */
@media (prefers-reduced-motion: no-preference) {
  .ink {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: ink-in .9s var(--ease) forwards;
    animation-delay: var(--w, .6s);
  }
  @keyframes ink-in {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    60%  { opacity: 1; }
    to   { opacity: 1; clip-path: inset(0 -4% 0 0); }
  }
  .wax-seal {
    opacity: 0;
    transform: scale(1.7) rotate(-18deg);
    animation: seal-stamp .55s cubic-bezier(.2, 1.35, .35, 1) forwards;
    animation-delay: 2.9s;
  }
  @keyframes seal-stamp {
    from { opacity: 0; transform: scale(1.7) rotate(-18deg); }
    to   { opacity: 1; transform: scale(1) rotate(-6deg); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .pack-cover .glint::after { animation: none; }
}

/* ----- Proof strip — the big-number register ----- */

.proof-item strong.big {
  font-size: clamp(24px, 2.2vw, 30px);
  color: var(--h-copper-hi);
  letter-spacing: .2px;
}

/* ----- Story vignettes — two afternoons, then the turn ----- */

.story-card { grid-template-columns: 122px 1fr; }

.story-when { padding-top: 4px; }
.story-when small {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--h-muted);
  margin-bottom: 6px;
}
.story-when .yr {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 40px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200, 149, 108, 0.6);
}
.story-when .yr.fill {
  color: var(--h-copper);
  -webkit-text-stroke: 0;
  font-style: italic;
}
.story-card.turn {
  background: linear-gradient(to right, rgba(200, 149, 108, 0.07), transparent 75%);
  border-top-color: rgba(200, 149, 108, 0.35);
  padding-left: 18px;
  margin-left: -18px;
  border-radius: 0 14px 14px 0;
}

/* ----- Why — the firm's reasons ----- */

.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--h-line-soft);
  border-radius: 18px;
  padding: 30px 30px 28px;
  background: linear-gradient(170deg, var(--h-surface-2), var(--h-surface) 75%);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.why-card:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 149, 108, .4);
  box-shadow: 0 34px 70px -35px rgba(0, 0, 0, .8);
}
.why-index {
  font-style: italic;
  font-size: 15px;
  color: var(--h-copper);
  letter-spacing: 1px;
}
.why-card h3 { font-size: clamp(20px, 1.8vw, 24px); margin: 10px 0 10px; text-wrap: balance; }
.why-card p { color: var(--h-muted); font-size: 14.5px; max-width: 52ch; }

/* ----- Family band — one quiet promise ----- */

.family-band {
  text-align: center;
  background:
    radial-gradient(70% 110% at 50% 0%, rgba(200, 149, 108, 0.08), transparent 60%),
    var(--h-surface);
  border-top: 1px solid var(--h-line-soft);
  border-bottom: 1px solid var(--h-line-soft);
}
.family-band .section-head { margin-bottom: 0; max-width: 720px; }

/* ----- Voices — what advisers (will) say ----- */

.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote-card {
  position: relative;
  margin: 0;
  border: 1px solid var(--h-line-soft);
  border-radius: 18px;
  padding: 34px 28px 26px;
  background: linear-gradient(170deg, var(--h-surface-2), var(--h-surface) 75%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quote-card::before {
  content: "“";
  position: absolute;
  top: 6px; left: 22px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 64px;
  line-height: 1;
  color: rgba(200, 149, 108, 0.45);
}
.quote-card blockquote {
  margin: 18px 0 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}
.quote-card figcaption { margin-top: auto; border-top: 1px solid var(--h-line-soft); padding-top: 14px; font-size: 13px; }
.quote-card figcaption strong { display: block; }
.quote-card figcaption span { color: var(--h-muted); font-size: 12px; }

/* ----- Pricing — one plan, said plainly ----- */

.pricing-section {
  background:
    radial-gradient(80% 120% at 100% 100%, rgba(200, 149, 108, 0.07), transparent 60%),
    var(--h-surface);
  border-top: 1px solid var(--h-line-soft);
}
.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
.pricing-grid h2 { font-size: var(--t-display); line-height: 1.12; margin: 18px 0 16px; text-wrap: balance; }
.pricing-lede { color: var(--h-muted); font-size: 16px; max-width: 50ch; }
.pricing-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 11px; }
.pricing-points li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
}
.pricing-points li::before {
  content: "✓";
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  align-self: center;
  font-size: 11px;
  background: rgba(200, 149, 108, 0.14);
  color: var(--h-copper-hi);
}

.price-card {
  border: 1px solid rgba(200, 149, 108, 0.35);
  border-radius: 20px;
  padding: 36px 36px 32px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(200, 149, 108, 0.13), transparent 55%),
    linear-gradient(165deg, var(--h-surface-2), var(--h-bg));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85);
}
.price-line { display: flex; align-items: baseline; gap: 14px; margin: 20px 0 14px; }
.price-line .price { font-size: clamp(56px, 6vw, 76px); line-height: 1; color: var(--h-text); }
.price-line .per { color: var(--h-muted); font-size: 13.5px; line-height: 1.45; }
.price-card > p { color: var(--h-muted); font-size: 13.5px; line-height: 1.6; }
.price-actions { display: grid; gap: 10px; margin-top: 24px; }
.price-actions .btn { justify-content: center; }

/* ----- Marketing rework responsive ----- */

@media (max-width: 940px) {
  .why-grid, .quote-grid, .pricing-grid { grid-template-columns: 1fr; }
  .pack-cover { transform: rotate(-1deg); }
  .story-card.turn { padding-left: 14px; margin-left: -14px; }
}

@media (max-width: 560px) {
  .story-card { grid-template-columns: 1fr; gap: 10px; }
  .story-when { display: flex; align-items: baseline; gap: 10px; }
  .story-when small { margin-bottom: 0; }
  .story-when .yr { font-size: 30px; }
  .pack-cover { padding: 26px 22px 24px; }
  .pack-sign { flex-direction: column; align-items: flex-start; }
  .wax-seal { align-self: flex-end; margin-top: -30px; }
}
