/* ============================================
   DeGids Modern Layout & Components
   Kleuren komen via tokens.css (uit theme.json).
   ============================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-slow) var(--ease-in-out), color var(--dur-slow) var(--ease-in-out);
}

/* ---- Container ---- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .container { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .container { padding-left: 32px; padding-right: 32px; } }

/* ---- Typography ---- */
h1, .h1 { font-family: var(--font-heading); font-size: var(--text-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); }
h2, .h2 { font-family: var(--font-heading); font-size: var(--text-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); }
h3, .h3 { font-family: var(--font-heading); font-size: var(--text-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); }
h4, .h4 { font-family: var(--font-heading); font-size: var(--text-h4); line-height: var(--lh-h4); font-weight: var(--fw-h4); }
a { color: var(--text-link, var(--color-primary)); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--text-link-hover, var(--color-primary-hover)); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }

/* ---- Lucide Icon Base ---- */
.lucide-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--surface-border); border-radius: var(--radius-sm);
  background: var(--surface-card); color: var(--text-primary);
  font-family: var(--font-body); font-size: var(--text-small); font-weight: 500;
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out); text-decoration: none;
}
.btn:hover { background: var(--surface-elevated); border-color: var(--surface-border-strong); }
.btn--primary { background: var(--gradient-cta); color: #fff; border-color: transparent; font-weight: 600; box-shadow: var(--shadow-glow-orange); }
.btn--primary:hover { background: var(--gradient-cta-hover); box-shadow: 0 0 28px rgba(249,115,22,0.35); }
.btn--secondary { background: transparent; border-color: var(--color-orange); color: var(--color-orange); }
.btn--secondary:hover { background: var(--color-orange-subtle); }
.btn--purple { background: var(--gradient-purple); color: #fff; border-color: transparent; }
.btn--purple:hover { opacity: 0.9; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--overlay-hover); color: var(--text-primary); }
.btn--ghost.active { background: var(--color-primary-subtle); color: var(--color-primary); border-color: var(--color-primary-muted); }
.btn--sm { padding: 4px 10px; font-size: 12px; }
.btn--icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: var(--radius-full); background: transparent; border: 1px solid var(--surface-border); }
.btn--icon:hover { background: var(--overlay-hover); }

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--surface-nav) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--surface-border-subtle);
}
.top-nav__inner {
  display: flex; align-items: center; height: 56px; gap: 16px;
}
.top-nav__logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text-primary); flex-shrink: 0;
}
.top-nav__logo-icon { color: var(--color-orange); }
.top-nav__logo-text {
  font-weight: 800; font-size: 18px; letter-spacing: -0.3px;
  background: var(--gradient-cta); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.top-nav__center { flex: 1; display: flex; justify-content: center; max-width: 480px; margin: 0 auto; }
.top-nav__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Search */
.search-box { position: relative; width: 100%; }
.search-box__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-box__input {
  width: 100%; padding: 10px 14px 10px 40px; height: 44px;
  border: 1px solid var(--surface-border); border-radius: var(--radius-full);
  background: var(--surface-input); color: var(--text-primary);
  font-family: var(--font-body); font-size: 14px; outline: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.search-box__input:focus { border-color: var(--color-orange); box-shadow: 0 0 0 3px var(--color-orange-subtle); }
.search-box__input::placeholder { color: var(--text-muted); font-size: 13px; }
.search-box__results {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto; z-index: var(--z-dropdown);
}
.search-result__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  color: var(--text-secondary); text-decoration: none; font-size: 13px;
  transition: background var(--dur-fast) var(--ease-out);
}
.search-result__item:hover { background: var(--overlay-hover); color: var(--text-primary); }
.search-result__icon { flex-shrink: 0; }
.search-result__type { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.search-result__empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Nav Pills */
.top-nav__pills {
  border-top: 1px solid var(--surface-border-subtle);
  overflow-x: auto; scrollbar-width: none;
}
.top-nav__pills::-webkit-scrollbar { display: none; }
.top-nav__pills-inner {
  display: flex; align-items: center; gap: 6px; padding: 8px 0;
  white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full); min-height: 32px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  background: var(--surface-card); border: 1px solid var(--surface-border);
  text-decoration: none; transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.pill:hover { border-color: var(--pill-color, var(--color-primary)); color: var(--text-primary); background: var(--overlay-hover); }
.pill:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pill--more {
  color: var(--text-muted); cursor: pointer; border-style: dashed;
  transition: all var(--dur-fast) var(--ease-out);
}
.pill--more:hover { color: var(--text-primary); border-color: var(--color-orange); border-style: solid; background: var(--color-orange-subtle); }

/* ============================================
   DASHBOARD
   ============================================ */

/* Hero — photo background with gradient overlay (SAITS style) */
.dash-hero {
  position: relative; overflow: hidden; min-height: 280px;
  border-bottom: 3px solid transparent;
  border-image: var(--gradient-cta) 1;
}
.dash-hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.dash-hero__photo,
.dash-hero__video {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: brightness(0.22) saturate(0.6);
}
.dash-hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(30,27,75,0.92) 0%, rgba(49,46,129,0.82) 35%, rgba(234,88,12,0.35) 70%, rgba(251,146,60,0.2) 100%),
    linear-gradient(to bottom, rgba(11,15,26,0.5) 0%, rgba(11,15,26,0.85) 100%);
}
.dash-hero__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 32px;
  padding: 48px 0 36px;
}
.dash-hero__content {
  flex: 1; position: relative; z-index: 1;
  padding: 28px 32px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.30) 50%, rgba(255,255,255,0.18) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.25);
}
.dash-hero__brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 6px 16px 6px 10px;
  background: rgba(255,255,255,0.08); border-radius: var(--radius-full);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12);
}
.dash-hero__logo { color: var(--color-orange); display: flex; }
.dash-hero__logo-text {
  font-size: 16px; font-weight: 800; letter-spacing: -0.3px;
  background: var(--gradient-cta); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-hero__title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  line-height: 1.12; letter-spacing: -0.5px; margin-bottom: 10px;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.dash-hero__accent {
  background: var(--gradient-cta); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-hero__sub { font-size: 16px; color: rgba(255,255,255,0.88); max-width: 520px; line-height: 1.6; margin-bottom: 24px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.dash-hero__stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--radius-full); min-height: 40px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}
.stat-pill strong { font-weight: 700; }
.stat-pill--orange { border-color: var(--color-orange-muted); }
.stat-pill--orange strong { color: var(--color-orange); }
.stat-pill--purple { border-color: var(--color-primary-muted); }
.stat-pill--purple strong { color: var(--color-primary-hover); }
.stat-pill--teal { border-color: rgba(20,184,166,0.4); }
.stat-pill--teal strong { color: var(--color-secondary-hover); }

/* Hero ad space */
.dash-hero__ad {
  flex-shrink: 0; width: 300px;
  display: flex; flex-direction: column; gap: 6px;
}
.dash-hero__ad-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}
.dash-hero__ad-slot {
  width: 300px; height: 250px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
}
.dash-hero__ad-placeholder { font-size: 12px; color: rgba(255,255,255,0.2); }

/* Dashboard Sections */
.dash-section { padding: 40px 0; position: relative; }
.dash-section + .dash-section { border-top: 1px solid var(--surface-divider); }
.dash-section:nth-child(even) { background: var(--section-accent-purple, transparent); }
.dash-section:nth-child(3n) { background: var(--section-accent-teal, transparent); }
.dash-section__header { margin-bottom: 24px; }
.dash-section__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; margin-bottom: 6px;
}
.dash-section__subtitle { font-size: 14px; color: var(--text-secondary); }

/* Carousel */
.carousel {
  position: relative; padding: 0 44px;
}
.carousel__track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
  padding: 8px 4px 16px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--surface-card); border: 1px solid var(--surface-border);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.carousel__btn:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; }
.carousel__btn:hover {
  background: var(--color-orange); color: #fff; border-color: var(--color-orange);
  box-shadow: var(--shadow-md);
}
.carousel__btn--prev { left: 0; }
.carousel__btn--next { right: 0; }

/* Featured Panels (carousel cards) */
.panel {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--surface-card); border: 2px solid var(--topic-color, var(--color-primary));
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-normal) var(--ease-out);
  position: relative; overflow: hidden;
  min-width: 280px; max-width: 320px; flex-shrink: 0;
  scroll-snap-align: start;
}
.panel__color-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
}
.panel > *:not(.panel__color-bg) { position: relative; z-index: 1; }
.panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--topic-color, var(--color-primary)); z-index: 2;
}
.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--topic-color, var(--color-primary)) 20%, transparent);
}
.panel__header { display: flex; align-items: center; gap: 10px; }
.panel__icon {
  flex-shrink: 0; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 14%, transparent);
}
.panel__title { font-size: 16px; font-weight: 800; flex: 1; }
.panel__badge {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-full);
  font-weight: 700; white-space: nowrap;
}
.panel__subs { display: flex; flex-wrap: wrap; gap: 5px; }
.panel__sub-tag {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  border: 1px solid var(--surface-border-subtle);
  backdrop-filter: blur(4px);
}
.panel__sub-more { font-size: 11px; color: var(--text-muted); padding: 2px 4px; font-weight: 600; }
.panel__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.panel__arrow {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); color: var(--text-muted);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 10%, transparent);
  transition: all var(--dur-fast) var(--ease-out);
}
.panel:hover .panel__arrow {
  transform: translateX(4px); color: #fff;
  background: var(--topic-color, var(--color-primary));
}

/* Labels */
.label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--radius-full);
}
.label--trending { background: color-mix(in srgb, #F59E0B 12%, transparent); color: #F59E0B; }

/* Trending Cards */
.trending-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.trending-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--surface-card); border: 1px solid var(--surface-border);
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-normal) var(--ease-out);
  position: relative; overflow: hidden;
}
.trending-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--topic-color, var(--color-orange));
}
.trending-card:hover {
  border-color: var(--topic-color); background: var(--surface-card-hover);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.trending-card__icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); flex-shrink: 0;
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, transparent);
}
.trending-card__info { flex: 1; min-width: 0; }
.trending-card__topic { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 2px; color: color-mix(in srgb, var(--topic-color, currentColor) 65%, white) !important; }
.trending-card__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.trending-card__arrow {
  color: var(--text-muted); flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.trending-card:hover .trending-card__arrow { transform: translateX(3px); color: var(--topic-color); }

/* Quick Links Grid */
.quick-links-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.quick-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-full); min-height: 38px;
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 8%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 20%, transparent);
  font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.quick-link:hover {
  border-color: var(--topic-color); color: var(--topic-color, var(--text-primary));
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 16%, var(--surface-card));
  box-shadow: 0 0 12px color-mix(in srgb, var(--topic-color, var(--color-primary)) 20%, transparent);
}
.quick-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.quick-link__icon { flex-shrink: 0; }

/* Topic Filter */
.topic-filter {
  position: relative; margin-bottom: 16px;
}
.topic-filter__input {
  width: 100%; max-width: 400px; padding: 10px 14px 10px 40px; height: 44px;
  border: 1px solid var(--surface-border); border-radius: var(--radius-md);
  background: var(--surface-card); color: var(--text-primary);
  font-family: var(--font-body); font-size: 14px; outline: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.topic-filter__input:focus { border-color: var(--color-orange); box-shadow: 0 0 0 3px var(--color-orange-subtle); }
.topic-filter__input::placeholder { color: var(--text-muted); }
.topic-filter__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* Topics List (all topics) */
.topics-list { display: flex; flex-direction: column; gap: 0; }
.topic-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 5%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border-bottom: 1px solid var(--surface-divider);
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-fast) var(--ease-out);
}
.topic-row:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.topic-row:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom: none; }
.topic-row:hover { background: var(--surface-card-hover); }
.topic-row__icon {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, transparent);
}
.topic-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.topic-row__name { font-size: 15px; font-weight: 600; }
.topic-row__desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.topic-row__count { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.topic-row__tags { display: flex; gap: 4px; flex-shrink: 0; }
.topic-row__arrow { color: var(--text-muted); flex-shrink: 0; transition: transform var(--dur-fast) var(--ease-out); }
.topic-row:hover .topic-row__arrow { transform: translateX(3px); color: var(--topic-color); }

.mini-tag {
  font-size: 12px; padding: 3px 10px; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 8%, var(--surface-elevated));
  color: var(--text-secondary);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, var(--surface-border-subtle));
  white-space: nowrap;
}

@media (max-width: 768px) {
  .topic-row__tags { display: none; }
}

/* Tags Cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cloud-tag {
  padding: 6px 16px; border-radius: var(--radius-full); min-height: 34px;
  font-size: 13px; font-weight: 500; text-decoration: none;
  background: color-mix(in srgb, var(--tag-color, var(--color-primary)) 10%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--color-primary)) 18%, transparent);
  color: color-mix(in srgb, var(--tag-color, var(--text-secondary)) 70%, var(--text-secondary));
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex; align-items: center;
}
.cloud-tag:hover {
  border-color: var(--tag-color); color: var(--tag-color);
  background: color-mix(in srgb, var(--tag-color) 18%, var(--surface-card));
  box-shadow: 0 0 10px color-mix(in srgb, var(--tag-color) 15%, transparent);
}

/* ============================================
   PAGE HEADER (subcategories + content)
   ============================================ */
.page-header {
  padding: 28px 0 24px; position: relative; overflow: hidden;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--topic-color, var(--color-orange)) 0%, transparent 100%) 1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, var(--surface-bg)) 0%, color-mix(in srgb, var(--topic-color, var(--color-primary)) 4%, var(--surface-bg)) 100%);
}
.page-header--compact { padding: 20px 0 18px; }
.page-header__top { display: flex; align-items: center; gap: 16px; }
.page-header__icon {
  flex-shrink: 0; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 14%, transparent);
}
.page-header__title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.page-header__subtitle { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 14px; font-size: 13px;
}
.breadcrumb a {
  color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px; border-radius: var(--radius-xs); min-height: 28px;
  transition: all var(--dur-fast) var(--ease-out);
}
.breadcrumb a:hover { color: var(--text-primary); background: var(--overlay-hover); }
.breadcrumb a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.breadcrumb__sep { color: var(--text-muted); opacity: 0.5; display: flex; }
.breadcrumb__current { color: var(--text-primary); font-weight: 600; }

/* ============================================
   PAGE LAYOUT (main + sidebar)
   ============================================ */
.page-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) {
  .page-layout { grid-template-columns: 1fr 280px; }
}
.page-layout__main { min-width: 0; }
.page-layout__side { display: none; }
@media (min-width: 1024px) { .page-layout__side { display: block; } }

.section {
  padding: 40px 0; position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, transparent) var(--block-tint-opacity, 8%), transparent) 0%, transparent 100%);
}

/* Side Panel */
.side-panel {
  position: sticky; top: 72px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 5%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 10%, var(--surface-border));
  border-radius: var(--radius-lg); padding: 18px;
  overflow: hidden;
}
.side-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-step-2);
}
.side-panel__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--surface-border-subtle);
}
.side-panel__links { display: flex; flex-direction: column; gap: 2px; }
.side-panel__back {
  display: flex; align-items: center; gap: 6px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--surface-border-subtle);
  font-size: 13px; color: var(--text-secondary); text-decoration: none; min-height: 36px;
  transition: color var(--dur-fast) var(--ease-out);
}
.side-panel__back:hover { color: var(--color-orange); }

.side-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm); min-height: 40px;
  text-decoration: none; color: var(--text-secondary); font-size: 13px;
  transition: all var(--dur-fast) var(--ease-out);
}
.side-link:hover { background: var(--overlay-hover); color: var(--text-primary); }
.side-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.side-link__icon { flex-shrink: 0; }
.side-link__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link__count { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ============================================
   SUBCATEGORY PANELS
   ============================================ */
.sub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.sub-panel {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px; border-radius: var(--radius-md);
  background: linear-gradient(145deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 6%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 15%, var(--surface-border));
  border-top: 3px solid var(--topic-color, var(--color-primary));
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-normal) var(--ease-out);
  position: relative; overflow: hidden;
}
.sub-panel:hover {
  border-color: var(--topic-color, var(--color-primary));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--topic-color, var(--color-primary)) 15%, transparent);
  transform: translateY(-2px);
}
.sub-panel:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.sub-panel__top { display: flex; align-items: flex-start; gap: 12px; }
.sub-panel__icon {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, transparent);
}
.sub-panel__info { flex: 1; min-width: 0; }
.sub-panel__name { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.sub-panel__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.sub-panel__preview {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-elevated); border: 1px solid var(--surface-border-subtle);
}
.sub-panel__preview-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600; margin-bottom: 4px;
}
.sub-panel__preview-title {
  font-size: 13px; color: var(--text-secondary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}
.sub-panel__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--surface-border-subtle);
}
.sub-panel__count { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.sub-panel__arrow {
  color: var(--text-muted); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--topic-color, var(--color-primary)) 8%, transparent);
  transition: all var(--dur-fast) var(--ease-out);
}
.sub-panel:hover .sub-panel__arrow {
  transform: translateX(3px); color: #fff;
  background: var(--topic-color, var(--color-primary));
}

/* ============================================
   ARTICLE LIST (content overview)
   ============================================ */
.content-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border-subtle);
}
.content-toolbar__count {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
}
.content-toolbar__sort { display: flex; gap: 4px; }

.article-list { display: flex; flex-direction: column; gap: 8px; }
.article-panel {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 5%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, var(--surface-border));
  border-left: 3px solid var(--topic-color, var(--color-primary));
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-normal) var(--ease-out);
}
.article-panel:hover {
  border-color: var(--topic-color, var(--color-primary));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, transparent);
  transform: translateY(-2px);
}
.article-panel:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.article-panel__top { display: flex; gap: 14px; align-items: flex-start; }
.article-panel__num {
  font-size: 20px; font-weight: 800; color: var(--topic-color, var(--color-primary)); opacity: 0.6;
  flex-shrink: 0; min-width: 32px; line-height: 1;
}
.article-panel__info { flex: 1; min-width: 0; }
.article-panel__title { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.article-panel__excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.article-panel__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.article-panel__tags { display: flex; gap: 4px; flex-wrap: wrap; }
.article-panel__meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-shrink: 0;
}
.article-panel__meta span { display: flex; align-items: center; gap: 4px; }

/* ============================================
   ARTICLE DETAIL
   ============================================ */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 9999; background: transparent;
}
.reading-progress__bar { height: 100%; background: linear-gradient(90deg, var(--topic-color, var(--color-orange)), color-mix(in srgb, var(--topic-color, var(--color-orange)) 60%, var(--color-primary))); transition: width 100ms linear; }

.article-layout { padding: 0 0 48px; }
.article-layout__container {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  align-items: start; max-width: 1200px;
}
.article-layout__container--3col { grid-template-columns: 240px 1fr 220px; max-width: 1400px; }

@media (max-width: 1200px) {
  .article-layout__container--3col { grid-template-columns: 1fr; }
  .article-sidebar, .article-rsidebar { display: none; }
}

.article-detail { min-width: 0; }

/* Article hero image window */
.article-hero-img {
  margin: 0 0 24px; padding: 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-06dp);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-orange)) 20%, var(--surface-border));
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  position: relative; aspect-ratio: 2 / 1; max-height: 360px;
}
.article-hero-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s var(--ease-out);
}
.article-hero-img:hover img { transform: scale(1.02); }
@media (max-width: 768px) {
  .article-hero-img { max-height: 220px; border-radius: var(--radius-md); }
}

.article-detail__header {
  margin-bottom: 28px; padding: 24px; position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-orange)) 10%, var(--surface-card)) 0%, color-mix(in srgb, var(--topic-color, var(--color-orange)) 3%, var(--surface-card)) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-orange)) 20%, var(--surface-border));
  border-radius: var(--radius-lg); overflow: hidden;
}
.article-detail__header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--topic-color, var(--color-orange)), color-mix(in srgb, var(--topic-color, var(--color-orange)) 40%, var(--color-primary)));
}
.article-detail__badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.article-detail__title {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 800;
  line-height: 1.2; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text-primary) 0%, color-mix(in srgb, var(--text-primary) 80%, var(--topic-color, var(--color-orange))) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.article-detail__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 14px;
}
.article-detail__body { font-size: var(--text-body); line-height: 1.8; color: var(--text-secondary); padding-top: 8px; }
.article-detail__body h2 {
  font-size: var(--text-h3); font-weight: 700; color: var(--text-primary);
  margin: 32px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--topic-color, var(--color-orange)) 0%, transparent 60%) 1;
}
.article-detail__body h3 { font-size: var(--text-h4); font-weight: 600; color: var(--text-primary); margin: 24px 0 10px; }
.article-detail__body p { margin-bottom: 16px; }
.article-detail__body .article__intro {
  font-size: 1.1em; color: var(--text-primary); line-height: 1.7;
  margin-bottom: 24px; padding: 16px 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-orange)) 6%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border-left: 3px solid var(--topic-color, var(--color-orange)); border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-detail__body .article__quote {
  margin: 24px 0; padding: 16px 20px;
  border-left: 3px solid var(--topic-color, var(--color-orange));
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-orange)) 4%, var(--surface-elevated)) 0%, var(--surface-elevated) 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-primary); line-height: 1.6;
}
.article-detail__body ul {
  margin: 14px 0 18px; padding: 12px 12px 12px 32px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 3%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 10%, var(--surface-border-subtle));
}
.article-detail__body li { margin-bottom: 8px; line-height: 1.7; color: var(--text-secondary); }
.article-detail__body li::marker { color: var(--topic-color, var(--color-orange)); }
.article-detail__back { margin-top: 28px; text-align: center; }

/* RSS Source Box */
.rss-source-box {
  margin: 28px 0; padding: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-orange)) 6%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid var(--topic-color, var(--color-orange)); border-radius: var(--radius-md);
  position: relative; overflow: hidden;
}
.rss-source-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--topic-color, var(--color-orange)), color-mix(in srgb, var(--topic-color, var(--color-orange)) 40%, var(--color-primary)));
}
.rss-source-box__icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--topic-color, var(--color-orange)) 12%, transparent);
  color: var(--topic-color, var(--color-orange));
  flex-shrink: 0;
}
.rss-source-box__info { flex: 1; min-width: 200px; }
.rss-source-box__title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.rss-source-box__meta { font-size: 12px; color: var(--text-muted); }

.container--narrow { max-width: 760px; }

/* Badges & Tags */
.article-card__badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.article-card__badge--age { background: var(--surface-elevated) !important; color: var(--text-secondary) !important; }
.tag, .mini-tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
  background: var(--surface-elevated); color: var(--text-muted);
  border: 1px solid var(--surface-border-subtle);
}
.article-card__tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* Age dots */
.age-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 2px; }
.age-dot--green { background: #22C55E; }
.age-dot--yellow { background: #EAB308; }
.age-dot--red { background: #EF4444; }

/* TOC */
.toc {
  margin-bottom: 28px; padding: 16px 18px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 4%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 15%, var(--surface-border));
  border-radius: var(--radius-md);
}
.toc::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--topic-color, var(--color-primary)), color-mix(in srgb, var(--topic-color, var(--color-primary)) 30%, transparent));
}
.toc__header { display: flex; align-items: center; gap: 8px; }
.toc__icon { color: var(--text-muted); display: flex; }
.toc__title { font-size: 13px; font-weight: 700; flex: 1; }
.toc__toggle {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 6px; border-radius: var(--radius-sm); display: flex; min-width: 32px; min-height: 32px;
  align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.toc__toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.toc__toggle:hover { background: var(--overlay-hover); }
.toc__toggle-icon { transition: transform var(--dur-fast) var(--ease-out); display: flex; }
.toc--collapsed .toc__toggle-icon { transform: rotate(-90deg); }
.toc__list { margin: 10px 0 0; padding-left: 16px; list-style: decimal; }
.toc--collapsed .toc__list { display: none; }
.toc__item { margin-bottom: 4px; }
.toc__link { font-size: 13px; color: var(--text-secondary); text-decoration: none; line-height: 1.5; }
.toc__link:hover { color: var(--topic-color, var(--color-orange)); }

/* Share bar */
.share-bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.share-bar__label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.share-bar__buttons { display: flex; gap: 6px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1px solid var(--surface-border); background: var(--surface-card);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: var(--font-body);
  transition: all var(--dur-fast) var(--ease-out);
}
.share-btn:focus-visible { outline: 2px solid var(--topic-color, var(--color-orange)); outline-offset: 2px; }
.share-btn:hover {
  border-color: var(--topic-color, var(--color-orange)); color: var(--topic-color, var(--color-orange));
  background: color-mix(in srgb, var(--topic-color, var(--color-orange)) 10%, transparent);
}

/* Author box */
.author-box {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; margin: 24px 0; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 5%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 15%, var(--surface-border));
  border-radius: var(--radius-md);
}
.author-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--topic-color, var(--color-primary)), color-mix(in srgb, var(--topic-color, var(--color-primary)) 30%, transparent));
}
.author-box__avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.author-box__label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.author-box__name { font-size: 14px; font-weight: 700; margin: 2px 0 4px; }
.author-box__bio { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Related articles */
.related-articles { margin: 28px 0; }
.related-articles__title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.related-articles__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.related-card {
  padding: 14px 16px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 3%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid var(--surface-border);
  text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-fast) var(--ease-out);
}
.related-card:focus-visible { outline: 2px solid var(--topic-color, var(--color-orange)); outline-offset: 2px; }
.related-card:hover {
  border-color: var(--topic-color, var(--color-orange));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--topic-color, var(--color-orange)) 15%, transparent);
  transform: translateY(-2px);
}
.related-card__badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); display: inline-block; margin-bottom: 6px; }
.related-card__title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}
.related-card__meta { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* Article nav (prev/next) */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--surface-border-subtle); }
.article-nav__link {
  display: flex; flex-direction: column; gap: 4px; min-height: 64px;
  padding: 14px 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 3%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary);
  transition: all var(--dur-fast) var(--ease-out);
}
.article-nav__link:focus-visible { outline: 2px solid var(--topic-color, var(--color-orange)); outline-offset: 2px; }
.article-nav__link:hover {
  border-color: var(--topic-color, var(--color-orange));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--topic-color, var(--color-orange)) 12%, transparent);
}
.article-nav__link--next { text-align: right; }
.article-nav__label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.article-nav__title {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}

/* ---- Left Sidebar ---- */
.article-sidebar {
  position: sticky; top: 72px; max-height: calc(100vh - 90px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-border) transparent;
  background: var(--surface-card); border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 15%, var(--surface-border));
  border-radius: var(--radius-lg); overflow: hidden;
  border-top: 3px solid var(--topic-color, var(--color-primary));
}
.article-sidebar__header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--surface-border-subtle);
  position: sticky; top: 0; background: var(--surface-card); z-index: 1;
}
.article-sidebar__icon { flex-shrink: 0; }
.article-sidebar__topic { font-size: 13px; font-weight: 700; }
.article-sidebar__sub { font-size: 11px; color: var(--text-muted); }
.article-sidebar__nav { padding: 6px 0; }
.article-sidebar__list { list-style: none; }
.article-sidebar__item { border-left: 2px solid transparent; transition: all var(--dur-fast) var(--ease-out); }
.article-sidebar__item--active {
  border-left-color: var(--topic-color, var(--color-orange));
  background: color-mix(in srgb, var(--topic-color, var(--color-orange)) 8%, transparent);
}
.article-sidebar__link {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 10px; text-decoration: none; color: var(--text-secondary); min-height: 40px;
  font-size: 13px; line-height: 1.4; transition: all var(--dur-fast) var(--ease-out);
}
.article-sidebar__link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.article-sidebar__link:hover { color: var(--text-primary); background: var(--overlay-hover); }
.article-sidebar__item--active .article-sidebar__link { color: var(--text-primary); font-weight: 600; }
.article-sidebar__num { font-size: 10px; font-weight: 700; color: var(--text-muted); opacity: 0.5; flex-shrink: 0; min-width: 14px; }
.article-sidebar__item--active .article-sidebar__num { color: var(--topic-color, var(--color-orange)); opacity: 1; }
.article-sidebar__link-text {
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}
.article-sidebar__read { font-size: 10px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.article-sidebar__footer { padding: 8px 12px; border-top: 1px solid var(--surface-border-subtle); }

/* ---- Right Sidebar ---- */
.article-rsidebar {
  position: sticky; top: 72px; max-height: calc(100vh - 90px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-border) transparent;
}
.rsidebar__section {
  background: linear-gradient(135deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 3%, var(--surface-card)) 0%, var(--surface-card) 100%);
  border: 1px solid color-mix(in srgb, var(--topic-color, var(--color-primary)) 12%, var(--surface-border));
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.rsidebar__section::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--topic-color, var(--color-primary));
}
.rsidebar__badge { font-size: 13px; font-weight: 600; text-align: center; padding: 4px 0; }
.rsidebar__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--surface-border-subtle);
}
.rsidebar__links { list-style: none; }
.rsidebar__link-item { margin-bottom: 1px; }
.rsidebar__link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: var(--radius-sm); min-height: 40px;
  text-decoration: none; color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
}
.rsidebar__link:hover { background: var(--overlay-hover); color: var(--text-primary); }
.rsidebar__link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.rsidebar__link--internal:hover { color: var(--topic-color, var(--color-orange)); }
.rsidebar__link-name { font-size: 12px; font-weight: 500; line-height: 1.3; }
.rsidebar__link-type { font-size: 10px; color: var(--text-muted); }

/* ============================================
   AD COMPONENTS
   ============================================ */
.ad { margin: 24px 0; border-radius: var(--radius-md); position: relative; overflow: hidden; }
.ad__label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); opacity: 0.7; margin-bottom: 6px; }
.ad--native { padding: 14px 16px; background: var(--surface-card); border: 1px dashed var(--surface-border); transition: border-color var(--dur-fast) var(--ease-out); }
.ad--native:hover { border-color: var(--color-primary); border-style: solid; }
.ad__native-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-primary); }
.ad__icon { font-size: 28px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-elevated); flex-shrink: 0; }
.ad__content { flex: 1; min-width: 0; }
.ad__title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.ad__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.ad__cta { font-size: 13px; font-weight: 600; color: var(--color-primary); white-space: nowrap; flex-shrink: 0; }
.ad--banner { padding: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 6%, var(--surface-card)), var(--surface-card)); border: 1px solid color-mix(in srgb, var(--color-primary) 15%, var(--surface-border)); border-radius: var(--radius-md); }
.ad__banner-inner { display: flex; align-items: center; gap: 12px; }
.ad__cta-btn { display: inline-flex; align-items: center; padding: 6px 14px; background: var(--color-primary); color: #FFF; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; font-family: var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: all var(--dur-fast) var(--ease-out); }
.ad__cta-btn:hover { background: var(--color-primary-hover); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: 48px; padding: 40px 0 28px;
  background: var(--surface-card); border-top: 3px solid transparent; border-image: var(--gradient-cta) 1;
  position: relative;
}
.footer__start {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; padding-bottom: 24px;
  border-bottom: 1px solid var(--surface-divider);
}
.footer__start-title {
  width: 100%; font-size: 13px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.footer__start-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-full); min-height: 36px;
  background: var(--surface-elevated); border: 1px solid var(--surface-border);
  font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.footer__start-link:hover { border-color: var(--color-orange); color: var(--text-primary); background: var(--color-orange-subtle); }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer__col-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin-bottom: 12px; }
.footer__col-list { list-style: none; }
.footer__col-link {
  display: block; padding: 5px 0; font-size: 13px; color: var(--text-secondary); text-decoration: none;
  min-height: 32px; display: flex; align-items: center;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__col-link:hover { color: var(--color-orange); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid var(--surface-border-subtle); }
.footer__legal { display: flex; gap: 16px; }
.footer__legal-link { font-size: 12px; color: var(--text-muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer__legal-link:hover { color: var(--color-orange); }
.footer__copyright { font-size: 12px; color: var(--text-muted); }
.footer__brand { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.footer__brand strong { color: var(--text-primary); }

/* ============================================
   FEED FILTERS & CARDS
   ============================================ */

/* Widgets Bar */
.widgets-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
  margin-top: 32px; margin-bottom: 24px;
}
.widget {
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--gradient-card); border: 1px solid var(--surface-border);
  position: relative; overflow: hidden;
}
.widget::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.widget--clock::before { background: var(--gradient-step-1); }
.widget--stats::before { background: var(--gradient-step-2); }
.widget--chart::before { background: var(--gradient-step-3); }
.widget--lang::before { background: var(--gradient-accent); }

.widget__header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.widget__icon {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.widget__icon--orange { background: var(--color-orange-subtle); color: var(--color-orange); }
.widget__icon--purple { background: var(--color-primary-subtle); color: var(--color-primary); }
.widget__icon--teal { background: var(--color-secondary-subtle); color: var(--color-secondary); }
.widget__icon--blue { background: var(--color-info-subtle); color: var(--color-info); }
.widget__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Clock widget */
.widget__clock {
  font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--text-primary); line-height: 1; letter-spacing: -0.5px;
  font-family: var(--font-mono);
}
.widget__clock-date {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
}

/* Stats widget */
.widget__stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.widget__stat { text-align: center; }
.widget__stat-num {
  display: block; font-size: 22px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.widget__stat-label {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}

/* Chart widget */
.widget__chart-wrap {
  display: flex; align-items: center; justify-content: center;
}

/* Language bars widget */
.widget__lang-bars { display: flex; flex-direction: column; gap: 10px; }
.widget__lang-row {
  display: flex; align-items: center; gap: 8px;
}
.widget__lang-flag { font-size: 16px; flex-shrink: 0; }
.widget__lang-bar-track {
  flex: 1; height: 8px; border-radius: 4px;
  background: var(--surface-06dp); overflow: hidden;
}
.widget__lang-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.6s var(--ease-out);
}
.widget__lang-bar-fill--nl { background: var(--gradient-step-1); }
.widget__lang-bar-fill--en { background: var(--gradient-accent); }
.widget__lang-pct {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  min-width: 32px; text-align: right; font-variant-numeric: tabular-nums;
}

/* Empty state */
.feed-empty {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
  border: 1px dashed var(--surface-border); border-radius: var(--radius-md); margin-top: 20px;
}
.feed-empty__title { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.feed-empty__sub { margin-top: 4px; font-size: 13px; }

/* Filter bar */
.feed-filters {
  margin-top: 28px; padding: 24px; border-radius: var(--radius-lg);
  background: var(--gradient-card); border: 1px solid var(--surface-border);
  position: relative; overflow: hidden;
}
.feed-filters::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-cta); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.feed-filters__search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--surface-input); border: 1px solid var(--surface-border);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  color: var(--text-muted);
}
.feed-filters__search:focus-within {
  border-color: var(--color-orange); box-shadow: 0 0 0 3px var(--color-orange-subtle);
}
.feed-filters__input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 14px; color: var(--text-primary); font-family: var(--font-body);
}
.feed-filters__input::placeholder { color: var(--text-muted); }

.feed-filters__row {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px;
}
.feed-filters__group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feed-filters__label {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Filter chips */
.feed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 100px; border: 1px solid var(--surface-border); min-height: 34px;
  background: var(--surface-card); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body);
  transition: all var(--dur-fast) var(--ease-out);
}
.feed-chip:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.feed-chip:hover {
  border-color: var(--color-primary-muted); background: var(--color-primary-subtle);
  color: var(--text-primary);
}
.feed-chip--active {
  background: var(--gradient-cta); color: #fff; border-color: transparent;
  font-weight: 600; box-shadow: var(--shadow-glow-orange);
}
.feed-chip--active:hover { opacity: 0.9; }
.feed-chip__count {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 100px;
  background: rgba(255,255,255,0.15);
}
.feed-chip--active .feed-chip__count { background: rgba(255,255,255,0.25); }

/* Select dropdowns */
.feed-filters__select {
  padding: 6px 28px 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border); background: var(--surface-input);
  color: var(--text-primary); font-size: 12px; font-family: var(--font-body);
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9E9E' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.feed-filters__select:focus { border-color: var(--color-orange); outline: none; box-shadow: 0 0 0 2px var(--color-orange-subtle); }
.feed-filters__select:hover { border-color: var(--color-orange-muted); }

/* Filter status */
.feed-filters__status {
  display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--surface-divider);
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}
.feed-filters__status span { font-weight: 700; color: var(--color-primary); }

/* Feed list */
.feed-list { display: flex; flex-direction: column; gap: 2px; margin-top: 24px; }

/* Feed card */
.feed-card {
  display: flex; gap: 14px; padding: 14px 16px; min-height: 56px;
  border-radius: var(--radius-md); text-decoration: none; color: inherit;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}
.feed-card:nth-child(odd) { background: linear-gradient(90deg, color-mix(in srgb, var(--topic-color, var(--color-primary)) 3%, var(--surface-card)) 0%, var(--surface-card) 100%); }
.feed-card:hover {
  background: var(--surface-card-hover); border-color: var(--surface-border);
  transform: translateX(4px);
}
.feed-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; border-radius: var(--radius-md); }

.feed-card__left {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; padding-top: 2px;
}
.feed-card__num {
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
  opacity: 0.7; line-height: 1;
}
.feed-card__type-icon {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.feed-card__type-icon--article { background: var(--color-primary-subtle); color: var(--color-primary); }
.feed-card__type-icon--feed { background: var(--color-accent-subtle); color: var(--color-accent); }
.feed-card__type-icon--feed-general { background: var(--color-secondary-subtle); color: var(--color-secondary); }

.feed-card__body { flex: 1; min-width: 0; }
.feed-card__title {
  font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-card:hover .feed-card__title { color: var(--color-orange); }

.feed-card__excerpt {
  font-size: 13px; line-height: 1.5; color: var(--text-secondary); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.feed-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px;
}
.feed-card__source {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px;
  background: color-mix(in srgb, var(--src-color, var(--color-primary)) 12%, transparent);
  color: var(--src-color, var(--color-primary));
}
.feed-card__lang {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  background: var(--surface-06dp); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.feed-card__lang--nl { background: var(--color-info-subtle); color: var(--color-info); }
.feed-card__read, .feed-card__date, .feed-card__ext {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--text-muted);
}
.feed-card__ext { color: var(--color-secondary); }

/* Feed card image thumbnail */
.feed-card__img {
  flex-shrink: 0; width: 100px; height: 68px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-06dp);
  align-self: center;
}
.feed-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform var(--dur-normal) var(--ease-out);
}
.feed-card:hover .feed-card__img img { transform: scale(1.06); }
@media (max-width: 600px) {
  .feed-card__img { width: 72px; height: 52px; }
}

/* Feed footer */
.feed-footer {
  display: flex; align-items: center; gap: 6px; margin-top: 16px; padding: 12px 16px;
  border-radius: var(--radius-sm); background: var(--surface-card);
  font-size: 11px; color: var(--text-muted);
}

/* ============================================
   WEATHER WIDGETS
   ============================================ */

.weather-widget__loading {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; font-size: 13px; color: var(--text-muted);
}
.weather-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--surface-border); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}

/* ── Hero mode (dashboard) ── */
.weather-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 16px; padding: 12px 18px;
  background: rgba(11,15,26,0.55); border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.weather-hero__main {
  display: flex; align-items: center; gap: 8px;
}
.weather-hero__emoji { font-size: 24px; }
.weather-hero__temp { font-size: 22px; font-weight: 700; color: #fff; }
.weather-hero__label { font-size: 13px; color: rgba(255,255,255,0.85); }
.weather-hero__pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto;
}
.weather-hero__pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.12); border-radius: var(--radius-full);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
}

/* ── Compact mode (content overview sidebar) ── */
.weather-compact {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.weather-compact__emoji { font-size: 18px; }
.weather-compact__temp { font-weight: 700; color: var(--text-primary); }
.weather-compact__sep { color: var(--text-muted); }
.weather-compact__wind { display: inline-flex; align-items: center; gap: 3px; color: var(--text-secondary); }
.weather-compact__moon { font-size: 16px; }

/* ── Topbar mode ── */
.weather-topbar {
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-secondary);
}
.weather-topbar__item {
  display: inline-flex; align-items: center; gap: 3px;
}
.weather-widget--topbar { display: contents; }
@media (max-width: 768px) {
  .weather-widget--topbar { display: none; }
}

/* ── Sidebar mode (topic page + article) ── */
.weather-sidebar {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.weather-sidebar__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--surface-border-subtle);
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(14,165,233,0.04) 100%);
}
.weather-sidebar__icon { font-size: 36px; line-height: 1; }
.weather-sidebar__temp { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.weather-sidebar__label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.weather-sidebar__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--surface-border-subtle);
}
.weather-sidebar__item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; background: var(--surface-card);
}
.weather-sidebar__item-icon { color: var(--text-muted); }
.weather-sidebar__item-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.weather-sidebar__item-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.weather-sidebar__sun {
  padding: 14px 16px; border-top: 1px solid var(--surface-border-subtle);
}
.weather-sidebar__sun-row {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary);
  margin-bottom: 8px;
}
.weather-sidebar__sun-row span { display: inline-flex; align-items: center; gap: 4px; }
.weather-sidebar__sun-track {
  position: relative; height: 6px; background: var(--surface-03dp);
  border-radius: var(--radius-full); overflow: visible;
}
.weather-sidebar__sun-fill {
  height: 100%; background: linear-gradient(90deg, #F59E0B, #F97316);
  border-radius: var(--radius-full); transition: width 0.5s ease;
}
.weather-sidebar__sun-dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: 14px; filter: drop-shadow(0 0 4px rgba(249,115,22,0.5));
}
.weather-sidebar__sun-label {
  font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 6px;
}

.weather-sidebar__moon {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--surface-border-subtle);
  background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, transparent 100%);
}
.weather-sidebar__moon-emoji { font-size: 22px; }
.weather-sidebar__moon-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.weather-sidebar__moon-pct { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* ── Full mode (article detail) ── */
.weather-full {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.weather-full__top {
  display: flex; gap: 20px; padding: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(14,165,233,0.04) 100%);
  border-bottom: 1px solid var(--surface-border-subtle);
  flex-wrap: wrap;
}
.weather-full__current { display: flex; align-items: center; gap: 12px; }
.weather-full__emoji { font-size: 48px; line-height: 1; }
.weather-full__temp-wrap { display: flex; flex-direction: column; }
.weather-full__temp { font-size: 32px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.weather-full__feels { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.weather-full__desc { font-size: 14px; color: var(--text-secondary); align-self: center; }
.weather-full__details { display: flex; flex-direction: column; gap: 4px; margin-left: auto; }
.weather-full__detail {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.weather-full__detail strong { color: var(--text-primary); font-weight: 600; }

.weather-full__section { padding: 16px 20px; border-bottom: 1px solid var(--surface-border-subtle); }
.weather-full__section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.03em;
}

.weather-full__hourly {
  display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px;
}
.weather-full__hour {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 56px; padding: 8px 6px;
  background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.weather-full__hour-time { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.weather-full__hour-emoji { font-size: 18px; }
.weather-full__hour-temp { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.weather-full__hour-rain { font-size: 10px; color: var(--color-info); }

.weather-full__forecast { display: flex; flex-direction: column; gap: 2px; }
.weather-full__day {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.weather-full__day-name { font-size: 13px; font-weight: 600; color: var(--text-primary); min-width: 60px; }
.weather-full__day-emoji { font-size: 20px; }
.weather-full__day-temps { font-size: 13px; color: var(--text-secondary); min-width: 80px; }
.weather-full__day-rain { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; margin-left: auto; }

.weather-full__bottom { padding: 16px 20px; }
.weather-full__sun-moon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.weather-full__sun-card, .weather-full__moon-card {
  padding: 14px; background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.weather-full__sun-card h5, .weather-full__moon-card h5 {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em;
}
.weather-full__sun-times {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px;
}
.weather-full__sun-times strong { color: var(--text-primary); }
.weather-full__sun-track {
  position: relative; height: 6px; background: var(--surface-04dp);
  border-radius: var(--radius-full); overflow: visible; margin-bottom: 6px;
}
.weather-full__sun-fill {
  height: 100%; background: linear-gradient(90deg, #F59E0B, #F97316);
  border-radius: var(--radius-full);
}
.weather-full__sun-dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: 14px; filter: drop-shadow(0 0 4px rgba(249,115,22,0.5));
}
.weather-full__sun-length { font-size: 11px; color: var(--text-muted); }

.weather-full__moon-card { text-align: center; }
.weather-full__moon-big { font-size: 40px; margin: 4px 0; }
.weather-full__moon-phase { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.weather-full__moon-pct { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.weather-full__meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 20px; font-size: 11px; color: var(--text-muted);
  border-top: 1px solid var(--surface-border-subtle);
  background: var(--surface-02dp);
}

/* Weather widget in sidebar panel */
.weather-widget--sidebar { margin-bottom: 12px; }
.weather-widget--compact { margin-bottom: 0; }
.rsidebar__section--weather .weather-widget--sidebar { margin-bottom: 0; }

/* ============================================
   MARINE & TIDES WIDGETS
   ============================================ */

.marine-widget--sidebar { margin-bottom: 12px; }
.marine-widget--compact { margin-bottom: 0; }

/* ── Marine Hero ── */
.marine-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 8px; padding: 10px 18px;
  background: rgba(11,15,26,0.45); border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.marine-hero__main { display: flex; align-items: center; gap: 8px; }
.marine-hero__emoji { font-size: 22px; }
.marine-hero__temp { font-size: 20px; font-weight: 700; color: #fff; }
.marine-hero__label { font-size: 13px; color: rgba(255,255,255,0.85); }
.marine-hero__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.marine-hero__pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.12); border-radius: var(--radius-full);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
}

/* ── Marine Compact ── */
.marine-compact {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.marine-compact__emoji { font-size: 18px; }
.marine-compact__temp { font-weight: 700; color: var(--text-primary); }

/* ── Marine Sidebar ── */
.marine-sidebar {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.marine-sidebar__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--surface-border-subtle);
  background: linear-gradient(135deg, rgba(14,165,233,0.08) 0%, rgba(6,182,212,0.04) 100%);
}
.marine-sidebar__icon { font-size: 32px; line-height: 1; }
.marine-sidebar__temp { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.marine-sidebar__label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.marine-sidebar__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--surface-border-subtle);
}
.marine-sidebar__item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; background: var(--surface-card);
}
.marine-sidebar__item-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.marine-sidebar__item-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.marine-sidebar__tides {
  padding: 12px 16px; border-top: 1px solid var(--surface-border-subtle);
}
.marine-sidebar__tides-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em;
}
.marine-sidebar__tide-status { font-size: 11px; font-weight: 500; text-transform: none; }
.marine-sidebar__tide {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px;
}
.marine-sidebar__tide-emoji { font-size: 14px; }
.marine-sidebar__tide-time { font-weight: 700; color: var(--text-primary); min-width: 44px; }
.marine-sidebar__tide-label { color: var(--text-secondary); font-size: 12px; }

.marine-sidebar__ferries {
  padding: 12px 16px; border-top: 1px solid var(--surface-border-subtle);
}
.marine-sidebar__ferries-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em;
}
.marine-sidebar__ferry {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px;
}
.marine-sidebar__ferry-name { font-weight: 600; color: var(--text-primary); min-width: 100px; }
.marine-sidebar__ferry-time { color: var(--text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }

.marine-sidebar__holiday {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--surface-border-subtle);
  background: linear-gradient(135deg, rgba(249,115,22,0.06) 0%, transparent 100%);
  font-size: 13px;
}
.marine-sidebar__holiday-name { font-weight: 600; color: var(--text-primary); }
.marine-sidebar__holiday-days { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* ── Marine Full ── */
.marine-full {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.marine-full__top {
  display: flex; gap: 20px; padding: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(14,165,233,0.08) 0%, rgba(6,182,212,0.04) 100%);
  border-bottom: 1px solid var(--surface-border-subtle);
}
.marine-full__current { display: flex; align-items: center; gap: 12px; }
.marine-full__emoji { font-size: 44px; line-height: 1; }
.marine-full__temp-wrap { display: flex; flex-direction: column; }
.marine-full__temp { font-size: 30px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.marine-full__feels { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.marine-full__desc { font-size: 14px; color: var(--text-secondary); align-self: center; }
.marine-full__details { display: flex; flex-direction: column; gap: 4px; margin-left: auto; }
.marine-full__detail {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.marine-full__detail strong { color: var(--text-primary); font-weight: 600; }

.marine-full__section { padding: 16px 20px; border-bottom: 1px solid var(--surface-border-subtle); }
.marine-full__section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.03em;
}

.marine-full__hourly { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.marine-full__hour {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 56px; padding: 8px 6px;
  background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.marine-full__hour-time { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.marine-full__hour-wave { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.marine-full__hour-temp { font-size: 10px; color: var(--color-info); }

.marine-full__forecast { display: flex; flex-direction: column; gap: 2px; }
.marine-full__day {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.marine-full__day-name { font-size: 13px; font-weight: 600; color: var(--text-primary); min-width: 40px; }
.marine-full__day-wave { font-size: 13px; color: var(--text-secondary); min-width: 70px; }
.marine-full__day-desc { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* Tide status & stations */
.marine-full__tide-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; margin-bottom: 10px;
  background: var(--surface-02dp); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary);
}
.marine-full__stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
.marine-full__station {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface-02dp); border-radius: var(--radius-sm);
  font-size: 12px;
}
.marine-full__station-name { font-weight: 600; color: var(--text-primary); min-width: 110px; }
.marine-full__station-hw { color: var(--color-info); font-variant-numeric: tabular-nums; }
.marine-full__station-lw { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-left: auto; }

/* Ferries */
.marine-full__ferries { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.marine-full__ferry-route {
  padding: 12px; background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.marine-full__ferry-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 13px;
}
.marine-full__ferry-header strong { color: var(--text-primary); }
.marine-full__ferry-operator { font-size: 11px; color: var(--text-muted); }
.marine-full__ferry-times { display: flex; flex-direction: column; gap: 4px; }
.marine-full__ferry-dir {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
}
.marine-full__ferry-dir-label { font-weight: 600; color: var(--text-secondary); min-width: 50px; }
.marine-full__ferry-time {
  padding: 2px 8px; background: var(--surface-card); border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums;
}

/* Events */
.marine-full__events { display: flex; flex-direction: column; gap: 6px; }
.marine-full__event {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface-02dp); border-radius: var(--radius-sm);
}
.marine-full__event-emoji { font-size: 24px; }
.marine-full__event-info { display: flex; flex-direction: column; gap: 2px; }
.marine-full__event-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.marine-full__event-date { font-size: 11px; color: var(--text-muted); }

.marine-full__meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 20px; font-size: 11px; color: var(--text-muted);
  border-top: 1px solid var(--surface-border-subtle);
  background: var(--surface-02dp);
}

/* ── Marine responsive ── */
@media (max-width: 640px) {
  .marine-hero { flex-direction: column; align-items: flex-start; }
  .marine-hero__pills { margin-left: 0; }
  .marine-full__top { flex-direction: column; }
  .marine-full__details { margin-left: 0; }
  .marine-full__ferries { grid-template-columns: 1fr; }
  .marine-full__stations { grid-template-columns: 1fr; }
  .marine-sidebar__grid { grid-template-columns: 1fr; }
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10000; padding: 10px 20px; background: var(--color-primary); color: #FFF; font-weight: 600; font-size: 14px; border-radius: 0 0 var(--radius-md) var(--radius-md); text-decoration: none; transition: top var(--dur-fast) var(--ease-out); }
.skip-link:focus { top: 0; outline: 2px solid #FFF; outline-offset: 2px; }

@media (max-width: 900px) {
  .dash-hero__inner { flex-direction: column; align-items: flex-start; }
  .dash-hero__ad { width: 100%; }
  .dash-hero__ad-slot { width: 100%; height: 100px; }
}

@media (max-width: 640px) {
  .share-bar { flex-direction: column; align-items: flex-start; }
  .author-box { flex-direction: column; text-align: center; align-items: center; }
  .related-articles__grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .ad__native-link { flex-wrap: wrap; }
  .ad__banner-inner { flex-direction: column; text-align: center; }
  .carousel { padding: 0 32px; }
  .carousel__btn { width: 28px; height: 28px; }
  .panel { min-width: 240px; max-width: 270px; padding: 14px 16px; }
  .feed-filters { padding: 14px; }
  .feed-filters__row { flex-direction: column; gap: 12px; }
  .feed-chips { gap: 4px; }
  .feed-chip { padding: 4px 10px; font-size: 11px; }
  .feed-card { padding: 10px 12px; gap: 10px; }
  .feed-card__num { font-size: 12px; }
  .feed-card__title { font-size: 13px; }
  .feed-card__excerpt { display: none; }
  .feed-card__type-icon { width: 22px; height: 22px; }
  .dash-hero__brand { margin-bottom: 10px; }
  .dash-hero__stats { gap: 6px; }
  .stat-pill { padding: 5px 10px; font-size: 11px; }
  .widgets-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .widget { padding: 12px; }
  .widget__clock { font-size: 20px; }
  .widget__stat-num { font-size: 18px; }
  .widget__chart-wrap canvas { width: 100px !important; height: 100px !important; }
  .weather-hero { flex-direction: column; align-items: flex-start; }
  .weather-hero__pills { margin-left: 0; }
  .weather-full__top { flex-direction: column; }
  .weather-full__details { margin-left: 0; }
  .weather-full__sun-moon { grid-template-columns: 1fr; }
  .weather-full__hourly { gap: 4px; }
  .weather-full__hour { min-width: 48px; padding: 6px 4px; }
  .weather-sidebar__grid { grid-template-columns: 1fr; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
