/* The Access Credit Card – site styles (on top of Bootstrap 5.3).
   Colours are the official Access colours from the 1985 Retailer Operating Instructions:
   Access Green = Pantone 357, Access Orange = Pantone 172. The green matches the logo's background. */

:root,
[data-bs-theme=light] {
    --access-green: #215735;
    --access-orange: #fa4616;
    --access-green-soft: #e7f0ea;
    --access-orange-text: #b8360f;      /* orange dark enough for small text on white */
    --link: #1b6b3d;
    --link-hover: #b8360f;
    --page-bg: #fbfaf6;
    --panel-bg: #ffffff;
    --rule: #e2e0d8;
    --muted: #5d625e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
    --bs-body-bg: var(--page-bg);
    --bs-link-color-rgb: 27, 107, 61;
    --bs-link-hover-color-rgb: 184, 54, 15;
    --bs-font-sans-serif: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

[data-bs-theme=dark] {
    --access-green-soft: #1a2a20;
    --access-orange-text: #ff8a63;
    --link: #7fd19c;
    --link-hover: #ff8a63;
    --page-bg: #121513;
    --panel-bg: #1a1e1b;
    --rule: #2e3530;
    --muted: #a3aba5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --bs-body-bg: var(--page-bg);
    --bs-body-color: #e3e6e3;
    --bs-link-color-rgb: 127, 209, 156;
    --bs-link-hover-color-rgb: 255, 138, 99;
}

body {
    background: var(--page-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }

.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* ----- Header ----------------------------------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 1030; }

.site-nav {
    background: var(--access-green);   /* exactly the logo's own background, so the logo sits seamlessly */
    padding-top: .25rem;
    padding-bottom: .25rem;
    border-bottom: 4px solid var(--access-orange);
}

.site-nav .navbar-brand { padding: 0; margin-right: 1rem; }
.site-nav .navbar-brand img { display: block; }

.site-nav .nav-link { color: rgba(255, 255, 255, .88); font-weight: 600; }
.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .nav-link.show { color: #fff; }
.site-nav .nav-link.active { color: #fff; box-shadow: inset 0 -3px 0 var(--access-orange); }

.site-nav .dropdown-menu { border-top: 3px solid var(--access-orange); box-shadow: var(--shadow); }
.site-nav .dropdown-item.active,
.site-nav .dropdown-item:active { background: var(--access-green); color: #fff; }
.site-nav .dropdown-header { color: var(--access-orange-text); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }

.badge-new {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--access-orange);
    color: #fff;
    border-radius: 3px;
    padding: .1rem .3rem;
    vertical-align: middle;
}

.nav-search { display: flex; align-items: center; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 0 .25rem 0 .75rem; }
.nav-search input { background: transparent; border: 0; color: #fff; width: 7.5rem; padding: .35rem 0; outline: none; }
.nav-search input::placeholder { color: rgba(255, 255, 255, .7); }
.nav-search:focus-within { background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 2px var(--access-orange); }
.nav-search button { background: none; border: 0; color: #fff; padding: .35rem .5rem; }
@media (max-width: 575.98px) {
    .site-nav .nav-search:not(.nav-search-menu) { display: none; }   /* phones: search is inside the menu instead */
}
.nav-search-menu { display: flex; margin: .75rem 0 .25rem; }
.nav-search-menu input { flex: 1; width: auto; }

.theme-toggle { background: none; border: 0; color: #fff; padding: .4rem .5rem; border-radius: 6px; }
.theme-toggle:hover { background: rgba(255, 255, 255, .12); }
[data-bs-theme=light] .theme-toggle .i-sun,
[data-bs-theme=dark] .theme-toggle .i-moon { display: none; }

.site-nav .navbar-toggler { border-color: rgba(255, 255, 255, .4); }

@media (max-width: 1199.98px) {
    .site-nav .navbar-collapse { max-height: calc(100vh - 70px); overflow-y: auto; padding-bottom: .75rem; }
    .site-nav .dropdown-menu { background: rgba(255, 255, 255, .06); border: 0; box-shadow: none; }
    .site-nav .dropdown-item { color: rgba(255, 255, 255, .9); }
    .site-nav .dropdown-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
    .site-nav .dropdown-header { color: #ffb59c; }
    .site-nav .dropdown-divider { border-color: rgba(255, 255, 255, .15); }
}

/* ----- Page structure --------------------------------------------------------------------- */

.page-head { padding-top: 1.75rem; padding-bottom: .5rem; }
.page-head h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin-bottom: .35rem; }
.page-head .lead { color: var(--muted); max-width: 46rem; }
.breadcrumb { font-size: .85rem; margin-bottom: .5rem; }
.breadcrumb-item, .breadcrumb-item::before { color: var(--muted) !important; }

.page-body { padding-bottom: 2.5rem; }
.page-body > p, .page-body > ul, .page-body > h2 { max-width: 46rem; }
.page-body > h2 { margin-top: 2.25rem; }

/* Panels replace the old "bs-callout" boxes. */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--rule);
    border-left: 5px solid var(--access-green);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}
.panel > h2, .panel > h3 { font-size: 1.3rem; color: var(--access-green); margin-bottom: .6rem; }
[data-bs-theme=dark] .panel > h2, [data-bs-theme=dark] .panel > h3 { color: #8fd6a7; }
.panel > :last-child { margin-bottom: 0; }
.panel p, .panel li { max-width: 46rem; }
.panel.orange { border-left-color: var(--access-orange); }
.panel.orange > h2, .panel.orange > h3 { color: var(--access-orange-text); }
.panel.notice { border-left-color: var(--access-orange); background: color-mix(in srgb, var(--access-orange) 7%, var(--panel-bg)); }

.year-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 2.5rem;
    font-size: 1.6rem;
}
.year-heading::after { content: ""; flex: 1; height: 3px; background: linear-gradient(90deg, var(--access-orange), transparent); }

/* ----- Pictures --------------------------------------------------------------------------- */

.photo { margin: 0 0 1.25rem; }
.photo a.zoom { position: relative; display: block; border-radius: 4px; overflow: hidden; background: var(--rule); }
.photo img { display: block; width: 100%; height: auto; transition: transform .25s ease; }
.photo a.zoom:hover img { transform: scale(1.02); }
.photo figcaption { font-size: .88rem; color: var(--muted); margin-top: .45rem; }
.zoom-hint {
    position: absolute; right: .5rem; bottom: .5rem; width: 2rem; height: 2rem; border-radius: 50%;
    background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M11.7 10.3a6.5 6.5 0 1 0-1.4 1.4l3.6 3.6 1.4-1.4-3.6-3.6zM6.5 11a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9zM6 4h1v2h2v1H7v2H6V7H4V6h2z'/%3E%3C/svg%3E") center / 1rem no-repeat;
    opacity: 0; transition: opacity .2s;
}
.photo a.zoom:hover .zoom-hint, .photo a.zoom:focus-visible .zoom-hint { opacity: 1; }

.gallery { display: grid; gap: 1.25rem 1.5rem; margin: 1.25rem 0; align-items: start; }
@media (min-width: 768px) {
    .gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    .gallery.cols-3, .gallery.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
.gallery.cols-1 { max-width: 60rem; }
.gallery .photo { margin: 0; }

/* Small originals (old card scans etc.) shouldn't be blown up to full width. */
.photo.natural img { width: auto; max-width: 100%; }
.photo.contained { max-width: 56rem; }
.photo.natural a.zoom { display: inline-block; }

/* ----- Multi-page documents --------------------------------------------------------------- */

.doc-reader {
    display: grid;
    gap: 1.5rem;
    background: var(--panel-bg);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}
@media (min-width: 768px) { .doc-reader { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.doc-info h2 { font-size: 1.35rem; }
.doc-count { font-weight: 700; color: var(--access-orange-text); }
.doc-pages {
    grid-column: 1 / -1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: .75rem;
}
.doc-pages .photo { margin: 0; }
.doc-pages figcaption { font-size: .75rem; }

/* ----- Videos ----------------------------------------------------------------------------- */

.video-grid { display: grid; gap: 1.5rem; margin: 1.25rem 0 2rem; }
@media (min-width: 768px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.video-title { font-size: 1.1rem; margin-bottom: .5rem; }
.video-facade {
    position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
    border-radius: 6px; overflow: hidden; background: #000; cursor: pointer;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s, transform .3s; }
.video-facade:hover img, .video-facade:focus-visible img { opacity: 1; transform: scale(1.02); }
.video-facade .play {
    position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px;
    background: var(--access-orange); border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
    transition: transform .2s;
}
.video-facade .play::after {
    content: ""; position: absolute; left: 27px; top: 14px;
    border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.video-facade:hover .play { transform: scale(1.08); }
.video-facade.unavailable {
    display: grid; place-items: center; padding: 1rem; cursor: default; text-align: center; font-size: .9rem;
    background: repeating-linear-gradient(135deg, #1d2a21 0 14px, #223127 14px 28px); color: rgba(255, 255, 255, .85);
}
.video-facade.unavailable a { color: #fff; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; display: block; background: #000; }
.video-link { display: inline-block; font-size: .82rem; margin-top: .35rem; color: var(--muted); }

.lyrics {
    font-style: italic;
    border-left: 3px solid var(--access-orange);
    padding: .25rem 0 .25rem 1rem;
    margin: 1rem 0;
    list-style: none;
}

/* ----- Aerial time-lapse ------------------------------------------------------------------ */

.timelapse { margin: 1.5rem 0 2rem; max-width: 56rem; }
.timelapse-stage { position: relative; border-radius: 6px; overflow: hidden; background: #000; }
.timelapse-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.timelapse-stage img.on { opacity: 1; }
.timelapse-year {
    position: absolute; right: .75rem; top: 2.5rem; padding: .2rem .7rem; border-radius: 4px;
    background: var(--access-green); color: #fff; font-weight: 800; font-size: 1.5rem;
    font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.timelapse-controls { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: center; margin-top: .75rem; }
.timelapse-controls .form-range { accent-color: var(--access-orange); }
.timelapse-ticks { grid-column: 2; display: flex; justify-content: space-between; list-style: none; padding: 0; margin: 0; font-size: .8rem; color: var(--muted); }
.timelapse figcaption { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
.timelapse-all summary { font-size: .9rem; cursor: pointer; color: var(--link); margin-top: .5rem; }

/* ----- Flip-over cards -------------------------------------------------------------------- */

.flip { margin: 0; }
.flip-card {
    position: relative; display: block; width: 100%; max-width: 440px; padding: 0; border: 0; background: none;
    perspective: 1200px; cursor: pointer;
}
.flip-card .face {
    position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 4.5% / 7%;
    backface-visibility: hidden; transition: transform .7s cubic-bezier(.3, .7, .3, 1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.flip-card .back { transform: rotateY(180deg); }
.flip-card[aria-pressed=true] .front { transform: rotateY(-180deg); }
.flip-card[aria-pressed=true] .back { transform: rotateY(0); }
.flip-card:focus-visible { outline: 3px solid var(--access-orange); outline-offset: 4px; border-radius: 12px; }
.flip figcaption { font-size: .88rem; color: var(--muted); margin-top: .75rem; max-width: 440px; }
@media (prefers-reduced-motion: reduce) { .flip-card .face { transition: none; } }

.card-era { display: grid; gap: 1.5rem; align-items: center; margin: 2rem 0; }
@media (min-width: 768px) { .card-era { grid-template-columns: minmax(0, 440px) 1fr; } }
.card-era .panel { margin: 0; }

/* ----- Home ------------------------------------------------------------------------------- */

.hero {
    position: relative;
    background: var(--access-green);
    color: #fff;
    overflow: hidden;
}
.hero-banner { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.hero-text { padding-top: 2rem; padding-bottom: 2.25rem; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); font-weight: 800; margin-bottom: .5rem; }
.hero .lead { max-width: 44rem; color: rgba(255, 255, 255, .9); }
.hero-stripes { height: 10px; background: linear-gradient(var(--access-orange) 0 50%, #fff 50% 60%, var(--access-orange) 60%); }

.explore { display: grid; gap: 1rem; margin: 2rem 0; }
@media (min-width: 576px) { .explore { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .explore { grid-template-columns: repeat(3, 1fr); } }
.explore-card {
    display: flex; flex-direction: column; background: var(--panel-bg); border: 1px solid var(--rule); border-radius: 8px;
    overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.explore-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); color: inherit; }
.explore-card img { width: 100%; height: 150px; object-fit: cover; background: var(--rule); }
.explore-card div { padding: 1rem 1.1rem 1.15rem; border-top: 4px solid var(--access-orange); }
.explore-card h2 { font-size: 1.15rem; margin-bottom: .3rem; color: var(--link); }
.explore-card p { font-size: .9rem; color: var(--muted); margin: 0; }

.on-this-day {
    display: grid; gap: 1rem; align-items: center;
    background: var(--access-green); color: #fff; border-radius: 8px; padding: 1.25rem 1.5rem; margin: 2rem 0;
    box-shadow: var(--shadow);
}
@media (min-width: 768px) { .on-this-day { grid-template-columns: auto 1fr auto; } }
.on-this-day .otd-date { justify-self: start; text-align: center; background: #fff; color: var(--access-green); border-radius: 6px; padding: .4rem .9rem; line-height: 1.1; min-width: 5.5rem; }
.on-this-day .otd-date b { display: block; font-size: 2rem; }
.on-this-day .otd-date span { font-size: .85rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.on-this-day h2 { font-size: 1.25rem; margin: 0 0 .25rem; }
.on-this-day .otd-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #ffb59c; font-weight: 700; margin: 0; }
.on-this-day p { margin: 0; }
.on-this-day a { color: #fff; }
.on-this-day img { max-height: 110px; width: auto; border-radius: 4px; }

.consent-embed {
    border: 1px dashed var(--rule); border-radius: 8px; padding: 1.25rem; background: var(--panel-bg); max-width: 520px;
}

/* ----- Timeline --------------------------------------------------------------------------- */

.decade-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; position: sticky; top: 64px; z-index: 5; background: var(--page-bg); padding: .5rem 0; }
.decade-nav a { padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--rule); text-decoration: none; font-weight: 600; background: var(--panel-bg); }
.decade-nav a:hover { border-color: var(--access-orange); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; max-width: 54rem; }
.timeline::before { content: ""; position: absolute; left: 6.25rem; top: 0; bottom: 0; width: 3px; background: var(--access-green); opacity: .35; }
.timeline > li { position: relative; display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.75rem; padding: .9rem 0; }
.timeline > li::before {
    content: ""; position: absolute; left: calc(6.25rem - 6px); top: 1.25rem; width: 15px; height: 15px; border-radius: 50%;
    background: var(--page-bg); border: 3px solid var(--access-green);
}
.timeline > li.key::before { background: var(--access-orange); border-color: var(--access-orange); width: 19px; height: 19px; left: calc(6.25rem - 8px); top: 1.1rem; }
.timeline > li.rival::before { border-color: #3a6fb0; }
.timeline .tl-date { text-align: right; font-weight: 800; color: var(--access-green); font-variant-numeric: tabular-nums; line-height: 1.2; padding-top: .1rem; }
[data-bs-theme=dark] .timeline .tl-date { color: #8fd6a7; }
.timeline .tl-date small { display: block; font-weight: 600; color: var(--muted); font-size: .75rem; }
.timeline .tl-body { background: var(--panel-bg); border: 1px solid var(--rule); border-radius: 6px; padding: .8rem 1rem; box-shadow: var(--shadow); }
.timeline .tl-body h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.timeline .tl-body p { margin: 0 0 .3rem; font-size: .95rem; }
.timeline .tl-body .tl-more { font-size: .85rem; }
.timeline .tl-body img { float: right; max-width: 120px; max-height: 90px; width: auto; margin: 0 0 .5rem 1rem; border-radius: 3px; }
.timeline .tl-decade { display: block; padding: 1.5rem 0 .25rem; }
.timeline .tl-decade::before { display: none; }
.timeline .tl-decade h2 { grid-column: 2; font-size: 1.4rem; margin: 0; }
@media (max-width: 575.98px) {
    .timeline::before { left: .45rem; }
    .timeline > li { grid-template-columns: 1fr; gap: .25rem; padding-left: 1.75rem; }
    .timeline > li::before, .timeline > li.key::before { left: 0; }
    .timeline .tl-date { text-align: left; }
    .timeline .tl-decade { padding-left: 1.75rem; }
    .timeline .tl-decade h2 { grid-column: 1; }
}

/* ----- Advert archive --------------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; background: var(--panel-bg); border: 1px solid var(--rule); border-radius: 8px; padding: .9rem 1.1rem; margin: 1rem 0 1.5rem; }
.filters fieldset { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.filters legend { float: none; width: auto; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 .35rem 0 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--rule); cursor: pointer; font-size: .9rem; user-select: none; }
.chip input:checked + span { background: var(--access-green); border-color: var(--access-green); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--access-orange); outline-offset: 2px; }
.filter-count { margin-left: auto; font-size: .9rem; color: var(--muted); }

.ad-wall { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ad-tile { background: var(--panel-bg); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ad-tile[hidden] { display: none; }
.ad-tile .ad-media { position: relative; aspect-ratio: 4 / 3; background: #e9e6dc; display: block; overflow: hidden; }
.ad-tile .ad-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ad-tile .ad-type { position: absolute; left: .5rem; top: .5rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 3px; background: var(--access-green); color: #fff; }
.ad-tile .ad-type.tv { background: var(--access-orange); }
.ad-tile .ad-body { padding: .7rem .85rem .9rem; font-size: .88rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.ad-tile .ad-year { font-weight: 800; color: var(--access-orange-text); }
.ad-tile .ad-body a.ad-page { margin-top: auto; font-size: .8rem; }
.ad-tile .video-facade { border-radius: 0; }
.ad-tile .video-title, .ad-tile .video-link { display: none; }

/* ----- Trade marks ------------------------------------------------------------------------ */

.swatches { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.swatch { width: 12rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); background: var(--panel-bg); box-shadow: var(--shadow); }
.swatch i { display: block; height: 5rem; }
.swatch div { padding: .6rem .8rem; font-size: .88rem; }
.swatch b { display: block; }
.tm-grid .photo a.zoom { background: #fff; padding: .75rem; }
.tm-grid .photo img { object-fit: contain; aspect-ratio: 4 / 3; }

/* ----- Misc ------------------------------------------------------------------------------- */

.btn-access { background: var(--access-green); border-color: var(--access-green); color: #fff; font-weight: 600; }
.btn-access:hover, .btn-access:focus { background: #173f26; border-color: #173f26; color: #fff; }
.btn-outline-access { border-color: var(--access-green); color: var(--link); font-weight: 600; }
.btn-outline-access:hover { background: var(--access-green); color: #fff; }

.notes { font-size: .85rem; color: var(--muted); padding-left: 1.5rem; margin-top: 1.5rem; max-width: 46rem; }
.note-ref a { text-decoration: none; font-weight: 700; }
.note-ref a::before { content: "["; }
.note-ref a::after { content: "]"; }

.address-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.address-grid .panel { margin: 0; }
address { font-style: normal; }

.search-inline { display: flex; gap: .5rem; max-width: 32rem; }
.search-results { list-style: none; padding: 0; max-width: 48rem; }
.search-results li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.search-results h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.search-results .where { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.search-results p { margin: .25rem 0 0; font-size: .95rem; }
mark { background: color-mix(in srgb, var(--access-orange) 30%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pager-nav { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 2.5rem; }
.pager-link {
    display: block; max-width: 48%; padding: .75rem 1.1rem; border: 1px solid var(--rule); border-radius: 8px;
    background: var(--panel-bg); text-decoration: none; font-weight: 700; box-shadow: var(--shadow);
}
.pager-link span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pager-link.prev span::before { content: "\2190  "; }
.pager-link.next { text-align: right; margin-left: auto; }
.pager-link.next span::after { content: "  \2192"; }
.pager-link:hover { border-color: var(--access-orange); }

/* ----- Footer ----------------------------------------------------------------------------- */

.site-footer {
    background: #18241c;
    color: rgba(255, 255, 255, .78);
    padding: 1.75rem 0 2rem;
    border-top: 4px solid var(--access-orange);
    font-size: .9rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffb59c; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-bottom: 1rem; }
.footer-links a { text-decoration: none; font-weight: 600; }
.ip-notice { font-size: .8rem; margin-bottom: .5rem; }

/* ----- Picture viewer --------------------------------------------------------------------- */

.viewer {
    width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgba(10, 14, 11, .96); color: #fff;
}
.viewer::backdrop { background: rgba(0, 0, 0, .6); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
.viewer-bar { display: flex; align-items: center; gap: .25rem; padding: .5rem .75rem; }
.viewer-count { margin-right: auto; font-size: .9rem; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.viewer-btn { display: inline-flex; background: none; border: 0; color: #fff; padding: .5rem; border-radius: 6px; }
.viewer-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.viewer-stage { position: relative; overflow: auto; display: grid; place-items: center; min-height: 0; touch-action: pan-y pinch-zoom; }
.viewer-stage img { max-width: calc(100vw - 7rem); max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; }
.viewer.zoomed .viewer-stage { place-items: start center; }
.viewer.zoomed .viewer-stage img { max-width: none; max-height: none; width: min(1600px, 180vw); cursor: zoom-out; }
@media (max-width: 575.98px) { .viewer-stage img { max-width: 100vw; } }
.viewer-caption { margin: 0; padding: .6rem 1rem 1rem; text-align: center; font-size: .92rem; color: rgba(255, 255, 255, .85); }
.viewer-caption a { color: #fff; }
.viewer-nav {
    position: fixed; top: 50%; transform: translateY(-50%); width: 3rem; height: 4rem; border: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .1); color: #fff; font-size: 2.5rem; line-height: 1;
}
.viewer-nav:hover { background: var(--access-orange); }
.viewer-nav.prev { left: .5rem; }
.viewer-nav.next { right: .5rem; }
.viewer-nav[hidden] { display: none; }
@media (max-width: 575.98px) { .viewer-nav { top: auto; bottom: 4.5rem; transform: none; } }

/* ----- Print ------------------------------------------------------------------------------ */

@media print {
    .site-header, .pager-nav, .footer-links, .nav-search, .video-facade, .timelapse-controls, .filters, .doc-info .btn { display: none !important; }
    .site-footer { background: none; color: #000; border: 0; }
    .panel, .doc-reader, .timeline .tl-body { box-shadow: none; }
    a { color: #000; }
}

/* ----- Meet the Flexible Friends ---------------------------------------------------------- */

.cast-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 1.5rem 0 1rem; }
.cast-card {
    display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit;
    background: var(--panel-bg); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
    box-shadow: var(--shadow); padding-bottom: .8rem; transition: transform .15s, box-shadow .15s;
}
.cast-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); color: inherit; }
.cast-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--access-green); border-bottom: 4px solid var(--access-orange); margin-bottom: .5rem; }
.cast-card span { padding: 0 .85rem; }
.cast-name { font-weight: 800; font-size: 1.05rem; color: var(--link); }
.cast-tagline { font-size: .85rem; color: var(--muted); }
.cast-count { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--access-orange-text); margin-top: .25rem; }
.cast-profile { scroll-margin-top: 80px; }
.cast-tagline-lg { font-style: italic; color: var(--access-orange-text); font-weight: 600; }
@media (min-width: 992px) { .video-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.video-cast { font-size: .85rem; color: var(--muted); margin: -.25rem 0 .5rem; }
.video-from { font-size: .82rem; color: var(--muted); margin: .25rem 0 0; }
.ad-tile .video-cast { display: none; }
.credits td, .credits th { font-size: .92rem; }

/* ----- Memories --------------------------------------------------------------------------- */

.memory-filter { gap: .4rem; }
.chip-link { display: inline-block; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--rule); text-decoration: none; font-size: .9rem; color: inherit; }
.chip-link span { font-size: .75rem; color: var(--muted); margin-left: .15rem; }
.chip-link.active { background: var(--access-green); border-color: var(--access-green); color: #fff; }
.chip-link.active span { color: rgba(255, 255, 255, .8); }
.chip-link:hover { border-color: var(--access-orange); color: inherit; }
.chip-link.active:hover { color: #fff; }

.memory-list { columns: 2 22rem; column-gap: 1.25rem; margin: 1.25rem 0; }
.memory {
    break-inside: avoid; margin: 0 0 1.25rem; background: var(--panel-bg); border: 1px solid var(--rule);
    border-top: 4px solid var(--access-orange); border-radius: 6px; padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
}
.memory blockquote { margin: 0 0 .75rem; position: relative; padding-left: 1.6rem; }
.memory blockquote::before {
    content: "\201C"; position: absolute; left: -.2rem; top: -.6rem; font-size: 3rem; line-height: 1;
    color: var(--access-orange); font-family: Georgia, serif;
}
.memory blockquote p { margin-bottom: .6rem; }
.memory blockquote p:last-child { margin-bottom: 0; }
.memory figcaption { font-size: .88rem; padding-left: 1.6rem; }
.memory figcaption span { display: block; color: var(--muted); font-size: .82rem; }
.memories-block { margin-top: 2.5rem; }
.share-memory { max-width: 860px; scroll-margin-top: 80px; }
.badge-status { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 3px; background: var(--rule); margin-right: .5rem; }
.badge-status.pending { background: var(--access-orange); color: #fff; }
.badge-status.approved { background: var(--access-green); color: #fff; }
.moderation-list { list-style: none; padding: 0; }
.moderation-list li { padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.moderation-list span { display: block; }
.memory-form legend { font-size: 1rem; font-weight: 500; }

/* ----- Quiz ------------------------------------------------------------------------------- */

.quiz { max-width: 46rem; }
.quiz-progress { height: 8px; border-radius: 999px; background: var(--rule); overflow: hidden; margin: .5rem 0 1.25rem; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--access-orange); transition: width .3s; }
.quiz-card { background: var(--panel-bg); border: 1px solid var(--rule); border-top: 5px solid var(--access-green); border-radius: 8px;
    padding: 1.25rem 1.5rem 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.quiz-card legend { float: left; width: 100%; padding: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-bottom: 1rem; outline: none; }
.quiz-num { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--access-orange-text); margin-bottom: .35rem; }
.quiz-options { display: grid; gap: .6rem; clear: left; }
.quiz-option { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; border: 2px solid var(--rule); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-option:hover { border-color: var(--access-green); }
.quiz-option input { margin-top: .3rem; accent-color: var(--access-green); flex: none; }
.quiz-option:has(input:focus-visible) { outline: 3px solid var(--access-orange); outline-offset: 2px; }
.answered .quiz-option { cursor: default; }
.answered .quiz-option:hover { border-color: var(--rule); }
.quiz-option.correct { border-color: #2f8f55; background: color-mix(in srgb, #2f8f55 12%, var(--panel-bg)); }
.quiz-option.chosen-wrong { border-color: #c2410c; background: color-mix(in srgb, #c2410c 10%, var(--panel-bg)); }
.quiz-feedback { margin-top: 1rem; }
.quiz-verdict { font-weight: 800; font-size: 1.1rem; margin-bottom: .35rem; }
.quiz-verdict.right, .quiz-review .right .quiz-mark { color: #2f8f55; }
.quiz-verdict.wrong, .quiz-review .wrong .quiz-mark { color: #c2410c; }
.quiz-explain { color: var(--bs-body-color); }
.quiz-source { display: block; font-size: .85rem; color: var(--muted); margin-top: .35rem; }

.quiz-result { display: grid; gap: 1.5rem; align-items: center; background: var(--access-green); color: #fff; border-radius: 10px;
    padding: 1.5rem 1.75rem; margin: 1rem 0 1.5rem; box-shadow: var(--shadow); max-width: 46rem; }
@media (min-width: 576px) { .quiz-result { grid-template-columns: auto 1fr; } }
.quiz-score { display: grid; place-items: center; width: 8rem; height: 8rem; border-radius: 50%; background: #fff; color: var(--access-green); line-height: 1; }
.quiz-score b { font-size: 3.2rem; align-self: end; }
.quiz-score span { font-size: .85rem; font-weight: 700; align-self: start; margin-top: .3rem; }
.quiz-rank-kicker { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: #ffb59c; }
.quiz-rank { font-size: 1.8rem; margin: .1rem 0 .35rem; }
.quiz-result .text-body-secondary { color: rgba(255, 255, 255, .8) !important; }
.quiz-review { max-width: 46rem; padding-left: 1.4rem; }
.quiz-review li { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.quiz-q { font-weight: 700; margin-bottom: .35rem; }
.quiz-review p { margin-bottom: .35rem; }
.quiz-mark { font-weight: 800; margin-right: .35rem; }
