/* ============================================================
   WatervilleAI.News — Custom Theme
   Design tokens, reset, components, responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --navy: #0f172a;
  --navy-mid: #1e2d45;
  --navy-light: #2a3f5f;
  --orange: #f97316;
  --orange-light: #ffedd5;
  --slate: #64748b;
  --slate-dark: #334155;
  --slate-light: #94a3b8;
  --white: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow: 0 4px 12px rgba(0, 0, 0, .10), 0 2px 4px rgba(0, 0, 0, .06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .14);

  --header-h: 64px;
  --max-w: 1280px;
  --sidebar-w: 280px;
  --gap: 24px;

  font-size: 16px;
}

/* ── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout helpers ─────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #c2d7f0;
  white-space: nowrap;
}

.site-logo .accent {
  color: var(--orange);
}

/* Main nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: #c2d7f0;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--navy-light);
  color: var(--white);
  outline: none;
}

/* External link indicator (Budget Explorer ↗) */
.nav-external-icon {
  width: 10px;
  height: 10px;
  margin-left: 3px;
  opacity: .65;
  flex-shrink: 0;
}

.nav-link-external:hover .nav-external-icon {
  opacity: 1;
}

/* Dropdown chevron */
.nav-link .chevron {
  width: 14px;
  height: 14px;
  transition: transform .2s;
}

.nav-item.open .chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}

.nav-item.open .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: .875rem;
  color: #c2d7f0;
  transition: background .15s, color .15s;
}

.dropdown a:hover {
  background: var(--navy-light);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #c2d7f0;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .75) 0%, rgba(26, 58, 92, .65) 60%, rgba(15, 23, 42, .88) 100%),
    url('/images/hero.webp') center 40%/cover no-repeat;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
}

.hero-title {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.hero-title a:hover {
  color: var(--orange);
  transition: color .15s;
}

.hero-meta {
  font-size: .85rem;
  color: var(--slate-light);
}

.hero-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  margin-right: 10px;
}

.hero-content {
  flex: 1;
}

/* ── MAIN GRID ──────────────────────────────────────────── */
.page-body {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
  padding-block: 36px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 32px;
  align-items: start;
}

/* ── SECTION HEADING ────────────────────────────────────── */
.section-heading {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ── ARTICLE CARD GRID ──────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}

.article-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--orange-light);
  color: var(--orange);
  margin-bottom: 10px;
  align-self: flex-start;
}

/* Different colors per meeting type */
.card-badge.badge-select-board {
  background: #dbeafe;
  color: #1d4ed8;
}

.card-badge.badge-planning-board {
  background: #d1fae5;
  color: #065f46;
}

.card-badge.badge-conservation {
  background: #ecfdf5;
  color: #047857;
}

.card-badge.badge-town-meeting {
  background: #ede9fe;
  color: #6d28d9;
}

.card-badge.badge-school-board {
  background: #fce7f3;
  color: #be185d;
}

.card-title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
  flex: 1;
}

.card-title a:hover {
  color: var(--orange);
  transition: color .15s;
}

.card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-excerpt {
  font-size: .83rem;
  color: var(--slate);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* Search — button inset inside input */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 9px 40px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .1);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}

.search-btn:hover {
  background: #ea6c0a;
}

.search-btn svg {
  width: 14px;
  height: 14px;
}

/* Recent posts list */
.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.recent-list li a {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--slate-dark);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.35;
  transition: color .15s;
}

.recent-list li:last-child a {
  border-bottom: none;
}

.recent-list li a:hover {
  color: var(--orange);
}

/* Tag pills */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--slate-dark);
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}

.tag-pill:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.tag-pill .count {
  font-size: .65rem;
  opacity: .7;
  margin-left: 3px;
}

/* ── SEARCH RESULTS ─────────────────────────────────────── */
#search-results {
  margin-top: 12px;
  font-size: .82rem;
}

.search-results-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#search-results a {
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--slate-dark);
  font-weight: 500;
  transition: color .15s;
}

#search-results a:last-child {
  border-bottom: none;
}

#search-results a:hover {
  color: var(--orange);
}

#search-results .no-results {
  color: var(--text-muted);
}

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--slate-dark);
  background: var(--white);
  transition: background .15s, color .15s;
}

.pagination a:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.pagination .active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.pagination .disabled {
  opacity: .4;
  pointer-events: none;
}

/* ── SINGLE ARTICLE ─────────────────────────────────────── */
.article-page {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
  padding-block: 36px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 32px;
  align-items: start;
}

.article-header {
  margin-bottom: 28px;
}

.article-breadcrumb {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-breadcrumb a:hover {
  color: var(--orange);
}

.article-breadcrumb .sep {
  color: var(--border);
}

.article-title {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-muted);
}

.article-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

/* Article typography */
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 10px;
}

.article-body h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--slate-dark);
  margin-top: 18px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.article-body p {
  margin-bottom: 16px;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text);
}

.article-body a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-color: rgba(249, 115, 22, .35);
  transition: text-decoration-color .15s;
}

.article-body a:hover {
  text-decoration-color: var(--orange);
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 20px;
}

.article-body li {
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 6px;
}

.article-body strong {
  font-weight: 700;
}

/* ── NOTICE SHORTCODE ───────────────────────────────────── */
.notice {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  border-left: 4px solid;
}

.notice.notice-info {
  background: #eff6ff;
  border-color: #3b82f6;
}

.notice.notice-warning {
  background: #fffbeb;
  border-color: #f59e0b;
}

.notice.notice-tip {
  background: #f0fdf4;
  border-color: #22c55e;
}

.notice-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  color: var(--slate-dark);
}

.notice p {
  margin-bottom: 8px;
  font-size: .88rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice ul {
  margin: 8px 0 0 18px;
}

.notice li {
  font-size: .88rem;
  margin-bottom: 4px;
}

.notice em {
  font-style: italic;
  color: var(--text-muted);
}

/* ── YOUTUBE EMBED ──────────────────────────────────────── */
.youtube-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 20px 0;
}

.youtube-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Article tags footer */
.article-tags {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.article-tags-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── LIST / TAXONOMY PAGES ──────────────────────────────── */
.list-page {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
  padding-block: 36px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 32px;
  align-items: start;
}

.list-header {
  margin-bottom: 24px;
}

.list-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.025em;
  margin-bottom: 4px;
}

.list-count {
  font-size: .83rem;
  color: var(--text-muted);
}

/* Terms page grid */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.term-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}

.term-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.term-card-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.term-card-count {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 28px;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: #c2d7f0;
  letter-spacing: -.01em;
}

.footer-logo .accent {
  color: var(--orange);
}

.footer-info {
  font-size: .8rem;
  color: #64748b;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: .82rem;
}

.footer-links a {
  color: #94a3b8;
  transition: color .15s;
}

.footer-links a:hover {
  color: var(--white);
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */
.about-page {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--gap);
  padding-block: 48px;
}

.about-page h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 24px;
  color: var(--text);
}

.about-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.about-page h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text);
}

.about-page p {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
}

.about-page a {
  color: var(--orange);
  text-decoration: underline;
}

/* ── AUDIO ──────────────────────────────────────────────── */
.article-body audio {
  width: 100%;
  margin: 12px 0;
}

.article-body figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .site-nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    overflow-y: auto;
    z-index: 99;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .dropdown {
    position: static;
    border: none;
    box-shadow: none;
    background: var(--navy-light);
    border-radius: var(--radius-sm);
    margin-top: 4px;
  }

  .dropdown a {
    padding: 10px 24px;
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .page-body,
  .article-page,
  .list-page {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .article-body {
    padding: 24px 20px;
  }

  .hero-inner {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.4rem;
  }
}

/* ── YOUTUBE MINI-PLAYER ────────────────────────────────── */
#mini-player {
  position: fixed;
  bottom: -320px;
  /* hidden off-screen */
  right: 20px;
  width: 360px;
  background: var(--navy);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
  overflow: hidden;
  z-index: 9999;
  transition: bottom .3s cubic-bezier(.4, 0, .2, 1);
}

#mini-player.open {
  bottom: 20px;
}

/* Header / drag bar */
.mini-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--navy-mid);
  cursor: default;
  gap: 8px;
  user-select: none;
}

.mini-player-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate-light);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mini-player-open-btn,
.mini-player-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}

.mini-player-open-btn {
  background: rgba(255, 255, 255, .1);
  color: var(--slate-light);
}

.mini-player-open-btn:hover {
  background: rgba(255, 255, 255, .2);
  color: var(--white);
}

.mini-player-close-btn {
  background: rgba(255, 255, 255, .08);
  color: var(--slate-light);
}

.mini-player-close-btn:hover {
  background: rgba(220, 50, 50, .7);
  color: var(--white);
}

.mini-player-open-btn svg,
.mini-player-close-btn svg {
  width: 13px;
  height: 13px;
}

/* Video area */
.mini-player-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.mini-player-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Highlight the clicked (link) */
.article-body a.yt-active {
  background: rgba(249, 115, 22, .15);
  border-radius: 3px;
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Mobile: full-width bottom strip */
@media (max-width: 640px) {
  #mini-player {
    right: 0;
    left: 0;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    bottom: -260px;
  }

  #mini-player.open {
    bottom: 0;
  }
}