/* 1. Foundations and shared controls. Palette and spacing tokens: assets/theme.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font); }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; object-fit: cover; }
button, input, select { border-radius: var(--radius); }
input, select { min-width: 0; }
button { border: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; font-weight: 650; }
h1 { font-size: clamp(38px, 4vw, 60px); letter-spacing: -.045em; }
h2 { font-size: 28px; letter-spacing: -.025em; }
h3 { font-size: 19px; letter-spacing: -.02em; }
p { margin-bottom: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#main:focus-visible { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 20; padding: 12px; background: var(--paper); border: 1px solid var(--accent); }
.skip-link:focus { top: 10px; }
.container { width: min(100% - var(--gutter) * 2, var(--content-width)); margin-inline: auto; }
.eyebrow { color: var(--muted); text-transform: uppercase; font-size: 10px; font-weight: 650; letter-spacing: .14em; }
.muted { color: var(--muted); font-size: 13px; }
.text-link { color: var(--accent); font-size: 13px; }
.text-link { display: flex; align-items: center; gap: 16px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
/* Shared arrow treatment: the shaft extends past the square behind its head. */
.arrow-action { display: inline-flex; align-items: center; gap: 8px; }
button.arrow-action { padding: 0; background: transparent; }
button.arrow-action:disabled { opacity: .35; cursor: default; }
.action-arrow { position: relative; width: 52px; height: 30px; flex: none; color: var(--ink); background: linear-gradient(to left, var(--accent) 30px, transparent 30px); }
.action-arrow::before, .action-arrow::after { content: ''; position: absolute; }
.action-arrow::before { left: 0; top: 50%; width: calc(100% - 10px); height: 1px; background: currentColor; }
.action-arrow::after { right: 12px; top: 50%; width: 12px; height: 12px; border: solid currentColor; border-width: 1px 1px 0 0; transform: translateY(-50%) rotate(45deg); }
.action-arrow--left { transform: scaleX(-1); }
.action-arrow--down { width: 30px; height: 44px; background: linear-gradient(to top, var(--accent) 30px, transparent 30px); }
.action-arrow--down::before { top: 0; left: 50%; width: 1px; height: calc(100% - 10px); }
.action-arrow--down::after { inset: auto auto 12px 50%; transform: translateX(-50%) rotate(135deg); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 11px 17px; color: var(--paper); background: var(--accent); border: 1px solid var(--accent); font-size: 13px; font-weight: 600; }
.button:hover { filter: brightness(.94); }
.button.secondary { color: var(--accent); background: var(--paper); border-color: var(--line); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; }
.loading { padding: 80px var(--gutter); color: var(--muted); }

/* 2. Global header, navigation, search and footer. */
.site-header { position: relative; min-height: var(--header-height); display: grid; grid-template-columns: minmax(0, 1fr) clamp(160px, 18vw, 250px); grid-template-rows: 44px 48px; grid-template-areas: "brand search" "nav search"; align-items: center; column-gap: 24px; padding: 14px var(--gutter) 0; border-bottom: 1px solid var(--line); background: var(--paper); }
/* Center the logo/title as one unit; the SVG frame excludes the PNG's white margins. */
.brand { grid-area: brand; justify-self: center; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.brand-logo { width: 36px; height: 36px; flex-shrink: 0; }
#main-nav { grid-area: nav; display: flex; align-self: stretch; justify-content: center; gap: clamp(18px, 2.2vw, 36px); align-items: stretch; }
#main-nav a { display: grid; grid-template-areas: "label"; align-content: center; justify-items: center; border-bottom: 2px solid transparent; padding-top: 2px; color: var(--muted); font-size: var(--nav-font-size); }
/* Reserve each label's bold width so hovering never moves neighbouring tabs. */
#main-nav a > span, #main-nav a::after { grid-area: label; }
#main-nav a::after { content: attr(data-label); font-weight: 650; visibility: hidden; pointer-events: none; }
#main-nav a:is(:hover, :focus-visible) { color: var(--ink); font-weight: 650; }
#main-nav a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 650; }
.hub-nav { display: flex; align-items: stretch; }
.hub-subnav { display: none; position: absolute; z-index: 10; top: calc(100% - 1px); left: 0; width: 100%; height: var(--hub-bar-height); padding: 8px 0; border-block: 1px solid var(--line); background: var(--paper); }
.hub-nav.is-open .hub-subnav { display: block; }
.hub-subnav-links { display: flex; gap: 4px; width: max-content; margin-left: var(--hub-centre, 50%); transform: translateX(-50%); }
#main-nav .hub-subnav a { padding: 9px 12px; border: 0; }
.search-field { min-width: 0; display: flex; align-items: center; gap: 10px; }
.search-field svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
.search-field input { width: 100%; border: 0; background: transparent; padding: 8px 0; outline-offset: 1px; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: var(--muted); }
#site-search { grid-area: search; width: 100%; border-bottom: 1px solid var(--line); }
.menu-button { display: none; padding: 8px 10px; background: var(--surface); font-size: 12px; }
.site-footer { margin-top: 64px; padding: 24px 0 34px; border-top: 1px solid var(--accent); display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; }

/* 3. Homepage: studio introduction and connected graph preview, then collections. */
.home-hero { padding: var(--page-heading-top) 0 52px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 44px; }
.hero-copy { position: relative; }
/* The homepage label sits above its title without shifting the shared title line. */
.hero-copy .eyebrow { position: absolute; bottom: 100%; margin: 0 0 18px; font-size: var(--nav-font-size); font-style: italic; font-weight: 400; letter-spacing: normal; text-transform: none; }
.hero-copy h1 { margin-bottom: 9px; font-size: clamp(36px, 3.65vw, 58px); }
.hero-subtitle { font-size: clamp(22px, 2vw, 31px); letter-spacing: -.03em; margin-bottom: 15px; line-height: 1.25; }
.graph-preview { display: flex; min-height: 440px; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); }
.graph-preview-bottom { justify-content: flex-end; padding: 21px 24px; }
.graph-preview-canvas { position: relative; flex: 1; min-height: 360px; pointer-events: none; }
.graph-preview-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph-preview-bottom { color: var(--accent); border-top: 1px solid var(--line); font-size: 13px; }
.home-introduction { color: var(--muted); font-size: 16px; line-height: 1.75; margin: 28px 0 0; }
.home-section { padding: 38px 0; border-top: 1px solid var(--line); }
.home-section + .home-section { margin-top: 12px; }
.home-section .section-heading { flex-wrap: wrap; }
.home-section .section-heading .arrow-action { margin-left: auto; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
/* The hover treatment includes the artwork and the card copy. */
.collection-card { min-width: 0; display: flex; flex-direction: column; padding: 4px; border: 1px solid var(--line); border-radius: calc(var(--radius) * 2); background: var(--paper); }
.collection-card, .evidence-card { transition: box-shadow .2s; }
:is(.collection-card, .evidence-card):is(:hover, :focus-visible) { box-shadow: 0 4px 20px color-mix(in srgb, var(--ink) 15%, transparent); }
.collection-image { overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.collection-artwork { display: block; width: 100%; aspect-ratio: 2.15; height: auto; }
/* Logo frames remove source whitespace so the artwork and card copy align. */
.partner-logo { background: var(--paper); }
.collection-card-copy { position: relative; flex: 1; display: flex; flex-direction: column; padding: 14px 10px 10px; }
.collection-card h3 { margin: 0 0 8px; font-size: 20px; }
.card-year { display: block; margin-top: auto; color: var(--muted); font-size: 12px; }
.collection-empty { padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 9px; }
.collection-empty p { color: var(--muted); margin-bottom: 0; font-size: 14px; }

/* 4. Collection subpages, studio years and project details. */
.page-heading { padding: var(--page-heading-top) 0 42px; max-width: 800px; }
.page-heading h1, .hub-header h1 { margin: 0 0 18px; font-size: var(--page-title-size); }
.page-heading > p:last-child { margin: 0; color: var(--muted); font-size: 17px; }
.year-section { padding-top: 30px; margin-bottom: 50px; border-top: 1px solid var(--line); }
.year-section h2 { font-size: 22px; }
.collection-empty.large { min-height: 280px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 48px; }
.collection-empty.large h2 { font-size: 30px; margin-bottom: 15px; }
.collection-page { min-height: 65vh; }
/* People cards use team colors and can also display portraits. */
.person-card { flex-direction: row; align-items: center; gap: 16px; padding: 22px; }
.person-card .collection-card-copy { padding: 0; }
.person-card .collection-image { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; }
.person-card .collection-artwork { height: 100%; aspect-ratio: 1; object-fit: cover; }
.person-avatar { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--avatar); }
.person-role { color: var(--muted); font-size: 12px; }
/* Project overview and inline evidence viewer share one scrolling page. */
.project-toolbar { background: var(--paper); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.project-viewer:has(.is-file-open) .project-toolbar { position: sticky; top: 0; z-index: 2; }
.project-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; }
.project-controls [data-project-cover] { padding: 8px 10px; background: var(--surface); }
.project-sequence { display: flex; gap: 12px; }
.project-sequence button { font-size: 12px; }
#project-position { min-width: 70px; text-align: center; color: var(--muted); }
.project-display { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: "info stage"; gap: 36px; align-items: start; padding-block: 36px; }
.project-display.is-file-open { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); grid-template-areas: "stage info"; }
.project-stage { grid-area: stage; min-width: 0; }
.project-overview { width: 100%; max-height: 540px; object-fit: contain; object-position: right top; border-radius: var(--radius); }
.is-file-open .project-stage { height: clamp(360px, 60svh, 680px); padding: 12px; background: var(--surface); display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; }
.is-file-open .project-stage > *, .project-stage .file-preview img { width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; }
.project-stage .file-preview { display: flex; flex-direction: column; background: var(--paper); }
.project-stage .file-preview img { flex: 1; }
.project-stage .preview-caption { flex-shrink: 0; }
.project-info { grid-area: info; min-width: 0; }
.project-info h1 { font-size: var(--page-title-size); overflow-wrap: anywhere; }
.project-info h2 { font-size: 14px; margin: 20px 0 10px; overflow-wrap: anywhere; }
.is-file-open .project-info > h2 { margin: 0 0 22px; font-size: 25px; }
.project-info p { font-size: 13px; color: var(--muted); }
.project-files { border-top: 1px solid var(--line); padding-block: 36px; }

/* 5. Hub introduction, collapsible filters and search toolbar. */
/* Hub's persistent view bar occupies part of the same title offset. */
.hub-header { padding: calc(var(--page-heading-top) - var(--hub-bar-height)) var(--gutter) 42px; border-bottom: 1px solid var(--line); }
.hub-header h1 { overflow-wrap: anywhere; }
.hub-header > p { margin: 0; max-width: 800px; color: var(--muted); font-size: 17px; }
.hub-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 70vh; }
.filters { padding: 28px 20px 40px var(--gutter); border-right: 1px solid var(--line); }
.mobile-filter-summary { display: none; }
.filter-heading { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 15px; }
.filter-heading h2 { margin: 0; font-size: 13px; letter-spacing: 0; }
.bucket-filters { display: grid; gap: 3px; padding-block: 8px; }
.bucket-filters label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; cursor: pointer; }
.bucket-filters input { margin: 0; accent-color: var(--bucket); width: 14px; height: 14px; }
.tag-heading { margin: 23px 0 8px; }
.tag-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.tag-modes button { flex: 1; padding: 5px 7px; border: 1px solid var(--accent); background: var(--paper); font-size: 12px; }
.tag-modes button[data-tag-mode="exclude"] { border-style: dashed; }
.tag-modes button[aria-pressed="true"] { background: var(--accent-soft); font-weight: 650; }
.filter-group summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 2px 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; list-style: none; }
.filter-group summary::-webkit-details-marker { display: none; }
.group-indicator { width: 7px; height: 7px; flex: 0 0 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.filter-group[open] .group-indicator { transform: rotate(-135deg); }
.tag-options { padding-block: 7px 12px; }
.tag-option { display: flex; align-items: center; gap: 6px; min-height: 32px; width: 100%; padding: 3px 0; background: transparent; text-align: left; font-size: 12px; }
.filter-square { width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid var(--muted); }
.tag-option[data-selection="include"] .filter-square { background: var(--accent); border-color: var(--accent); }
.tag-option[data-selection="exclude"] .filter-square { background: repeating-linear-gradient(135deg, var(--accent) 0 1px, var(--paper) 1px 4px); border-color: var(--accent); }
.tag-option small { color: var(--muted); font-size: 9px; }
.tag-total { margin-left: auto; }
.clear-filters { display: flex; width: 100%; justify-content: space-between; padding: 10px 0; margin-top: 22px; border-top: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; }
.hub-content { min-width: 0; padding: 28px var(--gutter) 30px 30px; }
.hub-toolbar { display: flex; gap: 24px; align-items: center; }
#evidence-search { flex: 1; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 10px; }
.search-submit { color: var(--accent); background: transparent; font-size: 11px; padding: 5px; }
.sort-label { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 11px; }
.sort-label select { padding: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 12px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.active-filters:not(:empty) { margin-top: 14px; }
.filter-chip { border: 1px solid var(--line); background: var(--accent-soft); padding: 5px 8px; color: var(--accent); font-size: 11px; }
.filter-chip.exclude { border: 1px dashed var(--accent); background: var(--paper); color: var(--ink); }
.result-count { color: var(--muted); font-size: 11px; padding: 18px 0; margin: 0; }
.no-results { padding: 70px 24px; text-align: center; background: var(--surface); border-radius: var(--radius); }
.no-results p { color: var(--muted); }

/* 6. Grid evidence cards. Bucket colours are CSS variables. */
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.evidence-card { position: relative; display: grid; grid-template-areas: "artwork"; width: 100%; min-width: 0; padding: 0; text-align: left; border: 1px solid var(--line); background: var(--surface); overflow: hidden; border-radius: var(--radius); }
.evidence-card[aria-pressed="true"] { border-color: var(--accent); }
.evidence-card-copy { grid-area: artwork; align-self: end; position: relative; display: block; margin: 28px 10px 0; padding: 10px 12px; background: color-mix(in srgb, var(--paper) 91%, transparent); }
.bucket-badge { display: table; margin: -22px 0 6px; padding: 2px 7px; background: var(--bucket); color: var(--ink); font-size: 10px; font-weight: 650; }
.evidence-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.tag { display: inline-block; border: 1px solid var(--line); background: var(--paper); border-radius: 3px; padding: 3px 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
a.tag:is(:hover, :focus-visible) { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.evidence-thumbnail { grid-area: artwork; display: block; position: relative; aspect-ratio: 1.55; overflow: hidden; }
.evidence-thumbnail img { height: 100%; width: 100%; object-fit: contain; }
.table-thumbnail { display: table; width: 100%; height: 100%; table-layout: fixed; border-collapse: collapse; background: var(--paper); font-size: 10px; }
.table-thumbnail > span { display: table-row; }
.table-thumbnail > span:first-child { background: var(--accent-soft); font-weight: 650; }
.table-thumbnail > span > span { display: table-cell; padding: 4px; border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; gap: 6px; }
.file-glyph { display: block; font-size: 42px; line-height: 1.2; color: var(--muted); }
.load-more { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 35px 0; }
.load-more .arrow-action { color: var(--accent); font-size: 13px; font-weight: 600; }
.preview-fallback { display: grid; place-items: center; min-height: 120px; padding: 24px; color: var(--muted); font-size: 12px; }

/* 7. Shared detail drawer: attachments, metadata and linked evidence. */
.detail-panel { position: fixed; z-index: 15; top: 0; bottom: 0; right: 0; width: min(420px, 100%); overflow-y: auto; overscroll-behavior: contain; padding: 22px 26px 36px; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 45px color-mix(in srgb, var(--ink) 9%, transparent); }
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.viewing-history { display: flex; gap: 6px; }
.viewing-history button { font-size: 12px; }
.detail-panel > .viewing-history { margin-bottom: 18px; }
.close-detail { display: grid; place-items: center; width: 36px; height: 36px; background: var(--surface); font-size: 24px; }
.detail-panel h2 { margin: 0 0 22px; font-size: 25px; line-height: 1.25; overflow-wrap: anywhere; }
.file-preview { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.file-preview img { width: 100%; max-height: 350px; object-fit: contain; }
.preview-caption { display: flex; justify-content: space-between; color: var(--accent); font-size: 11px; padding: 10px 12px; border-top: 1px solid var(--line); }
.pdf-preview { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: var(--radius); }
.excerpt-preview { max-height: 300px; overflow: auto; margin-bottom: 16px; }
.excerpt-preview pre { white-space: pre-wrap; font: 12px/1.5 var(--font); }
.excerpt-preview table { border-collapse: collapse; font-size: 10px; }
.excerpt-preview td { padding: 5px; border: 1px solid var(--line); }
.video-preview { width: 100%; background: var(--ink); }
.file-unavailable { min-height: 170px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 24px; background: var(--surface); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.file-unavailable p { margin: 0; }
.file-select-label { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.file-select-label select { width: 100%; padding: 10px 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 12px; }
.file-open { width: 100%; margin: 12px 0 8px; }
.detail-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-section h3 { display: flex; align-items: baseline; gap: 7px; font-size: 13px; margin-bottom: 13px; letter-spacing: 0; }
.detail-section p { color: var(--muted); font-size: 12px; line-height: 1.65; white-space: pre-line; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.linked-items { display: grid; gap: 8px; }
.linked-items button { position: relative; width: 100%; text-align: left; display: flex; flex-direction: column; align-items: flex-start; padding: 12px; background: var(--surface); border: 1px solid var(--line); }
.linked-items strong { display: block; font-size: 12px; padding-right: 12px; }
.linked-items .muted { font-size: 10px; margin-top: 5px; }
.linked-items button > span:last-child { position: absolute; right: 12px; top: 12px; }

/* 8. Responsive layouts and reduced-motion preferences. */
.site-header:has([data-page="hub"][aria-current]) { margin-bottom: var(--hub-bar-height); }
@media (min-width: 1450px) {
  .detail-open .hub-page { margin-right: 420px; }
  .detail-open .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  #main-nav { gap: 20px; }
  .home-hero { gap: 30px; }
  .hub-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .filters { padding-left: 24px; }
  .hub-content { padding-right: 24px; }
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .project-display.is-file-open { grid-template-columns: minmax(0, 1fr) minmax(0, 290px); }
  .hero-copy h1 { font-size: 38px; }
  .graph-preview { min-height: 390px; }
  .collection-grid { gap: 20px; }
  .collection-card h3 { font-size: 18px; }
  .hub-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .sort-label { justify-content: flex-end; }
}
@media (max-width: 680px) {
  :root { --header-height: 112px; --page-title-size: 30px; --page-heading-top: 68px; --nav-font-size: 15px; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; grid-template-areas: "brand menu" "search search" "nav nav"; padding: 16px 20px 0; gap: 12px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-logo { width: 28px; height: 28px; }
  .menu-button { display: block; grid-area: menu; }
  /* Keep only the active Hub view bar visible while the main menu is collapsed. */
  #main-nav { display: contents; height: auto; gap: 0; width: 100%; }
  #main-nav:not(.is-open) > a, #main-nav:not(.is-open) .hub-nav > a { display: none; }
  #main-nav.is-open { display: grid; grid-template-columns: repeat(3, 1fr); }
  #main-nav a { justify-content: center; padding: 12px 4px; }
  .hub-nav { display: contents; }
  .hub-subnav-links { margin-left: 50%; }
  .home-hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 36px; gap: 26px; }
  .hero-copy h1 { font-size: clamp(32px, 8vw, 44px); }
  .hero-subtitle { font-size: 24px; }
  .graph-preview { min-height: 320px; }
  .graph-preview-canvas { min-height: 300px; }
  .graph-preview-bottom { padding: 16px 20px; }
  .home-section { padding-block: 28px; }
  .section-heading { gap: 14px; }
  .section-heading h2 { font-size: 24px; }
  .text-link { font-size: 11px; gap: 8px; white-space: nowrap; }
  .collection-grid { grid-template-columns: 1fr; gap: 28px; }
  .collection-artwork { aspect-ratio: 1.9; }
  .collection-empty { padding: 24px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 30px; }
  .page-heading { padding-bottom: 30px; }
  .page-heading > p:last-child { font-size: 15px; }
  .project-display, .project-display.is-file-open { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .project-display { grid-template-areas: "info" "stage"; }
  .project-display.is-file-open { grid-template-areas: "stage" "info"; }
  .project-toolbar { padding-block: 12px; }
  .project-controls { width: 100%; justify-content: space-between; gap: 6px; }
  .is-file-open .project-stage { height: max(300px, 52svh); }
  .hub-header { padding-inline: 20px; padding-bottom: 30px; }
  .hub-header > p { font-size: 15px; }
  .hub-layout { display: block; }
  .filters { padding: 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .filter-container { padding-bottom: 15px; }
  .mobile-filter-summary { display: list-item; padding: 14px 0; font-size: 13px; }
  .bucket-filters { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .tag-options { max-width: 440px; }
  .tag-option { font-size: 12px; min-height: 38px; }
  .hub-content { padding: 20px; }
  .hub-toolbar { gap: 10px; }
  .evidence-grid { gap: 12px; }
  .evidence-card-copy { padding: 12px; }
  .evidence-title { font-size: 12px; }
  .detail-panel { padding: 18px 22px 32px; }
  .detail-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
