/* Gwen dashboard — HiveToons design system (docs/design/design-system.html),
   adapted for English LTR.
   Flat fills, one neutral shadow, hover changes colour only, dark only. */

@font-face { font-family: Poppins; src: url('/static/fonts/Poppins-Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url('/static/fonts/Poppins-SemiBold.ttf') format('truetype'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url('/static/fonts/Poppins-Bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  --ht-bg-1: #111113;
  --ht-card-1: #1d1d20;
  --ht-card-hover: #29292d;
  --ht-stroke: #303034;
  --ht-stroke-hi: #424248;
  --ht-red-1: #2754bb;
  --ht-red-hover: #1f4398;
  --ht-amber: #f5b544;
  --ht-ok-text: #4ade80;
  --ht-bad-text: #f87171;
  --ht-heading: #ffffff;
  --ht-fg: #fafafa;
  --ht-soft: #d4d4d4;
  --ht-muted: #aaaab2;
  --ht-ring: #47536b;
  --ht-shadow: 0 16px 38px rgba(0, 0, 0, .26);
  --r-sm: 8px; --r-md: 11px; --r-lg: 14px; --r-xl: 18px;
  --font: Poppins, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ht-bg-1);
  color: var(--ht-fg);
  font: 400 15px/1.65 var(--font);
  letter-spacing: 0;
}
a { color: var(--ht-fg); text-decoration-color: var(--ht-stroke-hi); text-underline-offset: 3px; }
a:hover { color: var(--ht-heading); text-decoration-color: var(--ht-red-1); }
:focus-visible { outline: 2px solid var(--ht-ring); outline-offset: 2px; border-radius: var(--r-sm); }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--ht-card-hover); border: 1px solid var(--ht-stroke); border-radius: 6px; padding: 0 .35em; }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .92em; }
.muted { color: var(--ht-muted); }
small { color: var(--ht-muted); font-weight: 400; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, calc((100vw - 1240px) / 2));
  background: var(--ht-bg-1);
  border-bottom: 1px solid var(--ht-stroke);
  box-shadow: none;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: var(--ht-heading); }
.brand img { display: block; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
  white-space: nowrap; text-decoration: none; color: var(--ht-soft);
  padding: 6px 12px; border-radius: 999px; font-size: 14px;
}
.nav a:hover { background: var(--ht-card-hover); color: var(--ht-heading); }
.nav a[aria-current="page"] { background: var(--ht-red-1); color: #fff; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.who form { margin: 0; }
.who .name { color: var(--ht-soft); }
.bot { display: inline-flex; align-items: center; gap: 6px; color: var(--ht-muted); }
.bot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ht-muted); }
.bot.ok::before { background: #16a34a; }
.bot.down { color: var(--ht-amber); }
.bot.down::before { background: var(--ht-amber); }

/* ---- layout ---- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; }
.title { font-size: 26px; font-weight: 700; color: var(--ht-heading); margin: 8px 0 20px; line-height: 1.3; }
.title small { font-size: 15px; margin-inline-start: 8px; }
h2 { font-size: 17px; font-weight: 600; color: var(--ht-heading); margin: 0 0 14px; }
h2 small { font-size: 13px; margin-inline-start: 6px; }
h3 { font-size: 15px; font-weight: 600; margin: 20px 0 10px; }
.panel {
  background: var(--ht-card-1); border: 1px solid var(--ht-stroke);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px;
}
.def { color: var(--ht-muted); font-size: 13px; margin: 14px 0 0; max-width: 90ch; }
.notice {
  border: 1px solid var(--ht-stroke-hi); border-radius: var(--r-md);
  padding: 10px 14px; color: var(--ht-soft); background: var(--ht-card-1);
}
.notice.bad { border-color: #b73838; color: var(--ht-bad-text); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.empty { text-align: center; padding: 48px 20px; }

/* ---- filters ---- */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.filters label { display: grid; gap: 4px; font-size: 12px; color: var(--ht-muted); }
select, input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ht-fg);
  background: var(--ht-card-1); border: 1px solid var(--ht-stroke-hi);
  border-radius: var(--r-md); padding: 7px 12px; min-width: 150px;
}
select:hover, input[type="search"]:hover { background: var(--ht-card-hover); }

/* ---- buttons & badges ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--ht-red-1); border: 1px solid var(--ht-red-1);
  border-radius: 999px; padding: 7px 18px;
}
.btn:hover { background: var(--ht-red-hover); border-color: var(--ht-red-hover); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--ht-stroke-hi); color: var(--ht-soft); }
.btn.ghost:hover { background: var(--ht-card-hover); color: var(--ht-heading); }
.btn.small { padding: 4px 12px; font-size: 13px; }
.badge {
  display: inline-block; border-radius: 999px; padding: 0 9px; font-size: 12px; line-height: 20px;
  border: 1px solid var(--ht-stroke-hi); color: var(--ht-soft); font-family: var(--font);
}
.badge.warn { border-color: var(--ht-amber); color: var(--ht-amber); }
.badge.bad { border-color: #b73838; color: var(--ht-bad-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--ht-stroke-hi); border-radius: 999px; padding: 4px 14px; }
.chip b { font-weight: 600; color: var(--ht-soft); }

/* ---- stat tiles ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  display: grid; gap: 2px; align-content: start;
  background: var(--ht-card-1); border: 1px solid var(--ht-stroke);
  border-radius: var(--r-lg); padding: 16px 18px;
}
.stat .k { font-size: 13px; color: var(--ht-muted); }
.stat .v {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 32px; font-weight: 600; color: var(--ht-heading); line-height: 1.2; letter-spacing: -.02em;
}
.stat .v.small { font-family: var(--font); font-size: 22px; letter-spacing: 0; }
.stat .sub { font-size: 12px; color: var(--ht-muted); }
.stat.accent { border-color: #4b6395; }
.stat.warn { border-color: var(--ht-amber); }
.stat.warn .sub, .stat.warn .k { color: var(--ht-amber); }

/* ---- tables ---- */
table.cards { width: 100%; border-collapse: collapse; font-size: 14px; }
.cards th {
  text-align: start; font-weight: 500; font-size: 12px; color: var(--ht-muted);
  padding: 8px 10px; border-bottom: 1px solid var(--ht-stroke-hi); white-space: nowrap;
}
.cards td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--ht-stroke); vertical-align: top; }
.cards tbody tr:hover { background: var(--ht-card-hover); }
.cards tbody tr:last-child td { border-bottom: 0; }
.neg { color: var(--ht-bad-text); }

/* stage chips in chapter lists: status is written out, colour only helps */
.steps { display: flex; flex-wrap: wrap; gap: 4px; }
.step {
  display: inline-flex; gap: 4px; font-size: 12px; white-space: nowrap;
  border: 1px solid var(--ht-stroke-hi); border-radius: 999px; padding: 0 9px; color: var(--ht-soft);
}
.step i { font-style: normal; color: var(--ht-muted); }
.step.s-done { border-color: #16a34a; }
.step.s-done i { color: var(--ht-ok-text); }
.step.s-claimed { border-color: var(--ht-red-1); }
.step.s-available { border-color: var(--ht-soft); }
.step.s-skipped, .step.s-waiting { opacity: .65; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

/* ---- charts: red primary, grey scaffolding ---- */
.chart svg { display: block; width: 100%; height: 160px; border-bottom: 1px solid var(--ht-stroke-hi); }
.chart rect { fill: var(--ht-red-1); }
.chart rect:hover { fill: var(--ht-red-hover); }
progress {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 120px; height: 8px;
  border: 0; border-radius: 999px; background: var(--ht-stroke); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--ht-stroke); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--ht-red-1); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ht-red-1); border-radius: 999px; }

/* ---- login ---- */
.login {
  max-width: 440px; margin: 10vh auto 0; text-align: center;
  background: var(--ht-card-1); border: 1px solid var(--ht-stroke); border-radius: var(--r-xl);
  padding: 36px 28px;
}
.login h1 { font-size: 24px; color: var(--ht-heading); margin: 14px 0 8px; }
.login p { color: var(--ht-soft); }
.login form { margin-top: 18px; }
.login .btn { padding: 10px 36px; font-size: 16px; }

/* ---- phones: tables become cards ---- */
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .who { margin-inline-start: auto; }
  .who .name { display: none; }
  .title { font-size: 21px; }
  .panel { padding: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 26px; }
  .filters label, .filters select, .filters input { width: 100%; min-width: 0; }
  .filters label { flex: 1 1 140px; }
  table.cards thead { display: none; }
  table.cards, .cards tbody, .cards tr, .cards td { display: block; width: 100%; }
  .cards tr {
    border: 1px solid var(--ht-stroke); border-radius: var(--r-md);
    padding: 6px 12px; margin-bottom: 10px; background: var(--ht-bg-1);
  }
  .cards td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; text-align: end; }
  .cards td::before { content: attr(data-label); color: var(--ht-muted); font-size: 12px; text-align: start; flex: none; }
  .cards tbody tr:last-child td { border-bottom: 1px solid var(--ht-stroke); }
  .cards td:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel, .stat { animation: rise .28s ease-out both; }
  .stat:nth-child(2) { animation-delay: .03s; } .stat:nth-child(3) { animation-delay: .06s; }
  .stat:nth-child(4) { animation-delay: .09s; } .stat:nth-child(5) { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
}

/* Dashboard v2: mobile-first workspace shell. The old horizontal link strip
   is intentionally replaced with four persistent destinations. */
.app-shell { min-height: 100vh; min-width: 0; }
.top { gap: 1rem; padding: .75rem 1rem; }
.brand { flex: none; line-height: 1.15; }
.brand span { display: grid; gap: .1rem; }
.brand small { font-size: .56rem; letter-spacing: .2em; color: var(--ht-muted); }
.top-context { color: var(--ht-muted); font-size: .85rem; margin-inline-start: auto; }
.who { flex: none; margin-inline-start: 0; }
.who .name, .who .bot { display: none; }
.sidebar { display: none; }
.page { width: min(100%, 1240px); min-width: 0; padding: 1.25rem 1rem calc(7rem + env(safe-area-inset-bottom)); }
.page-intro { color: var(--ht-muted); margin: -.5rem 0 1.5rem; max-width: 70ch; }
.mobile-nav {
  position: fixed; inset: auto 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  background: #121212; border-top: 1px solid var(--ht-stroke-hi);
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 28px rgba(0,0,0,.28);
}
.mobile-nav > a, .mobile-more > summary {
  display: flex; justify-content: center; align-items: center; min-height: 3rem;
  color: var(--ht-soft); text-decoration: none; font-size: .76rem;
  border-radius: .65rem; text-align: center; cursor: pointer;
}
.mobile-nav > a[aria-current="page"] { color: #fff; background: #842222; font-weight: 600; }
.mobile-more { position: relative; }
.mobile-more > summary { list-style: none; }
.mobile-more > summary::-webkit-details-marker { display: none; }
.mobile-more[open] > summary { background: var(--ht-card-hover); color: #fff; }
.mobile-more-list {
  position: absolute; bottom: calc(100% + .7rem); right: 0;
  width: min(19rem, calc(100vw - 1rem)); max-height: min(68vh, 32rem); overflow-y: auto;
  padding: .5rem; background: #1b1b1b; border: 1px solid var(--ht-stroke-hi);
  border-radius: .9rem; box-shadow: var(--ht-shadow);
}
.mobile-more-list a, .mobile-more-list button {
  display: flex; align-items: center; width: 100%; min-height: 2.75rem;
  padding: .55rem .75rem; color: var(--ht-fg); background: transparent;
  border: 0; border-radius: .55rem; text-decoration: none; font: inherit; text-align: start;
}
.mobile-more-list a:hover, .mobile-more-list button:hover { background: var(--ht-card-hover); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.section-heading a { color: var(--ht-soft); font-size: .84rem; white-space: nowrap; }
.two-col { display: grid; gap: 1rem; }
.item-list { display: grid; }
.work-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--ht-stroke);
}
.work-item:last-child { border-bottom: 0; }
.work-item strong { color: var(--ht-heading); font-size: .95rem; }
.work-item .muted { font-size: .82rem; }
.linked-item { color: inherit; text-decoration: none; }
.linked-item:hover { background: var(--ht-card-hover); }
.week-grid { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.week-day { min-width: 0; min-height: 8rem; background: var(--ht-card-1); border: 1px solid var(--ht-stroke); border-radius: .85rem; padding: .85rem; }
.week-day.empty-day { background: #171717; }
.week-day-title { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; font-size: .83rem; }
.week-day-title span { color: var(--ht-muted); }
.schedule-card { display: grid; gap: .15rem; background: #193525; border: 1px solid #32724c; border-radius: .65rem; padding: .7rem; margin-bottom: .5rem; overflow-wrap: anywhere; }
.schedule-card strong { font-size: .82rem; line-height: 1.3; }
.schedule-card span { color: #c9efd7; font-size: .72rem; }
.schedule-card time { color: #b1f5cc; font: 600 .83rem var(--mono); }
.profile-panel { display: flex; align-items: center; gap: 1.25rem; }
.profile-avatar { display: grid; place-items: center; flex: none; width: 4rem; height: 4rem; border: 1px solid #973434; border-radius: 1rem; background: #3a1515; font-size: 1.7rem; font-weight: 700; }
.detail-grid { display: grid; gap: .75rem; margin: 0; }
.detail-grid div { padding: .7rem 0; border-bottom: 1px solid var(--ht-stroke); }
.detail-grid dt { color: var(--ht-muted); font-size: .78rem; }
.detail-grid dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.series-grid { display: grid; gap: .9rem; margin-bottom: 1.5rem; }
.series-card { display: grid; grid-template-columns: 5.5rem minmax(0,1fr); gap: 1rem; min-width: 0; overflow: hidden; background: var(--ht-card-1); border: 1px solid var(--ht-stroke); border-radius: .9rem; padding: .75rem; }
.series-cover { display: grid; place-items: center; min-height: 7.5rem; border-radius: .6rem; background: #282020; overflow: hidden; }
.series-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.series-cover span { font-size: 2rem; color: #a75c5c; font-weight: 700; }
.series-body { min-width: 0; }
.series-body h3 { margin: 0; overflow-wrap: anywhere; }
.series-body p { margin: .2rem 0 .8rem; font-size: .78rem; }
.series-metrics { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-bottom: .75rem; color: var(--ht-muted); font-size: .77rem; }
.series-metrics b { color: var(--ht-heading); font-family: var(--mono); }
.scroll-grid { overflow-x: auto; overscroll-behavior-inline: contain; }
.week-table { border-collapse: separate; border-spacing: .25rem; min-width: 48rem; width: 100%; font-size: .8rem; }
.week-table th, .week-table td { padding: .7rem .5rem; border-radius: .45rem; text-align: center; white-space: nowrap; }
.week-table th:first-child { text-align: start; position: sticky; left: 0; background: var(--ht-card-1); z-index: 1; }
.week-table td.has-work { color: #d2fbe0; background: #1a422c; }
.week-table td.no-work { color: var(--ht-muted); background: #202020; }
.member-load-list { display: grid; gap: .4rem; }
.member-load { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; padding: .55rem .25rem; border-bottom: 1px solid var(--ht-stroke); font-size: .84rem; }
.member-load span { color: var(--ht-muted); }
.chart-panel { background: #1a1b1d; }
.chart-panel .section-heading p { margin: .2rem 0 0; font-size: .78rem; }
.chart-panel .btn.selected { background: #24426e; border-color: #4f8ef8; color: #fff; }
.chart-visual { width: 100%; overflow: hidden; margin-top: .7rem; }
.chart-visual svg { display: block; width: 100%; height: clamp(11rem, 25vw, 18rem); }
.chart-visual .gridline { fill: none; stroke: #333a43; stroke-width: .7; stroke-dasharray: 3 5; }
.chart-visual .area-fill { fill: rgba(72,137,242,.16); }
.chart-visual .data-line { fill: none; stroke: #4f8ef8; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-visual .data-point { fill: #4f8ef8; stroke: #d9e7ff; stroke-width: .8; }
.chart-visual .data-bar { fill: #4f8ef8; }
.chart-visual .data-bar:hover, .chart-visual .data-point:hover { fill: #9fc0ff; }
.chart-axis { display: flex; justify-content: space-between; color: var(--ht-muted); font: .7rem var(--mono); }
.chapter-grid { display: grid; gap: .65rem; }
.chapter-tile { display: grid; grid-template-columns: 3.5rem minmax(0,1fr); gap: .8rem; min-width: 0; padding: .65rem; border: 1px solid var(--ht-stroke); border-radius: .7rem; text-decoration: none; }
.chapter-tile:hover { background: var(--ht-card-hover); }
.chapter-tile strong { overflow-wrap: anywhere; }
.chapter-tile p { margin: .15rem 0 .4rem; font-size: .75rem; }
.chapter-thumb { display: grid; place-items: center; height: 5rem; overflow: hidden; background: #281818; border-radius: .4rem; }
.chapter-thumb img, .tiny-cover img { width: 100%; height: 100%; object-fit: cover; }
.new-series-list { display: grid; gap: .6rem; }
.new-series-item { display: flex; align-items: center; gap: .65rem; }
.new-series-item span { display: grid; }
.new-series-item small { font-size: .72rem; }
.tiny-cover { display: grid; place-items: center; flex: none; width: 2.4rem; height: 3.1rem; overflow: hidden; background: #281818; border-radius: .3rem; }
.filters select, .filters .btn { min-height: 2.75rem; }
.btn { justify-content: center; min-height: 2.75rem; }
.btn.small { min-height: 2.5rem; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { min-width: 0; padding: .9rem; }
.stat .v { font-size: clamp(1.35rem, 5vw, 2rem); overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .top { padding: .85rem 1.5rem; }
  .who .bot, .who .name { display: inline-flex; }
  .page { padding: 1.75rem 1.5rem 7rem; }
  .two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .week-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(auto-fit, minmax(11rem,1fr)); }
  .series-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (min-width: 1024px) {
  .app-shell { display: grid; grid-template-columns: 14rem minmax(0,1fr); grid-template-rows: auto 1fr; }
  .top { grid-column: 1 / -1; padding: .9rem 1.6rem; }
  .top-context { margin-inline-start: 0; border-inline-start: 1px solid var(--ht-stroke-hi); padding-inline-start: 1rem; }
  .who { margin-inline-start: auto; }
  .sidebar {
    display: flex; flex-direction: column; gap: .2rem; min-width: 0;
    position: sticky; top: 4rem; align-self: start; height: calc(100vh - 4rem);
    padding: 1.35rem .8rem; border-inline-end: 1px solid var(--ht-stroke); overflow-y: auto;
  }
  .sidebar a, .sidebar-signout { display: flex; align-items: center; min-height: 2.6rem; padding: .45rem .8rem; border: 0; border-radius: .55rem; background: transparent; color: var(--ht-soft); text-decoration: none; font: inherit; font-size: .87rem; text-align: start; }
  .sidebar a:hover, .sidebar-signout:hover { background: var(--ht-card-hover); color: #fff; }
  .sidebar a[aria-current="page"] { background: #3d1717; color: #fff; border-inline-start: .18rem solid var(--ht-red-1); }
  .sidebar .nav-label { padding: .6rem .8rem .2rem; color: var(--ht-muted); font-size: .62rem; letter-spacing: .17em; font-weight: 700; }
  .sidebar form { margin-top: auto; }
  .sidebar-signout { cursor: pointer; width: 100%; }
  .mobile-nav { display: none; }
  .page { margin: 0 auto; padding: 2rem 2rem 4rem; }
  .week-grid { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .week-day { padding: .65rem; }
  .week-day-title { display: grid; }
}

/* Operational dashboard palette and data-dense library, based on the
   provided dark reference. State labels remain readable without color. */
.app-shell .top { background: #1b1b1e; }
.app-shell .sidebar { background: #1b1b1e; }
.app-shell .sidebar a[aria-current="page"] { background: #293647; border-inline-start-color: #76a6fa; }
.app-shell .mobile-nav { background: #1b1b1e; }
.app-shell .mobile-nav > a[aria-current="page"] { background: #2754bb; }
.app-shell .mobile-more-list { background: #222226; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin: .2rem 0 1.4rem; }
.page-heading .title { margin: .1rem 0 .35rem; }
.page-heading .page-intro { margin: 0; }
.eyebrow { margin: 0; color: #7ea6f6; font-size: .68rem; font-weight: 700; letter-spacing: .14em; }
.library-count { padding: .45rem .85rem; border: 1px solid var(--ht-stroke-hi); border-radius: 999px; color: var(--ht-soft); font-size: .78rem; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0; }
.library-toolbar .actions, .chart-switch { margin: 0; }
.chart-switch svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chart-switch .btn { display: inline-flex; align-items: center; gap: .4rem; }
.chart-dates { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; padding: .8rem 0 1rem; border-block: 1px solid var(--ht-stroke); margin: .8rem 0; }
.chart-dates label { display: grid; gap: .15rem; color: var(--ht-muted); font-size: .72rem; }
.chart-dates input[type="date"] { min-height: 2.5rem; padding: .35rem .6rem; color: var(--ht-fg); background: #252529; border: 1px solid var(--ht-stroke-hi); border-radius: .55rem; font: inherit; font-size: .85rem; color-scheme: dark; }
.chart-dates .btn { min-height: 2.5rem; }
.chart-panel { background: #1c1c20; }
.chart-panel .btn.selected { background: #2754bb; border-color: #4e7fe6; }
.library-panel { padding: 0; overflow: hidden; }
.library-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.library-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .78rem; }
.library-table th { text-align: start; padding: .85rem .75rem; background: #252529; color: #c5c5cd; font-size: .68rem; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.library-table td { padding: .75rem; border-top: 1px solid var(--ht-stroke); vertical-align: middle; }
.library-table tbody tr:hover { background: #26262b; }
.library-title { display: block; min-width: 10rem; font-weight: 600; text-decoration: none; }
.library-table small { display: block; font-family: var(--mono); font-size: .67rem; }
.library-cover { display: grid; place-items: center; width: 3rem; height: 4rem; overflow: hidden; background: #29292d; border-radius: .4rem; color: #8ca5d9; font-weight: 700; }
.library-cover img { width: 100%; height: 100%; object-fit: cover; }
.series-state.Active { border-color: #237e62; color: #7cdbb6; }
.series-state.Paused { border-color: #aa7933; color: #f0c978; }
.series-state.Ended { border-color: #55555e; color: #b8b8bf; }
.week-table td.heat-1 { background: #c7f2d8; color: #163927; }
.week-table td.heat-2 { background: #90deb0; color: #123b26; }
.week-table td.heat-3 { background: #58bd83; color: #102e1d; }
.week-table td.heat-4 { background: #2b8d5d; color: #fff; }
.week-table td.heat-5 { background: #176540; color: #fff; }
.heat-legend { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 0; }
.heat-legend span { min-width: 2.3rem; padding: .2rem .4rem; border-radius: .35rem; text-align: center; font-size: .7rem; }
.heat-legend .no-work { background: #29292d; color: var(--ht-muted); }
.heat-legend .heat-1 { background: #c7f2d8; color: #163927; }
.heat-legend .heat-2 { background: #90deb0; color: #123b26; }
.heat-legend .heat-3 { background: #58bd83; color: #102e1d; }
.heat-legend .heat-4 { background: #2b8d5d; color: #fff; }
.heat-legend .heat-5 { background: #176540; color: #fff; }
.heat-legend small { margin-inline-start: .5rem; }
.series-profile { display: grid; grid-template-columns: minmax(0,7rem) minmax(0,1fr); gap: 1.15rem; align-items: start; }
.series-profile-cover { display: grid; place-items: center; min-height: 9rem; overflow: hidden; border-radius: .7rem; background: #29292d; color: #8ca5d9; font-size: 2rem; font-weight: 700; }
.series-profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.series-profile-body { min-width: 0; }
.series-profile-body .title { margin: .25rem 0 .65rem; overflow-wrap: anywhere; }
.series-profile-body .actions { margin-top: 1rem; }
.series-chapters-heading { padding: 1.2rem 1.3rem .25rem; }
.series-chapters-heading h2 { margin: .25rem 0 0; }
@media (max-width: 520px) { .series-profile { grid-template-columns: 4.5rem minmax(0,1fr); } .series-profile-cover { min-height: 6rem; } }
@media (max-width: 520px) {
  .chart-dates label { flex: 1 1 8rem; }
  .chart-dates input[type="date"] { width: 100%; min-width: 0; }
  .chart-switch .btn span { display: none; }
  .page-heading { align-items: stretch; }
}
