/* FRANZAI / apfel — implementation layer. Load after brand-base.css.
   1 Tokens  2 Editorial layout  3 Hero  4 Content  5 Terminals  6 Mobile
   The source brand banner and logo deliberately inherit their original CSS. */
:root{--accent:var(--color-orange);--ink:var(--color-ink);--paper:#fff;--rule:#bfc0bf;--gutter:clamp(20px,4.5vw,64px);--content:1400px;--font-h2:clamp(36px,5.6vw,80px);--font-h3:clamp(26px,2.7vw,38px)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-size:18px;line-height:1.5}svg,img{max-width:100%}a{color:inherit;text-underline-offset:4px}:focus-visible{outline:3px solid var(--accent);outline-offset:5px}
.container{width:min(calc(100% - var(--gutter)*2),var(--content));max-width:var(--content);margin-inline:auto;padding-inline:0}
/* Banner remains the source component: do not resize its logo or redraw it. */
.section{padding-block:clamp(56px,7vw,104px);border-top:1px solid var(--color-hairline)}.section--alt{background:#fff}.section-header{max-width:none;margin-bottom:40px;text-align:left}.section-header h2{font-size:var(--font-h2);line-height:1.02;font-weight:850;letter-spacing:-.045em;margin:0 0 20px;max-width:1200px;text-wrap:balance}.section-header p{font-size:clamp(18px,1.8vw,25px);line-height:1.4;max-width:1040px;margin:0}.accent-line{display:block;color:var(--accent)}h1,h2,h3,h4{font-family:var(--font-heading);font-weight:800}h3{letter-spacing:-.035em;line-height:1.12}.stack{gap:20px}.btn{min-height:44px;box-shadow:none;border-radius:4px;font-weight:750}.btn--primary{background:var(--accent);border-color:var(--accent)}
/* Hero: left editorial text, right substantial install terminal. */
.home-hero{padding-block:36px 56px}.home-hero__grid{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center}.home-hero__title{font-size:clamp(88px,12.4vw,180px);font-weight:900;letter-spacing:-.075em;line-height:.87;margin:14px 0 22px}.home-hero__subtitle{font-size:clamp(38px,4.6vw,66px);line-height:1.02;letter-spacing:-.045em;color:var(--accent);margin:0 0 24px}.home-hero__lead{font-size:20px;line-height:1.45;margin:0 0 28px}.eyebrow{color:var(--color-orange-text);font-weight:750}.home-hero__side{min-width:0}.hero-prompt{font:800 clamp(70px,8vw,120px)/1 monospace;color:var(--accent);padding:28px 32px}.hero-install__row{padding:24px 28px;gap:16px}.hero-install .home-apfel__code{font-size:clamp(15px,1.8vw,26px);padding:0;min-width:0}.hero-tags{display:flex;gap:0;border-block:1px solid var(--ink);list-style:none;padding:12px 0;flex-wrap:wrap}.hero-tags .tag{background:none;border:0;border-radius:0;padding:0 16px;font-weight:750}.hero-tags .tag+ .tag{border-left:1px solid var(--ink)}.home-hero__facts{font-size:16px;margin-top:18px;overflow-wrap:anywhere}.privacy-strip{background:var(--accent);color:white;border:0;padding:22px 0;font-size:clamp(17px,2vw,25px);font-weight:800}.privacy-strip p{margin:0}
/* Open ruled editorial grids, no dashboard chrome. */
.home-trust__stats{gap:0;border-block:1px solid var(--ink);padding:30px 0}.stat-card{border:0;border-radius:0;background:none;padding:24px}.stat-card__value{font-size:clamp(64px,7vw,104px);font-weight:850;color:var(--accent);line-height:1.05;letter-spacing:-.055em}.stat-card__label{font-size:27px;font-weight:800}.stat-card__desc{font-size:18px;color:var(--ink)}.home-trust__stats .stat-card+ .stat-card{border-left:1px solid var(--rule)}.model-spec{background:var(--color-surface-alt);border:0;border-radius:0;padding:32px;margin-top:40px}.spec-grid{gap:0}.spec-item{border-top:1px solid var(--rule);padding:24px}.spec-val{font-size:27px;color:var(--ink);font-weight:800}
.modes-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;align-items:start;border-top:1px solid var(--ink);padding-top:28px}
/* CRITICAL FIX: independent normal flow. Never use flex:1, margin-top:auto,
   justify-content:space-between, a shared terminal row, or fixed paragraph heights. */
.mode-card.programme-card{display:block;align-self:start;height:auto;min-height:0;padding:0 24px;background:none;border:0;border-radius:0;box-shadow:none}
.mode-card:first-child{padding-left:0}.mode-card:last-child{padding-right:0}.mode-card+.mode-card{border-left:1px solid var(--rule)}.mode-icon.programme-icon{width:auto;height:auto;padding:0;background:none;border:0;color:var(--accent);font:800 56px/1 monospace;margin:0 0 14px}.mode-card h3{font-size:clamp(28px,2.8vw,40px);margin:0 0 14px}.mode-card>p{font-size:18px;line-height:1.5;margin:0;min-height:0;height:auto}.mode-card .mode-terminal{margin:20px 0 0;align-self:auto;flex:none;height:auto;min-height:0}
.mcp-grid,.hiw-grid,.api-grid{gap:48px;align-items:start}.mcp-info h3{color:var(--color-orange-text)}.mcp-features{margin-top:20px}.hiw-text h3{font-size:32px}.hiw-diagram .layer{border-radius:0}.hiw-diagram .layer.apfel{background:var(--accent);color:#fff;border:0}.hiw-diagram .layer.apfel .layer-label{color:white}.hiw-spec{gap:0}.hiw-spec-item{border-top:1px solid var(--rule)}
.privacy{background:var(--ink);color:#fff}.privacy .section-header p,.privacy p{color:#f1f1ef}.privacy-grid{gap:0}.privacy-point.programme-card{border:0;border-radius:0;background:transparent;padding:32px;border-top:1px solid #777;color:white}.privacy-point h3{color:white;font-size:30px}.privacy-quote{border-left:3px solid var(--accent);margin-top:24px;padding-left:20px;color:#ddd}.privacy a{color:inherit}.demos-grid{gap:0}.demo-card.programme-card{border:0;border-top:1px solid var(--rule);border-radius:0;padding:28px;background:none;display:block}.demo-icon{background:none!important;color:var(--accent)!important;padding:0!important;font:800 32px monospace}.demo-card h3{font-size:34px;margin-block:12px}.demo-cmd{margin-top:20px!important;background:var(--ink)!important;color:white!important;padding:18px!important}
/* Terminals are live selectable HTML, not bitmap screenshots. */
.mode-terminal,.home-apfel__terminal{background:#111416;border:1px solid #25282b;border-radius:8px;box-shadow:none;min-width:0;max-width:100%;color:#f5f5f2}.mode-terminal{padding:20px;font:15px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-x:auto;white-space:nowrap;scrollbar-color:#777 #17191b}.mode-terminal .output{color:#e8e8e5}.mode-terminal .comment{color:#aaa}.prompt,.home-apfel__code .cmd,.home-apfel__code .flag{color:#ff744e}.home-apfel__code{overflow-x:auto;font:15px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;padding:24px;white-space:nowrap;min-width:0}.home-apfel__bar{border-bottom:1px solid #45494f;background:none}.home-apfel__code .str,.home-apfel__code .result{color:#f3f3ee}.showcase .home-apfel__code{min-height:230px}.ol-group-title{border-block:1px solid var(--ink);padding-block:16px;font-size:32px}.ol-grid{gap:32px}.ol-card{border:0;border-radius:0;background:none;padding:0 0 24px}.ol-cmd{white-space:pre;overflow:auto;font-size:14px}.ol-cmd-wrap{min-width:0}.ol-out{font-size:16px}.ol-tag{font-size:18px}.vsfm-table th{background:var(--color-surface-alt)}.vsfm-table th:nth-child(2){background:var(--accent);color:#fff}.vsfm-table td:nth-child(2){background:var(--color-surface-alt)}.vsfm-table .yes,.vsfm-table .no{color:var(--ink)}.vsfm-table-wrap{border-radius:0;overflow:auto}.pop-card{background:none;border:0;border-radius:0;padding:0}.pop-number{font-size:clamp(96px,11vw,160px);color:var(--accent);letter-spacing:-.06em;line-height:1.1}.pop-meta{border-block:1px solid var(--ink);padding:20px 0}.pop-chart{border:0;border-radius:0}.install{background:var(--accent);color:#fff}.install-option.programme-card{display:block;background:none;border:0;border-top:1px solid white;border-radius:0;padding:28px 0}.install h3,.install p{color:white}.install .btn{background:white;color:var(--ink);border-color:white}.eco-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px}.eco-card{background:none;border:0;border-top:1px solid var(--ink);border-radius:0;padding:28px 0}.eco-card-img{display:none}.eco-card-body{padding:0}.eco-card h3{font-size:34px}.eco-card-body p{color:var(--ink);font-size:18px}.faq-list{max-width:1040px}.faq-item{border:0;border-top:1px solid var(--rule);border-radius:0;background:none}.disclosure__summary{font-size:24px;padding:24px 0}.disclosure__body{font-size:18px;line-height:1.6;padding:0 0 28px 32px}.site-footer{background:var(--color-surface-alt);padding-top:60px}.site-footer__heading{font-size:32px}.site-footer__link{font-size:18px}.site-footer__base{border-top:1px solid var(--ink);margin-top:40px}
/* Mobile is a new composition, not a smaller desktop canvas. */
@media(max-width:800px){body{font-size:17px}.section-header{margin-bottom:28px}.section-header h2{font-size:clamp(36px,9.5vw,54px);letter-spacing:-.035em}.section-header p{font-size:18px}.home-hero__grid{grid-template-columns:1fr;gap:28px}.home-hero__title{font-size:clamp(80px,24vw,120px)}.home-hero__subtitle{font-size:clamp(36px,10vw,50px)}.home-hero__lead{font-size:17px}.hero-prompt{display:none}.hero-install__row{padding:18px 14px;gap:8px}.hero-install .home-apfel__code{font-size:14px}.copy-btn{padding:8px 12px}.hero-tags{display:block;padding:0}.hero-tags .tag{display:block;padding:10px 0;font-size:17px}.hero-tags .tag+ .tag{border:0;border-top:1px solid var(--rule)}.modes-grid{grid-template-columns:1fr;gap:36px}.mode-card.programme-card{padding:0}.mode-card+.mode-card{border-left:0;border-top:1px solid var(--rule);padding-top:32px}.mode-card h3{font-size:30px}.mode-card>p{font-size:17px}.mode-card .mode-terminal{margin-top:16px}.mode-terminal,.home-apfel__code{font-size:14px;padding:16px}.mcp-grid,.hiw-grid,.api-grid,.privacy-grid,.demos-grid,.install-grid,.eco-grid,.pop-grid{grid-template-columns:1fr;gap:28px}.privacy-point.programme-card,.demo-card.programme-card{padding:24px 0}.home-trust__stats{grid-template-columns:1fr;padding:0}.home-trust__stats .stat-card+ .stat-card{border-left:0;border-top:1px solid var(--rule)}.stat-card{padding:24px 0}.stat-card__value{font-size:76px}.spec-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.model-spec{padding:20px}.spec-item{padding:20px 8px}.spec-val{font-size:22px}.ol-grid{grid-template-columns:1fr}.vsfm-table{min-width:760px}.pop-chart-scroll{overflow:auto}.pop-chart svg{min-width:520px}.eco-card h3{font-size:30px}.site-footer__grid{grid-template-columns:1fr;gap:32px}.disclosure__summary{font-size:20px}.disclosure__body{font-size:17px}.home-apfel__ghost svg{width:18px;height:18px}.btn{min-height:44px}.hiw-grid{display:flex;flex-direction:column}.hiw-grid>*{width:100%;min-width:0}}
.site-menu.is-open{display:block}.menu-open{overflow:hidden}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

.hero-prompt::before{content:">_"}

/* =====================================================================================================
   apfel site layer (apfel.franzai.com). Everything above this line is Franz's design kit design.css,
   unchanged. brand.css sits in @layer brand, so the kit wins everywhere it speaks. This layer only:
   (1) enforces the site-wide "no text under 16px" rule where the kit asks for 14/15px code,
   (2) closes the gaps where the kit CSS leaves a brand rule in place that the reference images do not show
       (each rule names its reference image),
   (3) keeps phones free of horizontal overflow and gives every control a 44px target,
   (4) carries the i18n font support for the 30 language pages.
   ===================================================================================================== */

/* (1) 16px minimum: kit code is 15px desktop / 14px mobile; the site rule wins. */
.mode-terminal,
.home-apfel__code,
.ol-cmd,
.demo-cmd { font-size: 16px; }
.hero-install .home-apfel__code { font-size: clamp(16px, 1.8vw, 26px); }
@media (max-width: 800px) {
  .mode-terminal,
  .home-apfel__code,
  .hero-install .home-apfel__code { font-size: 16px; }
}

/* Layering guard: the kit's bare a{color:inherit} and a:hover would now beat every brand component
   colour (buttons, menu, cards). Classed links keep their brand colour; plain text links follow the kit. */
a[class] { color: revert-layer; }

/* (2) ---------- reference gaps ---------- */

/* Modes (desktop-04-modes-REVISED): terminal lines wrap inside their own column; natural height. */
.mode-terminal { white-space: normal; overflow-wrap: anywhere; }
.mode-terminal > div { white-space: pre-wrap; }

/* Body copy: kit token 18px desktop / 17px mobile (brand cards used 16px captions). */
.section p, .section li, .disclosure__body, .stat-card__desc, .tick-list li { font-size: 18px; }
.section .ol-tag, .section .ol-out, .section .pop-date, .section .caption, .section .spec-key { font-size: 16px; }
@media (max-width: 800px) {
  .section p, .section li, .disclosure__body, .stat-card__desc, .tick-list li { font-size: 17px; }
  .section .ol-tag, .section .ol-out, .section .pop-date, .section .caption, .section .spec-key { font-size: 16px; }
}
.section .section-header p { font-size: clamp(18px, 1.8vw, 25px); }
@media (max-width: 800px) { .section .section-header p { font-size: 18px; } }
.tick-list li, .stat-card__desc, .hiw-spec-item p { color: var(--ink); }

/* Pre-header (2026-11-14, Franz: "two lines and a different font" on phones). Codex design, option A "warm
   signature": ONE centered sentence on the #F4EEE9 band, "{apfel} is a {franzai} project.", the whole sentence one
   link to franzai. The translation places the two slots (front matter `preheader`, rendered by build/i18n.py):
   {apfel} = the header wordmark face (Inter Tight 900, -.05em) at 20 px, {franzai} = the real logo SVG 80 x 20 px
   (4:1, never redrawn) set inline as the word. Text 16 px Inter 450 on every width (no breakpoints): English is
   232 px wide, the 320 px viewport leaves 280 px. Both slots are Latin, isolated with <bdi> for RTL sentences.
   A sentence too long for one line wraps centered and balanced at the same sizes (see content/TRANSLATING.md). */
.franzai-project { display: grid; place-items: center; min-height: 48px; padding: 2px 20px; background: #F4EEE9; color: var(--ink); text-align: center; }
.franzai-project__link {
  display: block; width: fit-content; max-width: 100%; min-height: 44px; padding: 9px 6px; border-radius: 4px;
  color: var(--ink); font-family: var(--font-sans); font-size: 16px; font-weight: 450; line-height: 26px; letter-spacing: 0;
  text-decoration: none; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  text-wrap: balance; overflow-wrap: anywhere; transition: background-color 140ms ease;
}
/* No hover effect on header links (Franz, 2026-11-14). Keyboard focus keeps a visible ring only. */
.franzai-project__link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.franzai-project__apfel {
  direction: ltr; unicode-bidi: isolate; white-space: nowrap;
  font-family: var(--font-heading); font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.05em;
}
.franzai-project__logo { position: relative; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.franzai-project__logo .franzai-logo { display: inline-block; width: 80px; height: 20px; max-width: none; vertical-align: -2.8px; }
:is(:lang(hi), :lang(mr), :lang(bn), :lang(te), :lang(ta), :lang(gu), :lang(kn), :lang(ml), :lang(ar), :lang(fa)) .franzai-project__link { line-height: 28px; padding-block: 8px; }
:lang(ur) .franzai-project__link { line-height: 32px; padding-block: 6px; }
/* Narrow phones: the centered line does not need the 20 px page gutter. 12 + 4 px side padding gives the sentence
   288 px at a 320 px viewport (es, ca, el, ml need 273-281 px), with every size unchanged. */
@media (max-width: 380px) {
  .franzai-project { padding-inline: 12px; }
  .franzai-project__link { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) { .franzai-project__link { transition: none; } }
@media (forced-colors: active) { .franzai-project__link:focus-visible { outline-color: Highlight; } }

/* Header (desktop-01 measured 1:1 at 1536 px, mobile-01 at ~1.87x; Franz amendment 3): header row 68 px, wordmark
   44 px black, nav 21 px ink 500 underlined, 18 px gaps; 2 px ink rule. Mobile: wordmark 36 px, underlined "Menu"
   text link instead of the hamburger. No compact-on-scroll shrink (the kit has none); the header keeps one size. */
:root { --header-height: 68px; --header-height-compact: 68px; }
.site-header { box-shadow: none; background: #fff; }
.site-header__bar { border-bottom: 2px solid var(--ink); }
.site-header__logo, .site-header__toggle-slot { min-height: 68px; }
.apfel-wordmark { font-size: 44px; font-weight: 900; letter-spacing: -.05em; line-height: 1; padding: 0; }
html.header-compact .apfel-wordmark { transform: none; }
@media (min-width: 1024px) {
  .site-menu__list { gap: 18px; }
  .site-menu__link { font-size: 21px; font-weight: 500; color: var(--ink); padding: 8px 4px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
  .site-menu__gh svg { width: 24px; height: 24px; }
}
@media (max-width: 1023px) {
  .menu-button { width: auto; min-width: 44px; height: 44px; padding: 0; margin-right: 0; }
  .menu-button svg { display: none !important; }
  .menu-button [data-menu-label] {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: nowrap;
    font-size: 20px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px;
  }
}
@media (max-width: 800px) {
  :root { --header-height: 62px; --header-height-compact: 62px; }
  .site-header__logo, .site-header__toggle-slot { min-height: 62px; }
  .apfel-wordmark { font-size: 36px; }
}

/* Hero (desktop-01, mobile-01): compact top, large ruled tags, ink facts, big heading-font privacy strip. */
.home-hero { padding-top: 20px; }
.hero-tags .tag { font-family: var(--font-heading); font-size: 20px; font-weight: 800; color: var(--ink); }
.home-hero__facts { font-size: 18px; color: var(--ink); }
.hero-install { border-radius: 4px; }
.privacy-strip p { font: inherit; font-family: var(--font-heading); letter-spacing: -.02em; line-height: 1.15; color: #fff; }
@media (max-width: 800px) {
  .hero-tags { width: 100%; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .hero-tags .tag { font-size: 24px; padding: 12px 0; }
  .hero-tags .tag + .tag { border-top: 1px solid var(--ink); }
  .home-hero__facts { font-size: 17px; }
  .privacy-strip { font-size: 26px; }
  .privacy-strip p { text-align: left; }
}

/* Stats (desktop-03): ruled spec grid with column rules. */
@media (min-width: 900px) {
  .spec-item:not(:nth-child(3n+1)) { border-left: 1px solid var(--rule); }
}
.spec-grid { border-bottom: 1px solid var(--rule); }

/* How it works (desktop-06): heading rules, labelled diagram, "you" layer light, ruled spec. */
.hiw-text h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.hiw-diagram .layer-label { font-size: 20px; font-weight: 800; color: var(--color-orange-text); }
.hiw-diagram .layer.apfel:last-child { background: var(--color-surface-alt); color: var(--ink); border: 1px solid var(--color-hairline); }
.hiw-diagram .layer.apfel:last-child .layer-label { color: var(--color-orange-text); }
.hiw-spec-item .hiw-spec-val, .hiw-spec-item strong { font-size: 24px; }
@media (min-width: 640px) { .hiw-spec-item:nth-child(2n) { border-left: 1px solid var(--rule); } }

/* Privacy (desktop-07): orange rule under the header, ruled 2x2 grid, readable inline code. */
.privacy .section-header { padding-bottom: 32px; border-bottom: 3px solid var(--accent); margin-bottom: 0; }
.privacy-point.programme-card { border-top: 0; border-bottom: 1px solid #777; }
@media (min-width: 768px) { .privacy-point:nth-child(2n) { border-left: 1px solid #777; } .privacy-point:nth-child(2n+1) { padding-left: 0; } }
.privacy code { background: rgba(255, 255, 255, .14); color: #fff; border-color: transparent; }
.privacy-quote { font-size: 18px; color: #f1f1ef; }

/* Power tools (desktop-08): ink rule, ruled 3-column grid, bigger names and commands. */
.demos .section-header { padding-bottom: 32px; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.demo-card h3 { font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.035em; }
.demo-cmd { font-size: 18px !important; border-radius: 0 !important; }
@media (min-width: 1024px) {
  .demo-card.programme-card { padding: 28px 24px; }
  .demo-card:nth-child(3n+1) { padding-left: 0 !important; }
  .demo-card:nth-child(3n) { padding-right: 0 !important; }
  .demo-card:not(:nth-child(3n+1)) { border-left: 1px solid var(--rule); }
}
@media (max-width: 800px) { .demo-cmd { font-size: 16px !important; } }

/* One-liners (desktop-09..11): commands wrap inside the card, clear of the copy button. */
.ol-cmd { white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; }

/* OpenAI compatible (desktop-12): the header line is the orange second headline, ink rule;
   the Python sample keeps its line breaks. */
.api-compat .section-header { padding-bottom: 32px; border-bottom: 1px solid var(--ink); }
.api-compat .section-header p { font-family: var(--font-heading); font-size: clamp(30px, 3.6vw, 52px); font-weight: 850; line-height: 1.05; letter-spacing: -.04em; color: var(--accent); }
.api-code .home-apfel__code { white-space: pre; overflow-x: auto; font-size: 17px; }

/* Comparison (desktop-13): orange rule under the header. */
.vsfm .section-header { padding-bottom: 32px; border-bottom: 2px solid var(--accent); }
.vsfm-table th:first-child, .vsfm-table tbody th { color: var(--ink); }

/* Popular on GitHub (desktop-14): open editorial stats, ruled meta row, big button. */
.pop-stats { padding: 0; border: 0; border-radius: 0; background: none; gap: 20px; }
.pop-label { font-family: var(--font-heading); font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.pop-meta { gap: 0; }
.pop-meta-item { border: 0; border-radius: 0; background: none; padding: 4px 24px; font-size: 20px; color: var(--color-secondary); }
.pop-meta-item:first-child { padding-left: 0; }
.pop-meta-item + .pop-meta-item { border-left: 1px solid var(--rule); }
.pop-meta-item span { font-size: 30px; line-height: 1.2; }
.section .pop-text { font-size: 20px; }
@media (max-width: 800px) {
  .pop-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pop-meta-item { padding: 4px 12px; font-size: 17px; }
  .pop-meta-item span { font-size: 24px; }
}
.pop-stats .btn { font-size: 20px; min-height: 52px; padding-inline: 24px; border-radius: 2px; }

/* Get started (desktop-15): white labels, ruled columns, black terminals, outline button. */
.install .section-header { padding-bottom: 32px; border-bottom: 1px solid #fff; margin-bottom: 0; }
.install .install-option .label { color: #fff; font-size: 20px; margin-bottom: 16px; }
.install h3 { font-size: clamp(30px, 3vw, 44px); letter-spacing: -.035em; }
.install-option pre { background: #111416; color: #fff; border: 0; border-radius: 4px; font-size: 18px; padding: 24px; }
.install-option.programme-card { border-top: 0; }
.install-grid { border-bottom: 1px solid #fff; padding-bottom: 32px; margin-bottom: 32px; }
@media (min-width: 768px) { .install-option + .install-option { border-left: 1px solid #fff; padding-left: 32px !important; } }
.install .btn { background: transparent; color: #fff; border: 2px solid #fff; font-size: 20px; min-height: 52px; }
@media (max-width: 800px) { .install-option pre { font-size: 16px; } }

/* The apfel tree (desktop-16): orange name bar instead of underline. The reference is text-first;
   8548155 shows a product image per entry, and the content authority keeps all ten images. */
.eco-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin-bottom: 20px; border: 1px solid var(--color-hairline); }
.eco-card-body > h3 { text-decoration: none; }
.eco-card-body > h3::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 8px; background: var(--accent); }

/* FAQ (desktop-17, 18): heavy heading-font questions, orange chevrons. */
.disclosure__summary { font-family: var(--font-heading); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.disclosure__chevron { color: var(--accent); }

/* Footer (desktop-19, mobile-05): white, big wordmark over an orange rule, ink headings and links. */
.site-footer { background: #fff; }
.site-footer__grid::before { content: "apfel" / ""; grid-column: 1 / -1; display: block; padding-bottom: 24px; margin-bottom: 8px; border-bottom: 2px solid var(--accent); font: 900 clamp(88px, 11vw, 170px) / .9 var(--font-heading); letter-spacing: -.07em; color: var(--ink); }
.site-footer__heading { color: var(--ink); font-weight: 800; }
.site-footer__link { color: var(--ink); }

/* ---------- design review round 2 (independent Opus review of all 24 references) ---------- */

/* desktop-01: full-width heavy strip, top-aligned install panel, lead and tags across the column. */
.privacy-strip { font-size: clamp(20px, 2.3vw, 36px); }
.home-hero__grid { align-items: start; }
.home-hero__side { padding-top: 8px; }
.home-hero__lead { max-width: none; margin-bottom: 18px; }
.home-hero { padding-top: 14px; }
.home-hero .eyebrow { margin: 0; }
.home-hero__title { margin: 6px 0 12px; }
.home-hero__subtitle { margin-bottom: 18px; }
.hero-tags { margin: 0; }
@media (min-width: 801px) {
  .hero-tags { display: flex; width: 100%; }
  .hero-tags .tag { flex: 1 1 auto; text-align: center; }
  .hero-tags .tag:first-child { padding-left: 0; text-align: left; }
}

/* desktop-03: heavy heading-font labels, flush first column, ink dividers and labels. */
.stat-card__label { font-family: var(--font-heading); font-weight: 850; letter-spacing: -.02em; }
.home-trust__stats .stat-card:first-child { padding-left: 0; }
.home-trust__stats .stat-card + .stat-card { border-left-color: var(--ink); }
.spec-key { color: var(--ink); }

/* desktop-04 / desktop-08: heavy icon glyphs; half-line gaps between terminal command groups. */
.mode-icon.programme-icon, .demo-icon { font-family: var(--font-heading) !important; font-weight: 900 !important; letter-spacing: .02em; }
.mode-terminal br { display: none; }
.mode-terminal br + div { margin-top: 12px; }

/* desktop-05: bright orange heading with an arrow towards the terminal, white command, flags orange,
   grey pills for inline code in the feature list. */
.mcp-info h3 { color: var(--accent); }
@media (min-width: 1024px) { .mcp-info h3::after { content: " \2192" / ""; } }
.mcp-terminal .prompt, .mcp-terminal .cmd { color: #f5f5f2; }
.mcp-features code { background: #f1f1ef; color: var(--ink); padding: 2px 6px; border-radius: 3px; }
.mcp-terminal .home-apfel__code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* desktop-06: second apfel layer ("you") is a light card; big heavy orange spec values, ink notes. */
.hiw-diagram .layer.apfel + .arrow + .layer.apfel { background: var(--color-surface-alt); color: var(--ink); border: 1px solid var(--color-hairline); font-weight: 400; font-size: 18px; }
.hiw-diagram .layer.apfel + .arrow + .layer.apfel .layer-label { color: var(--color-orange-text); }
.hiw-spec-item.stat-card { color: var(--ink); font-size: 18px; }
.hiw-spec-item > span { display: block; font-family: var(--font-heading); font-size: 28px; font-weight: 850; letter-spacing: -.03em; color: var(--accent); line-height: 1.15; margin-bottom: 6px; }
@media (min-width: 1024px) { .hiw-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); } }
@media (max-width: 800px) { .hiw-diagram { order: -1; } }

/* desktop-07: no closing rule under the last row; inline code as plain monospace. */
.privacy-point.programme-card:nth-last-child(-n+2) { border-bottom: 0; }
.privacy code { background: none; padding: 0; }

/* desktop-08: orange prompt, equal-height command bars per row. */
.demo-cmd::first-letter { color: #ff744e; }
.demos-grid { align-items: stretch; }
.demo-card.programme-card { display: flex; flex-direction: column; }
.demo-card .demo-cmd { margin-top: auto !important; }
.demo-card > p { margin-bottom: 20px; }

/* desktop-09..11: orange prompt; group title with a bar before an ink-bordered count, rule above only. */
.ol-prompt { color: #ff744e; }
.ol-group-title { border-bottom: 0; }
.ol-group-count { position: relative; margin-left: 22px; border-color: var(--ink); color: var(--ink); }
.ol-group-count::before { content: ""; position: absolute; left: -14px; top: 15%; height: 70%; border-left: 1px solid var(--ink); }

/* desktop-12: brighter comments in the Python sample. */
.api-code .cm { color: #b9bdc3; }
@media (max-width: 800px) {
  .api-compat .section-header p { font-family: var(--font-sans); font-size: 18px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
}

/* desktop-13: heavy heading-font column heads, monospace cells, no pills, balanced columns. */
.vsfm-table { table-layout: fixed; }
.vsfm-table thead th { font-family: var(--font-heading); font-size: 24px !important; font-weight: 850 !important; letter-spacing: -.02em; }
.vsfm-table thead td { width: 20%; }
.vsfm-table td { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; }
.vsfm-table code { background: none; border: 0; padding: 0; font-size: inherit; }

/* desktop-14: bigger ink meta row, number sits on its label, bigger button and attribution. */
.pop-number { line-height: .95; }
.pop-stats { gap: 16px; }
.pop-meta-item { color: var(--ink); font-size: 22px; }
.pop-meta-item span { font-size: 36px; }
.section .pop-text { font-size: 22px; }
.pop-stats .btn { font-size: 22px; min-height: 60px; align-self: flex-start; width: auto; }

/* desktop-15: equal-height terminals. */
.install-option.programme-card { display: flex; flex-direction: column; }
.install-option pre { flex: 1 1 auto; }
@media (max-width: 800px) {
  .install .section-header, .install-grid { border-bottom: 0; }
  .install .btn { background: #fff; color: var(--ink); }
}

/* desktop-17/18: bold orange "v" chevron. */
.disclosure__chevron { width: 14px; height: 14px; border-right-width: 4px; border-bottom-width: 4px; border-color: var(--accent); }

/* desktop-19: base line at link size, tighter link list. */
.site-footer__tagline { font-size: 18px; color: var(--color-secondary); }
/* "apfel is a franzai project." in every footer (Franz, 2026-11-15): the pre-header link, flush with the text. */
.site-footer__project { margin: 8px 0 0; }
.site-footer__project .franzai-project__link { padding-inline: 0; }
.site-footer__list { gap: 4px; }
.site-footer__link { min-height: 44px; display: inline-flex; align-items: center; }

/* mobile-01: indented tags; the typed demo command wraps instead of running off the panel. */
@media (max-width: 800px) { .hero-tags .tag { padding-left: 16px; } }
.showcase .home-apfel__code { white-space: pre-wrap; overflow-wrap: anywhere; }
.showcase .term-output { white-space: pre-wrap; }

/* ---------- design review round 3 ---------- */
/* desktop-01: strip text flush left like the reference; larger prompt, deeper install panel. */
.privacy-strip p { text-align: left; }
.hero-prompt { font-size: clamp(96px, 10vw, 150px); padding: 40px 32px 28px; }
/* desktop-02 and every terminal bar: white window dots. */
.home-apfel__dots span { background: #fff; }
/* desktop-03: ink, readable spec labels and dark cell rules. */
.section .spec-key { font-size: 18px; font-weight: 500; }
.spec-item { border-top-color: var(--ink); }
@media (min-width: 900px) { .spec-item:not(:nth-child(3n+1)) { border-left-color: var(--ink); } }
/* desktop-05 / mobile-02: compact MCP and demo terminals (wrap inside each line, no markup whitespace),
   readable comments. */
.mcp-terminal .home-apfel__code, .showcase .home-apfel__code { white-space: normal; }
.mcp-terminal .home-apfel__code > div, .showcase .term-line > span, .showcase .term-output { white-space: pre-wrap; overflow-wrap: anywhere; }
.home-apfel__code .cm, .home-apfel__code .comment, .mode-terminal .comment { color: #b9bdc3; }
/* desktop-08: icon right above the name, equal-height command bars. */
.demo-icon { width: auto !important; height: auto !important; line-height: 1 !important; display: block !important; }
.demo-card h3 { margin-top: 8px; }
.demo-cmd { min-height: 92px; }
/* desktop-13: the apfel column carries the cream tint, row labels stay white. */
.vsfm-table tbody th { background: #fff; }
.vsfm-table tbody td:nth-child(2) { background: var(--color-orange-tint); }
/* desktop-15: regular-weight labels at a large-text size (contrast), lead-size button. */
.install .install-option .label { font-weight: 400; font-size: 24px; }
.install .btn { font-size: 24px; min-height: 60px; padding-inline: 24px; }
/* mobile-04: version never breaks; desktop look wins for the API subline and the install button. */
.pop-meta-item span { white-space: nowrap; }
@media (max-width: 800px) {
  .pop-meta-item span { font-size: 21px; }
  .pop-meta-item { padding-inline: 8px; }
  .api-compat .section-header p { font-family: var(--font-heading); font-size: 30px; font-weight: 850; letter-spacing: -.03em; line-height: 1.1; color: var(--accent); }
  .install .btn { background: transparent; color: #fff; }
  .install .install-option .label { font-size: 20px; font-weight: 700; }
}

/* Contrast: white on the kit orange #E63B12 is 4.2:1, so white text on orange is always WCAG "large"
   (24px+, or 18.66px+ bold). */
.vsfm-table thead td { background: var(--color-surface-alt); }
.vsfm-table th:nth-child(2) { font-size: 20px; font-weight: 800; }
.hiw-diagram .layer.apfel:not(:last-child) { font-weight: 700; font-size: 19px; }
.install .section-header p { font-size: clamp(24px, 1.8vw, 25px); }
@media (max-width: 800px) { .install .section-header p { font-size: 19px; font-weight: 700; } }

/* (3) ---------- overflow and targets ---------- */
.mcp-grid > *, .api-grid > *, .hiw-grid > *, .pop-grid > *, .install-grid > *, .ol-grid > * { min-width: 0; }
.spec-source { display: inline-flex; align-items: center; min-height: 44px; }
h1, h2, h3, p, li, summary, .disclosure__body { overflow-wrap: break-word; }

/* (4) i18n: Cyrillic (bg, ru, sr, uk) and Greek (el) subsets, downloaded only when those glyphs appear. */
/* apfel i18n: Cyrillic (bg, ru, sr, uk) and Greek (el) subsets, only downloaded when those glyphs appear. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-tight-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-tight-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("/fonts/inter-tight-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}


/* ---------- i18n: system fonts for scripts Inter does not cover (Latin, Cyrillic, Greek come from Inter) ---------- */
:lang(ja) {
  --font-sans: "Inter Variable", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  --font-heading: "Inter Tight Variable", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}
:lang(ko) {
  --font-sans: "Inter Variable", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-heading: "Inter Tight Variable", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
:lang(zh-Hans) {
  --font-sans: "Inter Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-heading: "Inter Tight Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
:lang(zh-Hant) {
  --font-sans: "Inter Variable", "PingFang TC", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --font-heading: "Inter Tight Variable", "PingFang TC", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
:lang(hi), :lang(mr) {
  --font-sans: "Inter Variable", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", "Noto Sans Devanagari", sans-serif;
  --font-heading: "Inter Tight Variable", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", "Noto Sans Devanagari", sans-serif;
}
:lang(bn) {
  --font-sans: "Inter Variable", "Kohinoor Bangla", "Bangla Sangam MN", "Nirmala UI", "Noto Sans Bengali", sans-serif;
  --font-heading: "Inter Tight Variable", "Kohinoor Bangla", "Bangla Sangam MN", "Nirmala UI", "Noto Sans Bengali", sans-serif;
}
:lang(te) {
  --font-sans: "Inter Variable", "Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", "Noto Sans Telugu", sans-serif;
  --font-heading: "Inter Tight Variable", "Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", "Noto Sans Telugu", sans-serif;
}
:lang(ta) {
  --font-sans: "Inter Variable", "Tamil Sangam MN", "InaiMathi", "Nirmala UI", "Noto Sans Tamil", sans-serif;
  --font-heading: "Inter Tight Variable", "Tamil Sangam MN", "InaiMathi", "Nirmala UI", "Noto Sans Tamil", sans-serif;
}
:lang(gu) {
  --font-sans: "Inter Variable", "Kohinoor Gujarati", "Gujarati Sangam MN", "Nirmala UI", "Noto Sans Gujarati", sans-serif;
  --font-heading: "Inter Tight Variable", "Kohinoor Gujarati", "Gujarati Sangam MN", "Nirmala UI", "Noto Sans Gujarati", sans-serif;
}
:lang(kn) {
  --font-sans: "Inter Variable", "Kannada Sangam MN", "Nirmala UI", "Noto Sans Kannada", sans-serif;
  --font-heading: "Inter Tight Variable", "Kannada Sangam MN", "Nirmala UI", "Noto Sans Kannada", sans-serif;
}
:lang(ml) {
  --font-sans: "Inter Variable", "Malayalam Sangam MN", "Nirmala UI", "Noto Sans Malayalam", sans-serif;
  --font-heading: "Inter Tight Variable", "Malayalam Sangam MN", "Nirmala UI", "Noto Sans Malayalam", sans-serif;
}
:lang(ar), :lang(fa) {
  --font-sans: "Inter Variable", "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", sans-serif;
  --font-heading: "Inter Tight Variable", "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", sans-serif;
}
:lang(ur) {
  --font-sans: "Inter Variable", "Noto Nastaliq Urdu", "Geeza Pro", "Segoe UI", "Noto Naskh Arabic", sans-serif;
  --font-heading: "Inter Tight Variable", "Noto Nastaliq Urdu", "Geeza Pro", "Segoe UI", "Noto Naskh Arabic", sans-serif;
}

/* Non-Latin scripts: no negative tracking (it breaks Arabic joining and Indic shaping, crowds CJK). */
:is(:lang(ja), :lang(ko), :lang(zh), :lang(hi), :lang(mr), :lang(bn), :lang(te), :lang(ta), :lang(gu), :lang(kn),
    :lang(ml), :lang(ar), :lang(fa), :lang(ur)) :is(h1, h2, h3, h4, p, li, span, a, div, strong, summary) {
  letter-spacing: 0 !important;
}
/* The header wordmark is the Latin "apfel" logotype: it keeps its -.05em in every language, like the pre-header slot. */
:is(:lang(ja), :lang(ko), :lang(zh), :lang(hi), :lang(mr), :lang(bn), :lang(te), :lang(ta), :lang(gu), :lang(kn),
    :lang(ml), :lang(ar), :lang(fa), :lang(ur)) .apfel-wordmark { letter-spacing: -.05em !important; }
:lang(ja) body, :lang(zh) body { line-break: strict; }
:is(:lang(hi), :lang(mr), :lang(bn), :lang(te), :lang(ta), :lang(gu), :lang(kn), :lang(ml)) body { line-height: 1.7; }
:is(:lang(hi), :lang(mr), :lang(bn), :lang(te), :lang(ta), :lang(gu), :lang(kn), :lang(ml), :lang(ar), :lang(fa)) :is(h1, h2, h3) { line-height: 1.3; }
:lang(ur) body { line-height: 2; }
:lang(ur) :is(h1, h2, h3) { line-height: 1.7; }
:lang(ur) .home-hero__subtitle, :lang(ur) .section-header h2 { line-height: 1.6; }

/* ---------- RTL (ar, fa, ur): mirror the kit's physical rules; code, terminals and charts stay LTR ---------- */
[dir="rtl"] :is(pre, code, kbd, .home-apfel__code, .mode-terminal, .ol-cmd-wrap, .demo-cmd, .pop-chart-scroll, .hero-install__row, .api-code) {
  direction: ltr; text-align: left; unicode-bidi: isolate;
}
[dir="rtl"] :is(.section-header, .section-header h2, .section-header p) { text-align: right; }
[dir="rtl"] .site-header__logo { margin-right: 0; margin-left: auto; }
/* Phones: a compound word longer than the line (da "tokenomkostninger." in an h2 at 320 px) breaks instead of
   pushing the page sideways. Only words that cannot fit are affected. */
@media (max-width: 800px) { :is(h1, h2, h3) { overflow-wrap: anywhere; } }
[dir="rtl"] :is(.hero-prompt, .mode-icon, .demo-icon) { direction: ltr; text-align: right; unicode-bidi: isolate; }
[dir="rtl"] :is(.spec-val, .stat-card__value, .pop-number, .pop-meta-item span, .hiw-spec-item > span, .layer-label, .eyebrow) { unicode-bidi: plaintext; text-align: right; }
[dir="rtl"] .mode-card:first-child { padding-left: 24px; padding-right: 0; }
[dir="rtl"] .mode-card:last-child { padding-right: 24px; padding-left: 0; }
[dir="rtl"] .mode-card + .mode-card { border-left: 0; border-right: 1px solid var(--rule); }
[dir="rtl"] .home-trust__stats .stat-card:first-child { padding-left: 24px; padding-right: 0; }
[dir="rtl"] .home-trust__stats .stat-card + .stat-card { border-left: 0; border-right: 1px solid var(--ink); }
[dir="rtl"] .hero-tags .tag + .tag { border-left: 0; border-right: 1px solid var(--ink); }
[dir="rtl"] .hero-tags .tag:first-child { padding-left: 16px; padding-right: 0; text-align: right; }
[dir="rtl"] .privacy-strip p { text-align: right; }
[dir="rtl"] .privacy-quote { border-left: 0; border-right: 3px solid var(--accent); padding-left: 0; padding-right: 20px; }
[dir="rtl"] .pop-meta-item:first-child { padding-left: 24px; padding-right: 0; }
[dir="rtl"] .pop-meta-item + .pop-meta-item { border-left: 0; border-right: 1px solid var(--rule); }
[dir="rtl"] .ol-group-count { margin-left: 0; margin-right: 22px; }
[dir="rtl"] .ol-group-count::before { left: auto; right: -14px; }
[dir="rtl"] .ol-cmd { padding: 16px 16px 16px 56px; }
[dir="rtl"] .ol-copy-icon { right: auto; left: 4px; }
[dir="rtl"] .disclosure__body { padding-left: 0; padding-right: 32px; }
[dir="rtl"] .eco-card-body > h3::after { margin-right: 0; }
@media (min-width: 640px) { [dir="rtl"] .hiw-spec-item:nth-child(2n) { border-left: 0; border-right: 1px solid var(--rule); } }
@media (min-width: 768px) {
  [dir="rtl"] .privacy-point:nth-child(2n) { border-left: 0; border-right: 1px solid #777; }
  [dir="rtl"] .privacy-point:nth-child(2n+1) { padding-left: 32px; padding-right: 0; }
  [dir="rtl"] .install-option + .install-option { border-left: 0; border-right: 1px solid #fff; padding-left: 0 !important; padding-right: 32px !important; }
}
@media (min-width: 900px) {
  [dir="rtl"] .spec-item:not(:nth-child(3n+1)) { border-left: 0; border-right: 1px solid var(--ink); }
}
@media (min-width: 1024px) {
  [dir="rtl"] .mcp-info h3::after { content: " \2190" / ""; }
  [dir="rtl"] .demo-card:nth-child(3n+1) { padding-left: 24px !important; padding-right: 0 !important; }
  [dir="rtl"] .demo-card:nth-child(3n) { padding-right: 24px !important; padding-left: 0 !important; }
  [dir="rtl"] .demo-card:not(:nth-child(3n+1)) { border-left: 0; border-right: 1px solid var(--rule); }
}
@media (max-width: 800px) {
  [dir="rtl"] .mode-card.programme-card, [dir="rtl"] .home-trust__stats .stat-card:first-child { padding-left: 0; padding-right: 0; }
  [dir="rtl"] .mode-card + .mode-card, [dir="rtl"] .home-trust__stats .stat-card + .stat-card { border-right: 0; }
  [dir="rtl"] .hero-tags .tag, [dir="rtl"] .hero-tags .tag:first-child { padding-left: 0; padding-right: 16px; }
  [dir="rtl"] .hero-tags .tag + .tag { border-right: 0; }
  [dir="rtl"] .pop-meta-item:first-child { padding-left: 8px; padding-right: 0; }
}

/* ---------- footer language switch: plain code links "en | de | fr ...", 16px+, wraps on phones ---------- */
.lang-switch { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 24px; font-size: 18px; line-height: 1.4; direction: ltr; }
.lang-switch a, .lang-switch__current { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 2px; }
.lang-switch a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lang-switch__current { font-weight: 800; color: var(--color-orange-text); }
.lang-switch__item { display: inline-flex; align-items: center; white-space: nowrap; }
.lang-switch__sep { color: var(--color-secondary); padding: 0 4px; }

/* (5) ---------- article pages (/<lang>/a/<slug>/, build/article.py + src/article.html) ----------
   Same kit tokens as the home page: white page, ink text, black underlined links, franzai orange only as accent,
   dark apfel terminal panels (#111416) that scroll inside themselves, 16px minimum, 44px targets, no hover. */
.article { padding-block: 24px 88px; }
.article__container > * { max-width: 880px; }
.article :is(h2, h3) { scroll-margin-top: 96px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 16px; }
.breadcrumb li + li::before { content: "/" / ""; margin-right: 10px; color: var(--color-secondary); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb [aria-current] { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-secondary); }
.article__head { padding-bottom: 28px; border-bottom: 2px solid var(--ink); margin-bottom: 32px; }
.article__head .eyebrow { margin: 0 0 8px; font-size: 18px; }
.article__title { font-size: clamp(44px, 7vw, 96px); line-height: .98; margin: 0 0 20px; }
.article__lead { font-size: clamp(20px, 2vw, 26px); line-height: 1.4; color: var(--ink); margin: 0 0 20px; max-width: none; }
.article__meta { font-size: 16px; line-height: 1.55; color: var(--color-secondary); margin: 0; }
.article :is(p, li, td, th) { font-size: 18px; line-height: 1.6; }
.article p { margin: 0 0 18px; }
.article a:not([class]) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article :is(p, li, td) code { font: 500 max(16px, .9em)/1.4 SFMono-Regular, Menlo, Consolas, monospace; background: #f1f1ef; color: var(--ink); padding: 1px 5px; border-radius: 3px; white-space: break-spaces; overflow-wrap: anywhere; min-height: 0; }
/* "On this page": a closed disclosure under the header on phones/tablets (the 60-second start stays near the top),
   a sticky column beside the text from 1200px. The h2 texts carry their own job numbers, so the list has no markers. */
.article-toc__list { margin: 0; padding: 0; list-style: none; }
.article-toc__list li { font-size: 18px; line-height: 1.3; }
.article-toc__list a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 4px; }
.article-toc--inline { border-block: 1px solid var(--color-hairline); margin: 0 0 8px; }
.article-toc__summary { display: flex; align-items: center; min-height: 52px; font: 800 20px/1.2 var(--font-heading); letter-spacing: -.02em; cursor: pointer; }
.article-toc__summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.article-toc--inline .article-toc__list { padding-bottom: 12px; }
.article-toc--side { display: none; }
.article-toc__title { font-size: 20px; letter-spacing: -.02em; margin: 0 0 4px; }
@media (min-width: 1200px) {
  .article__container { display: grid; grid-template-columns: minmax(0, 880px) minmax(240px, 1fr); column-gap: 64px; align-items: start; }
  .article__container > :not(.article-toc--side) { grid-column: 1; }
  .article-toc--inline { display: none; }
  .article-toc--side { display: block; grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; padding-left: 24px; border-left: 1px solid var(--ink); }
  .article-toc--side .article-toc__list li { font-size: 17px; }
  .article-toc--side .article-toc__list a { min-height: 44px; }
}
.article__body h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -.035em; margin: 64px 0 20px; padding-top: 28px; border-top: 1px solid var(--ink); }
.article__body .job { background: #FBF9F7; border-left: 4px solid var(--accent); padding: 16px 20px; margin: 0 0 16px; }
.article__body .job p { margin: 0; font-size: 20px; }
.article__body .jtbd p { color: var(--color-secondary); }
.article__body .jtbd strong { color: var(--ink); }
/* terminal / code panels */
.tut-term { background: #111416; border: 1px solid #25282b; border-radius: 8px; margin: 0 0 22px; min-width: 0; }
.tut-term__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 4px 16px; border-bottom: 1px solid #25282b; }
.tut-term__label { font: 600 16px/1.2 var(--font-sans); color: #b9bdc3; }
.tut-copy.copy-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font: 600 16px/1 var(--font-sans); color: #fff; background: transparent; border: 1px solid #4a4f55; border-radius: 4px; cursor: pointer; }
.tut-copy svg { width: 18px; height: 18px; }
.tut-copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tut-term__pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; background: none; border: 0; }
.tut-term__pre:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.tut-term__pre code { display: block; font: 16px/1.6 SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; color: #d9dce0; background: none; padding: 0; min-height: 0; border: 0; }
.tut-cmd { color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.tut-prompt { color: #ff744e; }
/* tables scroll inside their own box on phones */
.article .table-wrap { overflow-x: auto; margin: 0 0 24px; border-top: 1px solid var(--ink); }
.article table { border-collapse: collapse; width: 100%; min-width: 620px; }
.article :is(th, td) { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--color-hairline); }
.article th { font-family: var(--font-heading); font-weight: 800; }
@media (max-width: 800px) {
  .article { padding-top: 12px; }
  .article :is(p, li, td, th) { font-size: 17px; }
  .article__body .job p { font-size: 18px; }
  .article__body h2 { margin-top: 48px; }
  .tut-term { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
}
.article__body > h2:first-child { margin-top: 8px; padding-top: 0; border-top: 0; }
.article__head { margin-bottom: 24px; }
.article td code { white-space: nowrap; }

/* (6) ---------- header GitHub mark + terminal demo video (Franz, 2026-11-15) ----------
   GitHub mark: icon only, immediately before "Menu" in the mobile header (the desktop nav already lists GitHub),
   44px target, ink, no hover, visible focus ring. In RTL the flex row mirrors, so it sits on the far side of Menu.
   Video: real VHS recording, no autoplay, width/height attributes + aspect-ratio so nothing shifts while it loads. */
.header-gh { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-end: 14px; color: var(--ink); border-radius: 4px; }
.header-gh svg { display: block; width: 26px; height: 26px; }
.header-gh:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.demo-video { margin: 28px 0 0; }
.demo-video__player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #111416; border: 1px solid #25282b; border-radius: 8px; }
.demo-video__caption { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.showcase__video { margin-top: 40px; }
.article__video { max-width: 960px; }
@media (max-width: 800px) { .article__video .demo-video__player { border-radius: 4px; } }
/* CJK headings break by phrase, not mid-word (ja H1 "apfel AIチュートリアル" split as チュートリ/アル at 1440 px). */
:is(:lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3) { word-break: auto-phrase; }
