/* Hook details panel (hook-detail.js) + the split view that hosts it (list 1/3 left, details 2/3 right on desktop).
   Works with site.css tokens (public pages) and app.css tokens (dashboard). */
.hd2, .cr-panel { --hd-serif: var(--font-display, var(--serif, "Instrument Serif", Georgia, serif)); --hd-sans: var(--font-body, var(--sans, "Inter", system-ui, sans-serif));
  --hd-lime: var(--accent, #B4E04A); --hd-lime-soft: var(--accent-soft, #EEF8D6); --hd-ink: var(--ink, #0E0F10); --hd-muted: var(--muted, #5E6672); --hd-line: rgba(14,15,16,.08);
  font-family: var(--hd-sans); color: var(--hd-ink); font-size: 14px; container-type: inline-size; }
.hd2 { max-width: 100%; }
.hd2-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 0 14px; }
.hd2-head b { font-size: 16px; }
.hd-who { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.hd-who:hover b { text-decoration: underline; text-underline-offset: 3px; }
.hd-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: #E3EAF2; }
.hd2-head span { color: var(--hd-muted); }
.hd-pill.lime { background: var(--hd-lime); }
.hd-pill { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #DCEBFA; color: var(--hd-ink) !important; font: 600 12px/1.1 var(--hd-sans); }
.hd2-cols { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); grid-template-areas: "side main" "use main"; grid-template-rows: auto 1fr; gap: 14px 22px; align-items: start; }
.hd-side { grid-area: side; } .hd2-main { grid-area: main; min-width: 0; } .hd-usewrap { grid-area: use; }
/* narrow panels (home-page drawer, phones, small split panels): one column, tabs before the form */
@container (max-width: 820px) {
  .hd2-cols { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main" "use"; grid-template-rows: auto; }
  .hd-side { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: start; } /* thumbnail beside the tiles, not above them */
  .hd-side .hd-thumb { grid-row: span 3; aspect-ratio: 9 / 14; max-height: 340px; }
  .hd-thumb.playing { aspect-ratio: 9 / 16; max-height: 70vh; }
}

/* left column */
.hd-side { display: grid; gap: 12px; }
.hd-thumb { position: relative; aspect-ratio: 9 / 13; max-height: 420px; width: 100%; border-radius: 20px; overflow: hidden; background: #E9F0F7; }
.hd-ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 25% 20%, #E4F2C4, transparent 55%), radial-gradient(circle at 80% 80%, #D5E7F8, transparent 55%), #F2F5F8; }
.hd-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(14,15,16,.35); cursor: pointer; z-index: 2; transition: transform .15s; }
.hd-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.hd-play svg { width: 22px; height: 22px; margin-left: 3px; }
.hd-thumb.playing { aspect-ratio: 9 / 16; background: #000; }
.hd-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hd-chip { position: absolute; padding: 6px 10px; border-radius: 999px; background: rgba(14,15,16,.78); color: #fff; font: 600 12px/1 var(--hd-sans); }
.hd-chip.bl { bottom: 10px; left: 10px; }
.hd-links { display: flex; justify-content: space-between; gap: 8px; }
.hd-links a, .hd-copy.plain { display: inline-flex; align-items: center; gap: 6px; color: #2B6FC9; font: 600 13px var(--hd-sans); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.hd-links svg { width: 15px; height: 15px; }
.hd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* light metric tiles (white cards; engagement tinted lime) */
.hd-tiles div { background: #fff; border: 1px solid var(--hd-line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 14px -12px rgba(40,70,110,.45); }
.hd-tiles div.hi { background: var(--hd-lime-soft); border-color: rgba(180,224,74,.7); }
.hd-tiles span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--hd-muted); }
.hd-tiles span svg { width: 13px; height: 13px; }
.hd-tiles b { display: block; margin-top: 2px; font: 400 26px/1.05 var(--hd-serif); }
.hd-use { background: #fff; border-radius: 18px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 4px 14px -10px rgba(40,70,110,.4); }
.hd-use h3 { margin: 0; font: 400 22px/1.1 var(--hd-serif); }
.hd-use p { margin: 0; color: var(--hd-muted); font-size: 13px; }
.hd-use label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--hd-muted); }
.hd-use input:not([type=checkbox]):not([type=radio]), .hd-use select, .hd-remix input:not([type=checkbox]) { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #DCE4EC; background: #F7F9FC; font: 500 14px var(--hd-sans); color: var(--hd-ink); }
.hd-use.locked { text-align: center; justify-items: center; }
.hd-use.locked > svg { width: 22px; height: 22px; color: var(--hd-muted); }
.hd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 11px 16px; background: var(--hd-ink); color: #fff; font: 600 14px var(--hd-sans); cursor: pointer; }
.hd-btn.lime { background: var(--hd-lime); color: var(--hd-ink); }
.hd-btn svg { width: 16px; height: 16px; }
.hd-btn:disabled { opacity: .5; cursor: wait; }

/* tabs */
.hd-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--hd-line); margin-bottom: 14px; position: sticky; top: var(--hd-sticky-top, 0px); background: var(--bg, #EEF4FB); z-index: 4; box-shadow: 0 -12px 0 var(--bg, #EEF4FB); } /* solid: content never shows through */
.modal:not(.split-panel) .hd-tabs { background: #fff; box-shadow: 0 -12px 0 #fff; }
.drawer .hd2 { --hd-sticky-top: 73px; } /* the drawer's own header height */
.hd-tabs button { border: 0; background: none; padding: 12px 8px; font: 600 13px var(--hd-sans); color: var(--hd-muted); cursor: pointer; border-bottom: 3px solid transparent; }
.hd-tabs button[aria-selected="true"] { color: var(--hd-ink); border-bottom-color: var(--hd-lime); }
.hd-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.hd-panel[hidden] { display: none; }
.hd-sec { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: 0 4px 14px -10px rgba(40,70,110,.35); }
.hd-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.hd-sec h3 { margin: 0; font: 600 12px/1 var(--hd-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--hd-muted); }
.hd-sec h3::before { content: ""; display: inline-block; width: 4px; height: 12px; border-radius: 2px; background: var(--hd-lime); margin-right: 7px; vertical-align: -1px; }
.hd-sec h4 { margin: 12px 0 4px; font-size: 13px; } .hd-sec h4.ok { color: #3E6B0A; } .hd-sec h4.no { color: #B3261E; }
.hd-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.hd-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.hd-kv dt { color: var(--hd-muted); } .hd-kv dd { margin: 0; font-weight: 600; }
.hd-why { margin: 0; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hd-why.open { display: block; }
.hd-why-full { margin: 0; white-space: pre-line; }
.hd-more-btn { border: 0; background: none; padding: 6px 0 0; font: 600 13px var(--hd-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--hd-ink); }
.hd-hook { margin: 0 0 10px; font: 400 26px/1.1 var(--hd-serif); }
.hd-tpl { position: relative; background: var(--hd-lime-soft); border: 1px dashed rgba(120,160,40,.7); border-radius: 14px; padding: 10px 90px 12px 14px; }
.hd-tpl > span { font: 600 10.5px/1 var(--hd-sans); letter-spacing: .08em; text-transform: uppercase; color: #4D6B12; }
.hd-tpl p { margin: 6px 0 0; font: 400 20px/1.2 var(--hd-serif); }
.hd-tpl .hd-copy { position: absolute; right: 10px; top: 10px; }
mark { background: none; color: #B3261E; font-weight: 600; }
.hd-copy { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hd-line); border-radius: 999px; padding: 6px 11px; background: #fff; color: var(--hd-ink); font: 600 12px/1 var(--hd-sans); cursor: pointer; white-space: nowrap; }
.hd-copy svg { width: 14px; height: 14px; }
.hd-remix { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; align-items: end; }
.hd-versions { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.hd-versions li p { margin: 0 0 4px; font: 400 18px/1.2 var(--hd-serif); }
.hd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hd-pair div { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 14px -10px rgba(40,70,110,.35); }
.hd-pair span { font: 600 11px/1 var(--hd-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--hd-muted); }
.hd-pair p { margin: 6px 0 0; }
.hd-table { overflow-x: auto; }
.hd-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hd-table th { text-align: left; font-size: 11.5px; color: var(--hd-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--hd-line); }
.hd-table td { vertical-align: top; padding: 8px; border-bottom: 1px solid var(--hd-line); }
.hd-table td:nth-child(2) { white-space: nowrap; color: var(--hd-muted); }
.hd-pattern { margin: 0; font: 400 22px/1.2 var(--hd-serif); }
.hd-pre { margin: 0; white-space: pre-wrap; font: 400 13.5px/1.55 var(--hd-sans); max-height: 320px; overflow: auto; background: #F7F9FC; border-radius: 12px; padding: 12px; }
.hd-raw summary { cursor: pointer; font-weight: 600; }
.hd-raw .hd-pre { margin-top: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.hd-muted { color: var(--hd-muted); margin: 0; } .hd-muted svg { width: 14px; height: 14px; vertical-align: -2px; }
.hd-fine { font-size: 12px; color: var(--hd-muted); margin: 6px 0 0; } .hd-fine a { color: inherit; }
.hd-err { color: #B3261E; margin: 8px 0 0; }
.hd-script .ok { color: #3E6B0A; font-weight: 700; margin: 6px 0; }
.hd-script ol { padding-left: 18px; margin: 6px 0 0; display: grid; gap: 6px; font-size: 13px; }
.hd-loading { display: flex; align-items: center; gap: 5px; color: var(--hd-muted); font-size: 13px; padding: 10px 2px; }
.hd-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--hd-lime); animation: hd-dot 1s infinite ease-in-out; }
.hd-loading i:nth-child(2) { animation-delay: .15s; } .hd-loading i:nth-child(3) { animation-delay: .3s; }
.hd-loading span { margin-left: 6px; }
@keyframes hd-dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.hd-locked { position: relative; border-radius: 18px; overflow: hidden; background: #fff; }
.hd-blur { filter: blur(5px); padding: 18px; color: var(--hd-muted); user-select: none; }
.hd-unlock { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; background: rgba(255,255,255,.55); }
.hd-unlock svg { width: 20px; height: 20px; } .hd-unlock p { margin: 0; font-weight: 600; }

/* ---------- split view: list on the left third, details on the right two thirds (desktop) ---------- */
@media (min-width: 1024px) {
  body.split-open .split-panel { overflow-x: clip; position: fixed; top: 10px; right: 10px; bottom: 10px; left: calc(33.333vw + 6px); width: auto; z-index: 41; overflow-y: auto;
    border-radius: 28px; background: var(--bg, #EEF4FB); box-shadow: 0 30px 80px rgba(20,30,45,.22); border: 1px solid rgba(14,15,16,.06); transform: none; max-height: none; }
  body.split-open .drawer-backdrop, body.split-open .modal-back { display: none !important; }
  body.split-open .split-list { width: calc(33.333vw - 30px); max-width: none; margin-left: 10px; margin-right: 0; padding-left: 10px; padding-right: 10px; }
  body.split-open .split-list .grid, body.split-open .split-list .hooks { grid-template-columns: 1fr !important; }
  body.split-open .split-hide { display: none !important; }
  /* list column while a hook is open: hide the page title, fold search + filters behind one small button, smaller type */
  body.split-open .split-list .lib-head { display: none; }
  body.split-open .split-list .filter-toggle { display: inline-flex; }
  /* panel open: the filter bar folds to just the Videos | Creators | Saved toggle until "Search & filters" is tapped */
  body.split-open:not(.filters-open) .split-list .toolbar :is(.search, .filters > :not(.lib-view), .cr-filters, .sort-row) { display: none !important; }
  body.split-open .split-list .toolbar { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; } /* no pale strip in the narrow list column */
  body.split-open .split-list .toolbar { position: static; padding: 8px 0 4px; }
  /* narrow list column: line the filter bar up with the cards (same 17px inset) and lay the dropdowns out as a tidy 2-column grid */
  body.split-open .split-list .toolbar .wrap { padding: 0 17px; }
  body.split-open .split-list .filter-toggle { margin-left: 17px; }
  body.split-open .split-list .toolbar .filters { display: grid; grid-template-columns: 1fr 1fr; }
  body.split-open .split-list .toolbar .filters > .lib-view { grid-column: 1 / -1; justify-self: stretch; margin: 0; }
  body.split-open .split-list .toolbar .filters .lib-view button { flex: 1; }
  body.split-open .split-list .toolbar .filters .vh-ps, body.split-open .split-list .toolbar .filters .vh-ps-btn, body.split-open .split-list .toolbar .filters .toggle { width: 100%; max-width: none; min-width: 0; }
  body.split-open .split-list .toolbar .filters .vh-ps-btn { justify-content: space-between; }
  body.split-open .split-list .toolbar .search { width: 100%; box-sizing: border-box; }
  body.split-open .split-list .toolbar .search .btn { padding: 8px 12px; }
  body.split-open .split-list .toolbar input, body.split-open .split-list .toolbar select, body.split-open .split-list .toolbar label, body.split-open .split-list .toolbar .btn { font-size: 13px; }
  body.split-open .split-list .toolbar input[type=search] { padding: 9px 12px; }
  body.split-open .split-list .toolbar select { padding: 7px 26px 7px 10px; min-height: 0; }
  body.split-open .split-list .toolbar .filters { gap: 6px; }
  .is-active-card { outline: 3px solid var(--accent, #B4E04A); outline-offset: 2px; }
}

@media (max-width: 560px) { .hd-tabs button { font-size: 11.5px; padding: 10px 4px; } .hd-remix { grid-template-columns: 1fr; } .hd-pair { grid-template-columns: 1fr; } .hd-tpl { padding-right: 14px; } .hd-tpl .hd-copy { position: static; margin-top: 8px; } }

.hd-hookmeta { margin: 0 0 4px; font-size: 12.5px; color: var(--hd-muted); }
.hd-remix select { padding: 10px 12px; border-radius: 12px; border: 1px solid #DCE4EC; background: #F7F9FC; font: 500 14px var(--hd-sans); color: var(--hd-ink); }
.hd-ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.hd-raw { border: 1px solid var(--hd-line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.hd-raw summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hd-raw summary span { color: var(--hd-muted); font-size: 12.5px; }
.hd-raw summary .hd-copy { margin-left: auto; }
.hd-raw summary .hd-copy span { color: inherit; font-size: inherit; }
.hd-tone-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hd-line); }
.hd-tone-copy .hd-fine { margin: 0; }

.hd-loading.big { justify-content: center; padding: 60px 0; }
.hd-tiles:empty, .hd-tiles:empty + .hd-fine { display: none; }
@container (max-width: 480px) { .hd-side { grid-template-columns: 1fr; } .hd-side .hd-thumb { grid-row: auto; aspect-ratio: 16 / 10; max-height: 260px; } }

/* Scene by scene with real frames: shots, each with one 9:16 frame per second, then what's said / on screen */
.hd-shot { border: 1px solid var(--hd-line); border-radius: 14px; padding: 10px 12px 12px; margin-bottom: 10px; }
.hd-shot-head { display: flex; gap: 10px; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.hd-shot-head span { color: var(--hd-muted); font-size: 12px; }
.hd-secs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.hd-secs figure { margin: 0; flex: 0 0 64px; }
.hd-secs img { display: block; width: 64px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--hd-line); }
.hd-secs figcaption { font-size: 11px; color: var(--hd-muted); text-align: center; margin-top: 2px; }
.hd-shot-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.hd-shot-meta dt { color: var(--hd-muted); font-size: 12px; font-weight: 600; }
.hd-shot-meta dd { margin: 0; }
/* Shots sit side by side and scroll sideways; a long shot wraps its frames inside its own card */
.hd-shots { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 8px; }
.hd-shots:focus-visible { outline: 2px solid var(--hd-lime); outline-offset: 2px; }
.hd-shots .hd-shot { flex: 0 0 auto; width: max-content; min-width: 200px; max-width: min(520px, 86%); margin: 0; scroll-snap-align: start; }
.hd-shots .hd-secs { flex-wrap: wrap; overflow: visible; }
.hd-rail-nav { display: inline-flex; gap: 6px; margin-left: auto; }
.hd-rail-nav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hd-line); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--hd-ink); }
.hd-rail-nav button:hover { border-color: var(--hd-ink); }
@media (hover: none) { .hd-rail-nav { display: none; } }
/* Audio track */
.hd-audio { display: flex; gap: 12px; align-items: center; }
.hd-audio-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--hd-lime); font-size: 20px; }
.hd-audio-name { margin: 0; font-weight: 600; font-size: 15px; }
.hd-audio .hd-fine { margin: 2px 0 0; }
.hd-audio-tip { font-size: 13.5px; line-height: 1.5; margin: 10px 0 12px; }

/* One-tap forms: "For <offer> · <audience> · Edit", inputs only when editing (or before an offer is saved) */
.hd-offer { min-width: 0; }
.hd-for { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--hd-ink); }
.hd-for span { color: var(--hd-muted); }
.hd-edit { border: 0; background: none; padding: 0 2px; color: var(--hd-ink); font: 600 13px var(--hd-sans); text-decoration: underline; cursor: pointer; }
.hd-offer-edit { display: grid; gap: 8px; margin-top: 8px; }
.hd-offer-edit[hidden] { display: none; } /* only shown after Edit, or before an offer is saved */
.hd-remix .hd-offer-edit label, .hd-use .hd-offer-edit label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--hd-muted); }
.hd-offer-edit .hd-save { display: flex !important; align-items: center; gap: 6px; font-weight: 500 !important; }
.hd-len { display: flex; gap: 6px; }
.hd-len label { flex: 1; } .hd-len input { position: absolute; opacity: 0; pointer-events: none; }
.hd-len span { display: block; text-align: center; padding: 8px 0; border-radius: 999px; border: 1px solid #DCE4EC; background: #F7F9FC; font: 600 13px var(--hd-sans); color: var(--hd-ink); cursor: pointer; }
.hd-len input:checked + span { background: var(--hd-ink); color: #fff; border-color: var(--hd-ink); }
.hd-len input:focus-visible + span { outline: 2px solid var(--hd-lime); outline-offset: 2px; }

/* Shot frames open large */
.hd-zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.hd-zoom:focus-visible { outline: 2px solid var(--hd-lime); outline-offset: 2px; }
.hd-secs figure { flex-basis: 76px; } .hd-secs img { width: 76px; }
.hd-cover { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; }
.hd-cover img { width: 140px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
@media (max-width: 560px) { .hd-cover { grid-template-columns: 1fr; } }
.hd-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 12, 16, .88); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; }
.hd-lb[hidden] { display: none; }
.hd-lb figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(92vw, 560px); }
.hd-lb img { max-height: 82vh; max-width: 100%; border-radius: 14px; background: #222; }
.hd-lb figcaption { color: #fff; font: 500 14px/1.4 var(--hd-sans); text-align: center; }
.hd-lb-x { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.hd-lb-nav { width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; flex: none; }
.hd-lb-nav[hidden] { display: none; }
@media (max-width: 560px) { .hd-lb { padding: 12px 6px; gap: 4px; } .hd-lb-nav { width: 38px; height: 38px; font-size: 24px; } }

.filter-toggle { --hd-ink: var(--ink, #0E0F10); --hd-lime: var(--accent, #B4E04A); --hd-line: rgba(14,15,16,.08); --hd-sans: var(--sans, "Inter", system-ui, sans-serif); /* lives outside .hd2, so it needs its own copies */
  display: none; align-items: center; gap: 8px; margin: 6px 0 4px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hd-line); background: #fff; font: 600 13px var(--hd-sans); color: var(--hd-ink); cursor: pointer; }
.filter-toggle svg { width: 16px; height: 16px; }
.filter-toggle b { background: var(--hd-lime); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; }
body.filters-open .filter-toggle { background: var(--hd-ink); color: #fff; }

/* Airtable-coloured pills (niche, hook technique, engagement rate, views count) */
.vh-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font: 600 12px/1.3 var(--hd-sans, Inter, sans-serif); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vh-pill.sm { padding: 1px 7px; font-size: 10.5px; vertical-align: middle; }
.hd2-head .vh-pill { margin-left: 4px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; }
.hook-card .meta .vh-pill { margin: 0 5px 5px 0; }
/* pill dropdown replacing the native niche / technique selects */
.vh-ps { position: relative; display: inline-block; min-width: 0; }
.vh-ps-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; }
.vh-ps-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 9px 14px; border-radius: 999px; border: 1px solid #DCE4EC; background: #fff; font: 500 14px var(--hd-sans, Inter, sans-serif); color: #14171C; cursor: pointer; }
.vh-ps-btn i { font-style: normal; font-size: 11px; color: #6B7280; }
.vh-ps-list { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 280px; max-height: 360px; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(20,30,45,.35); padding: 8px; display: grid; gap: 2px; }
.vh-ps-list[hidden] { display: none; }
.vh-ps-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: 500 13px var(--hd-sans, Inter, sans-serif); }
.vh-ps-list button:hover, .vh-ps-list button[aria-selected="true"] { background: #F1F4F8; }
.vh-ps-list small { color: #6B7280; font-size: 11.5px; }

/* sound chip on cards (licensed track; trending when several recent clips use it) */
.chip.sound { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.sound.hot { background: #F08A55; color: #fff; }
.hd-hook.hd-hook-visual { font-style: italic; }

/* "This clip at a glance": collapsible, closed by default */
.hd-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.hd-fold > summary::-webkit-details-marker { display: none; }
.hd-fold > summary i { font-style: normal; font-size: 12px; opacity: .6; transition: transform .2s; }
.hd-fold[open] > summary i { transform: rotate(180deg); }
.hd-fold:not([open]) > summary { margin-bottom: 0; }

/* scene rail counter; on phones one shot per swipe */
.hd-rail-count { margin-left: auto; font-size: 12px; color: var(--hd-muted); font-weight: 600; white-space: nowrap; }
.hd-rail-count + .hd-rail-nav { margin-left: 10px; }
@media (max-width: 640px) {
  .hd-shots .hd-shot { flex: 0 0 100%; width: 100%; max-width: 100%; min-width: 0; scroll-snap-stop: always; }
}

/* Phones (sheet #12): the library keeps its search bar and Videos | Creators | Saved, and folds the filters and
   sorting behind the same "Search & filters" button the side-by-side view uses. */
@media (max-width: 640px) {
  .filter-toggle { display: inline-flex; margin: 0 0 8px 16px; }
  body:not(.filters-open) .toolbar :is(.filters > :not(.lib-view), .cr-filters, .sort-row) { display: none !important; }
}

/* Phase 1: script writing teased as "Coming soon" */
.hd-use.soon { position: relative; opacity: .92; }
.hd-use.soon .soon-tag { display: inline-block; font: 600 11px var(--hd-sans, system-ui); letter-spacing: .04em; text-transform: uppercase; background: #EEF2F7; color: #475467; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }
.hd-use.soon .hd-btn[disabled] { opacity: .55; cursor: not-allowed; }
