/* Allison Inquiry Unofficial — archive site styles */
:root {
  --bg: #0f1216;
  --panel: #161b22;
  --panel-2: #1c232c;
  --line: #2a323c;
  --text: #e7ecf1;
  --muted: #98a4b3;
  --accent: #6ea8fe;
  --accent-dim: #2b3a55;
  --active: #f0c674;
  --active-bg: #33301f;
  --field: #222b37;         /* input fill — lighter than panels so boxes stand out on the dark bg */
  --field-line: #46566a;    /* input border — clearly visible against the background */
  --header-grad-top: #12171d;
  --btn-bg-hover: #222b36;
  --maxw: 1280px;
}
html[data-theme="light"] {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --line: #dbe1e9;
  --text: #1a2230;
  --muted: #5a6675;
  --accent: #2563eb;
  --accent-dim: #b9caf1;
  --active: #8a5a00;
  --active-bg: #fdeecb;
  --field: #ffffff;
  --field-line: #b6c1cf;
  --header-grad-top: #eaf0f7;
  --btn-bg-hover: #e6ebf2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background-color .2s ease, color .2s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--header-grad-top), var(--bg));
}
.site-header .wrap { max-width: var(--maxw); margin: 0 auto; padding: 18px 20px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.site-header h1 { margin: 0; font-size: 20px; letter-spacing: .2px; }
.h1-sub { color: var(--muted); font-weight: 400; }
.site-header .tagline { color: var(--text); font-size: 14px; margin-top: 6px; }
.site-header .disclaimer { color: var(--muted); font-size: 12px; margin-top: 6px; opacity: .85; }
.crumb { font-size: 13px; color: var(--muted); margin-top: 6px; }
.crumb a { color: var(--muted); }

/* theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  transition: border-color .12s, background .12s;
}
.theme-toggle:hover { border-color: var(--accent-dim); background: var(--btn-bg-hover); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* header search (index) */
.header-search {
  display: flex; align-items: center; gap: 8px; min-width: 210px;
  background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; padding: 7px 11px;
}
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110,168,254,.25); }
.header-search .hs-icon { color: var(--muted); display: flex; flex-shrink: 0; }
.header-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; padding: 0; }
.header-search input::placeholder { color: var(--muted); }
.header-search .search-count { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- index / wall ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 64px; }
.section-title {
  font-size: 15px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); margin: 34px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
  column-gap: 16px;
  row-gap: 24px;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .12s ease;
}
.card:hover { border-color: var(--accent-dim); }
.card.pending { opacity: .82; }
.card.unavailable { opacity: .5; }
.thumb { position: relative; display: block; aspect-ratio: 16/9; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur {
  position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.82);
  color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 4px;
}
.badge {
  position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 20px; letter-spacing: .3px;
}
.badge.ready { background: #1e3a2a; color: #7ee2a8; }
.badge.pending { background: #3a331e; color: #e6c979; }
.card .body { padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 7px; line-height: 1.1; }
.card .name { font-weight: 650; font-size: 15px; line-height: 1.2; }
.card .sub { color: var(--muted); font-size: 12.5px; line-height: 1.05; margin: 0 0 1px; }
.card .foot { display: flex; justify-content: space-between; align-items: baseline; padding: 1px 12px 8px; font-size: 12.5px; line-height: 1.05; margin: 0; }
.card .thumb { margin: 0; display: block; }
.card .thumb img { vertical-align: top; }
.card .status.ready { color: #7ee2a8; }
.card .status.pending { color: #e6c979; }
.card .status.na { color: var(--muted); }
.card .dur2 { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- video page ---------- */
.vp { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.player-col { position: sticky; top: 16px; }
.player-wrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.player-wrap iframe, .player-wrap #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
main > h2 { margin: 20px 0 2px; font-size: 24px; }
main > .meta { color: var(--muted); font-size: 14px; margin-bottom: 17px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 13px; font-size: 13.5px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--accent-dim); background: var(--btn-bg-hover); }
.btn.copied { border-color: #2e7d54; color: #7ee2a8; }

.keypoints { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.keypoints h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.keypoints.placeholder { color: var(--muted); font-size: 13.5px; font-style: italic; }
.keypoints ol { margin: 0; padding-left: 20px; }
.keypoints li { margin: 4px 0; }

/* transcript */
.transcript-col { min-width: 0; }
.transcript { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.spk-group { margin: 10px 6px 14px; }
.spk-label { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 3px 8px; }
.seg {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: inherit; padding: 4px 8px; border-radius: 6px;
  cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 40px;
}
.seg:hover { background: var(--panel-2); }
.seg .t { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; margin-right: 8px; }
.seg.active { background: var(--active-bg); }
.seg.active, .seg.active .t { color: var(--active); }
.pending-note { color: var(--muted); font-style: italic; padding: 24px 12px; text-align: center; }

.site-footer { max-width: var(--maxw); margin: 40px auto 0; padding: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ---------- header nav ---------- */
.site-nav { font-size: 15px; color: var(--text); }
.site-nav a { color: var(--text); font-weight: 500; }
.site-nav a:hover { color: var(--accent); }

/* ---------- share row ---------- */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 6px; }
.share-row .share-label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; margin-right: 2px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 36px; height: 36px; padding: 0; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  transition: border-color .12s, background .12s, color .12s;
}
.share-btn:hover { border-color: var(--accent-dim); background: var(--btn-bg-hover); text-decoration: none; }
.share-btn svg { display: block; }
.share-btn.copied { border-color: #2e7d54; color: #34c07a; }
.share-btn.copied::after {
  content: "Copied!"; position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  font-size: 11px; padding: 2px 7px; border-radius: 5px; white-space: nowrap; pointer-events: none;
}

/* ---------- search (transcript pill; global search lives in the header) ---------- */
.searchbox { display: flex; align-items: center; gap: 8px; margin: 14px 0; background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; padding: 9px 12px; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110,168,254,.25); }
.searchbox .hs-icon { color: var(--muted); display: flex; flex-shrink: 0; }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; padding: 0; }
.searchbox input::placeholder { color: var(--muted); }
.search-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.search-results { margin: 4px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.sr-video { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.sr-title { display: inline-block; font-weight: 650; font-size: 15px; margin-bottom: 6px; }
.sr-day { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.sr-hit { display: flex; gap: 10px; padding: 4px 6px; border-radius: 6px; color: var(--text); }
.sr-hit:hover { background: var(--panel-2); text-decoration: none; }
.sr-hit .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 52px; }
.sr-txt { color: var(--text); font-size: 13.5px; line-height: 1.5; }
.sr-more { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--accent); }
.sr-empty { color: var(--muted); font-style: italic; padding: 8px 2px; }
mark { background: var(--active-bg); color: var(--active); border-radius: 2px; padding: 0 1px; }

.seg.nomatch, .spk-group.nomatch { display: none; }

/* ---------- about / prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 8px 0 16px; }
.prose h3 { font-size: 16px; margin: 26px 0 6px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  background: var(--field); color: var(--text); border: 1px solid var(--field-line);
  border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 14px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110,168,254,.25); }
.contact-form textarea { resize: vertical; }
.contact-form .checkbox-row { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.contact-form .checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.contact-form .btn { align-self: flex-start; }

/* ---------- desktop: independent scroll for the two columns ---------- */
/* Each column is its own viewport-height pane, so key points and the transcript
   scroll independently instead of sharing one page scrollbar. */
@media (min-width: 821px) {
  .player-col { max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden; }
  .transcript-col {
    position: sticky; top: 16px; align-self: start;
    max-height: calc(100vh - 32px); display: flex; flex-direction: column; min-width: 0;
  }
  .transcript-col .searchbox { flex: 0 0 auto; margin-top: 0; }
  .transcript { flex: 1 1 auto; overflow-y: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .vp { grid-template-columns: 1fr; }
  .player-col { position: sticky; top: 0; z-index: 5; margin: 0 -20px; padding: 0 20px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .player-wrap { border-radius: 0; }
  .header-search { min-width: 0; flex: 1; }
  .site-header h1 { font-size: 18px; }
}

/* ---------- light-theme readability tweaks for status colors ---------- */
html[data-theme="light"] .badge.ready { background: #d7f2e3; color: #1c7a44; }
html[data-theme="light"] .badge.pending { background: #faefce; color: #8a6a17; }
html[data-theme="light"] .card .status.ready { color: #1c7a44; }
html[data-theme="light"] .card .status.pending { color: #8a6a17; }
html[data-theme="light"] .share-btn.copied { color: #1c7a44; }
html[data-theme="light"] mark { background: #ffe9a8; color: #7a5300; }
