/* TASK-116 step 8a: the editorial shell in direction D. Every prerendered editorial page (scripts/prerender.mjs,
   the PUBLIC_PAGES loop) loads /aeo/tokens.css and this file, in place of reading.css and site.css. Values come from
   the generated tokens only. Bands follow the landing: a dark masthead and footer around a light reading column.
   This file restyles the existing editorial markup; it does not import landing-d.css, which is scoped to .ld-page. */

body.aeo-page { margin: 0; background: var(--tk-light-ground); color: var(--tk-light-text); font-family: var(--tk-font-sans);
  font-size: var(--tk-type-body-size); line-height: var(--tk-type-body-line); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; --tk-focus: var(--tk-light-focus); --tk-loss: var(--tk-light-loss); }
.aeo-page *, .aeo-page *::before, .aeo-page *::after { box-sizing: border-box; }
.aeo-page img { max-width: 100%; }
.aeo-page a { color: var(--tk-light-accent); text-underline-offset: 4px; }
.aeo-page :focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; border-radius: var(--tk-radius-sm); }

.aeo-page .aeo-skip { position: absolute; left: 12px; top: 0; transform: translateY(-110%); z-index: 50; padding: 10px 14px; background: var(--tk-dark-accent); color: var(--tk-dark-on-accent); font-weight: 650; text-decoration: none; border-radius: var(--tk-radius-sm); }
.aeo-page .aeo-skip:focus { transform: translateY(12px); }

/* Masthead: the landing's dark nav band. */
.aeo-page .aeo-header { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--tk-space-7);
  min-height: 64px; padding: 0 max(var(--tk-space-6), calc((100% - 1280px) / 2 + var(--tk-space-6)));
  background: var(--tk-dark-ground); color: var(--tk-dark-text); border-bottom: 1px solid var(--tk-dark-rule); --tk-focus: var(--tk-dark-focus); --tk-loss: var(--tk-dark-loss); }
.aeo-page .aeo-brand { color: inherit; font-weight: 800; font-stretch: 112.5%; font-size: var(--tk-type-body-size); line-height: 1; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding-block: 10px; }
.aeo-page .aeo-nav { display: flex; align-items: center; gap: var(--tk-space-5); flex: 1 1 auto; }
.aeo-page .aeo-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--tk-type-label-size); color: var(--tk-dark-text-muted); text-decoration: none; }
.aeo-page .aeo-nav a:hover, .aeo-page .aeo-nav a[aria-current=page] { color: var(--tk-dark-text); }
.aeo-page .aeo-nav a[aria-current=page] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.aeo-page .aeo-nav a:last-child { margin-left: auto; padding: 0 var(--tk-space-4); border-radius: var(--tk-radius-sm); background: var(--tk-dark-accent); color: var(--tk-dark-on-accent); font-weight: var(--tk-type-button-weight); }
.aeo-page .aeo-nav a:last-child:hover { background: color-mix(in srgb, var(--tk-dark-accent) 86%, var(--tk-bone)); }

/* Reading column on the light band. */
.aeo-page .aeo-main { display: block; max-width: 1280px; margin: 0 auto; padding: var(--tk-space-6) var(--tk-space-5) var(--tk-space-7); }
.aeo-page .aeo-main:focus { outline: none; }
.aeo-page .aeo-main > article { max-width: 46rem; min-width: 0; overflow-wrap: break-word; }
/* TASK-201: the legal documents carry a URL and long words that do not fit 320px at 200% text; let them break anywhere
   rather than scroll the page sideways (WCAG 1.4.10). CSS only: the legal text is unchanged. */
.aeo-page [data-legal-doc], .aeo-page [data-legal-doc] :is(h1, h2, p, li, a) { overflow-wrap: anywhere; }
/* An address or a long word wraps rather than widening the page at 200% text. */
.aeo-page .aeo-contact a { overflow-wrap: anywhere; }
.aeo-page p { margin: 0 0 var(--tk-space-4); }
.aeo-page .aeo-meta { margin: 0 0 var(--tk-space-5); font-size: var(--tk-type-caption-size); line-height: var(--tk-type-caption-line); font-weight: 600;
  letter-spacing: var(--tk-kicker-tracking); font-stretch: var(--tk-type-caption-stretch); text-transform: uppercase; color: var(--tk-light-text-muted); }
.aeo-page .aeo-meta time { white-space: nowrap; }
.aeo-page h1 { margin: 0 0 var(--tk-space-5); max-width: 18em; font-size: var(--tk-type-h1-size); line-height: 1.02; font-weight: var(--tk-type-h1-weight);
  font-stretch: var(--tk-type-h1-stretch); letter-spacing: var(--tk-type-h1-tracking); text-wrap: balance; overflow-wrap: anywhere; }
.aeo-page h2 { margin: 0 0 var(--tk-space-4); font-size: var(--tk-type-h2-size); line-height: var(--tk-type-h2-line); font-weight: var(--tk-type-h2-weight);
  font-stretch: var(--tk-type-h2-stretch); letter-spacing: var(--tk-type-h2-tracking); text-wrap: balance; overflow-wrap: anywhere; scroll-margin-top: 96px; }
.aeo-page .aeo-answer { margin: 0 0 var(--tk-space-7); max-width: 38em; font-size: var(--tk-type-lead-size); line-height: var(--tk-type-lead-line); }
.aeo-page .aeo-section { margin-top: var(--tk-space-6); padding-top: var(--tk-space-5); border-top: 1px solid var(--tk-light-rule); }
.aeo-page .aeo-section ul { margin: 0 0 var(--tk-space-4); padding-left: 1.25em; }
.aeo-page .aeo-section li { margin: var(--tk-space-2) 0; }
.aeo-page .aeo-section li::marker { color: var(--tk-light-text-muted); }

/* Native article navigation and permalinks work without JavaScript. Keep the reading column and its tokens. */
.aeo-page .aeo-contents { margin: 0 0 var(--tk-space-6); border-block: 1px solid var(--tk-light-rule-strong); }
.aeo-page .aeo-contents summary { min-height: 48px; padding: var(--tk-space-3) 0; cursor: pointer; font-weight: 600; }
.aeo-page .aeo-contents nav { padding-bottom: var(--tk-space-4); }
.aeo-page .aeo-contents ol { margin: 0; padding-left: 1.5em; }
.aeo-page .aeo-contents li::marker { color: var(--tk-light-text-muted); }
.aeo-page .aeo-contents a { display: inline-flex; align-items: center; min-height: 44px; padding-block: var(--tk-space-2); }
.aeo-page h2 .aeo-section-link { color: inherit; text-decoration: none; }
.aeo-page .aeo-section-link span { color: var(--tk-light-text-muted); font-size: var(--tk-type-body-size); font-weight: 400; white-space: nowrap; }
.aeo-page h2 .aeo-section-link:hover, .aeo-page h2 .aeo-section-link:focus-visible { text-decoration: underline; }
.aeo-page .aeo-section h2:target { outline: 2px solid var(--tk-focus); outline-offset: 6px; border-radius: var(--tk-radius-sm); }

/* Related reading and guide lists: a ruled index under a full-weight top rule. */
.aeo-page .aeo-related { margin-top: var(--tk-space-7); padding-top: var(--tk-space-5); border-top: 2px solid var(--tk-light-text); }
.aeo-page .aeo-related > p { color: var(--tk-light-text-muted); }
.aeo-page .aeo-related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--tk-light-rule); }
.aeo-page .aeo-related li { border-bottom: 1px solid var(--tk-light-rule); }
.aeo-page .aeo-related a { display: block; padding: var(--tk-space-4) 0; min-height: 44px; font-weight: 600; text-decoration: none; }
.aeo-page .aeo-related a:hover { text-decoration: underline; }
.aeo-page .aeo-guide-summary { display: block; margin-top: 6px; max-width: 40em; font-size: var(--tk-type-body-size); line-height: var(--tk-type-body-line); font-weight: 400; color: var(--tk-light-text-muted); }
.aeo-page .aeo-topics { display: flex; flex-wrap: wrap; gap: 0 var(--tk-space-5); margin-top: var(--tk-space-7); font-size: var(--tk-type-label-size); font-weight: 600; }
.aeo-page .aeo-topics a { display: inline-flex; align-items: center; min-height: 44px; }
.aeo-page .aeo-return { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; margin-top: var(--tk-space-7); padding: 0 22px; border-radius: var(--tk-radius-sm);
  background: var(--tk-light-accent); color: var(--tk-light-on-accent); font-size: var(--tk-type-button-size); font-weight: var(--tk-type-button-weight); text-decoration: none; }
.aeo-page .aeo-return:hover { background: var(--tk-brand-pressed);}
.aeo-page .aeo-contact a { font-weight: 600; }

/* Site directory (/sitemap). */
.aeo-page .site-directory > section { margin: var(--tk-space-7) 0 0; padding-top: var(--tk-space-5); border-top: 2px solid var(--tk-light-text); }
.aeo-page .site-directory ul { list-style: none; margin: 0; padding: 0; }
.aeo-page .site-directory li { padding: var(--tk-space-4) 0; border-bottom: 1px solid var(--tk-light-rule); }
.aeo-page .site-directory li > a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.aeo-page .site-directory p { margin: 4px 0 0; font-size: var(--tk-type-body-size); color: var(--tk-light-text-muted); }

/* Introduction with the static mascot (/about), a neutral slot per the mascot ruling. */
.aeo-page .site-introduction { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--tk-space-5); align-items: start; }
.aeo-page .site-introduction .aeo-answer { margin-bottom: 0; }
.aeo-page .site-mascot { display: block; width: 96px; height: 96px; flex: none; image-rendering: pixelated; background: url("/brand/mascot/pigeon-standing.png") center/96px 96px no-repeat; }
.aeo-page .site-mascot > img { display: block; width: 96px; height: 96px; visibility: hidden; }

/* Footer: the landing's dark sunk band (shared markup from scripts/site-shell.mjs). */
.aeo-page .site-footer { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--tk-space-6);
  padding: var(--tk-space-8) max(var(--tk-space-6), calc((100% - 1280px) / 2 + var(--tk-space-6)));
  background: var(--tk-dark-sunk); color: var(--tk-dark-text-muted); border-top: 1px solid var(--tk-dark-rule); font-size: var(--tk-type-body-size); --tk-focus: var(--tk-dark-focus); --tk-loss: var(--tk-dark-loss); }
.aeo-page .site-footer a { color: var(--tk-dark-text); text-underline-offset: 3px; }
.aeo-page .site-footer nav { display: grid; gap: 4px; align-content: start; }
.aeo-page .site-footer nav a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.aeo-page .site-footer nav a:hover { text-decoration: underline; }
.aeo-page .site-footer p { margin: 4px 0 0; }
.aeo-page .site-footer .site-disclaimer, .aeo-page .site-footer [data-legal-links] { grid-column: 1 / -1; max-width: 60em; }
.aeo-page .site-footer .site-disclaimer:first-of-type { margin-top: 0; padding-top: var(--tk-space-5); border-top: 1px solid var(--tk-dark-rule); }
.aeo-page .site-footer [data-legal-links] { display: flex; flex-wrap: wrap; gap: var(--tk-space-4); }
.aeo-page .footer-identity { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.aeo-page .footer-identity > div { flex: 1 1 0; min-width: min-content; }

@media (max-width: 899px) {
  .aeo-page .aeo-header { position: static; gap: 0 var(--tk-space-4); min-height: 0; padding-inline: var(--tk-space-4); }
  .aeo-page .aeo-nav { order: 2; flex: 1 0 100%; flex-wrap: wrap; gap: 0 var(--tk-space-4); border-top: 1px solid var(--tk-dark-rule); }
  .aeo-page .aeo-nav a:last-child { margin-left: 0; margin-block: var(--tk-space-2); }
  .aeo-page .aeo-main { padding: var(--tk-space-7) var(--tk-space-4) var(--tk-space-8); }
  /* Chromium's balanced wrapping lets an unbreakable word overflow at 200% text; plain wrapping breaks it. */
  .aeo-page h1, .aeo-page h2 { text-wrap: pretty; }
  .aeo-page .site-footer { grid-template-columns: minmax(0, 1fr); padding-inline: var(--tk-space-4); }
  .aeo-page .site-introduction { grid-template-columns: minmax(0, 1fr); gap: var(--tk-space-4); }
}
@media (max-width: 899px) and (min-width: 480px) {
  .aeo-page .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aeo-page .site-footer > div:first-child { grid-column: 1 / -1; }
}

/* Keep a keyboard-focused editorial link below the sticky public header, including Shift+Tab.
   Use the same clearance as the in-page heading anchors; mobile keeps its static header. */
@media (min-width: 900px) {
  .aeo-page .aeo-main a { scroll-margin-block-start: 96px; }
}
/* Learn-only teaching figure. All numbers remain explicitly fictional in the native reading order. */
.aeo-page .learn-example { margin: var(--tk-space-7) 0; padding: var(--tk-space-5); border: 1px solid var(--tk-light-rule-strong); border-top: 4px solid var(--tk-light-accent); }
.aeo-page .learn-example__notice { margin: 0 0 var(--tk-space-5); padding-bottom: var(--tk-space-3); border-bottom: 1px solid var(--tk-light-rule); color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); }
.aeo-page .learn-example__eyebrow { margin: var(--tk-space-5) 0 var(--tk-space-2); color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); font-weight: 650; }
.aeo-page .learn-example h2 { margin: 0; font-size: var(--tk-type-h2-size); }
.aeo-page .learn-example h2 span { display: block; margin-top: var(--tk-space-1); color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); font-weight: 450; }
.aeo-page .learn-example__call { margin: var(--tk-space-3) 0 var(--tk-space-2); font-size: var(--tk-type-h2-size); font-weight: 700; font-variant-numeric: tabular-nums; }
.aeo-page .learn-example__clock { margin: 0; color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); }
.aeo-page .learn-example__numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tk-space-4); margin: var(--tk-space-5) 0 0; }
.aeo-page .learn-example__numbers dt { font-size: var(--tk-type-label-size); color: var(--tk-light-text-muted); }
.aeo-page .learn-example__numbers dd { margin: 0; font-size: var(--tk-type-h1-size); font-weight: 650; font-stretch: 80%; font-variant-numeric: tabular-nums; }
.aeo-page .learn-example__axis { display: block; width: 100%; height: auto; margin: var(--tk-space-2) 0; overflow: visible; }
.aeo-page .learn-example__rule { fill: none; stroke: var(--tk-light-rule-strong); stroke-width: 2; }
.aeo-page .learn-example__gap { fill: none; stroke: var(--tk-light-accent); stroke-width: 4; }
.aeo-page .learn-example__original { fill: var(--tk-light-text); }
.aeo-page .learn-example__forecast { fill: var(--tk-light-accent); }
.aeo-page .learn-example__difference { margin: 0; font-size: var(--tk-type-body-size); }
.aeo-page .learn-example__difference b { color: var(--tk-light-accent); }
.aeo-page .learn-example__limit { margin: var(--tk-space-2) 0 0; font-size: var(--tk-type-label-size); }
.aeo-page .learn-example__evidence, .aeo-page .learn-example__later, .aeo-page .learn-example__outcomes { margin-top: var(--tk-space-5); border-top: 1px solid var(--tk-light-rule); }
.aeo-page .learn-example__evidence p:last-child, .aeo-page .learn-example__later p, .aeo-page .learn-example__outcomes dd { margin: var(--tk-space-2) 0 0; font-size: var(--tk-type-body-size); }
.aeo-page .learn-example__outcomes dl { margin: 0; }
.aeo-page .learn-example__outcomes dl > div + div { margin-top: var(--tk-space-4); }
.aeo-page .learn-example__outcomes dt { font-weight: 650; }
.aeo-page .aeo-sources { margin-top: var(--tk-space-7); border-top: 1px solid var(--tk-light-rule); padding-top: var(--tk-space-4); }
.aeo-page .aeo-sources h2 { font-size: var(--tk-type-body-size); }
.aeo-page .aeo-sources ul { padding-left: var(--tk-space-5); }
.aeo-page .aeo-sources a { display: inline-block; min-height: 44px; padding: var(--tk-space-2) 0; }
@media (max-width: 420px) {
  .aeo-page .learn-example { padding: var(--tk-space-3); }
  .aeo-page .learn-example__numbers { grid-template-columns: minmax(0, 1fr); }
}
/* Price lesson: paired quotes retain their labels and units when text reflows. */
.aeo-page .learn-price-example > h2 { margin-bottom: var(--tk-space-3); }
.aeo-page .learn-price-example__panel { margin-top: var(--tk-space-6); border-top: 1px solid var(--tk-light-rule); padding-top: var(--tk-space-4); }
.aeo-page .learn-price-example__panel h3 { margin: 0 0 var(--tk-space-4); font-size: var(--tk-type-h2-size); line-height: var(--tk-type-h2-line); font-weight: 650; }
.aeo-page .learn-price-example__quotes { margin: 0 0 var(--tk-space-4); }
.aeo-page .learn-price-example__quotes > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: baseline; gap: var(--tk-space-3); padding: var(--tk-space-3) 0; border-bottom: 1px solid var(--tk-light-rule); }
.aeo-page .learn-price-example__quotes dt { font-size: var(--tk-type-label-size); }
.aeo-page .learn-price-example__quotes dt span { display: block; color: var(--tk-light-text-muted); }
.aeo-page .learn-price-example__quotes dd { margin: 0; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--tk-space-2) var(--tk-space-4); font-variant-numeric: tabular-nums; }
.aeo-page .learn-price-example__price { font-size: var(--tk-type-h2-size); font-weight: 650; }
.aeo-page .learn-price-example__check { padding-top: var(--tk-space-2); }
.aeo-page .learn-price-example__check dl { margin: var(--tk-space-3) 0; }
.aeo-page .learn-price-example__check dl > div { margin-bottom: var(--tk-space-3); }
.aeo-page .learn-price-example__check dt { font-weight: 650; }
.aeo-page .learn-price-example__check dd { margin: var(--tk-space-1) 0 0; }
.aeo-page .learn-price-example__clock-note { margin: var(--tk-space-5) 0 0; border-top: 1px solid var(--tk-light-rule); padding-top: var(--tk-space-4); font-size: var(--tk-type-label-size); }
@media (max-width: 420px) {
  .aeo-page .learn-price-example__quotes > div { grid-template-columns: minmax(0, 1fr); }
  .aeo-page .learn-price-example__quotes dt span { display: inline; }
}
/* The fictional record reads as one ledger, with states named in text rather than color. */
.aeo-page .learn-record-example > h2 { margin-bottom: var(--tk-space-3); }
.aeo-page .learn-record-example__entries { margin: var(--tk-space-5) 0; padding: 0; list-style: none; border-bottom: 1px solid var(--tk-light-rule); }
.aeo-page .learn-record-example__entries li { padding: var(--tk-space-3) 0; border-top: 1px solid var(--tk-light-rule); }
.aeo-page .learn-record-example__row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--tk-space-1) var(--tk-space-4); }
.aeo-page .learn-record-example__row span { color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); }
.aeo-page .learn-record-example__row strong { font-size: var(--tk-type-body-size); }
.aeo-page .learn-record-example__entries p { margin: var(--tk-space-1) 0 0; font-variant-numeric: tabular-nums; }
.aeo-page .learn-record-example__total { margin: 0; padding: var(--tk-space-3) 0; border-top: 2px solid var(--tk-light-text); font-variant-numeric: tabular-nums; }
.aeo-page .learn-record-example__note { margin: var(--tk-space-2) 0 0; color: var(--tk-light-text-muted); font-size: var(--tk-type-label-size); }
