:root {
  /* "This Is How You Lose the Time War" — warm cream paper, red vs blue */
  --bg: #faf6ed;       /* warm ivory page */
  --bg-2: #f2ecdb;     /* card surface */
  --bg-3: #e8dfc7;     /* depressed / input surface */
  --border: #d4cdb7;   /* warm tan border */
  --text: #1d2533;     /* deep navy ink */
  --muted: #7a715f;    /* warm muted text */
  --radius: 8px;

  /* Semantic genre palette — the heart of the brand */
  --sf: #c6444f;         /* scarlet — Red faction */
  --fantasy: #2c5d96;    /* cobalt — Blue faction */
  --blend: #7a4486;      /* plum where they meet */
  --horror: #3a3e4a;     /* charcoal */

  /* Status palette */
  --winner: #b89548;      /* warm gold */
  --nominee: #7a92b5;     /* dusty blue */
  --read: #4a8b6f;        /* forest green */
  --queued: #c47a3d;      /* terracotta */

  /* Per-reader accents — Tom BLUE blue, Nika RED red */
  --accent:   #1d4ed8;    /* Tom — saturated royal blue */
  --accent-2: #dc2626;    /* Nika — saturated red */
  --accent-3: #b6783c;    /* Westdac — burnt sienna */
  --accent-4: #4a7a5a;    /* Colton — deep moss */
  --accent-5: #7a4486;    /* Schupp — plum */
}

* { box-sizing: border-box; }
:root { color-scheme: light; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
::selection { background: rgba(198, 68, 79, 0.18); color: var(--text); }

a { color: var(--fantasy); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar { flex-wrap: wrap; }
@media (max-width: 900px) {
  .topbar { padding: 10px 14px; }
  .nav { flex-wrap: wrap; gap: 8px 14px; row-gap: 6px; font-size: 13px; }
  .nav a { font-size: 13px; }
  .brand-title { font-size: 15px; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  .brand { min-width: 0; flex: 0 1 auto; }
  .brand-name {
    max-width: 160px;
    overflow: hidden;
  }
  .brand-title { font-size: 14px; }
  .brand-sub { display: none; }
  .nav { width: 100%; justify-content: flex-start; gap: 6px 12px; }
  .nav-hot { padding: 1px 7px !important; font-size: 11px !important; }
  .nav-hot::before { display: none !important; }
  .auth-slot { margin-left: 0; }
  .auth-signin, .auth-handle, .auth-signout, .auth-admin {
    padding: 4px 10px !important;
    font-size: 12px !important;
  }
}
@media (max-width: 420px) {
  .brand-title { font-size: 13px; }
  .brand-mark svg { height: 20px; }
  .nav { gap: 4px 10px; font-size: 12px; }
  .nav a { font-size: 12px; }
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-flex; align-items: center; line-height: 0; }
.brand-mark svg { display: block; height: 24px; width: auto; }
.brand-name {
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
}
.brand-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.2;
}
.brand-paren {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.nav { display: flex; gap: 18px; align-items: center; }
.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  text-decoration: none;
}
.nav-divider {
  height: 16px;
  width: 1px;
  background: var(--border);
}

/* Auth pill (Sign in / @handle + Sign out) — sits at the end of the nav */
.auth-slot { display: inline-flex; gap: 8px; align-items: center; margin-left: 6px; }
.auth-signin {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-signin:hover { filter: brightness(1.08); }
.auth-handle {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
}
.auth-signout {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.auth-signout:hover { color: var(--text); border-color: var(--accent); }

/* Sign-in modal */
.mr-signin-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  max-width: 420px;
  width: 90vw;
  padding: 0;
}
.mr-signin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}
.mr-signin-form { padding: 24px 26px 22px; }
.mr-signin-form h2 { margin: 0 0 6px; font-size: 20px; }
.mr-signin-form p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.mr-signin-label { display: block; margin-bottom: 14px; }
.mr-signin-label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mr-signin-label input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.mr-signin-label input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.mr-signin-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.mr-btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.mr-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.mr-btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}
.mr-btn-danger {
  background: transparent;
  color: var(--sf);
  border: 1px solid var(--sf);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mr-btn-danger:hover { background: var(--sf); color: #fff; }
.settings-danger { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 12px; }
.mr-signin-status { margin-top: 14px; font-size: 13px; color: var(--muted); min-height: 18px; }
.mr-signin-status.success { color: var(--read); }
.mr-signin-status.error { color: var(--sf); }
.mr-signin-phase[hidden] { display: none; }
.mr-signin-blurb-code { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.mr-signin-blurb-code strong { color: var(--text); }
.mr-signin-resend {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.mr-signin-resend button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
#mr-signin-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.3em;
  font-size: 18px;
}

/* Mark-as-read controls on book detail */
.user-status {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.user-status-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.user-status-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.user-status-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.user-status-btn:hover { border-color: var(--accent); }
.user-status-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.user-status-clear { color: var(--muted); }
.user-status-clear:hover { color: var(--sf); border-color: var(--sf); }
.user-status-msg { margin-top: 8px; font-size: 12px; min-height: 16px; color: var(--muted); }
.user-status-msg.success { color: var(--read); }
.user-status-msg.error { color: var(--sf); }
.user-status-signin {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.user-status-signin:hover { filter: brightness(1.08); }
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px !important;
}
.profile-link:hover { border-color: var(--accent); }
.profile-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.profile-dot.gr { background: var(--accent-2); }
.profile-dot.sg { background: var(--accent); }
.profile-dot.sg-nika { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); }

/* About page profile inline links */
.about-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  margin-right: 4px;
}
.about-profile-link:hover { border-color: var(--accent); text-decoration: none; }
.about-profile-link .profile-dot { width: 10px; height: 10px; }

/* Inactive reader filter fieldsets are hidden via JS using `display: none`
 * (set in wireFilters based on the ?reader= URL param). */

/* Completionist hero — pitch at very top of Progress */
.completionist-intro {
  margin: 12px 0 24px;
  padding: 26px 28px 24px;
  background: linear-gradient(135deg, rgba(198, 68, 79, 0.07), rgba(44, 93, 150, 0.07));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.completionist-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px;
  background: linear-gradient(90deg, var(--sf), var(--blend), var(--fantasy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.completionist-intro p {
  margin: 0 auto;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

/* Radar fingerprint shown above the awards intro on Progress */
.radar-hero {
  margin: 0 0 24px;
  padding: 14px 16px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  max-width: 520px;
}
.era-radar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  font-size: 13px;
  margin: 4px 0 0;
  text-align: center;
}
.era-radar-stats > span { display: inline-block; }
.radar-hero h2 { margin-top: 0; }
.radar-hero .radar-wrap { gap: 4px; margin-top: 4px; }
.radar-hero .radar-svg { max-width: 420px; }
.radar-hero .radar-scale-note { margin-top: 2px; }
@media (max-width: 720px) {
  .radar-hero { max-width: 100%; }
}

/* Genre tab two-up: spider chart on the left, bar list on the right. */
.genre-twoup {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 28px;
}
.genre-twoup .genre-twoup-chart.radar-hero {
  max-width: 100%;
  margin: 0;
  padding: 6px 8px 6px;
}
.genre-twoup .genre-twoup-chart.radar-hero .radar-svg {
  max-width: 100%;
}
.genre-twoup .genre-twoup-chart.radar-hero h2 {
  font-size: 15px;
  margin-bottom: 2px;
}
.genre-twoup .genre-twoup-chart.radar-hero .radar-wrap {
  gap: 2px;
  margin-top: 2px;
}
.genre-twoup-bars { min-width: 0; }
.genre-twoup-bars .genre-bars { margin-top: 0; }
@media (max-width: 880px) {
  .genre-twoup { grid-template-columns: 1fr; gap: 14px; }
}

/* Audience pill (Fans / Writers) — used inside featured banners */
.awards-tag {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}
.awards-tag-fans {
  background: rgba(198, 68, 79, 0.14);
  color: var(--sf);
  border: 1px solid rgba(198, 68, 79, 0.4);
}
.awards-tag-writers {
  background: rgba(44, 93, 150, 0.14);
  color: var(--fantasy);
  border: 1px solid rgba(44, 93, 150, 0.4);
}

/* Featured banners on Home — full-width per award, with finalist covers */
.featured-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 32px;
}

/* Hugo/Nebula 2026 content embedded inline on the Home page. Offset the
   scroll target below the sticky topbar so the section h1 isn't hidden. */
.awards-2026-embed { scroll-margin-top: 80px; margin-top: 24px; }

/* Full-card variant: each award is a complete self-contained card with
   history, ceremony, finalists — single column so each spans full width. */
.featured-banners-full {
  grid-template-columns: 1fr;
  gap: 18px;
}
.featured-full {
  padding: 22px 24px 20px;
  gap: 12px;
}
.featured-since {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.featured-description {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 4px 0 6px;
  position: relative;
  z-index: 2;
}
.featured-description a { color: var(--accent); }
.featured-ceremony {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.featured-ceremony-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-3);
  color: var(--muted);
}
.featured-hugo .featured-ceremony-label { color: var(--sf); background: rgba(198, 68, 79, 0.10); }
.featured-nebula .featured-ceremony-label { color: var(--fantasy); background: rgba(44, 93, 150, 0.10); }
.featured-full .featured-date,
.featured-full .featured-loc { font-weight: 600; color: var(--text); }
.featured-finalists-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 6px;
}
.awards-tracks-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
  padding: 0 16px;
}
.awards-tracks-note strong { color: var(--text); }
.featured-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  animation: featured-rise 0.5s cubic-bezier(.2,.7,.2,1) both;
}
.featured-banner-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
}
.featured-headline-link {
  color: var(--text);
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.featured-headline-link:hover { text-decoration: none; }
.featured-cover-strip,
.featured-cta,
.featured-category-label,
.featured-how-to-vote { position: relative; z-index: 2; }
.featured-cta { text-decoration: none; }
/* Category label above each finalists row */
.featured-category-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 6px;
}
/* How to vote collapsible */
.featured-how-to-vote {
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 14px;
}
.featured-banner.featured-hugo .featured-how-to-vote { border-top-color: rgba(0,0,0,0.08); }
.featured-htv-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.featured-htv-body {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.featured-htv-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.featured-htv-steps strong { color: var(--text); }
.featured-htv-steps a { color: var(--accent); }
.featured-htv-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.featured-htv-cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--sf);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.featured-htv-cta-primary:hover { opacity: 0.85; }
.featured-htv-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s;
}
.featured-htv-cta-secondary:hover { border-color: var(--accent); }
.featured-banner:nth-child(2) { animation-delay: 0.08s; }
@keyframes featured-rise {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.featured-banner::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 5px;
}
.featured-hugo::before { background: var(--sf); }
.featured-nebula::before { background: var(--fantasy); }
.featured-banner:hover {
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.featured-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.featured-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
}
.featured-tag-hugo { color: var(--sf); background: rgba(198, 68, 79, 0.12); border: 1px solid rgba(198, 68, 79, 0.35); }
.featured-tag-nebula { color: var(--fantasy); background: rgba(44, 93, 150, 0.12); border: 1px solid rgba(44, 93, 150, 0.35); }
.featured-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.featured-headline {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
}
.featured-sub { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.featured-cover-strip {
  display: flex;
  gap: 10px;
  overflow: hidden;
  height: 184px;
  margin: 10px 0 6px;
  mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
}
.featured-cover {
  flex: 0 0 auto;
  width: 124px;
  height: 184px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: block;
  transition: transform 0.15s;
}
.featured-cover:hover { transform: scale(1.06); border-color: var(--accent); }
.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--bg-3);
}
.featured-cover-stub { display: flex; align-items: center; justify-content: center; padding: 4px; }
.featured-cover-fallback {
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  font-size: 9px;
  line-height: 1.15;
  color: var(--text);
  padding: 4px 2px;
}
.featured-cover-fallback .fc-title { font-weight: 700; margin-bottom: 4px; max-height: 50px; overflow: hidden; }
.featured-cover-fallback .fc-author { color: var(--muted); font-size: 8px; }
.featured-cta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.featured-arrow { transition: transform 0.18s; display: inline-block; }
.featured-banner:hover .featured-arrow { transform: translateX(4px); }
.featured-hugo .featured-cta { color: var(--sf); }
.featured-nebula .featured-cta { color: var(--fantasy); }

@media (max-width: 700px) {
  .featured-banners { grid-template-columns: 1fr; }
}

/* ── Read Free Online banner (home page) ─────────────────────────────────── */
.free-banner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px 24px 20px;
  margin-bottom: 28px;
}
.free-banner-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 14px;
}
.free-banner-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.free-banner-cover {
  flex-shrink: 0;
  width: 100px;
  display: block;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  text-decoration: none;
}
.free-banner-cover-img { width: 100%; display: block; }
.free-banner-cover-placeholder {
  width: 100px; height: 150px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.free-banner-info { flex: 1; min-width: 0; }
.free-banner-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.free-banner-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 5px;
}
.free-banner-title a { color: var(--text); text-decoration: none; }
.free-banner-title a:hover { color: var(--accent); text-decoration: underline; }
.free-banner-author { font-size: 14px; color: var(--text-2); margin-bottom: 3px; }
.free-banner-meta { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.free-banner-ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.free-banner-cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.free-banner-cta-primary:hover { opacity: 0.85; }
.free-banner-cta-secondary {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.free-banner-cta-secondary:hover { text-decoration: underline; }
.free-banner-others { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.free-banner-others-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
@media (max-width: 520px) {
  .free-banner-body { gap: 14px; }
  .free-banner-cover { width: 72px; }
  .free-banner-title { font-size: 16px; }
}

/* Featured shelves on Home — recently read / nightstand / up next.
   A header row with title + caption on the left and a "View all →" CTA
   on the right, then the content below. */
.featured-shelf {
  margin: 28px 0;
  padding: 18px 22px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.featured-shelf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.featured-shelf-head h2 { margin: 0; font-size: 18px; }
.featured-shelf-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}
.featured-shelf-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.featured-shelf-cta:hover { background: rgba(29, 78, 216, 0.08); text-decoration: none; }
.featured-shelf-cta:hover .featured-arrow { transform: translateX(3px); }

/* Nightstand visualization — vertical book spines on a wooden surface. */
.nightstand {
  margin-top: 6px;
  padding-top: 14px;
}
.nightstand-spines {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 4px 0;
  min-height: 200px;
}
.nightstand-spines::-webkit-scrollbar { height: 6px; }
.nightstand-spines::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.spine {
  position: relative;
  flex: 0 0 40px;
  height: 200px;
  background: linear-gradient(to right, var(--band, #2a2a2a) 0%, var(--band, #2a2a2a) 7px, var(--body, #444) 7px, var(--body, #444) 100%);
  border-radius: 2px 4px 4px 2px;
  box-shadow:
    inset -2px 0 4px rgba(0,0,0,0.18),
    inset 2px 0 4px rgba(255,255,255,0.04),
    1px 1px 0 rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  color: var(--ink, #f5f5f5);
  text-decoration: none;
  overflow: hidden;
}
.spine:hover {
  transform: translateY(-6px);
  text-decoration: none;
  box-shadow:
    inset -2px 0 4px rgba(0,0,0,0.18),
    inset 2px 0 4px rgba(255,255,255,0.04),
    2px 4px 10px rgba(0,0,0,0.28);
}
/* Slight randomized tilt — every other spine leans the opposite way so
   they look stacked rather than perfectly upright. */
.spine:nth-child(3n)   { transform: rotate(-0.4deg); }
.spine:nth-child(3n+1) { transform: rotate(0.6deg); }
.spine:nth-child(5n+2) { transform: rotate(-0.2deg) translateY(-1px); }
.spine:hover { transform: translateY(-6px) rotate(0) !important; }
.spine-title {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  max-height: 160px;
  overflow: hidden;
  white-space: nowrap;
  color: inherit;
}
.spine-author {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 9px;
  opacity: 0.7;
  max-height: 60px;
  overflow: hidden;
  white-space: nowrap;
  color: inherit;
}
.nightstand-surface {
  height: 14px;
  margin-top: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.04) 30%, transparent),
    repeating-linear-gradient(90deg, #6b4a2b 0 14px, #5d4023 14px 26px, #76502f 26px 40px);
  border-radius: 0 0 6px 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 10px rgba(0,0,0,0.18);
}

/* Author leaderboard */
.authors-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.authors-window-display {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(29, 78, 216, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.authors-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}
.authors-slider-mark {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.authors-slider {
  flex: 1;
  max-width: 420px;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  outline: none;
  cursor: pointer;
}
.authors-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}
.authors-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.authors-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--accent);
  cursor: pointer;
}
.authors-slider-all {
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.authors-slider-all:hover { border-color: var(--accent); }
.authors-slider-all[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.authors-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.author-row {
  display: grid;
  grid-template-columns: 180px 1fr 160px;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 13px;
  animation: author-row-in 0.5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes author-row-in {
  0%   { opacity: 0; transform: translateX(-12px); }
  100% { opacity: 1; transform: translateX(0); }
}
.author-name { color: var(--text); font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-bar { background: var(--bg-3); border-radius: 4px; height: 18px; overflow: hidden; position: relative; }
.author-bar-bg {
  height: 100%;
  width: var(--bar-width, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.85;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  animation: author-bar-grow 0.7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: inherit;
}
@keyframes author-bar-grow {
  0%   { width: 0; }
  100% { width: var(--bar-width); }
}
.author-bar-tom,
.author-bar-nika,
.author-bar-westdac,
.author-bar-colton,
.author-bar-schupp {
  position: absolute;
  top: 0;
  height: 100%;
  opacity: 0.85;
}
.author-bar-tom     { left: 0; background: var(--accent);   }
.author-bar-nika    { background: var(--accent-2); }
.author-bar-westdac { background: var(--accent-3); }
.author-bar-colton  { background: var(--accent-4); }
.author-bar-schupp  { background: var(--accent-5); }
.author-count { color: var(--muted); font-size: 12px; }

/* Toggle row on Progress page — status (Winners/Nominees/Both) and award scope (Both/Hugo/Nebula) side by side */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 24px;
  align-items: center;
}
.toggle-row .status-toggle { margin-top: 0; margin-bottom: 0; }
.status-toggle {
  display: inline-flex;
  gap: 4px;
  margin-top: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.status-tab-hugo.active { box-shadow: inset 0 -2px 0 var(--sf); }
.status-tab-nebula.active { box-shadow: inset 0 -2px 0 var(--fantasy); }
.status-tab {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-tab:hover { color: var(--text); }
.status-tab.active {
  background: var(--bg-3);
  color: var(--text);
}
.status-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-3);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 500;
}
.status-tab.active .status-count {
  background: var(--bg-2);
  color: var(--text);
}

/* Era coverage + radar — side-by-side on desktop. */
.era-twoup {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 0;
}
.era-twoup .progress-section {
  flex: 1 1 320px;
  margin-top: 36px;
}
.era-coverage-section { max-width: none; }
.era-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.era-row {
  display: grid;
  grid-template-columns: 38px 1fr 64px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.era-row-label { color: var(--muted); font-weight: 600; }
.era-row-track-wrap {
  height: 14px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}
.era-row-track {
  height: 100%;
  background: var(--border);
  border-radius: 4px;
  position: relative;
  min-width: 4px;
}
.era-row-fill {
  height: 100%;
  border-radius: 4px;
}
.era-row-count {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .era-coverage-section { max-width: 100%; }
}

/* Era bars (legacy vertical chart — left for any other caller) */
.era-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
.era-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.era-bar-track {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.era-bar {
  width: 100%;
  height: var(--bar-h, 2%);
  background: var(--bg-3);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 4px;
  animation: era-bar-grow 0.7s cubic-bezier(.2,.7,.2,1) both;
  transform-origin: bottom;
}
@keyframes era-bar-grow {
  0%   { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
.era-bar-col:nth-child(1)  .era-bar { animation-delay: 0.02s; }
.era-bar-col:nth-child(2)  .era-bar { animation-delay: 0.05s; }
.era-bar-col:nth-child(3)  .era-bar { animation-delay: 0.08s; }
.era-bar-col:nth-child(4)  .era-bar { animation-delay: 0.11s; }
.era-bar-col:nth-child(5)  .era-bar { animation-delay: 0.14s; }
.era-bar-col:nth-child(6)  .era-bar { animation-delay: 0.17s; }
.era-bar-col:nth-child(7)  .era-bar { animation-delay: 0.20s; }
.era-bar-col:nth-child(8)  .era-bar { animation-delay: 0.23s; }
.era-bar-col:nth-child(9)  .era-bar { animation-delay: 0.26s; }
.era-bar-col:nth-child(10) .era-bar { animation-delay: 0.29s; }
.era-bar-col:nth-child(11) .era-bar { animation-delay: 0.32s; }
.era-bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  margin-bottom: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  z-index: 5;
}
.era-bar:hover .era-bar-tooltip { opacity: 1; }
.era-bar-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.era-bar-count { font-size: 11px; color: var(--text); }

/* Genre breakdown */
.genre-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.genre-row {
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.genre-name { color: var(--text); font-weight: 500; text-align: right; }
.genre-bar { height: 18px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.genre-bar-fill { height: 100%; background: var(--accent); opacity: 0.85; }
.genre-count { font-size: 12px; color: var(--text); }

/* Genre radar (spider) */
.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.compare-radar-section {
  margin-top: 28px;
  padding: 18px 20px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
}
.compare-radar-section h2 { margin: 0; font-size: 18px; }
.compare-radar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}
.compare-radar-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 12px 8px;
}
.compare-radar-card h3 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 15px;
}
@media (max-width: 720px) {
  .compare-radar-grid { grid-template-columns: 1fr; }
}
.radar-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
}
.radar-scale-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}
.radar-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
}
.radar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.radar-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Genre vector table */
.vector-table {
  margin-top: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.vector-row {
  display: grid;
  grid-template-columns: 2fr 70px 70px 70px 90px 1fr;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.vector-row:last-child { border-bottom: none; }
.vector-row.vector-head {
  background: var(--bg-3);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.vector-combo {
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}
.vector-pct {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(29, 78, 216, 0.12);
  color: var(--accent);
  border: 1px solid rgba(29, 78, 216, 0.4);
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

/* Settings / Admin / Profile pages */
.settings-page, .admin-page, .profile-page { max-width: 760px; margin: 0 auto; }
.settings-section {
  margin: 26px 0;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.settings-section h2 {
  font-size: 17px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-count {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-field { display: flex; flex-direction: column; gap: 4px; }
.settings-field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.settings-field input {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.settings-field input:disabled { color: var(--muted); }
.settings-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.settings-hint { color: var(--muted); font-weight: 400; }
.settings-handle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-handle-row input { flex: 1 1 220px; min-width: 0; }
.settings-handle-row button {
  flex: 0 0 auto;
  padding: 7px 14px;
  font-size: 13px;
}
.settings-handle-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.settings-inline-status {
  font-size: 12px;
  color: var(--muted);
  min-width: 60px;
}
.settings-inline-status.success { color: var(--accent-4, #4a7a5a); font-weight: 600; }
.settings-inline-status.error { color: var(--sf, #c6444f); font-weight: 600; }
.settings-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.settings-radio:last-of-type { border-bottom: 0; }
.settings-radio input { margin-top: 3px; }
.settings-radio span { font-size: 14px; line-height: 1.4; }
.settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
/* Add-friend form on the Friends tab (was Settings). Used to live as
   .settings-add-friend; renamed when friend management moved. */
.friends-add-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}
.friends-add-form input {
  flex: 1;
  min-width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* Per-row Remove (×) button inside the Friends leaderboard. */
.lb-remove {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  margin-left: 8px;
  padding: 0;
  transition: color 0.15s, border-color 0.15s;
}
.lb-remove:hover { color: var(--sf); border-color: var(--sf); }
.lb-remove:disabled { opacity: 0.4; cursor: default; }
.settings-msg { margin-top: 12px; font-size: 13px; min-height: 18px; color: var(--muted); }
.settings-msg.success { color: var(--read); }
.settings-msg.error   { color: var(--sf); }

/* Admin */
.admin-table { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.admin-row {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  align-items: center;
}
.admin-handle a { font-weight: 600; color: var(--text); text-decoration: none; }
.admin-handle a:hover { color: var(--accent); }
.admin-pill {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 700;
}
.admin-pill-admin {
  background: rgba(198, 68, 79, 0.14);
  color: var(--sf);
  border: 1px solid rgba(198, 68, 79, 0.4);
}
.admin-reads { font-size: 13px; color: var(--muted); }
.admin-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.admin-controls select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.admin-controls label { display: inline-flex; align-items: center; gap: 4px; }

/* Profile */
.profile-header { margin-top: 8px; }
.profile-header h1 { font-size: 32px; margin: 0 0 6px; }
.profile-me {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
}
.profile-stats { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.profile-stats strong { color: var(--text); }
.profile-stats .muted { color: var(--muted); }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.profile-headline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 28px;
}
@media (max-width: 880px) {
  .profile-headline-grid { grid-template-columns: repeat(2, 1fr); }
}
.profile-section { margin-top: 28px; }
.profile-section h2 { font-size: 18px; margin: 0 0 12px; }
.profile-stat-list { display: flex; flex-direction: column; gap: 8px; }
.profile-stat-row {
  display: grid;
  grid-template-columns: 150px 1fr 140px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.profile-stat-bar {
  height: 10px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}
.profile-stat-fill { height: 100%; border-radius: 4px; }
.profile-stat-num { text-align: right; color: var(--muted); }
.profile-stat-num strong { color: var(--text); }
@media (max-width: 720px) {
  .profile-stat-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .profile-stat-num { text-align: left; }
}
.profile-friend-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--read);
  border: 1px solid var(--read);
  border-radius: 999px;
  background: transparent;
}

/* Auth admin gear */
.auth-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.auth-admin:hover { border-color: var(--accent); text-decoration: none; }

/* Leaderboard page */
.leaderboard-page { max-width: 820px; margin: 0 auto; }
.leaderboard-toggle { margin: 16px 0 22px; }
.lb-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr 130px 90px 90px 70px 100px;
  align-items: center;
  padding: 11px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: 0; }
.lb-row-me { background: rgba(29, 78, 216, 0.10); }
.lb-rank { color: var(--muted); font-weight: 600; font-size: 13px; }
.lb-handle { font-weight: 600; color: var(--text); }
.lb-stat { font-size: 14px; color: var(--text); }
.lb-stat strong { font-size: 16px; }
.lb-stat-sub { font-size: 13px; }
.lb-stat-sub strong { font-size: 15px; font-weight: 700; }
.lb-of { color: var(--muted); }
.lb-pct { color: var(--muted); font-size: 13px; }
.lb-action { text-align: right; }
@media (max-width: 720px) {
  .lb-row {
    grid-template-columns: 40px 1fr 90px 60px 60px 50px 70px;
    gap: 6px;
    padding: 9px 10px;
    font-size: 13px;
  }
  .lb-stat strong { font-size: 14px; }
  .lb-stat-sub { font-size: 12px; }
  .lb-stat-sub strong { font-size: 13px; }
}
.lb-compare {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(29, 78, 216, 0.4);
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
}
.lb-compare:hover { background: rgba(29, 78, 216, 0.18); text-decoration: none; }
.lb-compare-disabled {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
  cursor: pointer;
}
.lb-me {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}
.lb-empty {
  margin-top: 18px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}

/* Compare picker page (friends list) */
.compare-picker-page { max-width: 720px; margin: 0 auto; }
.compare-self-row {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14px;
}
.compare-self-row strong { color: var(--text); }
.compare-friend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compare-friend-row {
  display: grid;
  grid-template-columns: 1fr 220px 100px;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.1s, transform 0.1s;
}
.compare-friend-row:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}
.compare-friend-handle { font-weight: 600; font-size: 15px; }
.compare-friend-meta { color: var(--muted); font-size: 13px; }
.compare-friend-cta {
  text-align: right;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
@media (max-width: 700px) {
  .compare-friend-row { grid-template-columns: 1fr auto; }
  .compare-friend-meta { grid-column: 1 / -1; font-size: 12px; }
}

/* Standalone /compare page header */
.compare-page { max-width: 1100px; margin: 0 auto; }
.compare-header h1 { font-size: 30px; margin: 8px 0 6px; letter-spacing: -0.01em; }
.compare-header h1 span { font-weight: 700; }
.compare-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.compare-totals strong { color: var(--text); }

/* Compare headline cards (similarity, avg year, gap) */
.compare-headline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
@media (max-width: 980px) {
  .compare-headline-grid { grid-template-columns: repeat(2, 1fr); }
}
.compare-stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.compare-stat-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.compare-stat-card-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.compare-stat-card.compare-stat-similarity .compare-stat-card-value {
  color: var(--accent-4, #4a7a5a);
}
.compare-avg-year { font-size: 22px; }
.compare-avg-year span { font-weight: 700; }
.compare-stat-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .compare-headline-grid { grid-template-columns: 1fr; }
}

/* Side-by-side analytics rows */
.compare-analytics-section {
  margin-top: 28px;
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.compare-analytics-section h2 { margin: 0 0 4px; font-size: 18px; }
.cmp-stat-grid {
  margin-top: 10px;
  font-size: 13px;
}
.cmp-stat-headrow {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.cmp-stat-headrow > div { font-weight: 600; }
.cmp-stat-row {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 5px 0;
}
.cmp-stat-label {
  font-weight: 600;
  color: var(--text);
}
.cmp-stat-side {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  align-items: center;
}
.cmp-stat-bar {
  position: relative;
  height: 8px;
  background: var(--bg-3, var(--bg));
  border-radius: 4px;
  overflow: hidden;
}
.cmp-stat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.2s ease;
}
.cmp-stat-val {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .cmp-stat-headrow, .cmp-stat-row { grid-template-columns: 100px 1fr 1fr; gap: 10px; }
  .cmp-stat-side { grid-template-columns: 1fr 52px; gap: 6px; }
}

/* Reader comparison section */
.comparison-block { margin-top: 36px; }
.comparison-quadrant {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comparison-quadrant-head { margin-bottom: 8px; }
.comparison-quadrant-head h3 {
  font-size: 15px;
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.comparison-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-3);
  padding: 2px 9px;
  border-radius: 999px;
}

/* Swimlanes */
.swimlane { margin-top: 22px; }
.swimlane-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.swimlane-header h3 { font-size: 16px; margin: 0; color: var(--text); }
.swimlane-count { font-size: 12px; color: var(--muted); }
.swimlane-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
}
.swimlane-strip::-webkit-scrollbar { height: 6px; }
.swimlane-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.swimlane-card {
  flex: 0 0 124px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.1s;
}
.swimlane-card:hover { transform: translateY(-2px); }
.swimlane-cover {
  width: 124px;
  height: 184px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.swimlane-cover.is-winner { box-shadow: 0 0 0 2px rgba(184, 149, 72, 0.45); border-color: rgba(184, 149, 72, 0.6); }
.swimlane-cover img { width: 100%; height: 100%; object-fit: cover; }
.swimlane-placeholder { font-size: 32px; color: var(--muted); }

/* End-of-strip "View all" tile on Home swimlanes. */
.swimlane-view-all-cover {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.15), rgba(29, 78, 216, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  text-align: center;
}
.swimlane-view-all-cover span { padding: 12px; }
.swimlane-view-all:hover .swimlane-view-all-cover {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.28), rgba(29, 78, 216, 0.10));
}
.swimlane-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(74, 139, 111, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.swimlane-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.swimlane-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.swimlane-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.more-by-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 700px) {
  .vector-row { grid-template-columns: 1.4fr 44px 44px 44px 60px 70px; font-size: 12px; padding: 8px 10px; }
}

/* Gender pie/donut + callout grid */
.gender-chart-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 18px;
}
@media (max-width: 700px) {
  .gender-chart-wrap { grid-template-columns: 1fr; justify-items: center; }
}

/* Callout cards — big number, accent rule, label, sublabel.
   Inspired by the GigaOm benchmark report stat cards. */
.callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.callout-grid-stack { grid-template-columns: 1fr; }
.callout-card {
  position: relative;
  background: var(--bg-2);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(.2,.7,.2,1),
              transform 0.6s cubic-bezier(.2,.7,.2,1),
              background 0.15s;
  min-height: 130px;
  --cc-accent: var(--accent);
}
.callout-card.ready { opacity: 1; transform: translateY(0); }
.callout-card[href]:hover {
  background: var(--bg);
  text-decoration: none;
}
.callout-card[href]:hover .cc-arrow { transform: translateX(4px); opacity: 1; }
.cc-value {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.cc-rule {
  background: var(--cc-accent);
  width: 38px;
  height: 3px;
  margin: 14px 0 12px;
}
.cc-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.cc-sublabel {
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
}
.cc-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--cc-accent);
  font-weight: 700;
  opacity: 0.4;
  transition: transform 0.18s, opacity 0.18s;
}
.donut-wrap { display: flex; align-items: center; justify-content: center; }
.donut { transform: rotate(0); }
.donut-seg {
  transition: stroke-width 0.15s, opacity 0.15s;
  cursor: pointer;
}
.donut-seg:hover { stroke-width: 42; }
.donut-center-num { animation: donut-center-pop 0.6s 0.4s cubic-bezier(.2,.9,.2,1) both; }
@keyframes donut-center-pop {
  0%   { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}
/* Progress / Stats view extras */
.progress-section { margin-top: 36px; }
.progress-section h2 { font-size: 18px; margin-bottom: 12px; }
.headline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.eta-card {
  background: linear-gradient(135deg, rgba(198, 68, 79, 0.06), rgba(44, 93, 150, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 16px;
}
.eta-card .eta-headline { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.eta-card .eta-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.eta-card ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.eta-card ul li { padding: 2px 0; }

.recent-reads {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.recent-read {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
}
.recent-read:hover { border-color: var(--accent); }
.recent-read-cover {
  width: 40px;
  height: 60px;
  flex: 0 0 40px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.recent-read-cover img { width: 100%; height: 100%; object-fit: contain; }
.recent-read-info { font-size: 13px; line-height: 1.35; flex: 1; min-width: 0; }
.recent-read-info .rr-title { color: var(--text); font-weight: 600; }
.recent-read-info .rr-meta { color: var(--muted); font-size: 12px; }
.rr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.rr-pill {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.rr-pill-t { background: rgba(29, 78, 216, 0.12);  color: var(--accent);   border-color: rgba(29, 78, 216, 0.4); }
.rr-pill-n { background: rgba(220, 38, 38, 0.12);  color: var(--accent-2); border-color: rgba(220, 38, 38, 0.4); }
.rr-pill-w { background: rgba(182, 120, 60, 0.12); color: var(--accent-3); border-color: rgba(182, 120, 60, 0.4); }
.rr-pill-c { background: rgba(74, 122, 90, 0.12);  color: var(--accent-4); border-color: rgba(74, 122, 90, 0.4); }
.rr-pill-s { background: rgba(122, 68, 134, 0.12); color: var(--accent-5); border-color: rgba(122, 68, 134, 0.4); }

#main { padding: 24px 28px; max-width: 1400px; margin: 0 auto; }
.view.hidden { display: none !important; }

/* List view */
#view-list { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }

.filters {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-box input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}
.search-box input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 0;
  background: var(--bg-2);
}
fieldset legend {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 4px;
}
fieldset label {
  display: block;
  padding: 3px 0;
  font-size: 13px;
  cursor: pointer;
}
fieldset label input { margin-right: 8px; }

.year-row { display: flex; align-items: center; gap: 8px; }
.year-row input {
  width: 70px;
  padding: 6px 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

#reset {
  background: var(--bg-3);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
#reset:hover { color: var(--text); }

/* ── Search view: Books / Authors toggle tabs ──────────────────────────── */
.search-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.search-mode-tab {
  background: transparent;
  border: none;
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}
.search-mode-tab:hover { color: var(--text); }
.search-mode-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
/* When in authors mode: collapse the filter sidebar */
#view-list.mode-authors .filters { display: none; }
#view-list.mode-authors .results { flex: 1; }
/* Authors-page rendered inside #grid needs to span the full grid width */
.grid > .authors-page {
  grid-column: 1 / -1;
  padding: 0;
  margin: 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
#result-count { color: var(--muted); font-size: 13px; }
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(29, 78, 216, 0.18);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.active-filter-chip:hover { background: rgba(29, 78, 216, 0.32); }
.afc-x { color: var(--muted); font-weight: 700; }
.debug-filter legend { color: var(--accent-3); font-weight: 700; }
#sort {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
  min-height: 132px;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-cover {
  width: 84px;
  flex: 0 0 84px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.card-cover img { width: 100%; height: 100%; object-fit: contain; }
.card-cover .cover-placeholder { font-size: 24px; color: var(--muted); }
/* Typographic fallback when a cover image is missing or returns the
   openlibrary 60x40 placeholder pixel. Swapped in at load-time by
   __coverFallback() in app.js. */
.card-cover.cover-fallback,
.swimlane-cover.cover-fallback,
.recent-read-cover.cover-fallback {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3, var(--bg)) 100%);
  padding: 4px;
  border-right: none;
}
.cover-fallback-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
}
.cover-fallback-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.18;
  text-align: center;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}
.swimlane-cover.cover-fallback .cover-fallback-title {
  font-size: 13px;
  -webkit-line-clamp: 4;
}
.recent-read-cover.cover-fallback .cover-fallback-title {
  font-size: 12px;
  -webkit-line-clamp: 4;
}
.card-body {
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.card .title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.25;
}
.card .author {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}
.card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.badge.winner { background: rgba(184, 149, 72, 0.15); color: var(--winner); border-color: rgba(184, 149, 72, 0.4); }
.badge.nominee { background: rgba(122, 146, 181, 0.15); color: var(--nominee); border-color: rgba(122, 146, 181, 0.4); }
.badge.read { background: rgba(74, 139, 111, 0.15); color: var(--read); border-color: rgba(74, 139, 111, 0.4); }
.badge.queued { background: rgba(196, 122, 61, 0.15); color: var(--queued); border-color: rgba(196, 122, 61, 0.4); }
/* Genre badges — Time War semantic */
.badge.genre-sf { background: rgba(198, 68, 79, 0.12); color: var(--sf); border-color: rgba(198, 68, 79, 0.4); }
.badge.genre-fantasy { background: rgba(44, 93, 150, 0.12); color: var(--fantasy); border-color: rgba(44, 93, 150, 0.4); }
.badge.genre-blend { background: linear-gradient(90deg, rgba(198, 68, 79, 0.12), rgba(44, 93, 150, 0.12)); color: var(--blend); border-color: rgba(122, 68, 134, 0.4); }
.badge.genre-horror { background: rgba(58, 62, 74, 0.12); color: var(--horror); border-color: rgba(58, 62, 74, 0.4); }
.badge.cat { background: var(--bg-3); color: var(--muted); border-color: var(--border); }
.badge .reader-initial {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  border-radius: 50%;
  margin-right: 4px;
  color: var(--bg);
}
.badge.reader-t .reader-initial { background: var(--accent); color: #fff; }
.badge.reader-n .reader-initial { background: var(--accent-2); color: #fff; }
.badge.reader-w .reader-initial { background: var(--accent-3); color: #fff; }
.badge.reader-c .reader-initial { background: var(--accent-4); color: #fff; }
.badge.reader-s .reader-initial { background: var(--accent-5); color: #fff; }
.badge.reader-t { color: var(--accent);   border-color: rgba(29, 78, 216, 0.4);  background: rgba(29, 78, 216, 0.12); }
.badge.reader-n { color: var(--accent-2); border-color: rgba(220, 38, 38, 0.4);  background: rgba(220, 38, 38, 0.12); }
.badge.reader-w { color: var(--accent-3); border-color: rgba(182, 120, 60, 0.4); background: rgba(182, 120, 60, 0.12); }
.badge.reader-c { color: var(--accent-4); border-color: rgba(74, 122, 90, 0.4);  background: rgba(74, 122, 90, 0.12); }
.badge.reader-s { color: var(--accent-5); border-color: rgba(122, 68, 134, 0.4); background: rgba(122, 68, 134, 0.12); }

/* Detail view */
/* ── Dashboard intro + compare widget ─────────────────────────────────── */
.dashboard-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 680px;
}
.dashboard-intro strong { color: var(--text); }
.dashboard-compare {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}
.dashboard-compare-input {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
}
.dashboard-compare-input:focus {
  outline: none;
  border-color: var(--accent);
}

.detail {
  max-width: 900px;
  margin: 0 auto;
}
.detail .back { color: var(--muted); font-size: 13px; }
.detail h1 { font-size: 28px; margin: 8px 0 4px; letter-spacing: -0.01em; }
.detail .author-line { color: var(--muted); font-size: 16px; margin-bottom: 16px; }
.detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  margin-top: 24px;
}
.detail-cover {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--muted);
}
.detail-cover img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.detail-info dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}
.detail-info dt { color: var(--muted); }
.detail-info dd { margin: 0; }
.detail-info .badges-row { margin-top: 12px; }
.detail-info .notes {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
}
.detail-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-links-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-links-buttons a {
  padding: 7px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
}
.detail-links-buttons a:hover { border-color: var(--accent); text-decoration: none; }
.detail-links-buttons .detail-link-read {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: #1d4ed8;
  color: #1d4ed8;
  font-weight: 600;
}
.detail-links-buttons .detail-link-read:hover { background: #eff6ff; border-color: #1d4ed8; }
.detail-link-read-label {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.4;
}
.detail-link-favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: block;
}
.series-inline { color: var(--accent-2); font-weight: 500; }
.book-section { margin-top: 36px; max-width: 720px; }
.book-section h2 { font-size: 18px; margin-bottom: 12px; }
.book-section h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.book-description { font-size: 15px; line-height: 1.6; color: var(--text); }
.book-description p { margin: 0 0 12px; }
.book-subjects { display: flex; flex-direction: column; }
.book-subjects > div { display: flex; flex-wrap: wrap; gap: 6px; }
.subject-tag {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  margin: 0 4px 4px 0;
}
/* ── About the Author (detail page) ───────────────────────────────────── */
.author-bio-section { min-height: 0; }
.author-bio-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.author-bio-photo {
  width: 120px;
  height: 150px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.author-bio-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.author-bio-text p { margin: 0 0 10px; }
.author-bio-wiki-link {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  margin-top: 4px;
}
.author-bio-wiki-link:hover { text-decoration: underline; }

/* ── Authors tab ───────────────────────────────────────────────────────── */
.authors-page { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.authors-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.authors-header h1 { font-size: 22px; margin: 0; margin-right: auto; }
.authors-count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
.author-search-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  width: 180px;
}
.author-sort-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}
.author-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.author-card-photo-wrap { display: flex; justify-content: center; }
.author-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.author-card-photo.has-photo { border-color: transparent; }
.author-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.author-card-initials { font-size: 22px; font-weight: 700; color: var(--muted); }
.author-card-info { text-align: center; width: 100%; }
.author-card-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.author-card-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.author-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.author-badge.wins { background: rgba(184,149,72,0.15); color: #a07830; border: 1px solid rgba(184,149,72,0.4); }
.author-badge.noms { background: var(--bg-3); color: var(--muted); border: 1px solid var(--border); }
.author-book-count { font-size: 11px; color: var(--muted); }

/* ── Author detail page ──────────────────────────────────────────────────── */
.author-detail { max-width: 900px; margin: 0 auto; padding: 28px 24px 48px; }
.author-detail-header {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 24px 0 36px;
}
.author-detail-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.author-detail-photo.has-photo { border-color: transparent; }
.author-detail-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.author-detail-initials { font-size: 44px; font-weight: 700; color: var(--muted); }
.author-detail-meta { flex: 1; min-width: 0; }
.author-detail-name { font-size: 26px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.author-detail-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ad-stat {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.ad-stat-wins { background: rgba(184,149,72,0.15); color: #a07830; border-color: rgba(184,149,72,0.35); }
.ad-stat-noms { background: var(--bg-3); color: var(--muted); }
.ad-stat-books { background: var(--bg-3); color: var(--muted); }
.author-detail-bio { max-width: 600px; }
.author-detail-bio-text { font-size: 14px; line-height: 1.65; color: var(--text-2); margin: 0 0 10px; }
.author-detail-books { margin-top: 8px; }
.author-detail-books h2 { font-size: 18px; margin-bottom: 16px; }
@media (max-width: 560px) {
  .author-detail-header { flex-direction: column; align-items: center; text-align: center; }
  .author-detail-stats { justify-content: center; }
  .author-detail-bio { max-width: 100%; }
}

/* ── Collections tab (formerly Magazines) ────────────────────────────────── */
.magazines-page { padding-bottom: 64px; }
.magazines-page h1 { font-size: 26px; margin-bottom: 6px; }
.magazines-section { margin-top: 48px; }
/* Section separators inside Collections */
.collections-section-head {
  font-size: 20px;
  font-weight: 700;
  margin: 48px 0 10px;
  padding-top: 36px;
  border-top: 2px solid var(--border);
  color: var(--text);
}
.collections-section-head-first {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}
.collections-genre-section { margin-top: 0; }
.magazines-intro {
  font-size: 15px;
  color: var(--text-2);
  max-width: 640px;
  margin: 0 0 36px;
  line-height: 1.65;
}
/* Card grid — single column, each card gets the full width */
.mag-grid { display: flex; flex-direction: column; gap: 32px; }

/* Individual magazine card */
.mag-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border-left: 4px solid var(--mag-accent, var(--border));
  background: var(--bg-2);
}
.mag-card-header {
  display: flex;
  gap: 0;
  align-items: flex-start;
}
/* Cover image column — fixed portrait aspect ratio so the cover never stretches */
.mag-card-cover {
  flex-shrink: 0;
  width: 150px;
  aspect-ratio: 2 / 3;
  margin: 0;
  position: relative;
  background: #111;
  overflow: hidden;
  align-self: flex-start;
}
.mag-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0.92;
}
.mag-card-cover figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  padding: 12px 6px 4px;
  text-align: center;
  line-height: 1.3;
}
/* Text body column */
.mag-card-body {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 18px;
}
.mag-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.mag-status-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--mag-accent, var(--border));
  color: var(--mag-accent, var(--muted));
  background: color-mix(in srgb, var(--mag-accent, transparent) 10%, transparent);
}
.mag-status-pill.mag-status-defunct { opacity: 0.65; }
.mag-era { font-size: 12px; color: var(--muted); }
.mag-card-name {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.2;
  color: var(--text);
}
.mag-card-description {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 14px;
}
/* Stats row */
.mag-card-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}
.mag-stat { display: flex; flex-direction: column; align-items: flex-start; }
.mag-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--mag-accent, var(--text));
  line-height: 1;
}
.mag-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
/* External links */
.mag-card-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mag-pill-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--mag-accent, var(--accent));
  border: 1px solid color-mix(in srgb, var(--mag-accent, var(--border)) 40%, var(--border));
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  transition: background 0.12s;
  background: color-mix(in srgb, var(--mag-accent, transparent) 6%, transparent);
}
.mag-pill-link:hover {
  background: color-mix(in srgb, var(--mag-accent, var(--accent)) 14%, transparent);
  text-decoration: none;
}
/* Swimlane section */
.mag-card-swimlane {
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
  background: var(--bg);
}
.mag-swimlane-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  .mag-card-header { flex-direction: column; }
  .mag-card-cover { width: 100%; aspect-ratio: 16 / 7; align-self: stretch; }
  .mag-card-cover img { object-position: center 25%; }
}

.btn-primary {
  display: inline-block;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:hover { background: #246e5b; text-decoration: none; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  animation: stat-card-in 0.45s cubic-bezier(.2,.7,.2,1) both;
}
.headline-grid .stat-card:nth-child(1) { animation-delay: 0.00s; }
.headline-grid .stat-card:nth-child(2) { animation-delay: 0.06s; }
.headline-grid .stat-card:nth-child(3) { animation-delay: 0.12s; }
.headline-grid .stat-card:nth-child(4) { animation-delay: 0.18s; }
.headline-grid .stat-card:nth-child(5) { animation-delay: 0.24s; }
.headline-grid .stat-card:nth-child(6) { animation-delay: 0.30s; }
@keyframes stat-card-in {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.stat-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.1s, transform 0.1s;
}
.stat-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.stat-card-link h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-card-link h3::after {
  content: "→";
  color: var(--muted);
  font-size: 14px;
  opacity: 0.6;
}
.stat-card h3 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat-card .stat-sub {
  color: var(--muted);
  font-size: 13px;
}
.progress {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

/* About */
.about {
  max-width: 720px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.6;
}
.about h2 { margin-top: 28px; font-size: 18px; }

.footer {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* 2026 finalists tabs (Hugo + Nebula) */
.nav-hot {
  position: relative;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-hot::before {
  content: '★';
  margin-right: 5px;
  color: var(--winner);
}
.nav-hot-hugo {
  background: linear-gradient(135deg, rgba(198, 68, 79, 0.16), rgba(184, 149, 72, 0.18));
  border: 1px solid rgba(198, 68, 79, 0.4);
  color: var(--sf) !important;
}
.nav-hot-nebula {
  background: linear-gradient(135deg, rgba(44, 93, 150, 0.16), rgba(184, 149, 72, 0.16));
  border: 1px solid rgba(44, 93, 150, 0.4);
  color: var(--fantasy) !important;
}
.nav-hot:hover, .nav-hot.active { color: var(--text) !important; }

.hugo2026 { max-width: 1100px; margin: 0 auto; }
.hugo-hero {
  padding: 32px 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 12px 0 28px;
}
.hugo-hero-hugo {
  background: linear-gradient(135deg, rgba(198, 68, 79, 0.10), rgba(184, 149, 72, 0.12));
  border-left: 4px solid var(--sf);
}
.hugo-hero-nebula {
  background: linear-gradient(135deg, rgba(44, 93, 150, 0.10), rgba(184, 149, 72, 0.10));
  border-left: 4px solid var(--fantasy);
}
.hugo-hero-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hugo-hero-tag-hugo {
  color: var(--sf);
  border: 1px solid rgba(198, 68, 79, 0.4);
  background: rgba(198, 68, 79, 0.08);
}
.hugo-hero-tag-nebula {
  color: var(--fantasy);
  border: 1px solid rgba(44, 93, 150, 0.4);
  background: rgba(44, 93, 150, 0.08);
}
.hugo-hero h1 {
  font-size: 32px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.hugo-hero p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--text); }
.hugo-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}
.hugo-hero-stats strong { color: var(--text); }

.hugo-vote {
  margin: 0 0 36px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.hugo-vote h2 { margin: 0 0 14px; font-size: 18px; }
.hugo-vote ol { margin: 0 0 18px; padding-left: 22px; }
.hugo-vote li { margin: 6px 0; font-size: 14px; line-height: 1.55; }
.hugo-vote-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hugo-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--sf);
  color: #fff !important;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.hugo-btn:hover { filter: brightness(1.08); }
.hugo-btn-nebula { background: var(--fantasy); }
.hugo-btn-secondary { background: var(--bg); color: var(--text) !important; border: 1px solid var(--border); }
.hugo-btn-secondary:hover { border-color: var(--sf); }
.nebula2026 .hugo-btn-secondary:hover { border-color: var(--fantasy); }
.nebula2026 .hugo-section h2 { border-bottom-color: rgba(44, 93, 150, 0.25); }

.hugo-section { margin: 32px 0; }
.hugo-section h2 {
  font-size: 20px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.hugo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 140px));
  gap: 10px;
  justify-content: start;
}
.hugo-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.hugo-card:hover {
  transform: translateY(-2px);
  border-color: var(--sf);
  box-shadow: 0 4px 14px rgba(198, 68, 79, 0.15);
}
.hugo-card-nebula:hover {
  border-color: var(--fantasy);
  box-shadow: 0 4px 14px rgba(44, 93, 150, 0.15);
}
.hugo-card-cover {
  aspect-ratio: 2/3;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hugo-card-cover img { width: 100%; height: 100%; object-fit: contain; }
.hugo-card-stub { cursor: default; }
.hugo-card-stub:hover { transform: none; box-shadow: none; }
.hugo-card-placeholder { font-size: 30px; opacity: 0.4; }
.hugo-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 8px;
  box-sizing: border-box;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 2px solid var(--border);
}
.hugo-card-fallback-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 4px;
}
.hugo-card-fallback-meta {
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hugo-card-body { padding: 7px 9px 9px; }
.hugo-card-title { font-weight: 700; font-size: 12px; line-height: 1.22; margin-bottom: 2px; }
.hugo-card-author { font-size: 11px; color: var(--text); margin-bottom: 3px; }
.hugo-card-pub { font-size: 10px; color: var(--muted); line-height: 1.25; }

.hugo-source {
  margin: 40px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 800px) {
  #view-list { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-cover { aspect-ratio: 3/4; max-width: 200px; }
}

/* ===== Discover (Tinder-style) ===================================== */
.discover-page { max-width: 720px; margin: 0 auto; }
.discover-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 24px;
}
.discover-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.discover-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.discover-stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.discover-stage {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
}
.discover-side-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: center;
}
.discover-side-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 14px 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, border-color 0.15s;
}
.discover-side-btn:hover:not(:disabled) {
  background: rgba(29, 78, 216, 0.08);
  border-color: var(--accent);
}
.discover-side-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.discover-cardstack {
  position: relative;
  height: 540px;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}
.discover-card {
  position: absolute;
  inset: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}
.discover-card-peek[data-peek="1"] { transform: scale(0.96) translateY(10px); opacity: 0.7; z-index: 1; pointer-events: none; }
.discover-card-peek[data-peek="2"] { transform: scale(0.92) translateY(20px); opacity: 0.4; z-index: 0; pointer-events: none; }
.discover-card-top {
  z-index: 2;
  touch-action: none;
  cursor: grab;
  transition: transform 0.18s ease-out;
}
.discover-card-top.dragging { transition: none; cursor: grabbing; }
.discover-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.discover-tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 11px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.discover-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.discover-cardbody {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.discover-tabbody {
  width: 100%;
  height: 100%;
  overflow-y: auto;
}
.discover-tabbody-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0f1c;
  padding: 0;
}
.discover-tabbody-cover img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: cover;
  display: block;
}
.discover-cover-placeholder {
  font-size: 96px;
  color: var(--muted);
  opacity: 0.5;
}
.discover-tabbody-desc,
.discover-tabbody-author {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.discover-tabbody-desc p { margin: 0 0 10px; }
.discover-tabbody-author h3 { margin: 0 0 4px; font-size: 17px; }
.discover-pills { margin-bottom: 12px; }
.discover-author-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.discover-author-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.discover-author-list li:last-child { border-bottom: 0; }
.discover-author-list a { color: var(--accent); text-decoration: none; }
.discover-author-list a:hover { text-decoration: underline; }
.discover-mini-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.discover-mini-tag.read { background: rgba(34, 139, 76, 0.18); color: #4ec07a; }
.discover-mini-tag.night { background: rgba(217, 145, 28, 0.18); color: #e7a13b; }
.discover-cardfoot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
}
.discover-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.discover-title a { color: var(--text); text-decoration: none; }
.discover-title a:hover { color: var(--accent); }
.discover-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
.discover-swipe-hint {
  position: absolute;
  top: 60px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 14px;
  border: 3px solid;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  text-transform: uppercase;
}
.discover-swipe-hint-left {
  left: 16px;
  color: #4ec07a;
  border-color: #4ec07a;
  transform: rotate(-14deg);
}
.discover-swipe-hint-right {
  right: 16px;
  color: var(--muted);
  border-color: var(--muted);
  transform: rotate(14deg);
}
.discover-swipe-hint-up {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #e7a13b;
  border-color: #e7a13b;
}
.discover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 24px auto 12px;
  max-width: 540px;
}
.discover-action {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.discover-action:hover { transform: translateY(-1px); }
.discover-action:active { transform: translateY(0); }
.discover-action-read { border-color: #4ec07a; color: #4ec07a; }
.discover-action-read:hover { background: rgba(78, 192, 122, 0.12); }
.discover-action-night { border-color: #e7a13b; color: #e7a13b; }
.discover-action-night:hover { background: rgba(231, 161, 59, 0.12); }
.discover-action-neither { border-color: var(--muted); color: var(--muted); }
.discover-action-neither:hover { background: rgba(120,120,140,0.10); }
.discover-hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 24px;
}
.discover-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 20px;
}
@media (max-width: 600px) {
  .discover-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .discover-side-controls {
    flex-direction: row;
    justify-content: center;
  }
  .discover-side-btn {
    height: auto;
    padding: 10px;
  }
  .discover-cardstack { height: 480px; }
  .discover-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .discover-stat { padding: 10px 6px; }
  .discover-stat-value { font-size: 20px; }
  .discover-stat-label { font-size: 10.5px; }
  .discover-actions { grid-template-columns: 1fr 1fr 1fr; }
}

/* Respect users who prefer reduced motion — disable chart entrance and
   slider thumb scaling animations entirely. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}
