/* Alexandru Trofin, portfolio. One stylesheet for every page.
   Minimal on purpose: one typeface (Archivo) for all text, IBM Plex Mono only for addresses and code,
   one reading column, high-contrast text, and a single accent used sparingly. */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'), url(fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations'), url(fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --paper: #FCFCFA;
  --paper-2: #F2F1ED;
  --paper-3: #E7E5DF;
  --ink: #17191D;
  --ink-2: #4F555F;
  --ink-3: #6E747E;
  --rule: #E6E4DE;
  --rule-2: #CDCAC2;
  --accent: #E8590C;
  --accent-ink: #C2410C;
  --code-bg: #F2F1ED;
  --sel: rgba(232, 89, 12, .16);

  --f-sans: 'Archivo Variable', 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1120px;
  --measure: 720px;
  --gutter: clamp(20px, 5vw, 48px);
  --gap: clamp(20px, 3vw, 40px);
  --bar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121316;
    --paper-2: #1A1C20;
    --paper-3: #24272C;
    --ink: #E8E8E5;
    --ink-2: #A9AEB6;
    --ink-3: #8B9099;
    --rule: #26292E;
    --rule-2: #3B3F46;
    --accent: #FF7A3D;
    --accent-ink: #FF9361;
    --code-bg: #1A1C20;
    --sel: rgba(255, 122, 61, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121316;
  --paper-2: #1A1C20;
  --paper-3: #24272C;
  --ink: #E8E8E5;
  --ink-2: #A9AEB6;
  --ink-3: #8B9099;
  --rule: #26292E;
  --rule-2: #3B3F46;
  --accent: #FF7A3D;
  --accent-ink: #FF9361;
  --code-bg: #1A1C20;
  --sel: rgba(255, 122, 61, .28);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 20px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17.5px/1.7 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--sel); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.012em; }
p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
b, strong { font-weight: 600; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--rule-2); transition: text-decoration-color .2s, color .2s; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

code, .mono { font-family: var(--f-mono); }
code { font-size: .84em; background: var(--code-bg); padding: .1em .35em; border-radius: 3px; overflow-wrap: anywhere; }
pre code { padding: 0; background: none; font-size: inherit; border-radius: 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.nw { white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-left: auto; margin-right: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ the bar */

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .25s; }
.bar.scrolled { border-bottom-color: var(--rule); }
.bar-in { display: flex; align-items: center; gap: 28px; height: var(--bar-h); }
.mark { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font: 600 16px/1 var(--f-sans); text-decoration: none; white-space: nowrap; }
.mark-sq { display: inline-block; width: 9px; height: 9px; background: var(--accent); flex: none; }
.back { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font: 500 15.5px/1 var(--f-sans); text-decoration: none; white-space: nowrap; }
.back-arrow { display: inline-block; transition: transform .2s; }
.back:hover .back-arrow { transform: translateX(-3px); }

.nav { display: flex; gap: 28px; }
.nav a { padding: 8px 0; font: 500 15px/1 var(--f-sans); color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }

.theme { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--rule-2); border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink); transition: border-color .2s; }
.theme:hover { border-color: var(--ink-2); }
.theme span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
:root[data-theme="dark"] .theme span { transform: rotate(180deg); }
.menu-btn { display: none; }

/* language: the current one marked, then a link to the same page in the other */
.lang { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 3px; border: 1px solid var(--rule-2); border-radius: 18px; font: 600 12.5px/1 var(--f-sans); letter-spacing: .06em; }
.lang > span, .lang > a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 14px; }
.lang-cur { background: var(--paper-3); color: var(--ink); }
.lang-alt { color: var(--ink-3); text-decoration: none; transition: color .2s; }
.lang-alt:hover { color: var(--ink); }
.lang + .theme { margin-left: -16px; }
.back-short { display: none; }
.nav .nav-lang { display: none; }

/* ------------------------------------------------------------------ home: intro */

.intro { padding-top: clamp(56px, 12vh, 136px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.intro-name { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; font-weight: 650; letter-spacing: -.025em; }
.intro-role { margin-top: 14px; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.4; color: var(--ink-2); max-width: 30em; }
.intro-text { margin-top: 28px; font-size: clamp(17.5px, 1.3vw, 19px); line-height: 1.7; max-width: 36em; }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 34px; }
.btn-go {
  display: inline-flex; align-items: center; height: 46px; padding: 0 22px;
  background: var(--ink); color: var(--paper); border-radius: 6px;
  font: 600 15.5px/1 var(--f-sans); text-decoration: none; transition: opacity .2s;
}
.btn-go:hover { opacity: .86; }
.link-quiet { font-size: 16px; color: var(--ink-2); }
.link-quiet:hover { color: var(--ink); }
.intro-facts { border-top: 1px solid var(--rule); }
.intro-facts div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.intro-facts dt { font-size: 13.5px; line-height: 1.3; color: var(--ink-3); }
.intro-facts dd { margin-top: 4px; font-size: 16px; line-height: 1.5; }

/* ------------------------------------------------------------------ sections */

.sec { padding-top: clamp(88px, 11vw, 144px); }
.sec-head { max-width: var(--measure); }
.sec-title { font-size: clamp(27px, 2.6vw, 34px); line-height: 1.15; font-weight: 650; letter-spacing: -.02em; }
.sec-lede { margin-top: 12px; font-size: clamp(17.5px, 1.3vw, 19px); line-height: 1.65; color: var(--ink-2); }
.sub-title { margin-top: 64px; font-size: 21px; line-height: 1.3; }
.note { margin-top: 16px; font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }

/* case studies: the projects I created and launched, each with its own cover and the facts of its launch */
.cases { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 40px; }
.cases li { min-width: 0; }
.cases-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* an even number sits two by two */
.project { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .25s; }
.project:hover { border-color: var(--ink-3); box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .45); }
.project-cover { position: relative; flex: none; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .project-cover img { transform: scale(1.025); }
.project-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.project-name { font-size: 25px; line-height: 1.2; font-weight: 650; letter-spacing: -.018em; transition: color .2s; }
.project-line { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.project-tech { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.project-tech i { font-style: normal; padding: 0 .45em; }
.project-stats { margin-top: auto; padding-top: 6px; }
.project-stats div { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.45; }
.project-stats dt { color: var(--ink-3); }
.project-stats dd { font-weight: 550; }
.project-more { padding-top: 12px; border-top: 1px solid var(--rule); font-size: 15px; font-weight: 600; }
.project-more .arr { display: inline-block; transition: transform .2s; }
.project:hover .project-name { color: var(--accent-ink); }
.project:hover .project-more .arr { transform: translateX(4px); }
.sub-lede { margin-top: 8px; max-width: var(--measure); font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.cols-2x2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px var(--gap); margin-top: 36px; }
.build .item p { font-size: 16px; }

/* owner powers */
.table-wrap { margin-top: 32px; }
.powers { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.powers th, .powers td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); }
.powers thead th { padding-top: 0; padding-bottom: 12px; font-size: 15.5px; font-weight: 600; border-bottom: 1px solid var(--rule-2); }
.powers thead th a { text-decoration: none; }
.powers thead th a:hover { color: var(--accent-ink); }
.powers tbody th { width: 28%; font-weight: 500; }
.powers td { width: 24%; }
.powers td b { display: block; font-weight: 600; }
.powers td span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--ink-2); }

/* items in columns: regulation, services */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); margin-top: 36px; }
.item { padding-top: 22px; border-top: 1px solid var(--rule-2); }
.item h3 { font-size: 19px; line-height: 1.35; }
.item p { margin-top: 10px; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.plain { list-style: none; margin-top: 16px; }
.plain li { position: relative; padding: 9px 0 9px 18px; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.55; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }

.laws { margin-top: 20px; max-width: 920px; }
.laws > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--rule); }
.laws > div:last-child { border-bottom: 1px solid var(--rule); }
.laws dt { font-size: 18px; font-weight: 650; }
.laws dd { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.laws dd b { color: var(--ink); }

/* background and skills */
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 6vw, 88px); margin-top: 32px; }
.col-title { font-size: 15px; font-weight: 600; color: var(--ink-3); padding-bottom: 12px; border-bottom: 1px solid var(--rule-2); }
.timeline > div, .skills > div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.timeline > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 20px; }
.timeline dt { font-size: 14.5px; line-height: 1.65; color: var(--ink-3); }
.timeline dd { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.timeline dd b { color: var(--ink); }
.skills dt { font-size: 16px; font-weight: 600; }
.skills dd { margin-top: 2px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }

/* contact */
.contact { margin-top: 28px; }
.contact-mail { font-size: clamp(22px, 3vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: -.015em; text-decoration: none; overflow-wrap: anywhere; border-bottom: 2px solid var(--rule-2); transition: border-color .2s; }
.contact-mail:hover { border-bottom-color: var(--accent); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 24px; font-size: 16px; color: var(--ink-2); }
.contact-row a { color: var(--ink); font-weight: 500; }
.copy { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: transparent; color: var(--ink-2); font: 500 13.5px/1 var(--f-sans); cursor: pointer; transition: border-color .2s, color .2s; }
.copy:hover { border-color: var(--ink-2); color: var(--ink); }
.copy.done { border-color: var(--accent); color: var(--accent-ink); }

/* footer */
.foot { margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--rule); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.6fr); gap: var(--gap); padding-top: 24px; padding-bottom: 48px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.foot-name { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ case study: head */

.case-head { padding-top: clamp(48px, 9vh, 104px); }
.case-title { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.04; font-weight: 650; letter-spacing: -.025em; }
.case-lede { margin-top: 18px; max-width: 34em; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); }
.case-dateline { margin-top: 18px; font-size: 14.5px; color: var(--ink-3); }
.case-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); margin-top: 40px; border-top: 1px solid var(--rule); }
.case-facts > div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.case-facts dt { font-size: 13.5px; color: var(--ink-3); }
.case-facts dd { margin-top: 4px; font-size: 16px; line-height: 1.5; }
.case-facts dd small { display: block; margin-top: 2px; font-size: 14.5px; color: var(--ink-2); }

/* hook permission strip */
.flags { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--f-mono); color: var(--ink-2); }
.flags-bits { display: inline-grid; grid-template-columns: repeat(14, 9px); gap: 2px; }
.flags-bits i { display: block; width: 9px; height: 15px; border-radius: 1px; box-shadow: inset 0 0 0 1px var(--rule-2); }
.flags-bits i.on { background: var(--accent); box-shadow: none; }

/* ------------------------------------------------------------------ case study: figures */

.fig { margin-top: clamp(56px, 7vw, 88px); }
.fig-frame { padding: clamp(20px, 3vw, 36px); border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.fig figcaption { margin-top: 14px; max-width: var(--measure); font-size: 14.5px; line-height: 1.6; color: var(--ink-3); }
.fig figcaption b { color: var(--ink-2); font-weight: 600; }

/* ------------------------------------------------------------------ case study: sections */

.cs { padding-top: clamp(64px, 8vw, 104px); }
.cs-in { max-width: var(--measure); }
.cs-wide .cs-in { max-width: none; }
.cs-title { font-size: clamp(25px, 2.3vw, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -.018em; margin-bottom: 20px; }
.cs-wide .cs-title { max-width: var(--measure); }

.prose p { font-size: 17.5px; line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.prose .big { font-size: clamp(18.5px, 1.4vw, 20px); line-height: 1.7; }

.built { list-style: none; counter-reset: built; }
.built li { position: relative; padding: 16px 0 16px 40px; border-top: 1px solid var(--rule); }
.built li:last-child { border-bottom: 1px solid var(--rule); }
.built li::before { counter-increment: built; content: counter(built); position: absolute; left: 0; top: 17px; font: 500 13px/1.6 var(--f-mono); color: var(--ink-3); }
.built strong { display: block; font-size: 17px; line-height: 1.4; }
.built p { margin-top: 4px; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); }
.steps li { padding: 16px 0 20px; border-top: 1px solid var(--rule); }
.steps b { display: flex; align-items: baseline; gap: 10px; font-size: 17px; line-height: 1.35; }
.steps b em { font-style: normal; font: 500 13px/1 var(--f-mono); color: var(--accent-ink); }
.steps p { margin-top: 6px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }

/* the contract review: plain English and developer detail, side by side under each topic */
.review-key { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); padding-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.rv { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.rv-topic { font-size: 18px; line-height: 1.35; }
.rv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); margin-top: 10px; }
.rv-plain { font-size: 16.5px; line-height: 1.7; }
.rv-plain p + p, .rv-dev p + p { margin-top: .7em; }
.rv-dev { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.rv-dev-label { display: none; }
.rv-dev code { font-size: 13px; }
.rv-dev pre, .code {
  margin: 12px 0 0; padding: 14px 16px; background: var(--code-bg); color: var(--ink); border-radius: 8px;
  font: 400 13px/1.65 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
}

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); margin-bottom: 32px; }
.checks > div { padding: 18px 0 20px; border-top: 1px solid var(--rule-2); }
.checks b { display: block; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; font-weight: 650; letter-spacing: -.02em; }
.checks span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.cs-wide .prose { max-width: var(--measure); }

.measure-wrap { margin-top: 36px; max-width: 880px; }
.measure { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.measure th, .measure td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; font-weight: 400; }
.measure thead th { padding-top: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.measure td.r, .measure th.r { text-align: right; padding-right: 0; padding-left: 16px; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.measure td.r { font-family: var(--f-mono); font-size: 14.5px; }
.measure caption { caption-side: bottom; text-align: left; padding-top: 12px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.measure .neg { color: var(--ink-2); }
.measure .pos { color: var(--accent-ink); }

.limits { list-style: none; counter-reset: lim; }
.limits li { position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--rule); font-size: 16.5px; line-height: 1.7; }
.limits li:last-child { border-bottom: 1px solid var(--rule); }
.limits li::before { counter-increment: lim; content: counter(lim); position: absolute; left: 0; top: 15px; font: 500 13px/1.7 var(--f-mono); color: var(--ink-3); }

.status { padding: 18px 22px; background: var(--paper-2); border-radius: 10px; }
.status-when { font-size: 14px; color: var(--ink-3); }
.status ul { list-style: none; margin-top: 8px; }
.status li { position: relative; padding: 6px 0 6px 18px; font-size: 16.5px; line-height: 1.65; }
.status li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.ctable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.ctable th, .ctable td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.ctable thead th { padding-top: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.c-name { font-weight: 600; }
.c-name small { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 400; color: var(--ink-2); }
.c-addr { font: 400 13.5px/1.6 var(--f-mono); overflow-wrap: anywhere; word-break: break-all; }
.c-addr .copy { margin-left: 8px; vertical-align: 1px; }
.c-link a { font-weight: 600; white-space: nowrap; }
.c-note { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); max-width: 24em; }
.source-line { margin-top: 18px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: var(--measure); }

.case-end { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); margin-top: clamp(80px, 10vw, 128px); }
.case-end a { display: block; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; font-size: clamp(20px, 2vw, 24px); font-weight: 600; letter-spacing: -.01em; transition: border-color .2s; }
.case-end a:hover { border-color: var(--ink-3); }
.case-end a:last-child { text-align: right; }
.case-end small { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }

/* ------------------------------------------------------------------ widgets shared */

.w-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.w-label { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink); font: 600 14.5px/1 var(--f-sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { border-color: var(--rule-2); color: var(--ink-2); }
.btn-quiet:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: progress; }
.btn:disabled:hover { background: transparent; color: var(--ink); }
.seg { display: inline-flex; margin-top: 8px; border: 1px solid var(--rule-2); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 9px 18px; font: 600 14.5px/1 var(--f-sans); cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--rule-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.range { display: grid; gap: 8px; max-width: 360px; }
.range output { font: 500 14px/1 var(--f-mono); color: var(--ink); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--rule-2); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--rule-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: var(--accent); border: 0; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 0; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 15.5px; line-height: 1.45; cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--ink-2); border-radius: 4px; display: grid; place-items: center; cursor: pointer; background: transparent; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 8px; height: 8px; border-radius: 1px; background: var(--paper); }
.check input:disabled { opacity: .35; cursor: not-allowed; }
.check input:disabled + span { opacity: .45; }

/* the fee rule classifier (Duelis) */
.rule-box { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); }
.rule-inputs { display: grid; gap: 22px; align-content: start; }
.rule-out { border-left: 1px solid var(--rule); padding-left: clamp(20px, 3vw, 40px); }
.rule-verdict { margin-top: 4px; font-size: clamp(34px, 3.6vw, 46px); line-height: 1.1; font-weight: 650; letter-spacing: -.02em; }
.rule-who { margin-top: 14px; font-size: 17px; font-weight: 600; }
.rule-why { margin-top: 6px; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 30em; }
.rule-path { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.rule-path span { font: 500 12.5px/1 var(--f-mono); padding: 7px 9px; border: 1px solid var(--rule-2); border-radius: 5px; color: var(--ink-2); }
.rule-path span.hit { border-color: var(--accent); color: var(--accent-ink); }
.rule-plus { margin-top: 16px; font-size: 14.5px; color: var(--ink-3); }
.scale { margin-top: 18px; max-width: 420px; }
.scale-track { position: relative; height: 8px; border-radius: 4px; background: var(--paper-3); }
.scale-range { position: absolute; top: 0; bottom: 0; left: 17.6%; width: 1.2%; border-radius: 4px; background: var(--accent); transition: left .35s ease, width .35s ease; }
.scale-track i { position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--ink-3); }
.scale-track .scale-floor { left: 18.18%; }
.scale-track .scale-cap { left: 90.91%; }
.scale-legend { position: relative; height: 16px; margin-top: 8px; font: 400 12.5px/1 var(--f-mono); color: var(--ink-3); }
.scale-legend span { position: absolute; top: 0; white-space: nowrap; }
.scale-legend span:nth-child(2) { left: 18.18%; transform: translateX(-50%); }
.scale-legend span:nth-child(3) { left: 90.91%; transform: translateX(-50%); }

.feebar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; }
.feebar > div + div { border-left: 2px solid var(--paper); }
.feebar-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; font-size: 14.5px; line-height: 1.5; }
.feebar-legend-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feebar-legend b { display: block; font-size: 20px; font-weight: 650; }
.feebar-legend span { color: var(--ink-2); }

/* the daily duel (Duelis) */
.duel { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 5fr) minmax(0, 2.2fr); gap: var(--gap); align-items: start; }
.duel-cells { display: grid; grid-template-columns: repeat(3, 24px); gap: 6px; margin-top: 14px; }
.duel-cells i { display: block; width: 24px; height: 24px; border-radius: 4px; background: var(--ink); }
.duel-cells i.champ { background: var(--accent); }
.duel-cells-s { grid-template-columns: repeat(2, 24px); }
.duel-cells-s i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.duel-note { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.duel-steps { list-style: none; counter-reset: ds; }
.duel-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; row-gap: 3px; padding: 12px 0 14px; border-top: 1px solid var(--rule); }
.duel-steps li::before { counter-increment: ds; content: counter(ds); grid-row: 1 / span 3; font: 500 13px/1.6 var(--f-mono); color: var(--accent-ink); }
.duel-steps b { font: 500 14px/1.45 var(--f-mono); }
.duel-steps span { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.duel-steps em { font-style: normal; font: 400 12.5px/1.4 var(--f-mono); color: var(--ink-3); }

/* inline figures inside a section */
.fig-inline { margin-top: 40px; padding: clamp(18px, 2.6vw, 30px); border: 1px solid var(--rule); border-radius: 10px; }
.fig-cap { margin-top: 18px; font-size: 14.5px; line-height: 1.6; color: var(--ink-3); max-width: var(--measure); }
.fig-cap b { color: var(--ink-2); font-weight: 600; margin-right: 4px; }

/* perceptron (Engram) */
.mind { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.mind-svg { width: 100%; height: auto; }
.mind-svg text { font-family: var(--f-mono); font-size: 14px; fill: var(--ink-2); }
.mind-svg .hd { font-family: var(--f-sans); font-size: 13px; font-weight: 600; fill: var(--ink-3); }
.mind-svg .w { stroke: var(--rule-2); stroke-width: .7; transition: stroke .2s, opacity .2s; }
.mind-svg.focus .w { opacity: .25; }
.mind-svg .w.hot { stroke: var(--accent); opacity: 1; stroke-width: 1.2; }
.mind-svg .w.glow { stroke: var(--accent); opacity: .9; }
.mind-svg .in { cursor: pointer; }
.mind-svg .in circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill .2s; }
.mind-svg .in.hot circle, .mind-svg .in:focus circle { fill: var(--accent); stroke: var(--accent); }
.mind-svg .in.hot text, .mind-svg .in:focus text { fill: var(--ink); }
.mind-svg .in:focus { outline: none; }
.mind-svg .hid circle { fill: var(--ink); }
.mind-svg .out circle { fill: var(--accent); }
.mind-svg .t-acc { fill: var(--accent-ink); }
.mind-svg .t-ink { fill: var(--ink); }
.mind-svg .arrow { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.mind-card { padding-top: 4px; }
.mind-card h3 { font-size: 20px; line-height: 1.3; }
.mind-card .mono { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--accent-ink); }
.mind-card p { margin-top: 10px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.mind-formula { margin-top: 14px; }
.mind-formula code { font-size: 13px; padding: 7px 9px; display: inline-block; }
.mind-hint { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.chips { display: none; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chip { padding: 7px 10px; border: 1px solid var(--rule-2); border-radius: 5px; background: transparent; font: 500 13px/1 var(--f-mono); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #17191D; }

/* a trade becomes a memory (Engram) */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1.25fr); align-items: start; }
.flow-step { padding-top: 12px; border-top: 2px solid var(--ink-2); }
.flow-step b { display: block; margin-top: 8px; font-size: 15.5px; line-height: 1.35; }
.flow-step p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.flow-k { font: 500 12px/1 var(--f-mono); color: var(--accent-ink); }
.flow-arrow { position: relative; height: 2px; }
.flow-arrow::after { content: ""; position: absolute; right: 6px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--ink-2); border-right: 2px solid var(--ink-2); transform: rotate(45deg); }
.ring { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 12px; max-width: 220px; }
.ring i { display: block; height: 20px; border-radius: 2px; background: var(--ink); animation: ring 4.8s steps(1) infinite; }
.ring i:nth-child(1) { animation-delay: 0s; } .ring i:nth-child(2) { animation-delay: .6s; } .ring i:nth-child(3) { animation-delay: 1.2s; } .ring i:nth-child(4) { animation-delay: 1.8s; }
.ring i:nth-child(5) { animation-delay: 2.4s; } .ring i:nth-child(6) { animation-delay: 3s; } .ring i:nth-child(7) { animation-delay: 3.6s; } .ring i:nth-child(8) { animation-delay: 4.2s; }
@keyframes ring { 0% { background: var(--accent); } 12.5% { background: var(--ink); } }
.chain { display: flex; align-items: center; margin-top: 12px; }
.chain i { display: block; width: 24px; height: 20px; border: 1px solid var(--rule-2); border-radius: 2px; background: var(--paper-2); }
.chain i + i { margin-left: 12px; position: relative; }
.chain i + i::before { content: ""; position: absolute; left: -13px; top: 9px; width: 12px; height: 1px; background: var(--ink-3); }
.chain i.ck { background: var(--accent); border-color: var(--accent); }

/* timelines (Engram rounds, Qubitensor day) */
.tl { position: relative; }
.tl-axis { position: relative; height: 22px; margin: 0 0 6px; border-bottom: 1px solid var(--ink-3); }
.tl-axis span { position: absolute; bottom: 6px; font: 400 12px/1 var(--f-mono); color: var(--ink-3); white-space: nowrap; }
.tl-axis span::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 1px; height: 7px; background: var(--ink-3); }
.tl-axis span.end { transform: translateX(-100%); }
.tl-axis span.end::after { left: auto; right: 0; }
.tl-r { padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.tl-track { position: relative; height: 10px; }
.tl-bar { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 3px; }
.tl-bar.b-ink { background: var(--ink); }
.tl-bar.b-acc { background: var(--accent); }
.tl-bar.b-soft { background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule-2); }
.tl-l { margin-top: 8px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); max-width: 46em; }
.tl-l b { color: var(--ink); margin-right: 4px; }

/* Max-Cut playground (Qubitensor) */
.mc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.mc-graph { position: relative; min-width: 0; }
.mc-cols { position: relative; height: 18px; margin-bottom: 2px; }
.mc-cols span { position: absolute; top: 0; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.mc-cols span:first-child { left: 28.85%; }
.mc-cols span:last-child { left: 71.15%; }
.mc-svg { width: 100%; height: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.mc-svg .e { stroke: var(--rule-2); opacity: .85; }
.mc-svg .e.cut { stroke: var(--accent); opacity: .95; }
.mc-svg .n { cursor: pointer; }
.mc-svg .n .hit { fill: transparent; stroke: none; }
.mc-svg .n .dot { stroke: var(--ink); stroke-width: 1.4; transition: fill .2s; }
.mc-svg .n.s0 .dot { fill: var(--paper); }
.mc-svg .n.s1 .dot { fill: var(--ink); }
.mc-svg .n.fixed { cursor: not-allowed; }
.mc-svg .n.fixed .dot { stroke-dasharray: 2 2; }
.mc-svg .n:hover .dot { stroke: var(--accent); stroke-width: 2.4; }
.mc-panel { min-width: 0; padding-top: 6px; }
.mc-score { margin-top: 4px; font-size: clamp(40px, 4.4vw, 56px); line-height: 1; font-weight: 650; letter-spacing: -.025em; }
.mc-score small { margin-left: 10px; font: 400 15px var(--f-mono); letter-spacing: 0; color: var(--ink-3); }
.mc-bar { position: relative; height: 10px; margin-top: 18px; border-radius: 5px; background: var(--paper-3); }
.mc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ink); transition: width .25s; }
.mc-bar i.over { background: var(--accent); }
.mc-bar em { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--accent); }
.mc-bar-legend { display: flex; justify-content: space-between; margin-top: 8px; font: 400 12.5px/1.4 var(--f-mono); color: var(--ink-3); }
.mc-state { margin-top: 16px; font-size: 16.5px; line-height: 1.6; min-height: 3.2em; }
.mc .w-controls { margin-top: 20px; }
.mc-bytes { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-3); overflow-wrap: anywhere; }
.mc-bytes code { font-size: 12.5px; }

/* the circuit (Qubitensor) */
.circ-wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.circ { width: 100%; height: auto; }
.circ .wire { stroke: var(--ink-3); stroke-width: 1.2; }
.circ .gate { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.circ .gtext { font: 600 15px var(--f-sans); fill: var(--ink); }
.circ .qlabel { font: 400 14px var(--f-mono); fill: var(--ink-3); }
.circ .cz { stroke: var(--ink); stroke-width: 1.6; }
.circ .czd { fill: var(--ink); }
.circ .brk { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 5 4; }
.circ .blabel { font: 500 13px var(--f-mono); fill: var(--accent-ink); }
.circ .meter { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.4; }
.circ-key p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.circ-key p + p { margin-top: 12px; }
.circ-key b { color: var(--ink); margin-right: 4px; }

/* brand and website gallery */
.design-note { max-width: var(--measure); }
.spec { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 var(--gap); margin-top: 24px; max-width: 940px; border-top: 1px solid var(--rule); }
.spec > div { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.spec dt { font-size: 13.5px; color: var(--ink-3); }
.spec dd { margin-top: 8px; font-size: 15px; line-height: 1.6; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sw { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sw i { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .4); }
.sw code { padding: 0; background: none; font-size: 12.5px; color: var(--ink-3); }
.ty { display: block; color: var(--ink-2); }
.ty b { color: var(--ink); }
.gal-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }
.spec + .gal-row { margin-top: 32px; }
.gi { min-width: 0; }
.gi a, .gi .gi-frame { display: block; overflow: hidden; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); transition: border-color .2s; }
.gi a:hover { border-color: var(--ink-3); }
.gi img { display: block; width: 100%; height: auto; }
.gi figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* Nookleus, Fig. 1: a hook read the way the FieldGuide reads it */
.dna { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.dna-in { display: grid; gap: 10px; align-content: start; min-width: 0; }
.dna-in .w-label { margin-top: 12px; }
.dna-in .w-label:first-child { margin-top: 0; }
.dna-in .w-label code { margin-left: 6px; }
.dna-pre, .dna-size { flex-wrap: wrap; margin-top: 0; justify-self: start; }
.dna-bits { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.dna-bit { height: 44px; padding: 0; border: 1px solid var(--rule-2); border-radius: 5px; background: transparent; color: var(--ink-3); font: 500 12px/1 var(--f-mono); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.dna-bit:hover { border-color: var(--ink-2); color: var(--ink); }
.dna-bit[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #15171A; }
.dna-names { min-height: 3em; font: 400 13px/1.5 var(--f-mono); color: var(--ink-2); overflow-wrap: anywhere; }
.dna-out { min-width: 0; border-left: 1px solid var(--rule); padding-left: clamp(20px, 3vw, 40px); }
.dna-fams { list-style: none; margin-top: 10px; border-top: 1px solid var(--rule); }
.dna-fams li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink-3); transition: color .2s; }
.dna-fams li p { font-size: 14.5px; line-height: 1.35; }
.dna-fams li b { display: block; font-weight: 600; }
.dna-fams li small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.dna-fams li.on { color: var(--ink); }
.dna-strand b { font: 600 13.5px/1.35 var(--f-mono); letter-spacing: .02em; }
.dna-fams li.on .dna-strand b { color: var(--accent-ink); }
.dna-score-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; margin-top: 18px; align-items: end; }
.dna-score { margin-top: 4px; font-size: clamp(40px, 4.4vw, 56px); line-height: 1; font-weight: 650; letter-spacing: -.025em; }
.dna-score small { margin-left: 10px; font: 400 15px var(--f-mono); letter-spacing: 0; color: var(--ink-3); }
.dna-family { margin-top: 8px; }
.dna-why { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.dna-note { margin-top: 10px; font-size: 14.5px; line-height: 1.55; }

/* Nookleus, Fig. 2: the six strands */
.strands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px clamp(20px, 3vw, 36px); }
.strand { min-width: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.strand-name b { display: block; font: 650 15px/1.2 var(--f-mono); letter-spacing: .04em; }
.strand-name small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--ink-3); }
.strand-meter { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; margin: 10px 0; }
.strand-meter i { display: block; height: 10px; border-radius: 2px; background: var(--paper-3); }
.strand-meter i.on { background: var(--accent); }
.strand-per { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.strand-per small { display: block; margin-top: 4px; font: 500 13px var(--f-mono); color: var(--ink); }

/* text that stays in the reading column inside a full-width section */
.col-measure { max-width: var(--measure); }

/* a second fee bar under the first, for a share's own split */
.feebar-sub { margin-top: 28px; height: 18px; }
.feebar-legend-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1023px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--bar-h); flex-direction: column; gap: 0; padding: 4px max(var(--gutter), env(safe-area-inset-right, 0px)) 16px max(var(--gutter), env(safe-area-inset-left, 0px)); background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; }
  .nav a { padding: 15px 0; font-size: 19px; font-weight: 600; color: var(--ink); border-top: 1px solid var(--rule); }
  .nav a:first-child { border-top: 0; }
  .nav a[aria-current] { text-decoration: none; color: var(--accent-ink); }
  .menu-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: 6px; background: transparent; font: 600 14.5px/1 var(--f-sans); cursor: pointer; }
  .intro-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .intro-facts { max-width: var(--measure); }
  .cases { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .project { flex-direction: row; }
  /* side by side the frame is taller than the cover: the whole cover shows, set on its own edge colour */
  .project-cover { flex: 0 0 42%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--rule); background: var(--mat, var(--paper-2)); }
  .project-cover img { object-fit: contain; object-position: center var(--pos, center); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mind, .mc { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); row-gap: 26px; }
  .flow-arrow:nth-of-type(4) { display: none; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-axis .hide-m { display: none; }
  .dna { grid-template-columns: minmax(0, 1fr); }
  .dna-out { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 20px; }
  .strands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feebar-legend-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 859px) {
  :root { --bar-h: 58px; }
  .bar-in { gap: 12px; }
  .lang { padding: 0; }
  .lang > .lang-cur { display: none; }
  .lang > a { min-width: 42px; height: 34px; border-radius: 17px; }
  .lang + .theme { margin-left: -4px; }
  .cols-3 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cols-2x2 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .rule-box { grid-template-columns: minmax(0, 1fr); }
  .rule-out { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 20px; }
  .duel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duel-steps { grid-column: 1 / -1; grid-row: 2; }
  .circ-wrap { grid-template-columns: minmax(0, 1fr); }
  .feebar-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feebar-legend-3 { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 719px) {
  body { font-size: 17px; }
  .strands { grid-template-columns: minmax(0, 1fr); }
  .dna-bits { gap: 3px; }
  .dna-bit { height: 38px; font-size: 10.5px; }
  .dna-pre, .dna-size { border: 0; border-radius: 0; overflow: visible; gap: 6px; }
  .dna-pre button, .dna-size button, .dna-pre button + button, .dna-size button + button { border: 1px solid var(--rule-2); border-radius: 6px; padding: 9px 13px; }
  .feebar-legend-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { flex-direction: column; }
  .project-cover { flex: none; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--rule); }
  .project-cover img { object-fit: cover; }
  .project-body { padding: 18px 18px 20px; }
  .project-name { font-size: 23px; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .gal-row { flex-direction: column; gap: 22px; }
  .gi { flex: none !important; width: 100%; }
  .gi.phone { max-width: 260px; }
  .chips { display: flex; }
  .mind-svg text { display: none; }
  .flow { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .flow-arrow { display: none; }
  .tl-axis span { font-size: 10.5px; }
  .tl-axis .hide-s { display: none; }


  .powers thead { display: none; }
  .powers, .powers tbody, .powers tr, .powers th, .powers td { display: block; width: 100%; }
  .powers tr { padding: 16px 0 8px; border-bottom: 1px solid var(--rule); }
  .powers tbody th { width: 100%; padding: 0 0 8px; border: 0; font-weight: 600; }
  .powers td { border: 0; padding: 6px 0 6px 100px; position: relative; }
  .powers td::before { content: attr(data-p); position: absolute; left: 0; top: 6px; font-size: 14px; color: var(--ink-3); }

  .laws > div { grid-template-columns: minmax(0, 1fr); }
  .timeline > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .case-facts { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .review-key { display: none; }
  .rv-cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rv-dev { padding: 12px 14px; background: var(--paper-2); border-radius: 8px; }
  .rv-dev-label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
  .rv-dev pre { background: var(--paper); }
  .ctable thead { display: none; }
  .ctable, .ctable tbody, .ctable tr, .ctable td { display: block; width: 100%; }
  .ctable tr { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .ctable td { border: 0; padding: 3px 0; }
  .c-addr .copy { margin: 6px 0 0; display: flex; width: max-content; }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .case-end { grid-template-columns: minmax(0, 1fr); }
  .case-end a:last-child { text-align: left; }
  .measure { font-size: 14.5px; }
  .measure td.r { font-size: 13px; white-space: normal; }
  .measure th, .measure td { padding-right: 8px; }
  .fig-frame { padding: 16px; }
  .fig-inline { padding: 16px; }
}

@media (max-width: 420px) {
  .back { font-size: 15px; }
}

@media (max-width: 379px) {
  .back-long { display: none; }
  .back-short { display: inline; }
}

@media (max-width: 359px) {
  .bar .lang { display: none; }
  .nav .nav-lang { display: block; }
}

/* ------------------------------------------------------------------ print */

@media print {
  :root { --paper: #fff; --paper-2: #f4f4f4; --ink: #000; --ink-2: #333; --ink-3: #555; --rule: #ddd; }
  .bar, .skip, .copy, .theme, .menu-btn, .w-controls, .case-end { display: none !important; }
  body { background: #fff; }
  .sec, .cs { padding-top: 32px; }
  a { text-decoration: none; }
}
