/* The AI desk keeps Quattro and the publication red; illustration carries the colour. */
.ai-page, .ai-story-page {
  --ai-blue: #086d82;
  --ai-pale: #dce8e9;
  --muted: #646464;
}
.wrap--ai { width: min(100% - 4rem, 72rem); padding-top: 2.2rem; }
.ai-page .site-nav__inner, .ai-story-page .site-nav__inner { width: min(100% - 4rem, 72rem); }
.ai-masthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-bottom: 1.7rem; margin-bottom: 2rem; border-bottom: 2px solid var(--text); }
.ai-masthead h1 { margin: 0; font-size: clamp(4.5rem, 8vw, 7rem); line-height: 0.9; letter-spacing: -0.08em; }
.ai-masthead h1 span { color: var(--accent); padding-left: 0.08em; }
.ai-masthead__name p { margin: 1rem 0 0; font-size: 0.9rem; }
.ai-masthead__edition { text-align: right; font-size: 0.75rem; line-height: 1.7; flex: none; }
.ai-masthead__edition p { margin: 0; color: var(--text); }
.ai-masthead__edition time { display: block; color: var(--muted); }
.ai-feed { display: block; margin-top: 0.35rem; color: var(--ai-blue); }
.ai-lead { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 2.2rem; align-items: center; }
.ai-lead__image { display: block; overflow: hidden; background: var(--ai-pale); }
.ai-lead__image img { display: block; width: 100%; height: auto; }
.ai-category { margin: 0 0 0.75rem; color: var(--ai-blue); font-size: 0.76rem; font-weight: 700; }
.ai-lead h2 { margin: 0; font-size: clamp(1.8rem, 3.1vw, 2.65rem); line-height: 1.12; letter-spacing: -0.055em; text-wrap: balance; }
.ai-lead h2 a, .ai-card h3 a, .ai-desk h3 a { color: var(--text); }
.ai-lead h2 a:hover, .ai-card h3 a:hover, .ai-desk h3 a:hover { color: var(--accent-dark); text-decoration: none; }
.ai-lead__deck { margin: 1.05rem 0 0; font-size: 1.05rem; line-height: 1.5; }
.ai-lead__summary { margin: 0.85rem 0 1.1rem; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.ai-story-meta { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; color: var(--muted); font-size: 0.72rem; }
.ai-story-meta a { color: inherit; }
.ai-read { display: inline-block; margin-top: 1.2rem; color: var(--accent-dark); font-size: 0.84rem; font-weight: 700; }
.ai-read span { margin-left: 0.25rem; }
.ai-news-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 2.4rem; margin-top: 3rem; }
.ai-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--text); margin-bottom: 1.5rem; }
.ai-section-heading h2, .ai-desk > h2 { margin: 0; font-size: 1rem; letter-spacing: -0.035em; }
.ai-section-heading span { color: var(--muted); font-size: 0.73rem; }
.ai-supporting { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.65rem; }
.ai-card__image { display: block; margin-bottom: 1.15rem; }
.ai-card__image img { display: block; width: 100%; height: auto; }
.ai-card h3 { margin: 0; font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.05em; }
.ai-card > p:not(.ai-category) { margin: 0.7rem 0 1rem; color: var(--muted); font-size: 0.83rem; line-height: 1.7; }
.ai-desk { border-top: 1px solid var(--text); padding-top: 1rem; }
.ai-desk > h2 { margin-bottom: 0.1rem; }
.ai-desk article { padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.ai-desk .ai-category { margin-bottom: 0.35rem; }
.ai-desk h3 { margin: 0; font-size: 1rem; line-height: 1.35; letter-spacing: -0.035em; }
.ai-desk article > p:not(.ai-category) { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.65; }
.ai-desk__digest { display: block; max-width: 27ch; margin-top: 1.25rem; color: var(--ai-blue); font-size: 0.75rem; }
.ai-colophon { display: grid; grid-template-columns: 1fr 2fr; align-items: baseline; gap: 2rem; margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.ai-colophon p { margin: 0; font-size: 0.78rem; }
.ai-colophon p:first-child { font-weight: 700; }
.ai-colophon p:last-child { color: var(--muted); max-width: 67ch; }

/* This diagram represents the announced access flow, rather than a stock picture. */
.ai-tunnel-art { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; padding: 1.3rem; margin-bottom: 1.15rem; background: var(--ai-pale); color: #272727; overflow: hidden; }
.ai-tunnel-art:hover { text-decoration: none; }
.ai-tunnel-art__window { width: 55%; min-height: 6rem; padding: 0.55rem 0.7rem; background: #fdfcfa; border: 2px solid #272727; box-shadow: 6px 6px 0 rgb(39 39 39 / 0.13); position: relative; z-index: 1; }
.ai-tunnel-art__window i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: #e94f37; vertical-align: top; }
.ai-tunnel-art__window b { display: block; margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px solid #b5bdbc; font-size: 0.65rem; }
.ai-tunnel-art__window em { display: block; color: #53646a; font-size: 0.6rem; font-style: normal; }
.ai-tunnel-art__path { flex: 1; min-width: 0.8rem; border-top: 2px dashed #086d82; }
.ai-tunnel-art__gate { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: #086d82; }
.ai-tunnel-art__gate svg { width: 36px; height: 43px; }
.ai-tunnel-art__gate b { width: 8ch; font-size: 0.6rem; text-align: center; line-height: 1.35; }

.wrap--ai-story { width: min(100% - 4rem, 60rem); }
.ai-article-header { max-width: 46rem; margin: 0 auto 2rem; }
.ai-article-back { margin: 0 0 2rem; font-size: 0.8rem; }
.ai-article-back a { color: var(--ai-blue); }
.ai-article-header h1 { margin: 0; font-size: clamp(2.15rem, 5.5vw, 3.7rem); line-height: 1.08; letter-spacing: -0.055em; }
.ai-article-deck { margin: 1.25rem 0; font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.5; }
.ai-article-image { margin: 0 0 2.25rem; }
.ai-article-image img { display: block; width: 100%; height: auto; }
.ai-article-image figcaption { margin-top: 0.65rem; color: var(--muted); font-size: 0.7rem; line-height: 1.65; }
.ai-article-body { max-width: 42rem; margin: 0 auto; }
.ai-article-body h2 { scroll-margin-top: 2rem; }
.ai-article-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; max-width: 42rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: 0.8rem; }
.ai-bill { margin: 2rem 0; padding: 1.5rem; background: var(--ai-pale); color: #272727; }
.ai-bill figcaption { color: #086d82; font-size: 0.75rem; font-weight: 700; }
.ai-bill__values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.ai-bill__values strong { display: block; font-size: clamp(1.4rem, 4vw, 2.35rem); line-height: 1.2; letter-spacing: -0.06em; }
.ai-bill__values div:last-child strong { color: #bd3824; }
.ai-bill__values span { display: block; margin-top: 0.5rem; font-size: 0.7rem; line-height: 1.5; }
.ai-bill > p { margin: 1rem 0 0; font-size: 0.65rem; line-height: 1.6; color: #53646a; }
.ai-reading-note { padding-top: 1rem; margin-top: 2rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; }
.ai-command { margin: 2rem 0; padding: 1rem; background: var(--ai-pale); color: #272727; }
.ai-command figcaption { font-size: 0.75rem; color: #086d82; font-weight: 700; }
.ai-command pre { margin-bottom: 0; overflow-x: auto; white-space: pre; font-size: 0.8rem; background: none; }

/* Discovery keeps the artwork in view; every published story stays in one scroll. */
.ai-discovery { margin: 0 0 2.2rem; }
.ai-discovery__search > label { display: block; margin-bottom: 0.55rem; font-size: 0.8rem; font-weight: 700; }
.ai-discovery__field { display: flex; gap: 0.85rem; align-items: center; padding: 0.65rem 0.7rem 0.65rem 1rem; border: 1px solid var(--rule); background: var(--surface); }
.ai-discovery__field:focus-within { border-color: var(--ai-blue); }
.ai-discovery__field > svg { width: 20px; height: 20px; flex: none; stroke: var(--ai-blue); fill: none; stroke-width: 1.7; }
.ai-discovery__field input { min-width: 0; width: 100%; padding: 0.4rem 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.85rem; }
.ai-discovery__field input::placeholder { color: var(--muted); opacity: 1; }
.ai-discovery__field input:focus-visible { outline: none; }
.ai-discovery__field button { flex: none; padding: 0.7rem 0.9rem; border: 0; background: var(--ai-pale); color: var(--ai-blue); font: inherit; font-size: 0.72rem; cursor: pointer; }
.ai-discovery__field button:hover { background: #c9dedf; }
.ai-discovery__field button:disabled { cursor: wait; opacity: 0.7; }
.ai-discovery__topics { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; }
.ai-topic { padding: 0.35rem 0.75rem; border: 1px solid var(--rule); border-radius: 2rem; background: transparent; color: var(--muted); font: inherit; font-size: 0.7rem; cursor: pointer; }
.ai-topic:hover { border-color: var(--ai-blue); color: var(--ai-blue); }
.ai-topic[aria-pressed="true"] { border-color: var(--ai-blue); background: var(--ai-blue); color: #fff; }
.ai-filter-status { min-height: 1.2em; margin: 0.85rem 0 0; color: var(--muted); font-size: 0.7rem; }
.ai-empty { padding: 1.5rem 0; margin: 0; font-size: 0.9rem; }
.ai-semantic-results { margin-bottom: 2rem; }
.ai-semantic-results a { color: var(--text); }
.ai-semantic-results a:hover { color: var(--accent-dark); }
.ai-lead--text { display: block; padding: 1rem 0 1.7rem; border-bottom: 1px solid var(--rule); }
.ai-lead--text .ai-lead__copy { max-width: 54rem; }
.ai-lead--text h2 { max-width: 25ch; font-size: clamp(2.2rem, 5vw, 4rem); }
.ai-lead--text .ai-lead__deck { max-width: 52ch; }
.ai-lead--text .ai-lead__summary { max-width: 64ch; }
.ai-card__image { overflow: hidden; background: var(--ai-pale); }
.ai-card__image img { aspect-ratio: 3 / 2; object-fit: cover; }
.ai-explorer.is-filtered .ai-news-grid { margin-top: 1.5rem; }
.ai-explorer.is-filtered .ai-supporting { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-explorer.is-filtered .ai-lead:not([hidden]) + .ai-news-grid { margin-top: 3rem; }

/* These diagrams are made from the story's real source names, not reused art. */
.ai-source-art { aspect-ratio: 3 / 2; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem; margin-bottom: 1.15rem; background: #e8edef; color: var(--ai-blue); overflow: hidden; }
.ai-source-art:hover { text-decoration: none; }
.ai-source-art__label { font-size: 0.6rem; color: var(--muted); }
.ai-source-art__nodes { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.ai-source-art__nodes > span { max-width: 100%; padding: 0.25rem 0.45rem; border: 1px solid #b4cbd0; font-size: 0.63rem; overflow-wrap: anywhere; }
.ai-source-art__thread { display: block; width: 1px; height: 1.2rem; margin-left: 1rem; background: #b4cbd0; }
.ai-source-art__subject { max-width: 20ch; padding-top: 0.4rem; border-top: 1px solid #b4cbd0; font-size: 1rem; line-height: 1.3; letter-spacing: -0.04em; }
.ai-story-source-map { margin: 0 auto 2.5rem; max-width: 46rem; padding: 1.4rem 1.6rem; background: #e8edef; }
.ai-story-source-map figcaption { color: var(--ai-blue); font-size: 0.75rem; font-weight: 700; }
.ai-story-source-map__sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-top: 1rem; }
.ai-story-source-map__sources > a { display: block; padding-left: 0.8rem; border-left: 2px solid #a4c5ce; color: var(--text); }
.ai-story-source-map__sources span { display: block; margin-bottom: 0.35rem; color: var(--ai-blue); font-size: 0.68rem; overflow-wrap: anywhere; }
.ai-story-source-map__sources strong { display: block; font-size: 0.76rem; line-height: 1.55; font-weight: 400; overflow-wrap: anywhere; }
.ai-citations { white-space: nowrap; font-size: 0.65em; vertical-align: super; }
.ai-citations a { display: inline-block; min-width: 1.1em; text-align: center; }
.ai-public-sources { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.8rem; }
.ai-public-sources li { scroll-margin-top: 7rem; overflow-wrap: anywhere; }
.ai-public-sources li > span { color: var(--muted); font-size: 0.72rem; }

@media (max-width: 900px) {
  .ai-lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; }
  .ai-lead h2 { font-size: 1.8rem; }
  .ai-news-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 700px) {
  .wrap--ai, .wrap--ai-story, .ai-page .site-nav__inner, .ai-story-page .site-nav__inner { width: calc(100% - 2rem); }
  .ai-masthead { align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
  .ai-masthead h1 { font-size: 4.5rem; }
  .ai-masthead__name p { max-width: 25ch; font-size: 0.78rem; }
  .ai-masthead__edition { padding-top: 0.3rem; font-size: 0.65rem; }
  .ai-masthead__edition p { max-width: 16ch; margin-left: auto; }
  .ai-lead { display: flex; flex-direction: column; gap: 1.3rem; align-items: stretch; }
  .ai-lead h2 { max-width: 23ch; font-size: clamp(1.9rem, 6vw, 2.6rem); }
  .ai-lead__deck { margin-top: 0.8rem; }
  .ai-news-grid { display: block; margin-top: 2.2rem; }
  .ai-discovery { margin-bottom: 1.5rem; }
  .ai-discovery__field { flex-wrap: wrap; gap: 0.35rem 0.7rem; padding: 0.65rem 0.8rem; }
  .ai-discovery__field input { flex: 1; font-size: 16px; }
  .ai-discovery__field button { width: 100%; margin-top: 0.35rem; }
  .ai-topic { font-size: 0.66rem; padding-inline: 0.65rem; }
  .ai-lead--text { display: block; }
  .ai-lead--text h2 { font-size: clamp(2.2rem, 7vw, 3rem); }
  .ai-desk { margin-top: 2rem; }
  .ai-desk__digest { max-width: none; }
  .ai-colophon { display: block; margin-top: 2.5rem; }
  .ai-colophon p + p { margin-top: 0.5rem; }
  .ai-article-header { margin-bottom: 1.5rem; }
  .ai-article-back { margin-bottom: 1.5rem; }
  .ai-article-body { font-size: 1rem; }
}
@media (max-width: 420px) {
  .ai-supporting, .ai-explorer.is-filtered .ai-supporting { grid-template-columns: 1fr; gap: 2rem; }
  .ai-section-heading span { display: none; }
  .ai-card h3 { font-size: 1.5rem; }
  .ai-tunnel-art { padding: 2rem; }
  .ai-bill { padding: 1rem; }
  .ai-bill__values { gap: 0.65rem; }
}
