:root {
  color-scheme: light;
  --canvas: #f3f5ef;
  --paper: #fffefa;
  --paper-2: #edf1ea;
  --paper-3: #e4eae1;
  --ink: #162b25;
  --ink-soft: #3c5149;
  --muted: #718078;
  --line: #dce4dc;
  --line-strong: #c9d5ca;
  --forest: #173e34;
  --forest-2: #245648;
  --citron: #c9ef78;
  --citron-ink: #203527;
  --gold: #dea75e;
  --rose: #da7d67;
  --error: #aa4a39;
  --shadow: 0 18px 60px rgba(23, 62, 52, .08);
  --shadow-small: 0 7px 24px rgba(23, 62, 52, .08);
  --radius: 22px;
  --topbar-height: 78px;
  --sidebar-width: 258px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101b18;
  --paper: #172622;
  --paper-2: #1e3029;
  --paper-3: #263b33;
  --ink: #edf5ed;
  --ink-soft: #cad8cd;
  --muted: #9aaea1;
  --line: #2b4036;
  --line-strong: #395347;
  --forest: #c9ef78;
  --forest-2: #add863;
  --citron: #c9ef78;
  --citron-ink: #17251d;
  --gold: #f0bd7b;
  --rose: #f29d85;
  --error: #f49d89;
  --shadow: 0 18px 60px rgba(0, 0, 0, .22);
  --shadow-small: 0 7px 24px rgba(0, 0, 0, .2);
}
* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-family: Inter, "Avenir Next", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { color: var(--citron-ink); background: var(--citron); }
.icon-svg { display: block; flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
.site-shell { min-height: 100vh; background: var(--canvas); }
.sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 24px 18px 18px; background: var(--paper); border-right: 1px solid var(--line); transition: width .22s ease, transform .22s ease; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin: 0 2px 36px; }
.brand { display: inline-flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 21px; font-weight: 790; letter-spacing: -.9px; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.brand-name span { color: var(--forest-2); }
.brand-note { margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: 1.45px; }
.icon-button { display: inline-grid; flex: none; width: 40px; height: 40px; place-items: center; padding: 0; border: 0; border-radius: 13px; color: var(--muted); background: transparent; cursor: pointer; transition: .18s ease; }
.icon-button:hover { color: var(--ink); background: var(--paper-2); }
.sidebar-collapse { width: 34px; height: 34px; }
.drawer-close { display: none; }
.nav-stack { display: flex; flex-direction: column; gap: 5px; }
.nav-caption { margin: 0 10px 9px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-caption-library { margin-top: 26px; }
.nav-link { display: flex; position: relative; align-items: center; gap: 14px; min-height: 45px; padding: 0 13px; border-radius: 13px; color: var(--ink-soft); font-size: 13px; font-weight: 580; transition: background .16s ease, color .16s ease; }
.nav-link .icon-svg { color: var(--muted); }
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link.active { color: var(--forest); background: color-mix(in srgb, var(--citron) 33%, var(--paper)); font-weight: 720; }
.nav-link.active .icon-svg { color: var(--forest-2); }
.nav-link.active::before { position: absolute; inset: 10px auto 10px 0; width: 3px; content: ""; border-radius: 3px; background: var(--forest-2); }
.sidebar-bottom { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.sidebar-credit { margin: 17px 8px 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.desktop-topbar { position: fixed; z-index: 30; inset: 0 0 auto var(--sidebar-width); display: flex; align-items: center; justify-content: center; height: var(--topbar-height); padding: 0 42px; background: color-mix(in srgb, var(--canvas) 91%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); backdrop-filter: blur(18px); transition: left .22s ease; }
.search-form { display: flex; align-items: center; width: min(620px, 70vw); height: 45px; padding: 0 7px 0 15px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--paper); box-shadow: 0 2px 12px rgba(23, 62, 52, .025); transition: border-color .18s ease, box-shadow .18s ease; }
.search-form:focus-within { border-color: var(--forest-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--citron) 32%, transparent); }
.search-leading { display: grid; place-items: center; color: var(--muted); }
.search-form input { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 13px; }
.search-form input::placeholder { color: var(--muted); opacity: .8; }
.search-shortcut { display: grid; min-width: 21px; height: 21px; place-items: center; margin-right: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--canvas); font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.search-submit { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 10px; color: var(--forest); background: var(--paper-2); cursor: pointer; }
.search-submit:hover { color: var(--citron-ink); background: var(--citron); }
.top-actions { position: absolute; right: 38px; display: flex; align-items: center; gap: 6px; }
.language-button { height: 36px; min-width: 40px; padding: 0 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--paper); font-size: 11px; font-weight: 760; cursor: pointer; }
.language-button:hover { border-color: var(--line-strong); background: var(--paper-2); }
.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding: calc(var(--topbar-height) + 27px) 42px 54px; transition: margin-left .22s ease; }
.content-wrap { width: min(1460px, 100%); margin: 0 auto; }
.site-shell.sidebar-collapsed { --sidebar-width: 88px; }
.site-shell.sidebar-collapsed .sidebar { padding-inline: 14px; }
.site-shell.sidebar-collapsed .sidebar-head { flex-direction: column; gap: 25px; margin: 0 0 30px; }
.site-shell.sidebar-collapsed .brand-name { font-size: 16px; letter-spacing: -.8px; }
.site-shell.sidebar-collapsed .brand-note, .site-shell.sidebar-collapsed .nav-caption, .site-shell.sidebar-collapsed .nav-link span, .site-shell.sidebar-collapsed .sidebar-credit { display: none; }
.site-shell.sidebar-collapsed .nav-link { justify-content: center; padding: 0; }
.site-shell.sidebar-collapsed .nav-link.active::before { inset: 11px auto 11px 1px; }
.site-shell.sidebar-collapsed .desktop-topbar { left: var(--sidebar-width); }
.site-shell.sidebar-collapsed .main-content { margin-left: var(--sidebar-width); }
.mobile-topbar, .mobile-tabbar, .drawer-scrim { display: none; }
.content-enter { animation: content-in .25s ease both; }
@keyframes content-in { from { opacity: .72; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Home: editorial introduction and a focused recommendation path */
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(350px, .95fr); gap: 28px; align-items: stretch; }
.welcome-copy { display: flex; flex-direction: column; justify-content: center; min-height: 366px; padding: 34px 12px 30px 4px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--forest-2); font-size: 10px; font-weight: 780; letter-spacing: 1.25px; line-height: 1.35; text-transform: uppercase; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.welcome-copy h1 { max-width: 660px; margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 4.3vw, 64px); font-weight: 500; letter-spacing: -2.8px; line-height: 1.04; }
.welcome-intro { max-width: 540px; margin: 19px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.welcome-actions { display: flex; align-items: center; gap: 22px; margin-top: 25px; }
.primary-button, .secondary-button, .quiet-link, .feature-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.primary-button { min-height: 44px; padding: 0 17px; border: 0; border-radius: 12px; color: var(--citron-ink); background: var(--citron); font-size: 12px; font-weight: 770; transition: transform .16s ease, filter .16s ease; }
.primary-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.primary-button small { margin-left: 4px; opacity: .72; font-size: 10px; }
.quiet-link { color: var(--forest-2); font-size: 12px; font-weight: 720; }
.quiet-link:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.stat-strip { display: flex; gap: clamp(20px, 3.4vw, 52px); margin-top: 40px; padding-top: 21px; border-top: 1px solid var(--line); }
.stat-strip > div { display: flex; flex-direction: column; gap: 3px; }
.stat-strip strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 500; letter-spacing: -.6px; }
.stat-strip span { color: var(--muted); font-size: 10px; }
.feature-card { align-self: start; display: flex; flex-direction: column; overflow: hidden; min-height: 366px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-small); }
.feature-image { position: relative; display: block; overflow: hidden; height: 201px; background: var(--paper-3); }
.feature-image::after { position: absolute; inset: 48% 0 0; content: ""; background: linear-gradient(0deg, rgba(12, 28, 24, .66), transparent); pointer-events: none; }
.feature-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature-image:hover img { transform: scale(1.035); }
.feature-image-label { position: absolute; z-index: 1; bottom: 14px; left: 17px; display: inline-flex; align-items: center; gap: 6px; color: white; font-size: 10px; font-weight: 720; }
.feature-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 19px 21px 19px; }
.feature-copy .eyebrow { margin-bottom: 5px; font-size: 9px; }
.feature-copy h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; letter-spacing: -.6px; line-height: 1.15; }
.feature-copy > p:not(.eyebrow) { display: -webkit-box; overflow: hidden; max-width: 540px; margin: 8px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feature-link { margin-top: auto; color: var(--forest-2); font-size: 11px; font-weight: 750; }
.quick-topics { margin-top: 52px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; letter-spacing: -.8px; line-height: 1.15; }
.section-heading > div > p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.section-heading > .quiet-link { margin-bottom: 5px; }
.topic-chip-row, .category-chip-list { display: flex; flex-wrap: wrap; gap: 9px; }
.topic-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-soft); font-size: 11px; font-weight: 650; transition: border-color .16s ease, transform .16s ease; }
.topic-chip:hover { border-color: var(--forest-2); transform: translateY(-1px); }
.topic-chip small { color: var(--muted); font-size: 9px; }
.feed-section { margin-top: 57px; }
.filter-stack { position: relative; margin: 16px 0 19px; }
.filter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.filter-toolbar-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-toggle, .playall-button { display: inline-flex; align-items: center; gap: 8px; min-height: 37px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--paper); font-size: 11px; font-weight: 680; cursor: pointer; }
.filter-toggle:hover, .playall-button:hover { border-color: var(--line-strong); background: var(--paper-2); }
.filter-toggle.open, .filter-toggle:focus-visible { color: var(--forest); border-color: var(--forest-2); }
.filter-toggle b { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: var(--citron-ink); background: var(--citron); font-size: 9px; }
.playall-button { border-color: transparent; color: var(--forest-2); background: transparent; }
.active-filter { min-height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: color-mix(in srgb, var(--citron) 28%, var(--paper)); font-size: 10px; font-weight: 670; cursor: pointer; }
.filter-panel { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 14px; margin-top: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-small); }
.filter-panel[hidden] { display: none; }
.filter-group { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.filter-group h3 { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 770; letter-spacing: .9px; text-transform: uppercase; }
.filter-option { display: flex; align-items: center; min-height: 27px; width: 100%; padding: 3px 5px; border: 0; border-radius: 7px; text-align: left; color: var(--ink-soft); background: transparent; font-size: 10px; cursor: pointer; }
.filter-option:hover:not(:disabled) { color: var(--ink); background: var(--paper-2); }
.filter-option.selected { color: var(--forest); font-weight: 740; }
.filter-check { display: grid; width: 14px; height: 14px; place-items: center; margin-right: 5px; border-radius: 4px; color: var(--citron-ink); background: var(--citron); font-size: 9px; }
.disabled-option { color: var(--muted); opacity: .54; cursor: not-allowed; }
.filter-hint { max-width: 150px; margin: 4px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.clear-filter-button { align-self: end; min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--canvas); font-size: 10px; cursor: pointer; }
.metadata-notice { display: flex; align-items: flex-start; gap: 9px; margin: 10px 0 16px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line)); border-radius: 12px; color: var(--ink-soft); background: color-mix(in srgb, var(--gold) 10%, var(--paper)); font-size: 11px; line-height: 1.5; }
.metadata-notice[hidden] { display: none; }
.metadata-notice .icon-svg { margin-top: 1px; color: var(--gold); }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 25px 20px; }
.video-card { position: relative; min-width: 0; border-radius: 16px; background: transparent; transition: transform .18s ease; }
.video-card:hover { transform: translateY(-2px); }
.video-card-link { display: block; min-width: 0; }
.thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: 15px; background: var(--paper-3); }
.video-frame { position: relative; overflow: hidden; width: 100%; height: 100%; aspect-ratio: 16/9; border-radius: inherit; background: linear-gradient(145deg, var(--paper-2), var(--paper-3)); }
.video-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-frame.frame-unavailable::after { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; content: ""; background: var(--paper-2); }
.score-badge { position: absolute; right: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: white; background: rgba(17, 38, 32, .84); backdrop-filter: blur(8px); font-size: 10px; font-weight: 720; }
.score-badge .icon-svg { color: var(--citron); }
.duration-badge { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; min-height: 23px; padding: 0 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: white; background: rgba(17, 38, 32, .84); backdrop-filter: blur(8px); font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 720; }
.card-save { position: absolute; top: 9px; right: 9px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; color: white; background: rgba(17, 38, 32, .72); opacity: 0; cursor: pointer; backdrop-filter: blur(8px); transition: opacity .15s ease, background .15s ease; }
.video-card:hover .card-save, .card-save:focus-visible, .card-save.saved { opacity: 1; }
.card-save.saved { color: var(--citron-ink); background: var(--citron); }
.card-copy { padding: 11px 1px 0; }
.card-copy h3 { display: -webkit-box; overflow: hidden; margin: 0; color: var(--ink); font-size: 14px; font-weight: 690; letter-spacing: -.16px; line-height: 1.38; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-channel { overflow: hidden; margin: 6px 0 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.card-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.card-youtube-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.proof-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag-pill { display: inline-flex; align-items: center; min-height: 21px; max-width: 100%; padding: 2px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--forest-2); background: var(--paper); font-size: 9px; font-weight: 620; line-height: 1.3; }
.tag-pill:hover { border-color: var(--forest-2); }
.topic-tag { color: var(--muted); }
.keyboard-selected { outline: 2px solid var(--gold); outline-offset: 5px; }
.list-sentinel { height: 1px; }
.load-more { display: block; min-width: 150px; min-height: 38px; margin: 18px auto; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--paper); font-size: 11px; cursor: pointer; }
.load-more[hidden] { display: none; }
.load-more:hover { color: var(--ink); border-color: var(--line-strong); }
.empty-state { display: flex; grid-column: 1 / -1; flex-direction: column; align-items: center; justify-content: center; min-height: 230px; padding: 25px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; color: var(--muted); background: color-mix(in srgb, var(--paper) 65%, transparent); }
.empty-state h2 { max-width: 480px; margin: 13px 0 0; color: var(--ink-soft); font-size: 15px; font-weight: 570; line-height: 1.5; }
.empty-orbit { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; color: var(--forest-2); background: color-mix(in srgb, var(--citron) 44%, var(--paper)); }
.small-empty { min-height: 100px; }
.loading-state { padding: 25px 0; color: var(--muted); font-size: 12px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 72px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.site-footer > span:first-child { color: var(--ink); font-weight: 780; }
.site-footer > span:nth-child(2) { flex: 1 1 280px; }
.site-footer a { color: var(--forest-2); font-weight: 650; }

/* Listing, topic and category pages */
.page-heading { margin: 4px 0 24px; }
.page-heading .eyebrow { margin-bottom: 8px; }
.page-heading h1 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 3vw, 48px); font-weight: 500; letter-spacing: -1.7px; line-height: 1.08; }
.page-intro { max-width: 720px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.listing-page .video-grid, .topic-page .video-grid { margin-top: 19px; }
.unavailable-panel { display: flex; align-items: flex-start; gap: 15px; max-width: 800px; margin: 28px 0; padding: 19px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--gold) 9%, var(--paper)); }
.unavailable-icon { display: grid; flex: none; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #9e6b31; background: color-mix(in srgb, var(--gold) 22%, var(--paper)); }
.unavailable-panel strong { color: var(--ink); font-size: 13px; }
.unavailable-panel p { margin: 7px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.metadata-sync-panel { display: flex; align-items: flex-start; gap: 14px; max-width: 800px; margin: 18px 0 22px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.metadata-sync-panel[hidden] { display: none; }
.metadata-sync-panel.metadata-sync-failed { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--paper)); }
.longs-results-summary { margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metadata-sync-icon { display: grid; flex: none; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--forest-2); background: color-mix(in srgb, var(--citron) 40%, var(--paper)); }
.metadata-sync-copy { flex: 1; min-width: 0; }
.metadata-sync-copy strong { color: var(--ink); font-size: 13px; }
.metadata-sync-copy p { margin: 6px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.metadata-sync-copy small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.metadata-sync-progress { overflow: hidden; height: 5px; border-radius: 99px; background: var(--paper-3); }
.metadata-sync-progress span { display: block; height: 100%; border-radius: inherit; background: var(--forest-2); transition: width .35s ease; }
.metadata-sync-copy .secondary-button { margin-top: 2px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--forest-2); font-size: 11px; font-weight: 720; }
.breadcrumb { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.breadcrumb:hover { color: var(--forest-2); }
.category-chip-list { margin: -3px 0 24px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 34px; }
.quick-action { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--forest); background: var(--paper); font-size: 11px; font-weight: 720; box-shadow: 0 5px 16px rgba(23, 62, 52, .025); transition: transform .17s ease, border-color .17s ease; }
.quick-action:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.quick-action .icon-svg { color: var(--forest-2); }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.area-card { padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.area-card-head { display: grid; grid-template-columns: 36px 1fr 20px; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.area-index { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--forest-2); background: var(--paper-2); font-family: Georgia, serif; font-size: 12px; }
.area-card-head h2 { margin: 0; font-size: 13px; font-weight: 720; line-height: 1.35; }
.area-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.area-card-head > .icon-svg { color: var(--muted); }
.area-categories { display: flex; flex-direction: column; padding-top: 8px; }
.area-categories a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 31px; color: var(--ink-soft); font-size: 10px; }
.area-categories a:hover { color: var(--forest-2); }
.area-categories small { color: var(--muted); font-size: 9px; }

/* Curated playlists */
.collection-group { margin-top: 40px; }
.collection-group .section-heading { margin-bottom: 15px; }
.collection-group .section-heading h2 { font-size: 25px; }
.playlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.playlist-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); transition: transform .2s ease, box-shadow .2s ease; }
.playlist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-small); }
.playlist-mosaic { position: relative; display: grid; overflow: hidden; aspect-ratio: 16 / 8.9; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--paper-3); }
.playlist-mosaic img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.playlist-count { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: white; background: rgba(16, 30, 25, .83); font-size: 9px; font-weight: 670; backdrop-filter: blur(7px); }
.playlist-card-copy { padding: 15px 16px 17px; }
.playlist-card-copy .eyebrow { margin-bottom: 6px; font-size: 9px; }
.playlist-card-copy h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; letter-spacing: -.25px; line-height: 1.2; }
.playlist-card-copy > p:not(.eyebrow) { display: -webkit-box; overflow: hidden; min-height: 36px; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.playlist-detail-hero { display: grid; grid-template-columns: minmax(290px, .92fr) minmax(0, 1.08fr); gap: 34px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-small); }
.playlist-detail-art { position: relative; overflow: hidden; border-radius: 16px; }
.playlist-detail-art .playlist-mosaic { aspect-ratio: 16 / 10; }
.playlist-stamp { position: absolute; bottom: 14px; left: 14px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: white; background: rgba(16, 30, 25, .75); font-size: 9px; font-weight: 720; backdrop-filter: blur(8px); }
.playlist-detail-copy .eyebrow { margin-bottom: 8px; }
.playlist-detail-copy h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 3.6vw, 48px); font-weight: 500; letter-spacing: -1.5px; line-height: 1.06; }
.playlist-meta { display: flex; align-items: center; gap: 9px; margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.playlist-intro { max-width: 560px; margin: 19px 0 20px; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.playlist-rows { display: flex; flex-direction: column; gap: 13px; margin: 22px 0 0; padding: 0; list-style: none; }
.playlist-rows li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; align-items: start; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.playlist-number { padding-top: 4px; color: var(--muted); font-family: Georgia, serif; font-size: 13px; text-align: center; }
.horizontal-card { display: flex; min-width: 0; width: 100%; }
.horizontal-card .video-card-link { display: grid; flex: 1; grid-template-columns: minmax(150px, 32%) minmax(0,1fr); gap: 15px; min-width: 0; }
.horizontal-card .thumb-wrap { height: auto; aspect-ratio: 16/9; }
.horizontal-card .card-copy { align-self: center; padding: 4px 31px 4px 0; }
.horizontal-card .card-copy h3 { font-size: 13px; }
.horizontal-card .card-summary { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.horizontal-card .card-tags { margin-top: 7px; }
.horizontal-card .card-save { top: 7px; right: 7px; }
.playlist-note { grid-column: 2; margin: -2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

/* Search and personal library */
.search-page .page-heading { margin-bottom: 22px; }
.search-note { margin: 7px 0 14px; color: var(--muted); font-size: 11px; }
.search-results { display: flex; flex-direction: column; gap: 13px; margin-top: 14px; }
.search-result { position: relative; display: grid; grid-template-columns: minmax(190px, 30%) minmax(0,1fr); gap: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.search-result-media { position: relative; overflow: hidden; min-width: 0; align-self: start; border-radius: 12px; }
.search-result-media .video-frame { height: auto; }
.search-result-index { position: absolute; right: 8px; bottom: 8px; display: grid; min-width: 31px; height: 23px; place-items: center; padding: 0 6px; border-radius: 7px; color: var(--citron-ink); background: var(--citron); font-size: 9px; font-weight: 750; }
.search-result-copy { min-width: 0; padding: 4px 31px 3px 0; }
.search-result-copy .eyebrow { margin-bottom: 5px; font-size: 9px; }
.search-result-copy h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; }
.search-result-copy > p:not(.eyebrow) { display: -webkit-box; overflow: hidden; margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-result-channel { margin-top: 5px !important; color: var(--ink-soft) !important; }
.search-result .card-save { top: 15px; right: 15px; color: var(--muted); background: var(--paper-2); opacity: 1; }
.search-result .card-save.saved { color: var(--citron-ink); background: var(--citron); }
.library-page .page-heading { margin-bottom: 19px; }
.library-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.library-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 35px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 11px; font-weight: 680; }
.library-tab:hover { color: var(--ink); background: var(--paper-2); }
.library-tab.active { color: var(--forest); background: color-mix(in srgb, var(--citron) 34%, var(--paper)); }
.library-tab small { color: var(--muted); font-size: 9px; }
.secondary-button { min-height: 37px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: var(--paper); font-size: 10px; font-weight: 670; }
.secondary-button:hover { border-color: var(--line-strong); background: var(--paper-2); }
.clear-history { margin: 0 0 15px; }

/* Watch page */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 370px); gap: 25px; align-items: start; }
.watch-primary { min-width: 0; }
.player-shell { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16/9; border-radius: 18px; color: white; background: #07110e; box-shadow: var(--shadow-small); }
.player-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; display: block; overflow: hidden; width: 100%; height: 100%; padding: 0; border: 0; background: #07110e; cursor: pointer; }
.video-poster .video-frame { width: 100%; height: 100%; border-radius: 0; }
.video-poster .video-frame::after { position: absolute; inset: 0; content: ""; background: linear-gradient(0deg, rgba(0,0,0,.48), transparent 42%), linear-gradient(0deg, transparent, rgba(0,0,0,.12)); }
.poster-play { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; width: 68px; height: 68px; place-items: center; padding-left: 4px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; color: var(--citron-ink); background: var(--citron); box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translate(-50%,-50%); transition: transform .18s ease; }
.video-poster:hover .poster-play { transform: translate(-50%,-50%) scale(1.07); }
.poster-caption { position: absolute; z-index: 2; right: 14px; bottom: 13px; color: white; font-size: 10px; text-shadow: 0 1px 3px #000; }
.watch-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-top: 19px; }
.watch-title-row .eyebrow { margin-bottom: 6px; }
.watch-title-row h1 { max-width: 890px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 2.6vw, 37px); font-weight: 500; letter-spacing: -.95px; line-height: 1.16; }
.watch-score { display: inline-flex; flex: none; align-items: center; gap: 5px; min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: var(--paper); font-size: 10px; font-weight: 730; white-space: nowrap; }
.watch-score .icon-svg { color: var(--gold); }
.watch-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.channel-summary { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.channel-summary strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.channel-summary > span { color: var(--muted); font-size: 10px; }
.action-group { display: flex; flex: none; align-items: center; gap: 7px; }
.vote-group { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: var(--paper); font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.vote-group .action-button { min-height: 29px; padding: 0 8px; border-color: transparent; }
.action-button:hover { color: var(--forest); background: var(--paper-2); }
.action-button.active, .action-button.saved { color: var(--forest); border-color: color-mix(in srgb, var(--citron) 52%, var(--line)); background: color-mix(in srgb, var(--citron) 33%, var(--paper)); }
.description-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.description-stats { display: flex; flex-wrap: wrap; gap: 8px 17px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--forest-2); font-size: 10px; font-weight: 670; }
.description-card h2 { margin: 17px 0 7px; color: var(--ink); font-size: 12px; font-weight: 760; }
.description-card > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.description-card .why-copy { margin-top: 9px; color: var(--muted); }
.description-card blockquote { margin: 17px 0 0; padding: 11px 14px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: var(--paper-2); }
.description-card blockquote p { margin: 0; color: var(--ink-soft); font-family: Georgia, serif; font-size: 15px; font-style: italic; line-height: 1.5; }
.description-card cite { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-style: normal; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.comments-section { margin-top: 31px; }
.comments-section .section-heading { margin-bottom: 13px; }
.comments-section .section-heading h2 { font-size: 23px; }
.comment-count { color: var(--muted); font-size: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 10px; color: var(--muted); font-size: 9px; }
.comment-meta strong { color: var(--ink); font-size: 10px; }
.comment-text { margin: 9px 0 11px; color: var(--ink-soft); font-size: 11px; line-height: 1.68; overflow-wrap: anywhere; }
.comment-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-footer a { display: inline-flex; align-items: center; gap: 4px; color: var(--forest-2); font-size: 9px; font-weight: 650; }
.stance-tag { padding: 3px 7px; border-radius: 6px; color: var(--forest); background: color-mix(in srgb, var(--citron) 32%, var(--paper)); font-size: 8px; font-weight: 700; }
.stance-tag.reference { color: #44628c; background: #e6eef7; }
:root[data-theme="dark"] .stance-tag.reference { color: #c3d9f4; background: #263c52; }
.stance-tag.critical { color: var(--error); background: color-mix(in srgb, var(--error) 12%, var(--paper)); }
.comment-marker { display: inline-flex; align-items: center; gap: 3px; margin: 0 2px; padding: 1px 5px; border-radius: 5px; color: var(--forest); background: var(--paper-2); font-size: 9px; font-weight: 660; }
.watch-related { position: sticky; top: calc(var(--topbar-height) + 16px); max-height: calc(100vh - var(--topbar-height) - 32px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.related-heading { padding: 2px 1px 13px; border-bottom: 1px solid var(--line); }
.related-heading .eyebrow { margin: 0 0 4px; font-size: 9px; }
.related-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.related-list { display: flex; flex-direction: column; gap: 15px; padding-top: 14px; }
.compact-card { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.compact-card:last-child { padding-bottom: 0; border-bottom: 0; }
.compact-card .video-card-link { grid-template-columns: 38% minmax(0, 1fr); gap: 10px; }
.compact-card .card-copy { padding: 1px 0; }
.compact-card .card-copy h3 { font-size: 10px; line-height: 1.35; }
.compact-card .card-channel { margin-top: 4px; font-size: 8px; }
.compact-card .card-proof, .compact-card .card-tags, .compact-card .score-badge { display: none; }
.compact-card .card-save { top: 5px; right: 5px; width: 25px; height: 25px; border-radius: 7px; opacity: 0; }
.compact-card:hover .card-save, .compact-card .card-save:focus-visible, .compact-card .card-save.saved { opacity: 1; }

/* About and data */
.about-hero { padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-small); }
.about-hero h1, .data-intro h1 { max-width: 800px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 61px); font-weight: 500; letter-spacing: -2px; line-height: 1.04; }
.about-lead { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 18px; line-height: 1.5; }
.about-stats, .data-counts { display: flex; flex-wrap: wrap; gap: 14px 35px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.about-stats span, .data-counts span { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 9px; }
.about-stats strong, .data-counts strong { color: var(--ink); font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.editorial-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; max-width: 1080px; margin: 30px auto 0; }
.editorial-copy section { padding: 24px 4px; border-bottom: 1px solid var(--line); }
.editorial-copy section .eyebrow { font-size: 9px; }
.editorial-copy h2, .data-files-section h2, .agent-prompt-section h2, .data-license h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; letter-spacing: -.45px; }
.editorial-copy section p:not(.eyebrow), .data-license p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.fine-print { margin-top: 10px !important; font-size: 9px !important; }
.editorial-copy .text-link { margin-top: 12px; }
.data-intro { padding: 29px 33px 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-small); }
.data-intro > p:not(.eyebrow) { max-width: 600px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.data-intro .primary-button { margin-top: 23px; }
.data-files-section, .agent-prompt-section { margin-top: 36px; }
.data-files-section .section-heading { margin-bottom: 13px; }
.data-files-section .section-heading h2 { margin: 0; }
.data-file-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.data-file-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 70px 18px; align-items: center; gap: 13px; min-height: 66px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.data-file-row:last-child { border-bottom: 0; }
.data-file-row:hover { background: var(--paper-2); }
.file-type { display: grid; width: 42px; height: 29px; place-items: center; border-radius: 7px; color: var(--forest-2); background: var(--paper-2); font-size: 8px; font-weight: 780; letter-spacing: .4px; }
.file-name { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.file-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.file-name small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: 9px; text-align: right; }
.data-file-row > .icon-svg { color: var(--muted); }
.agent-prompt-section { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.agent-prompt-section h2 { max-width: 650px; font-size: 20px; }
.agent-prompt-section pre { overflow: auto; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--canvas); font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.data-license { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
.data-license > div { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.data-license h2 { font-size: 20px; }
.data-credit { margin-top: 24px; color: var(--muted); font-size: 9px; }

/* Preferences, dialogs, boot states */
.settings-page { max-width: 900px; }
.settings-page .page-heading { margin-bottom: 21px; }
.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.setting-copy { display: flex; align-items: flex-start; gap: 13px; }
.setting-icon { display: grid; flex: none; width: 37px; height: 37px; place-items: center; border-radius: 11px; color: var(--forest-2); background: var(--paper-2); }
.setting-copy h2 { margin: 1px 0 5px; font-size: 12px; font-weight: 720; }
.setting-copy p { max-width: 540px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.toggle-switch { position: relative; display: block; flex: none; cursor: pointer; }
.toggle-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { display: flex; align-items: center; width: 44px; height: 25px; padding: 3px; border-radius: 20px; background: var(--line-strong); transition: background .18s ease; }
.toggle-knob { width: 19px; height: 19px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: transform .18s ease; }
.toggle-switch input:checked + .toggle-track { background: var(--forest-2); }
.toggle-switch input:checked + .toggle-track .toggle-knob { transform: translateX(19px); }
.toggle-switch input:focus-visible + .toggle-track { outline: 3px solid var(--gold); outline-offset: 3px; }
.segmented-control { display: flex; flex: none; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
.segmented-control button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 640; cursor: pointer; }
.segmented-control button.selected { color: var(--forest); background: var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.text-page { max-width: 1100px; }
.not-found { display: flex; flex-direction: column; align-items: flex-start; min-height: 45vh; justify-content: center; }
.not-found h1 { margin: 17px 0 22px; font-family: Georgia, serif; font-size: 37px; font-weight: 500; }
.boot-screen { display: flex; align-items: center; gap: 12px; padding: 35px; color: var(--muted); font-size: 12px; }
.boot-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--citron-ink); background: var(--citron); font-weight: 800; }
.boot-error { padding-top: 50px; }
.toast { position: fixed; z-index: 200; bottom: 25px; left: 50%; max-width: calc(100vw - 32px); padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .18s ease; font-size: 11px; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.modal-scrim { position: fixed; z-index: 250; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8, 20, 16, .5); backdrop-filter: blur(5px); }
.shortcut-modal { position: relative; width: min(470px, 100%); padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.shortcut-modal h2 { margin: 0 0 19px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.shortcut-list { display: flex; flex-direction: column; gap: 9px; }
.shortcut-list > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.shortcut-list kbd { justify-self: start; min-width: 40px; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-soft); background: var(--canvas); font: 10px ui-monospace, monospace; text-align: center; }

@media (min-width: 1500px) {
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .welcome-grid { grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 226px; }
  .sidebar { padding-inline: 14px; }
  .desktop-topbar { padding-inline: 26px; }
  .top-actions { right: 24px; }
  .main-content { padding-inline: 28px; }
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
  .welcome-grid { grid-template-columns: minmax(0, 1fr) minmax(310px, .85fr); gap: 20px; }
  .welcome-copy h1 { font-size: clamp(39px, 4.1vw, 54px); }
  .watch-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 310px); gap: 18px; }
}
@media (max-width: 980px) {
  :root { --sidebar-width: 238px; }
  .sidebar { transform: translateX(-102%); box-shadow: var(--shadow); }
  body.drawer-open .sidebar { transform: translateX(0); }
  .sidebar-head { margin-bottom: 24px; }
  .drawer-close { display: grid; }
  .sidebar-collapse { display: none; }
  .drawer-scrim { position: fixed; z-index: 90; inset: 0; display: none; background: rgba(9, 22, 17, .35); backdrop-filter: blur(2px); }
  body.drawer-open .drawer-scrim { display: block; }
  .desktop-topbar { left: 0; }
  .main-content { margin-left: 0; }
  .site-shell.sidebar-collapsed { --sidebar-width: 238px; }
  .site-shell.sidebar-collapsed .desktop-topbar { left: 0; }
  .site-shell.sidebar-collapsed .main-content { margin-left: 0; }
  .site-shell.sidebar-collapsed .sidebar { padding: 24px 18px 18px; }
  .site-shell.sidebar-collapsed .sidebar-head { flex-direction: row; gap: 0; margin: 0 2px 24px; }
  .site-shell.sidebar-collapsed .brand-note, .site-shell.sidebar-collapsed .nav-caption, .site-shell.sidebar-collapsed .nav-link span, .site-shell.sidebar-collapsed .sidebar-credit { display: initial; }
  .site-shell.sidebar-collapsed .brand-note { display: block; }
  .site-shell.sidebar-collapsed .nav-link { justify-content: flex-start; padding: 0 13px; }
  .site-shell.sidebar-collapsed .nav-link.active::before { inset: 10px auto 10px 0; }
  .welcome-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, .85fr); }
  .welcome-copy { min-height: 330px; }
  .welcome-copy h1 { font-size: clamp(37px, 5.2vw, 52px); }
  .feature-card { min-height: 330px; }
  .feature-image { height: 180px; }
  .watch-layout { grid-template-columns: minmax(0, 1fr); }
  .watch-related { position: static; max-height: none; }
  .related-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-card { padding-bottom: 0; border-bottom: 0; }
  .area-grid { gap: 12px; }
  .filter-panel { grid-template-columns: repeat(3, minmax(125px, 1fr)); }
}
@media (max-width: 720px) {
  :root { --sidebar-width: 280px; --topbar-height: 0px; }
  body { font-size: 14px; }
  .desktop-topbar { display: none; }
  .mobile-topbar { position: fixed; z-index: 80; inset: 0 0 auto; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; grid-template-rows: 48px 45px; align-items: center; gap: 4px 8px; height: calc(101px + env(safe-area-inset-top)); padding: calc(env(safe-area-inset-top) + 5px) 15px 7px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 95%, transparent); backdrop-filter: blur(18px); }
  .mobile-menu { width: 38px; height: 38px; }
  .mobile-topbar .brand { justify-self: start; }
  .mobile-topbar .brand-name { font-size: 19px; }
  .mobile-topbar .top-actions { position: static; justify-self: end; gap: 2px; }
  .mobile-topbar .top-actions .icon-button { width: 36px; height: 36px; }
  .mobile-topbar .language-button { min-width: 36px; height: 33px; padding-inline: 6px; font-size: 10px; }
  .mobile-search { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 41px; border-radius: 13px; }
  .mobile-search input { height: 38px; font-size: 12px; }
  .mobile-search .search-submit { width: 30px; height: 30px; }
  .main-content { min-height: 100vh; margin: 0; padding: calc(101px + env(safe-area-inset-top) + 19px) 17px calc(95px + env(safe-area-inset-bottom)); }
  .mobile-tabbar { position: fixed; z-index: 70; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); min-height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 7px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 -7px 25px rgba(22, 43, 37, .06); backdrop-filter: blur(17px); }
  .mobile-tabbar .nav-link { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 49px; padding: 3px 4px; border-radius: 11px; color: var(--muted); font-size: 9px; font-weight: 650; }
  .mobile-tabbar .nav-link .icon-svg { width: 19px; height: 19px; }
  .mobile-tabbar .nav-link.active { color: var(--forest); background: color-mix(in srgb, var(--citron) 32%, var(--paper)); }
  .mobile-tabbar .nav-link.active::before { display: none; }
  .sidebar { width: min(300px, 84vw); padding: calc(22px + env(safe-area-inset-top)) 17px 20px; }
  .sidebar-head { margin-bottom: 23px; }
  .drawer-close { width: 36px; height: 36px; }
  .sidebar-credit { margin-top: 12px; }
  .welcome-grid { display: flex; flex-direction: column; gap: 20px; }
  .welcome-copy { min-height: 0; padding: 8px 1px 3px; }
  .welcome-copy .eyebrow { margin-bottom: 10px; font-size: 9px; }
  .welcome-copy h1 { max-width: 540px; font-size: clamp(34px, 9.4vw, 42px); letter-spacing: -1.45px; line-height: 1.08; }
  .welcome-intro { margin-top: 12px; font-size: 13px; line-height: 1.58; }
  .welcome-actions { gap: 17px; margin-top: 17px; }
  .primary-button { min-height: 43px; padding-inline: 13px; border-radius: 11px; font-size: 10px; }
  .quiet-link { gap: 5px; font-size: 10px; }
  .stat-strip { gap: 0; justify-content: space-between; margin-top: 24px; padding-top: 14px; }
  .stat-strip > div { gap: 2px; }
  .stat-strip strong { font-size: 18px; }
  .stat-strip span { font-size: 8px; }
  .feature-card { align-self: stretch; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 0; border-radius: 17px; }
  .feature-image { height: 100%; min-height: 190px; }
  .feature-copy { padding: 13px 13px 14px; }
  .feature-copy .eyebrow { max-width: 220px; font-size: 7px; letter-spacing: .55px; line-height: 1.3; }
  .feature-copy h2 { font-size: 19px; }
  .feature-copy > p:not(.eyebrow) { margin: 6px 0 9px; font-size: 9px; -webkit-line-clamp: 3; }
  .feature-link { font-size: 9px; }
  .feature-image-label { right: 5px; bottom: 10px; left: 10px; gap: 4px; font-size: 8px; }
  .feature-image-label .icon-svg { width: 12px; height: 12px; }
  .quick-topics { margin-top: 35px; }
  .section-heading { align-items: flex-end; gap: 12px; margin-bottom: 13px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading > div > p:not(.eyebrow) { font-size: 10px; }
  .section-heading > .quiet-link { flex: none; font-size: 9px; }
  .topic-chip-row { flex-wrap: nowrap; overflow-x: auto; margin-right: -17px; padding: 1px 17px 4px 0; scrollbar-width: none; }
  .topic-chip-row::-webkit-scrollbar { display: none; }
  .topic-chip { flex: none; min-height: 35px; gap: 7px; padding-inline: 10px; border-radius: 10px; font-size: 9px; }
  .topic-chip small { font-size: 8px; }
  .feed-section { margin-top: 39px; }
  .filter-stack { margin-top: 13px; margin-bottom: 14px; }
  .filter-toolbar { min-height: 37px; }
  .filter-toggle, .playall-button { min-height: 35px; padding-inline: 10px; font-size: 9px; }
  .filter-toolbar-start { gap: 6px; }
  .active-filter { min-height: 29px; padding-inline: 7px; font-size: 8px; }
  .playall-button { gap: 5px; }
  .playall-button .icon-svg { width: 14px; }
  .filter-panel { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px 9px; padding: 14px 12px; border-radius: 13px; }
  .filter-group h3 { font-size: 8px; }
  .filter-option { min-height: 30px; font-size: 9px; }
  .filter-hint { font-size: 8px; }
  .clear-filter-button { min-height: 30px; }
  .video-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .video-card { border-radius: 13px; }
  .thumb-wrap { border-radius: 13px; }
  .card-copy { padding-top: 9px; }
  .card-copy h3 { font-size: 13px; line-height: 1.38; }
  .card-channel { margin-top: 4px; font-size: 10px; }
  .card-proof { margin-top: 5px; font-size: 8px; }
  .card-tags { margin-top: 6px; }
  .tag-pill { min-height: 20px; padding-inline: 7px; font-size: 8px; }
  .card-save { width: 36px; height: 36px; opacity: 1; }
  .page-heading { margin-top: 2px; margin-bottom: 19px; }
  .page-heading h1 { font-size: 35px; letter-spacing: -1.2px; }
  .page-intro { margin-top: 8px; font-size: 11px; line-height: 1.6; }
  .listing-page .video-grid, .topic-page .video-grid { margin-top: 14px; }
  .quick-actions { grid-template-columns: 1fr; gap: 8px; margin-bottom: 22px; }
  .quick-action { min-height: 46px; padding-inline: 12px; border-radius: 12px; font-size: 10px; }
  .area-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .area-card { padding: 13px; border-radius: 14px; }
  .area-card-head { grid-template-columns: 30px 1fr 18px; gap: 9px; padding-bottom: 10px; }
  .area-index { width: 27px; height: 27px; font-size: 10px; }
  .area-card-head h2 { font-size: 12px; }
  .area-categories { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 8px; padding-top: 7px; }
  .area-categories a { min-height: 33px; gap: 5px; font-size: 9px; }
  .area-categories small { flex: none; font-size: 8px; }
  .playlist-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .playlist-card { border-radius: 15px; }
  .playlist-mosaic { aspect-ratio: 16 / 8.2; }
  .playlist-card-copy { padding: 12px 13px 14px; }
  .playlist-card-copy h3 { font-size: 18px; }
  .playlist-card-copy > p:not(.eyebrow) { min-height: auto; }
  .collection-group { margin-top: 28px; }
  .collection-group .section-heading h2 { font-size: 23px; }
  .playlist-detail-hero { grid-template-columns: minmax(0,1fr); gap: 17px; padding: 13px; border-radius: 17px; }
  .playlist-detail-art .playlist-mosaic { aspect-ratio: 16/8.5; }
  .playlist-detail-copy { padding: 1px 3px 4px; }
  .playlist-detail-copy h1 { font-size: 34px; letter-spacing: -1px; }
  .playlist-intro { margin: 12px 0 15px; font-size: 11px; }
  .playlist-rows { gap: 10px; margin-top: 14px; }
  .playlist-rows li { grid-template-columns: 25px minmax(0,1fr); gap: 7px; padding: 9px; border-radius: 13px; }
  .playlist-number { padding-top: 2px; font-size: 11px; }
  .horizontal-card .video-card-link { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 8px; }
  .horizontal-card .card-copy { padding: 0 19px 0 0; }
  .horizontal-card .card-copy h3 { font-size: 10px; line-height: 1.35; }
  .horizontal-card .card-channel { margin-top: 3px; font-size: 8px; }
  .horizontal-card .card-proof, .horizontal-card .card-tags, .horizontal-card .card-summary { display: none; }
  .horizontal-card .card-save { top: 4px; right: 4px; width: 25px; height: 25px; border-radius: 7px; }
  .playlist-note { grid-column: 2; margin-top: -3px; font-size: 9px; }
  .search-result { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px; border-radius: 14px; }
  .search-result-media { width: 100%; }
  .search-result-copy { padding: 2px 0 2px; }
  .search-result-copy h2 { font-size: 13px; }
  .search-result .card-save { top: 17px; right: 17px; }
  .search-note { font-size: 9px; }
  .library-tabs { gap: 3px; padding: 4px; }
  .library-tab { flex: 1; justify-content: center; gap: 5px; min-height: 34px; padding-inline: 5px; font-size: 9px; }
  .library-tab .icon-svg { width: 14px; height: 14px; }
  .library-tab small { font-size: 8px; }
  .watch-layout { gap: 24px; }
  .player-shell { border-radius: 13px; }
  .watch-title-row { display: block; margin-top: 14px; }
  .watch-title-row h1 { font-size: 27px; line-height: 1.14; }
  .watch-score { margin-top: 9px; min-height: 26px; font-size: 9px; }
  .watch-actions { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 12px; padding-bottom: 12px; }
  .channel-summary > span { font-size: 9px; }
  .action-group { width: 100%; flex-wrap: wrap; gap: 5px; }
  .action-button { flex: 1; gap: 5px; min-height: 37px; padding-inline: 7px; font-size: 9px; }
  .vote-group { flex: 1.1; gap: 1px; }
  .vote-group .action-button { min-height: 31px; padding-inline: 5px; }
  .description-card { margin-top: 12px; padding: 14px; border-radius: 14px; }
  .description-stats { gap: 5px 10px; padding-bottom: 11px; font-size: 8px; }
  .description-card h2 { margin-top: 13px; font-size: 11px; }
  .description-card > p { font-size: 10px; }
  .description-card blockquote p { font-size: 13px; }
  .comments-section { margin-top: 24px; }
  .comments-section .section-heading h2 { font-size: 21px; }
  .comment-card { padding: 12px; }
  .comment-meta { gap: 5px 8px; font-size: 8px; }
  .comment-text { font-size: 10px; }
  .watch-related { padding: 13px; border-radius: 15px; }
  .related-list { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .compact-card { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .compact-card .video-card-link { grid-template-columns: 37% minmax(0,1fr); gap: 10px; }
  .compact-card .card-copy h3 { font-size: 10px; }
  .about-hero { padding: 20px; border-radius: 17px; }
  .about-hero h1, .data-intro h1 { font-size: 40px; letter-spacing: -1.4px; }
  .about-lead { margin-top: 10px; font-size: 15px; }
  .about-stats, .data-counts { justify-content: space-between; gap: 11px; margin-top: 20px; padding-top: 14px; }
  .about-stats span, .data-counts span { font-size: 8px; }
  .about-stats strong, .data-counts strong { font-size: 17px; }
  .editorial-copy { grid-template-columns: minmax(0,1fr); margin-top: 17px; }
  .editorial-copy section { padding: 18px 2px; }
  .editorial-copy h2, .data-files-section h2, .agent-prompt-section h2, .data-license h2 { font-size: 21px; }
  .editorial-copy section p:not(.eyebrow), .data-license p:not(.eyebrow) { font-size: 10px; }
  .data-intro { padding: 20px; border-radius: 17px; }
  .data-intro > p:not(.eyebrow) { font-size: 11px; }
  .data-intro .primary-button { width: 100%; margin-top: 19px; }
  .data-files-section, .agent-prompt-section { margin-top: 25px; }
  .data-file-row { grid-template-columns: 38px minmax(0,1fr) 18px; gap: 9px; min-height: 62px; padding: 9px; }
  .file-type { width: 34px; height: 25px; font-size: 7px; }
  .file-size { display: none; }
  .file-name strong { font-size: 9px; }
  .file-name small { font-size: 8px; }
  .data-file-row > .icon-svg { width: 13px; }
  .agent-prompt-section { padding: 15px; }
  .agent-prompt-section pre { font-size: 9px; }
  .agent-prompt-section .secondary-button { width: 100%; }
  .data-license { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .data-license > div { padding: 15px; }
  .settings-card { align-items: flex-start; gap: 12px; padding: 13px; border-radius: 13px; }
  .setting-copy { gap: 9px; }
  .setting-icon { width: 32px; height: 32px; border-radius: 9px; }
  .setting-copy h2 { font-size: 10px; }
  .setting-copy p { font-size: 9px; }
  .segmented-control { flex-wrap: wrap; justify-content: end; }
  .segmented-control button { min-height: 28px; padding-inline: 7px; font-size: 8px; }
  .shortcut-modal { padding: 19px; border-radius: 16px; }
  .shortcut-modal h2 { font-size: 23px; }
  .shortcut-list > div { grid-template-columns: 64px 1fr; gap: 9px; font-size: 10px; }
  .toast { bottom: calc(77px + env(safe-area-inset-bottom)); font-size: 10px; }
  .site-footer { gap: 10px; margin-top: 46px; font-size: 9px; }
}
@media (max-width: 380px) {
  body { min-width: 0; }
  .main-content { padding-right: 13px; padding-left: 13px; }
  .mobile-topbar { padding-right: 12px; padding-left: 12px; }
  .mobile-tabbar { padding-right: 4px; padding-left: 4px; }
  .topic-chip-row { margin-right: 2px; padding-right: 0; }
  .mobile-tabbar .nav-link { font-size: 8px; }
  .welcome-copy h1 { font-size: 34px; }
  .feature-card { grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); }
  .feature-copy { padding: 11px; }
  .feature-copy h2 { font-size: 17px; }
  .stat-strip strong { font-size: 16px; }
  .filter-toggle, .playall-button { padding-inline: 8px; }
  .playall-button span { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Account, sources, and Pro */
.account-shortcut { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--paper); font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.account-shortcut:hover { border-color: var(--line-strong); color: var(--forest); }
.account-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--forest); background: var(--paper-2); font-size: 10px; font-weight: 800; }
.account-shortcut.signed-in .account-avatar { color: var(--paper); background: var(--forest-2); }
.account-page, .pro-page { max-width: 920px; }
.account-progress-card, .account-summary-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 23px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(120deg, var(--paper), var(--paper-2)); }
.account-progress-card h2, .account-summary-card h2 { margin: 4px 0 8px; font-family: Georgia, serif; font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -.5px; }
.account-progress-card h2 span { color: var(--muted); font-family: inherit; font-size: 12px; letter-spacing: 0; }
.account-progress-card p, .account-summary-card p { max-width: 600px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.progress-actions, .account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.account-summary-card { margin-top: 21px; }
.account-summary-card .eyebrow { margin: 0; }
.plan-pill, .source-status, .selected-count { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 9px; font-weight: 750; white-space: nowrap; }
.plan-pill.pro-pill, .source-status.connected { border-color: color-mix(in srgb, var(--forest-2) 32%, var(--line)); color: var(--forest); background: color-mix(in srgb, var(--forest-2) 10%, var(--paper)); }
.account-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.account-stat-card { display: grid; gap: 4px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; color: inherit; background: var(--paper); text-decoration: none; }
.account-stat-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.account-stat-card span, .account-stat-card small { color: var(--muted); font-size: 9px; }
.account-stat-card strong { font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.account-privacy-note { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: var(--paper-2); font-size: 10px; line-height: 1.65; }
.account-privacy-note p { margin: 0; }
.account-actions { margin: 18px 0; }
.auth-card { width: min(480px, 100%); margin: 24px auto; padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.auth-card > .eyebrow { margin-bottom: 15px; }
.auth-google-button { display: flex; width: 100%; min-height: 45px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--paper); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.auth-google-button:hover { border-color: var(--forest-2); background: var(--paper-2); }
.auth-google-button:disabled, .auth-form button:disabled, .auth-mode-tab:disabled { opacity: .6; cursor: wait; }
.auth-google-mark { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #4285f4; background: var(--paper); font-family: Arial, sans-serif; font-size: 15px; font-weight: 800; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 10px; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.auth-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 17px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-2); }
.auth-mode-tab { min-height: 37px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
.auth-mode-tab.selected { color: var(--forest); background: var(--paper); box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 9%, transparent); }
.auth-form { display: grid; gap: 9px; }
.auth-form label { color: var(--ink); font-size: 10px; font-weight: 750; }
.auth-form input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 11px; outline: none; color: var(--ink); background: var(--paper); font: inherit; font-size: 12px; }
.auth-form input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 12%, transparent); }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-feedback { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 10px; line-height: 1.6; }
.auth-feedback.error { border: 1px solid color-mix(in srgb, #b24c3f 30%, var(--line)); color: #9d4035; background: color-mix(in srgb, #b24c3f 7%, var(--paper)); }
.auth-code-caption { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.auth-code-caption strong { color: var(--ink); }
.auth-code-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.source-card { align-items: flex-start; margin: 12px 0; }
.source-main { display: flex; width: 100%; align-items: flex-start; gap: 13px; }
.source-body { flex: 1; min-width: 0; }
.source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.source-heading h2, .source-card h2 { margin: 0 0 5px; font-size: 13px; }
.source-heading p, .source-card > div > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.source-entry { display: flex; gap: 8px; margin-top: 13px; }
.source-entry input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--canvas); font: inherit; font-size: 11px; }
.source-entry input:focus { outline: 2px solid color-mix(in srgb, var(--forest-2) 35%, transparent); border-color: var(--forest-2); }
.source-result, .connected-handle { display: block; min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.connected-handle { color: var(--forest); font-weight: 700; }
.text-button { padding: 4px 0; border: 0; color: var(--forest-2); background: transparent; font: inherit; font-size: 9px; font-weight: 750; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.muted-source { opacity: .8; }
.favorite-picker-card { margin-top: 23px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.favorite-picker-card .section-heading { align-items: flex-start; }
.favorite-picker-card .section-heading h2 { margin: 5px 0; font-size: 20px; }
.favorite-picker-card .section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.selected-count strong { color: var(--forest); }
.favorite-results, .favorite-selected { margin-top: 10px; }
.favorite-result-row, .favorite-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.favorite-result-row > span, .favorite-row > span { display: grid; min-width: 0; gap: 3px; }
.favorite-result-row strong, .favorite-row strong { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-result-row small, .favorite-row small { color: var(--muted); font-size: 9px; }
.favorite-result-row .secondary-button { min-height: 31px; flex: none; padding: 0 10px; font-size: 9px; }
.favorite-result-row button:disabled { opacity: .48; cursor: not-allowed; }
.muted-copy { color: var(--muted); font-size: 10px; }
.account-privacy-note + .source-card { margin-top: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: stretch; gap: 15px; margin-top: 25px; }
.plan-card { display: flex; flex-direction: column; align-items: flex-start; padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.plan-card.featured-plan { border-color: color-mix(in srgb, var(--forest-2) 48%, var(--line)); background: linear-gradient(145deg, var(--paper), color-mix(in srgb, var(--forest-2) 8%, var(--paper))); box-shadow: var(--shadow); }
.plan-card .eyebrow { margin-bottom: 9px; }
.plan-card h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.2; }
.featured-plan h2 { max-width: 430px; font-size: 21px; }
.plan-price { margin: 15px 0 3px; color: var(--ink); font-family: Georgia, serif; font-size: 36px; letter-spacing: -1px; }
.plan-price small { color: var(--muted); font-family: inherit; font-size: 10px; letter-spacing: 0; }
.plan-price-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.checkout-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.plan-card ul { display: grid; gap: 12px; width: 100%; margin: 20px 0 24px; padding: 0; list-style: none; }
.plan-card li { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.plan-card li .icon-svg { flex: none; color: var(--forest-2); }
.plan-card .primary-button { margin-top: auto; }
.disabled-button { opacity: .58; cursor: not-allowed; }
.plan-card .checkout-note { margin-top: 9px; }
.pro-gate-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 620px; margin: 25px auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.pro-gate-card h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.pro-gate-card > p:not(.eyebrow) { max-width: 500px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.essentials-progress { display: flex; align-items: baseline; gap: 8px; margin: 5px 0; }
.essentials-progress strong { color: var(--forest); font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.essentials-progress span { color: var(--muted); font-size: 10px; }
.essentials-summary { display: flex; align-items: baseline; gap: 10px; margin: -5px 0 16px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.essentials-summary strong { color: var(--forest); font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.essentials-summary span { font-size: 11px; font-weight: 700; }
.essentials-summary small { margin-left: auto; color: var(--muted); font-size: 9px; }
.takeout-card { display: grid; gap: 15px; margin-top: 14px; }
.takeout-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.file-pick { position: relative; overflow: hidden; cursor: pointer; }
.file-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.danger-button { color: #9f453b; }

@media (max-width: 720px) {
  .account-shortcut { width: 34px; min-height: 34px; justify-content: center; padding: 2px; }
  .account-shortcut > span:last-child { display: none; }
  .account-avatar { width: 27px; height: 27px; }
  .account-progress-card, .account-summary-card { align-items: flex-start; flex-direction: column; gap: 13px; margin: 17px 0; padding: 16px; border-radius: 15px; }
  .account-progress-card h2, .account-summary-card h2 { font-size: 23px; }
  .account-stat-grid { gap: 8px; }
  .account-stat-card { padding: 13px; }
  .account-stat-card strong { font-size: 22px; }
  .account-actions { gap: 7px; }
  .account-actions .secondary-button { min-height: 37px; padding-inline: 10px; font-size: 9px; }
  .auth-card, .favorite-picker-card { padding: 15px; border-radius: 15px; }
  .source-card { padding: 13px; }
  .source-heading { flex-direction: column; gap: 7px; }
  .source-entry { flex-direction: column; }
  .source-entry .secondary-button { justify-content: center; }
  .plan-grid { grid-template-columns: minmax(0,1fr); gap: 10px; margin-top: 17px; }
  .plan-card { padding: 18px; border-radius: 15px; }
  .plan-card ul { gap: 10px; margin: 15px 0 19px; }
  .pro-gate-card { margin: 18px 0; padding: 20px; }
  .pro-gate-card h2 { font-size: 25px; }
  .favorite-result-row, .favorite-row { align-items: flex-start; gap: 8px; }
  .favorite-result-row .secondary-button { min-height: 30px; padding-inline: 8px; }
  .takeout-controls { align-items: stretch; flex-direction: column; }
  .takeout-controls > * { justify-content: center; }
  .essentials-summary { flex-wrap: wrap; gap: 5px 8px; }
  .essentials-summary small { width: 100%; margin-left: 0; }
}
