/* Table — a clean, sortable data table; rows stack into compact blocks on phones. */
:root {
  --accent: #2257d6;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #16181d;
  --muted: #5a616b;
  --line: #e6e8ec;
  --line-strong: #cfd3d9;
  --link: var(--accent);
  --tint: color-mix(in srgb, var(--accent) 7%, var(--bg));
  --mark: color-mix(in srgb, #f5c400 38%, var(--bg));
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --bg-soft: #1a1d21;
    --text: #e6e8eb;
    --muted: #9ca3ad;
    --line: #272b31;
    --line-strong: #3b4048;
    --link: color-mix(in srgb, var(--accent) 62%, #ffffff);
    --tint: color-mix(in srgb, var(--accent) 16%, var(--bg));
    --mark: color-mix(in srgb, #f5c400 30%, var(--bg));
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); caret-color: var(--accent); overflow-wrap: break-word; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .js-only { display: none !important; }
[hidden] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); font-size: 14px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.channel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.channel a { color: var(--text); }
.avatar { width: 22px; height: 22px; border-radius: 50%; }
.crumbs { display: inline-flex; align-items: center; gap: 6px; }
.crumbs svg { color: var(--muted); }

/* Heads */
.pagehead { padding: 32px 0 20px; }
.pagehead h1 { font-size: 26px; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
.lede { margin-top: 6px; color: var(--muted); max-width: 65ch; }

.vhead { display: grid; gap: 16px; padding: 28px 0 22px; }
.vhead h1 { font-size: 22px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
.vthumb { display: block; width: 168px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vmeta { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.vmeta > * + *::before { content: "·"; margin: 0 8px; color: var(--muted); }
.vhead .lede { margin-top: 10px; }
@media (min-width: 720px) {
  .vhead { grid-template-columns: 200px 1fr; gap: 24px; align-items: start; padding-top: 36px; }
  .vthumb { width: 200px; }
  .vhead h1 { font-size: 26px; }
  .vhead-text:only-child { grid-column: 1 / -1; }
}

/* Toolbar */
.toolbar { display: grid; gap: 8px; }
@media (min-width: 720px) { .toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; } }
.search { position: relative; }
.search input, .select select {
  height: 38px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 7px;
  -webkit-appearance: none; appearance: none;
}
.search input { width: 100%; padding: 0 36px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus, .select select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.search-ic { position: absolute; left: 12px; top: 11px; color: var(--muted); pointer-events: none; }
.search kbd {
  position: absolute; right: 9px; top: 8px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; font: 500 12px/1 var(--font); color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 5px;
}
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
@media (hover: none) { .search kbd { display: none; } }

.selects { display: flex; gap: 8px; min-width: 0; }
.select { position: relative; min-width: 0; flex: 1 1 0; }
.select::after {
  content: ""; position: absolute; right: 12px; top: 15px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); pointer-events: none;
}
.select select { width: 100%; padding: 0 30px 0 11px; cursor: pointer; text-overflow: ellipsis; }
.select select:hover, .search input:hover { border-color: color-mix(in srgb, var(--line-strong) 55%, var(--text)); }
.select.on select { border-color: var(--accent); background: var(--tint); color: var(--link); }
@media (min-width: 720px) {
  .select { flex: 0 1 auto; }
  .select select { max-width: 220px; }
  .sort-select { display: none; }
}

.status { display: flex; align-items: baseline; gap: 14px; padding: 12px 0 10px; font-size: 14px; color: var(--muted); min-height: 44px; }
.status { align-items: center; }
.status-sort { margin-left: auto; flex: 0 0 auto; }
.status-sort select { height: 32px; font-size: 14px; }
.status-sort::after { top: 12px; }
.linkbtn { padding: 0; font: inherit; color: var(--link); background: none; border: 0; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* Table, desktop */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 12px 12px; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl thead th {
  position: sticky; top: 0; z-index: 1;
  padding-top: 10px; padding-bottom: 10px;
  background: var(--bg);
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--line-strong);
  border-bottom: 0;
}
.sortbtn {
  display: inline-flex; align-items: center; gap: 4px; margin: -4px -6px; padding: 4px 6px;
  font: inherit; color: inherit; background: none; border: 0; border-radius: 5px; cursor: pointer;
}
.sortbtn:hover { color: var(--text); background: var(--bg-soft); }
.sortbtn svg { opacity: 0.45; }
[aria-sort="ascending"] .sortbtn, [aria-sort="descending"] .sortbtn { color: var(--text); }
[aria-sort="ascending"] .sortbtn svg, [aria-sort="descending"] .sortbtn svg { opacity: 1; color: var(--link); }
[aria-sort="descending"] .sortbtn svg { transform: rotate(180deg); }
.sortbtn .both { display: none; }
th:not([aria-sort]) .sortbtn .one { display: none; }
th:not([aria-sort]) .sortbtn .both { display: block; }
.tbl tbody tr:hover > td { background: var(--bg-soft); }

/* Index table */
.vtbl .c-date { width: 140px; white-space: nowrap; }
.vtbl .c-n { width: 100px; text-align: right; }
.vtbl th.c-n .sortbtn { flex-direction: row-reverse; }
.vtbl .row td { vertical-align: middle; }
.vlink { display: flex; align-items: center; gap: 14px; color: var(--text); font-weight: 550; }
.vlink:hover { color: var(--link); text-decoration: none; }
.vlink:hover .vt { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.thumb { flex: 0 0 96px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.vtext { min-width: 0; }
.vsub { display: none; }
.v.has-hits .row td { border-bottom: 0; }
.hits td { padding-top: 0; }
.hits-label { font-size: 13px; color: var(--muted); margin: 0 0 4px 110px; }
.hits ul { margin-left: 110px; font-size: 14px; }
.hits li { display: grid; grid-template-columns: 2.4em 1fr; padding: 3px 0; }
.hits .hn { color: var(--muted); }
.hits .hd { color: var(--muted); }
.hits .hd::before { content: " · "; }
.hits .more { display: inline-block; margin: 4px 0 0 110px; font-size: 14px; }

/* Source table */
.stbl .c-num { width: 44px; color: var(--muted); }
.stbl td.c-num a { color: var(--muted); }
.stbl td.c-num a:hover { color: var(--link); }
.stbl .c-kind { width: 110px; }
.stbl .c-site { width: 210px; }
.stbl .c-date { width: 118px; white-space: nowrap; }
.stbl .c-at { width: 92px; }
.stbl .c-copy { width: 40px; text-align: right; }
.stbl td.c-kind, .stbl td.c-site, .stbl td.c-date { color: var(--muted); font-size: 14px; }
.stbl tr.src { scroll-margin-top: 56px; }
.st { font-weight: 550; }
.sby, .snote, .sarch { display: block; }
.sby { margin-top: 2px; font-size: 14px; color: var(--muted); }
.snote { margin-top: 6px; font-size: 14px; max-width: 70ch; }
.sarch { margin-top: 4px; font-size: 13px; }
.at { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; }
span.at { color: var(--muted); font-weight: 400; }
.stbl tr.sec th {
  padding: 22px 0 8px; font-size: 15px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}
.stbl tr.sec th .muted { font-weight: 400; margin-left: 4px; font-size: 14px; }
.stbl tr.sec:hover > th { background: none; }
.src:target > td { background: var(--tint); }
.copy {
  width: 30px; height: 30px; margin: -5px 0; display: inline-grid; place-items: center;
  color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer;
}
.copy:hover { color: var(--link); background: var(--bg-soft); }
.copy .i-ok, .copy.done .i-link { display: none; }
.copy.done .i-ok { display: block; color: var(--link); }

/* Phones: every row becomes a compact stacked block */
@media (max-width: 719px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl th { display: block; }
  .tbl thead { display: none; }
  .tbl th, .tbl td { padding: 0; border: 0; }
  .tbl tbody tr:hover > td { background: none; }

  .vtbl tbody.v { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .vtbl tbody.v:first-of-type { border-top: 1px solid var(--line); }
  .vtbl .c-date, .vtbl .c-n { display: none; }
  .vlink { align-items: flex-start; gap: 12px; }
  .thumb { flex-basis: 112px; }
  .vt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.35; }
  .vsub { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; color: var(--muted); }
  .hits td { padding-top: 10px; }
  .hits-label, .hits ul, .hits .more { margin-left: 0; }

  .stbl tbody tr.src { display: flex; flex-wrap: wrap; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .stbl td { width: auto !important; }
  .stbl td:empty { display: none; }
  .stbl .c-num { order: 1; }
  .stbl .c-num::after { content: "·"; margin: 0 6px; }
  .stbl .c-kind { order: 2; font-size: 13px; }
  .stbl .c-date { order: 3; font-size: 13px; }
  .stbl .c-date::before { content: "·"; margin: 0 6px; }
  .stbl .c-copy { order: 4; margin-left: auto; }
  .stbl .c-src { order: 5; flex: 1 1 100%; margin-top: 4px; font-size: 15px; color: var(--text); }
  .stbl .c-site { order: 6; flex: 1 1 auto; margin-top: 4px; font-size: 13px; }
  .stbl .c-at { order: 7; margin-top: 4px; }
  .stbl tr.sec th { padding: 22px 0 6px; }
  .stbl tr.src { scroll-margin-top: 12px; }
}

/* Empty, prev/next, footer */
.empty { padding: 40px 0 56px; max-width: 60ch; }
.empty-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: 14px; }
.pn a { display: grid; gap: 2px; min-width: 0; }
.pn a:hover { text-decoration: none; }
.pn a:hover .pn-t { text-decoration: underline; text-underline-offset: 0.18em; }
.pn .muted { font-size: 13px; }
.pn-t { font-weight: 550; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn .nx { text-align: right; }
.footer { border-top: 1px solid var(--line); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 28px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
