/* =============================================================
   UMak Media Assets Library — Site styles
   Built entirely on the shared UMak design tokens (theme.css).
   No hardcoded brand colors or sizes — tokens only.
   ============================================================= */

/* ─── Metropolis font (theme.css ships tokens, not @font-face) ── */
@font-face {
  font-family: "Metropolis";
  src: url("https://cdn.jsdelivr.net/gh/jayargrate/umak-public-assets@master/fonts/Metropolis%20(Body%20text)/METROPOLIS-REGULAR.TTF") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("https://cdn.jsdelivr.net/gh/jayargrate/umak-public-assets@master/fonts/Metropolis%20(Body%20text)/METROPOLIS-MEDIUM.TTF") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("https://cdn.jsdelivr.net/gh/jayargrate/umak-public-assets@master/fonts/Metropolis%20(Body%20text)/METROPOLIS-SEMIBOLD.TTF") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("https://cdn.jsdelivr.net/gh/jayargrate/umak-public-assets@master/fonts/Metropolis%20(Body%20text)/METROPOLIS-BOLD.TTF") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ─── Base ────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Metropolis", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface);
}
img { max-width: 100%; display: block; }
a { color: var(--tertiary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: var(--space-lg); padding-right: var(--space-lg);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  font: 600 14px/1 "Metropolis", sans-serif; letter-spacing: 0.05em;
  padding: 10px 24px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-60); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--surface-variant); text-decoration: none; }
.btn-accent { background: var(--secondary); color: var(--text-on-secondary); }
.btn-accent:hover { background: var(--secondary-mid); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--surface-variant); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

/* ─── Navbar ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary); color: var(--text-on-primary);
}
.nav {
  display: flex; align-items: center; gap: var(--space-lg);
  height: 55px; padding: 0;
}
.nav-brand { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.nav-brand img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--space-lg); margin-left: var(--space-sm); }
.nav-item {
  color: var(--text-on-primary); font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; padding: var(--space-xs) 0; white-space: nowrap;
}
.nav-item:hover { color: var(--secondary); text-decoration: none; }
.nav-item--active { color: var(--secondary); border-bottom: 2px solid var(--secondary); }
.nav-spacer { flex: 1; }
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search input {
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--neutral); border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 8px 16px 8px 38px; width: 220px; max-width: 42vw;
}
.nav-search input:focus { outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--tertiary-10); }
.nav-search svg { position: absolute; left: 12px; width: 18px; height: 18px;
  stroke: var(--text-muted); fill: none; stroke-width: 2; pointer-events: none; }

/* ─── Page hero / headers ─────────────────────────────────────── */
.page-hero { background: var(--primary-80); color: var(--text-on-primary);
  padding: var(--space-2xl) 0; text-align: center; }
.page-hero .breadcrumb { color: var(--tertiary-10); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: var(--space-sm); }
.page-hero .breadcrumb a { color: var(--tertiary-10); }
.page-title { font-size: 36px; font-weight: 700; letter-spacing: -0.01em; margin: 0;
  color: var(--text-on-primary); line-height: 1.15; }
.page-subtitle { margin: var(--space-sm) auto 0; color: var(--tertiary-10); max-width: 60ch; }
.result-count { color: var(--text-on-primary); font-size: 14px; margin-top: var(--space-md);
  opacity: .85; }

.hero-search { position: relative; display: inline-flex; align-items: center;
  margin: var(--space-lg) auto 0; width: 100%; max-width: 480px; }
.hero-search input {
  font-family: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--neutral); border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 12px 20px 12px 44px; width: 100%;
}
.hero-search input:focus { outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--tertiary-10); }
.hero-search svg { position: absolute; left: 16px; width: 20px; height: 20px;
  stroke: var(--text-muted); fill: none; stroke-width: 2; pointer-events: none; }

/* ─── Toolbar (filters) ───────────────────────────────────────── */
.toolbar { padding: var(--space-lg) 0; display: flex; flex-wrap: wrap; gap: var(--space-sm);
  align-items: center; }
.chip {
  font: 600 13px/1 "Metropolis", sans-serif; letter-spacing: .03em;
  padding: 8px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--neutral); color: var(--text-secondary);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--primary-60); color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--text-on-primary);
  border-color: var(--primary); }

/* ─── Card grid ───────────────────────────────────────────────── */
.grid {
  display: grid; gap: var(--space-lg);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding-bottom: var(--space-2xl);
}
.card {
  display: flex; flex-direction: column; background: var(--neutral);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s; color: inherit;
}
.card:hover { box-shadow: 0 8px 24px var(--toggle-shadow); transform: translateY(-2px);
  text-decoration: none; }
.card:hover .card-title { color: var(--tertiary); }
.card-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-variant); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: var(--space-sm); left: var(--space-sm);
  background: var(--secondary); color: var(--text-on-secondary);
  font: 600 11px/1 "Metropolis", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius-full);
}
.card-body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs);
  flex: 1; }
.card-category { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); }
.card-title { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--text-primary);
  margin: 0; transition: color .2s; }
.card-counts { display: flex; gap: var(--space-md); margin-top: auto; padding-top: var(--space-sm);
  color: var(--text-secondary); font-size: 13px; }
.card-counts span { display: inline-flex; align-items: center; gap: 5px; }
.card-counts svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── Cross-collection asset search results ───────────────────── */
.section-head { font-size: 22px; font-weight: 700; color: var(--text-primary);
  margin: 0 0 var(--space-lg); }
.asset-results { margin-top: var(--space-2xl); padding-top: var(--space-2xl);
  border-top: 1px solid var(--border); }
.asset-card .card-thumb { display: flex; align-items: center; justify-content: center; }
.asset-card .card-title { font-size: 15px; }
.card-thumb .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); border-radius: 50%; }
.card-thumb .play svg { width: 20px; height: 20px; fill: #fff; }
.asset-card-badge { font-weight: 700; font-size: 22px; letter-spacing: .05em;
  color: var(--text-muted); }

/* ─── Empty / status states ───────────────────────────────────── */
.status { text-align: center; color: var(--text-muted); padding: var(--space-3xl) 0; }

/* ─── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: var(--space-xl) 0 var(--space-3xl); }
.pagination button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--neutral); color: var(--text-secondary);
  font: 600 14px "Metropolis", sans-serif; cursor: pointer;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary-60); color: var(--primary); }
.pagination button[aria-current="page"] { background: var(--primary); color: var(--text-on-primary);
  border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.to-top {
  position: fixed; bottom: 24px; right: 80px; z-index: 90;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--neutral); color: var(--primary);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--toggle-shadow);
}
.to-top.show { display: flex; }
.to-top svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── Detail page ─────────────────────────────────────────────── */
.detail-hero { background: var(--primary-80); color: var(--text-on-primary);
  padding: var(--space-2xl) 0; }
.detail-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-2xl);
  align-items: center; }
.detail-hero-img { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-variant);
  aspect-ratio: 16 / 10; }
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-category { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--secondary); margin-bottom: var(--space-sm); }
.detail-desc { color: var(--tertiary-10); margin: var(--space-md) 0 var(--space-lg); }

/* Share row */
.share-row { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.share-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: var(--text-on-primary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s;
}
.share-btn:hover { background: rgba(255,255,255,.12); }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.copy-feedback { font-size: 13px; color: var(--secondary); opacity: 0; transition: opacity .2s; }
.copy-feedback.show { opacity: 1; }

/* Tabs (reuse theme.css dark-mode friendly classnames) */
.tabs { display: flex; gap: var(--space-lg); border-bottom: 1px solid var(--border);
  margin: var(--space-xl) 0 var(--space-lg); overflow-x: auto; }
.tab-item {
  appearance: none; background: none; border: none; cursor: pointer;
  font: 600 15px "Metropolis", sans-serif; color: var(--text-secondary);
  padding: var(--space-md) 2px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--secondary); }
.tab-item .count { color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.tab-panel { display: none; padding-bottom: var(--space-3xl); }
.tab-panel.active { display: block; }
.tab-actions { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); margin-bottom: var(--space-md); }

/* Icons / List view toggle (segmented) */
.view-toggle { display: inline-flex; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; }
.view-btn {
  appearance: none; border: none; cursor: pointer; padding: 0;
  width: 36px; height: 36px; background: var(--neutral); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn:hover { background: var(--surface-variant); color: var(--primary); }
.view-btn.active { background: var(--surface-variant); color: var(--primary); }
.view-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

/* File-manager list view */
.list-toolbar { display: flex; justify-content: flex-end; margin-bottom: var(--space-sm); }
.list-search { display: inline-flex; align-items: center; gap: 6px; background: var(--neutral);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 10px; }
.list-search:focus-within { border-color: var(--primary-60); }
.list-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; color: var(--text-muted); flex-shrink: 0; }
.list-search input { border: none; background: none; outline: none; font: inherit;
  color: var(--text-primary); min-width: 180px; }

.asset-table { display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.asset-row { display: grid; align-items: center; gap: var(--space-md);
  grid-template-columns: 48px minmax(0, 1fr) 140px 90px 80px 44px;
  padding: var(--space-sm) var(--space-md); background: var(--neutral); }
.asset-rows .asset-row + .asset-row { border-top: 1px solid var(--border); }
.asset-rows .asset-row:hover { background: var(--surface-variant); }
.asset-row--head { background: var(--surface-variant); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); }
.asset-row .col-name { min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-row .col-date, .asset-row .col-size, .asset-row .col-kind {
  font-size: 13px; color: var(--text-muted); }
.asset-row .col-dl { display: flex; justify-content: flex-end; }
.asset-row .col-dl .icon-download { width: 32px; height: 32px; }

/* Sortable headers */
.sort-btn { appearance: none; background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left;
  display: inline-flex; align-items: center; gap: 4px; }
.sort-btn:hover { color: var(--primary); }
.sort-btn.sorted { color: var(--primary); }
.sort-arrow { font-size: 9px; line-height: 1; }

/* List thumbnails */
.list-thumb { position: relative; display: block; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-variant); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb--doc { display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--primary); }
.list-play { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border-radius: var(--radius-full); background: rgba(17,28,78,.7);
  display: flex; align-items: center; justify-content: center; }
.list-play svg { width: 11px; height: 11px; fill: #fff; }

.asset-empty-row { padding: var(--space-lg); text-align: center; color: var(--text-muted);
  font-size: 14px; background: var(--neutral); }

@media (max-width: 640px) {
  .asset-row { grid-template-columns: 40px minmax(0, 1fr) 70px 44px; }
  .asset-row .col-date, .asset-row .col-kind { display: none; }
}

/* Asset grids */
.asset-grid { display: grid; gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.asset {
  background: var(--neutral); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.asset-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-variant);
  cursor: zoom-in; border: none; padding: 0; width: 100%; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: var(--radius-full);
  background: rgba(17,28,78,.7); display: flex; align-items: center; justify-content: center;
}
.asset-thumb .play svg { width: 20px; height: 20px; fill: #fff; }
.asset-info { padding: var(--space-sm) var(--space-md); display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-sm); }
.asset-meta { min-width: 0; }
.asset-name { font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-sub { font-size: 12px; color: var(--text-muted); }
.icon-download {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--neutral); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-download:hover { background: var(--surface-variant); }
.icon-download svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Document rows */
.doc-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.doc {
  display: flex; align-items: center; gap: var(--space-md);
  background: var(--neutral); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-md);
}
.doc-icon { width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--surface-variant); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.doc-meta { flex: 1; min-width: 0; }
.doc-title { font-weight: 600; color: var(--text-primary); }
.doc-sub { font-size: 13px; color: var(--text-muted); }

/* Related mini-cards reuse .grid + .card */

/* ─── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(1,6,28,.9);
  display: none; align-items: center; justify-content: center; padding: var(--space-xl);
}
.lightbox.open { display: flex; }
.lightbox-content { display: flex; align-items: center; gap: var(--space-lg);
  max-width: 96vw; max-height: 88vh; }
#lbStage { display: flex; align-items: center; justify-content: center; min-width: 0; }
#lbStage img, #lbStage video { max-width: 100%; max-height: 86vh; border-radius: var(--radius-md); }

/* Per-asset properties panel beside the media. */
.lightbox-info { flex: 0 0 300px; align-self: stretch; overflow-y: auto;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-lg); }
.lb-title { font-size: 18px; margin: 0 0 var(--space-md); color: var(--text-primary); }
.lb-props { margin: 0; }
.lb-row { display: flex; justify-content: space-between; gap: var(--space-md);
  padding: var(--space-xs) 0; border-bottom: 1px solid var(--border); }
.lb-row dt { color: var(--text-muted); font-size: 13px; }
.lb-row dd { margin: 0; text-align: right; font-size: 13px; word-break: break-word; }
.lb-desc { margin: var(--space-md) 0 0; font-size: 14px; color: var(--text-secondary);
  line-height: 1.5; }
.lb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm);
  margin-top: var(--space-lg); }
.lb-actions .btn { padding: 8px 16px; font-size: 14px; }

@media (max-width: 720px) {
  .lightbox-content { flex-direction: column; gap: var(--space-md);
    max-height: 92vh; overflow-y: auto; }
  #lbStage img, #lbStage video { max-height: 55vh; }
  .lightbox-info { flex: 0 0 auto; width: 100%; align-self: auto; }
}
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-nav svg, .lightbox-close svg { width: 24px; height: 24px; stroke: currentColor;
  fill: none; stroke-width: 2; }

/* ─── Locked assets (gated behind a request) ─────────────────────── */
.asset-thumb.is-locked { position: relative; }
.lock-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 6px; background: rgba(1,6,28,.55); color: #fff; font: 600 12px "Metropolis", sans-serif;
  text-transform: uppercase; letter-spacing: .05em;
}
.lock-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.icon-request {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--neutral); color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-request:hover { background: var(--surface-variant); color: var(--primary); }
.icon-request svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.asset-row .col-dl .icon-request { width: 32px; height: 32px; }

/* ─── Request-access modal ────────────────────────────────────────── */
.arq-modal {
  position: fixed; inset: 0; z-index: 300; background: rgba(1,6,28,.6);
  display: none; align-items: center; justify-content: center; padding: var(--space-lg);
}
.arq-modal.open { display: flex; }
.arq-panel {
  position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  background: var(--neutral); border-radius: var(--radius-lg); padding: var(--space-xl);
}
.arq-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none;
  background: none; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-full);
}
.arq-close:hover { background: var(--surface-variant); color: var(--text-primary); }
.arq-title { margin: 0 0 6px; font-size: 18px; color: var(--text-primary); }
.arq-sub { margin: 0 0 var(--space-lg); font-size: 13px; color: var(--text-muted); }
.arq-field { margin-bottom: var(--space-md); }
.arq-field label { display: block; font: 600 12px "Metropolis", sans-serif; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.arq-field input, .arq-field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 12px; box-sizing: border-box;
}
.arq-field textarea { min-height: 80px; resize: vertical; }
.arq-msg { padding: 10px 14px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: var(--space-md); }
.arq-msg.error { background: var(--error-light); color: var(--error); }
.arq-msg.success { background: var(--success-light); color: var(--success); }
.arq-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--primary-80); color: var(--tertiary-10);
  padding: var(--space-lg) 0; margin-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,.12); }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center;
  justify-content: space-between; }
.footer-copy, .footer-center, .footer-right { font-size: 13px; opacity: .85; margin: 0; }
.footer-copy { flex: 0 0 auto; }
.footer-center { flex: 1 1 auto; text-align: center; }
.footer-right { flex: 0 0 auto; text-align: right; }
.footer-center a, .footer-right a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-center a:hover, .footer-right a:hover { opacity: 1; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .detail-hero-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .page-title { font-size: 28px; }
}
@media (max-width: 560px) {
  .container { padding-left: var(--space-md); padding-right: var(--space-md); }
  .nav-search input { width: 160px; }
}

/* ─── Dark Mode: Contrast Fixes ───────────────────────────────── */
/*
   --primary stays dark navy in dark mode by design (theme.css), so it
   stays legible on the unchanged navy navbar. But several components
   here use var(--primary) as TEXT/ICON color on dark surfaces, where
   navy-on-navy is nearly invisible. Swap those to --tertiary, matching
   the pattern theme.css already uses for .btn-secondary/.btn-ghost.
*/
:root[data-theme="dark"] .chip:hover { color: var(--tertiary); }
:root[data-theme="dark"] .pagination button:hover:not(:disabled) { color: var(--tertiary); }
:root[data-theme="dark"] .to-top { color: var(--tertiary); }
:root[data-theme="dark"] .tab-item:hover,
:root[data-theme="dark"] .tab-item.active { color: var(--tertiary); }
:root[data-theme="dark"] .view-btn:hover,
:root[data-theme="dark"] .view-btn.active { color: var(--tertiary); }
:root[data-theme="dark"] .sort-btn:hover,
:root[data-theme="dark"] .sort-btn.sorted { color: var(--tertiary); }
:root[data-theme="dark"] .list-thumb--doc,
:root[data-theme="dark"] .icon-download,
:root[data-theme="dark"] .doc-icon { color: var(--tertiary); }
:root[data-theme="dark"] .icon-download:hover { color: var(--tertiary); }
/*
   --tertiary-10 is a pale blue in light mode (legible on the dark navy
   hero/footer) but theme.css redefines it to a near-black navy in dark
   mode (for tinted info backgrounds elsewhere). The hero/footer
   backgrounds (--primary/--primary-80) never change, so that redefined
   value goes dark-on-dark here. Force a light, semi-transparent white.
*/
:root[data-theme="dark"] .page-hero .breadcrumb,
:root[data-theme="dark"] .page-hero .breadcrumb a,
:root[data-theme="dark"] .page-subtitle,
:root[data-theme="dark"] .detail-desc,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .footer-center a,
:root[data-theme="dark"] .footer-right a {
  color: rgba(255, 255, 255, .75);
}
