/* AIOOS editorial guides (hub/ki-telefonassistent, hub/tourismus): the family template on the long-form article.

   Loaded after shell.css and scoped to .page-article--guide, so other article pages keep the shared template.
   A business field guide on warm paper: a cover with the full title and a small paper annotation, a numbered
   chapter rail beside one calm reading column, margin notes that repeat a figure from the text beside it,
   the four-stage explainer, native disclosures for questions and methods, a numbered source ledger, then the
   personal demo panel, the editorial colophon with related guides and the shared closing band.

   Layout: 1440 and up 224 + 32 + 736 + 32 + 288 = 1312px; below 1200 the notes join the reading column; below
   1001 the rail becomes the sticky contents row under the header. Every word is in the HTML and visible
   without JavaScript; editorial.js only adds the stage trace, the current chapter in the contents row and the
   copy control for the queries. Reduced motion shows every final state at once. */

body.aioos-page .page-article--guide {
  --ed-note: 240px;
  --ed-gap: 32px;
  grid-template-areas: "crumbs crumbs" "cover cover" "toc body" "toc after";
}
body.aioos-page .page-article--guide > .ed-cover { grid-area: cover; }
@media (min-width: 1200px) {
  body.aioos-page .page-article--guide {
    grid-template-columns: minmax(176px, 224px) minmax(0, 736px) minmax(220px, 288px);
    grid-template-areas: "crumbs crumbs crumbs" "cover cover cover" "toc body notes" "toc after notes";
    column-gap: var(--ed-gap); justify-content: space-between;
    width: min(100% - var(--gutter) * 2, 1312px);
  }
}
@media (max-width: 1000px) {
  body.aioos-page .page-article--guide { grid-template-areas: "crumbs" "cover" "toc" "body" "after"; }
}

/* ---------- cover ---------- */
body.aioos-page .ed-cover {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; min-width: 0;
  padding-bottom: clamp(36px, 4.4vw, 64px); margin-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line);
}
body.aioos-page .ed-cover__copy { min-width: 0; }
body.aioos-page .ed-cover h1 {
  margin: 18px 0 0; font-family: var(--type-family); font-weight: 650; letter-spacing: -.045em; line-height: 1.04;
  font-size: clamp(2rem, 1.2rem + 4.2vw, 5.5rem); text-wrap: balance; overflow-wrap: break-word;
}
body.aioos-page .ed-cover:has(.ed-tabs) h1 { font-size: clamp(2rem, 1.15rem + 3.4vw, 4.5rem); }
body.aioos-page .ed-cover .page-byline { margin: 24px 0 0; font-size: .9375rem; }
body.aioos-page .ed-cover .page-byline a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
body.aioos-page .ed-cover .page-byline a:hover { text-decoration-thickness: 2px; }
@media (min-width: 1100px) {
  body.aioos-page .ed-cover { grid-template-columns: minmax(0, 1fr) minmax(220px, 26%); column-gap: 48px; }
}

body.aioos-page .ed-cover__art { position: relative; margin: 0; min-width: 0; }
body.aioos-page .ed-cover__art ol { margin: 0; padding: 0; list-style: none; }
body.aioos-page .ed-cover__art figcaption { margin-top: 18px; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
/* Phone guide: four paper slips, two cream and two lilac, one route along their edge. */
body.aioos-page .ed-stack ol { display: grid; gap: 0; padding-right: 34px; }
body.aioos-page .ed-stack li {
  position: relative; display: flex; align-items: baseline; gap: 10px; min-height: 84px; padding: 18px 20px 30px;
  border: 1px solid #ffffffa6; border-radius: var(--radius-surface); background: var(--panel); box-shadow: var(--shadow-block);
  font-size: clamp(.9375rem, .85rem + .3vw, 1.0625rem); font-weight: 550; letter-spacing: -.01em; line-height: 1.3;
}
body.aioos-page .ed-stack li + li { margin-top: -22px; }
body.aioos-page .ed-stack li:nth-child(1) { transform: rotate(1.6deg); }
body.aioos-page .ed-stack li:nth-child(2) { transform: rotate(-2deg); margin-left: -10px; }
body.aioos-page .ed-stack li:nth-child(3) { transform: rotate(1.4deg); background: #ebe3f0; }
body.aioos-page .ed-stack li:nth-child(4) { transform: rotate(-1deg); margin-left: -6px; background: #ddd2e8; min-height: 112px; }
body.aioos-page .ed-stack li > span { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 650; }
body.aioos-page .ed-stack li::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 18px; border-top: 1px solid #473b7040; }
body.aioos-page .ed-stack__route { position: absolute; right: 0; top: 18px; width: 30px; height: calc(100% - 92px); fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
/* Tourism guide: three connected paper tabs. */
body.aioos-page .ed-tabs ol { position: relative; display: grid; gap: 26px; padding-left: 36px; }
body.aioos-page .ed-tabs li {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 22px; border: 1px solid #ffffffa6; border-radius: var(--radius-surface);
  background: #ebe3f0; box-shadow: 8px 9px 0 #a99abd, 14px 22px 22px #32233a1f; font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em;
}
body.aioos-page .ed-tabs li:nth-child(2) { margin-left: 18px; }
body.aioos-page .ed-tabs .ed-i { width: 30px; height: 30px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body.aioos-page .ed-tabs__route { position: absolute; left: 0; top: 0; width: 40px; height: 100%; fill: none; stroke: var(--accent); stroke-width: 1.6; overflow: visible; }
body.aioos-page .ed-tabs__route path { vector-effect: non-scaling-stroke; }
@media (max-width: 1099px) {
  body.aioos-page .ed-stack ol { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-right: 0; }
  body.aioos-page .ed-stack li, body.aioos-page .ed-stack li + li { margin: 0 !important; transform: none !important; min-height: 0; padding: 14px 14px 24px; flex-direction: column; gap: 4px; }
  body.aioos-page .ed-stack li::after { bottom: 12px; left: 14px; right: 14px; }
  body.aioos-page .ed-stack__route { display: none; }
  body.aioos-page .ed-tabs ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-left: 0; }
  body.aioos-page .ed-tabs li { margin: 0 !important; min-height: 60px; padding: 12px 16px; font-size: 1.0625rem; box-shadow: var(--shadow-block); }
  body.aioos-page .ed-tabs__route { display: none; }
}
@media (max-width: 599px) {
  body.aioos-page .ed-stack ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.aioos-page .ed-tabs ol { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body.aioos-page .ed-tabs li { min-height: 52px; }
  body.aioos-page .ed-cover__art figcaption { font-size: .875rem; }
}

/* ---------- contents: rail on desktop, a sticky row under the header below 1001px ---------- */
body.aioos-page .page-article--guide .page-toc { padding-top: 0; }
body.aioos-page .ed-toc-now { display: none; }
@media (max-width: 1000px) {
  body.aioos-page .page-article--guide > .page-toc-mobile {
    position: sticky; top: var(--navigation-height, 66px); z-index: 30; margin: 0 calc(-1 * var(--gutter)) 32px;
    border-width: 0 0 1px; border-radius: 0; background: var(--paper); box-shadow: 0 1px 0 var(--line-soft);
  }
  body.aioos-page .page-article--guide > .page-toc-mobile > summary { min-height: 48px; padding: 8px var(--gutter); gap: 14px; justify-content: flex-start; font-size: .9375rem; }
  body.aioos-page .page-article--guide > .page-toc-mobile > summary::after { margin-left: auto; }
  body.aioos-page .ed-toc-label { flex: 0 0 auto; color: var(--muted); font-weight: 550; }
  body.aioos-page .ed-toc-now:not(:empty) { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-left: 14px; border-left: 1px solid var(--line); font-weight: 600; }
  body.aioos-page .ed-toc-now .page-toc__n { margin-right: 8px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
  body.aioos-page .page-article--guide > .page-toc-mobile[open] > nav { max-height: calc(100dvh - var(--navigation-height, 66px) - 64px); overflow-y: auto; overscroll-behavior: contain; padding-inline: calc(var(--gutter) - 8px); }
  body.aioos-page .page-article--guide > .page-toc-mobile a[aria-current="location"] { background: var(--tint); color: var(--accent); font-weight: 600; }
  body.aioos-page .page-article--guide .ed-prose h2 { scroll-margin-top: calc(var(--navigation-height, 66px) + 64px); }
}
@media (max-width: 400px) {
  body.aioos-page .page-article--guide > .page-toc-mobile:has(.ed-toc-now:not(:empty)) .ed-toc-label { display: none; }
  body.aioos-page .ed-toc-now:not(:empty) { padding-left: 0; border-left: 0; }
}

/* ---------- reading column ---------- */
body.aioos-page .ed-prose { counter-reset: ed-chapter; }
body.aioos-page .ed-prose .ed-lead { font-size: clamp(1.0625rem, .95rem + .5vw, 1.3125rem); line-height: 1.6; color: var(--ink); margin-bottom: 0; }
body.aioos-page .ed-prose > h2 {
  counter-increment: ed-chapter; margin-top: clamp(56px, 6vw, 88px); padding-top: clamp(28px, 3vw, 36px); border-top: 1px solid var(--line-soft);
}
body.aioos-page .ed-prose > h2::before {
  content: counter(ed-chapter, decimal-leading-zero) / ""; display: block; margin-bottom: 12px;
  font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 2rem + 1.6vw, 3.75rem); line-height: .9; letter-spacing: .01em; color: #a596c2;
}
body.aioos-page .ed-prose > h2 + p { margin-top: 0; }

/* Margin notes repeat a figure or a sentence from the text beside them; they never replace the text or its caveat. */
body.aioos-page .ed-note {
  display: grid; gap: 6px; margin: 28px 0; padding: 22px 24px; border: 1px solid var(--line-card); border-radius: var(--radius-card);
  background: var(--panel); font-size: .9375rem; line-height: 1.55; color: var(--ink);
}
body.aioos-page .ed-note p { margin: 0; }
body.aioos-page .ed-note__fig { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.5rem); font-weight: 550; line-height: 1.05; letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
body.aioos-page .ed-note__fig ~ .ed-note__fig { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
body.aioos-page .ed-note__fig--small { font-size: 1.75rem; }
body.aioos-page .ed-note__fig--price > span { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
body.aioos-page .ed-note__label { font-weight: 600; }
body.aioos-page .ed-note__kicker { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
body.aioos-page .ed-note__src { margin-top: 8px !important; font-size: .8125rem; color: var(--muted); }
body.aioos-page .ed-ratio { display: block; height: 10px; margin: 4px 0 2px; border-radius: var(--radius-chip); background: #d8cfe3; overflow: hidden; }
body.aioos-page .ed-ratio > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
body.aioos-page .ed-note--quote { padding: 22px 20px; border: 0; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-card) var(--radius-card) 0; background: var(--tint); }
body.aioos-page .ed-note--quote p { font-size: clamp(1.375rem, 1.2rem + .5vw, 1.5rem); font-weight: 600; line-height: 1.2; letter-spacing: -.03em; text-wrap: balance; }
@media (min-width: 1200px) {
  body.aioos-page .ed-prose .ed-note {
    float: right; clear: right; position: relative; width: var(--ed-note); margin: 6px calc(-1 * (var(--ed-gap) + var(--ed-note))) 24px 0;
  }
}

/* Four stages: a 2-by-2 panel with sequence arrows on wide screens, one connected column on phones. */
body.aioos-page .ed-stages { margin: 28px 0 32px; }
body.aioos-page .ed-prose .ed-stages__list { counter-reset: ed-stage; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; }
/* Sequence arrows in the gap: 1 to 2 and 3 to 4; the numbered badges carry the step from 2 to 3. */
body.aioos-page .ed-prose .ed-stages__list::before, body.aioos-page .ed-prose .ed-stages__list::after {
  content: "\2192" / ""; position: absolute; left: 50%; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: var(--radius-circle); background: var(--panel); border: 1px solid var(--line-card); color: var(--accent); font-size: 1rem; line-height: 1; pointer-events: none;
}
body.aioos-page .ed-prose .ed-stages__list::before { top: calc(25% - 8px); }
body.aioos-page .ed-prose .ed-stages__list::after { top: calc(75% + 8px); }
body.aioos-page .ed-prose .ed-stages__list > li {
  counter-increment: ed-stage; position: relative; margin: 0; padding: 70px 24px 24px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--radius-card);
  font-size: 1rem; line-height: 1.6; color: var(--ink);
}
body.aioos-page .ed-prose .ed-stages__list > li strong { display: block; margin-bottom: 6px; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.015em; }
body.aioos-page .ed-prose .ed-stages__list > li::before {
  content: counter(ed-stage) / ""; position: absolute; left: 24px; top: 22px; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--radius-circle); background: var(--accent); color: var(--panel); font-size: .9375rem; font-weight: 650;
}
body.aioos-page .ed-prose .ed-stages__list > li::after {
  content: ""; position: absolute; inset: -1px; border: 2px solid var(--accent); border-radius: inherit; opacity: 0; pointer-events: none;
}
/* Final state, also without script: the integration stage keeps the accent edge. */
body.aioos-page .ed-prose .ed-stages__list > li:last-child::after { opacity: 1; }
body.aioos-page .ed-stages.is-armed:not(.is-run) .ed-stages__list > li:last-child::after { opacity: 0; }
body.aioos-page .ed-stages.is-run .ed-stages__list > li:nth-child(-n+3)::after { animation: ed-pass 280ms var(--ease) both; }
body.aioos-page .ed-stages.is-run .ed-stages__list > li:nth-child(2)::after { animation-delay: 160ms; }
body.aioos-page .ed-stages.is-run .ed-stages__list > li:nth-child(3)::after { animation-delay: 320ms; }
body.aioos-page .ed-stages.is-run .ed-stages__list > li:last-child::after { animation: ed-arrive 120ms var(--ease) 480ms both; }
@keyframes ed-pass { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ed-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) {
  body.aioos-page .ed-prose .ed-stages__list::before, body.aioos-page .ed-prose .ed-stages__list::after { display: none; }
  body.aioos-page .ed-prose .ed-stages__list {
    grid-template-columns: minmax(0, 1fr); gap: 0; padding: 24px 20px; background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--radius-card);
    box-shadow: var(--shadow-block);
  }
  body.aioos-page .ed-prose .ed-stages__list > li { padding: 4px 0 28px 54px; background: none; border: 0; border-radius: 0; }
  body.aioos-page .ed-prose .ed-stages__list > li:last-child { padding-bottom: 0; }
  body.aioos-page .ed-prose .ed-stages__list > li::before { left: 0; top: 0; }
  body.aioos-page .ed-prose .ed-stages__list > li::after,
  body.aioos-page .ed-prose .ed-stages__list > li:last-child::after { inset: 40px auto 4px 16px; width: 2px; border: 0; border-radius: 1px; background: var(--accent); opacity: 1; transform-origin: 50% 0; animation: none; }
  body.aioos-page .ed-prose .ed-stages__list > li:last-child::after { display: none; }
  body.aioos-page .ed-stages.is-armed:not(.is-run) .ed-stages__list > li::after { transform: scaleY(0); }
  body.aioos-page .ed-stages.is-run .ed-stages__list > li::after { transform: scaleY(1); transition: transform 160ms var(--ease); animation: none !important; }
  body.aioos-page .ed-stages.is-run .ed-stages__list > li:nth-child(2)::after { transition-delay: 160ms; }
  body.aioos-page .ed-stages.is-run .ed-stages__list > li:nth-child(3)::after { transition-delay: 320ms; }
}

/* Numbered questions and cost parts; the provider ledger. */
body.aioos-page .ed-prose .ed-numbered { counter-reset: ed-n; margin: 0 0 1.4em; padding: 0; list-style: none; }
body.aioos-page .ed-prose .ed-numbered > li { counter-increment: ed-n; position: relative; margin: 0 0 14px; padding: 0 0 0 46px; }
body.aioos-page .ed-prose .ed-numbered > li::before {
  content: counter(ed-n) / ""; position: absolute; left: 0; top: .1em; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: var(--radius-circle); background: var(--tint); color: var(--accent); font-size: .875rem; font-weight: 650; line-height: 1;
}
body.aioos-page .ed-prose .ed-numbered--rows > li { margin: 0; padding: 18px 0 18px 46px; border-top: 1px solid var(--line-soft); }
body.aioos-page .ed-prose .ed-numbered--rows > li::before { top: calc(18px + .1em); }
body.aioos-page .ed-prose .ed-numbered--rows { border-bottom: 1px solid var(--line-soft); }
body.aioos-page .ed-ledger { margin: 8px 0 1.6em; border-bottom: 1px solid var(--line-soft); }
body.aioos-page .ed-prose .ed-ledger > p { margin: 0; padding: 16px 0; border-top: 1px solid var(--line-soft); }

/* Questions: native disclosures, closed by default; every answer is in the HTML. */
body.aioos-page .ed-faqs { display: grid; gap: 12px; margin: 8px 0 1.4em; }
body.aioos-page .ed-faq { border: 1px solid var(--line-card); border-radius: var(--radius-disclosure); background: var(--panel); transition: background 160ms var(--ease), border-color 160ms var(--ease); }
body.aioos-page .ed-faq > summary {
  position: relative; display: block; min-height: 68px; padding: 21px 60px 21px 24px; cursor: pointer; list-style: none; border-radius: var(--radius-disclosure);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem); font-weight: 650; line-height: 1.4; letter-spacing: -.01em;
}
body.aioos-page .ed-faq > summary::-webkit-details-marker { display: none; }
body.aioos-page .ed-faq > summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.625rem; font-weight: 400; line-height: 1; color: var(--accent);
}
body.aioos-page .ed-faq[open] > summary::after { content: "\2212"; }
body.aioos-page .ed-faq > summary:focus-visible { outline-offset: -3px; }
body.aioos-page .ed-faq:hover { border-color: var(--accent); }
body.aioos-page .ed-faq[open] { background: var(--tint); border-color: #473b7040; }
body.aioos-page .ed-faq > div { padding: 0 24px 22px; }
body.aioos-page .ed-faq > div > p { margin: 0; max-width: 62ch; }

/* Query: a disclosure with the code in its own sideways-scrolling frame. */
body.aioos-page .ed-method { margin: 24px 0 28px; border: 1px solid var(--line-card); border-radius: var(--radius-disclosure); background: var(--panel); }
body.aioos-page .ed-method > summary {
  position: relative; display: flex; align-items: center; min-height: 56px; padding: 14px 56px 14px 20px; cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 650; border-radius: var(--radius-disclosure);
}
body.aioos-page .ed-method > summary::-webkit-details-marker { display: none; }
body.aioos-page .ed-method > summary::before { content: "</>"; margin-right: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8125rem; color: var(--accent); }
body.aioos-page .ed-method > summary::after { content: "+"; position: absolute; right: 20px; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent); }
body.aioos-page .ed-method[open] > summary::after { content: "\2212"; }
body.aioos-page .ed-method > summary:hover { background: var(--tint); }
body.aioos-page .ed-method > summary:focus-visible { outline-offset: -3px; }
body.aioos-page .ed-method[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: var(--radius-disclosure) var(--radius-disclosure) 0 0; }
body.aioos-page .ed-prose .ed-method pre { margin: 0; border: 0; border-radius: 0 0 var(--radius-disclosure) var(--radius-disclosure); background: transparent; }
body.aioos-page .ed-method pre:focus-visible { outline-offset: -3px; }
body.aioos-page .ed-method__bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 8px 10px 0; }
body.aioos-page .ed-copy {
  display: inline-grid; min-width: 9.5em; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-control);
  background: var(--paper); color: var(--accent); font-size: .875rem; font-weight: 600; text-align: center;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
body.aioos-page .ed-copy > span { grid-area: 1 / 1; align-self: center; transition: opacity 120ms var(--ease); }
body.aioos-page .ed-copy > span + span { opacity: 0; }
body.aioos-page .ed-copy.is-done > span:first-child { opacity: 0; }
body.aioos-page .ed-copy.is-done > span + span { opacity: 1; }
body.aioos-page .ed-copy:hover { background: var(--tint); border-color: var(--accent); }

/* Sources: a numbered ledger; the address on its own line and allowed to wrap anywhere. */
body.aioos-page .ed-prose .ed-sources { counter-reset: ed-src; margin: 8px 0 0; padding: 0; list-style: none; font-size: .9375rem; line-height: 1.6; }
body.aioos-page .ed-prose .ed-sources > li { counter-increment: ed-src; position: relative; margin: 0 0 24px; padding-left: 46px; color: var(--ink); }
body.aioos-page .ed-prose .ed-sources > li::before {
  content: counter(ed-src) / ""; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: var(--radius-circle); background: var(--accent); color: var(--panel); font-size: .8125rem; font-weight: 650;
}
body.aioos-page .ed-prose .ed-src-url { display: block; width: fit-content; max-width: 100%; margin-top: 6px; overflow-wrap: anywhere; word-break: normal; }

/* ---------- after the article: places, colophon, related guides ---------- */
body.aioos-page .ed-places { margin-top: clamp(40px, 4vw, 56px); padding-top: clamp(28px, 3vw, 36px); border-top: 1px solid var(--line-soft); }
body.aioos-page .ed-places h2 { margin: 0 0 12px; font-family: var(--type-family); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 650; line-height: 1.18; letter-spacing: -.035em; scroll-margin-top: var(--anchor-offset); }
body.aioos-page .ed-places p { margin: 0; max-width: 62ch; font-size: clamp(1rem, .94rem + .25vw, 1.125rem); line-height: 1.7; }
body.aioos-page :is(.ed-places, .ed-end) a:not(.page-link):not(.ed-related__link) { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.aioos-page :is(.ed-places, .ed-end) a:not(.page-link):not(.ed-related__link):hover { text-decoration-thickness: 2px; }

body.aioos-page .ed-end {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: clamp(48px, 5vw, 72px); padding-top: clamp(32px, 3.4vw, 44px); border-top: 1px solid var(--line);
}
body.aioos-page .ed-author { display: grid; align-content: start; justify-items: start; gap: 8px; }
body.aioos-page .ed-author__name, body.aioos-page .ed-related__heading { margin: 0; font-family: var(--type-family); font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); font-weight: 650; line-height: 1.2; letter-spacing: -.03em; }
body.aioos-page .ed-author p { margin: 0; font-size: 1rem; color: var(--muted); }
body.aioos-page .ed-author p.ed-author__name { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); color: var(--ink); }
body.aioos-page .ed-author .page-link { color: var(--accent); }
body.aioos-page .ed-related ul { margin: 12px 0 0; padding: 0; list-style: none; }
body.aioos-page .ed-related li + li { margin-top: 0; }
body.aioos-page .ed-related__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft);
  color: var(--ink); text-decoration: none; transition: color 160ms var(--ease);
}
body.aioos-page .ed-related__kind { grid-column: 1; font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
body.aioos-page .ed-related__title { grid-column: 1; font-size: 1.0625rem; line-height: 1.4; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
body.aioos-page .ed-related__arrow { grid-column: 2; grid-row: 1 / 3; font-size: 1.375rem; color: var(--accent); transition: transform 160ms var(--ease); }
body.aioos-page .ed-related__link:hover { color: var(--accent); }
body.aioos-page .ed-related__link:hover .ed-related__title { text-decoration-color: currentColor; }
body.aioos-page .ed-related__link:hover .ed-related__arrow { transform: translateX(2px); }
@media (min-width: 761px) {
  body.aioos-page .ed-end { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: 48px; }
  body.aioos-page .ed-related { padding-left: 48px; border-left: 1px solid var(--line-soft); }
}

/* ---------- reduced motion, forced colours, print ---------- */
@media (prefers-reduced-motion: reduce) {
  body.aioos-page .ed-stages .ed-stages__list > li::after { animation: none !important; transition: none !important; }
  body.aioos-page .ed-stages.is-armed:not(.is-run) .ed-stages__list > li:last-child::after { opacity: 1; }
  body.aioos-page .ed-stages.is-armed:not(.is-run) .ed-stages__list > li::after { transform: none; }
}
@media (forced-colors: active) {
  body.aioos-page :is(.ed-note, .ed-faq, .ed-method, .ed-stack li, .ed-tabs li) { border: 1px solid CanvasText; box-shadow: none; }
  body.aioos-page :is(.ed-numbered, .ed-sources, .ed-stages__list) > li::before { forced-color-adjust: none; background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
}
@media print {
  body.aioos-page .ed-cover__art, body.aioos-page .ed-note, body.aioos-page .ed-method__bar, body.aioos-page .ed-end { display: none !important; }
  body.aioos-page .ed-cover h1 { font-size: 24pt; }
  body.aioos-page .ed-faq, body.aioos-page .ed-method { border: 0; background: none; }
  body.aioos-page .ed-faq > summary, body.aioos-page .ed-method > summary { padding: 0; min-height: 0; }
  body.aioos-page .ed-faq > summary::after, body.aioos-page .ed-method > summary::after { display: none; }
  body.aioos-page .ed-prose > h2::before { display: none; }
}
