:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --surface: #fff;
  --ink: #19191b;
  --muted: #57575f;
  --rule: #dededd;
  --accent: #bd122c;
  --accent-soft: #f9e9ed;
  --cover: #232126;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151517; --surface: #1e1e22; --ink: #f7f5f3;
    --muted: #b7b2b9; --rule: #37363b; --accent: #ff758a; --accent-soft: #392329;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151517; --surface: #1e1e22; --ink: #f7f5f3;
  --muted: #b7b2b9; --rule: #37363b; --accent: #ff758a; --accent-soft: #392329;
}
*,*::before,*::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body.portal { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.portal a { color: inherit; }
.portal button,.portal input { font: inherit; color: inherit; }
.portal button { cursor: pointer; }
.portal img { display: block; max-width: 100%; }
.portal [hidden] { display: none !important; }
.portal :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.portal .shell { width: min(100% - 2rem, 78rem); margin-inline: auto; }
.sr-only,.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9; top: 1rem; left: 1rem; background: var(--surface); padding: .75rem; }
.masthead { position: relative; z-index: 5; background: var(--surface); border-top: 4px solid #d21834; border-bottom: 1px solid var(--rule); }
.mast-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: .55rem; padding-block: .75rem; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; width: fit-content; }
.brand img { width: clamp(5rem, 24vw, 8.5rem); height: auto; }
.brand > span { font-size: clamp(.9rem, 3.7vw, 1.2rem); line-height: 1; font-weight: 750; padding-inline-start: .55rem; border-inline-start: 1px solid var(--rule); }
:root[data-theme="dark"] .brand img { filter: grayscale(1) invert(1) brightness(2.2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: grayscale(1) invert(1) brightness(2.2); } }
.search { grid-column: 1/-1; grid-row: 2; display: flex; min-width: 0; min-height: 44px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input { min-width: 0; flex: 1; padding: .5rem .65rem; border: 0; outline: 0; background: transparent; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.search button,.nav-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 44px; min-height: 44px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.search button { border: 0; background: transparent; }
.nav-button:is(button,summary):hover { border-color: var(--muted); }
.theme-button .sun { display: none; }
:root[data-theme="dark"] .theme-button .moon { display: none; }
:root[data-theme="dark"] .theme-button .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-button .moon { display: none; }
  :root:not([data-theme="light"]) .theme-button .sun { display: block; }
}
.site-menu { position: relative; }
.site-menu summary { list-style: none; cursor: pointer; padding-inline: .6rem; font-size: .86rem; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary span { display: none; }
.site-menu > nav { position: absolute; z-index: 3; inset-inline-end: 0; top: calc(100% + .45rem); width: min(15rem, 72vw); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .4rem; }
.site-menu nav a { display: flex; align-items: center; text-decoration: none; min-height: 44px; padding: .35rem .6rem; border-radius: 6px; }
.site-menu nav a:hover,.site-menu nav a:focus-visible { background: var(--accent-soft); }
.category-bar { border-top: 1px solid var(--rule); }
.category-strip { position: relative; display: flex; align-items: stretch; gap: .5rem; min-height: 45px; }
.category-primary { display: flex; flex: 1 1 0; gap: clamp(.65rem,2vw,1.55rem); min-width: 0; overflow: hidden; overflow: clip; }
.category-strip a,.category-more summary { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .875rem; font-weight: 650; color: var(--muted); }
.category-primary a { position: relative; flex: none; padding: .4rem .15rem; white-space: nowrap; }
.category-strip a[aria-current],.category-strip a:hover,.category-more summary:hover { color: var(--accent); }
.category-primary a[aria-current]::after,.category-more[data-active] summary::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--accent); }
.category-strip a:focus-visible,.category-more summary:focus-visible { outline-offset: -3px; }
.category-more { flex: 0 0 auto; }
.category-more summary { position: relative; gap: .4rem; padding: .4rem .6rem; cursor: pointer; white-space: nowrap; list-style: none; }
.category-more summary::-webkit-details-marker { display: none; }
.category-more summary svg { flex: none; }
.category-more[open] summary,.category-more[data-active] summary { color: var(--accent); }
.category-more[open] summary svg { transform: rotate(180deg); }
.category-options { display: none; position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 3; width: min(100%,44rem); max-height: calc(100vh - 12rem); max-height: var(--category-room, calc(100dvh - 12rem)); padding: .45rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: 0 .5rem 1.4rem rgb(0 0 0 / .10); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; }
.category-options::-webkit-scrollbar { display: none; }
.category-more[open] .category-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: min-content; gap: .15rem; }
.category-options a { padding: .35rem .55rem; border-radius: 6px; overflow-wrap: anywhere; }
.category-options a:hover,.category-options a[aria-current] { background: var(--accent-soft); }
.category-options a[aria-current] { text-decoration: underline; text-underline-offset: .23em; }
@media (min-width: 40rem) {
  .category-more[open] .category-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.portal-main { padding-bottom: 3rem; }
.section { margin-top: clamp(1.5rem,4vw,3rem); scroll-margin-top: 1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--rule); margin-bottom: 1rem; padding-bottom: .6rem; }
.section-heading h2 { font-size: clamp(1.45rem,3.3vw,2.1rem); line-height: 1.15; letter-spacing: -.04em; margin: 0; padding-inline-start: .7rem; border-inline-start: 4px solid var(--accent); overflow-wrap: anywhere; }
.section-heading > span,.section-heading > a { flex-shrink: 0; font-size: .88rem; color: var(--muted); }
.section-heading > a:hover { color: var(--accent); }
.headline-grid,.headline-stack,.card-grid { display: grid; gap: .9rem; min-width: 0; }
.headline-main,.headline-side,.story { min-width: 0; }
.story-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.story-media,.article-cover { overflow: hidden; aspect-ratio: 16 / 9; background: var(--cover); }
.story-media img,.article-cover img,.story-placeholder { width: 100%; height: 100%; object-fit: cover; }
.story-placeholder { background: linear-gradient(145deg,#29272c,#3f2931); }
.story { overflow: clip; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.story:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.story-link:focus-visible { outline: none; }
.story-text { padding: .9rem 1rem 1rem; display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .48rem; min-width: 0; }
.story-category { color: var(--accent); letter-spacing: .045em; font-size: .77rem; font-weight: 800; }
.story h3 { font-size: clamp(1.06rem,2vw,1.33rem); font-weight: 760; line-height: 1.24; letter-spacing: -.024em; margin: 0; overflow-wrap: anywhere; }
.story-link:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .15em; }
.story p { color: var(--muted); margin: 0; font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.story-meta { color: var(--muted); font-size: .78rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: baseline; margin-top: auto; padding-top: .18rem; }
.headline-main { background: #1d1c20; color: #fff; border: 0; }
.headline-main .story-category { color: #ff9cad; }
.headline-main .story-meta,.headline-main p { color: #e1dce1; }
.headline-main .story-text { padding: clamp(1rem,2.1vw,1.65rem); }
.headline-main h3 { font-size: clamp(1.55rem,3.15vw,3rem); letter-spacing: -.047em; line-height: 1.1; }
.headline-main .story-media { aspect-ratio: 16 / 9; }
.headline-side .story-link { display: grid; grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); }
.headline-side .story-media { aspect-ratio: auto; min-height: 112px; }
.headline-side .story-text { padding: .65rem .75rem; }
.headline-side h3 { font-size: clamp(.98rem,1.65vw,1.27rem); }
.empty { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius); padding: 1rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem; margin-top: 1.5rem; }
.pagination a,.pagination [aria-current] { display: inline-flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; padding: .35rem .65rem; border: 1px solid var(--rule); border-radius: 7px; text-decoration: none; }
.pagination a:hover,.pagination [aria-current] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.popular ol { padding: 0 0 0 1.65rem; margin: 0; }
.popular li { padding: .7rem .2rem; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.popular li::marker { font-weight: 800; color: var(--accent); }
.popular a { font-size: 1rem; font-weight: 650; text-decoration: none; }
.popular a:hover,.portal-footer nav a:hover { text-decoration: underline; }
.portal-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 1.5rem 0 2rem; }
.footer-row,.portal-footer nav { display: flex; gap: .6rem 1rem; align-items: center; flex-wrap: wrap; }
.footer-row { justify-content: space-between; }
.portal-footer nav a,.portal-footer nav button { color: var(--muted); text-decoration: none; font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; }
.portal-footer nav button { background: none; border: 0; padding: 0; cursor: pointer; }
.consent { position: fixed; inset-inline: 0; bottom: .75rem; z-index: 4; }
.consent-box { margin-left: auto; max-width: 34rem; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem 1rem; }
.consent-box p { margin: 0 0 .5rem; font-size: .9rem; }
.consent-box button,.share-actions a,.share-actions button,.gallery-tools button { border: 1px solid var(--rule); background: var(--surface); border-radius: 7px; padding: .42rem .7rem; min-height: 44px; cursor: pointer; text-decoration: none; }
.consent-box button:hover,.share-actions :is(a,button):hover { border-color: var(--accent); color: var(--accent); }
.article-header { max-width: 57rem; margin: clamp(1.5rem,5vw,4rem) auto 1.35rem; }
.article-crumb,.article-meta { display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.article-crumb { margin-bottom: .75rem; }
.article-crumb a:last-child { color: var(--accent); font-weight: 750; }
.article h1 { font-size: clamp(2rem,5.4vw,4.5rem); line-height: 1.04; letter-spacing: -.04em; margin: 0; overflow-wrap: anywhere; }
.article-lead { font-size: clamp(1.05rem,2.25vw,1.4rem); line-height: 1.55; color: var(--muted); margin: .9rem 0 1.1rem; }
.article-meta { margin: .9rem 0 0; }
.article-meta strong { color: var(--ink); }
.article-cover { margin: 0 auto 1.6rem; border-radius: var(--radius); max-width: 62rem; }
.article-reading { width: min(100%,47rem); margin-inline: auto; min-width: 0; }
.toc { margin: 1.4rem 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: .92rem; }
.toc summary { display: flex; align-items: center; gap: .55rem; min-height: 44px; padding: .45rem .8rem; cursor: pointer; list-style: none; font-weight: 750; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { flex: none; color: var(--accent); }
.toc .toc-arrow { margin-inline-start: auto; color: var(--muted); }
.toc[open] .toc-arrow { transform: rotate(180deg); }
.toc[open] summary { border-bottom: 1px solid var(--rule); }
.toc summary:focus-visible { outline-offset: -3px; }
.toc nav { padding: .6rem .8rem; }
.article-body .toc ul { margin: 0; padding-inline-start: 1.1rem; }
.article-body .toc ul ul { margin-block: .1rem .25rem; font-size: .93em; }
.article-body .toc li + li { margin-top: .12rem; }
.article-body .toc a { display: inline-block; padding-block: .18rem; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.article-body .toc a:hover { color: var(--accent); }
.share h2 { font-size: 1.15rem; margin: 0 0 .45rem; }
.article-body :is(h2,h3)[id] { scroll-margin-top: 12rem; }
@media (min-width: 48rem) {
  .article-body :is(h2,h3)[id] { scroll-margin-top: 8rem; }
}
.article-body { font-size: clamp(1.04rem,1.7vw,1.19rem); line-height: 1.73; overflow-wrap: anywhere; }
.article-body h2,.article-body h3 { letter-spacing: -.026em; line-height: 1.2; margin: 1.75em 0 .55em; }
.article-body h2 { font-size: clamp(1.5rem,3.2vw,2.05rem); }
.article-body h3 { font-size: clamp(1.24rem,2.5vw,1.56rem); }
.article-body p,.article-body ul,.article-body ol { margin: 0 0 1.15em; }
.article-body li + li { margin-top: .3em; }
.article-body a { color: var(--accent); text-underline-offset: .13em; }
.article-body img { height: auto; margin-inline: auto; border-radius: 7px; }
.article-body iframe { display: block; max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.article-body blockquote { margin: 1em 0; padding: .45rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.article-body table { display: block; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-collapse: collapse; margin: 1.25rem 0; font-size: .94rem; }
.article-body th,.article-body td { min-width: 7rem; padding: .65rem; border: 1px solid var(--rule); text-align: start; }
.article-body th { background: var(--surface); }
.article-body :is(pre,code) { max-width: 100%; }
.article-body pre { white-space: pre; overflow-x: auto; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); }
.content-gallery,.content-image-pair { margin-block: 1.25rem; }
.content-image-pair,.content-gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
.content-gallery-heading { display: flex; gap: .5rem; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.content-gallery-item { display: block; position: relative; min-width: 0; }
.content-gallery-item img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.content-gallery-item-main { grid-column: 1/-1; }
.content-gallery-item-hidden { display: none; }
.content-gallery-more { position: absolute; right: .5rem; bottom: .5rem; padding: .3rem .6rem; background: #18171a; color: #fff; border-radius: 6px; }
.gallery-dialog { width: min(95vw,65rem); max-height: 95vh; padding: .75rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.gallery-dialog::backdrop { background: rgba(10,10,12,.82); }
.gallery-dialog figure { margin: .75rem 0 0; text-align: center; }
.gallery-dialog img { max-height: 70vh; margin-inline: auto; object-fit: contain; }
.gallery-tools,.share-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.share { margin-block: 1.6rem; padding-block: 1rem; border-block: 1px solid var(--rule); }
.share-actions a,.share-actions button { display: inline-flex; align-items: center; font-size: .87rem; }
.share-status { color: var(--muted); font-size: .9rem; }
.share-status:empty { display: none; }
.article-pager { display: grid; gap: .65rem; margin: 1rem 0 2rem; }
.article-pager a { padding: .65rem; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; }
.article-pager span { display: block; color: var(--muted); font-size: .82rem; }
@media (min-width: 40rem) {
  .portal .shell { width: min(100% - 3rem,78rem); }
  .mast-row { grid-template-columns: minmax(0,1fr) minmax(12rem,22rem) auto auto; gap: .65rem; }
  .search { grid-row: auto; grid-column: auto; }
  .site-menu summary span { display: inline; }
  .card-grid,.article-pager { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .headline-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .headline-side .story-link { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .headline-side .story-media { min-height: 0; aspect-ratio: 16/9; }
}
@media (min-width: 62rem) {
  .headlines .section-heading { margin-bottom: 1.15rem; }
  .headline-grid { grid-template-columns: minmax(0,1.85fr) minmax(0,1fr); gap: 1.05rem; }
  .headline-stack { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 1.05rem; }
  .headline-side .story-text { padding: .8rem .9rem; }
  .headline-side .story-link { grid-template-rows: minmax(0,1fr) auto; }
  .headline-side .story-media { position: relative; aspect-ratio: auto; min-height: 8rem; }
  .headline-side .story-media img { position: absolute; inset: 0; object-position: center 27%; }
  .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.05rem; }
}
