/* ============================================================================
   EDITORIAL ARCHIVE — BROADSHEET THEME
   Implements the "Editorial Archive - Broadsheet" direction from the
   Creative Pantry redesign project (claude.ai/design).
   Loaded after styles.css; overrides tokens + component skins only, so all
   existing behavior (filters, previews, saves, AI search) keeps working.
   Palette: cream/ink + coral. Type: Fraunces / Space Grotesk / JetBrains Mono.
   ============================================================================ */

@font-face {
  font-family: 'Rasfferd';
  src: url('fonts/Rasfferd.otf') format('opentype');
  /* single-weight face: cover the full range so the browser never
     synthesizes a fake bold on top of it */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAF6F1;
  --bg-90: rgba(250, 246, 241, 0.86);
  --panel: #ffffff;
  --surface-2: #F4EDE3;
  --text: #1A1612;
  --muted: #6B6258;
  --faint: #A39A8E;
  --border: rgba(26, 22, 18, 0.1);
  --line-2: rgba(26, 22, 18, 0.15);
  --coral: #4B2FEF;
  --accent-orange: #4B2FEF;
  --menu-peach: #F4EDE3;
  --shadow: rgba(26, 22, 18, 0.06);
  --shadow-strong: rgba(26, 22, 18, 0.12);
  --award-grandprix: #C9A227;
  --award-gold: #D4AF37;
  --award-silver: #B8B8B8;
  --award-bronze: #B08D57;
  --font-display: 'Rasfferd', 'Fraunces', serif;
  --font-body: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

:root.dark-mode {
  --bg: #17130F;
  --bg-90: rgba(23, 19, 15, 0.82);
  --panel: #221C16;
  --surface-2: #2A241D;
  --text: #FAF6F1;
  --muted: #B8AFA2;
  --faint: #7A7166;
  --border: rgba(250, 246, 241, 0.1);
  --line-2: rgba(250, 246, 241, 0.18);
  --coral: #6B52FF;
  --accent-orange: #6B52FF;
  --menu-peach: #2A241D;
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-strong: rgba(0, 0, 0, 0.55);
}

/* ---------- Base ---------- */

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

::selection { background: var(--coral); color: #fff; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Top bar ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

.user-greeting {
  font: 600 13px/1 var(--font-body);
  color: var(--muted);
}

.bookmarks-toggle-btn,
.theme-toggle,
.menu-btn {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.bookmarks-toggle-btn:hover,
.theme-toggle:hover,
.menu-btn:hover {
  background: var(--surface-2);
  transform: none;
}

.bookmarks-toggle-btn.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.dropdown-menu {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 14px 40px -18px var(--shadow-strong);
}

.dropdown-list a {
  font: 500 14px/1.2 var(--font-body);
  color: var(--text);
}

/* ---------- Top bar (editorial.js) ---------- */

.gr-topbar { padding: 14px 34px; display: flex; align-items: center; gap: 20px; }

.gr-topbar .header-left { display: flex; align-items: center; gap: 24px; }

.gr-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.gr-wordtag {
  font: 600 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.gr-nav { display: flex; gap: 4px; }

.gr-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 13px/1 var(--font-body);
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.gr-pill:hover { background: var(--surface-2); }
.gr-pill:active { transform: scale(0.97); }

.gr-pill.active { background: var(--coral); color: #fff; }

.gr-pill-badge {
  font: 600 10px/1 var(--font-mono);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.gr-pill.active .gr-pill-badge { background: rgba(255, 255, 255, 0.25); color: #fff; }

.gr-ask {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--coral);
}

.gr-ask span {
  font: 400 13px/1 var(--font-body);
  color: var(--muted);
}

.gr-ask kbd {
  font: 600 10px/1 var(--font-mono);
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 6px;
  border-radius: 5px;
}

.gr-ask:hover { background: var(--surface-2); }

.gr-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A996FF, #4B2FEF) !important;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: #fff;
}

.gr-avatar-text { font: 700 13px/1 var(--font-body); color: #fff; }

.gr-avatar { padding: 0; overflow: hidden; }

.gr-avatar-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* The avatar replaces the greeting text; the bookmark icon stays */
.gr-topbar .user-greeting { display: none; }

@media (max-width: 900px) {
  .gr-nav { display: none; }
  .gr-ask kbd { display: none; }
}

/* ---------- Year rail (added by editorial.js) ---------- */

.year-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 12px;
}

.year-rail-label {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  flex: none;
}

.year-rail-track {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.year-rail-track::-webkit-scrollbar { height: 0; }

.year-pill {
  flex: none;
  font: 600 14px/1 var(--font-body);
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.year-pill:active { transform: scale(0.97); }

.year-pill:hover { background: var(--surface-2); }

.year-pill.active {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

/* Hide the year dropdown once the rail exists (rail proxies to it) */
.archives-header.has-year-rail #yearDropdown { display: none; }

/* ---------- Filter row ---------- */

.dropdown-toggle {
  font: 500 13px/1 var(--font-body);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 9px 15px;
  transition: background 0.15s ease;
}

.dropdown-toggle:hover { background: var(--surface-2); border-color: var(--line-2); }

.custom-dropdown .dropdown-menu {
  border-radius: 14px;
  /* size to the longest option instead of the toggle's width */
  right: auto !important;
  left: 0 !important;
  width: max-content !important;
  min-width: 280px !important;
  max-width: min(440px, 80vw) !important;
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 44px -18px var(--shadow-strong);
}

.custom-dropdown .dropdown-item {
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 14px;
  border-radius: 9px;
  font: 500 13px/1.4 var(--font-body);
}

/* hover ticker for overflowing option names (editorial.js animates .gr-tick) */
.custom-dropdown .dropdown-item .gr-tick {
  display: inline-block;
  will-change: transform;
}

.custom-dropdown .dropdown-item + .dropdown-item { margin-top: 1px; }

.custom-dropdown .dropdown-menu::-webkit-scrollbar { width: 8px; }
.custom-dropdown .dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}
.custom-dropdown .dropdown-menu::-webkit-scrollbar-track { background: transparent; }

.custom-dropdown .dropdown-item {
  font: 500 13px/1.3 var(--font-body);
  color: var(--text);
  border-radius: 8px;
}

.custom-dropdown .dropdown-item:hover { background: var(--surface-2); }

.custom-dropdown .dropdown-item.selected {
  background: var(--coral);
  color: #fff;
}

.filter-chip {
  font: 500 13px/1 var(--font-body);
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.filter-chip:active { transform: scale(0.97); }
.filter-chip:hover { background: var(--surface-2); }

.filter-chip.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* ----- Metallic award-tier chips (match the card badges) ----- */

.filter-chip[data-award]:not([data-award=""])::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: -1px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 1px 1px rgba(26, 22, 18, 0.15);
}

.filter-chip[data-award="GRAND PRIX / TITANIUM"]::before {
  background: radial-gradient(circle at 30% 30%, #F0D97A, #C9A227 60%, #8F7014);
}
.filter-chip[data-award="GOLD"]::before {
  background: radial-gradient(circle at 30% 30%, #F6E7AE, #D4AF37 60%, #9A7B1E);
}
.filter-chip[data-award="SILVER"]::before {
  background: radial-gradient(circle at 30% 30%, #FFFFFF, #C0C0C0 60%, #8A8A8A);
}
.filter-chip[data-award="BRONZE"]::before {
  background: radial-gradient(circle at 30% 30%, #EACBA4, #B08D57 60%, #7A5A34);
}

/* Active tier chips: metallic fill with a brushed sheen */
.filter-chip[data-award]:not([data-award=""]).active {
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(26, 22, 18, 0.18),
    0 2px 8px rgba(26, 22, 18, 0.18);
  font-weight: 600;
}

.filter-chip[data-award]:not([data-award=""]).active::before {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75), 0 0 0 1px rgba(26, 22, 18, 0.12);
}

.filter-chip[data-award="GRAND PRIX / TITANIUM"].active {
  background: linear-gradient(160deg, #F0D97A 0%, #E7C349 35%, #C9A227 70%, #DDB93A 100%);
  color: #1A1612;
}

.filter-chip[data-award="GOLD"].active {
  background: linear-gradient(160deg, #F8ECC0 0%, #F4E3A8 35%, #E0C25E 70%, #EDD98F 100%);
  color: #7A5E12;
}

.filter-chip[data-award="SILVER"].active {
  background: linear-gradient(160deg, #FAFAFA 0%, #E7E7E7 35%, #C4C4C4 70%, #DEDEDE 100%);
  color: #4A4A4A;
}

.filter-chip[data-award="BRONZE"].active {
  background: linear-gradient(160deg, #F2E0C8 0%, #EAD9C4 35%, #C89F6E 70%, #E0C29A 100%);
  color: #6B4A24;
}

/* The dark theme keeps the same metals — they read as jewelry on ink */
:root.dark-mode .filter-chip[data-award]:not([data-award=""]).active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.5);
}

.cp-shuffle-campaigns-button {
  font: 600 13px/1 var(--font-body);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.cp-shuffle-campaigns-button:hover { background: var(--surface-2); }

.active-filter-bubbles .filter-bubble,
.active-filter-bubbles .active-filter-bubble {
  font: 500 12px/1 var(--font-body);
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text);
}

/* ---------- Search + AI ---------- */

.search-bar { gap: 10px; }

/* Search bar hidden by default — the header's "Ask anything…" pill or the
   "/" shortcut reveals and focuses it */
.archives-header #searchBar { display: none; }
.archives-header #searchBar.gr-open { display: flex; }

/* One search bar look for both modes: prominent rounded field with the
   coral border, normal body font */
.search-input-wrapper input,
#archiveSearch {
  font: 400 15px/1.3 var(--font-body);
  font-variation-settings: normal;
  background: var(--panel);
  border: 1.5px solid var(--coral);
  border-radius: 16px;
  padding: 16px 22px;
  box-shadow: 0 10px 30px -18px var(--coral);
  color: var(--text);
}

#archiveSearch::placeholder { color: var(--faint); }

#archiveSearch:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(75, 47, 239, 0.15);
}

.ai-search-btn {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.ai-search-btn.active,
.ai-search-btn.ai-mode {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* AI mode: coral treatment for the whole search bar */
/* AI mode inherits the exact same search bar look */
.search-bar.ai-mode #archiveSearch,
.search-bar.ai-active #archiveSearch {
  font: 400 15px/1.3 var(--font-body);
  font-variation-settings: normal;
}

.ai-search-processing {
  color: var(--coral);
}

/* ---------- AI search view (editorial.js) ---------- */

.gr-ai-head { display: none; }
.gr-ai-try { display: none; }
.gr-ai-info { display: none; }

/* The search page: same layout whether AI is on or off. The head (badge +
   toggle + label) shows and filters step aside whenever the bar is open;
   the toggle only changes search behavior, never the page design. */
.archives-header.gr-search-open .gr-ai-head { display: block; }
.archives-header.gr-ai-on .gr-ai-try { display: flex; }
.archives-header.gr-ai-on .gr-ai-info { display: block; }

.archives-header.gr-search-open .year-rail,
.archives-header.gr-search-open .filter-row,
.archives-header.gr-search-open .active-filter-bubbles,
.archives-header.gr-search-open .ai-search-btn { display: none; }

/* Badge only reads ON when AI is actually on */
.archives-header:not(.gr-ai-on) .gr-ai-badge { display: none; }

/* Toggle off state: grey track, thumb left */
.gr-ai-toggle[aria-checked="false"] .gr-ai-toggle-track { background: var(--line-2); }
.gr-ai-toggle[aria-checked="false"] .gr-ai-toggle-thumb { right: auto; left: 2px; }

.gr-ai-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 26px;
}

.gr-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gr-ai-label {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

/* The big query input */
.gr-ai-try {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.gr-ai-try-label {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.gr-ai-chip {
  font: 500 13px/1 var(--font-body);
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-2);
  cursor: pointer;
}

.gr-ai-chip:hover { background: var(--surface-2); }

.gr-ai-chip.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.gr-ai-info {
  font: 400 14px/1.5 var(--font-body);
  color: var(--muted);
  max-width: 640px;
  margin: 22px 0 4px;
}

.gr-ai-info b { color: var(--text); font-weight: 600; }

/* AI mode toggle in the AI view header */
.gr-ai-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.gr-ai-toggle:hover { background: var(--surface-2); }

.gr-ai-toggle-track {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: var(--coral);
  position: relative;
  transition: background 0.15s ease;
}

.gr-ai-toggle-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.ai-processing-title {
  font: 600 20px/1.2 var(--font-display);
  color: var(--text);
  font-variation-settings: 'opsz' 144;
}

/* ---------- Archive list — "Ledger" rows ---------- */

.archives-left { background: var(--bg); }

#pageTitle {
  font: 600 40px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: 'opsz' 144;
}

.project-list { border-top: 2px solid var(--text); }

.project-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 20px 6px;
  transition: background 0.15s ease;
}

.project-item:hover {
  background: var(--surface-2);
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.project-item.active,
.project-item.selected {
  background: var(--surface-2);
  border-left: 3px solid var(--coral);
}

.project-title {
  font: 600 26px/1.05 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: 'opsz' 144;
}

.project-meta,
.project-meta .client,
.project-meta .agency,
.project-meta .festivals {
  font: 400 13px/1.3 var(--font-body);
  color: var(--muted);
}

.project-meta .separator { color: var(--faint); }

/* ---------- Award tier badges ---------- */

.award-badge {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  border: none;
  background: #ECE3D5;
  color: #6B6258;
}

.award-badge.grand-prix {
  background: #C9A227;
  color: #1A1612;
}

.award-badge.grand-prix::before { content: '★ '; }

.award-badge.gold { background: #F4E3A8; color: #7A5E12; }
.award-badge.silver { background: #E7E7E7; color: #5A5A5A; }
.award-badge.bronze { background: #EAD9C4; color: #7A5A34; }

:root.dark-mode .award-badge { background: rgba(250, 246, 241, 0.1); color: #B8AFA2; }
:root.dark-mode .award-badge.grand-prix { background: #E7C349; color: #17130F; }
:root.dark-mode .award-badge.gold { background: rgba(212, 175, 55, 0.28); color: #E7C349; }
:root.dark-mode .award-badge.silver { background: rgba(199, 199, 199, 0.2); color: #D7D7D7; }
:root.dark-mode .award-badge.bronze { background: rgba(176, 141, 87, 0.28); color: #D7B486; }

.award-count {
  font: 600 10px/1 var(--font-mono);
  color: var(--faint);
}

/* ---------- Save button ---------- */

.save-btn {
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--faint);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.save-btn:hover { color: var(--coral); transform: scale(1.06); }

.save-btn.saved {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* ---------- Preview pane ---------- */

.archives-right { background: var(--bg); }

.preview-video {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.preview-placeholder p {
  font: 400 15px/1.5 var(--font-body);
  color: var(--faint);
}

/* ---------- No results ---------- */

.no-results-message h3 {
  font: 600 26px/1.1 var(--font-display);
  color: var(--text);
  font-variation-settings: 'opsz' 144;
}

.no-results-message p {
  font: 400 15px/1.5 var(--font-body);
  color: var(--muted);
}

/* ---------- Detail view ---------- */

.video-detail { background: var(--bg); }

.back-btn {
  font: 500 13px/1 var(--font-body);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 9px 15px;
}

.back-btn:hover { background: var(--surface-2); color: var(--text); }

.detail-player {
  border-radius: 14px;
  overflow: hidden;
}

.detail-info {
  background: var(--panel);
  border-left: 1px solid var(--border);
}

.detail-info h1,
.detail-info h2,
.detail-info .campaign-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
  color: var(--text);
}

.detail-info .section-label,
.detail-info h3 {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Bug-report icon is a black PNG — invert it on dark so it stays visible */
:root.dark-mode .bug-icon { filter: invert(1) hue-rotate(180deg); }

/* ---------- Comments ---------- */

.detail-comments-wrapper,
.mobile-comments-section {
  font-family: var(--font-body);
}

/* ---------- Broadsheet grid (editorial.js renderer) ---------- */

.list-archives.broadsheet-mode .archives-right { display: none; }

.list-archives.broadsheet-mode .archives-left {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  flex: 1 1 100%;
  border-right: none;
}

/* One scroll container only: the grid flows inside .archives-left, which
   scrolls; kill .project-list's own viewport-height inner scroll */
.list-archives.broadsheet-mode .project-list {
  height: auto;
  overflow-y: visible;
}

.project-list.broadsheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 30px;
  border-top: none;
  padding-top: 6px;
}

@media (max-width: 1100px) {
  .project-list.broadsheet-grid { grid-template-columns: repeat(2, 1fr); }
}

.bs-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bs-card:active { transform: scale(0.98); }

.bs-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 38px;
  align-items: center;
  margin-bottom: 12px;
}

.bs-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.bs-featured .bs-thumb { border-radius: 12px; }

.bs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bs-thumb .preview-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--faint);
  font: 400 13px/1.4 var(--font-body);
}

.bs-thumb .award-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
}

.bs-heart {
  position: absolute;
  top: 16px;
  right: 16px;
  /* styles.css .save-btn centers via top:50% + translateY(-50%) at 0.2 opacity
     — neutralize all of it for the card hearts */
  transform: none;
  opacity: 1;
  padding: 0;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FAF6F1;
  border: 1px solid rgba(26, 22, 18, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  color: #1a1612;
  cursor: pointer;
}

.bs-featured .bs-heart {
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
}

/* styles.css sizes .save-btn svg at 20px — pin the card hearts down */
.bs-thumb .bs-heart svg { width: 14px; height: 14px; }

.bs-featured .bs-thumb .bs-heart svg { width: 17px; height: 17px; }

/* Saved state: keep the cream circle, fill the heart coral — the generic
   .save-btn.saved rule would otherwise paint the whole disc coral */
.bs-thumb .bs-heart.saved {
  background: #FAF6F1;
  border: 1px solid rgba(26, 22, 18, 0.08);
  color: var(--coral);
}

.bs-thumb .award-badge { z-index: 3; }

.bs-featured .bs-thumb .award-badge { top: 16px; left: 16px; }

.bs-heart.saved { color: var(--coral); }

.bs-heart:hover { color: var(--coral); transform: scale(1.08); }

.bs-play {
  z-index: 2;
  position: absolute;
  bottom: 18px;
  left: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(250, 246, 241, 0.92);
  display: grid;
  place-items: center;
  color: #1a1612;
}

.bs-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bs-featured .bs-info { gap: 13px; justify-content: center; }

.bs-meta {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.bs-title {
  font: 600 20px/1.1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
  font-variation-settings: 'opsz' 90;
}

.bs-featured .bs-title {
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
}

.bs-sub {
  font: 400 13px/1.4 var(--font-body);
  color: var(--muted);
}

.bs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Hover-to-play video overlay */

.bs-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

.bs-hover-video.playing { opacity: 1; }

.bs-hover-sound {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.bs-hover-video.playing ~ .bs-hover-sound { opacity: 1; }

.bs-hover-sound:hover { background: rgba(0, 0, 0, 0.75); }

/* Empty state (no results) — lives inside the grid, full width */
.bs-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 90px 20px;
}

.bs-empty-title {
  font: 600 28px/1.1 var(--font-display);
  color: var(--text);
  margin-bottom: 10px;
}

.bs-empty-sub {
  font: 400 15px/1.5 var(--font-body);
  color: var(--muted);
}

.bs-empty-clear {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  cursor: pointer;
  font: 600 15px/1.5 var(--font-body);
  color: var(--coral);
  border-bottom: 1px solid var(--coral);
}

/* Search icon on the Ask pill inherits the muted text tone */
.gr-ask { color: var(--muted); }

/* Skeleton loading state */

@keyframes bs-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.bs-skel { cursor: default; pointer-events: none; }

.bs-skel .bs-thumb,
.bs-skel-bar {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--panel) 50%, var(--surface-2) 75%);
  background-size: 800px 100%;
  animation: bs-shimmer 1.4s linear infinite;
}

.bs-skel-bar {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.bs-skel-bar.bs-skel-title { height: 22px; }

.bs-skel .bs-info { gap: 10px; }

/* ---------- Scrollbars (subtle, editorial) ---------- */

.project-list::-webkit-scrollbar { width: 8px; }
.project-list::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}


/* ============================================================================
   MOBILE — Editorial theme at phone widths
   ============================================================================ */

@media (max-width: 768px) {
  /* Top bar: compact, everything on one row */
  .gr-topbar { padding: 10px 14px; gap: 8px; }
  .gr-topbar .header-left { gap: 10px; }
  .gr-ask { padding: 8px 11px; }
  .gr-ask span { display: none; }

  /* Header column */
  .list-archives.broadsheet-mode .archives-left { padding: 14px 16px 60px; }

  /* Year rail: swipeable, label dropped */
  .year-rail { margin: 2px 0 10px; gap: 0; }
  .year-rail-label { display: none; }
  .year-pill { padding: 8px 12px; font-size: 13px; }

  /* Filter row: one horizontal swipe row instead of a stack */
  .archives-header .filter-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .archives-header .filter-row::-webkit-scrollbar { height: 0; }
  .archives-header .custom-dropdown { width: auto !important; flex: none; }
  .archives-header .dropdown-toggle {
    width: auto !important;
    white-space: nowrap;
    padding: 8px 13px;
    font-size: 12px;
  }
  .archives-header .filter-chips-container { flex: none; display: flex; }
  .archives-header .filter-chips { flex-wrap: nowrap; }
  .archives-header .filter-chip { white-space: nowrap; padding: 8px 11px; font-size: 12px; }
  .archives-header .cp-shuffle-campaigns-button { white-space: nowrap; flex: none; font-size: 12px; }

  /* Dropdown menus: keep on screen */
  .custom-dropdown .dropdown-menu { max-width: calc(100vw - 40px) !important; }

  /* Search page */
  .search-input-wrapper input,
  #archiveSearch { padding: 13px 16px; font-size: 15px; border-radius: 14px; }
  .gr-ai-topline { margin: 4px 0 16px; }
  .gr-ai-badge { font-size: 10px; padding: 7px 11px; }
  .gr-ai-try { gap: 6px; }
  .gr-ai-chip { font-size: 12px; padding: 7px 11px; }

  /* Broadsheet grid: single column, hero becomes a regular (larger-type) card */
  .project-list.broadsheet-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 2px;
  }
  .bs-featured {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 0;
  }
  .bs-featured .bs-info { gap: 6px; }
  .bs-featured .bs-title { font-size: 26px; }
  .bs-title { font-size: 19px; }
  .bs-featured .bs-heart { top: 12px; right: 12px; width: 32px; height: 32px; }
  .bs-featured .bs-thumb .award-badge { top: 12px; left: 12px; }
  .bs-play { width: 42px; height: 42px; bottom: 12px; left: 12px; }
}

/* ============================================================================
   SAVE BOARDS — save-to popover + board filter rail (editorial.js)
   ============================================================================ */

.gr-save-pop {
  position: fixed;
  z-index: 500;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 20px 50px -14px var(--shadow-strong);
  padding: 8px;
  animation: gr-pop-in 0.14s ease;
}

@keyframes gr-pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gr-save-pop-title {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 6px 8px 8px;
}

.gr-save-pop-list {
  max-height: 240px;
  overflow-y: auto;
}

.gr-save-pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 8px;
  border-radius: 9px;
  font: 500 13px/1.3 var(--font-body);
  color: var(--text);
}

.gr-save-pop-item:hover { background: var(--surface-2); }

.gr-save-pop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--coral);
}

.gr-save-pop-dot-all { background: var(--faint); }

.gr-save-pop-create {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 10px;
}

.gr-save-pop-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 8px 10px;
  font: 400 13px/1.2 var(--font-body);
  background: var(--panel);
  color: var(--text);
}

.gr-save-pop-input:focus { outline: none; border-color: var(--coral); }

.gr-save-pop-create-btn {
  flex: none;
  width: 34px;
  border: none;
  border-radius: 9px;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.gr-save-pop-create-btn:hover { background: var(--coral); opacity: 0.9; }

/* Board filter rail */

.gr-board-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.gr-board-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/1 var(--font-body);
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  cursor: pointer;
}

.gr-board-chip:hover { background: var(--surface-2); }

.gr-board-chip.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.gr-board-count {
  font: 600 10px/1 var(--font-mono);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.gr-board-chip.active .gr-board-count { background: rgba(255, 255, 255, 0.25); color: #fff; }

.gr-board-new { color: var(--coral); border-style: dashed; }

.gr-board-new-form { display: inline-flex; }

.gr-board-new-input {
  border: 1px solid var(--coral);
  border-radius: 999px;
  padding: 8px 13px;
  font: 500 13px/1 var(--font-body);
  background: var(--panel);
  color: var(--text);
  width: 140px;
}

.gr-board-new-input:focus { outline: none; }

.gr-board-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font: 400 15px/1.5 var(--font-body);
  color: var(--muted);
}

.gr-board-hidden { display: none !important; }

@media (max-width: 768px) {
  .gr-board-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
  }
  .gr-board-rail::-webkit-scrollbar { height: 0; }
  .gr-board-chip { flex: none; white-space: nowrap; }
  .gr-save-pop { width: 200px; }
}
