/* r6a-02: layout, navigation and promo components. Tokens only (no colours of their own), logical properties for RTL, mobile first (no horizontal overflow at 360 px).
   Loaded after the other Master stylesheets; child themes restyle through the same tokens. */

/* ---- section: anchor offset, full width, 5-6 columns, stack rules ---- */
.section[id], [id].block { scroll-margin-top: 5rem; }
body:has(.section--full) { overflow-x: clip; }
.section--full { margin-inline: calc(50% - 50vw); padding-inline: max(var(--space-5), calc((100vw - var(--container)) / 2)); border-radius: 0; }
.main--bleed .section--full { margin-inline: 0; padding-inline: max(var(--space-5), calc((100% - var(--container)) / 2)); }
.section__grid--five, .section__grid--six { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) {
  .section__grid--one-two { grid-template-columns: 1fr 2fr; }
  .section__grid--five, .section__grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .section__grid--five, .section__grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 80rem) {
  .section__grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .section__grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* "Stack on phones only": columns keep side by side from 40rem instead of 52rem. */
@media (min-width: 40rem) and (max-width: 51.99rem) {
  .section__grid--stack-phone.section__grid--two, .section__grid--stack-phone.section__grid--two-one, .section__grid--stack-phone.section__grid--one-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section__grid--stack-phone.section__grid--two-one { grid-template-columns: 2fr 1fr; }
  .section__grid--stack-phone.section__grid--one-two { grid-template-columns: 1fr 2fr; }
  .section__grid--stack-phone.section__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section__grid--stack-phone.section__grid--four, .section__grid--stack-phone.section__grid--five, .section__grid--stack-phone.section__grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- divider / spacer ---- */
.divider { margin-inline: 0; border: 0; }
hr.divider { border-block-start: 1px solid var(--color-border); }
.divider--small { margin-block: var(--space-3); }
.divider--medium { margin-block: var(--space-5); }
.divider--large { margin-block: var(--space-7); }
div.divider--space.divider--small { height: var(--space-3); margin: 0; }
div.divider--space.divider--medium { height: var(--space-5); margin: 0; }
div.divider--space.divider--large { height: var(--space-7); margin: 0; }

/* ---- carousel (also the testimonial carousel); controls come from home.js ---- */
.carousel__main { position: relative; min-width: 0; }
.carousel__list { list-style: none; margin: 0; padding: 0; }
.cslide[hidden] { display: none; }
.carousel__main:not(.slides--js) .cslide:not(:first-child) { display: none; }
.cslide { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-card); overflow: hidden; }
.cslide:not([hidden]) { display: grid; }
.cslide__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cslide__body { padding: var(--space-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.cslide__badge { margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--tone-1-ink); }
.cslide__title { margin: 0; font-size: var(--text-2xl); line-height: 1.15; }
.cslide__text { margin: 0; }
.cslide__actions { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (min-width: 52rem) {
  .cslide:not([hidden]):has(.cslide__img) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cslide__img { height: 100%; aspect-ratio: auto; min-height: 16rem; }
  .cslide__body { justify-content: center; padding: var(--space-6); }
}
.carousel__controls { position: static; margin-top: var(--space-3); justify-content: center; flex-wrap: wrap; }
.carousel .slides__dot { border-color: var(--color-primary); width: 1.75rem; }
.carousel .slides__dot[aria-current="true"] { background: var(--color-primary); }
.carousel .slides__pause { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-contrast); min-height: 2.75rem; }
.carousel__step { min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: 2px solid var(--color-primary); border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-primary); font: 700 1.5rem/1 var(--font-body); cursor: pointer; }
.carousel__step:hover { background: var(--color-primary); color: var(--color-primary-contrast); }
.tquote { margin: 0; }
.tquote__by { display: flex; align-items: center; gap: var(--space-3); }
.tquote__photo { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex: none; }
.tquote__rating { display: block; color: var(--tone-3-ink); letter-spacing: 0.1em; }
.cslide--quote { padding: var(--space-4); }

/* ---- modal / lightbox (native dialog) ---- */
.dialog { width: min(40rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg); color: var(--color-text); box-shadow: var(--shadow-2); }
.dialog--wide { width: min(60rem, calc(100% - 2rem)); }
.dialog::backdrop { background: rgba(10, 15, 26, 0.7); }
.dialog__panel { padding: var(--space-5); overflow-wrap: anywhere; }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.dialog__title { margin: 0; font-size: var(--text-xl); }
.dialog__close { flex: none; min-width: 2.75rem; min-height: 2.75rem; border: 2px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text); font: 700 1.5rem/1 var(--font-body); cursor: pointer; }
.dialog__img, .dialog__video { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.dialog__video { background: #000; aspect-ratio: 16 / 9; }
/* Without JavaScript the triggers vanish and the dialog content simply sits in the page (never for the hero video, which has a plain link). */
html:not(.js) [data-dialog-open] { display: none; }
html:not(.js) .dialog:not(.dialog--js-only) { display: block; position: static; width: auto; max-height: none; box-shadow: none; }
.modal-block__thumb { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 24rem; }
.modal-block__thumb img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.modal-block__link { padding: 0; min-height: 2.75rem; border: 0; background: none; color: var(--color-link); font: inherit; text-decoration: underline; cursor: pointer; }
.hero__video { display: inline-flex; align-items: center; }

/* ---- hero: focal point, overlay strength ---- */
.hero--cover .hero__focus--top { object-position: center top; }
.hero--cover .hero__focus--bottom { object-position: center bottom; }
.hero--cover .hero__focus--left { object-position: left 40%; }
.hero--cover .hero__focus--right { object-position: right 40%; }
.hero__image.hero__focus--top { object-position: center top; }
.hero__image.hero__focus--bottom { object-position: center bottom; }
.hero__image.hero__focus--left { object-position: left center; }
.hero__image.hero__focus--right { object-position: right center; }
.hero__scrim--medium { background: linear-gradient(180deg, rgba(20, 10, 8, 0.65) 0%, rgba(20, 10, 8, 0.4) 40%, rgba(20, 10, 8, 0.8) 100%); }
.hero__scrim--strong { background: linear-gradient(180deg, rgba(20, 10, 8, 0.8) 0%, rgba(20, 10, 8, 0.65) 40%, rgba(20, 10, 8, 0.9) 100%); }

/* ---- media + text: photo on the left ---- */
.promo--left .promo__image { inset-inline-end: auto; inset-inline-start: 0; }
.promo--left .promo__body { margin-inline-start: auto; }

/* ---- masonry card wall ---- */
.cards--masonry { display: block; column-count: 1; column-gap: var(--space-4); }
.cards--masonry > li { break-inside: avoid; margin-bottom: var(--space-4); }
@media (min-width: 40rem) { .cards--masonry { column-count: 2; } }
@media (min-width: 60rem) { .cards--masonry { column-count: 3; } }

/* ---- logo wall ---- */
.strip__logo img { display: block; height: 2.5rem; width: auto; max-width: 9rem; object-fit: contain; }

/* ---- price tiers: tick list ---- */
.pricetier__features { list-style: none; padding-inline-start: 0; }
.pricetier__features li { display: flex; gap: var(--space-2); align-items: flex-start; }
.pricetier__features li::before { content: "\2713" / ""; flex: none; font-weight: 700; color: var(--tone-2-ink); }

/* ---- anchor nav, section nav, html sitemap ---- */
.anchornav { background: var(--color-bg); border-block: 1px solid var(--color-border); }
.anchornav--sticky { position: sticky; top: 0; z-index: 10; }
.anchornav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.anchornav__link { display: inline-block; padding: var(--space-3) var(--space-1); min-height: 2.75rem; font-weight: 600; color: var(--color-link); }
.sectionnav { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); background: var(--color-card); }
.sectionnav__title { margin: 0 0 var(--space-2); font-weight: 700; font-size: var(--text-lg); }
.sectionnav__list { list-style: none; margin: 0; padding: 0; }
.sectionnav__list .sectionnav__list { padding-inline-start: var(--space-4); }
.sectionnav__item > a, .sectionnav__item > span { display: block; padding: var(--space-2); min-height: 2.75rem; border-inline-start: 3px solid transparent; }
.sectionnav__item.is-current > a { border-inline-start-color: var(--color-primary); font-weight: 700; background: var(--color-surface); text-decoration: none; }
.sitemap__list { list-style: none; margin: 0; padding: 0; }
.sitemap__list .sitemap__list { padding-inline-start: var(--space-5); border-inline-start: 1px solid var(--color-border); }
.sitemap__list a { display: inline-block; padding-block: var(--space-1); min-height: 2rem; }

/* ---- steps / timeline ---- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; display: flex; gap: var(--space-3); min-width: 0; }
.step__marker { flex: none; width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tone-1-solid); color: var(--tone-1-on); font-weight: 700; }
.step__marker--num::before { content: counter(step); }
.step__label { margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--tone-1-ink); }
.step__title { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.step__text { margin: 0; }
.steps--process { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps--process .step { flex-direction: column; }
.steps--timeline { position: relative; padding-inline-start: var(--space-3); }
.steps--timeline::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: calc(var(--space-3) + 1.375rem - 1px); width: 2px; background: var(--color-border); }
.steps--timeline .step { position: relative; padding-block-end: var(--space-5); }
.steps--timeline .step:last-child { padding-block-end: 0; }

/* ---- comparison table ---- */
.comparison { position: relative; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); max-width: 100%; }
.comparison__table { width: 100%; border-collapse: collapse; min-width: 28rem; }
.comparison__table th, .comparison__table td { padding: var(--space-3); border-block-end: 1px solid var(--color-border); text-align: center; vertical-align: middle; }
.comparison__table thead th { background: var(--color-surface); font-weight: 700; }
.comparison__table tbody th[scope="row"] { text-align: start; font-weight: 600; position: sticky; inset-inline-start: 0; background: var(--color-bg); }
.comparison__table .is-highlight { background: var(--tone-1-tint); color: var(--tone-1-ink); }
.comparison__yes { color: var(--tone-2-ink); font-weight: 700; }
.comparison__no { color: var(--tone-5-ink); font-weight: 700; }

/* ---- countdown ---- */
.countdown { padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--tone-1-tint); color: var(--tone-1-ink); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.countdown__title, .countdown__time, .countdown__until, .countdown__ended { margin: 0; }
.countdown__title { font-size: var(--text-xl); }
.countdown__time { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.countdown__unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 4.5rem; }
.countdown__num { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown__label { font-size: var(--text-sm); }

/* ---- accordion: expand all / collapse all (script-added) ---- */
.accordion__tools { margin-block-end: var(--space-2); text-align: end; }
.accordion__toggle-all { min-height: 2.75rem; padding: 0 var(--space-4); border: 2px solid var(--color-primary); border-radius: var(--radius); background: var(--color-bg); color: var(--color-primary); font: 700 var(--text-sm) var(--font-body); cursor: pointer; }
.accordion__item:target { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* ---- announcement bar ---- */
.notice-bar { background: var(--band-dark-bg); color: var(--band-dark-fg); }
.notice-bar--warning { background: var(--tone-3-solid); color: var(--tone-3-on); }
.notice-bar--alert { background: var(--tone-5-solid); color: var(--tone-5-on); }
.notice-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-2); }
.notice-bar__text { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.notice-bar__badge { background: var(--tone-3-solid); color: var(--tone-3-on); }
.notice-bar a, .notice-bar a:visited { color: inherit; font-weight: 700; text-decoration: underline; }
.notice-bar__close { flex: none; min-width: 2.75rem; min-height: 2.75rem; border: 0; background: none; color: inherit; font: 700 1.5rem/1 var(--font-body); cursor: pointer; }
.notice-bar__close:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
.notice-off .notice-bar { display: none; }

/* ---- mega menu (desktop): columns from the menu tree plus a promo slot; on small screens it is a plain nested list ---- */
.mega__cols, .mega__links { list-style: none; margin: 0; padding: 0; }
.mega__inner { padding-inline-start: var(--space-4); }
.mega__heading { font-weight: 700; }
.mega__promo-link { display: block; }
@media (min-width: 60rem) {
  .menu__item--mega > .mega {
    display: none; position: absolute; inset-inline-start: 0; top: 100%; z-index: 20; width: max-content; max-width: min(56rem, calc(100vw - 2rem));
    background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-2);
  }
  .menu__item--mega:nth-last-child(-n+2) > .mega { inset-inline-start: auto; inset-inline-end: 0; }
  .menu__item--mega:hover > .mega, .menu__item--mega:focus-within > .mega { display: block; }
  .menu__item--mega[data-dismissed] > .mega { display: none; }
  .mega__inner { display: flex; gap: var(--space-5); padding: var(--space-5); }
  .mega__cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10rem, 1fr); gap: var(--space-5); }
  .mega__promo { flex: none; width: 15rem; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--tone-1-tint); }
}
/* The panel is light in every theme, so its links use the page text colours even inside dark navigation bars. */
.menu .mega a, .menu .mega a:visited { color: var(--color-text); white-space: normal; }
.menu .mega a:hover { color: var(--color-primary); }
.menu .mega__promo, .menu .mega__promo a { color: var(--tone-1-ink); }

/* ---- footer columns, social links, back to top ---- */
.footer-cols { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-block-end: var(--space-5); }
.footer-cols__title { margin: 0 0 var(--space-2); font-size: var(--text-base); }
.footer-cols__list, .footer-social { list-style: none; margin: 0; padding: 0; }
.footer-cols__list a { display: inline-block; padding-block: var(--space-1); min-height: 2rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-block-end: var(--space-4); }
.footer-social a { display: inline-block; padding-block: var(--space-2); }
.footer-top { margin: var(--space-3) 0 0; }
.footer-top--outer { padding-block: var(--space-3); }
.back-to-top { display: inline-block; padding: var(--space-2) var(--space-3); min-height: 2.75rem; font-weight: 700; }
.back-to-top.is-floating { position: fixed; inset-inline-end: var(--space-4); bottom: var(--space-4); z-index: 30; border-radius: var(--radius-pill); background: var(--color-primary); color: var(--color-primary-contrast); box-shadow: var(--shadow-2); text-decoration: none; }
.site-footer a.back-to-top.is-floating { color: var(--color-primary-contrast); }

/* ---- pager (crawlable pagination shape shared by every listing) ---- */
.pager { margin-block: var(--space-5); }
.pager__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.pager__link, .pager__current, .pager__gap { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; }
.pager__link { color: var(--color-link); background: var(--color-bg); }
.pager__link:hover { background: var(--color-surface); }
.pager__current { background: var(--color-primary); color: var(--color-primary-contrast); border-color: var(--color-primary); font-weight: 700; }
.pager__gap { border-color: transparent; }
.pager__status { margin: var(--space-2) 0 0; text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); }

html.hc .cslide, html.hc .countdown, html.hc .sectionnav, html.hc .comparison, html.hc .dialog { border: 2px solid var(--color-border); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ==== r6a-03: content and media components. Tokens only; logical properties; nothing wider than the column at 360 px. ==== */

/* ---- heading block ---- */
.heading-block__title { margin: 0; scroll-margin-top: 5rem; }
.heading-block__subtitle { margin: var(--space-2) 0 0; color: var(--color-text-muted); font-size: var(--text-lg); }
.heading-block--center { text-align: center; }

/* ---- data table: scrolls inside its own focusable region ---- */
.datatable { margin-inline: 0; }
.datatable__scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.datatable__scroll:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.datatable__table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.datatable__table caption { padding: var(--space-3); text-align: start; font-weight: 700; font-size: var(--text-base); }
.datatable__table th, .datatable__table td { padding: var(--space-2) var(--space-3); border-block-start: 1px solid var(--color-border); text-align: start; vertical-align: top; }
.datatable__table thead th { background: var(--color-surface); white-space: nowrap; }
.datatable__table tbody tr:nth-child(even) { background: var(--color-surface); }
.datatable__note { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- callout: kind is written as a label as well as coloured ---- */
.callout { --callout-solid: var(--tone-1-solid); --callout-tint: var(--tone-1-tint); --callout-ink: var(--tone-1-ink); padding: var(--space-4) var(--space-5); border: 1px solid var(--callout-solid); border-inline-start-width: 0.4rem; border-radius: var(--radius); background: var(--callout-tint); color: var(--callout-ink); }
.callout--success { --callout-solid: var(--tone-2-solid); --callout-tint: var(--tone-2-tint); --callout-ink: var(--tone-2-ink); }
.callout--warning { --callout-solid: var(--tone-3-solid); --callout-tint: var(--tone-3-tint); --callout-ink: var(--tone-3-ink); }
.callout--danger { --callout-solid: var(--tone-5-solid); --callout-tint: var(--tone-5-tint); --callout-ink: var(--tone-5-ink); }
.callout p { margin: 0; }
.callout__kind { font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.callout__title { margin-top: var(--space-1) !important; font-weight: 700; font-size: var(--text-lg); }
.callout__body { margin-top: var(--space-2); }
.callout__body > :last-child { margin-bottom: 0; }

/* Legal / disclaimer notice (r6a-06): quiet surface, wording first, version and date underneath. */
.legal-notice { padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); overflow-wrap: anywhere; }
.legal-notice p { margin: 0; }
.legal-notice__title { font-weight: 700; font-size: var(--text-base); }
.legal-notice__body { margin-top: var(--space-2); }
.legal-notice__body > :last-child { margin-bottom: 0; }
.legal-notice__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-3) !important; color: var(--color-text-muted, var(--color-text)); }

/* ---- table of contents ---- */
.toc { padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.toc[hidden] { display: none; }
.toc__title { margin: 0 0 var(--space-2); font-weight: 700; }
.toc__list, .toc__list ol { margin: 0; padding-inline-start: var(--space-5); }
.toc__list a { display: inline-block; padding-block: var(--space-1); min-height: 1.75rem; }

/* ---- author card ---- */
.author-card { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-card); }
.author-card__photo { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; flex: none; }
.author-card__body { flex: 1 1 14rem; min-width: 0; }
.author-card__name { margin: 0; font-size: var(--text-xl); }
.author-card__role { margin: var(--space-1) 0 0; font-weight: 600; color: var(--color-text-muted); }
.author-card__bio { margin: var(--space-2) 0 0; }

/* ---- tag chips ---- */
.chips__label { margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); }
.detail__topics { margin-top: var(--space-2); }
.detail__byline { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); color: var(--color-text-muted); }
.detail__print { margin: var(--space-2) 0 0; }
.detail__print button { min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--color-link); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---- code snippet ---- */
.codesnippet { position: relative; margin-inline: 0; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.codesnippet__bar { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-block-end: 1px solid var(--color-border); font-size: var(--text-sm); font-weight: 600; }
.codesnippet__lang { color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.codesnippet__pre { margin: 0; padding: var(--space-3); overflow-x: auto; max-width: 100%; font: 0.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
.codesnippet__pre:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: -3px; }
.codesnippet__copy { margin: 0 var(--space-3) var(--space-3); min-height: 2.75rem; padding: 0 var(--space-4); border: 2px solid var(--color-primary); border-radius: var(--radius); background: var(--color-bg); color: var(--color-primary); font: 700 var(--text-sm) var(--font-body); cursor: pointer; }
.codesnippet__copy[hidden] { display: none; }

/* ---- glossary and footnotes ---- */
.glossary__list { margin: 0; }
.glossary__row { padding-block: var(--space-3); border-block-end: 1px solid var(--color-border); }
.glossary__row dt { font-weight: 700; scroll-margin-top: 5rem; }
.glossary__row dd { margin: var(--space-1) 0 0; }
.glossary__row dt:target { background: var(--tone-3-tint); color: var(--tone-3-ink); }
.footnotes__list { padding-inline-start: var(--space-6); font-size: var(--text-sm); }
.footnotes__list li { margin-block: var(--space-2); scroll-margin-top: 5rem; overflow-wrap: anywhere; }
.footnotes__list li:target { background: var(--tone-3-tint); color: var(--tone-3-ink); }

/* ---- document list ---- */
.doclist__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius); }
.doclist__item { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-block-start: 1px solid var(--color-border); }
.doclist__item:first-child { border-block-start: 0; }
.doclist__link { font-weight: 700; overflow-wrap: anywhere; }
.doclist__desc { color: var(--color-text-muted); }
.doclist__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.doclist__type { padding: 0 var(--space-2); border: 1px solid currentColor; border-radius: var(--radius); font-weight: 700; }

/* ---- audio, pdf, transcripts ---- */
.audioplayer { margin-inline: 0; }
.audioplayer audio { display: block; width: 100%; }
.audioplayer__title { margin-bottom: var(--space-2); font-weight: 700; }
.audioplayer__transcript, .video__transcript, .embed__text, .chart__data { margin-top: var(--space-3); }
.audioplayer__transcript summary, .video__transcript summary, .embed__text summary, .chart__data summary { min-height: 2.75rem; padding-block: var(--space-2); cursor: pointer; font-weight: 600; }
.pdfviewer { margin-inline: 0; }
.pdfviewer__frame { display: block; width: 100%; height: 32rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.pdfviewer--tall .pdfviewer__frame { height: 48rem; }
@media (max-width: 40rem) { .pdfviewer__frame { height: 22rem; } .pdfviewer--tall .pdfviewer__frame { height: 30rem; } }
.pdfviewer__caption { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- image sizes and focus; gallery lightbox ---- */
.block--image-medium { max-width: 40rem; }
.block--image-small { max-width: 20rem; }
@media (max-width: 40rem) { .block--image picture img, .block--image > img { max-height: 70vw; object-fit: cover; } }
.gallery__link { display: block; border-radius: var(--radius); }
.lightbox { width: min(96vw, 64rem); max-width: 96vw; padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
.lightbox__panel { position: relative; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-bg); color: var(--color-text); }
.lightbox__panel .dialog__close { position: absolute; inset-block-start: var(--space-2); inset-inline-end: var(--space-2); z-index: 1; }
.lightbox__img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.lightbox__caption { margin: var(--space-2) 0 0; text-align: center; color: var(--color-text-muted); }
.lightbox__nav { margin-top: var(--space-2); display: flex; align-items: center; justify-content: center; gap: var(--space-4); }

/* ---- video facade, live status, embed ---- */
.video--facade { background: var(--color-footer-bg); }
.video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: var(--color-footer-text); text-decoration: none; }
.video__play svg { color: var(--color-primary); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.video__play-label { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--color-footer-bg); font-weight: 700; }
.video__play:hover svg, .video__play:focus-visible svg { transform: scale(1.08); }
.video__captions { display: block; font-size: var(--text-sm); }
.embed { margin-inline: 0; }
.embed__status { margin: 0 0 var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; font-weight: 600; }
.embed__live { padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--tone-5-solid); color: var(--tone-5-on); font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.embed__frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.embed--standard .embed__frame { aspect-ratio: 4 / 3; }
.embed--tall .embed__frame { aspect-ratio: 3 / 4; }
.embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__facade { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-4); text-align: center; }
.embed__host { margin: 0; color: var(--color-text-muted); }

/* ---- image hotspots ---- */
.hotspots__stage { position: relative; }
.hotspots__img { display: block; width: 100%; border-radius: var(--radius); }
.hotspots__pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; border: 3px solid var(--color-bg); border-radius: 50%; background: var(--color-primary); color: var(--color-primary-contrast); font-weight: 800; text-decoration: none; box-shadow: var(--shadow-2); }
.hotspots__pin:hover { transform: translate(-50%, -50%) scale(1.1); }
.hotspots__list { margin: var(--space-4) 0 0; padding-inline-start: var(--space-6); }
.hotspots__entry { margin-block: var(--space-2); scroll-margin-top: 5rem; }
.hotspots__entry strong { display: block; }
.hotspots__entry:target { background: var(--tone-3-tint); color: var(--tone-3-ink); outline: 2px solid var(--tone-3-ink); }

/* ---- background video ---- */
.bgvideo { position: relative; min-height: 22rem; display: grid; align-items: end; overflow: hidden; border-radius: var(--radius-lg); background: var(--band-dark-bg); color: var(--band-dark-fg); }
.bgvideo__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgvideo__content { position: relative; z-index: 1; padding: var(--space-6) var(--space-5); max-width: 40rem; background: linear-gradient(to top, var(--band-dark-bg), transparent); }
.bgvideo__content::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--band-dark-bg); opacity: 0.7; }
.bgvideo__title { margin: 0 0 var(--space-2); font-size: var(--text-3xl); line-height: 1.1; color: var(--band-dark-fg); }
.bgvideo__text { margin: 0 0 var(--space-3); }
.bgvideo__toggle { position: absolute; z-index: 2; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); min-height: 2.75rem; padding: 0 var(--space-4); border: 2px solid var(--band-dark-fg); border-radius: var(--radius-pill); background: var(--band-dark-bg); color: var(--band-dark-fg); font: 700 var(--text-sm) var(--font-body); cursor: pointer; }
.bgvideo__toggle[hidden] { display: none; }

/* ---- before / after: both panes stacked without script; the clip edge is driven by --pos once enhanced ---- */
.beforeafter { margin-inline: 0; }
.beforeafter__stage { display: grid; gap: var(--space-3); }
.beforeafter__pane { position: relative; margin: 0; }
.beforeafter__pane img { display: block; width: 100%; border-radius: var(--radius); }
.beforeafter__tag { position: absolute; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--color-footer-bg); color: var(--color-footer-text); font-size: var(--text-sm); font-weight: 700; }
.beforeafter.is-enhanced .beforeafter__stage { position: relative; display: block; overflow: hidden; border-radius: var(--radius); --pos: 50%; }
.beforeafter.is-enhanced .beforeafter__pane--after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.beforeafter.is-enhanced .beforeafter__pane--after .beforeafter__tag { inset-inline-start: auto; inset-inline-end: var(--space-2); }
.beforeafter.is-enhanced .beforeafter__pane img { height: 100%; object-fit: cover; border-radius: 0; }
.beforeafter__range { position: absolute; inset-inline: 0; inset-block-end: var(--space-3); width: calc(100% - 2 * var(--space-4)); margin-inline: var(--space-4); height: 2.75rem; accent-color: var(--color-primary); cursor: ew-resize; }
.beforeafter__range:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }

/* ---- chart: plain HTML bars ---- */
.chart { margin-inline: 0; --chart-fill: var(--tone-1-solid); }
.chart--tone-2 { --chart-fill: var(--tone-2-solid); }
.chart--tone-3 { --chart-fill: var(--tone-3-solid); }
.chart--tone-4 { --chart-fill: var(--tone-4-solid); }
.chart--tone-5 { --chart-fill: var(--tone-5-solid); }
.chart__title { margin-bottom: var(--space-2); font-weight: 700; font-size: var(--text-lg); }
.chart__summary { margin: 0 0 var(--space-3); }
.chart__plot { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.chart--bar .chart__row { display: grid; grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.chart__track { display: block; height: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; }
.chart__fill { display: block; height: 100%; background: var(--chart-fill); }
.chart__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart--column .chart__plot { grid-auto-flow: column; grid-auto-columns: minmax(3.5rem, 1fr); align-items: end; overflow-x: auto; gap: var(--space-3); }
.chart--column .chart__row { display: flex; flex-direction: column-reverse; align-items: stretch; gap: var(--space-1); text-align: center; }
.chart--column .chart__track { height: 12rem; display: flex; align-items: flex-end; }
.chart--column .chart__fill { width: 100%; height: auto; }
.chart--column .chart__label { font-size: var(--text-sm); overflow-wrap: anywhere; }
.chart__source { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
html.hc .chart__fill { background: var(--color-text); }
html.hc .callout, html.hc .author-card, html.hc .doclist__list, html.hc .codesnippet, html.hc .toc { border: 2px solid var(--color-border); }

/* ---- print: content only, in black on white, with link addresses; no chrome, no motion, no third-party frames ---- */
@media print {
  .skip-link, .site-header, .site-footer, .notice-bar, .back-to-top, .mega, .breadcrumb, nav[aria-label], .carousel__controls, .slides__controls, .toc, .anchornav,
  .bgvideo__toggle, .codesnippet__copy, .detail__print, .video--facade, .embed__frame, .pdfviewer__frame, .audioplayer audio, .beforeafter__range, .dialog, .modal-block, .cookie-banner, form { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  body { font-size: 12pt; line-height: 1.4; }
  main, .container, .detail { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  a, a:visited { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after, .doclist__link::after { content: " (" attr(href) ")"; font-size: 10pt; word-break: break-all; }
  h1, h2, h3, h4 { break-after: avoid; }
  figure, table, tr, .callout, .author-card, .doclist__item, .glossary__row { break-inside: avoid; }
  .datatable__scroll, .codesnippet__pre { overflow: visible !important; border-color: #000 !important; }
  .codesnippet__pre { white-space: pre-wrap; }
  .callout, .author-card, .toc, .doclist__list, .codesnippet { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; }
  .chart__fill { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .beforeafter.is-enhanced .beforeafter__pane--after { position: static; clip-path: none; }
  .gallery { display: grid; grid-template-columns: repeat(3, 1fr); }
  details > :not(summary) { display: block !important; }
  .bgvideo { min-height: 0; background: #fff; color: #000; }
  .bgvideo__video { display: none; }
}

/* ==== r6a-05: map, contact buttons, poll and page feedback. Tokens only; logical properties; nothing wider than the column at 360 px. ==== */
.map__box { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); }
.map__canvas { inline-size: 100%; block-size: 22rem; }
.map--short .map__canvas { block-size: 16rem; }
.map--tall .map__canvas { block-size: 32rem; }
.map__canvas:focus-visible { outline: 3px solid var(--color-focus, var(--color-primary)); outline-offset: -3px; }
.map__fallback { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.map__box.is-loaded .map__fallback { border-block-start: 1px solid var(--color-border); }
.map__address { font-style: normal; }
.map__places { margin: 0; padding-inline-start: var(--space-5); }
.map__coords, .map__note { color: var(--color-text-muted); font-size: var(--text-sm); }
.map__note, .map__actions { margin: 0; }
.map__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.contact-buttons__row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
@media (max-width: 40rem) {
  .contact-buttons--sticky { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; padding: var(--space-2) var(--space-3); background: var(--color-bg); border-block-start: 1px solid var(--color-border); margin: 0; }
  .contact-buttons--sticky .contact-buttons__row > .btn { flex: 1 1 8rem; text-align: center; }
  .contact-buttons--sticky .block__title { display: none; }
}
.feedback, .poll { padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.feedback__title, .poll__title { margin: 0 0 var(--space-3); font-size: var(--text-lg); }
.feedback__comment { display: flex; flex-direction: column; gap: var(--space-1); margin-block-end: var(--space-3); }
.feedback__comment textarea { inline-size: 100%; max-inline-size: 36rem; }
.feedback__buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
.poll__fieldset { border: 0; margin: 0 0 var(--space-3); padding: 0; min-inline-size: 0; }
.poll__option { display: flex; align-items: center; gap: var(--space-2); min-block-size: 2.75rem; }
.poll__closes, .poll__results { margin: var(--space-2) 0 0; font-size: var(--text-sm); }
.poll-results { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.poll-results li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, 12rem) auto; gap: var(--space-3); align-items: center; }
.poll-results meter { inline-size: 100%; block-size: 1rem; }
@media (max-width: 40rem) { .poll-results li { grid-template-columns: 1fr; } }
.grievance-id { font-family: var(--font-mono, monospace); letter-spacing: 0.05em; }
html.hc .map__box, html.hc .feedback, html.hc .poll { border: 2px solid var(--color-border); }
/* A .btn sets its own display, which would beat the hidden attribute: without JavaScript the button must stay out of sight. */
.map [data-map-load][hidden] { display: none; }
@media print { .map__canvas, .map__note, .map [data-map-load], .contact-buttons, .feedback, .poll, .recent { display: none !important; } }

/* ---- Recently viewed (D06): list built by recent.js; theme tokens only, wraps at 360 px ---- */
.recent__title { margin: 0 0 var(--space-3); }
.recent__status { margin: 0 0 var(--space-3); color: var(--color-text-muted); }
.recent__status[hidden], .recent__list[hidden], .recent [data-recent-clear][hidden] { display: none; }
.recent__list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.recent__item { border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-3); background: var(--color-surface); min-width: 0; overflow-wrap: anywhere; }
.recent__item a { font-weight: 700; }
.recent__summary { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.recent [data-recent-clear] { min-height: 2.75rem; }
