/* ============================================================
   rpdtls.com — Stylesheet v5.0 (compact redesign, 2026-07-03)
   Editorial-industrial "commercial operating system" direction.
   Palette preserved: warm paper / graphite / restrained copper.
   Typography: Fraunces (variable, self-hosted, OFL) for display,
   IBM Plex Sans for body/nav, IBM Plex Mono for labels/system.
   No external font CDN (GDPR, Germany-based operation).
   Vanilla CSS, no build step, no frameworks.
   ============================================================ */

/* --------------------------------------------------------
   0. FONTS (self-hosted, licenses in assets/fonts/)
   -------------------------------------------------------- */
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-latin-opsz-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* --------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------- */
:root {
  --paper:        #F6F3EC;
  --paper-tint:   #EFEAE0;
  --paper-deep:   #E6E0D2;
  --ink:          #1B1D1C;
  --ink-soft:     #3E4341;
  --ink-mute:     #5C615E;
  --graphite:     #141B1A;
  --graphite-2:   #1B2322;
  --graphite-3:   #222B2A;
  --copper:       #A96835;
  --copper-text:  #8A5227;
  --copper-bright:#C58A55;
  --copper-pale:  #E4C9A8;
  --line:         rgba(27, 29, 28, 0.14);
  --line-strong:  rgba(27, 29, 28, 0.34);
  --dark-line:    rgba(246, 243, 236, 0.15);
  --on-dark:      #EDEAE2;
  --on-dark-2:    #AFB4AE;

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:  'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-h1:    clamp(1.9rem, 3.4vw, 2.9rem);
  --fs-h2:    clamp(1.45rem, 2.4vw, 2rem);
  --fs-h3:    1.12rem;
  --fs-lede:  clamp(1rem, 1.3vw, 1.12rem);
  --fs-body:  0.97rem;
  --fs-small: 0.85rem;
  --fs-label: 0.72rem;

  --s1: 6px; --s2: 10px; --s3: 16px; --s4: 24px;
  --s5: 34px; --s6: 48px; --s7: 68px; --s8: 92px;

  --container: 1200px;
  --nav-h: 64px;
  --nav-h-compact: 54px;
  --r: 2px;
}

/* --------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;  /* prevent iOS landscape font inflation */
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.58;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.014em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }

p { max-width: 64ch; }

a { color: var(--copper-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

::selection { background: var(--copper-pale); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
  border-radius: var(--r);
}
.on-dark :focus-visible, .modal-overlay :focus-visible, #hero :focus-visible { outline-color: var(--copper-bright); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  font-family: var(--mono); font-size: var(--fs-small);
}
.skip-link:focus { left: 10px; top: 10px; }

.container {
  max-width: var(--container); margin: 0 auto;
  /* safe-area insets: content clears notches/rounded corners on phones */
  padding-left: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-left));
  padding-right: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-right));
}

/* --------------------------------------------------------
   3. PRIMITIVES
   -------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--copper-text);
}
.eyebrow--dark { color: var(--copper-bright); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 22px; min-height: 44px;
  border: 1px solid transparent; border-radius: var(--r);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(169, 104, 53, 0.55), 0 6px 18px rgba(169, 104, 53, 0.16);
}
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--graphite-2); color: var(--copper-pale); }
.btn--copper { background: var(--copper); color: #fff; }
.btn--copper:hover { background: var(--copper-bright); color: var(--graphite); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--copper); color: var(--copper-text); }
.btn--ghost-dark { background: transparent; color: var(--on-dark); border-color: var(--dark-line); }
.btn--ghost-dark:hover { border-color: var(--copper-bright); color: var(--copper-pale); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* Compact sections */
.section { padding: var(--s7) 0; }
.section--tight { padding: var(--s6) 0; }
.section--tint { background: var(--paper-tint); }
.section--dark { background: var(--graphite); color: var(--on-dark); }
.section--dark h2 { color: var(--on-dark); }
.section--dark p { color: var(--on-dark-2); }

/* Section header — compact editorial rule */
.sec-hdr { margin-bottom: var(--s5); }
.sec-hdr__rule { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.sec-hdr__rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-hdr__num { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.13em; color: var(--copper-text); white-space: nowrap; }
.section--dark .sec-hdr__num { color: var(--copper-bright); }
.section--dark .sec-hdr__rule::after { background: var(--dark-line); }
.sec-hdr h2 { margin-bottom: var(--s2); }
.sec-hdr p { font-size: var(--fs-lede); color: var(--ink-soft); line-height: 1.5; max-width: 72ch; }
.section--dark .sec-hdr p { color: var(--on-dark-2); }

/* Focus-persistence groups: hovered/focused item stays active,
   siblings dim. No layout shift; keyboard parity via :focus-within. */
.fgroup .fitem { transition: opacity 0.18s ease; }
.fgroup:hover .fitem:not(:hover),
.fgroup:focus-within .fitem:not(:focus-within):not(:hover) { opacity: 0.45; }
.fgroup .fitem:hover, .fgroup .fitem:focus-within { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .fgroup .fitem { transition: none; }
}

/* --------------------------------------------------------
   4. NAVIGATION — solid paper in all states (logo is dark);
   compacts after scroll.
   -------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(246, 243, 236, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: height 0.2s ease, box-shadow 0.2s ease;
}
.nav--scrolled { height: var(--nav-h-compact); box-shadow: 0 1px 12px rgba(27, 29, 28, 0.07); }
.nav__inner {
  max-width: var(--container); height: 100%;
  margin: 0 auto;
  padding-left: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-left));
  padding-right: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
}
.nav__logo { display: flex; align-items: center; height: 100%; text-decoration: none; flex-shrink: 0; }
.nav__logo img {
  height: 42px; width: auto;
  transition: height 0.2s ease;
}
.nav--scrolled .nav__logo img { height: 36px; }

.nav__links { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); }
.nav__link {
  font-size: 0.86rem; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: 5px 1px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav__link:hover { color: var(--copper-text); }
.nav__link.active { border-bottom-color: var(--copper); color: var(--copper-text); }
.nav__cta {
  font-size: 0.84rem; font-weight: 600; color: var(--paper);
  background: var(--ink); text-decoration: none;
  padding: 9px 16px; border-radius: var(--r);
  white-space: nowrap;
}
.nav__cta:hover { background: var(--copper); color: #fff; }

.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 12px;
}
.nav__hamburger span { width: 22px; height: 2px; background: var(--ink); }

/* --------------------------------------------------------
   5. HERO — compact two-column, dark
   -------------------------------------------------------- */
#hero {
  position: relative;
  background: var(--graphite);
  color: var(--on-dark);
  padding: calc(var(--nav-h) + var(--s6)) 0 var(--s6);
  overflow: hidden;
}
.hero__strata {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 71px, rgba(246,243,236,0.04) 71px 72px),
    radial-gradient(ellipse at 78% 42%, rgba(197,138,85,0.06), transparent 55%);
}
.hero__grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero__eyebrow { margin-bottom: var(--s3); }
.hero__headline {
  color: var(--on-dark);
  max-width: 18ch;
  margin-bottom: var(--s3);
}
.hero__headline em { font-style: italic; color: var(--copper-pale); }
.hero__sub {
  font-size: var(--fs-lede); color: var(--on-dark-2);
  max-width: 52ch; line-height: 1.55;
  margin-bottom: var(--s4);
}
.hero__cred {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.05em; color: var(--on-dark-2);
  border-left: 2px solid var(--copper);
  padding-left: var(--s3);
  line-height: 1.7; max-width: 60ch;
  margin-bottom: var(--s4);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---- Cube ---- */
.cube-zone { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.cube-viewport {
  --cube: clamp(200px, 24vw, 300px);
  width: calc(var(--cube) * 1.35);
  height: calc(var(--cube) * 1.35);
  perspective: calc(var(--cube) * 4);
  display: flex; align-items: center; justify-content: center;
  /* pan-y: vertical swipes over the cube scroll the page (mobile-critical);
     horizontal drags rotate the cube. Pitch is available via the controls. */
  touch-action: pan-y;
  cursor: grab;
  position: relative;
}
.cube-viewport.dragging { cursor: grabbing; }
.cube-shadow {
  position: absolute; bottom: 4%; left: 50%;
  width: 68%; height: 8%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,0.5), transparent 68%);
  pointer-events: none;
}
.cube {
  position: relative;
  width: var(--cube); height: var(--cube);
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.cube.no-anim { transition: none; }
.cube__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 9%;
  background:
    linear-gradient(155deg, var(--graphite-3) 0%, var(--graphite-2) 55%, #171F1E 100%);
  border: 1px solid rgba(197, 138, 85, 0.28);
  box-shadow: inset 0 0 0 1px rgba(246, 243, 236, 0.03);
  color: var(--on-dark);
  font: inherit; text-align: left;
  cursor: pointer;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* engraved grid detail */
.cube__face::before {
  content: ""; position: absolute; inset: 6%;
  border: 1px solid rgba(246, 243, 236, 0.06);
  pointer-events: none;
}
.cube__face::after {
  content: ""; position: absolute; left: 9%; right: 9%; top: 50%;
  height: 1px; background: rgba(246, 243, 236, 0.05);
  pointer-events: none;
}
.cube__face:hover, .cube__face:focus-visible {
  border-color: var(--copper-bright);
  box-shadow: inset 0 0 0 1px rgba(197, 138, 85, 0.35), 0 0 22px rgba(197, 138, 85, 0.14);
}
.cube__face-num {
  font-family: var(--mono); font-size: clamp(0.55rem, 0.9vw, 0.68rem);
  letter-spacing: 0.16em; color: var(--copper-bright);
  text-transform: uppercase;
}
.cube__face-label {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  line-height: 1.3; color: var(--on-dark);
}
.cube__face-hint {
  font-family: var(--mono); font-size: clamp(0.5rem, 0.8vw, 0.62rem);
  letter-spacing: 0.1em; color: var(--on-dark-2);
}
.cube__face--book { border-color: rgba(197, 138, 85, 0.55); }
.cube__face--book .cube__face-label { color: var(--copper-pale); }

.cube-controls { display: flex; gap: var(--s2); align-items: center; }
.cube-ctl {
  width: 34px; height: 34px;
  background: transparent; border: 1px solid var(--dark-line); border-radius: var(--r);
  color: var(--on-dark); font-family: var(--mono); font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cube-ctl:hover { border-color: var(--copper-bright); color: var(--copper-pale); }
.cube-hint { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--on-dark-2); text-transform: uppercase; }

.cube-fallback {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 12px; max-width: 420px;
}
.cube-fallback a, .cube-fallback button {
  background: none; border: 0; cursor: pointer; font: inherit;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em;
  color: var(--on-dark-2); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  padding: 3px 1px;
}
.cube-fallback a:hover, .cube-fallback button:hover { color: var(--copper-pale); }

/* --------------------------------------------------------
   6. ARCHITECTURE SYSTEM — six connected elements
   -------------------------------------------------------- */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.arch-cell {
  background: var(--paper);
  padding: var(--s4);
  position: relative;
  outline-offset: -2px;
}
.arch-cell__num {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.12em; color: var(--copper-text);
  display: flex; align-items: center; gap: var(--s2);
  margin-bottom: var(--s2);
}
.arch-cell__num::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.arch-cell__title { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin-bottom: var(--s2); }
.arch-row { display: grid; grid-template-columns: 74px 1fr; gap: var(--s2); padding: 5px 0; border-top: 1px dashed var(--line); font-size: var(--fs-small); line-height: 1.45; }
.arch-row:first-of-type { border-top: 0; }
.arch-row dt { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); padding-top: 2px; }
.arch-row dd { color: var(--ink-soft); }
.arch-row--risk dd { color: var(--copper-text); }
.arch-legend {
  margin-top: var(--s3);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.06em;
  color: var(--ink-mute);
}

/* --------------------------------------------------------
   7. DIAGNOSTICS — compact instrument index
   -------------------------------------------------------- */
.inst-index { border-top: 1px solid var(--line-strong); }
.inst-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 4fr) minmax(0, 6fr) auto;
  gap: var(--s3); align-items: center;
  width: 100%;
  padding: var(--s3) var(--s1);
  border-bottom: 1px solid var(--line);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.15s ease;
}
.inst-row:hover { background: rgba(169, 104, 53, 0.06); }
.inst-row__num { font-family: var(--mono); font-size: var(--fs-small); color: var(--copper-text); }
.inst-row__name { font-family: var(--sans); font-weight: 600; font-size: 0.97rem; line-height: 1.3; }
.inst-row__name .flag {
  display: inline-block; margin-left: 8px;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--copper-text); text-transform: uppercase;
  border: 1px solid rgba(169,104,53,0.4); border-radius: var(--r);
  padding: 1px 6px; vertical-align: 2px;
}
.inst-row__purpose { font-size: var(--fs-small); color: var(--ink-mute); line-height: 1.45; }
.inst-row__start {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.08em;
  color: var(--copper-text); white-space: nowrap;
}
.inst-row__start::after { content: " →"; }
.inst-meta-line {
  margin-top: var(--s3);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.05em;
  color: var(--ink-mute); line-height: 1.7; max-width: none;
}
.inst-disclaimer { margin-top: var(--s2); font-size: var(--fs-small); font-style: italic; color: var(--ink-mute); max-width: 78ch; }

/* --------------------------------------------------------
   8. PROGRAMS — three compact blocks
   -------------------------------------------------------- */
.prog-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.prog-block { background: var(--paper); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); outline-offset: -2px; }
.prog-block__num { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--copper-text); }
.prog-block__title { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; }
.prog-row { display: grid; grid-template-columns: 92px 1fr; gap: var(--s2); padding: 6px 0; border-top: 1px dashed var(--line); font-size: var(--fs-small); line-height: 1.5; }
.prog-row dt { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); padding-top: 2px; }
.prog-row dd { color: var(--ink-soft); }
.prog-block .btn { align-self: flex-start; margin-top: auto; }

.prog-block--wide { grid-column: 1 / -1; }
.prog-block--wide dl { max-width: 92ch; }

.prog-notes {
  margin-top: var(--s4);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
}
.prog-note {
  border: 1px solid var(--line); border-left: 3px solid var(--copper);
  padding: var(--s3) var(--s4);
  font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.55;
}
.prog-note strong { font-family: var(--sans); color: var(--ink); }

/* --------------------------------------------------------
   9. CREDIBILITY — operating record
   -------------------------------------------------------- */
.cred-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.cred-lede { font-size: var(--fs-lede); color: var(--on-dark-2); line-height: 1.6; }
.cred-lede strong { color: var(--on-dark); font-weight: 600; }
.cred-geo {
  margin-top: var(--s4);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.08em;
  color: var(--on-dark-2); line-height: 2;
  border-left: 2px solid var(--copper); padding-left: var(--s3);
}
.cred-record { border-top: 1px solid var(--dark-line); }
.cred-item {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s3);
  padding: var(--s2) var(--s1);
  border-bottom: 1px solid var(--dark-line);
  outline-offset: -2px;
}
.cred-item dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-bright); padding-top: 3px; }
.cred-item dd { font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.5; }
.cred-item dd strong { color: var(--on-dark); font-weight: 600; }

/* --------------------------------------------------------
   10. FRAMEWORKS — compact numbered index
   -------------------------------------------------------- */
.framework-index { border-top: 1px solid var(--line-strong); }
.fw-item { border-bottom: 1px solid var(--line); transition: opacity 0.18s ease; }
/* dim siblings when one is open or hovered */
.framework-index:hover .fw-item:not(:hover):not(.open),
.framework-index.has-open .fw-item:not(.open) { opacity: 0.45; }
.framework-index .fw-item:hover, .framework-index .fw-item.open { opacity: 1; }

.fw-item__row {
  display: flex; align-items: baseline; gap: clamp(12px, 2vw, 28px);
  padding: var(--s3) var(--s1);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.fw-item__row:hover { background: rgba(169, 104, 53, 0.05); }
.fw-item__num { font-family: var(--mono); font-size: var(--fs-small); color: var(--copper-text); min-width: 2em; }
.fw-item__main { flex: 1; display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.fw-item__title { font-family: var(--sans); font-weight: 600; font-size: 0.99rem; }
.fw-item__def { font-size: var(--fs-small); color: var(--ink-mute); line-height: 1.4; flex: 1; min-width: 240px; }
.fw-item__toggle { font-family: var(--mono); font-size: 1.1rem; color: var(--ink-mute); transition: transform 0.2s ease; line-height: 1; }
.fw-item.open .fw-item__toggle { transform: rotate(45deg); color: var(--copper-text); }
.fw-item__body { display: none; padding: var(--s2) var(--s1) var(--s4) calc(2em + clamp(12px, 2vw, 28px)); }
.fw-item.open .fw-item__body { display: block; }
.fw-body__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.fw-body__label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-text); margin-bottom: var(--s2); }
.fw-body__text p { font-size: var(--fs-small); line-height: 1.6; margin-bottom: var(--s2); color: var(--ink-soft); }
.fw-body__text strong { color: var(--ink); }

/* --------------------------------------------------------
   11. PUBLICATIONS — refined typographic objects
   -------------------------------------------------------- */
.books-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.book-feature {
  background: var(--paper);
  display: grid; grid-template-columns: minmax(120px, 165px) 1fr;
  gap: var(--s4); padding: var(--s4);
  align-items: start;
}
.book-feature__cover { background: var(--paper-deep); padding: var(--s3); }
.book-feature__cover img { box-shadow: 0 10px 26px rgba(27, 29, 28, 0.28); }
.book-feature__kicker { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-text); margin-bottom: var(--s2); }
.book-feature__title { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.012em; margin-bottom: var(--s2); }
.book-feature__subtitle { font-family: var(--serif); font-style: italic; font-weight: 420; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.45; margin-bottom: var(--s2); }
.book-feature__desc { color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; margin-bottom: var(--s3); }

/* --------------------------------------------------------
   12. ABOUT + CONTACT — compact
   -------------------------------------------------------- */
.about__layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 3.5vw, 56px); align-items: start; }
.about__portrait-frame { background: var(--paper-deep); padding: var(--s2); }
.about__portrait-caption { margin-top: var(--s2); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.06em; line-height: 1.7; color: var(--ink-mute); }
.about__opening-line { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -0.012em; line-height: 1.2; margin-bottom: var(--s2); }
.about__content p { margin-bottom: var(--s2); color: var(--ink-soft); line-height: 1.6; font-size: var(--fs-small); }
.about__content .about__lede { font-size: var(--fs-lede); color: var(--ink-soft); }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s3); }
.about__section-label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-text); margin-bottom: var(--s2); }

.contact-band {
  margin-top: var(--s5);
  background: var(--graphite);
  color: var(--on-dark);
  padding: var(--s5) var(--s4);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s4); align-items: center;
}
.contact-band h3 { color: var(--on-dark); font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: 1.5rem; letter-spacing: -0.012em; margin-bottom: var(--s2); }
.contact-band p { color: var(--on-dark-2); font-size: var(--fs-small); line-height: 1.6; }
.contact-band__actions { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.contact-band__mail { font-family: var(--mono); font-size: var(--fs-small); color: var(--copper-pale); }

/* --------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------- */
.footer { background: var(--graphite); color: var(--on-dark); padding: var(--s6) 0 var(--s4); border-top: 1px solid var(--dark-line); }
.footer__inner {
  max-width: var(--container); margin: 0 auto;
  padding-left: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-left));
  padding-right: max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-right));
  display: grid; grid-template-columns: 2fr 1fr 1.6fr; gap: var(--s5);
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}
.footer__brand-name { font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.16em; color: var(--on-dark); margin-bottom: var(--s2); }
.footer__brand-tag { font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.6; }
.footer__social { display: flex; gap: var(--s2); margin-bottom: var(--s3); }
.footer__soc-link {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--dark-line); color: var(--on-dark);
  text-decoration: none; font-family: var(--mono); font-size: 0.8rem;
  border-radius: var(--r);
}
.footer__soc-link:hover { border-color: var(--copper-bright); color: var(--copper-pale); }
.footer__contact a { color: var(--copper-pale); }
.footer__contact p { font-size: var(--fs-small); margin-top: var(--s1); color: var(--on-dark-2); }
.footer__legal-links { display: flex; gap: var(--s3); margin-bottom: var(--s2); }
.footer__legal-link { color: var(--on-dark-2); font-size: var(--fs-small); }
.footer__practice { font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.6; margin-bottom: var(--s2); }
.footer__copy { font-size: var(--fs-label); color: var(--on-dark-2); opacity: 0.75; }

/* --------------------------------------------------------
   14. MODAL + INSTRUMENT UI (dark; unchanged interaction model)
   -------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(15, 20, 19, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: clamp(10px, 2.5vw, 40px);
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative;
  background: var(--graphite-2);
  color: var(--on-dark);
  width: min(860px, 100%);
  margin: auto 0;
  padding: clamp(22px, 3.4vw, 44px);
  border-top: 3px solid var(--copper);
  border-radius: var(--r);
}
.modal h2 { color: var(--on-dark); font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; letter-spacing: -0.012em; }
.modal p { color: var(--on-dark-2); }
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--dark-line); border-radius: var(--r);
  color: var(--on-dark); font-size: 1rem; cursor: pointer;
}
.modal__close:hover { border-color: var(--copper-bright); color: var(--copper-pale); }

.diag-intro__q { font-family: var(--serif); font-optical-sizing: auto; font-weight: 500; font-size: 1.12rem; color: var(--on-dark); }
.diag-path-choice { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s3); }
.diag-path {
  text-align: left; background: rgba(246, 243, 236, 0.04);
  border: 1px solid var(--dark-line); border-radius: var(--r);
  padding: var(--s3) var(--s4); cursor: pointer; color: var(--on-dark);
  font: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.diag-path:hover { border-color: var(--copper-bright); background: rgba(197, 138, 85, 0.08); }
.diag-path__title { display: block; font-weight: 600; font-size: 0.97rem; margin-bottom: 4px; }
.diag-path__desc { display: block; font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.45; }

.diag-facts { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--on-dark-2); line-height: 1.8; }
.diag-disclaimer { font-size: var(--fs-small); color: var(--on-dark-2); font-style: italic; line-height: 1.55; }
.diag-intro-divider { border-top: 1px solid var(--dark-line); padding-top: var(--s3); margin-top: var(--s4); }

.diag-glossary { margin-top: var(--s3); border-top: 1px solid var(--dark-line); padding-top: var(--s3); }
.diag-glossary__toggle { cursor: pointer; font-family: var(--mono); font-size: var(--fs-small); letter-spacing: 0.05em; color: var(--copper-pale); list-style: none; }
.diag-glossary__toggle::-webkit-details-marker { display: none; }
.diag-glossary__list { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.diag-glossary__item { display: flex; gap: var(--s2); }
.diag-glossary__num { font-family: var(--mono); font-size: var(--fs-label); color: var(--copper-bright); padding-top: 2px; min-width: 2.4em; }
.diag-glossary__name { font-weight: 600; font-size: var(--fs-small); color: var(--on-dark); }
.diag-glossary__def { font-size: 0.8rem; color: var(--on-dark-2); line-height: 1.5; }

.diag-progress { margin-bottom: var(--s4); }
.diag-progress__track { height: 3px; background: var(--dark-line); border-radius: 2px; overflow: hidden; }
.diag-progress__fill { height: 100%; width: 0; background: var(--copper-bright); transition: width 0.3s ease; }
.diag-progress__label { font-family: var(--mono); font-size: var(--fs-label); color: var(--on-dark-2); margin-top: var(--s1); }

.diag-q-num { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.13em; text-transform: uppercase; color: var(--copper-bright); margin-bottom: var(--s1); }
.diag-q-gap-badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--on-dark); font-weight: 600; margin-bottom: 3px; }
.diag-q-gap-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper-bright); }
.diag-q-gap-def { font-size: 0.8rem; color: var(--on-dark-2); line-height: 1.5; max-width: 66ch; margin-bottom: var(--s3); }
.diag-q-text { font-family: var(--serif); font-optical-sizing: auto; font-weight: 500; font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.32; color: var(--on-dark); margin-bottom: var(--s2); }
.diag-q-help { font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.55; margin-bottom: var(--s3); max-width: 66ch; }

.diag-options { display: flex; flex-direction: column; gap: var(--s2); }
.diag-option {
  text-align: left; background: rgba(246, 243, 236, 0.04);
  border: 1px solid var(--dark-line); border-radius: var(--r);
  padding: var(--s2) var(--s3); cursor: pointer;
  color: var(--on-dark); font: inherit; font-size: 0.92rem; line-height: 1.5;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.diag-option:hover { border-color: var(--copper-bright); }
.diag-option.selected { border-color: var(--copper-bright); background: rgba(197, 138, 85, 0.14); }

.diag-scale { display: flex; gap: var(--s2); }
.diag-scale__btn {
  flex: 1; min-height: 50px;
  background: rgba(246, 243, 236, 0.04);
  border: 1px solid var(--dark-line); border-radius: var(--r);
  color: var(--on-dark); font-family: var(--mono); font-size: 1rem; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.diag-scale__btn:hover { border-color: var(--copper-bright); }
.diag-scale__btn.selected { border-color: var(--copper-bright); background: rgba(197, 138, 85, 0.16); }
.diag-scale__anchors { display: flex; justify-content: space-between; margin-top: var(--s1); font-size: var(--fs-label); color: var(--on-dark-2); font-family: var(--mono); }

.diag-nav { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); }

.diag-review__list { margin-top: var(--s3); display: flex; flex-direction: column; }
.diag-review__item { display: grid; grid-template-columns: 1fr auto; gap: 3px var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--dark-line); }
.diag-review__q { font-size: 0.8rem; color: var(--on-dark-2); grid-column: 1; }
.diag-review__a { font-size: 0.9rem; color: var(--on-dark); grid-column: 1; }
.diag-review__edit {
  grid-column: 2; grid-row: 1 / 3; align-self: center;
  background: none; border: 1px solid var(--dark-line); border-radius: var(--r);
  color: var(--copper-pale); font-family: var(--mono); font-size: 0.72rem;
  padding: 7px 14px; cursor: pointer; min-height: 38px;
}
.diag-review__edit:hover { border-color: var(--copper-bright); }

.diag-result__path { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--on-dark-2); margin: var(--s1) 0 var(--s3); }
.diag-result__label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.13em; text-transform: uppercase; color: var(--copper-bright); margin-bottom: var(--s1); }
.diag-result__gap-name { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--on-dark); line-height: 1.15; letter-spacing: -0.012em; }
.diag-result__gap-name:focus { outline: none; }
.diag-result__ranking { font-size: var(--fs-small); color: var(--on-dark-2); margin-top: var(--s1); font-family: var(--mono); letter-spacing: 0.03em; }

.score-list { margin-top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.score-list-item { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 48px; align-items: center; gap: var(--s3); }
.score-list-name { font-size: var(--fs-small); color: var(--on-dark); }
.score-list-bar-track { height: 8px; background: rgba(246, 243, 236, 0.09); border-radius: 4px; overflow: hidden; }
.score-list-bar-fill { height: 100%; background: var(--on-dark-2); border-radius: 4px; width: 0; transition: width 0.6s ease; }
.score-list-bar-fill--primary { background: var(--copper-bright); }
.score-list-pct { font-family: var(--mono); font-size: 0.75rem; color: var(--on-dark-2); text-align: right; }

.dual-track { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); }
.dual-track__cell { border: 1px solid var(--dark-line); border-radius: var(--r); padding: var(--s3); text-align: center; }
.dual-track__label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: var(--s1); }
.dual-track__value { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: 2rem; color: var(--on-dark); line-height: 1.1; }
.dual-track__band { font-size: var(--fs-small); color: var(--copper-pale); margin-top: 3px; }
.dual-track__gap { grid-column: 1 / -1; text-align: center; border: 1px solid var(--copper-bright); border-radius: var(--r); background: rgba(197, 138, 85, 0.1); padding: var(--s3); }
.dual-track__gap-label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-bright); margin-bottom: 3px; }
.dual-track__gap-value { font-family: var(--serif); font-optical-sizing: auto; font-weight: 560; font-size: 1.25rem; color: var(--on-dark); }

.diag-result__scorenote { font-size: var(--fs-label); font-family: var(--mono); color: var(--on-dark-2); margin-top: var(--s3); }
.diag-result__summary { margin-top: var(--s4); border-top: 1px solid var(--dark-line); padding-top: var(--s3); }
.diag-result__summary h3 { color: var(--on-dark); font-size: 1rem; margin-bottom: var(--s2); }
.diag-result__summary p { line-height: 1.62; font-size: var(--fs-small); }
.diag-result__secondary { margin-top: var(--s3); font-size: var(--fs-small); color: var(--on-dark-2); line-height: 1.55; border-left: 2px solid var(--dark-line); padding-left: var(--s3); }
.diag-result__secondary strong { color: var(--on-dark); }

.diag-result__recs { margin-top: var(--s4); }
.diag-recs-label { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.13em; text-transform: uppercase; color: var(--copper-bright); margin-bottom: var(--s2); }
.diag-result__recs ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--s2); }
.diag-result__recs li { color: var(--on-dark-2); line-height: 1.55; padding-left: 5px; font-size: var(--fs-small); }
.diag-result__recs li::marker { font-family: var(--mono); color: var(--copper-bright); }

.diag-result__answers { margin-top: var(--s4); }
.diag-answers__toggle {
  background: none; border: 1px solid var(--dark-line); border-radius: var(--r);
  color: var(--on-dark); font-family: var(--mono); font-size: 0.76rem;
  padding: 9px 18px; cursor: pointer; min-height: 42px;
}
.diag-answers__toggle:hover { border-color: var(--copper-bright); }
.diag-answers__list { margin-top: var(--s3); display: flex; flex-direction: column; }
.diag-answers__item { padding: var(--s2) 0; border-bottom: 1px solid var(--dark-line); display: flex; flex-direction: column; gap: 2px; }
.diag-answers__q { font-size: 0.76rem; color: var(--on-dark-2); }
.diag-answers__a { font-size: 0.88rem; color: var(--on-dark); }

.diag-result__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.diag-result__contact-alt { font-size: var(--fs-small); color: var(--on-dark-2); margin-top: var(--s3); }
.diag-result__contact-alt a { color: var(--copper-pale); }
.diag-result__method { margin-top: var(--s4); border-top: 1px solid var(--dark-line); padding-top: var(--s3); }
.diag-result__method-copy { font-size: var(--fs-small); line-height: 1.6; }
.diag-result__disclaimer { font-size: var(--fs-small); font-style: italic; margin-top: var(--s2); line-height: 1.6; }

/* --------------------------------------------------------
   14b. PROGRAM DETAIL PANELS
   -------------------------------------------------------- */
.prog-detail {
  margin-top: var(--s3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  background: var(--paper);
  padding: var(--s4) var(--s4) var(--s4);
}
.prog-detail[hidden] { display: none; }
.prog-detail__hdr { margin-bottom: var(--s3); border-bottom: 1px solid var(--line); padding-bottom: var(--s3); }
.prog-detail__title {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 560;
  font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.012em; line-height: 1.2;
  margin-top: var(--s1);
}
.prog-detail__title:focus { outline: none; }
.prog-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s5); }
.pd-row {
  display: grid; grid-template-columns: 132px 1fr; gap: var(--s2);
  padding: var(--s2) 0; border-bottom: 1px dashed var(--line);
  font-size: var(--fs-small); line-height: 1.55;
}
.pd-row dt { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-text); padding-top: 3px; }
.pd-row dd { color: var(--ink-soft); }
.pd-row dd strong { color: var(--ink); }
.prog-detail__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.prog-detail__close {
  margin-left: auto;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--r);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--ink-mute); padding: 9px 16px; cursor: pointer; min-height: 40px;
}
.prog-detail__close:hover { border-color: var(--copper); color: var(--copper-text); }

/* --------------------------------------------------------
   14c. CONTACT FORM
   -------------------------------------------------------- */
.cform-toggle-wrap { margin-top: var(--s4); }
#cform-wrap[hidden] { display: none; }

.cform { margin-top: var(--s4); }
.cform__fs {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.cform__fs legend {
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--copper-text); padding: 0 var(--s2);
}
.cform__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.cform__grid--full { grid-template-columns: 1fr; }
.cfield { display: flex; flex-direction: column; gap: 5px; }
.cfield label, .cfield__grouplabel {
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.cfield__hint { font-weight: 400; color: var(--ink-mute); }
.req { color: var(--copper-text); }
.cfield input[type="text"], .cfield input[type="email"], .cfield input[type="tel"],
.cfield input[type="url"], .cfield select, .cfield textarea {
  font: inherit; font-size: 1rem;  /* ≥16px — prevents iOS Safari focus zoom */
  color: var(--ink);
  background: var(--paper-tint);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
.cfield textarea { resize: vertical; min-height: 72px; }
.cfield input:focus-visible, .cfield select:focus-visible, .cfield textarea:focus-visible {
  outline: 2px solid var(--copper); outline-offset: 1px;
}
.cfield input[aria-invalid="true"], .cfield select[aria-invalid="true"], .cfield textarea[aria-invalid="true"] {
  border-color: #A03D2E;
}
.cfield__err { font-size: 0.76rem; color: #8F3225; }

.cform__checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s1) var(--s3); margin-top: var(--s2); margin-bottom: var(--s3); }
.ccheck {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.5;
  cursor: pointer; padding: 4px 0;
}
.ccheck input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--copper); flex-shrink: 0; }
.ccheck--consent { max-width: 68ch; }
.cform__legal-note { font-size: 0.78rem; color: var(--ink-mute); margin-top: var(--s2); font-style: italic; }

.cform__hp { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }

.cform__actions { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.cform__status { font-size: var(--fs-small); line-height: 1.5; max-width: 60ch; }
.cform__status--ok { color: #2E5C3F; font-weight: 600; }
.cform__status--err { color: #8F3225; font-weight: 600; }
.cform__status--busy { color: var(--ink-mute); }

.btn--busy { position: relative; opacity: 0.75; pointer-events: none; }
.btn--busy::after {
  content: ""; display: inline-block; margin-left: 10px;
  width: 12px; height: 12px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%;
  animation: cform-spin 0.7s linear infinite;
}
@keyframes cform-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn--busy::after { animation: none; border-right-color: currentColor; opacity: 0.5; }
}

/* --------------------------------------------------------
   14d. LEGAL PAGES (impressum.html / privacy.html)
   -------------------------------------------------------- */
.legal-page { padding: calc(var(--nav-h) + var(--s6)) 0 var(--s7); }
.legal-title {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 560;
  font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.014em; line-height: 1.12;
  margin-bottom: var(--s2);
}
.legal-block { max-width: 76ch; margin-bottom: var(--s5); }
.legal-block h2 {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  letter-spacing: -0.005em; margin-bottom: var(--s2);
  padding-top: var(--s3); border-top: 1px solid var(--line);
}
.legal-block p { margin-bottom: var(--s2); color: var(--ink-soft); line-height: 1.65; font-size: var(--fs-small); }
.legal-block strong { color: var(--ink); }
.legal-updated { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--ink-mute); }

/* --------------------------------------------------------
   15. SCROLL REVEAL
   -------------------------------------------------------- */
.js-fade { opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; }
.js-fade.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-fade { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------- */
@media (max-width: 1080px) {
  .arch-grid { grid-template-columns: 1fr 1fr; }
  .cform__grid { grid-template-columns: 1fr 1fr; }
  .prog-grid { grid-template-columns: 1fr; }
  .books-layout { grid-template-columns: 1fr; }
  .cred-layout { grid-template-columns: 1fr; gap: var(--s4); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .cube-zone { order: 2; }
  .nav__links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(27, 29, 28, 0.14);
  }
  .nav__links.open {
    display: flex;
    max-height: calc(100vh - var(--nav-h));  /* landscape phones: menu scrolls */
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  .nav__link, .nav__cta {
    padding: var(--s3) max(clamp(18px, 3.4vw, 40px), env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    border-radius: 0; background: none; color: var(--ink);
    min-height: 48px; display: flex; align-items: center;
  }
  .nav__cta { font-weight: 700; color: var(--copper-text); }
  .nav__hamburger { display: flex; }
}

@media (max-width: 700px) {
  .section { padding: var(--s6) 0; }
  .arch-grid { grid-template-columns: 1fr; }
  .inst-row { grid-template-columns: 34px 1fr auto; min-height: 52px; }
  .inst-row__purpose { display: none; }

  /* touch targets ≥44px */
  .cube-ctl { width: 44px; height: 44px; font-size: 0.95rem; }
  .cube-fallback a, .cube-fallback button { padding: 8px 4px; font-size: 0.74rem; }
  .cube-hint { display: none; }

  /* labeled rows stack on narrow screens */
  .cred-item { grid-template-columns: 1fr; gap: 3px; }
  .cred-item dt { padding-top: 0; }
  .pd-row { grid-template-columns: 1fr; gap: 3px; }
  .pd-row dt { padding-top: 0; }

  /* full-width primary actions */
  .prog-detail__cta .btn, .cform-toggle-wrap .btn,
  .contact-band__actions .btn, .programs-cta .btn { width: 100%; }
  .prog-detail__cta { flex-direction: column; align-items: stretch; }
  .cform__actions { flex-direction: column; align-items: stretch; }
  .cform__actions .btn { width: 100%; }
  .about__layout { grid-template-columns: 1fr; }
  .about__portrait { max-width: 260px; }
  .about__cols { grid-template-columns: 1fr; }
  .contact-band { grid-template-columns: 1fr; }
  .prog-notes { grid-template-columns: 1fr; }
  .prog-grid { grid-template-columns: 1fr; }
  .prog-detail__grid { grid-template-columns: 1fr; }
  .cform__grid { grid-template-columns: 1fr; }
  .cform__checks { grid-template-columns: 1fr; }
  .prog-detail__close { margin-left: 0; width: 100%; }
  .fw-body__grid { grid-template-columns: 1fr; gap: var(--s3); }
  .diag-path-choice { grid-template-columns: 1fr; }
  .dual-track { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--s4); }
  .diag-nav { flex-direction: column-reverse; }
  .diag-nav .btn { width: 100%; }
  .score-list-item { grid-template-columns: minmax(86px, 120px) 1fr 44px; gap: var(--s2); }
  .book-feature { grid-template-columns: minmax(96px, 120px) 1fr; gap: var(--s3); }
  .hero__ctas .btn { flex: 1 1 100%; }
  .nav__logo img { height: 36px; }
  .nav--scrolled .nav__logo img { height: 32px; }
}

/* Short landscape phones: keep the hero on one screen */
@media (max-height: 540px) and (max-width: 900px) {
  #hero { padding: calc(var(--nav-h) + var(--s4)) 0 var(--s4); }
  .cube-viewport { --cube: 170px; }
  .hero__cred { margin-bottom: var(--s3); }
}

/* --------------------------------------------------------
   17. PRINT
   -------------------------------------------------------- */
@media print {
  .nav, .modal-overlay, .btn, .cube-zone, .cube-fallback { display: none !important; }
  body, .section--dark, #hero, .contact-band, .footer { background: #fff !important; color: #000 !important; }
  .section--dark p, .hero__sub, .hero__cred, .cred-item dd, .contact-band p { color: #333 !important; }
  .hero__headline, .section--dark h2, .contact-band h3 { color: #000 !important; }
}
