/* Engineering Legitimacy — site styles
   Palette "patina" v2 (9 Oct 2026): Cloud Dancer stone above the grade, Dragonfly patina below, bronze grade line. Split-complementary: bronze 67°, patina 215°, ink 275° (OKLCH). */
:root {
  --stone: #F0EEE9;
  --stone-2: #E4E1DA;
  --ink: #2B2C30;
  --ink-soft: #5A5B5E;
  --patina: #2A5D69;
  --d1: #2A5D69;
  --d2: #27535D;
  --d3: #244952;
  --d4: #203F46;
  --d5: #1D353B;
  --d6: #182C31;
  --verdigris: #8BB3BD;
  --verdigris-text: #C3D5D9;
  --bronze: #805A32;
  --bronze-light: #E0C0A2;
  --on-patina: #F0EEE9;

  --display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --text: 'Newsreader', Georgia, 'Times New Roman', serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --sec: clamp(88px, 11vw, 152px);
}

/* Russian: Archivo and Newsreader have no Cyrillic, so the RU page sets
   Roboto Flex (width axis) and Literata; English-language elements keep the brand pair. */
html[lang="ru"] { --display: 'Roboto Flex', 'Archivo', Arial, sans-serif; --text: 'Literata', 'Newsreader', Georgia, serif; }
html[lang="ru"] [lang="en"] { --display: 'Archivo', 'Arial Narrow', Arial, sans-serif; --text: 'Newsreader', Georgia, serif; }
:where(html[lang="ru"] [lang="en"]) { font-family: var(--text); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--stone);
  color: var(--ink);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.sec-d1 :focus-visible, .sec-d2 :focus-visible, .sec-d3 :focus-visible,
.sec-d4 :focus-visible, .sec-d5 :focus-visible, .foot :focus-visible,
.hero-below :focus-visible, .fields-below :focus-visible { outline-color: var(--bronze-light); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--stone); padding: 8px 14px; font-family: var(--display); z-index: 10; }
.skip:focus { top: 8px; }

/* ── Type ── */
h2 {
  font-family: var(--display);
  font-weight: 560; font-stretch: 80%;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05; letter-spacing: -0.012em;
  margin-bottom: 24px;
  max-width: 20ch;
}
.h2-wide { max-width: 22ch; }
.h3 {
  font-family: var(--display); font-weight: 620; font-stretch: 100%;
  font-size: 21px; line-height: 1.25; margin-bottom: 10px;
}
.lede { max-width: 36em; font-size: 20px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.small { font-size: 16px; line-height: 1.55; }

/* ── Top bar ── */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 22px; padding-bottom: 22px;
  font-family: var(--display); font-size: 15px;
}
.mark { font-family: var(--display); font-weight: 650; font-stretch: 78%; text-decoration: none; letter-spacing: 0.005em; }
.bar-right { display: flex; gap: 40px; align-items: center; }
.nav { display: flex; gap: 28px; }
.nav a, .bar .langs a { text-decoration: none; color: var(--ink-soft); font-stretch: 90%; }
.nav a:hover, .bar .langs a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 5px; }
.langs { display: flex; gap: 14px; }
.bar .langs a[aria-current] { color: var(--ink); font-weight: 650; }

/* ── Hero ── */
.hero-above { position: relative; z-index: 2; padding-top: clamp(72px, 20vh, 240px); }
.tagline {
  font-style: italic;
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.35; color: var(--on-patina);
  max-width: 32ch;
}
.hero h1 { margin: 0; }
.title { display: block; width: 100%; height: auto; overflow: visible; }
.title text {
  font-family: var(--display);
  font-weight: 560; font-stretch: 76%;
  letter-spacing: -0.012em; font-size: 100px;
}
.title .t-above { fill: var(--ink); }
.title .t-below { fill: var(--verdigris); }

.grade { position: relative; }
.grade::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0;
  height: 2px; background: var(--bronze);
}
.hero-below.grade::before {
  transform-origin: left center;
  animation: draw 1.4s cubic-bezier(.6,.05,.2,1) .2s both;
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-below {
  background: var(--patina); color: var(--on-patina);
  padding-top: calc(var(--desc, 40px) + clamp(28px, 4vw, 48px));
  padding-bottom: clamp(64px, 10vh, 120px);
}
.subtitle {
  font-family: var(--display);
  font-weight: 420; font-stretch: 118%;
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1.2;
  color: var(--verdigris-text);
  margin-bottom: 18px;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 96px); align-items: end;
}
.definition {
  font-size: clamp(22px, 2.3vw, 30px); line-height: 1.45; max-width: 36em;
  padding-left: clamp(18px, 2.5vw, 32px); border-left: 2px solid var(--bronze);
  margin-bottom: clamp(72px, 9vw, 120px);
}
.definition b { font-weight: 600; }
.byline { margin-top: 32px; font-size: 17px; color: var(--verdigris-text); }
.byline a, .author a, .work-contact a, .foot a { text-decoration-color: var(--bronze-light); text-underline-offset: 4px; }
.byline a { color: var(--on-patina); }
.byline a:hover { color: #fff; }

.actions { display: flex; flex-direction: column; gap: 12px; }
.btn {
  display: block; text-align: center; text-decoration: none;
  font-family: var(--display); font-size: 16px; font-weight: 560;
  padding: 15px 22px; border: 1.5px solid var(--on-patina);
}
.btn-light { background: var(--stone); color: var(--patina); border-color: var(--stone); }
.btn-light:hover { background: #fff; border-color: #fff; }
.btn-line { color: var(--on-patina); }
.btn-line:hover { background: rgba(240,238,233,.08); }

/* ── Generic sections ── */
.sec { padding-top: var(--sec); padding-bottom: var(--sec); }
.sec-stone { background: var(--stone); }
.sec-ruled { border-top: 1px solid var(--stone-2); }
.sec-d1 { background: var(--d1); color: var(--on-patina); }
.sec-d2 { background: var(--d2); color: var(--on-patina); }
.sec-d3 { background: var(--d3); color: var(--on-patina); }
.sec-d4 { background: var(--d4); color: var(--on-patina); }
.sec-d5 { background: var(--d5); color: var(--on-patina); }
[class*="sec-d"] h2 { color: #fff; }
[class*="sec-d"] .lede { color: var(--verdigris-text); }
.muted-dark { color: var(--verdigris-text); }

.cols-text {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
  max-width: 1040px; margin-top: 16px;
}
.cols-text p { margin-bottom: 1em; }

/* ── Gap: subjects (tabs) and bounds ── */
.subjects { margin-top: clamp(64px, 8vw, 104px); }
.subj-intro { font-size: 17px; line-height: 1.55; max-width: 40em; }
.subj-tabs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 28px; border-top: 2px solid var(--ink);
}
.subj-tabs button {
  position: relative; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 8px 14px 0; color: var(--ink-soft);
  font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.25;
}
.subj-tabs button::before { content: ''; position: absolute; top: -2px; left: 0; width: 2px; height: 12px; background: var(--ink); }
.subj-tabs button span { display: inline; border-bottom: 2px solid transparent; padding-bottom: 3px; }
.subj-tabs button:hover { color: var(--ink); }
.subj-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 650; }
.subj-tabs button[aria-selected="true"] span { border-bottom-color: var(--bronze); }
.subj-tabs button[aria-selected="true"]::before { width: 4px; height: 18px; background: var(--bronze); }
.subj-tabs button { font-size: 18px; }
.subj-tabs button:nth-child(1) { font-stretch: 78%; }
.subj-tabs button:nth-child(2) { font-stretch: 88%; }
.subj-tabs button:nth-child(3) { font-stretch: 98%; }
.subj-tabs button:nth-child(4) { font-stretch: 108%; }
.subj-tabs button:nth-child(5) { font-stretch: 118%; }
.subj-book { font-family: var(--display); font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.subj-scope { font-size: 17px; line-height: 1.5; color: var(--ink-soft); max-width: 46em; margin: -8px 0 24px; }
.subj-panel { margin-top: 28px; padding: clamp(24px, 3vw, 36px); background: var(--stone-2); }
.js .subj-panel[data-inactive] { display: none; }
.subj-panel + .subj-panel { margin-top: 12px; }
.js .subj-panel + .subj-tabs button { font-size: 18px; }
.subj-tabs button:nth-child(1) { font-stretch: 78%; }
.subj-tabs button:nth-child(2) { font-stretch: 88%; }
.subj-tabs button:nth-child(3) { font-stretch: 98%; }
.subj-tabs button:nth-child(4) { font-stretch: 108%; }
.subj-tabs button:nth-child(5) { font-stretch: 118%; }
.subj-book { font-family: var(--display); font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.subj-scope { font-size: 17px; line-height: 1.5; color: var(--ink-soft); max-width: 46em; margin: -8px 0 24px; }
.subj-panel { margin-top: 28px; }
.subj-name { font-family: var(--display); font-weight: 560; font-stretch: 84%; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; margin-bottom: 20px; }
.subj-panel dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.subj-panel dt { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-bottom: 6px; }
.subj-panel dd { font-size: 18px; line-height: 1.5; }
.subj-note { margin-top: 14px; max-width: 46em; }

.bounds {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 80px);
  margin-top: clamp(64px, 8vw, 104px);
}
.bounds .muted { font-size: 17px; line-height: 1.55; max-width: 24em; }
.bounds-list > div {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 24px; padding: 16px 0; border-top: 1px solid var(--stone-2);
}
.bounds-list > div:last-child { border-bottom: 1px solid var(--stone-2); }
.bounds-list dt { font-family: var(--display); font-weight: 600; font-size: 18px; }
.bounds-list dd { font-size: 17px; line-height: 1.55; color: var(--ink-soft); }

/* ── Framework ── */
.components { margin-top: clamp(48px, 6vw, 80px); border-top: 2px solid var(--ink); }
.component {
  display: grid; grid-template-columns: 64px minmax(0, 4fr) minmax(0, 7fr);
  gap: 0 clamp(20px, 3vw, 48px);
  padding: 28px 0; border-bottom: 1px solid var(--stone-2);
  align-items: baseline;
}
.comp-num { font-family: var(--display); font-weight: 400; font-stretch: 120%; font-size: 28px; color: var(--bronze); line-height: 1; }
.comp-name { font-family: var(--display); font-weight: 560; font-stretch: 82%; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; }
.comp-text { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 38em; }
.component-state { border-top: 2px solid var(--ink); margin-top: -1px; }
.component-state .comp-name { font-style: normal; }

.logic { margin-top: clamp(56px, 7vw, 96px); }
.chain {
  font-family: var(--display); font-weight: 480; font-stretch: 88%;
  font-size: clamp(19px, 1.8vw, 23px); line-height: 1.7;
  max-width: 52em; margin-top: 12px;
}
.chain .arr { color: var(--bronze); font-weight: 500; padding: 0 .35em; white-space: nowrap; }
.logic-note { max-width: 40em; margin-top: 14px; font-size: 17px; }
.ops-unused {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px); margin-top: clamp(48px, 6vw, 72px);
}
.op { padding-top: 16px; border-top: 1px solid var(--ink); }
.op-name { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 8px; }
.op p { font-size: 17px; line-height: 1.55; color: var(--ink-soft); }

/* ── Fields: interactive section drawing ── */
#fields { border-top: 1px solid var(--stone-2); }
.fields-head { padding-top: var(--sec); padding-bottom: 32px; }
.mode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; margin-top: 36px; font-family: var(--display); }
.mode button {
  font: inherit; font-size: 16px; font-weight: 560; cursor: pointer;
  padding: 10px 18px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
}
.mode button + button { border-left: 0; }
.mode button[aria-pressed="true"] { background: var(--ink); color: var(--stone); }

.xsec {
  background: linear-gradient(to bottom,
    var(--stone) 0, var(--stone) calc(43.75% - 1px),
    var(--bronze) calc(43.75% - 1px), var(--bronze) calc(43.75% + 1px),
    var(--patina) calc(43.75% + 1px));
}
.xsec-svg { display: block; width: 100%; height: auto; overflow: visible; }
.xsec-svg .axis { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 5; opacity: .45; }
.xsec-svg .axis-b { stroke: var(--verdigris); opacity: .55; }
.xsec-svg .hl-a { stroke: var(--ink); stroke-width: 1; opacity: .4; }
.xsec-svg .hd-a { fill: var(--ink); opacity: .45; }
.xsec-svg .hl-b { stroke: var(--verdigris); stroke-width: 1; opacity: .6; fill: none; }
.mass { cursor: pointer; outline: none; }
.mass-rect { stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: stroke .2s, stroke-width .2s; }
.mass-above .mass-rect { stroke: var(--ink); }
.mass-below .mass-rect { stroke: var(--verdigris); }
[data-mode="surface"] .mass-below .mass-rect { stroke-dasharray: 6 5; }
.mass:hover .mass-rect, .mass:focus-visible .mass-rect { stroke-width: 2.5; }
.mass[aria-pressed="true"] .mass-rect { stroke: var(--bronze); stroke-width: 3; }
.mass-below[aria-pressed="true"] .mass-rect { stroke: var(--bronze-light); }
.mass:focus-visible .mass-rect { stroke: var(--bronze); }
.xl { font-family: var(--display); font-size: 17px; font-weight: 520; fill: var(--ink); }
.xl-b { fill: var(--on-patina); }
.mass[aria-pressed="true"] .xl { font-weight: 700; }
.lvl { font-family: var(--display); font-size: 14px; fill: var(--bronze); }

.fields-below { background: var(--patina); color: var(--on-patina); padding-top: 48px; padding-bottom: var(--sec); }

/* Mode switch with its caption directly underneath */
.mode-block { margin-top: 36px; max-width: 46em; }
.mode { margin-top: 0; }
.mode-caption { margin-top: 18px; min-height: 6.5em; }
.mode-caption p { font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.js .mode-caption [data-inactive] { display: none; }

/* A Field group: heading on the left, selector and description on the right */
.fgroup {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 80px);
  margin-top: clamp(48px, 6vw, 80px);
}
.fgroup-anc { margin-top: 0; }
.group-name { font-family: var(--display); font-weight: 620; font-size: 22px; line-height: 1.2; margin-bottom: 8px; }
.group-note { font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 24em; }
.fgroup-anc .group-name { color: #fff; }
.fgroup-anc .group-note { color: var(--verdigris-text); }
.fbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fbtns button {
  font-family: var(--display); font-size: 16px; font-weight: 520; cursor: pointer;
  padding: 9px 16px; background: transparent; color: var(--ink);
  border: 1px solid rgba(43,44,48,.35);
}
.fbtns button:hover { border-color: var(--ink); }
.fbtns button[aria-pressed="true"] { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.fgroup-anc .fbtns button { color: var(--on-patina); border-color: rgba(240,238,233,.45); }
.fgroup-anc .fbtns button:hover { border-color: var(--on-patina); }
.fgroup-anc .fbtns button[aria-pressed="true"] { background: var(--on-patina); color: var(--patina); border-color: var(--on-patina); }
.field-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(43,44,48,.18); }
.fgroup-anc .field-panel { border-top-color: rgba(139,179,189,.35); }
.js .field-panel[data-inactive] { display: none; }
.fp-name { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 4vw, 52px); line-height: 1; margin-bottom: 14px; }
.fgroup-anc .fp-name { color: #fff; }
.fp-acc { font-stretch: 72%; }
.fp-anc { font-stretch: 116%; }
.fp-text { font-size: 20px; line-height: 1.5; max-width: 32em; }

/* Clickable cues */
.hint { font-family: var(--display); font-size: 15px; color: var(--ink-soft); margin-bottom: 10px; }
.hint::before { content: '↳'; color: var(--bronze); margin-right: 8px; }
.fgroup-anc .hint { color: var(--verdigris-text); }
.fgroup-anc .hint::before { color: var(--bronze-light); }
.fp-count { font-family: var(--display); font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.fgroup-anc .fp-count { color: var(--verdigris-text); }
.next {
  margin-top: 18px; font-family: var(--display); font-size: 15px; font-weight: 600; cursor: pointer;
  background: none; border: 0; padding: 4px 0; color: var(--ink);
  border-bottom: 1.5px solid var(--bronze);
}
.next span { display: inline-block; transition: transform .2s; }
.next:hover span { transform: translateX(4px); }
.fgroup-anc .next { color: #fff; border-bottom-color: var(--bronze-light); }
.mass.cue .mass-rect { stroke: var(--bronze); stroke-width: 3.5; }
.mass-below.cue .mass-rect { stroke: var(--bronze-light); }
.subj-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.subj-top .fp-count { margin: 0; }
.subj-panel .next { margin-top: 24px; }
.subjects .hint { margin-top: 24px; margin-bottom: 0; }

.closing { margin-top: clamp(56px, 7vw, 88px); max-width: 34em; font-size: clamp(20px, 2vw, 24px); line-height: 1.45; color: #fff; }

/* ── Collapse ── */
#collapse { border-top: 1px solid rgba(139,179,189,.25); }
.formula {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  gap: 0 clamp(12px, 2vw, 28px); align-items: start;
  margin: clamp(48px, 6vw, 80px) 0; padding: 32px 0;
  border-top: 2px solid var(--bronze-light); border-bottom: 1px solid rgba(139,179,189,.35);
}
.factor h3 { font-family: var(--display); font-weight: 560; font-stretch: 84%; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.05; color: #fff; margin-bottom: 14px; }
.factor p { font-size: 17px; line-height: 1.55; }
.formula .link { font-family: var(--display); font-size: 30px; color: var(--bronze-light); line-height: 1.1; }
.cols-text-dark p { color: var(--on-patina); }

/* ── Book ── */
.book { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 112px); }
.status {
  display: inline-block; font-family: var(--display); font-size: 15px; font-weight: 560;
  color: var(--bronze-light); border: 1px solid var(--bronze-light); padding: 4px 12px; margin-bottom: 28px;
}
.book-title { max-width: none; font-stretch: 78%; }
.book-title span {
  display: block; margin-top: 10px;
  font-weight: 420; font-stretch: 118%; font-size: .5em; line-height: 1.2; color: var(--verdigris-text);
}
.book-desc { margin-top: 28px; max-width: 34em; }
.parts { margin-top: 40px; border-top: 1px solid rgba(139,179,189,.35); }
.parts li {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px;
  padding: 13px 0; border-bottom: 1px solid rgba(139,179,189,.2);
  font-size: 18px; line-height: 1.4;
}
.part-n { font-family: var(--display); font-size: 15px; color: var(--verdigris-text); padding-top: 2px; }
.book-side { display: flex; flex-direction: column; gap: 64px; }
.signup { background: var(--d4); padding: clamp(24px, 3vw, 36px); border-top: 2px solid var(--bronze-light); }
.signup .h3 { color: #fff; }
.signup-row { display: flex; gap: 0; margin-top: 20px; }
.signup input[type="email"] {
  flex: 1; min-width: 0; font: inherit; font-size: 17px;
  padding: 13px 14px; background: var(--stone); color: var(--ink);
  border: 1.5px solid var(--stone); border-radius: 0;
}
.signup input[type="email"]::placeholder { color: #5A5B5E; }
.signup button {
  font-family: var(--display); font-size: 16px; font-weight: 600;
  padding: 13px 20px; background: var(--bronze-light); color: var(--d6);
  border: 1.5px solid var(--bronze-light); cursor: pointer; border-radius: 0;
}
.signup button:hover { background: #B28F6B; border-color: #B28F6B; }
.signup button:disabled { opacity: .5; cursor: default; }
.signup-msg { margin-top: 12px; font-size: 16px; min-height: 1.5em; color: var(--on-patina); }
.signup-msg.err { color: #E7B9A8; }
.hp { position: absolute; left: -9999px; }
.applied .small { margin-bottom: 16px; }
.branches { border-top: 1px solid rgba(139,179,189,.35); margin-bottom: 16px; }
.branches li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(139,179,189,.2); }
.branch { font-family: var(--display); font-weight: 560; font-stretch: 105%; color: #fff; font-size: 17px; }

/* ── Work ── */
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 32px; }
.work > div { padding-top: 16px; border-top: 1px solid rgba(139,179,189,.45); }
.work .h3 { color: #fff; }
.work p { font-size: 17px; line-height: 1.55; }
.work-contact { margin-top: 48px; font-size: 20px; }
.work-contact a { color: #fff; }

/* ── Author ── */
.author { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.author h2 { font-stretch: 100%; }
.author p { margin-bottom: 1em; max-width: 36em; }
.author-links { display: flex; gap: 28px; font-family: var(--display); font-size: 17px; margin-top: 8px; }
.author-links a { color: #fff; }

/* ── Foundations (bedrock) ── */
#foundations { border-top: 2px solid rgba(139,179,189,.25); }
.thinkers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(40px, 5vw, 64px); }
.thinkers li { padding-top: 18px; border-top: 1px solid rgba(139,179,189,.45); }
.thinkers h3 { font-family: var(--display); font-weight: 520; font-stretch: 116%; font-size: 21px; color: #fff; margin-bottom: 6px; }
.thinker-idea { font-style: italic; color: var(--verdigris-text); margin-bottom: 8px; font-size: 18px; }
.thinkers p { font-size: 17px; line-height: 1.55; }
.confirm-title { color: #fff; margin-top: clamp(56px, 7vw, 88px); }
.confirm-intro { max-width: 40em; }
.thinkers-confirm { margin-top: 24px; }
.found-note { margin-top: 48px; max-width: 40em; color: var(--verdigris-text); font-size: 17px; }

/* ── Footer ── */
.foot { background: var(--d6); color: var(--on-patina); padding: 48px 0 40px; font-family: var(--display); font-size: 15px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: baseline; }
.foot .mark { color: #fff; font-size: 17px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot-links a, .foot .langs a { color: var(--on-patina); }
.foot .langs { margin-left: auto; gap: 18px; }
.foot .langs a { text-decoration: none; }
.foot .langs a[aria-current] { color: #fff; text-decoration: underline; text-decoration-color: var(--bronze-light); }
.copy { width: 100%; color: var(--verdigris-text); font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .thinkers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .hero-grid, .bounds, .author, .cols-text, .fgroup { grid-template-columns: minmax(0, 1fr); }
  .actions { max-width: 360px; }
  .ops, .work { grid-template-columns: minmax(0, 1fr); }
  .component { grid-template-columns: 48px minmax(0, 1fr); }
  .comp-text { grid-column: 2; margin-top: 8px; }
  .formula { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .formula .link { transform: rotate(90deg); justify-self: start; padding-left: 4px; }
  .subj-panel dl { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .thinkers { grid-template-columns: 1fr; }
  .xsec-svg .xl, .xsec-svg .lvl { display: none; }
  .bounds-list > div { grid-template-columns: 1fr; gap: 4px; }
  .parts li { grid-template-columns: 1fr; gap: 0; }
  .branches li { grid-template-columns: 1fr; gap: 0; }
  .signup-row { flex-direction: column; gap: 10px; }
  .foot .langs { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-below.grade::before { animation: none; }
}

/* Russian: long words in the field drawing and tabs */
html[lang="ru"] .xl { font-size: 15px; font-stretch: 86%; }
html[lang="ru"] .fp-anc { font-stretch: 100%; }
html[lang="ru"] .subj-tabs button { font-size: 15px; hyphens: auto; }

/* Subjects on narrow screens: wrap as chips instead of the scale line */
@media (max-width: 900px) {
  .subj-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-top: 0; margin-top: 20px; }
  .subj-tabs button { padding: 8px 12px; border: 1px solid var(--stone-2); background: var(--stone); font-stretch: 100% !important; }
  .subj-tabs button::before { display: none; }
  .subj-tabs button span { border-bottom: 0; padding: 0; }
  .subj-tabs button[aria-selected="true"] { background: var(--ink); color: var(--stone); border-color: var(--ink); }
}

/* Sticky top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240, 238, 233, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.is-stuck { border-bottom-color: var(--stone-2); }
.topbar .bar { padding-top: 16px; padding-bottom: 16px; }
main [id] { scroll-margin-top: 72px; }
@media (max-width: 900px) {
  .topbar .bar { flex-wrap: wrap; row-gap: 8px; padding-top: 12px; padding-bottom: 10px; }
  .bar-right { display: contents; }
  .topbar .nav { display: flex; order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; font-size: 14px; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  main [id] { scroll-margin-top: 96px; }
}
.langs a { font-family: var(--display); }

/* Narrow screens: stack the Field groups and subject details (kept last so it wins) */
@media (max-width: 900px) {
  .fgroup { grid-template-columns: 1fr; gap: 16px; }
  .subj-panel dl { grid-template-columns: 1fr; gap: 16px; }
}
.xsec { overflow: hidden; }
@media (max-width: 1000px) { .book { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .xsec-svg .xl, .xsec-svg .lvl { display: none; } }

/* ── Construction logic: five collapsible steps ── */
.logic { margin-top: clamp(56px, 7vw, 96px); }
.lnodes { display: flex; flex-wrap: nowrap; align-items: stretch; margin-top: 18px; border-top: 2px solid var(--ink); }
.lnode-wrap { display: flex; align-items: stretch; flex: 1 1 0; min-width: 0; }
.lnode {
  flex: 1 1 auto; min-width: 0; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 16px 10px 16px 0; color: var(--ink);
  font-family: var(--display); display: flex; flex-direction: column; gap: 6px;
}
.lnode-n { font-size: 22px; font-weight: 400; font-stretch: 120%; color: var(--bronze); line-height: 1; }
.lnode-name { font-size: 17px; font-weight: 560; font-stretch: 86%; line-height: 1.2; }
.lnode:hover .lnode-name { text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 4px; }
.lnode[aria-expanded="true"] { box-shadow: inset 0 3px 0 var(--bronze); }
.lnode[aria-expanded="true"] .lnode-name { color: var(--ink); text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 4px; }
.lnode-arrow { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 14px 10px 0; font-family: var(--display); }
.lnode-arrow .arr { color: var(--bronze); font-size: 20px; line-height: 1; }
.lnode-via { font-size: 12px; color: var(--ink-soft); max-width: 7.5em; text-align: center; line-height: 1.2; margin-top: 4px; }
.lpanel { margin-top: 8px; padding: clamp(22px, 3vw, 32px); background: var(--stone-2); }
.js .lpanel[data-inactive] { display: none; }
.lchain { font-family: var(--display); font-weight: 500; font-stretch: 88%; font-size: clamp(20px, 2vw, 26px); line-height: 1.3; margin: 4px 0 12px; }
.lchain .arr { color: var(--bronze); padding: 0 .3em; }
.ltext { font-size: 18px; line-height: 1.55; max-width: 40em; }

/* Operating logics: native disclosure rows */
.ops-block { margin-top: clamp(48px, 6vw, 72px); }
.ops-acc { border-top: 1px solid var(--ink); margin-top: 8px; }
.op-item { border-bottom: 1px solid var(--stone-2); }
.op-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; font-family: var(--display);
}
.op-item summary::-webkit-details-marker { display: none; }
.op-item .op-name { font-size: 20px; font-weight: 600; }
.op-sign { position: relative; width: 16px; height: 16px; flex: 0 0 16px; }
.op-sign::before, .op-sign::after { content: ''; position: absolute; background: var(--bronze); left: 0; top: 7px; width: 16px; height: 2px; transition: transform .2s; }
.op-sign::after { transform: rotate(90deg); }
.op-item[open] .op-sign::after { transform: rotate(0deg); }
.op-item summary:hover .op-name { text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 4px; }
.op-item p { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 40em; padding: 0 0 18px; }

/* ── Surface vs Structural comparison (below the Anchor Fields) ── */
.compare { margin-top: clamp(64px, 8vw, 104px); padding-top: 40px; border-top: 1px solid rgba(139,179,189,.35); }
.compare-title { font-family: var(--display); font-weight: 560; font-stretch: 84%; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; color: #fff; margin-bottom: 14px; }
.compare .hint { color: var(--verdigris-text); }
.compare .hint::before { color: var(--bronze-light); }
.compare .mode { margin-top: 4px; }
.compare .mode button { color: var(--on-patina); border-color: var(--on-patina); }
.compare .mode button[aria-pressed="true"] { background: var(--on-patina); color: var(--patina); }
.compare-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 28px; }
.xsec-compare { border: 1px solid rgba(139,179,189,.35); }
.xsec-compare .mass { cursor: default; }
.compare .mode-caption { margin-top: 0; min-height: 0; }
.compare .mode-caption h4 { font-family: var(--display); font-weight: 560; font-size: 22px; color: #fff; margin-bottom: 8px; }
.compare .mode-caption p { color: var(--on-patina); }
.compare .next { color: #fff; border-bottom-color: var(--bronze-light); }
.xsec-compare .xl { font-size: 17px; }
.xsec-compare .lvl { display: none; }
@media (max-width: 560px) { .xsec-compare .xl { display: none; } }

/* Book title pieces */
.book-title .bt-main { display: block; }
.book-title .bt-sub { display: block; margin-top: 10px; font-weight: 420; font-stretch: 118%; font-size: .5em; line-height: 1.2; color: var(--verdigris-text); }
html[lang="ru"] .book-title .bt-sub { font-stretch: 100%; }

@media (max-width: 900px) {
  .lnodes { flex-direction: column; border-top: 0; border-left: 2px solid var(--ink); }
  .lnode-wrap { flex-direction: column; }
  .lnode { flex-direction: row; align-items: baseline; gap: 12px; padding: 12px 0 12px 16px; }
  .lnode[aria-expanded="true"] { box-shadow: inset 3px 0 0 var(--bronze); }
  .lnode-arrow { flex-direction: row; gap: 10px; padding: 0 0 0 18px; align-items: center; }
  .lnode-arrow .arr { transform: rotate(90deg); display: inline-block; }
  .lnode-via { max-width: none; text-align: left; margin-top: 0; }
  .compare-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Framework as a vertical process ── */
.process-wrap { position: relative; margin-top: 18px; padding-right: clamp(0px, 9vw, 120px); }
.process { position: relative; padding-left: 0; }
.pfill-track { position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--stone-2); list-style: none; }
.pfill { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--bronze); transition: height .12s linear; }
.pstep { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: clamp(16px, 2.5vw, 28px); padding: 10px 0; }
.pdot {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 17px; font-weight: 600; font-stretch: 110%;
  background: var(--stone); color: var(--ink-soft); border: 2px solid var(--stone-2);
  transition: background .3s, color .3s, border-color .3s;
}
.pdot.on { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.pstep-state .pdot { border-radius: 4px; }
.phead {
  grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; width: 100%;
  text-align: left; cursor: pointer; background: none; border: 0; padding: 6px 36px 10px 0;
  border-bottom: 1px solid var(--stone-2); position: relative; color: var(--ink);
}
.pname { font-family: var(--display); font-weight: 560; font-stretch: 84%; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; }
.psub { font-family: var(--display); font-size: 15px; color: var(--ink-soft); }
.phead .psign { position: absolute; right: 4px; top: 18px; width: 16px; height: 16px; }
.psign::before, .psign::after { content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: var(--bronze); transition: transform .2s; }
.psign::after { transform: rotate(90deg); }
.phead[aria-expanded="true"] .psign::after { transform: rotate(0); }
.phead:hover .pname { text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.pbody { grid-column: 2; padding: 14px 0 6px; max-width: 44em; }
.js .pbody[data-inactive] { display: none; }
.pdef { font-size: 19px; line-height: 1.55; }
.plogic { margin-top: 12px; font-size: 17px; line-height: 1.55; color: var(--ink-soft); padding-left: 14px; border-left: 2px solid var(--bronze); }
.plabel { font-family: var(--display); font-weight: 600; color: var(--ink); margin-right: 4px; }
.pvia { position: relative; list-style: none; padding: 4px 0 4px 56px; min-height: 36px; display: flex; align-items: center; }
.pvia span { font-family: var(--display); font-size: 14px; color: var(--bronze); background: var(--stone); padding: 2px 10px; border: 1px dashed var(--bronze); }
.pvia::before { content: '↓'; position: absolute; left: 13px; color: var(--bronze); font-family: var(--display); font-size: 14px; background: var(--stone); padding: 0 1px; z-index: 1; }
.pdiag { position: absolute; right: 0; top: 24px; bottom: 24px; width: clamp(0px, 7vw, 90px); border-right: 1.5px dashed var(--ink-soft); opacity: .7; }
.pdiag::before { content: '↑'; position: absolute; right: -8px; top: -14px; font-family: var(--display); color: var(--ink-soft); }
.pdiag span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: right center; white-space: nowrap; font-family: var(--display); font-size: 14px; color: var(--ink-soft); }
.logic-note { margin-top: 18px; }
@media (max-width: 700px) {
  .process-wrap { padding-right: 0; }
  .pdiag { display: none; }
  .pstep { grid-template-columns: 32px minmax(0, 1fr); }
  .pdot { width: 32px; height: 32px; font-size: 15px; }
  .pfill-track { left: 15px; }
  .pvia { padding-left: 46px; }
  .pvia::before { left: 9px; }
}
@media (prefers-reduced-motion: reduce) { .pfill, .pdot { transition: none; } }
html[lang="ru"] .pname { font-stretch: 92%; }
.lede + .hint { margin-top: 22px; }

/* ══ Type scale: one hierarchy for every section ══
   h2 section > h3 subsection > h4 item > body. Ratio ≈ 1.4 between levels. */
:root {
  --fs-h2: clamp(40px, 5.2vw, 68px);
  --fs-h3: clamp(28px, 3vw, 40px);
  --fs-h4: clamp(22px, 2vw, 28px);
  --fs-lede: clamp(19px, 1.5vw, 21px);
  --fs-body: 19px;
  --fs-small: 16px;
}
/* h2: every section title, including book and author */
main h2, main .book-title, .author h2 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.014em; }
.book-title .bt-sub { font-size: .46em; }

/* h3: subsections inside a section */
main .h3, main .group-name, main .compare-title, main .confirm-title {
  font-family: var(--display); font-size: var(--fs-h3); font-weight: 560; font-stretch: 84%;
  line-height: 1.1; letter-spacing: -0.008em; margin-bottom: 12px; color: inherit;
}
.fgroup-anc .group-name, .compare-title, .sec-d2 .confirm-title, [class*="sec-d"] .h3 { color: #fff; }

/* h4: named items inside a subsection */
main .pname, main .fp-name, main .subj-name, main .factor h3, main .thinkers h3,
main .op3 h4, main .compare .mode-caption h4, main .work .h3, main .book-side .h3 {
  font-family: var(--display); font-size: var(--fs-h4); line-height: 1.15; font-weight: 560;
}
main .fp-name { margin-bottom: 10px; }
main .thinkers h3 { font-stretch: 108%; font-weight: 520; }
main .factor h3 { font-stretch: 86%; }
html[lang="ru"] main .factor h3, html[lang="ru"] main .pname { font-stretch: 92%; }

/* Body sizes */
main .lede, .subj-intro, .ops-intro { font-size: var(--fs-lede); line-height: 1.55; }
main .pdef, main .fp-text, .subj-panel dd, .op3 p, .factor p, .thinkers p, .work p { font-size: 18px; line-height: 1.58; }
main .group-note, .bounds .muted, .confirm-intro { font-size: 17px; line-height: 1.55; }
.bounds-list dt { font-size: 18px; }
main .closing { font-size: clamp(20px, 1.8vw, 23px); }
.gap .definition, #gap .definition { font-size: clamp(22px, 2.2vw, 29px); }

/* Operating logics: three plain columns */
.ops-intro { margin-top: 0; max-width: 40em; }
.ops3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 28px; }
.op3 { padding-top: 16px; border-top: 2px solid var(--ink); }
.op3 h4 { margin-bottom: 8px; }
.op3 p { color: var(--ink-soft); }
@media (max-width: 900px) { .ops3 { grid-template-columns: minmax(0, 1fr); } }

/* Applied series: names only */
.branches-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.branches-inline li { font-family: var(--display); font-size: 16px; font-weight: 560; color: #fff; border: 1px solid rgba(139,179,189,.5); padding: 6px 12px; }

/* Surface / Structural: intro under the subsection title, then switch, drawing and caption */
.compare-intro { font-size: var(--fs-lede); line-height: 1.55; max-width: 40em; color: var(--on-patina); margin-bottom: 28px; }
.compare .hint { margin-bottom: 10px; }
.compare .mode-caption p { font-size: 18px; line-height: 1.58; }
.compare { padding-bottom: 0; }

/* ── Round 9 (9 Oct 2026): multi-paragraph elements, Anchor foundation, depth, context, collapse definitions ── */
.pdef + .pdef { margin-top: 12px; }
.pdef b, .fp-text b { font-weight: 600; color: var(--ink); }
.group-def { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--bronze-light); font-size: 17px; line-height: 1.55; color: var(--on-patina); max-width: 26em; }
.group-def b { color: #fff; font-weight: 600; }

.depth, .context { margin-top: clamp(64px, 8vw, 104px); padding-top: 40px; border-top: 1px solid rgba(139,179,189,.35); }
.depth .h3, .context .h3 { margin-bottom: 18px; }
.depth .cols-text p { font-size: 18px; line-height: 1.58; }
.ctx-intro { font-size: var(--fs-lede); line-height: 1.55; max-width: 40em; color: var(--on-patina); margin-bottom: 26px; }
.context .hint { color: var(--verdigris-text); }
.context .hint::before { color: var(--bronze-light); }
.ctx-items { border-top: 1px solid rgba(139,179,189,.45); max-width: 52em; }
.ctx-item { border-bottom: 1px solid rgba(139,179,189,.45); }
.ctx-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.ctx-item summary::-webkit-details-marker { display: none; }
.ctx-name { font-family: var(--display); font-weight: 560; font-size: clamp(20px, 1.8vw, 24px); color: #fff; }
.ctx-item summary:hover .ctx-name { text-decoration: underline; text-decoration-color: var(--bronze-light); text-underline-offset: 5px; }
.ctx-item .op-sign::before, .ctx-item .op-sign::after { background: var(--bronze-light); }
.ctx-item[open] .op-sign::after { transform: rotate(0deg); }
.ctx-item p { font-size: 18px; line-height: 1.58; color: var(--on-patina); padding: 0 0 22px; max-width: 46em; }
.ctx-item p b, .collapse-defs b, .collapse-after b { color: #fff; font-weight: 600; }
.ctx-note { margin-top: 24px; font-size: 17px; line-height: 1.55; color: var(--verdigris-text); max-width: 40em; }

.collapse-defs { margin-top: 32px; }
.collapse-defs p { font-size: 18px; line-height: 1.58; }
.formula-intro { margin-top: clamp(40px, 5vw, 64px); font-family: var(--display); font-size: 17px; color: var(--verdigris-text); }
.formula-intro + .formula { margin-top: 16px; }
.collapse-after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.collapse-after .h3 { margin-bottom: 16px; }
.collapse-after p { font-size: 18px; line-height: 1.58; color: var(--on-patina); }
.collapse-after p + p { margin-top: 1em; }
@media (max-width: 900px) { .collapse-after { grid-template-columns: minmax(0, 1fr); } }
.ctx-item p + p { margin-top: -10px; }

/* ── Round 10: foundations as four questions + comparison ── */
.thinkers .q-n { font-family: var(--display); font-size: 15px; color: var(--bronze-light); margin-bottom: 6px; }
.thinkers h3 .yr { font-weight: 400; font-size: 15px; color: var(--verdigris-text); margin-left: 6px; white-space: nowrap; }
.thinkers li b { color: #fff; font-weight: 600; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: 8px; }
.cmp > div { padding-top: 18px; border-top: 1px solid rgba(139,179,189,.45); }
.cmp h4 { font-family: var(--display); font-weight: 560; font-size: 21px; color: #fff; margin-bottom: 6px; }
.cmp-names { font-style: italic; color: var(--verdigris-text); font-size: 17px; margin-bottom: 8px; }
.cmp p { font-size: 18px; line-height: 1.58; color: var(--on-patina); }
.found-note b { color: #fff; font-weight: 600; }
.collapse-short { margin-top: 8px; }
.collapse-short p { font-size: 18px; line-height: 1.58; }
@media (max-width: 900px) { .cmp { grid-template-columns: minmax(0, 1fr); } }

/* ── Round 11: interactive Collapse Formula, collapsible Foundations ── */
.formula-i { margin: clamp(40px, 5vw, 64px) 0 clamp(40px, 5vw, 56px); }
.ffbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 22px 0 18px; border-top: 2px solid var(--bronze-light); }
.ffbtns button { font-family: var(--display); font-weight: 560; font-size: clamp(18px, 1.7vw, 22px); color: var(--on-patina); background: transparent; border: 1px solid rgba(240,238,233,.45); padding: 10px 16px; cursor: pointer; border-radius: 0; }
.ffbtns button:hover { border-color: var(--on-patina); }
.ffbtns button[aria-pressed="true"] { background: var(--on-patina); color: var(--patina); border-color: var(--on-patina); }
.ffbtns .link { font-family: var(--display); font-size: 24px; color: var(--bronze-light); }
.formula-i .hint { color: var(--verdigris-text); }
.formula-i .hint::before { color: var(--bronze-light); }
.factor-panel { padding: 20px 0 6px; border-top: 1px solid rgba(139,179,189,.35); max-width: 44em; }
.js .factor-panel[data-inactive] { display: none; }
.factor-panel .fp-count { color: var(--verdigris-text); font-family: var(--display); font-size: 14px; }
.factor-panel .fp-name { font-family: var(--display); font-weight: 560; font-size: clamp(22px, 2vw, 28px); color: #fff; margin: 4px 0 8px; }
.factor-panel .fp-text { font-size: 18px; line-height: 1.58; color: var(--on-patina); }
.factor-panel .next { color: #fff; border-bottom-color: var(--bronze-light); margin-top: 14px; }
.formula-i + .collapse-short { margin-top: 0; }

.fgrps { border-top: 1px solid rgba(139,179,189,.45); margin-top: 6px; }
.fgrp { border-bottom: 1px solid rgba(139,179,189,.45); }
.fgrp summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; }
.fgrp summary::-webkit-details-marker { display: none; }
.fgrp-head { display: flex; flex-direction: column; gap: 4px; }
main .fgrp-title { font-family: var(--display); font-weight: 560; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; color: #fff; margin: 0; }
.fgrp-names { font-style: italic; color: var(--verdigris-text); font-size: 17px; }
.fgrp summary:hover .fgrp-title { text-decoration: underline; text-decoration-color: var(--bronze-light); text-underline-offset: 6px; }
.fgrp .op-sign::before, .fgrp .op-sign::after { background: var(--bronze-light); }
.fgrp[open] .op-sign::after { transform: rotate(0deg); }
.fgrp-body { padding: 4px 0 32px; }
.fgrp-body .thinkers { margin-top: 0; }
.fgrp-body .thinkers h4 { font-family: var(--display); font-weight: 560; font-size: 21px; color: #fff; margin-bottom: 6px; }
.found-note { margin-top: 36px; }
#foundations .hint { color: var(--verdigris-text); margin-top: 22px; }
#foundations .hint::before { color: var(--bronze-light); }
