/* AINN design v2 (design system 1.0, tokens.json). Everything is scoped under
   .av2, so importing this file changes nothing outside a v2 page. Dark follows
   the existing mechanism: html.dark-mode (set by THEME_BOOT / useApplyTheme).
   Per-site accent: --ainn-accent (default Cars red); --ainn-accent-text-dark
   comes from deriveAccentTextDark() server-side. */
.av2 {
  --page: #F6F5F2; --surface: #FFFFFF; --surface-sunken: #EFEDE8; --surface-selected: #E9E7E1; --media: #E3E0D8;
  --text: #14161A; --text-2: #3B4048; --text-nav: #4A505A; --muted: #5B616B;
  --border: #E4E2DC; --border-subtle: #ECEAE4; --border-strong: #878C95; --border-outline: #CFCBC0;
  --inverse: #14161A; --on-inverse: #FFFFFF; --border-on-inverse: #767C87; --disabled-bg: #6B7280; --disabled-text: #FFFFFF;
  --live: #1F8F4E; --focus: #14161A;
  --accent: var(--ainn-accent, #D1202B); --on-accent: #FFFFFF; --accent-text: var(--accent);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --cat-0: #2F5FA8; --cat-1: #6A4FB0; --cat-2: #0E7C66; --cat-3: #B4391F; --cat-4: #8A5A12; --cat-5: #4A505A;
  font-family: var(--font-inter), 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--page); color: var(--text); font-size: 15px; line-height: 1.5;
  min-height: 100vh;
}
html.dark-mode .av2 {
  --page: #121316; --surface: #1B1D21; --surface-sunken: #262930; --surface-selected: #2B2E36; --media: #2B2E36;
  --text: #F3F4F6; --text-2: #D1D5DB; --text-nav: #B4B9C2; --muted: #9AA0AA;
  --border: #2E3138; --border-subtle: #262930; --border-strong: #767C87; --border-outline: #454952;
  --inverse: #F3F4F6; --on-inverse: #14161A; --border-on-inverse: #767C87; --disabled-bg: #6B7280; --disabled-text: #FFFFFF;
  --live: #4BD07F; --focus: #F3F4F6;
  --accent-text: var(--ainn-accent-text-dark, color-mix(in srgb, var(--accent) 60%, white));
  --cat-0: #5B7FBF; --cat-1: #8A74C4; --cat-2: #2F9C85; --cat-3: #C96A57; --cat-4: #A5803E; --cat-5: #7A808A;
}
.av2 *, .av2 *::before, .av2 *::after { box-sizing: border-box; }
.av2 :where(a) { color: inherit; text-decoration: none; }
.av2 :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.av2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.av2-header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 16px 40px; max-width: 1440px; margin: 0 auto; }
.av2-brand { display: inline-flex; align-items: center; gap: 14px; min-height: 56px; }
.av2-logo { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.av2-sitename { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.av2-nav { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.av2-nav-item { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--text-nav); transition: background-color .12s var(--ease); }
.av2-nav-item:hover { background: var(--surface-sunken); }
.av2-nav-item[aria-current='page'] { background: var(--inverse); color: var(--on-inverse); }
.av2-actions { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }

/* Desktop-width header on a narrow desktop (901-1440px, e.g. "Request Desktop Site" at 980): ONE row, nothing clipped.
   Tighter gaps and padding, slightly smaller nav labels, a compact API button; the brand name may shrink
   (the name ellipsizes; the nav never shrinks, so no item is clipped) so a long site name can never push the actions to a second row. Width queries only. */
@media (min-width: 901px) and (max-width: 1440px) {
  .av2-header { flex-wrap: nowrap; gap: 12px; padding: 16px 20px; }
  .av2-brand { gap: 10px; min-width: 0; flex: 0 1 auto; }
  .av2-logo { flex: none; }
  .av2-sitename { font-size: 18px; min-width: 6ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .av2-nav { flex-wrap: nowrap; gap: 2px; padding: 4px; flex: none; }
  .av2-nav-item { padding: 0 10px; font-size: 14px; white-space: nowrap; }
  .av2-actions { flex: none; gap: 8px; }
  .av2-actions .av2-theme { padding: 0 12px; }
  .av2-actions .av2-btn-disabled { padding: 5px 14px; font-size: 14px; }
}
/* Above 1440 the header is capped at 1440 wide, so a long name must still stay on one row: same no-wrap, ellipsized name (never under 6ch). */
@media (min-width: 1441px) {
  .av2-header { flex-wrap: nowrap; }
  .av2-brand { min-width: 0; flex: 0 1 auto; }
  .av2-logo { flex: none; }
  .av2-sitename { min-width: 6ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .av2-nav { flex-wrap: nowrap; flex: none; }
  .av2-nav-item { white-space: nowrap; }
  .av2-actions { flex: none; }
}
@media (min-width: 901px) and (max-width: 1000px) {
  .av2-header { gap: 8px; padding: 16px 16px; }
  .av2-nav-item { padding: 0 8px; }
  .av2-sitename { font-size: 17px; }
}
/* Below 960px a name cannot keep 6ch beside the nav: hide its text (logo stays; the link keeps aria-label and title). */
@media (min-width: 901px) and (max-width: 959px) {
  .av2-sitename { position: absolute; width: 1px; height: 1px; min-width: 0; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Theme cycle */
.av2-theme { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; transition: background-color .12s var(--ease); }
.av2-theme:hover { background: var(--surface-sunken); }
/* The label slot is as wide as the widest of Light / Dark / System (hidden ghosts stack in the same grid cell),
   so cycling the theme never changes the button's width, at any font size or text zoom. */
.av2-theme { flex: none; white-space: nowrap; }
.av2-theme-slot { display: inline-grid; justify-items: start; }
.av2-theme-slot > * { grid-area: 1 / 1; }
.av2-theme-ghost { visibility: hidden; height: 0; overflow: hidden; pointer-events: none; }

/* Buttons */
.av2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 700 15px/1 inherit; font-family: inherit; cursor: pointer; }
.av2-btn-primary { background: var(--inverse); color: var(--on-inverse); }
.av2-btn-accent { background: var(--accent); color: var(--on-accent); }
.av2-btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.av2-btn-primary:hover { background: color-mix(in srgb, var(--inverse) 82%, var(--page)); }
.av2-btn-accent:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.av2-btn-secondary:hover { background: var(--surface-sunken); }
.av2-btn-disabled { flex-direction: column; gap: 2px; padding: 5px 22px; background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--disabled-bg); cursor: not-allowed; }
.av2-btn-l { display: inline-flex; align-items: center; gap: 8px; line-height: 1.15; }
.av2-btn-soon { font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: .2px; }

/* Cards and type */
.av2-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; position: relative; }
.av2-overline { font-size: 12px; line-height: 1.2; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.av2-h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.8px; font-weight: 800; margin: 8px 0; }
.av2-h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.3px; font-weight: 700; margin: 6px 0; }
.av2-body { font-size: 15px; color: var(--text-2); margin: 8px 0; }
.av2-meta { font-size: 13px; line-height: 1.4; color: var(--muted); margin: 4px 0; }
.av2-muted { color: var(--muted); font-size: 13px; }
.av2-cat { color: var(--accent-text); font-weight: 700; }
.av2-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.av2-link:hover, .av2-quiet:hover { text-decoration-thickness: 2px; }
.av2-quiet { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.av2-pill { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.av2-stretch::after { content: ''; position: absolute; inset: 0; border-radius: 20px; }
.av2-stretch:hover { text-decoration: underline; text-underline-offset: 3px; }
/* The focus ring wraps the whole card the link covers, not just the headline text. */
.av2-stretch:focus-visible { outline: none; }
.av2-stretch:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -4px; }
/* Long unbroken strings (URLs) wrap instead of scrolling the page sideways (WCAG 1.4.10). */
.av2-story, .av2-body, .av2-more, .av2-h2, .av2-h3, .av2-meta, .av2-signal-title, .av2-ad-msg, .av2-row-title, .av2-signal-card, .av2-cat-item, .av2-overline,
.av2-article, .av2-lede, .av2-article-meta, .av2-tag, .av2-back, .av2-prose, .av2-article-h,
.av2-hero, .av2-hero-sub, .av2-hero-meta, .av2-bigstory-line, .av2-sec, .av2-sec-item, .av2-apicard, .av2-resource-list li, .av2-footer p, .av2-showing, .av2-date, .av2-live, .av2-muted, .av2-link, .av2-quiet { overflow-wrap: anywhere; }
.av2-card:hover { box-shadow: 0 1px 2px rgba(20, 22, 26, .06); }
.av2-story:hover { border-color: var(--border-strong); box-shadow: 0 2px 6px rgba(20, 22, 26, .08); }

/* Sponsor */
.av2-sponsor { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.av2-adlogo { width: 96px; height: 96px; border-radius: 12px; background: var(--surface-sunken); display: grid; place-items: center; overflow: hidden; }
.av2-adlogo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.av2-ad-msg { margin: 0; font-size: 15px; line-height: 1.45; }

/* Signals */
.av2-signals { padding: 10px; }
.av2-card-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px; }
.av2-list { list-style: none; margin: 0; padding: 0; }
.av2-list li + li { border-top: 1px solid var(--border-subtle); }
.av2-signal-row { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 10px 8px; border-radius: 12px; }
.av2-signal-row:hover { background: var(--surface-sunken); }
.av2-signal-top { display: flex; align-items: center; gap: 8px; }
.av2-score { margin-left: auto; font-weight: 700; }
.av2-signal-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.av2-signal-card { padding: 22px 26px; }
.av2-signal-card:hover { border-color: var(--border-strong); }

/* Story rows and cards */
.av2-row { display: grid; grid-template-columns: 52px 96px minmax(0, 1fr) 130px auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px; border-bottom: 1px solid var(--border-subtle); }
.av2-row:hover { background: var(--surface-sunken); box-shadow: inset 4px 0 0 var(--accent); }
.av2-row-time, .av2-row-src, .av2-row-count { font-size: 13px; color: var(--muted); }
.av2-row-cat { font-size: 13px; font-weight: 700; color: var(--accent-text); }
.av2-row-title { font-size: 16px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av2-row-src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) {
  .av2-row { grid-template-columns: 52px 1fr; }
  .av2-row-title { grid-column: 1 / -1; white-space: normal; }
  .av2-row-src, .av2-row-count { grid-column: 1 / -1; }
  .av2-header { padding: 12px 16px; }
}
.av2-story-foot { display: flex; gap: 12px; }
.av2-story-lead { padding: 26px 30px; }
.av2-showmore:hover { text-decoration: underline; text-underline-offset: 3px; }
.av2-showmore { position: relative; z-index: 1; min-height: 44px; margin-top: 8px; padding: 0 4px; border: 0; background: none; color: var(--accent-text); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
.av2-more { font-size: 15px; color: var(--text-2); margin-top: 8px; }
.av2-more[hidden] { display: none; }

/* Story images (expanded cards only; compact rows never carry one). Decorative, hotlinked, fixed 16:9 box so
   nothing shifts when the image arrives. The card's stretched link covers the image (no extra tab stop).
   Dark theme keeps the image colours; the 1px token border stops a light image bleeding into the card. */
.av2-media { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--media); border: 1px solid var(--border); }
.av2-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.av2-media[hidden] { display: none; }
/* Large slot, normal-width card: stacked, full width, above the meta line. */
.av2-img-large > .av2-media { margin: 0 0 14px; }
/* Large slot, lead card (wide screens): text left, image right. */
@media (min-width: 901px) {
  .av2-story-lead.av2-img-large { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 28px; align-content: start; }
  .av2-story-lead.av2-img-large > * { grid-column: 1; }
  .av2-story-lead.av2-img-large > .av2-media { grid-column: 2; grid-row: 1 / span 6; margin: 4px 0 0; align-self: start; }
  .av2-story-lead.av2-img-large:has(> .av2-media[hidden]) { display: block; }
}
/* Small slot: stacked at every width, full card width above the text, 2:1 and at most 220px tall (a shorter box than
   the large slot's 16:9, same width), top-weighted crop keeps heads in portrait shots. A 160 x 90 thumbnail goes beside
   the text ONLY in the single-column tablet layout (601-900px, text column 355px+); every two-column desktop card
   (1280, 1440, 1920 and wider) stacks, so the image is never a small thumbnail there. */
.av2-grid { container: av2g / inline-size; }
.av2-media-small img { object-position: 50% 25%; }
.av2-img-small > .av2-media { width: 100%; aspect-ratio: 2 / 1; max-height: 220px; margin: 0 0 12px; }
.av2-img-small > .av2-showmore { justify-self: start; }
@media (min-width: 601px) and (max-width: 900px) {
  .av2-img-small { display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: 16px; align-content: start; }
  .av2-img-small > * { grid-column: 1; }
  .av2-img-small > .av2-media { grid-column: 2; grid-row: 1 / span 6; align-self: start; width: auto; aspect-ratio: 16 / 9; max-height: none; margin: 4px 0 0; }
  .av2-img-small:has(> .av2-media[hidden]) { display: block; }
}

/* Filter chips and view toggle */
.av2-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.av2-chips { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.av2-chip-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }
.av2-chip-btn:not([aria-pressed='true']):hover { background: var(--surface-sunken); }
.av2-chip-btn[aria-pressed='true'] { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); }
.av2-seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; }
.av2-seg-opt { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--text-nav); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }
.av2-seg-opt:not([aria-pressed='true']):hover { background: var(--surface-sunken); }
.av2-seg-opt[aria-pressed='true'] { background: var(--inverse); color: var(--on-inverse); }

/* View mode: M3 marks its two lists .av2-view-expanded / .av2-view-compact */
.av2-view-compact { display: none; }
html[data-view='compact'] .av2-view-compact { display: block; }
html[data-view='compact'] .av2-view-expanded { display: none; }

/* No JS: V2Root emits a <noscript> style that hides .av2-needs-js controls */

/* LIVE dot (used from M3) */
.av2-live-dot { flex: none; margin-top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: av2-pulse 2s infinite; }
/* Stale data (more than two update intervals): the dot goes muted and stops pulsing. */
.av2-live-stale .av2-live-dot { background: var(--muted); animation: none; }
@keyframes av2-pulse { 50% { opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  .av2 *, .av2 *::before, .av2 *::after { transition: none !important; transition-duration: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .av2-live-dot { animation: none; opacity: 1; }
}

/* Home page layout (M3) */
.av2-skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 12px 18px; border-radius: 999px; background: var(--inverse); color: var(--on-inverse); font-weight: 700; font-size: 15px; }
.av2-skip:focus { left: 16px; }
.av2-page { max-width: 1440px; margin: 0 auto; padding: 0 40px 56px; }
.av2-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 10px 0 22px; }
.av2-h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.av2-date { font-size: 17px; font-weight: 500; color: var(--muted); }
.av2-live { display: inline-flex; align-items: flex-start; gap: 8px; max-width: 100%; font-size: 14px; font-weight: 600; color: var(--text-2); }
.av2-textlink { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.av2-textlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.av2-top-end { margin-left: auto; }
.av2-cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.av2-side { flex: 0 0 272px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.av2-side > .av2-btn { width: 100%; font-size: 14px; font-weight: 600; }
.av2-side > .av2-btn-disabled { width: 100%; font-size: 14px; font-weight: 600; }
.av2-main { flex: 999 1 560px; min-width: 0; }
.av2-feed { display: flex; flex-direction: column; gap: 24px; }
.av2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.av2-rows { padding: 0; overflow: hidden; }
.av2-rows .av2-row:last-child { border-bottom: 0; }
.av2-empty { margin: 0; padding: 24px 0; text-align: center; color: var(--muted); }
.av2-dim { opacity: .55; }
.av2-cats { padding: 10px; }
.av2-cat-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 500; }
.av2-cat-item:hover { background: var(--surface-sunken); }
.av2-cat-item[aria-current='true'] { background: var(--surface-selected); }
.av2-cat-all { font-weight: 700; }
.av2-count { flex: none; margin-left: auto; white-space: nowrap; font-size: 13px; color: var(--muted); }
.av2-cat-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.av2-cat-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.av2-cat-c0 { background: var(--cat-0); } .av2-cat-c1 { background: var(--cat-1); } .av2-cat-c2 { background: var(--cat-2); }
.av2-cat-c3 { background: var(--cat-3); } .av2-cat-c4 { background: var(--cat-4); } .av2-cat-c5 { background: var(--cat-5); }
.av2-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.av2-footer p { margin: 0; flex: 1 1 360px; font-size: 14px; line-height: 1.55; color: var(--text-nav); }
.av2-footer nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.av2-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.av2-footer nav a:hover { text-decoration-thickness: 2px; }
@media (max-width: 900px) {
  .av2-page { padding: 0 16px 40px; }
  .av2-cols { gap: 20px; }
  .av2-side { flex: 1 1 100%; order: 2; }
  .av2-main { flex-basis: 100%; order: 1; }
  /* Home on a phone: the sidebar's children join the page flow so Categories become a chip row above the feed. */
  .av2-cols > .av2-side-flat { display: contents; }
  .av2-side-flat > * { order: 2; flex: 1 1 100%; min-width: 0; }
  .av2-side-flat > .av2-cats { order: 0; flex: 1 1 100%; display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; background: none; border: 0; border-radius: 0; }
  .av2-side-flat > .av2-cats:hover { box-shadow: none; }
  .av2-cats .av2-cat-item { flex: none; gap: 8px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); white-space: nowrap; font-size: 14px; font-weight: 600; }
  .av2-cats .av2-cat-item:hover { background: var(--surface-sunken); }
  .av2-cats .av2-cat-item[aria-current='true'] { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); }
  .av2-cats .av2-cat-item[aria-current='true'] .av2-count { color: inherit; }
  .av2-cats .av2-count { margin-left: 0; }
  .av2-cats .av2-cat-dot { display: none; }
  .av2-nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin: 0; border-radius: 999px; }
  .av2-nav-item { white-space: nowrap; }
  .av2-actions { margin-left: 0; }
  .av2-grid { grid-template-columns: minmax(0, 1fr); }
  .av2-h1 { font-size: 32px; }
  .av2-top-end { margin-left: 0; }
  .av2-story-lead { padding: 20px 18px 22px; }
  .av2-story-lead .av2-h2 { font-size: 26px; letter-spacing: -.5px; }
}

/* Inner pages (M4): story, signals, reports, resources */
.av2-cols-top { margin-top: 10px; }
.av2-stack { display: flex; flex-direction: column; gap: 22px; }
.av2-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.av2-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.av2-article { padding: 36px 44px 44px; margin-top: 8px; }
.av2-article-meta { margin: 0; font-size: 14px; color: var(--muted); }
.av2-article-h { margin: 14px 0 18px; font-size: 44px; line-height: 1.12; letter-spacing: -1.2px; font-weight: 800; max-width: 900px; overflow-wrap: anywhere; }
.av2-lede { margin: 0 0 26px; font-size: 20px; line-height: 1.55; color: var(--text-2); max-width: 820px; }
.av2-prose { max-width: 760px; font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.av2-prose p { margin: 0 0 18px; }
.av2-prose img, .av2-prose figure { max-width: 100%; height: auto; border-radius: 14px; }
.av2-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.av2-prose h2, .av2-prose h3, .av2-prose h4 { line-height: 1.25; margin: 26px 0 12px; }
.av2-prose blockquote { margin: 0 0 18px; padding-left: 18px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.av2-prose ul, .av2-prose ol { padding-left: 24px; margin: 0 0 18px; }
.av2-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 26px; padding: 0; }
.av2-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-2); font-size: 13px; font-weight: 600; }
.av2-article-cta { min-height: 48px; padding: 0 26px; font-size: 16px; }
.av2-section-h { margin: 26px 0 12px; }
.av2-pagechips { margin: 0 0 24px; }
.av2-chip-btn { display: inline-flex; align-items: center; }
.av2-chip-btn[aria-current='true'] { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); }
.av2-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
/* RSS links beside a feed name: 44 px wide target. */
.av2-resource-list .av2-quiet { min-width: 44px; justify-content: center; }
.av2-plain { list-style: none; margin: 0; padding: 0; }
.av2-resource-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.av2-resource-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; overflow-wrap: anywhere; }

/* Report */
.av2-hero { margin-top: 8px; padding: 48px 52px; border-radius: 32px; background: var(--inverse); color: var(--on-inverse); }
.av2-hero-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; letter-spacing: 1.6px; font-weight: 700; opacity: .8; }
.av2-hero-h { margin: 16px 0 14px; font-size: 56px; line-height: 1.05; letter-spacing: -1.8px; font-weight: 800; max-width: 900px; overflow-wrap: anywhere; }
.av2-hero-sub { margin: 0; font-size: 19px; line-height: 1.55; opacity: .85; max-width: 760px; }
.av2-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 26px 0 0; font-size: 15px; opacity: .85; }
.av2-hero-meta strong { font-weight: 600; opacity: 1; }
.av2-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.av2-hero-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--border-on-inverse); font-weight: 600; font-size: 15px; }
.av2-hero-btn-solid { background: var(--on-inverse); color: var(--inverse); border-color: var(--on-inverse); font-weight: 700; }
.av2-bigstory { padding: 22px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.av2-accent-text { color: var(--accent-text); letter-spacing: 1.4px; }
.av2-bigstory-line { flex: 1 1 320px; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.av2-sec { padding: 0; overflow: hidden; }
.av2-sec-bar { height: 6px; background: var(--accent); }
.av2-sec-head { display: flex; align-items: center; gap: 14px; padding: 26px 30px 8px; }
.av2-sec-h { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.av2-sec-head .av2-pill { margin-left: auto; min-height: 32px; padding: 0 12px; font-size: 14px; }
.av2-sec-list { list-style: none; margin: 0; padding: 0 30px 14px; }
.av2-sec-item { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid var(--border-subtle); }
.av2-sec-n { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--surface-sunken); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.av2-sec-item .av2-h3 { margin: 6px 0 8px; font-size: 22px; }
.av2-sec-item .av2-h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.av2-apicard { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 26px 30px; }
.av2-apicard > div { flex: 1 1 300px; }
.av2-cats-head { display: block; padding: 10px 12px 6px; }
@media (max-width: 900px) {
  .av2-article { padding: 22px 18px 26px; }
  .av2-article-h { font-size: 30px; letter-spacing: -.6px; }
  .av2-lede { font-size: 17px; }
  .av2-prose { font-size: 17px; }
  .av2-hero { padding: 28px 20px; border-radius: 24px; }
  .av2-hero-h { font-size: 34px; letter-spacing: -.8px; }
  .av2-sec-head, .av2-sec-list, .av2-apicard { padding-left: 18px; padding-right: 18px; }
  .av2-sec-h { font-size: 24px; }
  .av2-sec-item { gap: 12px; }
  .av2-cardgrid, .av2-hubgrid { grid-template-columns: minmax(0, 1fr); }
}

/* Hub */
/* Story-photo cards: image on top (fixed 16:9 box, no layout shift), then domain, headline (3 lines), tagline. */
.av2-photo-card { padding: 0; overflow: hidden; height: 100%; display: flex; flex-direction: column; border-color: var(--border-strong); }
.av2-photo-card:hover { border-color: var(--accent); }
.av2-photo-box { position: relative; aspect-ratio: 16 / 9; overflow: hidden; flex: none; background: var(--surface-sunken); display: flex; align-items: center; justify-content: center; }
/* The image never sizes the box: it is taken out of flow and cropped to cover, so any source ratio (portrait or very wide) fills exactly 16:9. */
.av2-photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 30%; display: block; }
/* Hub-only grid (the sites keep .av2-cardgrid): denser, equal-height rows, text top-aligned under the photo. */
.av2-hubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.av2-hubgrid > li { display: flex; min-width: 0; }
.av2-hubgrid > li > .av2-card { flex: 1 1 auto; }
.av2-photo-body { flex: 1 1 auto; align-self: stretch; }
.av2-photo-none { font-size: 13px; color: var(--muted); }
.av2-ph-b { position: absolute; inset: 0; box-sizing: border-box; padding: 14px 16px 14px 20px; display: flex; align-items: flex-start; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--text); background: var(--surface-sunken); border-left: 6px solid var(--accent-text); overflow: hidden; }
.av2-ph-b-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 520px) { .av2-ph-b-text { -webkit-line-clamp: 4; line-clamp: 4; } }
.av2-ph-chip { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.5; color: #fff; background: rgba(0, 0, 0, 0.78); letter-spacing: 0.01em; }
.av2-photo-box:has(.av2-ph-b) + .av2-photo-body .av2-photo-head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.av2-photo-body { padding: 14px 16px 16px; }
.av2-photo-domain { margin: 0 0 4px; font-size: 12px; }
.av2-photo-head { margin: 0 0 6px; font-size: 16px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.av2-photo-plain { font-size: 18px; }
.av2-photo-tag { margin: 0; font-size: 13px; }
.av2-showing { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.av2-hubintro { flex-direction: column; align-items: flex-start; padding-bottom: 26px; }
.av2-hub-h1 { font-size: 52px; letter-spacing: -1.6px; max-width: 900px; }
.av2-hubintro .av2-date { max-width: 760px; line-height: 1.55; }
@media (max-width: 900px) { .av2-hub-h1 { font-size: 34px; letter-spacing: -.8px; } }

/* Phone header: deliberately two rows (brand, then both actions), the same for every theme label.
   The actions share the row in equal columns and drop to one column only when text zoom leaves no room. */
@media (max-width: 560px) {
  .av2-header { gap: 12px; }
  .av2-nav { flex: 1 1 100%; }
  .av2-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 12px; margin-left: 0; }
  .av2-actions > :not(.av2-sr) { width: 100%; justify-content: center; min-width: 0; }
  .av2-actions .av2-theme-slot { justify-items: start; }
}
