/* Context-Informed Practice — standalone stylesheet.
   Isolated from the Priority Governance application: nothing here is imported from, or
   shared with, styles/tokens.css or app/globals.css. */

/* ---------- Fonts (self-hosted, OFL; two files on first paint) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url(/cip/fonts/fraunces-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url(/cip/fonts/fraunces-latin-wght-italic.woff2) format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url(/cip/fonts/instrument-sans-latin-wght-normal.woff2) format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
/* Metric-adjusted fallbacks keep the swap from shifting layout. */
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"); size-adjust: 98%; ascent-override: 97%; descent-override: 25%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  /* Palette: warm ivory, deep charcoal, restrained sage. Ivory matches the e-Mel image background. */
  --ivory: #F4F3EF;
  --ivory-2: #ECEAE3;
  --paper: #FBFAF7;
  --ink: #1F2321;
  --ink-2: #434844;      /* body-secondary, ~9:1 on ivory */
  --ink-3: #5A605B;      /* captions, ~5.9:1 on ivory */
  --line: #CDCBC1;       /* decorative hairlines */
  --line-strong: #8E928B;
  --sage: #6F8571;       /* decorative strokes only */
  --sage-deep: #3A5442;  /* text accent / focus, ~7.7:1 on ivory */
  --navy: #1E3A57;       /* CIP mark only */
  --gold: #B8964E;
  --plum: #6B2F52;
  --sage-light: #AFC4AF; /* accent on charcoal */
  --on-dark: #F4F3EF;
  --on-dark-2: #C8CBC3;  /* ~10:1 on charcoal */
  --dark: #1F2321;
  --dark-deep: #171A18;

  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Motion tokens */
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;       /* control feedback */
  --dur-section: 600ms;    /* section transitions */
  --dur-panel: 450ms;
  --stagger: 80ms;
  --shift: 14px;           /* small positional shift */
  --shift-lg: 24px;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 3px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--sage-light); color: var(--ink); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--ivory); padding: 12px 18px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; border-radius: 2px; }
.framework :focus-visible, .final :focus-visible, .site-footer :focus-visible { outline-color: var(--sage-light); }

/* ---------- Type ---------- */
.eyebrow, .kicker, .option-tag, .fact-note, dt {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 600;
}
.eyebrow { color: var(--sage-deep); margin-bottom: 20px; }
.kicker { color: var(--sage-deep); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.kicker-dark { color: var(--sage-light); }
.h2 { font-family: var(--serif); font-weight: 380; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.018em; text-wrap: balance; max-width: 22ch; }
.h3 { font-family: var(--serif); font-weight: 450; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.2; letter-spacing: -0.01em; }
.h3-lg { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 400; line-height: 1.12; }
.section-lede { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-2); max-width: 56ch; margin-top: 20px; }
.section-lede-dark { color: var(--on-dark-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; letter-spacing: 0.005em; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; position: relative;
  transition: background-color var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: 0.95rem; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: var(--sage-deep); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--ivory-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }
.btn-on-dark.btn-primary { background: var(--ivory); color: var(--ink); }
.btn-on-dark.btn-primary:hover { background: var(--sage-light); }
.btn-on-dark.btn-secondary { color: var(--ivory); border-color: var(--on-dark-2); }
.btn-on-dark.btn-secondary:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

.quiet-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; }
.quiet-link span { transition: transform var(--dur-fast) var(--ease-soft); display: inline-block; }
.quiet-link:hover { color: var(--ink); }
.quiet-link:hover span { transform: translateY(3px); }
.quiet-link { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 calc(100% - 8px); transition: background-size var(--dur-fast) var(--ease-soft), color var(--dur-fast); }
.quiet-link:hover { background-size: calc(100% - 22px) 1px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 34px; }
.cta-row-tight { margin-top: 26px; }
.cta-row-center { justify-content: center; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ivory); border-bottom: 1px solid transparent; transition: border-color var(--dur-fast); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; flex: none; }
.brand-mark { width: 28px; height: auto; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; letter-spacing: 0.01em; }
.brand-div { width: 1px; height: 28px; background: var(--line-strong); margin-inline: 2px; }
.cip-mini { width: 32px; height: 32px; flex: none; }

/* The CIP mark, as a small reusable symbol (the large animated version lives in the hero). */
.m-r { fill: none; stroke-width: 22px; stroke-linecap: round; }
.m-r-gold { stroke: var(--gold); } .m-r-navy { stroke: var(--mk-navy, var(--navy)); } .m-r-plum { stroke: var(--mk-plum, var(--plum)); }
.m-r-sage { stroke: var(--sage); opacity: 0.9; }

.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 2px; }
.nav-desktop a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; text-decoration: none; font-size: 0.95rem; color: var(--ink-2); font-weight: 500; position: relative; }
.nav-desktop a::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 8px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-fast) var(--ease-soft); }
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu { display: block; position: relative; }
.menu-button { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.menu-button::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; transition: transform var(--dur-fast) var(--ease-soft); }
.menu-icon::before { content: ""; position: absolute; top: 5px; left: 0; }
.menu[open] .menu-icon { transform: translateY(2px) rotate(45deg); }
.menu[open] .menu-icon::before { transform: translateY(-5px) rotate(-90deg); top: 5px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(86vw, 320px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 18px 40px -22px rgba(31,35,33,0.4); }
.menu-panel a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 12px; text-decoration: none; font-weight: 500; border-radius: 2px; }
.menu-panel a:not(.btn):hover { background: var(--ivory-2); }
.menu-actions { display: none; gap: 8px; flex-direction: column; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.menu-cta { width: 100%; }

@media (min-width: 1360px) {
  .nav-desktop { display: block; }
  .menu { display: none; }
}
@media (max-width: 779px) {
  .header-actions > .btn-sm { display: none; }
  .menu-actions { display: flex; }
}
@media (max-width: 349px) { .brand-div { display: none; } }
@media (max-width: 420px) { .brand { gap: 9px; } .brand-name { font-size: 1.15rem; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 132px); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 72px); padding-bottom: clamp(48px, 6vw, 96px); position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.hero .eyebrow { margin-bottom: 16px; }
.hero-title { font-family: var(--serif); font-weight: 380; font-size: clamp(2.5rem, 0.5rem + 4.6vw, 4.7rem); line-height: 1; letter-spacing: -0.03em; }
.hero-title .hl { display: block; white-space: nowrap; }
.hero-title .hl:nth-child(2) { color: var(--sage-deep); font-style: italic; font-weight: 340; }
.lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.5; color: var(--ink); margin-top: 30px; max-width: 34em; }
.hero-support { color: var(--ink-2); margin-top: 16px; max-width: 36em; font-size: clamp(1.02rem, 1rem + 0.2vw, 1.12rem); }

.hero-art { justify-self: end; width: min(100%, 520px); }
.art { width: 100%; height: auto; overflow: visible; }
.signature { margin: 18px auto 0; position: relative; left: 3.5cqw; transform: none; width: max-content; max-width: 100%; display: flex; flex-wrap: nowrap; justify-content: center; gap: 0 0.8em; text-align: center; font-family: var(--serif); font-weight: 500; font-size: clamp(0.7rem, 3.4cqw, 1.15rem); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.signature .s1 { color: var(--navy); }
.signature .s2 { color: var(--sage-deep); }
.signature .s3 { color: var(--plum); }
.arc, .art-inner { fill: none; stroke-width: 3.5px; vector-effect: non-scaling-stroke; transform-box: view-box; transform-origin: 255px 280px; stroke-linecap: round; }
.art-inner { opacity: 0.9; }
.r-gold { stroke: var(--gold); } .r-navy { stroke: var(--navy); } .r-plum { stroke: var(--plum); } .r-sage { stroke: var(--sage); }

.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.facts > div { padding: 20px clamp(18px, 4vw, 56px) 0 0; margin-right: clamp(18px, 4vw, 56px); border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dt { color: var(--ink-3); margin-bottom: 4px; }
.facts .num { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 350; line-height: 1; }
.fact-note { text-transform: none; letter-spacing: 0.02em; font-weight: 500; font-size: 0.9rem; color: var(--ink-3); margin-left: 8px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0 32px; margin-top: 22px; }

/* Hero sequence: plays once, transform and opacity only, final state is the default state. */
@media (prefers-reduced-motion: no-preference) {
  .arc { animation: arc-settle 1100ms var(--ease) both; }
  .arc-1 { --tx: 0px; --ty: -30px; --rot: 0deg; animation-delay: 80ms; }
  .arc-2 { --tx: -34px; --ty: 20px; --rot: 0deg; animation-delay: 260ms; }
  .arc-3 { --tx: 34px; --ty: 24px; --rot: 0deg; animation-delay: 440ms; }
  .art-inner { animation: fade-in 700ms var(--ease-soft) 900ms both; }
  .signature span { animation: rise-in 600ms var(--ease) both; }
  .signature .s1 { animation-delay: 1500ms; } .signature .s2 { animation-delay: 1750ms; } .signature .s3 { animation-delay: 2000ms; }
}
@keyframes arc-settle { from { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; width: min(100%, 520px); margin-top: 8px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div { padding-right: 10px; margin-right: 10px; }
  .fact-note { display: block; margin: 6px 0 0; font-size: 0.8rem; }
}
@media (max-width: 520px) {
  .facts dt { font-size: 0.66rem; letter-spacing: 0.1em; }
  .hero-links { gap: 0 24px; }
}

/* ---------- Framework (dark, full-bleed) ---------- */
.framework { background: var(--dark); color: var(--on-dark); }
.principle { font-family: var(--serif); font-weight: 340; font-size: clamp(2rem, 1rem + 4.6vw, 4.6rem); line-height: 1.06; letter-spacing: -0.024em; max-width: 17ch; text-wrap: balance; }
.principle em { font-style: italic; color: var(--sage-light); font-weight: 320; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(24px, 4vw, 40px); }
.step { padding-top: 26px; border-top: 1px solid rgba(244,243,239,0.18); }
.step-word { font-family: var(--serif); font-weight: 340; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.step-q { font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.3; margin-top: 20px; color: var(--on-dark); max-width: 17em; }

/* Progressive state: only armed by script; without it every step is fully visible. */
@media (prefers-reduced-motion: no-preference) {
  [data-framework].is-armed .step { opacity: 0.72; transition: opacity var(--dur-section) var(--ease-soft); }
  [data-framework].is-armed .step.is-on { opacity: 1; }
  [data-framework].is-armed .step .step-word { transform: translateY(var(--shift)); transition: transform var(--dur-section) var(--ease); }
  [data-framework].is-armed .step.is-on .step-word { transform: none; }
  [data-framework].is-armed .step { border-top-color: rgba(244,243,239,0.18); transition: opacity var(--dur-section) var(--ease-soft), border-color var(--dur-section) var(--ease-soft); }
  [data-framework].is-armed .step.is-on { border-top-color: var(--sage-light); }
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Practice ---------- */
.practice { background: var(--ivory-2); }
.practice-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.practice-head { position: sticky; top: 110px; }
.practice-item { display: grid; grid-template-columns: 56px 1fr; padding: 28px 0 30px; border-top: 1px solid var(--line-strong); position: relative; }
.practice-item:last-child { border-bottom: 1px solid var(--line-strong); }
.p-n { font-family: var(--serif); font-style: italic; font-size: 1.7rem; color: var(--sage-deep); line-height: 1; padding-top: 4px; }
.practice-item p { color: var(--ink-2); margin-top: 6px; max-width: 38em; }
.practice-item::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-section) var(--ease); }
.practice-item:hover::before, .practice-item:focus-within::before { transform: scaleX(1); }
@media (max-width: 900px) { .practice-grid { grid-template-columns: 1fr; } .practice-head { position: static; } }

/* ---------- Program ---------- */
.program { background: var(--ivory); }
.sequence { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); position: relative; }
.seq { padding-top: 30px; position: relative; }
.seq::before { content: ""; position: absolute; top: 0; left: 0; right: calc(-1 * clamp(20px, 3vw, 48px)); height: 1px; background: var(--line-strong); }
.seq:last-child::before { right: 0; }
.seq::after { content: ""; position: absolute; top: -4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ivory); border: 1.5px solid var(--ink); }
.seq:last-child::after { background: var(--sage-deep); border-color: var(--sage-deep); }
.seq-word { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); font-weight: 400; letter-spacing: -0.01em; margin-bottom: 8px; }
.seq p:not(.seq-word) { color: var(--ink-2); max-width: 20em; }
@media (max-width: 760px) {
  .sequence { grid-template-columns: 1fr; gap: 0; padding-left: 28px; border-left: 1px solid var(--line-strong); margin-left: 4px; }
  .seq { padding: 0 0 28px; }
  .seq::before { display: none; }
  .seq::after { top: 8px; left: -33px; }
}

.program .kicker { gap: 10px; }
.cip-mini-kicker { width: 26px; height: 26px; }

.program-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(56px, 7vw, 104px); align-items: start; }
.inc-list { margin-top: 30px; margin-left: 4px; padding-left: 30px; border-left: 1px solid var(--line-strong); display: grid; gap: 30px; }
.inc-item { position: relative; }
.inc-item::before { content: ""; position: absolute; left: -36px; top: 0.6em; width: 9px; height: 9px; border-radius: 50%; background: var(--ivory); border: 1.5px solid var(--ink); }
.inc-item:last-child::before { background: var(--sage-deep); border-color: var(--sage-deep); }
.inc-title { font-family: var(--serif); font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 6px; }
.inc-item p:not(.inc-title) { color: var(--ink-2); max-width: 38em; }
.emel { position: sticky; top: 110px; }
.emel-frame { position: relative; padding: 14px; background: var(--ivory-2); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 rgba(31,35,33,0.04), 0 18px 40px -24px rgba(31,35,33,0.35); }
.emel-frame::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.emel-frame img { display: block; width: 100%; height: auto; background: linear-gradient(180deg, var(--paper), var(--ivory-2)); }
.emel figcaption { font-size: 0.92rem; color: var(--ink-3); margin-top: 12px; max-width: 30em; }
@media (max-width: 900px) { .program-split { grid-template-columns: 1fr; } .emel { max-width: 460px; position: static; } }

.categories { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-strong); }
.categories-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; min-height: 72px; font-family: var(--serif); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); position: relative; padding-right: 44px; transition: color var(--dur-fast); }
.categories-summary::-webkit-details-marker { display: none; }
.categories-summary::after, .qa summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; transition: transform var(--dur-fast) var(--ease-soft); }
.categories[open] .categories-summary::after, .qa[open] summary::after { transform: rotate(90deg); background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
.categories-summary:hover { color: var(--sage-deep); }
.categories-count { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-left: auto; }
.cat-list { padding: 8px 0 24px; }
.cat-list li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) 110px; gap: 4px 20px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); }
.cat-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; }
.cat-focus { color: var(--ink-2); font-size: 0.98rem; }
.cat-count { color: var(--ink-3); font-size: 0.88rem; text-align: right; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) {
  .cat-list li { grid-template-columns: 1fr; }
  .cat-focus, .cat-count { text-align: left; }
}

/* ---------- Learn ---------- */
.learn { background: var(--ivory-2); }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.option { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; align-items: flex-start; }
.option-alt { border-top-color: var(--sage); }
.option-tag { color: var(--sage-deep); margin-bottom: 14px; }
.option .h3 { margin-bottom: 14px; }
.option p:not(.option-tag):not(.option-fit):not(.option-note) { color: var(--ink-2); }
.option-note { margin-top: 12px; font-size: 0.9rem; color: var(--ink-3); max-width: 30em; }
.option-note:empty, .path-note:empty { display: none; }
.option-fit { margin: 18px 0 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; font-style: italic; }
.option .btn { margin-top: auto; }
@media (max-width: 800px) { .options { grid-template-columns: 1fr; } .option .btn { width: 100%; } }

/* ---------- Melissa ---------- */
.melissa { background: var(--ivory); }
.melissa-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.portrait { position: relative; max-width: 420px; justify-self: center; width: 100%; }
.portrait::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--sage); z-index: 0; }
.portrait img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; background: var(--ivory-2); }
.melissa-copy .h2 { max-width: 14ch; }
.byline { margin: 14px 0 24px; color: var(--ink-3); font-size: 0.95rem; letter-spacing: 0.04em; font-weight: 500; }
.melissa-copy p:not(.kicker):not(.byline):not(.pull) { color: var(--ink-2); max-width: 38em; margin-top: 16px; }
.melissa-copy .pull { margin: 26px 0 4px; padding: 4px 0 4px 22px; border-left: 2px solid var(--sage-deep); font-family: var(--serif); font-style: italic; font-weight: 380; font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.05rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--ink); max-width: 22em; }
@media (max-width: 800px) { .melissa-grid { grid-template-columns: 1fr; } .portrait { max-width: 320px; margin-inline: 0 auto; justify-self: start; } .portrait::before { inset: 14px -10px -14px 14px; } }

/* ---------- FAQ ---------- */
.faq { background: var(--ivory-2); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: 110px; }
.qa { border-top: 1px solid var(--line-strong); }
.qa:last-child { border-bottom: 1px solid var(--line-strong); }
.qa summary { list-style: none; cursor: pointer; position: relative; padding: 22px 48px 22px 0; min-height: 64px; font-family: var(--serif); font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.3; transition: color var(--dur-fast); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--sage-deep); }
.qa-body { padding: 0 48px 26px 0; color: var(--ink-2); max-width: 44em; }
.qa[open] .qa-body { animation: panel-in var(--dur-panel) var(--ease) both; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } .faq-head { position: static; } }

/* ---------- Final ---------- */
.final { background: var(--dark); color: var(--on-dark); padding-block: clamp(80px, 11vw, 150px); text-align: center; }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final .kicker { justify-content: center; }
.final-title { font-family: var(--serif); font-weight: 340; font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.022em; max-width: 16ch; text-wrap: balance; }
.final-lede { color: var(--on-dark-2); margin-top: 22px; max-width: 34em; font-size: 1.15rem; }
.final-contact { margin-top: 30px; color: var(--on-dark-2); }
.final-contact a { color: var(--on-dark); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.final-contact a:hover { color: var(--sage-light); }
.final-note { margin-top: 14px; font-size: 0.92rem; color: var(--on-dark-2); max-width: 40em; }
.paths { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: clamp(36px, 5vw, 60px); text-align: left; }
.path { border-top: 1px solid rgba(244,243,239,0.22); padding-top: 24px; display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; align-content: start; }
.path-label { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.2; }
.path-copy { color: var(--on-dark-2); margin: 8px 0 22px; }
.path .btn { width: 100%; }
.path-note { margin-top: 12px; font-size: 0.88rem; color: var(--on-dark-2); }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-deep); color: var(--on-dark-2); padding-block: 56px 48px; }
.footer-row { display: grid; grid-template-columns: auto 1fr; gap: 28px 56px; align-items: start; }
.footer-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-div { width: 1px; height: 34px; background: rgba(244,243,239,0.22); }
.footer-prog { display: flex; align-items: center; gap: 10px; }
.footer-mark { width: 38px; height: auto; }
.footer-name { font-family: var(--serif); font-size: 1.3rem; color: var(--on-dark); }
.footer-tag { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 6px; justify-content: flex-end; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; color: var(--on-dark-2); transition: color var(--dur-fast); }
.footer-nav a:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; }
.footer-fine { grid-column: 1 / -1; font-size: 0.88rem; max-width: 60em; border-top: 1px solid rgba(244,243,239,0.12); padding-top: 18px; }
.footer-fine + .footer-fine { border-top: 0; padding-top: 0; }
@media (max-width: 520px) { .footer-div { display: none; } }
@media (max-width: 700px) { .footer-row { grid-template-columns: 1fr; } .footer-nav ul { justify-content: flex-start; margin-left: -10px; } }

/* ---------- Scroll reveals (armed by script, never required for access) ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].reveal-init { opacity: 0; transform: translateY(var(--shift-lg)); }
  [data-reveal].reveal-init.is-in { opacity: 1; transform: none; transition: opacity var(--dur-section) var(--ease-soft), transform var(--dur-section) var(--ease); transition-delay: calc(var(--i, 0) * var(--stagger)); }
}

/* ---------- Reduced motion: a deliberate, calm, static page ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* ---------- 404 (served on the CIP host only) ---------- */
.nf { padding-block: clamp(72px, 14vw, 180px); max-width: 640px; }
.nf-cta { margin-top: 32px; }

/* ---------- Forced colors / print ---------- */
@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; }
  .arc, .art-inner, .m-r { stroke: CanvasText; fill: none; }
}
@media print { .site-header, .menu { display: none; } .framework, .final, .site-footer { background: none; color: #000; } }

@media (max-width: 379px) {
  .brand { gap: 6px; }
  .brand-mark { width: 24px; }
  .brand-name { font-size: 1.02rem; }
  }

@media (max-width: 379px) {
  }

/* The CIP logo lockup. Proportions follow the approved-direction image: the arcs overlap and sit left of a
   large CIP, with the name in two lines beneath it. Everything scales from the lockup's font size. */
.cip-logo { --f: 34px; display: inline-flex; align-items: flex-start; font-size: var(--f); line-height: 1; color: var(--navy); flex: none; }
.cip-logo-mark { width: 1.59em; height: 1.59em; margin-left: -0.096em; flex: none; overflow: visible; }
.cip-logo-text { display: block; margin-left: -0.276em; margin-top: 0.327em; min-width: 0; }
.cip-logo-cip { display: block; font-family: var(--sans); font-weight: 500; font-size: 1em; line-height: 0.72; letter-spacing: 0.02em; }
.cip-logo-name { display: block; margin-left: calc(var(--f) * 0.118); margin-top: 0.2em; font-size: 0.176em; letter-spacing: 0.17em; text-transform: uppercase; font-weight: 500; line-height: 1.55; white-space: nowrap; }
.cip-logo--sm { --f: 34px; }
.cip-logo--sm .cip-logo-text { margin-top: 0.2em; }
.cip-logo--sm .cip-logo-name { margin-left: calc(var(--f) * 0.24); }
.cip-logo--sm .cip-logo-cip { font-size: 0.86em; }
.cip-logo--sm .cip-logo-name { font-size: 8.5px; letter-spacing: 0.14em; line-height: 1.35; margin-top: 4px; font-weight: 600; color: var(--ink-2); }
.cip-logo--dark { --mk-navy: #8FB0D0; --mk-plum: #C48AAE; color: var(--on-dark); }
.cip-logo--dark .cip-logo-name { color: var(--on-dark-2); }
.cip-logo--hero { --f: 100px; display: flex; }
.hero-art { container-type: inline-size; }
.cip-logo--hero { --f: 22.28cqw; padding-left: 14cqw; }
.cip-logo--hero .cip-logo-name { margin-top: 0.16em; }
@media (max-width: 999px) { .site-header .cip-logo-name { display: none; } }
@media (min-width: 520px) and (max-width: 779px) { .site-header .cip-logo-name { display: block; } }
@media (max-width: 379px) { .site-header .cip-logo--sm { --f: 28px; } }

/* Habit 5's title is long: keep it on one line where the width allows, wrap normally on narrow screens. */
@media (min-width: 640px) { .practice-item .h3-nowrap { white-space: nowrap; font-size: clamp(1.15rem, 0.8rem + 1vw, 1.6rem); } }
@media (min-width: 640px) and (max-width: 860px) { .practice-item .h3-nowrap { white-space: normal; } }

/* The tagline moved here from the hero: a quiet closing line under the bio. */
.bio-says { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 2px 14px; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.bio-says span:nth-child(2) { color: var(--ink-2); font-style: italic; }
.bio-says span:nth-child(3) { color: var(--sage-deep); }
.melissa-copy .cta-row { margin-top: 28px; }

@media (max-width: 379px) { .signature { font-size: 0.64rem; letter-spacing: 0.05em; gap: 0 0.6em; } }

/* Inline text link inside body copy (group-access inquiry). */
.text-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* Terms and Privacy draft pages */
.legal { max-width: 46rem; padding-block: 56px 96px; }
.legal h2.h3 { margin-top: 2.2rem; }
.legal p { margin-top: 0.8rem; color: var(--ink-2); line-height: 1.65; }
.legal a { color: inherit; text-underline-offset: 3px; }
.legal-meta { font-size: 0.9rem; }
.legal-draft { margin-top: 1rem; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--plum); background: rgba(255,255,255,.6); }
.legal mark { background: rgba(199, 154, 32, 0.22); color: var(--ink); padding: 0 0.25em; border-radius: 3px; }
.legal-nav { margin-top: 3rem; font-size: 0.95rem; }
.legal-header .header-row { justify-content: space-between; }
