/* GLCH TV database.php - the comedy database. Same dark look and tokens as library.css/guide.css. */
:root { --bg: #0b0c0e; --panel: #15181c; --panel2: #1c2025; --fg: #f3f3f1; --mute: #9aa1a9; --line: #262b31; --accent: #ffb020; --gutter: clamp(16px, 4vw, 56px); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 16px/1.45 "Barlow", system-ui, sans-serif; min-height: 100vh; padding-bottom: 60px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .02em; margin: 0; }

#dh { padding: 28px var(--gutter) 18px; border-bottom: 1px solid var(--line); }
#dh h1 { font-size: clamp(28px, 4.4vw, 42px); }
#dh-sub { color: var(--mute); margin: 8px 0 18px; max-width: 62ch; }
#dh-ctl { display: flex; gap: 10px; flex-wrap: wrap; }
#dh-ctl[hidden] { display: none; }

#dh-crumb { display: flex; gap: 6px; align-items: center; padding: 14px var(--gutter) 0; font-size: 13.5px; flex-wrap: wrap; }
#dh-crumb[hidden] { display: none; }
#dh-crumb a { color: var(--mute); font-weight: 600; }
#dh-crumb a:hover { color: var(--accent); }
.d-sep { color: var(--line); }

/* ---- season pills */
.d-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.d-pill { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); background: var(--panel); }
.d-pill:hover { color: var(--fg); border-color: var(--mute); }
.d-pill.on { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---- prev/next nav + siblings */
.d-navrow { display: flex; gap: 12px; margin-top: 8px; }
.d-navcard { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); color: var(--fg); }
.d-navcard:hover { border-color: var(--accent); }
.d-navcard.off { opacity: .4; }
.d-navlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin-bottom: 4px; }
.d-navtitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-siblist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.d-siblist a { color: var(--fg); }
.d-siblist a:hover { color: var(--accent); }
.d-showlink { color: var(--fg); font-weight: 700; }
.d-showlink:hover { color: var(--accent); }
#d-show, #d-q { background: var(--panel); border: 1px solid var(--line); color: var(--fg); border-radius: 10px; padding: 9px 14px; font: inherit; }
#d-q { flex: 1 1 260px; min-width: 0; }
#d-show { max-width: 100%; }

main#view { padding: 22px var(--gutter) 0; }
.loading { color: var(--mute); padding: 30px 0; }

.d-group { margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.d-ghead { padding: 11px 16px; background: var(--panel2); font-weight: 600; border-bottom: 1px solid var(--line); }
.d-ghead .mute { font-weight: 400; }
.d-ghead a { font-weight: 600; }
.d-ghead a:hover { color: var(--accent); }
.d-sketches { display: flex; flex-direction: column; }
.d-sketch { padding: 11px 16px; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.d-sketch:first-child { border-top: none; }
.d-info { min-width: 0; flex: 1; }
.d-st { font-weight: 600; }
.d-ss { color: var(--mute); margin-top: 3px; font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.d-tag { font-size: 11.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 9px; text-transform: uppercase; letter-spacing: .04em; }
.d-cast { color: var(--fg); margin-top: 5px; font-size: 13.5px; }
.mute { color: var(--mute); }

/* ---- thumbnails (the linked video's YouTube still, or a lettered placeholder) */
.d-thumblink { flex: none; }
.d-thumb { width: 128px; height: 72px; object-fit: cover; border-radius: 6px; display: block; background: var(--panel2); }
.d-thumb.d-ph { display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.d-thumb.d-ph span { font: 700 18px "Barlow Condensed", sans-serif; letter-spacing: .04em; color: var(--mute); }
@media (max-width: 520px) { .d-thumb { width: 96px; height: 54px; } }

/* ---- sketch title link */
.d-st-link { color: var(--fg); text-decoration: none; }
.d-st-link:hover { color: var(--accent); text-decoration: underline; }

/* ---- IMDb-style title page: poster/watch left, facts right */
.d-detail { max-width: 980px; }
.d-dettop { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.d-media { position: sticky; top: 14px; }
.d-poster { width: 100%; aspect-ratio: 16/9; border-radius: 10px; }
.d-poster.d-ph { font-size: 15px; }
.d-poster.d-ph span { font-size: 40px; }
.d-watch { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; background: var(--accent); color: #000; font-weight: 700; padding: 11px 16px; border-radius: 8px; text-align: center; }
.d-watch:hover { filter: brightness(1.08); }
.d-nowatch { margin-top: 10px; text-align: center; color: var(--mute); font-size: 13px; border: 1px dashed var(--line); border-radius: 8px; padding: 10px; }
.d-dethead h2 { font-size: clamp(26px, 4vw, 38px); text-wrap: balance; }
.d-detmeta { margin-top: 8px; color: var(--mute); }
.d-detbody { margin-top: 20px; display: flex; flex-direction: column; gap: 18px; }
.d-detsec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.d-detsec p { margin: 0; line-height: 1.6; }
.d-castlist, .d-quotelist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.d-quotelist li { font-style: italic; color: var(--mute); }
@media (max-width: 760px) { .d-dettop { grid-template-columns: 1fr; } .d-media { position: static; max-width: 420px; } }

/* ---- prev/next nav + siblings */
.d-navrow { display: flex; gap: 12px; margin-top: 28px; }
.d-navcard { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); color: var(--fg); }
.d-navcard.right { text-align: right; }
.d-navcard:hover { border-color: var(--accent); }
.d-navcard.off { opacity: .4; }
.d-navlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin-bottom: 4px; }
.d-navtitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-siblist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.d-siblist a { color: var(--fg); }
.d-siblist a:hover { color: var(--accent); }
.d-showlink { color: var(--fg); font-weight: 700; }
.d-showlink:hover { color: var(--accent); }

/* ---- homepage: browse by show */
.d-showgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.d-showcard { display: block; }
.d-showthumb { width: 100%; aspect-ratio: 16/9; border-radius: 10px; margin-bottom: 8px; }
.d-showthumb.d-ph span { font-size: 26px; }
.d-showcard:hover .d-showthumb { outline: 2px solid var(--accent); }
.d-showname { font-weight: 700; font-size: 16px; }

.foot { color: var(--mute); padding: 4px var(--gutter) 20px; font-size: 13.5px; }

@media (max-width: 560px) { #d-show { flex: 1 1 100%; } }

/* ---- coverage: how much of the catalogue has a real video linked (2026-10-12) */
.d-cov { height: 6px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; margin-top: 6px; }
.d-cov i { display: block; height: 100%; background: var(--accent); }
.d-cov.hi i { background: #4cc38a; }
.d-cov.mid i { background: var(--accent); }
.d-cov.low i { background: #e5703a; }
.d-cov.big { height: 10px; margin: 0; flex: 1 1 200px; max-width: 420px; }
.d-cov.inline { flex: 1 1 120px; max-width: 260px; margin: 0; }
.d-cov.small { height: 5px; max-width: 160px; }
.d-covtxt { font-size: 12.5px; margin-top: 4px; color: var(--mute); }
.d-covtxt.hi, .d-scount.hi, .d-gcov.hi { color: #4cc38a; }
.d-covtxt.low, .d-scount.low, .d-gcov.low { color: #e5703a; }
.d-covtxt.none, .d-scount.none, .d-gcov.none { color: #c25b5b; }
.d-sumrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.d-gcov { float: right; font-size: 12.5px; font-weight: 600; }
.d-badge { margin-left: 8px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; vertical-align: 2px; white-space: nowrap; }
.d-badge.ok { color: #4cc38a; border: 1px solid #4cc38a; }
.d-badge.no { color: var(--mute); border: 1px dashed var(--line); }
.d-ghead.flash { animation: dflash 1.6s ease-out; }
@keyframes dflash { from { background: #3a2c0c; } to { background: var(--panel2); } }
@media (prefers-reduced-motion: reduce) { .d-ghead.flash { animation: none; } }

/* show outline: Season > Episode, collapsible */
.d-season { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 12px; overflow: hidden; }
.d-season > summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; background: var(--panel2); list-style: none; }
.d-season > summary::-webkit-details-marker { display: none; }
.d-season > summary::before { content: '\25B8'; color: var(--mute); transition: transform .15s; }
.d-season[open] > summary::before { transform: rotate(90deg); }
.d-sname { font: 700 20px "Barlow Condensed", sans-serif; letter-spacing: .02em; min-width: 7ch; }
.d-scount { font-size: 13px; font-weight: 600; margin-left: auto; white-space: nowrap; }
.d-eplist { display: flex; flex-direction: column; }
.d-ep { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); }
.d-ep:hover { background: var(--panel2); }
.d-epname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-ep .d-cov { flex: 0 0 110px; }
.d-openall { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; font-size: 14px; }
@media (max-width: 560px) { .d-ep .d-cov { flex-basis: 56px; } .d-season > summary .d-cov { display: none; } .d-gcov { float: none; display: block; } }
.d-showthumb.d-ph, .d-poster.d-ph { display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); }
@media (max-width: 560px) { .d-showgrid { grid-template-columns: repeat(2, 1fr); gap: 14px; } .d-showname { font-size: 15px; } }
img.d-showthumb, img.d-poster, img.d-thumb { object-fit: cover; display: block; }
