/* ============================================================
   Disnesta — design system
   Palette: hand-dyed indigo on warm cotton paper, with a
   saffron signal reserved for instruments and action.
   Type:    Schibsted Grotesk (the firm's voice) /
            Spectral (the research voice) /
            IBM Plex Mono (the instrument voice)
   ============================================================ */

:root {
  --paper:       #FBFAF6;
  --paper-dim:   #F3F1E9;
  --ink:         #14162B;
  --ink-soft:    #33364E;
  --ink-mute:    #6A6D85;
  --indigo:      #232B5E;
  --indigo-deep: #151A3D;
  --thread:      #8A94CE;
  --thread-dim:  #C6CBE7;
  --signal:      #E8971E;
  --signal-deep: #C77C0A;
  --green:       #2F7D5B;
  --line:        rgba(20, 22, 43, .14);
  --line-soft:   rgba(20, 22, 43, .08);
  --line-light:  rgba(251, 250, 246, .22);

  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --serif: "Spectral", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1200px;
  --gut: clamp(20px, 4vw, 40px);
  --radius: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

::selection { background: var(--signal); color: var(--indigo-deep); }
html { scrollbar-color: var(--indigo) var(--paper-dim); }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 200; font-size: 14px;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---------------- Typography ---------------- */

h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.04; letter-spacing: -0.028em; font-weight: 800; }

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(27px, 3.6vw, 44px); }
h3 { font-size: clamp(19px, 2vw, 23px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 18px; height: 3px; background: var(--signal);
  margin-right: 10px; vertical-align: 3px;
}
.eyebrow.light { color: var(--thread); }

/* The research voice: long-form prose is set in Spectral. */
.prose p, .lede, .ph-intro, .thesis-serif {
  font-family: var(--serif);
  font-weight: 400;
}
.prose p { font-size: 18px; line-height: 1.72; color: var(--ink-soft); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--indigo); text-decoration-color: var(--thread); text-underline-offset: 3px; }

/* Tick rule — a hairline with instrument tick marks. Section marker. */
.tickrule {
  height: 9px;
  margin-bottom: 26px;
  background:
    linear-gradient(var(--signal), var(--signal)) 0 100% / 56px 3px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 48px) 0 0 / 100% 9px no-repeat;
}
.band-indigo .tickrule, .cta-band .tickrule {
  background:
    linear-gradient(var(--signal), var(--signal)) 0 100% / 56px 3px no-repeat,
    linear-gradient(var(--line-light), var(--line-light)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-light) 0 1px, transparent 1px 48px) 0 0 / 100% 9px no-repeat;
}

hr.divide { border: 0; border-top: 1px solid var(--line-soft); }

section { padding: clamp(56px, 8vw, 96px) 0; }
.sec-h { max-width: 21ch; }
.sec-intro {
  font-family: var(--serif);
  font-size: 18px; color: var(--ink-soft);
  max-width: 58ch; margin-top: 16px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  padding: 12px 22px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn.primary { background: var(--indigo); color: var(--paper); }
.btn.primary:hover { background: var(--indigo-deep); }
.btn.signal { background: var(--signal); color: var(--indigo-deep); }
.btn.signal:hover { background: #F5AC3C; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.ghost-light { border-color: var(--line-light); color: var(--paper); background: transparent; }
.btn.ghost-light:hover { border-color: var(--paper); }

/* ---------------- Utility bar ---------------- */

.utilbar {
  background: var(--indigo-deep); color: var(--thread-dim);
  font-size: 12.5px;
}
.utilbar-in { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.util-note { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.util-links { display: flex; gap: 22px; }
.util-links a { color: var(--thread-dim); text-decoration: none; }
.util-links a:hover { color: var(--paper); }

/* ---------------- Masthead + mega menu ---------------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 30px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.mark {
  width: 14px; height: 14px; background: var(--indigo);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 62%, 62% 100%, 0 100%);
  position: relative;
}
.brand-word { color: var(--ink); }

.navlinks { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex: 1; }

.navtop {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--ink); background: none; border: 0; cursor: pointer;
  padding: 26px 14px; display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 3px solid transparent;
}
.navitem.current > .navtop, .navtop:hover { border-bottom-color: var(--signal); }
.chev {
  width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .18s ease;
}
.navitem.open .chev { transform: rotate(225deg) translateY(-1px); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(20, 22, 43, .28);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.navitem.open .mega { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-in { display: grid; grid-template-columns: 1fr 320px; gap: 48px; padding-top: 36px; padding-bottom: 40px; }
.mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }

.mega-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute);
  padding-bottom: 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.mega-group ul { list-style: none; }
.mega-group li a {
  display: block; padding: 9px 0; text-decoration: none;
}
.ml-t { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.mega-group li a:hover .ml-t { color: var(--indigo); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.ml-d { display: block; font-size: 13px; color: var(--ink-mute); margin-top: 2px; }

.mega-feature {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--indigo); color: var(--paper);
  padding: 26px; border-radius: var(--radius);
  text-decoration: none; align-self: start;
}
.mf-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.mf-title { font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.mf-desc { font-family: var(--serif); font-size: 14.5px; color: var(--thread-dim); line-height: 1.55; }
.mf-cta { font-weight: 600; font-size: 14px; margin-top: 4px; color: var(--paper); }
.mega-feature:hover .mf-cta { color: var(--signal); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta { padding: 10px 18px; }

.menubtn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; align-items: center;
}
.menubtn span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.menubtn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menubtn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------------- Instrument rail (signature element) ---------------- */

.inst-rail {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.rail-in { display: grid; grid-template-columns: repeat(3, 1fr); }
.rail-item {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 14px; align-items: baseline;
  padding: 18px 22px; text-decoration: none;
  border-left: 1px solid var(--line-soft);
  transition: background .15s ease;
}
.rail-item:first-child { border-left: 0; }
.rail-item:hover { background: var(--paper-dim); }
.ri-code {
  font-family: var(--mono); font-weight: 500; font-size: 15px;
  color: var(--indigo); grid-row: 1 / span 2; align-self: center;
  padding: 6px 10px; border: 1px solid var(--thread-dim); border-radius: var(--radius);
}
.rail-item:hover .ri-code { border-color: var(--signal); color: var(--signal-deep); }
.ri-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.ri-note { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); letter-spacing: .04em; }

/* ---------------- Hero (home) ---------------- */

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.thesis {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(19px, 2.2vw, 24px); color: var(--ink-soft);
  margin: 20px 0 14px;
}
.lede { font-size: 17.5px; color: var(--ink-soft); max-width: 54ch; line-height: 1.65; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* Instrument panel — animated system-response chart */
.signal-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #FFFFFF, var(--paper));
  padding: 20px 20px 12px;
}
.signal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.signal-head .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.signal-head .val { font-family: var(--mono); font-size: 12px; color: var(--signal-deep); }
.signal-svg { width: 100%; height: auto; }
.signal-svg .axis { stroke: var(--line); stroke-width: 1; }
.signal-svg .tick { stroke: var(--line); stroke-width: 1; }
.signal-svg .gline { stroke: var(--thread-dim); stroke-width: 1; stroke-dasharray: 3 4; }
.signal-svg .glabel { font-family: var(--mono); font-size: 10px; fill: var(--ink-mute); }
#signal-path { fill: none; stroke: var(--indigo); stroke-width: 2; }
#signal-dot { fill: var(--signal); }

/* ---------------- Page hero variants ---------------- */

.page-hero { padding: clamp(48px, 7vw, 84px) 0 clamp(36px, 5vw, 60px); }
.page-hero h1 { max-width: 20ch; }
.ph-intro { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-soft); max-width: 56ch; margin-top: 18px; line-height: 1.6; }

.page-hero.indigo {
  background: var(--indigo); color: var(--paper);
  padding-bottom: clamp(48px, 7vw, 84px);
}
.page-hero.indigo .ph-intro { color: var(--thread-dim); }
.page-hero.indigo .eyebrow { color: var(--signal); }
.page-hero.indigo .tickrule {
  background:
    linear-gradient(var(--signal), var(--signal)) 0 100% / 56px 3px no-repeat,
    linear-gradient(var(--line-light), var(--line-light)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-light) 0 1px, transparent 1px 48px) 0 0 / 100% 9px no-repeat;
}
.ph-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 30px; }
.ph-meta .m { display: flex; flex-direction: column; gap: 3px; }
.ph-meta .k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--thread); }
.ph-meta .v { font-weight: 600; font-size: 15px; }

/* ---------------- Motifs (system diagrams) ---------------- */

.ph-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.ph-motif svg { width: 100%; max-width: 380px; height: auto; display: block; margin-left: auto; }

.m-line, .m-flow, .m-faint { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-line  { stroke: var(--thread); }
.m-faint { stroke: var(--line); }
.m-node  { fill: var(--paper); stroke: var(--thread); stroke-width: 2; }
.m-faint-node { fill: none; stroke: var(--line); stroke-width: 2; }
.m-accent { fill: var(--signal); stroke: none; }
.m-flow {
  stroke: var(--signal); stroke-dasharray: 5 8;
  animation: m-dash 9s linear infinite;
}
@keyframes m-dash { to { stroke-dashoffset: -130; } }

/* On indigo heroes */
.page-hero.indigo .m-line { stroke: var(--thread); }
.page-hero.indigo .m-faint { stroke: var(--line-light); }
.page-hero.indigo .m-node { fill: var(--indigo); }
.page-hero.indigo .m-faint-node { stroke: var(--line-light); }

@media (max-width: 1020px) {
  .ph-grid { grid-template-columns: 1fr; }
  .ph-motif { display: none; }
}

/* ---------------- Split (rail + prose) ---------------- */

.split { display: grid; grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: clamp(28px, 5vw, 72px); }
.rail h2 { max-width: 16ch; }

/* ---------------- Cards: practices ---------------- */

.arms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.arm {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-decoration: none; display: flex; flex-direction: column; gap: 14px;
  background: #FFFFFF;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.arm:hover { border-color: var(--ink); transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(20, 22, 43, .14); }
.idx { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--ink-mute); }
.arm h3 { display: flex; align-items: center; gap: 10px; }
.arm .dot { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; flex: none; }
.arm p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.arm .out { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); border-top: 1px solid var(--line-soft); padding-top: 14px; }
.arm .go { color: var(--indigo); font-family: var(--sans); font-weight: 600; font-size: 13.5px; }
.arm:hover .go { color: var(--signal-deep); }

/* ---------------- Index cards (instruments) ---------------- */

.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.index-card {
  background: var(--indigo); color: var(--paper);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 12px; text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .16s ease;
}
.index-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--signal); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.index-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(20, 22, 43, .25); }
.index-card:hover::after { transform: scaleX(1); }
.ic-code { font-family: var(--mono); font-size: 13px; color: var(--signal); letter-spacing: .06em; }
.ic-name { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.ic-desc { font-family: var(--serif); font-size: 15px; color: var(--thread-dim); line-height: 1.55; flex: 1; }
.ic-status { font-family: var(--mono); font-size: 11.5px; color: var(--thread); letter-spacing: .08em; text-transform: uppercase; }

.index-card.report { background: var(--paper-dim); color: var(--ink); border: 1px solid var(--line); }
.index-card.report .ic-code { color: var(--signal-deep); }
.index-card.report .ic-desc { color: var(--ink-soft); }
.index-card.report .ic-status { color: var(--ink-mute); }

/* ---------------- Capabilities grid ---------------- */

.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.cap {
  border: 1px solid var(--line); border-radius: var(--radius); background: #FFF;
  padding: 22px 24px; text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
a.cap:hover { border-color: var(--ink); transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(20, 22, 43, .14); }
.cap .ck { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--signal-deep); }
.cap h4 { font-size: 16.5px; }
.cap p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Definition / stat rows ---------------- */

.def-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: 40px; }
.def { background: var(--paper); padding: 24px 26px; }
.def .k { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-deep); margin-bottom: 8px; }
.def h4 { font-size: 17px; margin-bottom: 8px; }
.def p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Research list ---------------- */

.research-list { margin-top: 36px; border-top: 1px solid var(--line); }
.r-item {
  display: grid; grid-template-columns: 70px 1.1fr auto 1.6fr;
  gap: 20px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
}
a.r-item:hover .rt { color: var(--indigo); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.rn { font-family: var(--mono); font-size: 13px; color: var(--ink-mute); }
.rt { font-weight: 700; font-size: 17px; }
.rtag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--indigo); border: 1px solid var(--thread-dim); border-radius: 0; padding: 3px 8px;
  justify-self: start; white-space: nowrap;
}
.rd { font-family: var(--serif); font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ---------------- Contrast rows (why us) ---------------- */

.contrast { margin-top: 26px; border-top: 1px solid var(--line); }
.contrast .row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.contrast .who { font-weight: 700; font-size: 15px; }
.contrast .gap { font-family: var(--serif); color: var(--ink-soft); font-size: 15.5px; }
.wedge-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 72px); align-items: end; }
.close { font-family: var(--serif); font-size: clamp(19px, 2vw, 23px); line-height: 1.5; color: var(--ink); }
.close b { color: var(--indigo); font-weight: 500; border-bottom: 2px solid var(--signal); }

/* ---------------- Comparison table ---------------- */

.cmp-wrap { overflow-x: auto; margin-top: 36px; }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.cmp-table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); text-align: left; padding: 0 18px 12px 0;
  border-bottom: 2px solid var(--ink);
}
.cmp-table th:last-child { color: var(--signal-deep); }
.cmp-table td {
  padding: 18px 18px 18px 0; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px; line-height: 1.55;
}
.cmp-table td:first-child { font-weight: 700; width: 22%; }
.cmp-table td:nth-child(2) { font-family: var(--serif); color: var(--ink-soft); width: 36%; }
.cmp-table td:last-child {
  font-weight: 600; color: var(--ink);
  border-left: 3px solid var(--signal); padding-left: 16px;
}

.verdict {
  margin-top: 40px; background: var(--indigo); color: var(--paper);
  padding: clamp(26px, 3.5vw, 44px);
}
.verdict .vq { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--signal); margin-bottom: 14px; }
.verdict p { font-family: var(--serif); font-size: clamp(17px, 1.9vw, 21px); line-height: 1.6; }
.verdict b { color: var(--signal); font-weight: 600; }

/* ---------------- Method steps ---------------- */

.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.step { border-top: 2px solid var(--indigo); padding-top: 18px; }
.step .num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--signal-deep); margin-bottom: 10px; }
.step h4 { font-size: 17.5px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Sector / audience cards ---------------- */

.sectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.sector {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: #FFFFFF; text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
a.sector:hover { border-color: var(--ink); transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(20, 22, 43, .14); }
.sector .n {
  grid-row: 1 / span 2; align-self: start;
  font-family: var(--mono); font-size: 15px; color: var(--indigo);
  border: 1px solid var(--thread-dim); border-radius: 0;
  width: 34px; height: 34px; display: grid; place-items: center;
}
.sector .t { font-weight: 700; font-size: 16.5px; }
.sector .d { font-size: 14.5px; color: var(--ink-soft); font-family: var(--serif); }
a.sector .go-inline { font-weight: 600; font-size: 13.5px; color: var(--indigo); margin-top: 6px; }
a.sector:hover .go-inline { color: var(--signal-deep); }

/* ---------------- Principles ---------------- */

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.principle { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.pn { font-family: var(--mono); color: var(--signal-deep); font-size: 13px; }
.principle p { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Roles list (audience pages) ---------------- */

.roles { margin-top: 36px; border-top: 1px solid var(--line); }
.role { display: grid; grid-template-columns: 1fr 1.8fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.role .rr { font-weight: 700; font-size: 16px; }
.role .rw { font-family: var(--serif); font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Engagement list ---------------- */

.engagements { margin-top: 36px; display: grid; gap: 18px; }
.engagement {
  display: grid; grid-template-columns: 130px 1fr; gap: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #FFF;
  padding: 22px 26px;
}
.eng-k { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal-deep); padding-top: 3px; }
.engagement h4 { font-size: 17px; margin-bottom: 6px; }
.engagement p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

/* ---------------- Insights ---------------- */

.topic-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  text-decoration: none; color: var(--ink-soft); background: #FFF;
}
.chip:hover, .chip.on { border-color: var(--indigo); color: var(--indigo); }

.insight-list { margin-top: 36px; border-top: 1px solid var(--line); }
.insight {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none;
}
.in-kind { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-deep); }
.in-t { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
a.insight:hover .in-t { color: var(--indigo); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.in-d { font-family: var(--serif); font-size: 15px; color: var(--ink-soft); margin-top: 6px; display: block; line-height: 1.6; max-width: 66ch; }
.in-topic { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }

/* ---------------- Report page ---------------- */

.report-spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: 40px; }
.spec { background: var(--paper); padding: 20px 22px; }
.spec .k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.spec .v { font-weight: 700; font-size: 16px; }

/* ---------------- Newsroom ---------------- */

.news-list { margin-top: 36px; border-top: 1px solid var(--line); }
.news { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.news .nd { font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); padding-top: 4px; }
.news h4 { font-size: 18px; margin-bottom: 6px; }
.news p { font-family: var(--serif); font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; max-width: 68ch; }

/* ---------------- Leadership ---------------- */

.leader { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: clamp(28px, 5vw, 64px); margin-top: 40px; }
.leader-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: #FFF;
  padding: 26px; align-self: start;
}
.leader-card .lc-name { font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.leader-card .lc-role { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal-deep); margin-top: 6px; }
.leader-card ul { list-style: none; margin-top: 18px; border-top: 1px solid var(--line-soft); }
.leader-card li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-soft); display: flex; gap: 10px; }
.leader-card li::before { content: "—"; color: var(--thread); }

/* ---------------- Newsroom ---------------- */

.subnav { background: var(--indigo-deep); }
.subnav-in { display: flex; gap: 4px; overflow-x: auto; }
.subnav a {
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  color: var(--thread-dim); text-decoration: none;
  padding: 13px 14px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--paper); }
.subnav a.on { color: var(--paper); border-bottom-color: var(--signal); }

.nr-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.nr-search { display: flex; }
.nr-search input {
  flex: 1; font-family: var(--sans); font-size: 15px;
  padding: 13px 16px; border: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: #FFF; color: var(--ink); min-width: 0;
}
.nr-search input:focus { outline: 2px solid var(--signal); }
.nr-search button {
  border: 0; background: var(--signal); color: var(--indigo-deep);
  padding: 0 20px; border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700; cursor: pointer;
}

.nr-kind { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-deep); }
.nr-topic { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); }

.feature-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 3vw, 44px); margin-top: 36px; }
.nr-lead {
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
  background: var(--indigo); color: var(--paper);
  border-radius: var(--radius); padding: clamp(26px, 3.5vw, 44px);
  text-decoration: none; position: relative; overflow: hidden;
}
.nr-lead::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--signal); }
.nr-lead .nr-kind { color: var(--signal); }
.nr-lead h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
.nr-lead p { font-family: var(--serif); font-size: 15.5px; color: var(--thread-dim); line-height: 1.6; }
.nr-side { display: flex; flex-direction: column; }
.nr-side-item {
  padding: 18px 0; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; display: block;
}
.nr-side-item:first-child { padding-top: 4px; }
.nr-side-item h4 { font-size: 17px; margin: 6px 0 4px; color: var(--ink); }
.nr-side-item:hover h4 { color: var(--indigo); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }

.topic-band { background: #EEF0F9; padding: clamp(36px, 5vw, 56px) 0; }
.topic-band-in { display: grid; grid-template-columns: minmax(200px, .6fr) 1.4fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.topic-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 32px; }
.topic-cols a { color: var(--indigo); font-weight: 600; font-size: 15px; text-decoration: none; padding: 6px 0; }
.topic-cols a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
.news-card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--indigo); padding-top: 14px; }
.news-card h4 { font-size: 17px; color: var(--ink); line-height: 1.3; }
.news-card:hover h4 { color: var(--indigo); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.news-card p { font-family: var(--serif); font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }

.media-band { background: #EEF0F9; }
.media-band-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 60px); align-items: center; }

@media (max-width: 1020px) {
  .feature-grid, .nr-hero-grid, .topic-band-in, .media-band-in { grid-template-columns: 1fr; }
  .news-grid, .topic-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .news-grid, .topic-cols { grid-template-columns: 1fr; }
}

/* ---------------- Leadership (roster + bios) ---------------- */

.lead-grid { display: grid; grid-template-columns: 1fr 300px; gap: clamp(28px, 5vw, 72px); align-items: start; }

.roster { margin-top: 26px; border-top: 1px solid var(--line); }
.roster li { list-style: none; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
.roster a { font-weight: 700; color: var(--indigo); text-decoration: none; }
.roster a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.roster .rtitle { color: var(--ink-soft); }

.bio { display: grid; grid-template-columns: 150px 1fr; gap: clamp(20px, 3vw, 40px); padding: 40px 0; border-bottom: 1px solid var(--line-soft); }
.bio-id { display: flex; flex-direction: column; gap: 10px; }
.avatar {
  width: 150px; height: 150px; background: var(--indigo); color: var(--paper);
  display: grid; place-items: center; border-radius: var(--radius);
  font-family: var(--sans); font-weight: 800; font-size: 42px; letter-spacing: .02em;
}
.bio-name { font-weight: 800; font-size: 18px; line-height: 1.2; }
.bio-title { font-size: 14px; color: var(--ink-soft); line-height: 1.4; }
.bio-body p { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; color: var(--ink-soft); }
.bio-body p + p { margin-top: 1em; }

.side-card { border: 1px solid var(--line); border-radius: var(--radius); background: #FFF; padding: 24px; }
.side-card + .side-card { margin-top: 20px; }
.side-head { font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.side-card ul { list-style: none; }
.side-card li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.side-card li:last-child { border-bottom: 0; }
.side-card a { color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.side-card a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
.side-card.solid { background: var(--indigo); color: var(--paper); border-color: var(--indigo); }
.side-card.solid .side-head { color: var(--paper); }
.side-card.solid p { font-family: var(--serif); font-size: 14.5px; color: var(--thread-dim); line-height: 1.55; margin-bottom: 16px; }

/* ---------------- Become a Client ---------------- */

.client-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.client-links { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px; }
.client-links a { font-weight: 600; color: var(--indigo); text-decoration: none; font-size: 15.5px; padding: 6px 0; }
.client-links a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }

.client-panel {
  background: #EEF0F9; border: 1px solid var(--thread-dim); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
}
.client-panel h3 { font-size: 24px; margin-bottom: 12px; }
.client-panel .cp-intro { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 22px; }
.client-panel .field + .field { margin-top: 16px; }
.client-panel .btn { margin-top: 20px; width: 100%; justify-content: center; }
.cp-note { font-size: 12.5px; color: var(--ink-mute); margin-top: 12px; }

/* ---------------- Careers ---------------- */

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.value { border-top: 2px solid var(--indigo); padding-top: 16px; }
.value h4 { font-size: 16.5px; margin-bottom: 8px; }
.value p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

.openings { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFF; padding: 30px; }
.openings h4 { font-size: 18px; margin-bottom: 8px; }
.openings p { font-family: var(--serif); font-size: 15.5px; color: var(--ink-soft); line-height: 1.65; max-width: 66ch; }
.openings .btn { margin-top: 18px; }

/* ---------------- Contact ---------------- */

.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); }
.contact-form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 15.5px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #FFF; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--indigo); outline-offset: 0; border-color: var(--indigo); }
.field textarea { min-height: 140px; resize: vertical; }
.contact-alt { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; font-size: 15px; color: var(--ink-soft); }
.contact-alt a { color: var(--indigo); }

/* ---------------- Contact card ---------------- */

.contact-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: #FFF;
  padding: 30px; align-self: start;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-card .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.contact-card .addr { font-weight: 700; font-size: 19px; }
.contact-card .addr a { color: var(--indigo); text-decoration: none; }
.contact-card .addr a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.contact-card .btn { align-self: flex-start; }

/* ---------------- CTA band ---------------- */

.cta-band { background: var(--indigo); color: var(--paper); padding: clamp(48px, 6vw, 76px) 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { max-width: 20ch; }

/* Indigo band section (used mid-page) — with abstract system-line field */
.band-indigo { background: var(--indigo); color: var(--paper); }

.band-indigo, .cta-band, .page-hero.indigo, .verdict, .manny-stage {
  position: relative; overflow: hidden;
}
.band-indigo > .wrap, .cta-band > .wrap, .page-hero.indigo > .wrap,
.verdict > * { position: relative; z-index: 1; }

/* Concentric system rings, anchored right */
.band-indigo::before, .cta-band::before, .page-hero.indigo::before, .verdict::before {
  content: ""; position: absolute; pointer-events: none;
  top: -30%; right: -12%; bottom: -30%; width: 62%;
  background: repeating-radial-gradient(circle at 72% 50%,
    rgba(138, 148, 206, .16) 0 1.5px, transparent 1.5px 58px);
}

/* Fine diagonal hairlines, faded in from the right */
.band-indigo::after, .cta-band::after, .page-hero.indigo::after, .verdict::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg,
    rgba(138, 148, 206, .08) 0 1px, transparent 1px 30px);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 80%);
          mask-image: linear-gradient(90deg, transparent 40%, #000 80%);
}
.band-indigo .sec-intro, .band-indigo .prose p { color: var(--thread-dim); }
.band-indigo .eyebrow { color: var(--signal); }

/* ---------------- Footer ---------------- */

.site-foot { background: var(--indigo-deep); color: var(--thread-dim); margin-top: 0; }
.foot-rail { background: var(--ink); border-bottom: 1px solid rgba(251,250,246,.08); }
.foot-rail .rail-in { grid-template-columns: repeat(3, 1fr); display: grid; }
.foot-rail .rail-item { border-left-color: rgba(251,250,246,.08); }
.foot-rail .rail-item:hover { background: rgba(251,250,246,.04); }
.foot-rail .ri-code { color: var(--signal); border-color: rgba(251,250,246,.2); }
.foot-rail .ri-name { color: var(--paper); }
.foot-rail .ri-note { color: var(--thread); }

.foot-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: clamp(24px, 4vw, 48px); padding-top: 56px; padding-bottom: 48px;
}
.foot-logo .brand-word { color: var(--paper); }
.foot-logo .mark { background: var(--signal); }
.foot-thesis { font-family: var(--serif); font-size: 15px; line-height: 1.6; margin: 16px 0 22px; max-width: 34ch; }
.foot-head { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--thread); margin-bottom: 14px; }
.foot-col ul { list-style: none; }
.foot-col li { padding: 5px 0; }
.foot-col a { color: var(--thread-dim); text-decoration: none; font-size: 14px; }
.foot-col a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.foot-fine {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(251,250,246,.1);
  padding-top: 22px; padding-bottom: 28px;
  font-size: 13px; color: var(--thread);
}
.foot-mail a { color: var(--thread-dim); }
.foot-legal { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-legal a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--thread-dim); text-decoration: none;
}
.foot-legal a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Reveal on scroll ---------------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------------- Responsive ---------------- */

@media (max-width: 1020px) {
  .mega-in { grid-template-columns: 1fr; }
  .mega-feature { display: none; }
  .hero-grid, .wedge-grid, .split, .contact-grid, .leader, .lead-grid, .client-grid { grid-template-columns: 1fr; }
  .arms, .index-grid, .method, .values, .caps { grid-template-columns: 1fr 1fr; }
  .r-item { grid-template-columns: 60px 1fr auto; }
  .r-item .rd { grid-column: 2 / -1; }
  .report-spec { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .util-note { display: none; }
  .utilbar-in { justify-content: flex-end; }

  .nav { height: 64px; }
  .menubtn { display: flex; }
  .nav-cta { display: none; }

  .navlinks {
    display: none;
    position: fixed; inset: 98px 0 0 0; z-index: 90;
    background: var(--paper); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px var(--gut) 40px; margin: 0;
  }
  body.nav-open .navlinks { display: flex; }
  body.nav-open { overflow: hidden; }

  .navitem { border-bottom: 1px solid var(--line-soft); }
  .navtop { width: 100%; justify-content: space-between; padding: 18px 0; border-bottom: 0; font-size: 17px; }
  .mega {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; display: none; background: transparent;
  }
  .navitem.open .mega { display: block; }
  .mega-in { padding: 0 0 18px; gap: 20px; }
  .mega-cols { grid-template-columns: 1fr; gap: 20px; }
  .mega-feature { display: flex; }

  .arms, .index-grid, .method, .sectors, .principles, .values, .def-grid, .caps { grid-template-columns: 1fr; }
  .rail-in, .foot-rail .rail-in { grid-template-columns: 1fr; }
  .rail-item { border-left: 0; border-top: 1px solid var(--line-soft); }
  .foot-rail .rail-item { border-top-color: rgba(251,250,246,.08); }
  .foot-grid { grid-template-columns: 1fr 1fr; }

  .foot-brand { grid-column: 1 / -1; }
  .r-item { grid-template-columns: 1fr; gap: 8px; }
  .role, .engagement, .news { grid-template-columns: 1fr; gap: 8px; }
  .bio { grid-template-columns: 1fr; }
  .client-links { grid-template-columns: 1fr; }
  .contrast .row { grid-template-columns: 1fr; gap: 4px; }
  .insight { grid-template-columns: 1fr; gap: 6px; }
  .report-spec { grid-template-columns: 1fr; }
}


/* ---------------- Manny (site assistant) ---------------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.manny-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 140;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--indigo); color: var(--paper);
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 13px 20px;
  box-shadow: 0 12px 28px -10px rgba(20, 22, 43, .45);
  transition: background .16s ease, transform .16s ease;
}
.manny-launch:hover { background: var(--indigo-deep); transform: translateY(-1px); }
.manny-spark { color: var(--signal); font-size: 17px; }

.manny-overlay {
  position: fixed; inset: 0; z-index: 148;
  background: rgba(20, 22, 43, .35);
  opacity: 0; transition: opacity .25s ease;
}
.manny-overlay.on { opacity: 1; }
.manny-overlay[hidden] { display: none; }

/* Full-height right drawer */
.manny-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  width: min(430px, 100vw);
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: -30px 0 60px -25px rgba(20, 22, 43, .55);
  transform: translateX(100%);
  transition: transform .28s ease;
}
.manny-panel.on { transform: translateX(0); }
.manny-panel[hidden] { display: none; }

.manny-head {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--indigo); color: var(--paper);
  padding: 16px 18px; flex: none;
}
.manny-name { font-weight: 800; font-size: 18px; }
.manny-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--thread-dim); }
.manny-close {
  margin-left: auto; background: none; border: 0; color: var(--paper);
  font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; align-self: center;
}
.manny-close:hover { color: var(--signal); }

/* Avatar stage */
.manny-stage {
  position: relative; flex: none;
  background: linear-gradient(180deg, var(--indigo-deep), var(--indigo));
  display: grid; place-items: center;
  padding: 26px 0 34px;
}
.manny-avatar-svg { width: 168px; height: 168px; overflow: visible; }

.manny-orb-g { animation: manny-bob 5s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes manny-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.manny-eye { transform-origin: center; animation: manny-blink 5.4s infinite; }
@keyframes manny-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%, 97% { transform: scaleY(.08); }
}

/* Mouth: audio-wave bars, animate while speaking */
.manny-mouth rect { transform-origin: center; }
.manny-panel.speaking .manny-mouth rect { animation: manny-wave .7s ease-in-out infinite; }
.manny-panel.speaking .manny-mouth rect:nth-child(1) { animation-delay: 0s; }
.manny-panel.speaking .manny-mouth rect:nth-child(2) { animation-delay: .12s; }
.manny-panel.speaking .manny-mouth rect:nth-child(3) { animation-delay: .24s; }
.manny-panel.speaking .manny-mouth rect:nth-child(4) { animation-delay: .36s; }
.manny-panel.speaking .manny-mouth rect:nth-child(5) { animation-delay: .48s; }
@keyframes manny-wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(4.5); }
}

/* Listening: saffron pulse rings */
.manny-pulse { fill: none; stroke: var(--signal); stroke-width: 2; opacity: 0; }
.manny-panel.listening .manny-pulse { animation: manny-pulse 1.6s ease-out infinite; }
.manny-panel.listening .manny-pulse.p2 { animation-delay: .8s; }
@keyframes manny-pulse {
  0% { opacity: .8; transform: scale(1); transform-origin: 100px 100px; }
  100% { opacity: 0; transform: scale(1.28); transform-origin: 100px 100px; }
}

/* Thinking: eyes scan */
.manny-panel.thinking .manny-eyes { animation: manny-scan 1.1s ease-in-out infinite; }
@keyframes manny-scan {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}

.manny-voice {
  position: absolute; bottom: 18px;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--signal); color: var(--indigo-deep);
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  padding: 10px 18px;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .45);
}
.manny-voice:hover { background: #F5AC3C; }
.manny-panel.listening .manny-voice { background: #C0392B; color: #FFF; }
.manny-voice.unsupported { display: none; }

.manny-mic-ico {
  width: 12px; height: 12px; display: inline-block; position: relative;
  border: 2px solid currentColor; border-radius: 7px 7px 5px 5px;
}
.manny-mic-ico::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 10px; height: 4px; border: 2px solid currentColor; border-top: 0;
  border-radius: 0 0 8px 8px; transform: translateX(-50%);
}

/* Conversation */
.manny-msgs {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.manny-msg {
  max-width: 88%; padding: 10px 14px; border-radius: 0;
  font-size: 14.5px; line-height: 1.5; white-space: pre-wrap;
}
.manny-msg.bot { background: #FFFFFF; border: 1px solid var(--line-soft); align-self: flex-start; color: var(--ink); }
.manny-msg.user { background: var(--indigo); color: var(--paper); align-self: flex-end; }
.manny-msg.typing { color: var(--ink-mute); letter-spacing: 3px; }

.manny-suggests { padding: 0 18px 8px; display: flex; flex-direction: column; gap: 6px; flex: none; }
.manny-suggests-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px; }
.manny-suggest {
  text-align: left; background: none; border: 1px solid var(--line);
  border-radius: 0; padding: 10px 12px; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; color: var(--indigo); font-weight: 600;
}
.manny-suggest:hover { border-color: var(--indigo); background: #FFF; }

.manny-actions { padding: 4px 18px 8px; flex: none; }
.manny-cta { width: 100%; justify-content: center; font-size: 14px; padding: 12px 16px; }

.manny-form { display: flex; gap: 8px; padding: 0 18px 10px; flex: none; }
.manny-form input {
  flex: 1; font-family: var(--sans); font-size: 14.5px;
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 0;
  background: #FFF; color: var(--ink); min-width: 0;
}
.manny-form input:focus { outline: 2px solid var(--indigo); border-color: var(--indigo); }
.manny-mic {
  width: 46px; flex: none; border: 1px solid var(--line); border-radius: 0; cursor: pointer;
  background: #FFF; color: var(--indigo); display: grid; place-items: center;
}
.manny-mic:hover { border-color: var(--indigo); }
.manny-panel.listening .manny-mic { background: #C0392B; border-color: #C0392B; color: #FFF; }
.manny-mic.unsupported { display: none; }
.manny-send {
  width: 46px; flex: none; border: 0; border-radius: 0; cursor: pointer;
  background: var(--signal); color: var(--indigo-deep); font-size: 18px; font-weight: 700;
}
.manny-send:hover { background: #F5AC3C; }

.manny-note { font-size: 11.5px; color: var(--ink-mute); padding: 0 18px 14px; margin: 0; flex: none; }
.manny-note a { color: var(--indigo); }

@media (max-width: 760px) {
  .manny-launch { right: 14px; bottom: 14px; }
  .manny-panel { width: 100vw; border-left: 0; }
  .manny-avatar-svg { width: 132px; height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .manny-orb-g, .manny-eye, .manny-panel.speaking .manny-mouth rect,
  .manny-panel.listening .manny-pulse, .manny-panel.thinking .manny-eyes { animation: none !important; }
  .manny-panel { transition: none; }
}
