/* AIOOS reading family (#121): long-form components shared by the glossary, the comparisons and the editorial pages,
   and the editorial page template (EU AI Act guide, Redaktion).

   Loaded after shell.css; every selector starts with body.aioos-page. glossary.css and compare.css add their own
   templates on top. Content stays readable without script: disclosures are native, copy and checklist controls only
   appear where reading.js can make them work, motion only draws lines that are already complete at rest. */

body.aioos-page {
  --rd-measure: 68ch;
  --rd-ease: cubic-bezier(.2, .65, .3, 1);
  --rd-folio: var(--display);
  font-synthesis: none;
}
body.aioos-page .rd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Reading type follows the design: 18px body on desktop, 16px on phones, headings on the homepage scale. */
body.aioos-page .page-prose { font-size: clamp(1rem, .93rem + .3vw, 1.125rem); line-height: 1.7; }
body.aioos-page .page-prose p, body.aioos-page .page-prose li { max-width: var(--rd-measure); }
body.aioos-page .page-prose h2 { font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.375rem); line-height: 1.14; letter-spacing: -.035em; margin-top: clamp(48px, 5.6vw, 80px); }
body.aioos-page .page-prose h3 { font-size: clamp(1.25rem, 1.08rem + .6vw, 1.625rem); line-height: 1.22; margin: 32px 0 14px; }
body.aioos-page .page-prose blockquote { max-width: var(--rd-measure); }
body.aioos-page .page-byline em { font-style: normal; }

/* ---------- native disclosures: questions, chapters, method notes ---------- */
body.aioos-page .rd-faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px 0 0; }
body.aioos-page .rd-q {
  border: 1px solid var(--line-card); border-radius: var(--radius-disclosure); background: var(--panel);
  transition: background-color 160ms var(--rd-ease), border-color 160ms var(--rd-ease);
}
body.aioos-page .rd-q > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 18px 24px;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; cursor: pointer; list-style: none;
  border-radius: var(--radius-disclosure);
}
body.aioos-page .rd-q > summary::-webkit-details-marker { display: none; }
body.aioos-page .rd-q > summary::after,
body.aioos-page .rd-chapter > summary::after,
body.aioos-page .rd-disclosure > summary::after {
  content: "+"; flex: 0 0 22px; margin-left: auto; text-align: center; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent);
}
body.aioos-page .rd-q[open] > summary::after,
body.aioos-page .rd-chapter[open] > summary::after,
body.aioos-page .rd-disclosure[open] > summary::after { content: "\2212"; }
body.aioos-page .rd-q > summary:focus-visible,
body.aioos-page .rd-chapter > summary:focus-visible,
body.aioos-page .rd-disclosure > summary:focus-visible { outline-offset: -3px; }
body.aioos-page .rd-q[open] { background: var(--tint); border-color: #473b7033; }
body.aioos-page .rd-q__a { padding: 0 24px 22px; }
body.aioos-page .rd-q__a > :last-child { margin-bottom: 0; }
body.aioos-page .rd-q__a p { margin: 0 0 .9em; max-width: 72ch; font-size: 1rem; line-height: 1.7; }
@media (hover: hover) { body.aioos-page .rd-q:not([open]):hover { border-color: var(--accent); } }
body.aioos-page details[open] > .motion-fade { animation: rd-fade 180ms var(--rd-ease); }
@keyframes rd-fade { from { opacity: .7; } to { opacity: 1; } }

/* A plain labelled disclosure (method notes, the sources of a comparison). */
body.aioos-page .rd-disclosure { border: 1px solid var(--line-card); border-radius: var(--radius-disclosure); background: var(--panel); }
body.aioos-page .rd-disclosure > summary {
  display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 14px 20px; cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 600; border-radius: var(--radius-disclosure);
}
body.aioos-page .rd-disclosure > summary::-webkit-details-marker { display: none; }
body.aioos-page .rd-disclosure > summary .rd-disclosure__aside { margin-left: auto; font-size: .8125rem; font-weight: 450; color: var(--muted); }
body.aioos-page .rd-disclosure > summary .rd-disclosure__aside + ::after { margin-left: 0; }
body.aioos-page .rd-disclosure[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: var(--radius-disclosure) var(--radius-disclosure) 0 0; }
body.aioos-page .rd-disclosure__body { padding: 20px clamp(18px, 2.4vw, 28px) 24px; }
body.aioos-page .rd-disclosure__body > :last-child { margin-bottom: 0; }
@media (hover: hover) { body.aioos-page .rd-disclosure > summary:hover { background: var(--tint); } }

/* Chapters: the original section heading is the summary; the whole chapter stays in the document. */
body.aioos-page .rd-chapters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
body.aioos-page .rd-chapter { border: 1px solid var(--line-card); border-radius: var(--radius-disclosure); background: var(--panel); scroll-margin-top: var(--anchor-offset); }
body.aioos-page .rd-chapter > summary {
  display: flex; align-items: center; gap: 20px; min-height: 64px; padding: 14px clamp(18px, 2.2vw, 24px); cursor: pointer; list-style: none;
  border-radius: var(--radius-disclosure);
}
body.aioos-page .rd-chapter > summary::-webkit-details-marker { display: none; }
body.aioos-page .page-prose .rd-chapter > summary > h2,
body.aioos-page .rd-chapter > summary > h2 {
  margin: 0; max-width: none; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); font-weight: 650; line-height: 1.35; letter-spacing: -.015em; text-wrap: pretty;
}
body.aioos-page .rd-chapter[open] { background: var(--paper); border-color: #473b7033; }
body.aioos-page .rd-chapter[open] > summary { background: var(--tint); border-radius: var(--radius-disclosure) var(--radius-disclosure) 0 0; }
@media (hover: hover) { body.aioos-page .rd-chapter:not([open]) > summary:hover { background: var(--tint); } }
body.aioos-page .rd-chapter__body { padding: clamp(20px, 2.6vw, 32px) clamp(18px, 2.6vw, 32px) clamp(20px, 2.6vw, 32px); }
body.aioos-page .rd-chapter__body > :first-child { margin-top: 0; }
body.aioos-page .rd-chapter__body > :last-child { margin-bottom: 0; }
body.aioos-page .rd-chapter__body h3:first-child { margin-top: 0; }
body.aioos-page .rd-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin: 0 0 16px; }
body.aioos-page .rd-toolbar[hidden] { display: none; }

/* Small outline action (open all, print, reset, copy). */
body.aioos-page .rd-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-button); background: transparent; color: var(--ink);
  font: 600 .875rem/1.3 var(--type-family); cursor: pointer;
  transition: background-color 160ms var(--rd-ease), border-color 160ms var(--rd-ease), color 160ms var(--rd-ease);
}
body.aioos-page .rd-action:hover { background: var(--tint); border-color: var(--accent); }
body.aioos-page .rd-action[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--panel); }
body.aioos-page .rd-action--link { border-color: transparent; padding-inline: 4px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
body.aioos-page .rd-action--link:hover { background: transparent; border-color: transparent; color: var(--accent); }

/* ---------- sources: a numbered ledger; long addresses wrap inside the column ---------- */
body.aioos-page .page-prose .rd-sources { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: rd-src; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
body.aioos-page .page-prose .rd-sources > li {
  position: relative; max-width: 72ch; margin: 0; padding: 0 0 0 44px; counter-increment: rd-src;
  font-size: .9375rem; line-height: 1.68; color: var(--ink); overflow-wrap: anywhere;
}
body.aioos-page .rd-sources > li::before {
  content: counter(rd-src); position: absolute; left: 0; top: .1em; width: 28px; height: 28px; border-radius: var(--radius-circle);
  display: grid; place-items: center; background: var(--tint); color: var(--accent); font-size: .8125rem; font-weight: 650; line-height: 1;
  font-variant-numeric: tabular-nums;
}
body.aioos-page .rd-sources em { font-style: normal; }
body.aioos-page .rd-sources code { font-size: .875em; }

/* ---------- code and queries ---------- */
body.aioos-page .rd-code { margin: 28px 0; max-width: 100%; border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel); overflow: hidden; }
body.aioos-page .rd-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--line-soft); }
body.aioos-page .rd-code__label { font-size: .875rem; font-weight: 650; }
body.aioos-page .page-prose .rd-code pre { margin: 0; border: 0; border-radius: 0; background: transparent; padding: 16px 18px 18px; }
body.aioos-page .page-prose .rd-code pre:focus-visible { outline-offset: -3px; }
body.aioos-page .rd-code pre code { white-space: pre; }
body.aioos-page .rd-copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 11.5em; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--paper); color: var(--ink);
  font: 600 .8125rem/1.2 var(--type-family); cursor: pointer; transition: background-color 160ms var(--rd-ease), border-color 160ms var(--rd-ease);
}
body.aioos-page .rd-copy[hidden] { display: none; }
body.aioos-page .rd-copy::before { content: ""; width: 12px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: -3px 3px 0 -1.5px var(--paper), -3px 3px 0 0 currentColor; flex: 0 0 auto; }
body.aioos-page .rd-copy:hover { background: var(--tint); border-color: var(--accent); }
body.aioos-page .rd-copy.is-done { background: var(--tint); border-color: var(--accent); color: var(--accent); }
body.aioos-page .rd-copy.is-done::before { width: 12px; height: 7px; border: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; border-radius: 0; box-shadow: none; transform: translateY(-2px) rotate(-45deg); }
body.aioos-page .page-prose .rd-copy__status { margin: 0; padding: 0 18px; font-size: .8125rem; line-height: 1.5; color: var(--accent); }
body.aioos-page .page-prose .rd-copy__status:not(:empty) { padding-bottom: 14px; }

/* ---------- tables that become criterion groups on phones ---------- */
/* Desktop: the shell's hairline sheet, row header in the first column, a violet reading guide on the row in hand. */
body.aioos-page .page-prose .rd-stack th[scope="row"] { font-weight: 650; background: transparent; }
body.aioos-page .page-prose .rd-stack th[scope="row"] strong { font-weight: inherit; }
body.aioos-page .page-prose .rd-stack tbody tr { position: relative; }
body.aioos-page .page-prose .rd-stack tbody tr > * { transition: background-color 160ms var(--rd-ease); }
body.aioos-page .page-prose .rd-stack tbody tr > :first-child { box-shadow: inset 0 0 0 0 var(--accent); transition: background-color 160ms var(--rd-ease), box-shadow 80ms var(--rd-ease); }
@media (hover: hover) {
  body.aioos-page .page-prose .rd-stack tbody tr:hover > * { background: #e4dced99; }
  body.aioos-page .page-prose .rd-stack tbody tr:hover > :first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
}
body.aioos-page .page-prose .rd-stack tbody tr:focus-within > * { background: #e4dced99; }
body.aioos-page .page-prose .rd-stack tbody tr:focus-within > :first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
body.aioos-page .page-prose .rd-stack thead th { position: sticky; top: 0; background: var(--panel); border-bottom: 1px solid var(--line-card); font-size: .9375rem; }
@media (max-width: 767px) {
  body.aioos-page .rd-stack-frame { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  body.aioos-page .page-prose table.rd-stack, body.aioos-page .page-prose .rd-stack tbody { display: block; width: 100%; min-width: 0 !important; }
  body.aioos-page .page-prose .rd-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body.aioos-page .page-prose .rd-stack tbody { display: grid; gap: 12px; }
  body.aioos-page .page-prose .rd-stack tr {
    display: grid; grid-template-columns: minmax(0, 1fr); padding: 16px 18px 6px; border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel);
  }
  body.aioos-page .page-prose .rd-stack tr > * { display: block; padding: 0 0 12px; border: 0 !important; box-shadow: none !important; background: transparent !important; }
  body.aioos-page .page-prose .rd-stack tr > :first-child { padding-bottom: 10px; font-size: 1.0625rem; line-height: 1.35; font-weight: 650; }
  body.aioos-page .page-prose .rd-stack td::before {
    content: attr(data-label); display: block; margin-bottom: 2px; font-size: .8125rem; line-height: 1.4; font-weight: 650; letter-spacing: .01em; color: var(--accent);
  }
  body.aioos-page .page-prose .rd-stack td { font-size: .9375rem; line-height: 1.55; hyphens: auto; }
  body.aioos-page .page-prose .rd-stack-frame { overflow: visible; }
  body.aioos-page .page-prose .rd-stack td a { overflow-wrap: break-word; }
  body.aioos-page .page-prose .rd-stack td + td { padding-top: 12px; border-top: 1px solid var(--line-soft) !important; }
  /* Two short answers sit side by side at phone width; dense and three-way answers stay stacked. */
  body.aioos-page .page-prose .rd-stack--pair tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
  body.aioos-page .page-prose .rd-stack--pair tr > :first-child { grid-column: 1 / -1; }
  body.aioos-page .page-prose .rd-stack--pair td + td { padding-top: 0; border-top: 0 !important; border-left: 1px solid var(--line-soft) !important; padding-left: 16px; }
}
@media (max-width: 359px) {
  body.aioos-page .page-prose .rd-stack--pair tr { grid-template-columns: minmax(0, 1fr); }
  body.aioos-page .page-prose .rd-stack--pair td + td { padding-top: 12px; padding-left: 0; border-left: 0 !important; border-top: 1px solid var(--line-soft) !important; }
}

/* ---------- checklists: preparation only, never a score ---------- */
body.aioos-page .page-prose .rd-check { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: rd-check; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line-soft); }
body.aioos-page .page-prose .rd-check > li { max-width: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line-soft); counter-increment: rd-check; }
body.aioos-page .rd-check label { display: grid; grid-template-columns: 24px 2.2em minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px 4px; cursor: pointer; line-height: 1.6; }
body.aioos-page .rd-check label::after { content: counter(rd-check, decimal-leading-zero); grid-column: 2; grid-row: 1; font-size: .875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .15em; }
body.aioos-page .rd-check label > span { grid-column: 3; grid-row: 1; }
body.aioos-page .rd-check--plain label { grid-template-columns: 24px minmax(0, 1fr); }
body.aioos-page .rd-check--plain label::after { content: none; }
body.aioos-page .rd-check--plain label > span { grid-column: 2; }
body.aioos-page .rd-box {
  appearance: none; -webkit-appearance: none; grid-column: 1; grid-row: 1; width: 24px; height: 24px; margin: .1em 0 0; border: 1.5px solid var(--accent); border-radius: 5px;
  background: var(--panel); display: grid; place-items: center; cursor: pointer; transition: background-color 120ms var(--rd-ease);
}
body.aioos-page .rd-box::after { content: ""; width: 11px; height: 6px; border-left: 2px solid var(--panel); border-bottom: 2px solid var(--panel); transform: translateY(-1px) rotate(-45deg); opacity: 0; transition: opacity 120ms var(--rd-ease); }
body.aioos-page .rd-box:checked { background: var(--accent); }
body.aioos-page .rd-box:checked::after { opacity: 1; }
body.aioos-page .rd-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { body.aioos-page .rd-check label:hover .rd-box:not(:checked) { background: var(--tint); } }
body.aioos-page .rd-check__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 16px 0 0; }
body.aioos-page .rd-check__bar[hidden] { display: none; }
body.aioos-page .page-prose .rd-check__count { margin: 0; font-size: .875rem; font-weight: 600; color: var(--ink); }
body.aioos-page .rd-check__actions { display: flex; flex-wrap: wrap; gap: 4px 8px; }
body.aioos-page .page-prose .rd-check__note { margin: 8px 0 0; font-size: .8125rem; color: var(--muted); }
html:not(.nav-ready) body.aioos-page .rd-box { display: none; }
html:not(.nav-ready) body.aioos-page .rd-check label { grid-template-columns: 2.2em minmax(0, 1fr); cursor: default; }
html:not(.nav-ready) body.aioos-page .rd-check label::after { grid-column: 1; }
html:not(.nav-ready) body.aioos-page .rd-check label > span { grid-column: 2; }

/* ---------- related reading and the publisher block ---------- */
body.aioos-page .rd-end {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 0; margin: clamp(56px, 6vw, 80px) 0 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
body.aioos-page .rd-end > * { padding: 28px 0; min-width: 0; }
body.aioos-page .rd-end > * + * { padding-left: clamp(24px, 3vw, 40px); border-left: 1px solid var(--line-soft); }
body.aioos-page .rd-end h2 { margin: 0 0 12px; font-size: 1.375rem; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
body.aioos-page .rd-end p { margin: 0 0 12px; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
body.aioos-page .rd-end ul { margin: 0; padding: 0; list-style: none; }
body.aioos-page .rd-end li { border-bottom: 1px solid var(--line-soft); }
body.aioos-page .rd-end li a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 10px 0; color: var(--ink); font-weight: 550; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
body.aioos-page .rd-end li a:hover { color: var(--accent); text-decoration-color: currentColor; }
body.aioos-page .rd-end .page-link { color: var(--accent); }
@media (max-width: 760px) {
  body.aioos-page .rd-end { grid-template-columns: minmax(0, 1fr); }
  body.aioos-page .rd-end > * + * { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* Demo invitation: the shell panel with the design's outline action and its arrow nudge. */
body.aioos-page .cta-box > div > a { min-height: 54px; }
body.aioos-page .cta-box > div > a::after { display: inline-block; transition: transform 160ms var(--rd-ease); }
@media (hover: hover) { body.aioos-page .cta-box > div > a:hover::after { transform: translate(2px, -2px); } }

/* Folios: a decorative chapter number beside a heading; the heading keeps its own number for every reader. */
body.aioos-page [data-folio]::before {
  content: attr(data-folio); content: attr(data-folio) / "";
  display: block; font-family: var(--rd-folio); font-weight: 400; letter-spacing: 0; line-height: .9; color: var(--accent);
}

/* =========================================================== editorial template (EU AI Act guide, Redaktion) */
body.aioos-page .ed-article {
  --page-rail: 224px; --page-reading: 736px;
  grid-template-columns: var(--page-rail) minmax(0, var(--page-reading)) minmax(0, 288px);
  grid-template-areas: "crumbs crumbs crumbs" "toc head note" "toc body body" "toc after after";
  column-gap: 32px;
}
body.aioos-page .ed-article > .ed-head { grid-area: head; min-width: 0; padding-bottom: clamp(40px, 4.4vw, 64px); }
body.aioos-page .ed-article > .ed-note { grid-area: note; align-self: start; }
body.aioos-page .ed-article > article { grid-area: body; max-width: var(--page-reading); }
body.aioos-page .ed-article > :is(.rd-end, .cta-box) { grid-column: 2; max-width: var(--page-reading); }
body.aioos-page .ed-article > .page-toc { grid-row: 2 / span 4; align-self: start; }
body.aioos-page .ed-head .page-kicker { margin-bottom: 18px; }
body.aioos-page .ed-head h1 {
  margin: 0; font-family: var(--type-family); font-weight: 650; font-size: clamp(2.25rem, 1.2rem + 3.3vw, 3.75rem); line-height: 1.06; letter-spacing: -.045em;
  text-wrap: balance;
}
body.aioos-page .ed-head .page-byline { margin: 22px 0 0; }
body.aioos-page .ed-lead { margin-top: 28px; }
body.aioos-page .ed-lead p { margin: 0 0 16px; max-width: var(--rd-measure); font-size: clamp(1.0625rem, .98rem + .4vw, 1.3125rem); line-height: 1.6; }
body.aioos-page .ed-lead p:last-child { margin-bottom: 0; }
body.aioos-page .ed-lead p + p { font-size: clamp(1rem, .96rem + .2vw, 1.125rem); color: var(--muted); }
body.aioos-page .ed-lead a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* The paper note beside the cover: a typographic annotation, not a seal. */
body.aioos-page .ed-note { position: relative; margin-top: 8px; }
body.aioos-page .ed-note__sheet {
  position: relative; padding: 26px 26px 24px; border: 1px solid #473b7026; border-radius: var(--radius-card); background: var(--tint);
  box-shadow: var(--shadow-block); transform: rotate(-2.2deg);
}
body.aioos-page .ed-note__sheet::before { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border-radius: var(--radius-card); background: var(--lilac); opacity: .55; transform: rotate(4deg); }
body.aioos-page .ed-note__big { display: block; font-family: var(--type-family); font-size: clamp(2.75rem, 3.6vw, 3.5rem); font-weight: 650; line-height: 1; letter-spacing: -.05em; color: var(--accent); }
body.aioos-page .ed-note__sub { display: block; margin-top: 12px; font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
body.aioos-page .ed-note__line { display: block; width: 48px; height: 2px; margin: 16px 0 12px; background: var(--accent); }
body.aioos-page .ed-note__meta { display: block; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
body.aioos-page .ed-note__meta + .ed-note__meta { margin-top: 2px; }

/* Chapters: folio numerals sit in the gutter left of the reading column. */
body.aioos-page .ed-body > h2,
body.aioos-page .ed-body > section > h2 { position: relative; scroll-margin-top: var(--anchor-offset); }
/* The folio gets its own gutter inside the reading column, so it can never reach the sticky contents rail. */
@media (min-width: 1001px) {
  body.aioos-page .ed-body:has(h2[data-folio]) { padding-left: 96px; }
}
body.aioos-page .ed-body h2[data-folio]::before {
  position: absolute; right: calc(100% + 20px); top: .02em; font-size: clamp(3rem, 4.6vw, 4.5rem); color: var(--accent);
}
body.aioos-page .ed-body > h2 + p,
body.aioos-page .ed-body > section > h2 + p { font-size: clamp(1.0625rem, 1rem + .2vw, 1.1875rem); }
body.aioos-page .ed-body > h2:not(:first-child) { padding-top: clamp(40px, 4.4vw, 56px); border-top: 1px solid var(--line-soft); }
body.aioos-page .ed-body > h2:not(:first-child)[data-folio]::before { top: calc(clamp(40px, 4.4vw, 56px) + .02em); }

/* Two roles as two titled panels. */
body.aioos-page .page-prose .ed-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
body.aioos-page .page-prose .ed-roles > li { margin: 0; padding: 22px 24px; border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel); font-size: .9375rem; line-height: 1.65; }
body.aioos-page .page-prose .ed-roles > li > strong:first-child { display: block; margin-bottom: 8px; font-size: 1.0625rem; line-height: 1.35; }
@media (max-width: 760px) { body.aioos-page .page-prose .ed-roles { grid-template-columns: minmax(0, 1fr); } }

body.aioos-page .ed-panel { margin: 28px 0; padding: clamp(22px, 2.6vw, 32px); border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel); }
body.aioos-page .page-prose .ed-panel > h3 { margin-top: 0; }
body.aioos-page .ed-panel > :last-child { margin-bottom: 0; }

/* Numbered requirements. */
body.aioos-page .page-prose .ed-req { margin: 18px 0 24px; padding: 0; list-style: none; counter-reset: ed-req; display: grid; gap: 14px; }
body.aioos-page .page-prose .ed-req > li { position: relative; margin: 0; padding-left: 48px; counter-increment: ed-req; }
body.aioos-page .ed-req > li::before {
  content: counter(ed-req); position: absolute; left: 0; top: .05em; width: 30px; height: 30px; border: 1.5px solid var(--accent); border-radius: var(--radius-circle);
  display: grid; place-items: center; font-size: .875rem; font-weight: 650; color: var(--accent); background: var(--tint);
}

/* Greeting examples: three equal cards, every one copyable. */
body.aioos-page .ed-greetings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0 28px; }
body.aioos-page .ed-greeting, body.aioos-page .page-prose .ed-greeting { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 20px; border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel); min-width: 0; }
body.aioos-page .ed-greeting figcaption { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--ink); }
body.aioos-page .page-prose .ed-greeting blockquote { margin: 0; padding: 0; border: 0; font-size: .9375rem; line-height: 1.6; }
body.aioos-page .ed-greeting blockquote em { font-style: normal; }
body.aioos-page .ed-greeting .rd-copy { align-self: flex-start; margin-top: auto; min-width: 9.5em; }
body.aioos-page .page-prose .ed-greeting .rd-copy__status { padding: 0; min-height: 0; }
@media (max-width: 1100px) { body.aioos-page .ed-greetings { grid-template-columns: minmax(0, 1fr); } }

/* What does not suffice: plain ruled rows, ink and violet only. */
body.aioos-page .page-prose .ed-rows { margin: 16px 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
body.aioos-page .page-prose .ed-rows > li { margin: 0; padding: 14px 0 14px 28px; position: relative; border-bottom: 1px solid var(--line-soft); }
body.aioos-page .ed-rows > li::before { content: ""; position: absolute; left: 4px; top: 1.45em; width: 10px; height: 2px; background: var(--accent); }

/* Operator checklist: five numbered groups with a personal reading mark. */
body.aioos-page .page-prose .ed-checklist { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
body.aioos-page .page-prose .ed-checklist > li { max-width: none; margin: 0; padding: 24px 0 20px 44px; position: relative; border-bottom: 1px solid var(--line-soft); }
body.aioos-page .ed-checklist .rd-box { position: absolute; left: 0; top: 28px; }
body.aioos-page .page-prose .ed-checklist h3 { margin: 0 0 10px; font-size: clamp(1.125rem, 1.04rem + .35vw, 1.3125rem); }
body.aioos-page .ed-checklist > li > :last-child { margin-bottom: 0; }
html:not(.nav-ready) body.aioos-page .page-prose .ed-checklist > li { padding-left: 0; }

/* The three rule areas: an accessible two-branch figure, the second representation of the text below it. */
body.aioos-page .ed-flow { margin: 28px 0 32px; padding: clamp(20px, 2.6vw, 32px); border-radius: var(--radius-card); background: var(--tint); }
body.aioos-page .ed-flow__in { display: flex; flex-direction: column; align-items: center; }
body.aioos-page .page-prose .ed-flow__node { margin: 0; max-width: 100%; padding: 12px 20px; border: 1px solid #473b7055; border-radius: var(--radius-sm); background: var(--panel); text-align: center; font-size: .9375rem; line-height: 1.45; }
body.aioos-page .ed-flow__node strong { display: block; font-weight: 650; }
body.aioos-page .page-prose .ed-flow__node ol { display: inline-grid; justify-items: start; gap: 2px; margin: 6px 0 0; padding-left: 1.4em; text-align: left; }
body.aioos-page .page-prose .ed-flow__node ol li { margin: 0; max-width: none; padding: 0; }
body.aioos-page .ed-flow__stem { display: block; width: 2px; height: 28px; background: var(--accent); }
body.aioos-page .ed-flow__fork { position: relative; display: block; width: calc(50% + 2px); height: 26px; margin-top: 14px; border: 2px solid var(--accent); border-bottom: 0; border-radius: 8px 8px 0 0; }
body.aioos-page .ed-flow__fork::before { content: ""; position: absolute; left: 50%; top: -16px; width: 2px; height: 14px; margin-left: -1px; background: var(--accent); }
body.aioos-page .page-prose .ed-flow__branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; width: 100%; margin: 0; padding: 0; list-style: none; }
body.aioos-page .page-prose .ed-flow__branches > li { margin: 0 6px; max-width: none; padding: 16px 18px; border: 1px solid #473b7055; border-radius: var(--radius-sm); background: var(--panel); }
body.aioos-page .ed-flow__branches > li > strong { display: block; margin-bottom: 6px; font-weight: 650; }
body.aioos-page .page-prose .ed-flow__branches ul { margin: 0; padding-left: 1.15em; font-size: .9375rem; line-height: 1.55; }
body.aioos-page .page-prose .ed-flow__branches ul li { margin: 0 0 2px; padding: 0; }
@media (max-width: 560px) {
  body.aioos-page .page-prose .ed-flow__branches { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.aioos-page .page-prose .ed-flow__branches > li { margin: 0; }
  body.aioos-page .ed-flow__fork { width: 2px; height: 28px; margin-top: 0; border: 0; border-radius: 0; background: var(--accent); }
  body.aioos-page .ed-flow__fork::before { content: none; }
}

/* Timeline: two date-led rows. */
body.aioos-page .page-prose .ed-timeline { margin: 20px 0 28px; padding: 0; list-style: none; position: relative; }
body.aioos-page .page-prose .ed-timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: color-mix(in srgb, var(--accent) 40%, var(--paper)); }
body.aioos-page .page-prose .ed-timeline > li { position: relative; margin: 0; padding: 4px 0 18px 36px; }
body.aioos-page .ed-timeline > li::before { content: ""; position: absolute; left: 0; top: .55em; width: 16px; height: 16px; border-radius: var(--radius-circle); background: var(--accent); box-shadow: 0 0 0 4px var(--paper); }
body.aioos-page .ed-timeline > li > strong:first-child { display: block; }

/* Redaktion: ruled rows, a directory and a company colophon. */
body.aioos-page .page-prose .ed-list { margin: 18px 0 24px; padding: 0; list-style: none; counter-reset: ed-list; border-top: 1px solid var(--line-soft); }
body.aioos-page .page-prose .ed-list > li { position: relative; margin: 0; max-width: none; padding: 16px 0 16px 52px; border-bottom: 1px solid var(--line-soft); counter-increment: ed-list; }
body.aioos-page .ed-list > li::before { content: counter(ed-list, decimal-leading-zero); position: absolute; left: 0; top: 17px; font-family: var(--rd-folio); font-size: 1.625rem; line-height: 1; color: var(--accent); }
body.aioos-page .page-prose .ed-list > li > strong:first-child { display: block; }
body.aioos-page .page-prose .ed-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 20px 0; padding: 0; list-style: none; }
body.aioos-page .page-prose .ed-directory > li { margin: 0; max-width: none; padding: 14px 0; border-top: 1px solid var(--line-soft); font-size: .9375rem; line-height: 1.6; color: var(--muted); }
body.aioos-page .ed-directory > li > strong:first-child { display: block; font-size: 1rem; color: var(--ink); }
@media (max-width: 760px) { body.aioos-page .page-prose .ed-directory { grid-template-columns: minmax(0, 1fr); } }
body.aioos-page .page-prose .ed-people { margin: 18px 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; }
body.aioos-page .page-prose .ed-people > li { margin: 0; max-width: none; padding: 20px 22px; border: 1px solid var(--line-card); border-radius: var(--radius-card); background: var(--panel); }
body.aioos-page .page-prose .ed-facts { margin: 18px 0 0; padding: 22px 24px; list-style: none; border-radius: var(--radius-card); background: var(--panel); border: 1px solid var(--line-card); }
body.aioos-page .page-prose .ed-facts > li { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 4px 20px; margin: 0; max-width: none; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
body.aioos-page .page-prose .ed-facts > li:last-child { border-bottom: 0; }
@media (max-width: 560px) { body.aioos-page .page-prose .ed-facts > li { grid-template-columns: minmax(0, 1fr); } }
body.aioos-page .ed-colophon .ed-note__big { font-family: var(--display); font-weight: 400; letter-spacing: 0; font-size: clamp(2.75rem, 4vw, 3.5rem); }

/* ---------- responsive editorial grid ---------- */
@media (max-width: 1199px) {
  body.aioos-page .ed-article { grid-template-columns: var(--page-rail) minmax(0, var(--page-reading)); grid-template-areas: "crumbs crumbs" "toc head" "toc note" "toc body" "toc after"; }
  body.aioos-page .ed-article { --page-rail: 192px; }
  body.aioos-page .ed-article > .ed-note { display: none; }
  body.aioos-page .ed-body h2[data-folio]::before { position: static; margin-bottom: 10px; font-size: 2.5rem; }
  body.aioos-page .ed-body > h2:not(:first-child)[data-folio]::before { top: auto; }
}
@media (max-width: 1000px) {
  body.aioos-page .ed-article { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "head" "toc" "body" "after"; }
  body.aioos-page .ed-article > :is(.rd-end, .cta-box) { grid-column: 1; }
  body.aioos-page .ed-article > .page-toc-mobile { grid-area: toc; }
}
@media (max-width: 760px) {
  body.aioos-page .ed-body h2[data-folio]::before { font-size: 2.25rem; margin-bottom: 8px; }
}

/* Narrow phones: long German compounds hyphenate instead of widening a line. */
@media (max-width: 400px) {
  body.aioos-page .page-prose :is(p, li, dd, td, th, figcaption, summary) { hyphens: auto; }
}
@media (max-width: 1023px) { body.aioos-page .page-prose .rd-stack td { hyphens: auto; } }

/* ---------- forced colours and print ---------- */
@media (forced-colors: active) {
  body.aioos-page :is(.rd-q, .rd-chapter, .rd-disclosure, .rd-code, .ed-panel, .ed-greeting, .ed-flow__node, .ed-roles > li) { border: 1px solid CanvasText; }
  body.aioos-page .rd-box { border-color: CanvasText; }
  body.aioos-page .rd-box:checked { background: Highlight; }
  body.aioos-page .ed-note, body.aioos-page [data-folio]::before { display: none; }
}
@media print {
  body.aioos-page details > :not(summary) { display: block !important; }
  body.aioos-page details::details-content { content-visibility: visible; display: block; }
  body.aioos-page .rd-q, body.aioos-page .rd-chapter, body.aioos-page .rd-disclosure { border: 0; background: none; }
  body.aioos-page .rd-q > summary::after, body.aioos-page .rd-chapter > summary::after, body.aioos-page .rd-disclosure > summary::after { content: none; }
  body.aioos-page :is(.rd-copy, .rd-toolbar, .rd-check__actions, .ed-note, .rd-end) { display: none !important; }
  body.aioos-page .ed-article { display: block; }
  body.aioos-page [data-folio]::before { display: none; }
  /* Protocol-only print mode (reading.js): just the checklist the reader asked for. */
  html.rd-print-only body.aioos-page .page-main *:not(.rd-print-target, .rd-print-target *) { visibility: hidden; }
  html.rd-print-only body.aioos-page .rd-print-target { visibility: visible; position: absolute; left: 0; top: 0; width: 100%; }
  html.rd-print-only body.aioos-page .site-footer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.aioos-page .ed-note__sheet { transform: none; }
}
