:root {
  --bg: #28482f;
  --bg-soft: #fff1c2;
  --panel: rgba(255, 225, 143, 0.88);
  --panel-strong: rgba(255, 239, 184, 0.94);
  --line: rgba(67, 32, 8, 0.32);
  --line-strong: rgba(67, 32, 8, 0.48);
  --ink: #241204;
  --muted: rgba(36, 18, 4, 0.72);
  --accent: #9a4d32;
  --accent-soft: rgba(255, 224, 139, 0.44);
  --olive: #315f3d;
  --sky: #2f6a72;
  --gold: #c8952f;
  --shadow: 0 18px 46px rgba(24, 12, 4, 0.26);
  --inner-glow: inset 0 1px 0 rgba(255, 244, 196, 0.62), inset 0 -1px 0 rgba(72, 35, 9, 0.18);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --content-width: 1240px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
  --reader-font-size: 1.12rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(7, 24, 17, 0.58), rgba(7, 24, 17, 0.12) 24%, rgba(7, 24, 17, 0.1) 76%, rgba(7, 24, 17, 0.58)),
    radial-gradient(circle at 18% 12%, rgba(255, 222, 116, 0.2), transparent 24%),
    url("assets/aventara-forest-bg-wide.png") center top / cover fixed no-repeat,
    #29482f;
  font-family: var(--font-body);
}

body.is-loading .hero-story-count,
body.is-loading .hero-featured-story,
body.is-loading .story-grid,
body.is-loading .story-detail {
  opacity: 0.8;
}

body.is-loading .story-card-skeleton,
body.is-loading .story-skeleton-card,
body.is-loading .story-skeleton-line,
body.is-loading .story-card-image-skeleton,
body.is-loading .badge-skeleton {
  animation: storySkeletonPulse 1.4s ease-in-out infinite;
}

body.route-detail .hero,
body.route-detail .trust-strip {
  display: none;
}

body.route-detail .page-shell {
  max-width: 1160px;
}

body.reader-night {
  --ink: #f6ebd1;
  --muted: rgba(246, 235, 209, 0.82);
  --line: rgba(253, 224, 170, 0.16);
  --line-strong: rgba(253, 224, 170, 0.24);
  background:
    linear-gradient(180deg, rgba(7, 17, 14, 0.95), rgba(13, 26, 20, 0.98)),
    #08110d;
}

body.reader-night::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 212, 122, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(2, 10, 8, 0.2), rgba(2, 10, 8, 0.55));
}

body.reader-night .site-header,
body.reader-night .toolbar,
body.reader-night .site-footer,
body.reader-night .ad-slot,
body.reader-night .hero-card,
body.reader-night .story-card,
body.reader-night .story-detail,
body.reader-night .stat-card,
body.reader-night .discovery-panel,
body.reader-night .trust-card,
body.reader-night .related-stories {
  background:
    linear-gradient(180deg, rgba(22, 37, 30, 0.94), rgba(12, 24, 20, 0.94)),
    rgba(12, 24, 20, 0.92);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

body.reader-night .hero-copy,
body.reader-night .hero h1,
body.reader-night .hero-copy .eyebrow,
body.reader-night .hero-highlights span {
  color: #f6ebd1;
  text-shadow: none;
}

body.reader-night .hero-search-field input,
body.reader-night .field input,
body.reader-night .field select,
body.reader-night .secondary-button,
body.reader-night .secondary-link,
body.reader-night .reader-font-label,
body.reader-night .back-link {
  background: rgba(29, 48, 39, 0.9);
  color: var(--ink);
  border-color: rgba(253, 224, 170, 0.14);
}

body.route-detail.reader-focus .detail-meta-card,
body.route-detail.reader-focus .detail-context,
body.route-detail.reader-focus .detail-ad-slot,
body.route-detail.reader-focus .related-stories,
body.route-detail.reader-focus .mobile-detail-bar,
body.route-detail.reader-focus .site-footer {
  display: none !important;
}

body.route-detail.reader-focus #detailState {
  display: none !important;
}

body.route-detail.reader-focus .story-reading-layout {
  grid-template-columns: minmax(0, 1fr) 250px;
}

body.route-detail.reader-focus #detailTitle {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.02;
}

body.hide-detail-image .story-detail-media {
  display: none !important;
}

body.detail-image-lightbox-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 232, 166, 0.2), transparent 35%),
    linear-gradient(180deg, rgba(13, 34, 23, 0.08), rgba(13, 34, 23, 0.42));
}

a {
  color: inherit;
}

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

.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px;
}

.site-header,
.hero,
.toolbar,
.stats,
.story-grid,
.story-detail,
.site-footer,
.ad-slot {
  backdrop-filter: blur(10px);
}

.site-header,
.toolbar,
.site-footer,
.ad-slot,
.hero-card,
.story-card,
.story-detail,
.stat-card {
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255, 228, 150, 0.9), rgba(255, 239, 184, 0.86)),
    var(--panel);
  box-shadow: var(--shadow), var(--inner-glow);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
}

.brand {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #315f3d, #9a4d32);
  color: #fffaf1;
  font: 700 1.15rem/1 Georgia, "Times New Roman", serif;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong,
.hero h1,
.story-card-title,
#detailTitle,
.related-story-body h3 {
  font-family: var(--font-display);
}

.brand-copy span,
.site-nav a,
.lede,
.field span,
.story-card-summary,
.story-card-tags,
.detail-summary,
.detail-state,
.site-footer p,
.ad-slot p {
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-nav a,
.primary-link,
.back-link {
  text-decoration: none;
}

.hero {
  display: block;
  margin-top: 12px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.hero-stage,
.discovery-panel,
.toolbar,
.ad-slot,
.site-footer,
.story-detail {
  border-radius: var(--radius-xl);
}

.hero-copy {
  position: relative;
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  padding: 28px 28px;
  border: 1px solid rgba(255, 232, 166, 0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(29, 20, 9, 0.78), rgba(29, 20, 9, 0.56)),
    rgba(29, 20, 9, 0.46);
  box-shadow: var(--shadow);
  color: #fff2b8;
  text-shadow:
    0 2px 0 rgba(75, 33, 8, 0.88),
    0 8px 22px rgba(20, 8, 2, 0.42);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto -18px;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(176, 82, 46, 0.12);
  z-index: -1;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 900;
}

.hero-copy .eyebrow {
  color: #ffe08c;
}

.hero h1 {
  margin: 0;
  width: 100%;
  max-width: none;
  font-size: clamp(2.05rem, 4.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
  color: #fff2b8;
  text-wrap: balance;
}

.lede {
  max-width: 52rem;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 0;
  color: rgba(255, 246, 212, 0.92);
  font-weight: 600;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 232, 166, 0.34);
  border-radius: 999px;
  background: rgba(36, 18, 4, 0.36);
  color: #fff4c9;
  box-shadow: inset 0 1px 0 rgba(255, 238, 169, 0.2);
  font-size: 0.9rem;
}

.hero-quick-start {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-width: none;
  padding: 16px;
  border: 1px solid rgba(255, 232, 166, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(20, 12, 5, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 244, 196, 0.12);
}

.hero-quick-kicker {
  margin: 0;
  color: #fff3ca;
  font-weight: 900;
}

.hero-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-filter-field span {
  color: rgba(255, 241, 205, 0.88);
}

.hero-filter-field select {
  min-height: 52px;
  background: rgba(255, 245, 214, 0.92);
}

.hero-filter-actions {
  display: flex;
  justify-content: flex-start;
}

.hero-filter-actions .toolbar-toggle-button {
  display: inline-flex;
}

.hero-toolbar-panel {
  gap: 14px;
}

.hero-toolbar-panel .curated-filter-panel,
.hero-toolbar-panel .archive-legacy-controls {
  margin: 0;
  padding: 16px;
  border-color: rgba(255, 232, 166, 0.22);
  background: rgba(20, 12, 5, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 244, 196, 0.12);
}

.hero-toolbar-panel .curated-filter-label,
.hero-toolbar-panel .field span,
.hero-toolbar-panel .archive-legacy-copy p:last-child {
  color: rgba(255, 241, 205, 0.88);
}

.hero-toolbar-panel .curated-chip,
.hero-toolbar-panel .field input,
.hero-toolbar-panel .field select {
  background: rgba(255, 245, 214, 0.92);
}

.hero-featured-story {
  margin-top: 18px;
}

.hero-featured-link {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 232, 166, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(20, 12, 5, 0.32);
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 244, 196, 0.12);
}

.hero-featured-media {
  align-self: start;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 242, 184, 0.72), transparent 30%),
    linear-gradient(160deg, rgba(49, 95, 61, 0.72), rgba(154, 77, 50, 0.4)),
    #ead188;
}

.hero-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-featured-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.hero-featured-title,
.hero-featured-summary {
  overflow-wrap: anywhere;
}

.hero-featured-kicker {
  margin: 0;
  color: #fff3ca;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-featured-badges .badge {
  background: rgba(255, 244, 212, 0.18);
  color: #fff4d2;
}

.hero-featured-title {
  margin: 0;
  color: #fff4cf;
  font-family: var(--font-display);
  font-size: 1.48rem;
  line-height: 1.06;
}

.hero-featured-summary {
  margin: 0;
  color: rgba(255, 246, 212, 0.92);
  line-height: 1.5;
  font-size: 0.95rem;
}

.hero-featured-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 244, 212, 0.16);
  border: 1px solid rgba(255, 232, 166, 0.26);
  color: #fff4d2;
  font-weight: 800;
}

.archive-legacy-controls {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--inner-glow);
}

.archive-legacy-copy {
  display: grid;
  gap: 4px;
}

.archive-legacy-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.archive-legacy-controls .toolbar-toggle-button {
  display: inline-flex;
}

.archive-legacy-controls .toolbar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-feed-header {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 228, 150, 0.9), rgba(255, 239, 184, 0.84)),
    var(--panel);
  box-shadow: var(--shadow), var(--inner-glow);
}

.story-feed-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.story-feed-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-feed-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.curated-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 228, 150, 0.86), rgba(255, 239, 184, 0.78)),
    var(--panel);
  box-shadow: var(--shadow), var(--inner-glow);
}

.curated-filter-group {
  display: grid;
  gap: 10px;
  align-content: start;
}

.curated-filter-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curated-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.curated-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(104, 77, 40, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 221, 0.9);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.curated-chip.is-active {
  background: linear-gradient(180deg, rgba(248, 236, 176, 0.98), rgba(205, 225, 182, 0.82));
  border-color: rgba(111, 124, 69, 0.34);
  color: var(--olive);
}

.hero-side {
  display: none;
}

.hero-stage {
  position: relative;
  min-height: 420px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 236, 173, 0.28), transparent 32%),
    linear-gradient(180deg, rgba(22, 58, 38, 0.46), rgba(14, 34, 24, 0.18)),
    url("assets/aventara-forest-bg.png") center center / cover no-repeat;
  border: 1px solid rgba(255, 233, 163, 0.24);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 244, 196, 0.34);
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 21, 15, 0.04), rgba(9, 21, 15, 0.26)),
    radial-gradient(circle at 18% 24%, rgba(255, 208, 92, 0.18), transparent 20%);
  pointer-events: none;
}

.hero-stage-frame {
  position: absolute;
  inset: 0;
  background: url("assets/aventara-tree-stage-frame.png") center center / cover no-repeat;
  opacity: 0.92;
  pointer-events: none;
  z-index: 1;
}

.hero-stage-figures {
  position: absolute;
  inset: auto 22px 10px 22px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.hero-stage-figure {
  max-height: 300px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(14, 9, 5, 0.26));
}

.hero-stage-figure-franz {
  transform: translateY(18px) rotate(-4deg);
}

.hero-stage-figure-gurken {
  max-height: 270px;
  transform: translateY(12px) rotate(4deg);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  background:
    linear-gradient(155deg, rgba(255, 239, 184, 0.96), rgba(255, 224, 139, 0.74)),
    radial-gradient(circle at 78% 16%, rgba(49, 95, 61, 0.22), transparent 24%),
    radial-gradient(circle at 20% 78%, rgba(154, 77, 50, 0.18), transparent 28%);
  min-height: 240px;
  position: relative;
  overflow: hidden;
  z-index: 3;
  margin-top: 154px;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -42px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(176, 82, 46, 0.22);
  border-radius: 48% 52% 44% 56%;
}

.hero-card-label {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.84);
  color: var(--olive);
  font-size: 0.82rem;
}

.hero-card strong {
  font-size: 1.8rem;
  font-family: Georgia, "Times New Roman", serif;
}

.hero-card-footnote {
  margin: 0;
  color: rgba(36, 18, 4, 0.74);
  font-size: 0.92rem;
  line-height: 1.45;
}

.trust-strip {
  margin: 28px 0 18px;
  border: 1px solid rgba(67, 32, 8, 0.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 239, 184, 0.4), rgba(255, 224, 139, 0.18));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(48, 22, 5, 0.08);
  overflow: hidden;
}

.trust-strip-summary {
  display: none;
}

.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
}

.trust-card {
  padding: 18px;
  border-radius: 0;
  border: 1px solid rgba(67, 32, 8, 0.2);
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 249, 219, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 239, 184, 0.78), rgba(255, 224, 139, 0.28));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(48, 22, 5, 0.1);
}

.trust-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.34rem;
}

.trust-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 800;
}

.discovery-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255, 231, 158, 0.88), rgba(255, 239, 184, 0.76)),
    rgba(255, 224, 139, 0.22);
  box-shadow: var(--shadow), var(--inner-glow);
}

.discovery-header {
  display: grid;
  gap: 6px;
}

.discovery-header h2,
.discovery-group h3 {
  margin: 0;
  font-family: var(--font-display);
}

.discovery-header h2 {
  font-size: 1.8rem;
}

.discovery-header p:last-child {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 800;
}

.discovery-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.discovery-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 249, 219, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 239, 184, 0.52), rgba(255, 224, 139, 0.18));
  border: 1px solid rgba(67, 32, 8, 0.24);
  box-shadow: var(--inner-glow);
}

.discovery-group h3 {
  font-size: 1.12rem;
}

.discovery-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discovery-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(104, 77, 40, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 248, 221, 0.92), rgba(255, 231, 158, 0.76));
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(72, 48, 20, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.discovery-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(72, 48, 20, 0.12);
}

.discovery-chip.has-image {
  padding: 6px 16px 6px 8px;
}

.discovery-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #efe5d2;
  box-shadow: 0 5px 14px rgba(72, 48, 20, 0.12);
}

.discovery-chip.is-active {
  background: linear-gradient(180deg, rgba(248, 236, 176, 0.98), rgba(205, 225, 182, 0.82));
  border-color: rgba(111, 124, 69, 0.34);
  color: var(--olive);
}

.toolbar {
  padding: 18px;
  margin-bottom: 18px;
}

.toolbar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.toolbar-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 800;
}

.toolbar-toggle-button {
  flex: 0 0 auto;
  display: none;
}

.toolbar-panel {
  display: none;
}

.toolbar-panel.is-open {
  display: grid;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.94rem;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(102, 73, 38, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 234, 166, 0.34);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
}

.toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(104, 77, 40, 0.12);
}

.active-filters {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
}

.active-filter-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(111, 124, 69, 0.1);
  color: var(--olive);
  font-size: 0.84rem;
}

.toolbar-buttons,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.secondary-button,
.primary-link,
.detail-read-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  text-decoration: none;
}

.secondary-button {
  border: 1px solid rgba(104, 77, 40, 0.18);
  background: linear-gradient(135deg, rgba(255, 227, 142, 0.42), rgba(118, 68, 18, 0.14));
  color: var(--ink);
  cursor: pointer;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.96);
}

.detail-read-button {
  border: 0;
  cursor: pointer;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
}

.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  font-size: 1.45rem;
}

.ad-slot {
  padding: 18px 20px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(255, 231, 158, 0.86), rgba(255, 239, 184, 0.74));
}

.promotion-slot {
  display: grid;
  gap: 16px;
}

.promotion-slot-copy {
  display: grid;
  gap: 8px;
}

.promotion-headline {
  margin: 0;
  font-size: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
}

.ad-slot span {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(165, 82, 51, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
}

.promotion-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.promotion-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(104, 77, 40, 0.14);
  background: rgba(255, 251, 244, 0.88);
}

.promotion-card-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(111, 124, 69, 0.14);
  color: var(--olive);
  font-size: 0.8rem;
}

.promotion-card h3,
.empty-state h2 {
  margin: 0;
  font-family: var(--font-display);
}

.promotion-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.promotion-link {
  justify-self: start;
}

.promotion-disclaimer {
  font-size: 0.88rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.78);
}

.pagination-summary {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.secondary-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.story-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  position: relative;
}

.story-card-link {
  display: block;
  text-decoration: none;
  height: 100%;
}

.story-card-image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ead188;
  position: relative;
}

.story-card-image-wrap::after {
  display: none;
}

.story-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.story-card-image.is-character-fallback,
.story-detail-media img.is-character-fallback {
  object-fit: contain;
  object-position: center bottom;
  padding: 14px 12px 0;
  filter: drop-shadow(0 16px 30px rgba(22, 9, 3, 0.22));
}

.story-card-image-wrap.has-character-fallback,
.story-detail-media.has-character-fallback {
  background: #ead188;
}

.story-card-image-wrap.has-placeholder[data-placeholder-tone="bedtime"],
.story-detail-media.has-placeholder[data-placeholder-tone="bedtime"] {
  background: #2f375c;
}

.story-card-image-wrap.has-placeholder[data-placeholder-tone="learning"],
.story-detail-media.has-placeholder[data-placeholder-tone="learning"] {
  background: #29544b;
}

.story-card-image-wrap.has-placeholder[data-placeholder-tone="mystery"],
.story-detail-media.has-placeholder[data-placeholder-tone="mystery"] {
  background: #523851;
}

.story-card-image-wrap.has-placeholder[data-placeholder-tone="adventure"],
.story-detail-media.has-placeholder[data-placeholder-tone="adventure"] {
  background: #6a5530;
}

.story-image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: 20px;
  color: #fff2b8;
  text-align: center;
  background: #315f3d;
  text-shadow:
    0 2px 0 rgba(72, 35, 9, 0.72),
    0 8px 18px rgba(24, 10, 3, 0.24);
}

.story-image-placeholder[data-placeholder-tone="bedtime"] {
  background: #2f375c;
}

.story-image-placeholder[data-placeholder-tone="learning"] {
  background: #29544b;
}

.story-image-placeholder[data-placeholder-tone="mystery"] {
  background: #523851;
}

.story-image-placeholder[data-placeholder-tone="adventure"] {
  background: #6a5530;
}

.story-image-placeholder span {
  color: rgba(255, 238, 174, 0.9);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-image-placeholder strong {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 2px solid rgba(255, 232, 166, 0.42);
  border-radius: 50%;
  color: #fff7d7;
  background: rgba(36, 18, 4, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 238, 169, 0.24), 0 12px 24px rgba(22, 9, 3, 0.22);
}

.story-image-placeholder small {
  max-width: 180px;
  color: rgba(255, 246, 212, 0.88);
  font-weight: 850;
  line-height: 1.35;
}

.story-card:hover .story-card-image {
  transform: scale(1.03);
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 62px rgba(72, 48, 20, 0.18);
}

.story-card-skeleton {
  pointer-events: none;
}

.story-card-image-skeleton,
.story-skeleton-line,
.badge-skeleton {
  background:
    linear-gradient(90deg, rgba(255, 246, 219, 0.65), rgba(255, 232, 170, 0.94), rgba(255, 246, 219, 0.65));
}

.story-card-image-skeleton {
  min-height: 280px;
}

.story-skeleton-line {
  height: 16px;
  border-radius: 999px;
}

.story-skeleton-line-title {
  height: 28px;
  width: 78%;
}

.story-skeleton-line-short {
  width: 62%;
}

.badge-skeleton {
  min-width: 88px;
  min-height: 30px;
}

.story-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 247, 215, 0.88), rgba(255, 229, 151, 0.28)),
    rgba(255, 238, 174, 0.42);
}

.badge-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-context {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 224, 139, 0.2);
  border: 1px solid rgba(67, 32, 8, 0.2);
  max-width: 760px;
  width: 100%;
}

.detail-context-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.detail-context-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(104, 77, 40, 0.18);
  background: rgba(255, 238, 174, 0.54);
  color: var(--ink);
  text-decoration: none;
}

.sequence-link {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: left;
}

.sequence-link span {
  color: var(--muted);
  font-size: 0.84rem;
}

.sequence-link strong {
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(165, 82, 51, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
}

.meta-pill {
  background: rgba(111, 124, 69, 0.1);
  color: var(--olive);
}

.story-card-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.story-card-summary,
.story-card-tags,
.detail-summary,
.story-text p,
.detail-state {
  margin: 0;
  line-height: 1.6;
}

.story-card-tags {
  font-size: 0.92rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 241, 0.84);
  border: 1px dashed rgba(111, 124, 69, 0.35);
  margin-bottom: 20px;
}

.detail-view {
  margin-top: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(67, 32, 8, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 233, 0.82);
  box-shadow: var(--inner-glow);
  color: #7a3d1f;
}

.mobile-detail-bar {
  display: none;
}

.story-detail {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  min-width: 0;
}

.story-detail-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #ead188;
}

.detail-cover-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-cover-button:disabled {
  cursor: default;
}

.detail-cover-button img {
  transition: transform 180ms ease;
}

.detail-cover-button:hover img,
.detail-cover-button:focus-visible img {
  transform: scale(1.02);
}

.story-detail-media .story-image-placeholder {
  aspect-ratio: 1 / 1;
  min-height: 320px;
  border: 1px solid rgba(67, 32, 8, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--inner-glow);
}

.story-detail-media .story-image-placeholder strong {
  width: 112px;
  height: 112px;
  font-size: 3.1rem;
}

#detailTitle {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.primary-link {
  background: linear-gradient(135deg, #c7663d, #984725);
  color: #fff7ef;
}

.detail-state {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(111, 124, 69, 0.09);
}

.detail-share-row {
  display: flex;
}

.detail-share-button {
  width: 100%;
}

.reader-toolbar {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(67, 32, 8, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 233, 0.74);
  min-width: 0;
}

.reader-toolbar-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.reader-toolbar-body {
  display: grid;
  gap: 12px;
}

.reader-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reader-toolbar-focus {
  display: grid;
}

.reader-toggle-button {
  min-height: 42px;
}

.reader-toggle-button[aria-pressed="true"],
.detail-focus-button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(248, 236, 176, 0.98), rgba(205, 225, 182, 0.82));
  border-color: rgba(111, 124, 69, 0.34);
  color: var(--olive);
  box-shadow: inset 0 1px 0 rgba(255, 244, 196, 0.6);
}

.story-text {
  display: grid;
  gap: 14px;
  font-size: var(--reader-font-size);
}

.story-text p {
  max-width: 40ch;
  line-height: 1.94;
}

.story-text:focus {
  outline: none;
}

.story-text.has-paragraph-markers p {
  position: relative;
  padding-left: 18px;
}

.story-text.has-paragraph-markers p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.86em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(154, 77, 50, 0.5);
}

@keyframes storySkeletonPulse {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

.related-stories {
  display: grid;
  gap: 18px;
  margin-top: 8px;
  padding: 20px;
  border: 1px solid rgba(67, 32, 8, 0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 231, 158, 0.58), rgba(255, 239, 184, 0.36));
  box-shadow: var(--inner-glow);
}

.related-stories-header {
  display: grid;
  gap: 6px;
  max-width: 640px;
}

.related-stories-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-family: Georgia, "Times New Roman", serif;
}

.related-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.related-story-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 238, 174, 0.78), rgba(255, 224, 139, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 196, 0.54),
    0 12px 28px rgba(48, 22, 5, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.related-story-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 196, 0.54),
    0 18px 34px rgba(48, 22, 5, 0.18);
}

.related-story-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100%;
  text-decoration: none;
}

.related-story-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 242, 184, 0.56), transparent 34%),
    linear-gradient(160deg, rgba(49, 95, 61, 0.58), rgba(154, 77, 50, 0.28)),
    #ead188;
}

.related-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #ead188;
}

.related-story-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.related-story-body h3,
.related-story-body p {
  margin: 0;
}

.related-story-body h3 {
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.2;
  font-family: var(--font-display);
}

.related-story-body p {
  color: var(--muted);
  line-height: 1.55;
}

.detail-ad-slot {
  margin-bottom: 0;
}

body.reader-night .story-reading-main,
body.reader-night .reader-toolbar,
body.reader-night .detail-context {
  background:
    linear-gradient(180deg, rgba(22, 37, 30, 0.94), rgba(12, 24, 20, 0.94)),
    rgba(12, 24, 20, 0.92);
  color: var(--ink);
}

.story-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding: 26px;
  align-items: start;
}

.story-detail-hero {
  max-width: none;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(67, 32, 8, 0.12);
}

.story-detail-hero-copy {
  display: grid;
  gap: 16px;
  max-width: 1040px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-actions > * {
  min-height: 46px;
}

.story-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.story-reading-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  scroll-margin-top: 96px;
}

.story-reading-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.story-detail-media,
.detail-meta-card,
.reader-toolbar,
.detail-context {
  padding: 16px;
  border: 1px solid rgba(67, 32, 8, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 233, 0.74);
  min-width: 0;
}

.story-detail-media {
  padding: 0;
  overflow: hidden;
}

.story-reading-main .story-detail-media {
  max-width: 640px;
}

.story-reading-main .story-detail-media img,
.story-reading-main .story-detail-media .story-image-placeholder {
  aspect-ratio: 1 / 1;
  min-height: 320px;
}

.detail-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.detail-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at top, rgba(255, 228, 152, 0.16), transparent 32%),
    rgba(11, 21, 18, 0.86);
  backdrop-filter: blur(8px);
}

.detail-image-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: auto;
  max-width: min(94vw, 1400px);
  max-height: calc(100vh - 48px);
  margin: auto;
}

.detail-image-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 236, 194, 0.28);
  border-radius: 999px;
  background: rgba(17, 29, 24, 0.9);
  color: #fff4dc;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.detail-image-lightbox img {
  width: auto;
  max-width: min(94vw, 1400px);
  max-height: calc(100vh - 48px);
  height: auto;
  margin: 0 auto;
  border-radius: calc(var(--radius-lg) + 2px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  object-fit: contain;
  background: rgba(255, 249, 232, 0.98);
}

.detail-meta-card {
  display: grid;
  gap: 12px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid rgba(67, 32, 8, 0.1);
  border-radius: 0;
  background: transparent;
  opacity: 0.72;
}

.detail-summary-block {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-left: 4px solid rgba(128, 83, 28, 0.7);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 250, 233, 0.78);
}

.detail-summary-label {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-summary-block .detail-summary {
  font-size: 1.08rem;
  line-height: 1.65;
}

.detail-focus-button {
  width: 100%;
  min-height: 48px;
}

.detail-side-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.2;
}

.detail-context {
  gap: 12px;
}

.detail-context-actions {
  grid-template-columns: 1fr;
}

.story-text {
  scroll-margin-top: 96px;
}

.story-text p {
  max-width: 42rem;
}

@media (min-width: 1200px) {
  .hero-copy {
    padding: 34px 36px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.3rem, 3.8vw, 4.1rem);
  }

  .lede {
    max-width: 58rem;
    font-size: 1rem;
  }

  .story-reading-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .story-text p {
    max-width: 44rem;
  }
}

.related-stories {
  margin-top: 0;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  margin-top: 28px;
  padding: 20px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: auto -10% -54px auto;
  width: 280px;
  height: 180px;
  background: radial-gradient(circle at 50% 50%, rgba(49, 95, 61, 0.16), transparent 62%);
  pointer-events: none;
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-column {
  display: grid;
  gap: 6px;
  width: 100%;
}

.footer-column p {
  font-size: 0.9rem;
}

.footer-copyright {
  max-width: 46rem;
  margin-top: 4px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(67, 32, 8, 0.22);
  border-radius: 999px;
  background: rgba(255, 238, 174, 0.42);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.footer-links a.is-disabled {
  color: rgba(36, 18, 4, 0.5);
  cursor: not-allowed;
  opacity: 0.72;
}

.legal-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.legal-page {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 228, 150, 0.92), rgba(255, 239, 184, 0.88)),
    var(--panel);
  box-shadow: var(--shadow), var(--inner-glow);
  padding: 28px;
}

.legal-backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.legal-page h1,
.legal-page h2 {
  font-family: var(--font-display);
}

.legal-page h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.legal-page h2 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-note {
  padding: 14px 16px;
  border: 1px solid rgba(67, 32, 8, 0.2);
  border-radius: 18px;
  background: rgba(255, 250, 233, 0.66);
}

.legal-list {
  padding-left: 20px;
}

@media (max-width: 1100px) {
  .hero,
  .story-detail {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 360px;
  }

  .hero-card {
    margin-top: 118px;
  }

  .toolbar-grid,
  .stats,
  .story-grid,
  .curated-filter-panel,
  .discovery-groups,
  .trust-strip-grid,
  .promotion-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .toolbar-header {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 12px;
  }

  .site-header {
    top: 10px;
    gap: 10px;
    padding: 12px 14px;
  }

  .site-footer {
    align-items: start;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 10px;
  }

  .brand-copy strong {
    font-size: 1.12rem;
  }

  .brand-copy span {
    font-size: 0.95rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .toolbar-grid,
  .stats,
  .story-grid,
  .curated-filter-panel,
  .discovery-groups,
  .trust-strip-grid,
  .promotion-card-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    flex-direction: column;
  }

  .pagination {
    flex-direction: column;
  }

  .detail-context-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 8px;
    margin-bottom: 16px;
  }

  .hero-copy {
    padding: 16px 14px;
  }

  .hero h1 {
    max-width: none;
    font-size: 1.26rem;
    line-height: 1.06;
  }

  .hero-highlights,
  .hero-side {
    display: none;
  }

  .lede {
    display: block;
    font-size: 0.79rem;
    line-height: 1.34;
    margin-top: 10px;
  }

  .hero-quick-start {
    margin-top: 12px;
    gap: 9px;
    padding: 11px;
  }

  .hero-filter-grid {
    grid-template-columns: 1fr;
  }

  .hero-quick-kicker {
    font-size: 0.82rem;
  }

  .hero-filter-field span {
    font-size: 0.88rem;
  }

  .hero-filter-field select {
    min-height: 46px;
  }

  .hero-shortcut-row {
    gap: 8px;
  }

  .hero-shortcut-chip {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .hero-featured-story {
    margin-top: 12px;
  }

  .hero-featured-link {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 11px;
  }

  .hero-featured-media {
    aspect-ratio: 1 / 1;
  }

  .hero-featured-body {
    gap: 7px;
  }

  .hero-featured-kicker {
    font-size: 0.72rem;
  }

  .hero-featured-badges {
    gap: 6px;
  }

  .hero-featured-badges .badge {
    font-size: 0.76rem;
    min-height: 28px;
    padding: 0 9px;
  }

  .hero-featured-title {
    font-size: 1.02rem;
    line-height: 1.12;
  }

  .hero-featured-summary {
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .hero-featured-cta {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.84rem;
  }

  .story-feed-header {
    margin-bottom: 12px;
    padding: 12px 14px;
    gap: 8px;
  }

  .curated-filter-panel {
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
  }

  .archive-legacy-controls {
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
  }

  .archive-legacy-controls .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .curated-filter-group {
    gap: 8px;
  }

  .curated-chip-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .curated-chip {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.9rem;
  }

  .story-feed-copy h2 {
    font-size: 1.12rem;
    line-height: 1.12;
  }

  .story-feed-actions,
  .toolbar-buttons {
    gap: 10px;
  }

  .story-feed-copy .eyebrow {
    display: none;
  }

  .story-feed-copy p:last-child {
    margin-top: 6px;
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .trust-strip {
    margin-bottom: 16px;
  }

  .trust-strip-summary {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
  }

  .trust-strip-summary::-webkit-details-marker {
    display: none;
  }

  .trust-strip-summary strong {
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.2;
    color: var(--ink);
  }

  .trust-strip-summary::after {
    content: "Mehr anzeigen";
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
  }

  .trust-strip[open] .trust-strip-summary::after {
    content: "Weniger anzeigen";
  }

  .trust-strip-grid {
    padding: 0 0 2px;
  }

  .trust-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .discovery-panel {
    padding: 16px;
  }

  .discovery-header h2 {
    font-size: 1.55rem;
  }

  .toolbar {
    padding: 16px;
  }

  .toolbar-header {
    align-items: stretch;
  }

  .toolbar-intro {
    margin-bottom: 0;
  }

  .toolbar-toggle-button {
    display: inline-flex;
    width: 100%;
  }

  .toolbar-panel {
    display: none;
    margin-top: 16px;
  }

  .toolbar-panel.is-open {
    display: grid;
  }

  .story-grid {
    gap: 14px;
  }

  .story-card-title {
    font-size: 1.32rem;
  }

  .story-card-body {
    gap: 10px;
    padding: 16px;
  }

  .story-card-summary {
    font-size: 1rem;
  }

  .stats {
    gap: 10px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .detail-view {
    margin-top: 6px;
  }

  .back-link {
    margin-bottom: 12px;
  }

  body.route-detail .mobile-detail-bar {
    position: sticky;
    top: 8px;
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 232, 166, 0.18);
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(29, 20, 9, 0.92), rgba(29, 20, 9, 0.78)),
      rgba(29, 20, 9, 0.86);
    box-shadow: 0 12px 28px rgba(20, 8, 2, 0.28);
    backdrop-filter: blur(10px);
    transition: transform 180ms ease, opacity 180ms ease, padding 180ms ease, top 180ms ease;
  }

  body.route-detail.detail-bar-compact .mobile-detail-bar {
    top: 4px;
    padding: 8px 10px;
  }

  body.route-detail.detail-bar-compact #mobileDetailTitle {
    font-size: 0.92rem;
  }

  body.route-detail.detail-bar-hidden .mobile-detail-bar {
    transform: translateY(calc(-100% - 14px));
    opacity: 0;
    pointer-events: none;
  }

  .mobile-detail-back,
  .mobile-detail-read {
    min-height: 40px;
  }

  .mobile-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 244, 212, 0.12);
    color: #fff2b8;
    text-decoration: none;
    font-weight: 900;
  }

  .mobile-detail-bar-copy {
    display: grid;
    min-width: 0;
  }

  .mobile-detail-bar-label {
    color: rgba(255, 240, 197, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  #mobileDetailTitle {
    color: #fff4cf;
    font-family: var(--font-display);
    font-size: 0.98rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-detail-read {
    padding: 0 12px;
    white-space: nowrap;
    color: #fff4cf;
    border-color: rgba(255, 232, 166, 0.18);
    background: rgba(255, 244, 212, 0.12);
  }

  .story-detail {
    gap: 18px;
    padding: 16px;
  }

  body.route-detail .back-link {
    display: none;
  }

  body.route-detail .story-detail-media {
    order: 2;
  }

  body.route-detail .detail-actions {
    order: 1;
  }

  body.route-detail #detailState {
    order: 3;
  }

  body.route-detail #storyText {
    order: 4;
  }

  body.route-detail .detail-share-row {
    order: 5;
  }

  body.route-detail .reader-toolbar {
    order: 2;
  }

  body.route-detail .detail-context {
    order: 6;
    padding: 12px 14px;
  }

  body.route-detail .related-stories {
    order: 7;
  }

  body.route-detail .detail-ad-slot {
    order: 8;
  }

  .story-detail-media img,
  .story-detail-media .story-image-placeholder {
    aspect-ratio: 1 / 1;
    min-height: 260px;
  }

  #detailTitle {
    font-size: 2.15rem;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions > * {
    width: 100%;
  }

  body.route-detail .detail-actions > * {
    min-height: 46px;
  }

  .reader-toolbar {
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .reader-toolbar-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
  }

  .reader-toolbar-summary::-webkit-details-marker {
    display: none;
  }

  .reader-toolbar-summary::after {
    content: "Öffnen";
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
  }

  .reader-toolbar[open] .reader-toolbar-summary::after {
    content: "Schließen";
  }

  .reader-toolbar-body {
    display: none;
    gap: 10px;
    padding: 0 12px 12px;
  }

  .reader-toolbar[open] .reader-toolbar-body {
    display: grid;
  }

  .reader-toolbar-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .reader-toolbar-focus {
    display: none;
  }

  .reader-toggle-button {
    min-height: 40px;
  }

  .story-text p {
    max-width: none;
    line-height: 1.96;
  }

  body.route-detail #storyText {
    gap: 16px;
  }

  body.route-detail.reader-focus .story-detail {
    padding-top: 10px;
  }

  body.route-detail .site-header {
    padding: 10px 12px;
  }
}

@media (max-width: 1100px) {
  .story-reading-layout {
    grid-template-columns: 1fr;
  }

  .story-reading-side {
    position: static;
    grid-template-columns: 1fr;
    order: 1;
  }

  .story-reading-main {
    order: 2;
  }

  .story-reading-side > .reader-toolbar {
    order: 1;
  }

  .story-reading-side > .detail-meta-card {
    order: 2;
  }

  .story-reading-side > .detail-context {
    order: 3;
  }

  .story-reading-side > .detail-ad-slot {
    order: 4;
  }

  .detail-context,
  .story-detail-media,
  .detail-ad-slot {
    min-height: 100%;
  }

  body.route-detail.reader-focus .story-reading-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .story-detail {
    gap: 18px;
    padding: 16px;
  }

  .story-detail-hero {
    max-width: none;
  }

  .story-detail-hero-copy {
    gap: 14px;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions > * {
    width: 100%;
  }

  .story-reading-layout {
    gap: 18px;
  }

  .story-reading-side {
    grid-template-columns: 1fr;
  }

  .story-text,
  .story-reading-main {
    scroll-margin-top: 84px;
  }
}
