/* =====================================================================
   Terra Vita Hub v379 — Full-site governance spine / surgical UX pass
   Scope: global governance spine, authority boundary, breadcrumbs,
   canonical reviewer route, modular landing, and density controls.
   Public/protected authority boundary remains unchanged.
   ===================================================================== */
:root{
  --tvh379-ink:#082640;
  --tvh379-ink-2:#0a2a43;
  --tvh379-muted:rgba(8,38,64,.72);
  --tvh379-paper:#fffdf6;
  --tvh379-cream:#f6efe1;
  --tvh379-soft:#f9f4ea;
  --tvh379-line:rgba(8,38,64,.14);
  --tvh379-line-strong:rgba(8,38,64,.22);
  --tvh379-green:#1e7f4f;
  --tvh379-teal:#0f766e;
  --tvh379-gold:#d6b26a;
  --tvh379-shadow:0 18px 48px rgba(8,38,64,.08);
  --tvh379-radius:24px;
}
body.tvh-v379-managed{background:#fffdf6;color:var(--tvh379-ink);}
body.tvh-v379-managed main{position:relative;}
body.tvh-v379-managed main p{max-width:76ch;}
body.tvh-v379-managed .tvh-section-lead,
body.tvh-v379-managed .evidence-lead,
body.tvh-v379-managed .tvh-hero-lead p{max-width:70ch;}
body.tvh-v379-managed .tvh-section,
body.tvh-v379-managed .evidence-card,
body.tvh-v379-managed .tvh-assurance-section,
body.tvh-v379-managed .tvh-room-section,
body.tvh-v379-managed .tvh-export-section{scroll-margin-top:132px;}

/* Replaces / governs the primary top navigation where available. */
.tvh-v379-primary-spine,
.tvh-v379-global-spine{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.tvh-v379-primary-spine a,
.tvh-v379-global-spine a{
  text-decoration:none!important;
  color:rgba(8,38,64,.78)!important;
  font-size:12px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
  border:1px solid rgba(8,38,64,.12);
  background:rgba(255,253,246,.72);
  border-radius:999px;
  padding:9px 11px;
  line-height:1;
  white-space:nowrap;
}
.tvh-v379-primary-spine a:hover,
.tvh-v379-primary-spine a:focus,
.tvh-v379-global-spine a:hover,
.tvh-v379-global-spine a:focus{background:#fff;border-color:rgba(8,38,64,.28);color:var(--tvh379-ink)!important;}
.tvh-v379-primary-spine a[aria-current="page"],
.tvh-v379-global-spine a[aria-current="page"]{background:var(--tvh379-ink);border-color:var(--tvh379-ink);color:#fffdf6!important;}
.tvh-v379-global-spine-wrap{
  position:sticky;
  top:0;
  z-index:35;
  background:rgba(255,253,246,.92);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(8,38,64,.10);
  box-shadow:0 12px 30px rgba(8,38,64,.05);
}
.tvh-v379-global-spine-inner{max-width:1280px;margin:0 auto;padding:10px 24px;display:flex;gap:12px;align-items:center;justify-content:space-between;}
.tvh-v379-spine-label{display:flex;align-items:center;gap:8px;color:rgba(8,38,64,.62);font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;white-space:nowrap;}
.tvh-v379-spine-label:before{content:"";width:9px;height:9px;border-radius:99px;background:var(--tvh379-green);box-shadow:0 0 0 5px rgba(30,127,79,.10);}

/* Global authority boundary + breadcrumbs */
.tvh-v379-top-stack{max-width:1280px;margin:0 auto;padding:22px 24px 0;}
.tvh-v379-breadcrumb{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:0 0 14px;
  color:var(--tvh379-muted);
}
.tvh-v379-breadcrumb div{
  background:rgba(255,255,255,.70);
  border:1px solid var(--tvh379-line);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 10px 24px rgba(8,38,64,.04);
}
.tvh-v379-breadcrumb span{display:block;color:rgba(8,38,64,.52);font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;margin-bottom:4px;}
.tvh-v379-breadcrumb strong{display:block;color:var(--tvh379-ink);font-size:13px;line-height:1.35;}
.tvh-v379-authority-boundary{
  border:1px solid var(--tvh379-line);
  border-left:5px solid var(--tvh379-gold);
  border-radius:var(--tvh379-radius);
  background:linear-gradient(180deg,rgba(255,255,255,.90),rgba(249,244,234,.94));
  box-shadow:var(--tvh379-shadow);
  padding:20px;
  margin-bottom:16px;
}
.tvh-v379-boundary-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:14px;border-bottom:1px solid var(--tvh379-line);padding-bottom:12px;}
.tvh-v379-boundary-head small{display:block;color:var(--tvh379-green);font-size:11px;font-weight:950;letter-spacing:.16em;text-transform:uppercase;margin-bottom:4px;}
.tvh-v379-boundary-head h2{margin:0;color:var(--tvh379-ink);font-size:clamp(22px,3vw,34px);line-height:1.06;}
.tvh-v379-boundary-head p{margin:0;max-width:54ch;color:var(--tvh379-muted);line-height:1.55;}
.tvh-v379-boundary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.tvh-v379-boundary-item{background:rgba(255,253,246,.78);border:1px solid var(--tvh379-line);border-radius:18px;padding:14px;}
.tvh-v379-boundary-item span{display:block;color:rgba(8,38,64,.56);font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase;margin-bottom:6px;}
.tvh-v379-boundary-item strong{display:block;color:var(--tvh379-ink);font-size:14px;line-height:1.35;}
.tvh-v379-boundary-item p{margin:6px 0 0;color:var(--tvh379-muted);font-size:13px;line-height:1.45;}

/* Canonical reviewer route / diagram */
.tvh-v379-canonical-route{
  border:1px solid var(--tvh379-line);
  background:linear-gradient(180deg,rgba(255,255,255,.80),rgba(246,239,225,.92));
  border-radius:var(--tvh379-radius);
  box-shadow:var(--tvh379-shadow);
  padding:18px;
  margin:16px 0 22px;
}
.tvh-v379-canonical-route.light{background:linear-gradient(180deg,#fffdf6,#f9f4ea);}
.tvh-v379-canonical-route-head{display:flex;gap:14px;align-items:end;justify-content:space-between;margin-bottom:14px;}
.tvh-v379-canonical-route-head small{display:block;color:var(--tvh379-green);font-size:11px;font-weight:950;letter-spacing:.16em;text-transform:uppercase;margin-bottom:4px;}
.tvh-v379-canonical-route-head h2{margin:0;color:var(--tvh379-ink);font-size:clamp(20px,2.5vw,30px);line-height:1.08;}
.tvh-v379-canonical-route-head p{margin:0;color:var(--tvh379-muted);font-size:13px;line-height:1.45;max-width:48ch;}
.tvh-v379-route-steps{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;align-items:stretch;}
.tvh-v379-route-step{position:relative;min-height:86px;border:1px solid var(--tvh379-line);border-radius:18px;background:rgba(255,253,246,.76);padding:13px 12px;display:flex;flex-direction:column;justify-content:space-between;}
.tvh-v379-route-step:after{content:"→";position:absolute;right:-10px;top:50%;transform:translateY(-50%);color:rgba(8,38,64,.30);font-weight:900;z-index:1;}
.tvh-v379-route-step:last-child:after{display:none;}
.tvh-v379-route-step span{display:block;color:var(--tvh379-green);font-size:10px;font-weight:950;letter-spacing:.14em;text-transform:uppercase;}
.tvh-v379-route-step strong{display:block;color:var(--tvh379-ink);font-size:14px;line-height:1.1;margin-top:6px;}
.tvh-v379-route-step em{display:block;color:rgba(8,38,64,.60);font-style:normal;font-size:11px;line-height:1.28;margin-top:8px;}

/* Homepage modular 40-second landing */
.tvh-v379-home-landing{max-width:1280px;margin:0 auto;padding:26px 24px 10px;}
.tvh-v379-landing-card{position:relative;overflow:hidden;border:1px solid var(--tvh379-line);border-radius:32px;background:radial-gradient(circle at 8% 0%,rgba(30,127,79,.11),transparent 34%),linear-gradient(135deg,#fffdf6,#f5eddd);box-shadow:0 24px 70px rgba(8,38,64,.10);padding:28px;}
.tvh-v379-landing-card .kicker{color:var(--tvh379-green);font-size:12px;font-weight:950;letter-spacing:.16em;text-transform:uppercase;margin-bottom:10px;}
.tvh-v379-landing-card h1{margin:0;color:var(--tvh379-ink);font-size:clamp(38px,6vw,76px);line-height:.98;letter-spacing:-.04em;}
.tvh-v379-landing-card h1 span{color:var(--tvh379-green);}
.tvh-v379-landing-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;margin-top:22px;align-items:stretch;}
.tvh-v379-value-card,.tvh-v379-diagram-card{border:1px solid var(--tvh379-line);border-radius:24px;background:rgba(255,255,255,.72);padding:18px;}
.tvh-v379-value-card h2,.tvh-v379-diagram-card h2{margin:0 0 10px;color:var(--tvh379-ink);font-size:20px;}
.tvh-v379-value-card p{margin:0 0 12px;color:var(--tvh379-muted);line-height:1.55;}
.tvh-v379-hub-app-programme{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px;}
.tvh-v379-hub-app-programme div{border:1px solid var(--tvh379-line);border-radius:18px;padding:13px;background:#fffdf6;}
.tvh-v379-hub-app-programme span{display:block;color:rgba(8,38,64,.52);font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase;margin-bottom:5px;}
.tvh-v379-hub-app-programme strong{display:block;color:var(--tvh379-ink);font-size:15px;margin-bottom:4px;}
.tvh-v379-hub-app-programme p{font-size:12px;line-height:1.35;margin:0;color:var(--tvh379-muted);}
.tvh-v379-module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px;}
.tvh-v379-module-card{border:1px solid var(--tvh379-line);border-radius:20px;background:rgba(255,253,246,.82);padding:15px;text-decoration:none;display:block;}
.tvh-v379-module-card span{display:block;color:var(--tvh379-green);font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase;margin-bottom:6px;}
.tvh-v379-module-card strong{display:block;color:var(--tvh379-ink);font-size:16px;line-height:1.15;margin-bottom:6px;}
.tvh-v379-module-card p{margin:0;color:var(--tvh379-muted);font-size:12px;line-height:1.35;}
.tvh-v379-architecture-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px;}
.tvh-v379-architecture-row figure{margin:0;border:1px solid var(--tvh379-line);border-radius:22px;background:rgba(255,255,255,.72);padding:12px;}
.tvh-v379-architecture-row img{display:block;width:100%;height:auto;border-radius:16px;}
.tvh-v379-architecture-row figcaption{margin-top:8px;color:var(--tvh379-muted);font-size:12px;line-height:1.35;}

/* Modular blocks, accordions, contained/excluded tables */
.tvh-v379-module-shell{max-width:1180px;margin:22px auto;padding:0 24px;}
.tvh-v379-module-shell .tvh-v379-panel{border:1px solid var(--tvh379-line);border-radius:var(--tvh379-radius);background:rgba(255,253,246,.85);box-shadow:var(--tvh379-shadow);padding:20px;margin:14px 0;}
.tvh-v379-panel h2,.tvh-v379-panel h3{margin-top:0;color:var(--tvh379-ink);}
.tvh-v379-panel p,.tvh-v379-panel li{color:var(--tvh379-muted);line-height:1.55;}
.tvh-v379-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.tvh-v379-three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.tvh-v379-mini{border:1px solid var(--tvh379-line);border-radius:18px;background:rgba(255,255,255,.72);padding:15px;}
.tvh-v379-mini strong{display:block;color:var(--tvh379-ink);margin-bottom:6px;}
.tvh-v379-mini span{display:block;color:var(--tvh379-muted);font-size:13px;line-height:1.42;}
.tvh-v379-contained-table{width:100%;border-collapse:separate;border-spacing:0 10px;}
.tvh-v379-contained-table th{text-align:left;color:rgba(8,38,64,.54);font-size:11px;font-weight:950;letter-spacing:.13em;text-transform:uppercase;padding:0 12px;}
.tvh-v379-contained-table td{vertical-align:top;background:rgba(255,255,255,.72);border-top:1px solid var(--tvh379-line);border-bottom:1px solid var(--tvh379-line);padding:14px 12px;color:var(--tvh379-muted);line-height:1.45;}
.tvh-v379-contained-table td:first-child{border-left:1px solid var(--tvh379-line);border-radius:16px 0 0 16px;color:var(--tvh379-ink);font-weight:850;}
.tvh-v379-contained-table td:last-child{border-right:1px solid var(--tvh379-line);border-radius:0 16px 16px 0;}
.tvh-v379-accordion details{border:1px solid var(--tvh379-line);border-radius:18px;background:rgba(255,255,255,.68);padding:0;margin:10px 0;}
.tvh-v379-accordion summary{cursor:pointer;padding:14px 16px;color:var(--tvh379-ink);font-weight:900;}
.tvh-v379-accordion details div{padding:0 16px 16px;color:var(--tvh379-muted);line-height:1.55;}

/* Footer next step */
.tvh-v379-footer-next{max-width:1180px;margin:40px auto 30px;padding:0 24px;}
.tvh-v379-footer-card{border:1px solid var(--tvh379-line);border-radius:24px;background:linear-gradient(180deg,rgba(8,38,64,.95),rgba(10,42,67,.95));color:#fffdf6;box-shadow:0 24px 70px rgba(8,38,64,.16);padding:20px;display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;}
.tvh-v379-footer-card small{display:block;color:rgba(214,178,106,.95);font-size:11px;font-weight:950;letter-spacing:.15em;text-transform:uppercase;margin-bottom:5px;}
.tvh-v379-footer-card h2{margin:0;color:#fffdf6;font-size:24px;}
.tvh-v379-footer-card p{margin:8px 0 0;color:rgba(255,253,246,.76);line-height:1.45;}
.tvh-v379-footer-links{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.tvh-v379-footer-links a{color:#fffdf6!important;border:1px solid rgba(255,253,246,.20);border-radius:999px;padding:10px 12px;text-decoration:none;font-weight:850;font-size:12px;background:rgba(255,255,255,.07);}
.tvh-v379-footer-links a:hover{background:rgba(255,255,255,.13);}

/* Document filters */
.tvh-v379-doc-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px;}
.tvh-v379-doc-filters a{border:1px solid var(--tvh379-line);border-radius:999px;background:rgba(255,255,255,.70);padding:10px 12px;text-decoration:none;color:var(--tvh379-ink)!important;font-size:12px;font-weight:850;}

@media(max-width:1080px){
  .tvh-v379-route-steps{grid-template-columns:repeat(4,minmax(0,1fr));}
  .tvh-v379-route-step:nth-child(4):after{display:none;}
  .tvh-v379-boundary-grid,.tvh-v379-module-grid,.tvh-v379-architecture-row{grid-template-columns:repeat(2,minmax(0,1fr));}
  .tvh-v379-landing-grid{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .tvh-v379-global-spine-inner{align-items:flex-start;flex-direction:column;padding:9px 16px;}
  .tvh-v379-global-spine{width:100%;flex-wrap:nowrap;overflow:auto;scrollbar-width:thin;padding-bottom:2px;}
  .tvh-v379-breadcrumb,.tvh-v379-boundary-grid,.tvh-v379-route-steps,.tvh-v379-module-grid,.tvh-v379-architecture-row,.tvh-v379-two-col,.tvh-v379-three-col,.tvh-v379-hub-app-programme{grid-template-columns:1fr;}
  .tvh-v379-route-step:after{display:none;}
  .tvh-v379-boundary-head,.tvh-v379-canonical-route-head,.tvh-v379-footer-card{display:block;}
  .tvh-v379-footer-links{justify-content:flex-start;margin-top:14px;}
  .tvh-v379-top-stack,.tvh-v379-home-landing,.tvh-v379-module-shell,.tvh-v379-footer-next{padding-left:16px;padding-right:16px;}
  .tvh-v379-landing-card{padding:20px;border-radius:24px;}
  .tvh-v379-contained-table,.tvh-v379-contained-table thead,.tvh-v379-contained-table tbody,.tvh-v379-contained-table tr,.tvh-v379-contained-table th,.tvh-v379-contained-table td{display:block;}
  .tvh-v379-contained-table th{display:none;}
  .tvh-v379-contained-table td{border:1px solid var(--tvh379-line)!important;border-radius:14px!important;margin-bottom:6px;}
}
