/* AO-V1-PUBLICATION: the few V1 additions to the existing design (src/styles.css and its /6 card rules). Theme-aware through the existing variables. */
html[data-reader-v1="1"] .brand-home { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: inherit; }
html[data-reader-v1="1"] .story-v1 { overflow-wrap: anywhere; }
html[data-reader-v1="1"] .story-headline { overflow-wrap: break-word; }
html[data-reader-v1="1"] .story-kicker { margin: 0 0 4px; font-size: 0.78rem; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
html[data-reader-v1="1"] .story-category { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
html[data-reader-v1="1"] .story-category:hover { text-decoration: underline; }
html[data-reader-v1="1"] .story-label { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 600; }
html[data-reader-v1="1"] .story-summary { margin: 4px 0 6px; color: var(--text); font-size: 0.95rem; line-height: 1.5; }
html[data-reader-v1="1"] .story-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; }
html[data-reader-v1="1"] .story-also { margin: 4px 0 0; font-size: 0.78rem; color: var(--muted); }
html[data-reader-v1="1"] .story-also a { color: inherit; }
html[data-reader-v1="1"] .story-thumb img { object-fit: cover; }
html[data-reader-v1="1"] .story-thumb .image-credit { overflow-wrap: anywhere; }
html[data-reader-v1="1"] .controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
html[data-reader-v1="1"] .controls .field { min-width: 0; }
html[data-reader-v1="1"] .controls .field-search { flex: 1 1 16rem; }
html[data-reader-v1="1"] .controls .field-search input, html[data-reader-v1="1"] .controls select { width: 100%; max-width: 100%; box-sizing: border-box; }
html[data-reader-v1="1"] .result-status { margin: 8px 0 12px; color: var(--muted); font-size: 0.9rem; }
html[data-reader-v1="1"] .story-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
html[data-reader-v1="1"] .story-list > li { min-width: 0; }
html[data-reader-v1="1"] .empty-state .button { display: inline-block; text-decoration: none; }
html[data-reader-v1="1"] main, html[data-reader-v1="1"] .layout { min-width: 0; }
@media (max-width: 640px) {
  html[data-reader-v1="1"] .story.has-thumb { grid-template-columns: 96px minmax(0, 1fr); }
  html[data-reader-v1="1"] .story-featured.has-thumb { grid-template-columns: minmax(0, 1fr); }
  html[data-reader-v1="1"] .controls .field, html[data-reader-v1="1"] .controls .field-submit { flex: 1 1 100%; }
}

/* AO-V1-PUBLICATION presentation corrections (James's review). */
/* Header centre: the original orbit graphic, about 40% larger (168x42 from 120x30), above "Explore the frontier", about 25% larger (0.9rem from 0.72rem)
   in its teal; no links. From 841px (so a zoomed desktop window keeps one compact row) the masthead is brand | centre | tagline on one grid, every item
   centred vertically in the masthead and the tagline block right-aligned. Below 841px the three stack: brand, the centre (scaled down), then the tagline. */
html[data-reader-v1="1"] .masthead-explore { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
html[data-reader-v1="1"] .explore-motif { width: 168px; height: auto; }
html[data-reader-v1="1"] .explore-title { font-size: 0.9rem; }
@media (min-width: 841px) {
  html[data-reader-v1="1"] .masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 28px; min-height: 112px; box-sizing: border-box; } /* the existing masthead height */
  html[data-reader-v1="1"] .masthead .brand { grid-column: 1; justify-self: start; order: 0; }
  html[data-reader-v1="1"] .masthead-explore { grid-column: 2; justify-self: center; order: 0; flex: none; }
  html[data-reader-v1="1"] .masthead .masthead-copy { grid-column: 3; justify-self: end; text-align: right; order: 0; flex-basis: auto; max-width: 440px; }
}
@media (max-width: 840px) {
  html[data-reader-v1="1"] .masthead-explore { order: 1; flex: 1 1 100%; }
  html[data-reader-v1="1"] .masthead .masthead-copy { order: 2; }
  html[data-reader-v1="1"] .explore-motif { width: 140px; }
  html[data-reader-v1="1"] .explore-title { font-size: 0.82rem; }
}
/* Navigation: Latest and all eight categories are shown directly at every width (no tiers, no category menu); the row wraps on narrow screens. */
html[data-reader-v1="1"] .primary-nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 14px; }
@media (max-width: 640px) {
  html[data-reader-v1="1"] .primary-nav { display: flex; column-gap: 12px; row-gap: 0; padding-right: 40px; }
  html[data-reader-v1="1"] .category-bar { flex-wrap: wrap; justify-content: center; }
  html[data-reader-v1="1"] .nav-link { padding: 6px 2px; min-height: 36px; }
}
/* Cards: the thumbnail floats at the start of the card at a modest size, the headline and source text flow beside it and continue underneath, and the
   card (display: flow-root) contains the float so the next card always starts below the image. The whole image is shown at its own aspect ratio. */
html[data-reader-v1="1"] .story.story-v1 { display: flow-root; padding: 14px 16px; }
html[data-reader-v1="1"] .story-v1 .story-thumb { float: left; width: min(176px, 36%); margin: 3px 16px 8px 0; }
html[data-reader-v1="1"] .story-v1 .story-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius); }
html[data-reader-v1="1"] .story-v1 .image-credit { margin-top: 3px; font-size: 0.72rem; line-height: 1.3; color: var(--muted); }
html[data-reader-v1="1"] .story-v1 .story-body { display: block; min-width: 0; }
html[data-reader-v1="1"] .story-v1 .story-summary { margin: 4px 0 6px; }
html[data-reader-v1="1"] .story-v1 .story-meta { margin: 0; }
html[data-reader-v1="1"] .story-featured.story-v1 { padding: 18px 20px 20px; }
html[data-reader-v1="1"] .story-featured.story-v1 > * { margin-inline: 0; }
html[data-reader-v1="1"] .story-featured.story-v1 .story-thumb { width: min(320px, 42%); margin-right: 20px; }
html[data-reader-v1="1"] .story-top.story-v1 .story-thumb { width: min(112px, 34%); margin-right: 12px; }
html[data-reader-v1="1"] .story-top.story-v1 .story-headline { font-size: 1.02rem; }
@media (max-width: 640px) {
  html[data-reader-v1="1"] .story.story-v1 { padding: 12px 14px; }
  html[data-reader-v1="1"] .story-v1 .story-thumb { width: 34%; margin-right: 12px; }
  html[data-reader-v1="1"] .story-featured.story-v1 .story-thumb { width: 44%; }
}
/* The lead headline at a size that wraps sensibly beside its thumbnail (the /6 size left single words stranded under the image). */
html[data-reader-v1="1"] .story-featured.story-v1 .story-headline { font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.18; }

/* Page columns (James's layout review). Document order is lead, Latest, Top stories. From 841px (so a zoomed desktop window keeps it) the page is two
   columns on one grid: the lead card (row 1) and Latest (row 2) on the left; Top stories on the right, spanning both rows and aligned to the top of the
   lead card. Top stories spans the flexible second row, so its height never grows the first row: Latest starts directly under the lead card. Below 841px the
   single column follows the document order (lead, Latest, Top stories). No floats, negative margins or absolute positioning. */
html[data-reader-v1="1"] .layout-v1 > main, html[data-reader-v1="1"] .layout-v1 .front { display: contents; }
html[data-reader-v1="1"] .layout.layout-v1 { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "latest" "top"; row-gap: 28px; }
html[data-reader-v1="1"] .layout-v1 .featured { grid-area: lead; }
html[data-reader-v1="1"] .layout-v1 .latest { grid-area: latest; }
html[data-reader-v1="1"] .layout-v1 .top-stories { grid-area: top; min-width: 0; }
@media (min-width: 841px) {
  html[data-reader-v1="1"] .layout.layout-v1 { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; grid-template-areas: "lead top" "latest top"; column-gap: 32px; row-gap: 0; align-items: start; }
  html[data-reader-v1="1"] .layout-v1 .featured { margin-bottom: 28px; }
}
/* "Lead story" inside the lead card: the kicker typography without the external rule. */
html[data-reader-v1="1"] .story-featured.story-v1 .lead-kicker { border-top: 0; padding-top: 0; margin: 0 0 10px; }
/* The search form and the first result card keep their normal separation now that no status sentence sits between them. */
html[data-reader-v1="1"] .layout-v1 .story-list { margin-top: 14px; }
/* AO-PILLAR-002: the homepage link to an original AI2ASI guide, inside the lead section after the lead card (unfiltered front page only). It is not a
   story card and is not counted in the front-page allocation. */
html[data-reader-v1="1"] .guide-promo { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius); background: var(--card); font-size: 0.95rem; line-height: 1.4; }
html[data-reader-v1="1"] .guide-promo-label { display: block; margin-bottom: 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
html[data-reader-v1="1"] .guide-promo a { font-weight: 700; color: var(--teal-dark); text-underline-offset: 3px; }
