/* Dashboard: one stylesheet for the signed-in page, the sign-in page and the two plain pages.
   The page's policy allows no inline style, no style= attribute and no fonts or pictures from other sites, so
   everything visual lives here and the type is the device's own.

   One rule runs through all of it: a SOLID mark is a figure as YouTube reported it, a HOLLOW (outlined) mark is
   a figure this dashboard counted from its own saved readings. The small hollow square beside a number, the
   outlined columns in the charts and the footnote all say the same thing. */

/* ---------------------------------------------------------------------------------------------------------- */
/* Colours. Light first; the dark values are chosen for the dark surface, not flipped.                         */
/* ---------------------------------------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --page: #eef1f4;
  --surface: #ffffff;
  --sunken: #f4f6f8;
  --ink: #14202b;
  --ink-2: #51606e;
  --ink-3: #6c7884;          /* figures that are no longer current */
  --line: #dde3e8;
  --axis: #b7c0c8;
  --series: #257de0;         /* the one data colour: views */
  --series-wash: #e7f1fd;
  --accent: #1757ac;         /* links and the main button */
  --on-accent: #ffffff;
  --good: #0aac23;
  --good-ink: #006c10;
  --warn: #fbb315;
  --warn-ink: #6a4700;
  --warn-wash: #fff5d9;
  --bad: #dc3c3d;
  --bad-ink: #b02a2b;
  --bad-wash: #fdeceb;
  --on-mark: #ffffff;
  --on-warn: #0b0b0b;
  --focus: #1757ac;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #10151a;
    --surface: #1a2128;
    --sunken: #151b21;
    --ink: #e9edf1;
    --ink-2: #a5afb9;
    --ink-3: #8a959f;
    --line: #2c353e;
    --axis: #47525d;
    --series: #338ced;
    --series-wash: #1d2f44;
    --accent: #84b9f3;
    --on-accent: #0d1721;
    --good: #0aac23;
    --good-ink: #53c556;
    --warn: #fbb315;
    --warn-ink: #fbc54b;
    --warn-wash: #332a10;
    --bad: #eb6263;
    --bad-ink: #f29091;
    --bad-wash: #3a1e20;
    --on-mark: #ffffff;
    --on-warn: #0b0b0b;
    --focus: #84b9f3;
  }
}

/* ---------------------------------------------------------------------------------------------------------- */
/* Base                                                                                                        */
/* ---------------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 0.18em; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: 8px; top: -60px; padding: 10px 14px; background: var(--surface); z-index: 5; }
.skip:focus { top: 8px; }

/* Buttons: at least 44 px tall, so a thumb can hit them. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--axis); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { color: var(--ink-3); border-color: var(--line); background: var(--sunken); cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn-danger { border-color: var(--bad); color: var(--bad-ink); }
.btn-quiet { min-height: 36px; padding: 4px 12px; font-weight: 500; }
.linklike {
  background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em;
}

/* ---------------------------------------------------------------------------------------------------------- */
/* Page shell                                                                                                  */
/* ---------------------------------------------------------------------------------------------------------- */
.demo-banner {
  padding: 8px 16px; background: var(--warn-wash); color: var(--warn-ink);
  border-bottom: 1px solid var(--line); font-size: 14px; text-align: center;
}
.top, .statusline, main, .foot { max-width: 1320px; margin-inline: auto; padding-inline: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
.brand-mark, .login-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--ink); color: var(--page);
}
.top-nav { display: flex; gap: 4px; }
.top-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent;
}
.top-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Status line: when the figures were read, and the Refresh button with its countdown. */
.statusline {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding-top: 10px; padding-bottom: 10px;
}
.status-text { color: var(--ink-2); font-size: 14px; }
.status-note { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; min-height: 0; }
.status-note:empty { display: none; }
.status-note.is-bad { color: var(--bad-ink); }
#refresh { min-width: 132px; }

main { padding-bottom: 24px; }
main:focus { outline: none; }
.view { display: none; }
body[data-view="overview"] #view-overview,
body[data-view="channel"] #view-channel,
body[data-view="settings"] #view-settings { display: block; }

.foot { padding-top: 8px; padding-bottom: 32px; color: var(--ink-2); font-size: 14px; }
.footnote { max-width: 70ch; }
.footnote .mark { display: inline-block; vertical-align: -1px; margin-right: 4px; }
body[data-view="settings"] .footnote { display: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; }
.foot-links a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; }

/* The mark for "counted by this dashboard": a small hollow square, the same language as the outlined columns. */
.mark { fill: none; stroke: var(--series); stroke-width: 1.5; }
.mark-wrap { display: inline-block; margin-left: 4px; vertical-align: 0.05em; }
.mark-wrap .mark { display: inline-block; }

/* ---------------------------------------------------------------------------------------------------------- */
/* Overview: today's posting, notices, one card per channel                                                    */
/* ---------------------------------------------------------------------------------------------------------- */
.today { padding: 8px 0 4px; }
.today-date { display: block; color: var(--ink-2); font-size: 15px; font-weight: 400; }
.today-line {
  display: block; margin-top: 2px; max-width: 24ch;
  font-size: 30px; line-height: 1.12; font-weight: 680; letter-spacing: -0.022em; text-wrap: balance;
}
.today-line.is-last { color: var(--ink-3); }
.today-source { margin-top: 6px; color: var(--ink-2); font-size: 14px; }

.notices { margin-top: 12px; display: grid; gap: 6px; }
.notice {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 8px; font-size: 15px; text-decoration: none; color: var(--ink);
  min-height: 44px;
}
.notice .ico { margin-top: 2px; }
.notice-warn { background: var(--warn-wash); }
.notice-error { background: var(--bad-wash); }
.notice-ok { background: var(--series-wash); }
a.notice .notice-go { text-decoration: underline; text-underline-offset: 0.18em; white-space: nowrap; }

.cards { display: grid; gap: 12px; margin-top: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.card:hover { border-color: var(--axis); }
.card:focus-within { border-color: var(--focus); }
.card.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; flex: 1; min-width: 0; }
.card-name a { color: inherit; text-decoration: none; }
/* The whole card is the tap target for "open this channel". */
.card-name a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.card-name a:focus-visible { outline: none; }
.card-name a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.chev { color: var(--ink-3); flex: none; }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--sunken); border: 1px solid var(--line);
  color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.lead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 12px; }
.lead > div:first-child { flex: 1 1 0; min-width: min-content; }
.lead-num { font-size: 30px; line-height: 1.05; font-weight: 680; letter-spacing: -0.022em; white-space: nowrap; }
.lead-num.is-word { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; white-space: normal; min-width: 9ch; }
.lead-label { margin-top: 3px; color: var(--ink-2); font-size: 14px; }
.spark-wrap { flex: none; text-align: right; }
.spark-wrap .spark { margin-left: auto; }
.spark-cap { margin-top: 2px; color: var(--ink-2); font-size: 12px; }

.facts { display: grid; gap: 4px; font-size: 15px; }
.facts strong { font-weight: 650; }
.muted { color: var(--ink-2); }
.last { color: var(--ink-3); }             /* a saved figure that is no longer current: greyed, with its time */
.small { font-size: 14px; }

.card-post { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.card-state {
  display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; font-size: 15px;
  background: var(--sunken);
}
.card-state.is-bad { background: var(--bad-wash); }
.card-state strong { font-weight: 650; }

/* Slot marks. Each state has its own SHAPE as well as its colour, and wherever there is room its word. */
.ico { flex: none; }
.ico .f-ok { fill: var(--good); }
.ico .f-bad { fill: var(--bad); }
.ico .f-warn { fill: var(--warn); }
.ico .f-run { fill: var(--series); }
.ico .f-idle { fill: var(--ink-3); }
.ico .s-idle { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.ico .s-run { fill: none; stroke: var(--series); stroke-width: 1.5; }
.ico .s-on { fill: none; stroke: var(--on-mark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico .s-on-warn { fill: none; stroke: var(--on-warn); stroke-width: 1.8; stroke-linecap: round; }
.ico .f-on-warn { fill: var(--on-warn); }
.ico .f-on { fill: var(--on-mark); }
.ico .s-ink { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; }
.slot-dots { display: flex; flex-wrap: wrap; gap: 5px; }

/* Desktop only: every lane's slots for today in one board. */
.board { display: none; }
.board-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.board-row:first-of-type { border-top: 0; }
.board-name { font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.chip .chip-word { color: var(--ink-2); }

/* ---------------------------------------------------------------------------------------------------------- */
/* Channel detail                                                                                              */
/* ---------------------------------------------------------------------------------------------------------- */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.detail-head .avatar { width: 44px; height: 44px; font-size: 18px; }
.detail-title { font-size: 26px; line-height: 1.15; font-weight: 680; letter-spacing: -0.02em; flex: 1; min-width: 0; }
.detail-conn { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
#view-channel > .card-state { margin-top: 12px; }
#view-channel > .card-state p { margin-top: 6px; }

.panel {
  margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.panel > h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.panel-sub { margin-top: 2px; color: var(--ink-2); font-size: 14px; max-width: 75ch; }
.panel-body { margin-top: 12px; }
.panel-foot { margin-top: 10px; color: var(--ink-2); font-size: 14px; max-width: 75ch; }
.panels { display: grid; gap: 0 12px; }

/* "Now": three figures, each with its two changes. */
.now { display: grid; gap: 14px; }
.now-num { font-size: 26px; line-height: 1.1; font-weight: 680; letter-spacing: -0.02em; }
.now-num.is-word { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.now-label { color: var(--ink-2); font-size: 14px; }
.now-change { margin-top: 2px; font-size: 14px; }

/* Tables of figures. Numbers line up in columns, so they use tabular figures here (and only here). */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 9px 8px; border-top: 1px solid var(--line); }
thead th { border-top: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; vertical-align: bottom; }
tbody th { font-weight: 500; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num.is-word, td.is-word { white-space: normal; color: var(--ink-2); font-size: 14px; }
.figures tbody th { width: 46%; }
.t-first { padding-left: 0; }
.t-last { padding-right: 0; }
.th-range { display: block; font-weight: 400; }
.table-scroll { overflow-x: auto; }
/* Five columns have to fit a phone: tighter cells, day names kept on one line, headings allowed to wrap. */
.days { font-size: 15px; }
.days th, .days td { padding-inline: 5px; }
.days .t-first { padding-left: 0; }
.days .t-last { padding-right: 0; }
.days tbody th { white-space: nowrap; }
.days tbody th .short-when { display: block; font-weight: 400; }
.days thead th { white-space: normal; }

/* Views per day. */
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.chart-plot { margin-top: 10px; }
.chart-svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-svg:focus-visible { outline-offset: 4px; }
html[data-input="pointer"] .chart-svg:focus-visible { outline: none; }
.grid { stroke: var(--line); stroke-width: 1; }
.base { stroke: var(--axis); stroke-width: 1; }
.tick { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-yt { fill: var(--series); }
.bar-own { fill: var(--surface); stroke: var(--series); stroke-width: 1.5; }
.bar-own.is-partial { stroke-dasharray: 3 2.5; }
/* The tap area lies under its column so the highlight shows behind it; the marks must let the pointer through. */
.bar-yt, .bar-own, .no-bar, .change-mark, .tick { pointer-events: none; }
.hit { fill: transparent; cursor: pointer; }
.hit.is-on { fill: var(--series-wash); }
.no-bar { fill: var(--axis); }
.change-mark { fill: var(--ink-2); }
.readout {
  margin-top: 8px; padding: 8px 12px; min-height: 40px; border-radius: 8px; background: var(--sunken);
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.spark .bar-own { stroke-width: 1.25; }
.is-greyed .bar-yt { fill: var(--ink-3); }
.is-greyed .bar-own { stroke: var(--ink-3); }

/* Today's slots: a run sheet. Time, shape + word, what happened. */
.runsheet { display: grid; }
.run {
  display: grid; grid-template-columns: 76px 1fr; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line);
}
.run:first-child { border-top: 0; }
.run-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.run-state { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.run-more { grid-column: 2; color: var(--ink-2); font-size: 14px; }
.run.is-next .run-time, .run.is-next .run-state { color: var(--ink-2); font-weight: 500; }
.week { display: grid; }
.week-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line);
  font-size: 15px;
}
.week-row:first-child { border-top: 0; }
.slots-split > div + div { margin-top: 14px; }

/* Recent Shorts. A table on wide screens; on a phone each row becomes a small block with its own labels. */
.shorts th button {
  background: none; border: 0; padding: 0; font-weight: 600; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
}
.shorts th[aria-sort] button { color: var(--ink); }
.sort-arrow { fill: currentColor; }
.short-title { display: flex; gap: 10px; align-items: flex-start; }
.thumb {
  flex: none; width: 40px; height: 71px; border-radius: 6px; overflow: hidden; background: var(--sunken);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.short-name { font-weight: 600; }
.short-when { color: var(--ink-2); font-size: 14px; }
.tag {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 13px;
  background: var(--warn-wash); color: var(--warn-ink);
}
.wq-row td { border-top: 0; padding-top: 0; }
.wq {
  padding: 10px 12px; border-radius: 8px; background: var(--sunken); font-size: 15px;
  display: grid; gap: 4px;
}
.wq dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; max-width: 420px; }
.wq dt { color: var(--ink-2); }
.wq dd { text-align: right; font-variant-numeric: tabular-nums; }
.more-row { margin-top: 12px; }
@media (min-width: 760px) {
  .shorts .c-title { width: 38%; }
  .shorts .c-open, .shorts thead .t-last { text-align: right; width: 1%; white-space: nowrap; }
}

@media (max-width: 759px) {
  .shorts thead { display: none; }
  .shorts.is-sorting thead { display: block; }
  .shorts.is-sorting thead tr { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .shorts.is-sorting thead th { padding: 0; }
  .shorts.is-sorting thead th.t-last { display: none; }
  .shorts tbody tr { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
  .shorts tbody tr:first-child { border-top: 0; }
  .shorts tbody td, .shorts tbody th { border: 0; padding: 0; }
  .shorts tbody .c-title, .shorts tbody .c-open { grid-column: 1 / -1; }
  .shorts tbody .c-title { margin-bottom: 6px; }
  .shorts tbody td.num { text-align: left; display: flex; justify-content: space-between; gap: 8px; white-space: normal; }
  .shorts tbody td.num::before { content: attr(data-label); color: var(--ink-2); font-size: 14px; }
  .shorts tbody tr.wq-row { display: block; padding: 0 0 12px; border-top: 0; }
  .shorts tbody .c-open { margin-top: 6px; }
}

/* Folders and failures. */
.folders { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; }
.folder-num { font-size: 26px; line-height: 1.1; font-weight: 680; letter-spacing: -0.02em; }
.folder-num.is-word { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.plain-list { display: grid; }
.plain-list > li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; display: grid; gap: 2px; }
.plain-list > li:first-child { border-top: 0; }
.fail-text { font-weight: 600; }

/* ---------------------------------------------------------------------------------------------------------- */
/* Settings                                                                                                    */
/* ---------------------------------------------------------------------------------------------------------- */
.settings { max-width: 760px; }
.settings h2 { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; margin-top: 8px; }
.form { display: grid; gap: 14px; max-width: 520px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .login-field input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.field input:focus-visible, .login-field input:focus-visible { outline-offset: 0; border-color: var(--focus); }
.hint { color: var(--ink-2); font-size: 14px; }
.form-msg { font-size: 15px; min-height: 22px; }
.form-msg.is-bad { color: var(--bad-ink); }
.form-msg.is-good { color: var(--good-ink); }
.state-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.lanes > li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.lanes > li:first-child { border-top: 0; padding-top: 0; }
.lane-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lane-name { font-weight: 700; flex: 1; min-width: 120px; }
.confirm { display: grid; gap: 10px; padding: 12px; border-radius: 8px; background: var(--bad-wash); }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list { display: grid; gap: 4px; }
.link-list a { display: inline-flex; align-items: center; min-height: 40px; }

/* ---------------------------------------------------------------------------------------------------------- */
/* Wider screens                                                                                               */
/* ---------------------------------------------------------------------------------------------------------- */
@media (min-width: 560px) {
  .now { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 700px) {
  .top, .statusline, main, .foot { padding-inline: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .today-line { font-size: 36px; max-width: 48ch; }
  .statusline { grid-template-columns: 1fr auto; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .board { display: block; }
  .panels { grid-template-columns: 1fr 1fr; }
  /* Today's run sheet beside the week before it. */
  .slots-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  .slots-split > div + div { margin-top: 0; }
  .panels > .panel-wide { grid-column: 1 / -1; }
  /* The channel opens beneath the row of cards instead of replacing it. */
  body[data-view="channel"] #view-overview { display: block; }
  body[data-view="channel"] #view-overview .board { display: none; }
  body[data-view="channel"] .back { display: none; }
  body[data-view="channel"] #view-channel { margin-top: 20px; padding-top: 12px; border-top: 2px solid var(--ink); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .card { transition: border-color 0.12s ease; }
}
@media (forced-colors: active) {
  .bar-yt { fill: CanvasText; }
  .bar-own { fill: Canvas; stroke: CanvasText; }
  .mark { stroke: CanvasText; }
}

/* ---------------------------------------------------------------------------------------------------------- */
/* Sign-in page (login.html) and the plain pages (privacy.html, the service's small message pages)             */
/* ---------------------------------------------------------------------------------------------------------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 16px; }
.login-brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
.login-main { flex: 1; display: grid; place-items: center; padding: 24px 0; }
.login-card {
  width: 100%; max-width: 400px; padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
}
.login-title { font-size: 26px; line-height: 1.15; font-weight: 680; letter-spacing: -0.02em; }
.login-sub { margin-top: 4px; color: var(--ink-2); }
.login-card form { display: grid; gap: 14px; margin-top: 20px; }
.login-field { display: grid; gap: 6px; }
.login-field label { font-weight: 600; font-size: 15px; }
.login-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.login-caps { color: var(--warn-ink); font-size: 14px; }
.login-control { position: relative; }
.login-control input { padding-right: 72px; }
.login-eye {
  position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 60px; padding: 0 10px;
  border: 0; border-radius: 6px; background: none; color: var(--accent); font-weight: 600; cursor: pointer;
}
.login-error { color: var(--bad-ink); font-size: 15px; min-height: 22px; }
.login-error:empty { min-height: 0; }
.login-submit {
  min-height: 48px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; cursor: pointer;
}
.login-submit.busy, .login-submit:disabled { opacity: 0.7; cursor: default; }
.login-foot { color: var(--ink-2); font-size: 14px; text-align: center; display: grid; gap: 6px; }
.login-foot a { color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .login-card.shake { animation: shake 0.28s ease; }
}
@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.plain-page { padding: 24px 16px 48px; }
.plain { max-width: 68ch; margin-inline: auto; display: grid; gap: 12px; }
.plain h1 { font-size: 30px; line-height: 1.15; font-weight: 680; letter-spacing: -0.02em; }
.plain h2 { font-size: 19px; font-weight: 700; margin-top: 12px; }
.plain ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; }
