:root {
  --site-sans-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --site-serif-font: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --background: 60 8% 97%;
  --foreground: 45 8% 20%;
  --card: 0 0% 100%;
  --card-foreground: 45 8% 20%;
  --popover: 0 0% 100%;
  --popover-foreground: 45 8% 20%;
  --primary: 243 75% 59%;
  --primary-foreground: 0 0% 100%;
  --secondary: 60 9% 95%;
  --secondary-foreground: 45 5% 29%;
  --muted: 60 9% 95%;
  --muted-foreground: 45 4% 38%;
  --accent: 243 80% 97%;
  --accent-foreground: 245 58% 45%;
  --destructive: 0 74% 42%;
  --destructive-foreground: 210 40% 98%;
  --border: 45 6% 87%;
  --input: 45 6% 87%;
  --ring: 243 75% 59%;
  --radius: 0.375rem;
  --shadow-soft: 0 1px 3px rgba(55, 53, 47, 0.04);
  --shadow-card: 0 2px 5px rgba(55, 53, 47, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--site-sans-font);
  font-size: 1rem;
  line-height: 1.5;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
  font-family: var(--site-sans-font);
}

[x-cloak] {
  display: none !important;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 380, "GRAD" 0, "opsz" 24;
}

.editorial-prose {
  color: hsl(var(--foreground));
  font-family: var(--site-serif-font);
  font-size: clamp(1.1875rem, 1.12rem + 0.35vw, 1.3125rem);
  line-height: 1.82;
}

.editorial-prose p {
  margin: 0 0 1.75rem;
}

.editorial-prose h2,
.editorial-prose h3 {
  margin: 3.25rem 0 1rem;
  font-family: var(--site-sans-font);
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}

.editorial-prose h2 {
  font-size: clamp(2rem, 1.8rem + 0.9vw, 2.6rem);
}

.editorial-prose h3 {
  font-size: clamp(1.5rem, 1.38rem + 0.6vw, 1.95rem);
}

.editorial-prose blockquote {
  margin: 2.5rem 0;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 3px solid hsl(var(--primary));
  color: hsl(var(--secondary-foreground));
  font-size: 1.28em;
  font-style: normal;
}

.editorial-prose pre {
  margin: 2.25rem 0;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
  background: #111827;
  color: #e5e7eb;
  box-shadow: var(--shadow-soft);
}

.editorial-prose code {
  font-family: "IBM Plex Mono", monospace;
}

.editorial-prose pre code {
  display: block;
  padding: 1.25rem 1.4rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.editorial-prose code:not(pre code) {
  background: hsl(var(--secondary));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.375rem;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}

.editorial-prose .lead {
  font-size: clamp(1.35rem, 1.18rem + 0.55vw, 1.7rem);
  line-height: 1.72;
  color: hsl(var(--muted-foreground));
}

.bh-article-preview {
  position: relative;
}

.bh-article-preview-content {
  transition: max-height 220ms ease;
}

.bh-article-preview.is-masked .bh-article-preview-content {
  overflow: hidden;
}

.bh-article-preview-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: min(22rem, 55%);
  padding: 7rem 0 0;
  background: linear-gradient(180deg, rgba(252, 253, 252, 0), rgba(252, 253, 252, 0.86) 34%, rgba(252, 253, 252, 0.97) 58%, hsl(var(--background)) 100%);
  pointer-events: none;
}

.bh-article-preview-overlay[hidden] {
  display: none !important;
}

.bh-article-preview-card {
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: 1.75rem;
  border: 1px solid hsl(var(--border) / 0.9);
  border-radius: 1rem;
  background: hsl(var(--card) / 0.96);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
  pointer-events: auto;
}

.bh-topic-banner-stage {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: hsl(var(--foreground));
}

.bh-topic-banner-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--primary) / 0.74));
  opacity: 0;
  padding: 1.25rem;
  isolation: isolate;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 360ms ease, transform 520ms ease;
}

.bh-topic-banner-item.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.bh-topic-banner-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid hsl(var(--border) / 0.36);
  border-radius: inherit;
  pointer-events: none;
}

.bh-topic-banner-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  gap: 2px;
  background: hsl(var(--foreground));
}

.bh-topic-banner-mosaic.has-4 {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.85fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.bh-topic-banner-mosaic-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.bh-topic-banner-mosaic.has-4 .bh-topic-banner-mosaic-tile:first-child {
  grid-row: 1 / span 3;
}

.bh-topic-banner-mosaic-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition: transform 260ms ease;
}

.bh-topic-banner-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.78));
}

.bh-topic-banner-item:hover .bh-topic-banner-mosaic-image {
  transform: scale(1.06);
}

.bh-topic-banner-dots {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bh-topic-banner-dot {
  width: 0.4rem;
  height: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  padding: 0;
  transition: background-color 160ms ease, transform 160ms ease, width 160ms ease;
}

.bh-topic-banner-dot.is-active {
  width: 1.15rem;
  background: rgba(255, 255, 255, 0.9);
}

.bh-topic-banner-dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 0.2rem;
}

.bh-feed-tabs {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 1rem;
}

.bh-feed-tab {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-family: var(--site-sans-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0 0 0.4rem;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease;
}

.bh-feed-tab:hover {
  color: hsl(var(--foreground));
}

.bh-feed-tab[aria-pressed="true"] {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary));
}

.bh-feed-tab:focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.45);
  outline-offset: 0.25rem;
}

.bh-feed-tab:disabled {
  cursor: wait;
  opacity: 0.55;
}

.bh-feed-list-region {
  min-height: 12rem;
  position: relative;
}

.bh-feed-list {
  transition: opacity 160ms ease;
}

.bh-feed-list-region.is-loading .bh-feed-list {
  opacity: 0.32;
  pointer-events: none;
}

.bh-feed-loading {
  align-items: center;
  color: hsl(var(--muted-foreground));
  display: flex;
  font-family: var(--site-sans-font);
  font-size: 0.8125rem;
  font-weight: 700;
  gap: 0.65rem;
  left: 50%;
  letter-spacing: 0.08em;
  position: absolute;
  text-transform: uppercase;
  top: 1.25rem;
  transform: translateX(-50%);
  z-index: 2;
}

.bh-feed-loading[hidden] {
  display: none;
}

.bh-feed-loading-spinner {
  animation: bh-feed-spin 800ms linear infinite;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 999px;
  height: 1rem;
  width: 1rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .bh-feed-list,
  .bh-feed-loading-spinner {
    animation: none;
    transition: none;
  }
}

.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

::selection {
  background: hsl(var(--primary) / 0.25);
  color: hsl(var(--foreground));
}

@media (max-width: 768px) {
  .editorial-prose {
    font-size: 1.125rem;
    line-height: 1.78;
  }

  .bh-article-preview-overlay {
    min-height: min(18rem, 62%);
    padding-top: 5rem;
  }

  .bh-article-preview-card {
    padding: 1.25rem;
    border-radius: 0.85rem;
  }
}

/* BestHub editorial system: DEV audit tokens, adapted to a curated news site.
   Keep layout rules scoped to components so charts and interactive widgets
   retain their own geometry. UI uses sans; long-form prose uses Charter. */
:root {
  --site-width: 1380px;
  --header-height: 56px;
  --kicker: 245 58% 45%;
  --decorative-number: 45 6% 65%;
}

:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }
a, button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
.bh-page { min-height: 60vh; }
.bh-page .font-body, .bh-footer .font-body { font-family: var(--site-sans-font); }
.bh-page .uppercase, .bh-footer .uppercase, .bh-breadcrumb .uppercase {
  text-transform: none;
  letter-spacing: normal;
}
.bh-page h1 { font-weight: 800; line-height: 1.15; }
.bh-page h2, .bh-page h3 { letter-spacing: -0.025em; }
.bh-page-title { margin: 0 0 8px; font-size: clamp(28px, 3vw, 36px); }
.bh-page-description { max-width: 70ch; margin: 0 0 24px; color: hsl(var(--muted-foreground)); font-size: 16px; line-height: 1.6; }
.bh-skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 12px 20px; border-radius: 6px; background: hsl(var(--primary)); color: white; }
.bh-skip-link:focus { top: 8px; }
.bh-header { background: white; border-color: hsl(var(--border)); }
.bh-header-inner { max-width: var(--site-width); height: var(--header-height); padding: 0 16px; gap: 20px; }
.bh-header-inner > div:first-child { min-width: 0; gap: 24px; }
.bh-header-inner > div:first-child > a img { height: 30px; width: auto; }
.bh-nav { gap: 18px; font-size: 14px; }
.bh-header-search { position: relative; display: flex; flex: 1; max-width: 340px; min-width: 130px; margin-left: auto; }
.bh-header-search input { width: 100%; height: 38px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; padding: 8px 42px 8px 12px; font-size: 14px; }
.bh-header-search button { position: absolute; right: 3px; top: 3px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: hsl(var(--muted-foreground)); }
.bh-header-search button:hover { background: hsl(var(--accent)); color: hsl(var(--primary)); }
.bh-header-inner > div:nth-last-child(2) > a { border-color: hsl(var(--primary)); color: hsl(var(--primary)); white-space: nowrap; }
.bh-breadcrumb { padding-top: 20px; }
.bh-breadcrumb ol { font-size: 13px; }
.bh-footer { background: hsl(var(--secondary)); border-color: hsl(var(--border)); }
.bh-footer-inner { padding-top: 32px; padding-bottom: 32px; }
.bh-footer-copy { font-size: 15px; line-height: 1.7; max-width: 58ch; }

/* Three-column feed: navigation, stories, context. */
.bh-home-grid { max-width: var(--site-width); grid-template-columns: 200px minmax(0,1fr) 280px; gap: 20px; padding: 24px 16px 0; align-items: start; }
.bh-home-primary { display: flex; flex-direction: column; gap: 20px; }
.bh-home-primary > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
.bh-home-intro { order: -3; padding: 4px 0 0; }
.bh-home-intro h1 { margin-top: 5px; font-size: clamp(24px,2.4vw,32px); }
.bh-home-intro p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: hsl(var(--muted-foreground)); }
.bh-section-kicker { font-size: 12px; font-weight: 600; letter-spacing: normal; text-transform: none; color: hsl(var(--muted-foreground)); }
.bh-home-navigation { min-width: 0; font-size: 15px; }
.bh-welcome-card { padding: 18px 16px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; }
.bh-welcome-card h2 { margin-top: 8px; font-size: 22px; line-height: 1.2; font-weight: 800; }
.bh-welcome-card p { margin: 10px 0 16px; color: hsl(var(--muted-foreground)); font-size: 14px; line-height: 1.6; }
.bh-welcome-card > a { color: hsl(var(--primary)); font-size: 13px; font-weight: 600; }
.bh-side-links { display: grid; gap: 2px; margin: 16px 0 24px; }
.bh-side-links a { display: flex; gap: 12px; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: 6px; }
.bh-side-links a:hover, .bh-side-links a[aria-current] { background: hsl(var(--primary) / .08); color: hsl(var(--primary)); }
.bh-side-links a[aria-current] { font-weight: 700; }
.bh-side-section { display: grid; gap: 3px; margin-bottom: 24px; }
.bh-side-section h2 { padding: 0 12px 8px; font-size: 14px; font-weight: 700; }
.bh-side-section nav { display: grid; max-height: 350px; overflow-y: auto; }
.bh-side-section a { display: block; padding: 8px 12px; font-size: 14px; color: hsl(var(--muted-foreground)); border-radius: 6px; }
.bh-side-section a:hover { background: hsl(var(--accent)); color: hsl(var(--primary)); }
.bh-side-section a span { color: hsl(var(--decorative-number)); margin-right: 5px; }
.bh-home-sidebar { padding: 0; border: 0; display: grid; gap: 20px; }
.bh-home-sidebar > section { margin-top: 0; padding: 18px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; }
.bh-home-sidebar h3 { font-size: 20px; font-weight: 750; line-height: 1.3; margin-top: 4px; }
.bh-home-sidebar h4 { font-size: 15px; line-height: 1.4; }
.bh-home-sidebar .bh-section-copy { font-size: 13px; line-height: 1.6; }
.bh-home-sidebar .bh-stat-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.bh-stat-list > div { display: block; padding: 10px 6px; border: 0; text-align: center; background: hsl(var(--secondary)); }
.bh-stat-list > div > div:first-child { display: none; }
.bh-stat-list > div > div:last-child > div:last-child { font-size: 10px; line-height: 1.3; }
.bh-rank-number { color: hsl(var(--decorative-number)); font-size: 25px; }
.bh-trending-list > a { grid-template-columns: 28px minmax(0,1fr); gap: 10px; }
.bh-trending-list > a:last-child, .bh-picks-list > a:last-child { border-bottom: 0; padding-bottom: 0; }
.bh-trending-list .font-label { font-size: 11px; }
.bh-picks-list > a { grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
.bh-picks-list img { height: 56px; }
.bh-picks-list h4 { margin-top: 4px; font-size: 14px; }
.bh-picks-list .font-label { font-size: 11px; }
.bh-topic-banner { order: 1; padding: 16px; background: white; border: 1px solid hsl(var(--border)); border-radius: 6px; }
.bh-topic-banner-stage { min-height: 145px; border-radius: 4px; }
.bh-home-section { order: 2; }
.bh-feed-heading { margin-bottom: 12px; padding: 8px 0 12px; }
.bh-feed-heading h2 { font-size: 20px; }
.bh-feed-tabs { gap: 4px; }
.bh-feed-tab { min-height: 36px; padding: 8px 12px; border-radius: 5px; border: 0; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: normal; }
.bh-feed-tab[aria-pressed="true"] { color: hsl(var(--primary)); background: hsl(var(--primary) / .08); font-weight: 700; }
.bh-feed-tab:hover { background: hsl(var(--secondary)); }
.bh-feed-list { gap: 12px; }
.bh-hero { padding: 0; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; }
.bh-hero-grid { display: flex; flex-direction: column; gap: 0; }
.bh-hero-media { order: -1; min-height: 0; height: 230px; border-radius: 0; }
.bh-hero-media img { height: 100%; width: 100%; object-fit: cover; }
.bh-hero-copy { padding: 24px; gap: 20px; }
.bh-hero-title { font-size: clamp(25px,2.4vw,34px); font-weight: 800; line-height: 1.16; letter-spacing: -.025em; }
.bh-hero-excerpt { font-size: 16px; line-height: 1.6; font-family: var(--site-sans-font); }
.bh-hero-footer { padding-top: 16px; }
.bh-hero-footer .bh-author-date { font-size: 12px; letter-spacing: normal; }
.bh-hero-footer .bh-chip-row { display: none; }

/* One story component is shared by all collections and the AJAX feed. */
.bh-story-card, .bh-search-result { padding: 24px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; }
.bh-story-card:hover, .bh-search-result:hover { border-color: hsl(var(--primary) / .3); }
.bh-story-card > div { grid-template-columns: minmax(0,1fr) 160px; gap: 20px; }
.bh-story-card h2 { font-size: clamp(22px,1.8vw,28px); font-weight: 750; line-height: 1.25; }
.bh-story-card h2 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.bh-story-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.65; }
.bh-story-card .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }
.bh-story-card > div > a { height: 120px; min-height: 0; align-self: center; }
.bh-story-card .font-label { font-size: 12px; }
.bh-story-card .mt-6 { margin-top: 16px; gap: 12px; flex-wrap: wrap; }
.bh-story-card .mt-6 span { padding: 4px 6px; background: transparent; }
.bh-story-card .mt-6 span::before { content: '#'; color: hsl(var(--decorative-number)); }
.bh-home .bh-story-card > div { grid-template-columns: minmax(0,1fr) 120px; gap: 16px; }
.bh-home .bh-story-card > div > a { height: 100px; }
.bh-home .bh-story-card { padding: 20px; }
.bh-home .bh-story-card h2 { font-size: 23px; }
.bh-home .bh-story-card .mt-6 { flex-direction: column; align-items: start; }

/* Inner pages: compact headers, restrained cards and a consistent reading measure. */
.bh-page:not(.bh-home):not(.bh-article):not(.bh-status):not(.bh-login) { padding-top: 24px; }
.bh-page > h1 { font-size: clamp(28px,3vw,36px); }
.bh-topics > .grid > a h2 { font-size: 24px; line-height: 1.25; }
.bh-topics > .grid > a p { font-size: 15px; line-height: 1.65; }
.bh-topics > .grid { gap: 20px; }
.bh-tags .bh-tag-card { display: flex; flex-direction: column; gap: 12px; min-height: 164px; padding: 24px; background: white; border: 1px solid hsl(var(--border)); border-top: 3px solid hsl(var(--primary)); border-radius: 6px; }
.bh-tag-card h2 { font-size: 20px; font-weight: 700; }
.bh-tag-card h2 span { color: hsl(var(--primary)); margin-right: 2px; }
.bh-tag-views { color: hsl(var(--muted-foreground)); font-size: 13px; }
.bh-tag-explore { margin-top: auto; color: hsl(var(--primary)); font-size: 13px; font-weight: 600; }
.bh-tag-card:hover { box-shadow: var(--shadow-card); border-color: hsl(var(--primary) / .4); }
.bh-category > h1, .bh-tags > .mb-8, .bh-topics > .mb-8 { border-top: 4px solid hsl(var(--primary)); padding-top: 20px; }
.bh-reading-layout { display: grid; grid-template-columns: 64px minmax(0,1fr) 280px; gap: 20px; align-items: start; }
.bh-reading-card { background: white; border: 1px solid hsl(var(--border)); border-radius: 6px; overflow: clip; }
.bh-reading-card > header h1 { font-size: clamp(36px, 3vw, 42px); font-weight: 700; line-height: 1.18; letter-spacing: -0.025em; }
.bh-reading-card > header > p { font-size: 18px; line-height: 1.65; }
.bh-reading-card header time { font-size: 13px; line-height: 1.6; }
.bh-reading-card > header > div:last-child { flex-wrap: wrap; }
/* Article typography stays scoped to the reading card: the wide page shell
   and other routes keep their established type scale. */
.bh-reading-card .editorial-prose { max-width: 70ch; margin-inline: auto; font-family: var(--site-sans-font); font-size: 18px; line-height: 1.75; }
.bh-reading-card .editorial-prose p { margin-bottom: 1.25rem; }
.bh-reading-card .editorial-prose .lead { font-size: 18px; line-height: 1.75; }
.bh-reading-card .editorial-prose h2 { margin: 2.5rem 0 1rem; font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.bh-reading-card .editorial-prose h3 { margin: 2rem 0 0.75rem; font-size: 23px; font-weight: 700; line-height: 1.35; letter-spacing: -0.015em; }
.bh-reading-card .bh-article-section:first-child > h2 { margin-top: 0; }
.bh-reading-card .editorial-prose blockquote { margin: 2rem 0; font-size: 19px; line-height: 1.7; }
.bh-reading-card .editorial-prose pre code { padding: 20px; font-size: 15px; line-height: 1.65; }
.bh-reading-card .editorial-prose figcaption { font-size: 13px; line-height: 1.6; }
.bh-article-heading .font-label { font-size: 13px; }
.bh-article-heading > div:last-child .font-label { font-size: 14px; line-height: 1.6; }
.editorial-prose h2 { font-size: 28px; line-height: 1.25; margin-top: 2.5rem; }
.editorial-prose h3 { font-size: 23px; line-height: 1.3; }
.editorial-prose a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 3px; }
.editorial-prose ul, .editorial-prose ol { margin: 1rem 0 1.75rem; padding-left: 1.5rem; }
.editorial-prose ul { list-style: disc; }
.editorial-prose ol { list-style: decimal; }
.editorial-prose table { display: block; max-width: 100%; overflow-x: auto; }
.bh-reading-layout > .bh-article-context { padding-left: 0; border: 0; }
.bh-reading-layout > .bh-article-context > section { background: white; border-radius: 6px; }
.bh-article-preview-overlay { background: linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.95) 55%,white); }
.bh-privacy-terms article { background: white; border: 1px solid hsl(var(--border)); border-radius: 6px; padding: 32px; }

.bh-login > div { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.bh-login > div > section:first-child { background: hsl(var(--accent)); }
.bh-login h1 { font-size: clamp(28px,3.5vw,42px); }
.bh-login p { font-size: 16px; line-height: 1.7; }
.bh-login h2 { font-size: 28px; }

@media (min-width: 1500px) { .bh-home-grid { grid-template-columns: 220px minmax(0,1fr) 300px; gap: 24px; } }
@media (max-width: 1199px) {
  .bh-home-grid { grid-template-columns: 180px minmax(0,1fr) 240px; gap: 16px; }
  .bh-home-sidebar > section { padding: 16px; }
  .bh-nav { gap: 12px; font-size: 13px; }
  .bh-header-inner > div:first-child { gap: 16px; }
  .bh-header-search { max-width: 230px; }
  .bh-home .bh-story-card > div { grid-template-columns: minmax(0,1fr); }
  .bh-home .bh-story-card > div > a { display: none; }
}
@media (max-width: 1023px) {
  .bh-home-grid { grid-template-columns: 180px minmax(0,1fr); }
  .bh-home-sidebar { display: none; }
  .bh-header .bh-nav { display: none; }
  .bh-header-search { max-width: 460px; }
  .bh-reading-layout { grid-template-columns: minmax(0,1fr); }
  .bh-reading-layout > .bh-article-context { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .bh-reading-layout > .bh-article-context > section { margin-top: 0; }
}
@media (max-width: 767px) {
  .bh-header-inner { gap: 12px; padding-inline: 12px; }
  .bh-header-search { display: none; }
  .bh-home-grid { display: block; padding: 16px 12px 0; }
  .bh-home-navigation { display: none; }
  .bh-home-primary { gap: 16px; }
  .bh-home-intro { padding: 0 4px; }
  .bh-home-intro h1 { font-size: 26px; }
  .bh-hero-copy { padding: 20px; }
  .bh-hero-media { height: 210px; }
  .bh-hero-title { font-size: 28px; }
  .bh-story-card, .bh-search-result { padding: 20px; }
  .bh-story-card > div { grid-template-columns: minmax(0,1fr); }
  .bh-story-card > div > a { display: none; }
  .bh-story-card h2, .bh-home .bh-story-card h2 { font-size: 23px; }
  .bh-reading-layout { gap: 20px; padding-inline: 12px; }
  .bh-reading-card .bh-article-heading, .bh-reading-card .bh-article-afterword { padding: 24px 20px; }
  .bh-reading-card > header h1 { font-size: clamp(28px, 7.5vw, 30px); line-height: 1.2; }
  .bh-reading-card > header > p { font-size: 18px; }
  .bh-reading-card .editorial-prose { font-size: 18px; }
  .bh-reading-card .editorial-prose pre code { padding: 16px; font-size: 14px; }
  .bh-reading-layout > .bh-article-context { display: block; }
  .bh-reading-layout > .bh-article-context > section { margin-top: 16px; }
  .bh-privacy-terms article { padding: 24px 20px; }
  .bh-login > div { grid-template-columns: minmax(0,1fr); }
  .bh-login > div > section:first-child { padding: 24px; }
  .bh-login h1 { max-width: none; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.bh-home-sidebar > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
.bh-empty-copy { color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.65; }
@media (min-width: 768px) and (max-width: 1023px) {
  .bh-header-inner > div:last-child { display: flex; }
  .bh-header > div:last-child { display: block; }
}
/* Give carousel controls a usable hit area while keeping the visual dots small. */
.bh-topic-banner-dots { gap: 0; }
.bh-topic-banner-dot, .bh-topic-banner-dot.is-active { display: grid; place-items: center; width: 24px; height: 24px; background: transparent; }
.bh-topic-banner-dot::after { content: ''; width: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.55); }
.bh-topic-banner-dot.is-active::after { width: 16px; background: white; }
.bh-privacy-terms article > div > h2 { font-size: 14px; font-weight: 500; color: hsl(var(--muted-foreground)); }

/* All page shells follow the homepage boundaries. Reading measures belong to
   inner content only; they must not narrow an entire route. */
:root { --site-gutter: 16px; }
html { scrollbar-gutter: stable; }
.bh-container {
  width: 100%;
  max-width: var(--site-width);
  margin-inline: auto;
  padding-inline: var(--site-gutter);
}
.bh-article { padding-top: 24px; }
.bh-context-card { min-width: 0; padding: 20px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 6px; }
.bh-context-card h2 { margin: 6px 0 12px; font-size: 20px; line-height: 1.3; font-weight: 750; }
.bh-context-card p { font-size: 14px; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.bh-context-link { color: hsl(var(--primary)); font-size: 14px; font-weight: 600; }
.bh-context-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bh-primary-button, .bh-secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; }
.bh-primary-button { background: hsl(var(--primary)); color: white; }
.bh-primary-button:hover { background: hsl(var(--accent-foreground)); }
.bh-secondary-button { background: white; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
.bh-secondary-button:hover { border-color: hsl(var(--primary) / .4); color: hsl(var(--primary)); background: hsl(var(--accent)); }

/* Article: useful actions, a wide reading card, and contextual navigation. */
.bh-article-tools { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.bh-article-tools > section { padding: 0; border: 0; box-shadow: none; background: transparent; }
.bh-article-tools > section > div:first-child { text-align: center; text-transform: none; font-size: 12px; }
.bh-article-tools > section > div:last-child { flex-direction: column; gap: 10px; }
.bh-article-tool-link { display: flex; flex-direction: column; align-items: center; gap: 6px; color: hsl(var(--muted-foreground)); font-size: 11px; }
.bh-article-tool-link:hover { color: hsl(var(--primary)); }
.bh-article-cover { overflow: hidden; background: hsl(var(--secondary)); border-bottom: 1px solid hsl(var(--border)); }
.bh-article-cover img { width: 100%; height: auto; aspect-ratio: 2.4; max-height: 360px; object-fit: cover; }
.bh-article-heading { padding: 32px 36px 0; }
.bh-reading-card .bh-article-preview { margin: 32px 36px 0; }
.bh-article-afterword { padding: 32px 36px; }
.bh-article-context { display: grid; gap: 20px; min-width: 0; }
.bh-article-context > section { margin: 0; }
.bh-article-contents nav { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.bh-article-contents nav a { padding: 7px 0 7px 12px; border-left: 2px solid hsl(var(--border)); font-size: 14px; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.bh-article-contents nav a:hover { color: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.bh-article-section, #article-top, #article-source, #article-discussion { scroll-margin-top: 80px; }
.bh-article-author > div { flex-direction: column; gap: 12px; }
.bh-article-author img, .bh-article-author .h-20 { height: 48px; width: 48px; }
.bh-article-author h3 { margin-top: 6px; font-size: 21px; }
.bh-article-author p { font-size: 14px; line-height: 1.65; }
.bh-article-author .font-label { font-size: 13px; }
.bh-article-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bh-article-stats > div { min-width: 0; padding: 12px; }
.bh-article-stats .font-headline { font-size: 22px; }
.bh-article-context .bh-context-card ~ section h3 { font-size: 20px; }
.bh-article-context .bh-context-card ~ section h4 { font-size: 15px; }
.bh-article-context .bh-context-card ~ section .font-label { font-size: 13px; }

/* Discover uses the same three-column rhythm as the homepage. */
.bh-discover { padding-bottom: 32px; }
.bh-discover-layout { display: grid; grid-template-columns: 200px minmax(0,1fr) 280px; gap: 20px; align-items: start; }
.bh-discover-navigation { min-width: 0; }
.bh-discover-navigation .bh-side-links { margin-top: 0; }
.bh-discover-primary { min-width: 0; display: grid; gap: 20px; }
.bh-discover-heading .bh-page-title { margin: 6px 0 10px; font-size: clamp(28px,2.5vw,36px); }
.bh-discover-heading .bh-page-description { margin-bottom: 0; font-size: 15px; }
.bh-search-panel { padding: 20px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; }
.bh-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px 12px; }
.bh-search-query { display: flex; align-items: center; min-width: 0; gap: 10px; padding: 0 12px; border: 1px solid hsl(var(--border)); border-radius: 6px; }
.bh-search-query:focus-within { border-color: hsl(var(--primary)); box-shadow: 0 0 0 1px hsl(var(--primary)); }
.bh-search-query > svg { flex: 0 0 20px; color: hsl(var(--muted-foreground)); }
.bh-search-query input { width: 100%; min-width: 0; height: 46px; padding: 8px 0; border: 0; background: transparent; font-size: 16px; box-shadow: none; }
.bh-search-query input:focus { outline: none; box-shadow: none; }
.bh-search-toolbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid hsl(var(--border)); font-size: 12px; color: hsl(var(--muted-foreground)); }
.bh-search-toolbar label { display: flex; align-items: center; gap: 8px; }
.bh-search-toolbar select { max-width: 190px; min-height: 36px; border-color: hsl(var(--border)); border-radius: 5px; padding-block: 6px; font-size: 13px; color: hsl(var(--foreground)); }
.bh-discover-context { display: grid; gap: 20px; min-width: 0; }
.bh-suggested-searches { display: grid; }
.bh-suggested-searches a { display: grid; grid-template-columns: 24px minmax(0,1fr) 16px; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid hsl(var(--border)); font-size: 14px; }
.bh-search-index { color: hsl(var(--decorative-number)); font-size: 12px; font-variant-numeric: tabular-nums; }
.bh-suggested-searches a:hover { color: hsl(var(--primary)); }
.bh-suggested-searches svg { color: hsl(var(--muted-foreground)); }
.bh-discover-tip { background: hsl(var(--accent)); }
.bh-discover-tip > svg { color: hsl(var(--primary)); margin-bottom: 16px; }
.bh-discover-tip p { margin-bottom: 20px; }
.bh-results-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.bh-results-heading h2 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.bh-results-heading > a, .bh-results-heading > span { font-size: 13px; color: hsl(var(--muted-foreground)); }
.bh-results-heading > a:hover { color: hsl(var(--primary)); }
.bh-discover-start > p { margin-bottom: 20px; font-size: 14px; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.bh-discover-categories { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bh-discover-categories > a { display: flex; flex-direction: column; align-items: start; min-width: 0; gap: 12px; padding: 20px; background: white; border: 1px solid hsl(var(--border)); border-radius: 6px; }
.bh-discover-categories > a:hover { border-color: hsl(var(--primary) / .4); }
.bh-discover-categories h3 { font-size: 20px; line-height: 1.35; font-weight: 700; }
.bh-discover-categories .bh-context-link { margin-top: auto; font-size: 13px; }
.bh-discover-state { padding: 36px 28px; background: white; border: 1px solid hsl(var(--border)); border-radius: 6px; }
.bh-state-icon { display: grid; place-items: center; height: 48px; width: 48px; margin-bottom: 20px; border-radius: 8px; color: hsl(var(--primary)); background: hsl(var(--accent)); }
.bh-discover-state h2, .bh-discover-state h3 { margin: 8px 0 12px; font-size: 26px; font-weight: 750; line-height: 1.25; }
.bh-discover-state p { max-width: 60ch; margin-bottom: 24px; font-size: 16px; line-height: 1.7; color: hsl(var(--muted-foreground)); }
.bh-state-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.bh-search-results-list { display: grid; gap: 12px; }
.bh-search-result-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.bh-search-result-meta > span { color: hsl(var(--primary)); font-weight: 600; }
.bh-search-result h3 { margin: 12px 0; font-size: 24px; line-height: 1.3; font-weight: 750; }
.bh-search-result h3 a:hover { color: hsl(var(--primary)); }
.bh-search-result > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 15px; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.bh-search-result-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.bh-search-result-footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
.bh-search-result-footer a:hover { color: hsl(var(--primary)); }
.bh-search-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; font-size: 13px; }

@media (min-width: 1500px) {
  .bh-discover-layout { grid-template-columns: 220px minmax(0,1fr) 300px; gap: 24px; }
  .bh-reading-layout { grid-template-columns: 64px minmax(0,1fr) 300px; gap: 24px; }
}
@media (max-width: 1199px) {
  .bh-discover-layout { grid-template-columns: 180px minmax(0,1fr) 240px; gap: 16px; }
  .bh-reading-layout { grid-template-columns: 48px minmax(0,1fr) 240px; gap: 16px; }
  .bh-discover-context .bh-context-card { padding: 16px; }
}
@media (max-width: 1023px) {
  .bh-discover-layout { grid-template-columns: 180px minmax(0,1fr); }
  .bh-discover-context { grid-column: 2; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bh-reading-layout { grid-template-columns: minmax(0,1fr); }
  .bh-article-tools { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .bh-article-tools > section { display: flex; align-items: center; gap: 12px; }
  .bh-article-tools > section > div:last-child { flex-direction: row; margin: 0; gap: 8px; }
  .bh-article-tool-link { flex-direction: row; font-size: 12px; }
  .bh-article-context { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  :root { --site-gutter: 12px; }
  .bh-discover-layout { display: flex; flex-direction: column; gap: 24px; }
  .bh-discover-navigation { display: none; }
  .bh-discover-primary, .bh-discover-context { width: 100%; }
  .bh-discover-context { grid-template-columns: minmax(0,1fr); }
  .bh-discover-categories { gap: 10px; }
  .bh-discover-categories > a { padding: 16px; }
  .bh-discover-categories h3 { font-size: 18px; }
  .bh-search-panel { padding: 16px; }
  .bh-search-toolbar > span { display: none; }
  .bh-search-toolbar label { justify-content: space-between; width: 100%; }
  .bh-search-form { gap: 12px 8px; }
  .bh-search-query { gap: 6px; padding-inline: 8px; }
  .bh-search-form > button { padding-inline: 14px; }
  .bh-discover-state { padding: 24px 20px; }
  .bh-article-heading { padding: 24px 20px 0; }
  .bh-reading-card .bh-article-preview { margin: 24px 20px 0; }
  .bh-article-afterword { padding: 24px 20px; }
  .bh-article-cover img { aspect-ratio: 1.8; }
  .bh-reading-layout > .bh-article-context { display: grid; grid-template-columns: minmax(0,1fr); }
  .bh-reading-layout > .bh-article-context > section { margin: 0; }
}

/* Search sort: A3 Hub Ultramarine, with native no-script fallback. */
.bh-search-sort { --sort-brand: #2b3a9a; --sort-ink: #14152a; --sort-muted: #555670; --sort-card: #fff; --sort-border: #d8d8e2; --sort-soft: #f2f2f5; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bh-search-sort .bh-sort-label { color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 500; white-space: nowrap; }
.bh-sort-custom { position: relative; min-width: 170px; }
.bh-sort-trigger, .bh-search-sort .bh-sort-native { min-height: 42px; width: 100%; padding: 10px 12px; border: 1px solid var(--sort-border); border-radius: 6px; background: var(--sort-card); color: var(--sort-ink); font-size: 13px; font-weight: 600; line-height: 20px; }
.bh-sort-trigger { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.bh-sort-trigger:hover { border-color: var(--sort-brand); }
.bh-sort-trigger:focus-visible, .bh-sort-native:focus-visible { outline: 2px solid var(--sort-brand); outline-offset: 3px; }
.bh-sort-trigger[aria-expanded="true"] { border-color: var(--sort-brand); }
.bh-sort-trigger svg { flex-shrink: 0; color: var(--sort-muted); transition: transform 120ms ease; }
.bh-sort-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.bh-sort-options { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: 280px; max-width: calc(100vw - 40px); padding: 6px; border: 1px solid var(--sort-border); border-radius: 12px; background: var(--sort-card); box-shadow: 0 12px 32px rgba(20,21,42,.12); }
.bh-sort-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: var(--sort-ink); cursor: pointer; }
.bh-sort-option-copy { display: grid; gap: 3px; }
.bh-sort-option-label { font-size: 13px; font-weight: 600; line-height: 19px; }
.bh-sort-option-description { font-size: 12px; font-weight: 400; line-height: 18px; color: var(--sort-muted); }
.bh-sort-option:hover, .bh-sort-option:focus-visible { background: var(--sort-soft); outline: none; }
.bh-sort-option:focus-visible { box-shadow: inset 0 0 0 2px var(--sort-brand); }
.bh-sort-option[aria-selected="true"] .bh-sort-option-label { color: var(--sort-brand); }
.bh-sort-check { flex-shrink: 0; color: var(--sort-brand); visibility: hidden; }
.bh-sort-option[aria-selected="true"] .bh-sort-check { visibility: visible; }
.bh-search-window-note { margin: 0 0 20px; padding: 12px 16px; border: 1px solid hsl(var(--border)); border-radius: 6px; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.6; background: hsl(var(--card)); }
.bh-search-form > button:disabled { cursor: wait; opacity: .7; }
[data-theme="dark"] .bh-search-sort, .dark .bh-search-sort { --sort-brand: #a9b2ff; --sort-ink: #ececf4; --sort-muted: #a3a4be; --sort-card: #151624; --sort-border: #2b2c41; --sort-soft: #1d1e2f; }
@media (max-width: 760px) {
  .bh-search-sort { width: 100%; justify-content: space-between; }
  .bh-sort-custom { flex: 1; min-width: 0; max-width: 240px; }
  .bh-sort-options { width: 280px; }
}
@media (prefers-reduced-motion: reduce) { .bh-sort-trigger svg { transition: none; } }

/* 03-B filter controls share A3's compact ink/ultramarine vocabulary. */
.bh-search-filters { grid-column:1 / -1; border-top:1px solid #d8d8e2; padding-top:14px; }
.bh-search-filters summary { width:fit-content; cursor:pointer; color:#2b3a9a; font-size:13px; font-weight:600; }
.bh-filter-count { display:inline-flex; margin-left:6px; padding:1px 7px; border-radius:12px; background:#f2f2f5; color:#14152a; }
.bh-filter-panel { display:grid; gap:18px; padding-top:18px; }
.bh-filter-times { display:flex; flex-wrap:wrap; gap:8px; }
.bh-filter-times legend,.bh-filter-choice>label,.bh-filter-tag>label { margin-bottom:8px; font-size:12px; font-weight:600; }
.bh-filter-times label { position:relative; cursor:pointer; }
.bh-filter-times input { position:absolute; opacity:0; }
.bh-filter-times span { display:block; padding:8px 12px; border:1px solid #d8d8e2; border-radius:6px; font-size:13px; }
.bh-filter-times input:checked+span { border-color:#2b3a9a; background:#f2f2f5; color:#2b3a9a; }
.bh-filter-times input:focus-visible+span { outline:2px solid #2b3a9a; outline-offset:2px; }
.bh-filter-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.bh-filter-choice { display:grid; gap:0; min-width:0; }
.bh-filter-choice .bh-sort-custom { min-width:0; max-width:none; width:100%; }
.bh-filter-choice .bh-sort-trigger>span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bh-filter-choice .bh-sort-options { width:100%; max-height:300px; overflow-y:auto; }
.bh-filter-choice .bh-sort-option { min-height:42px; overflow-wrap:anywhere; }
.bh-filter-tag { display:grid; position:relative; min-width:0; gap:0; }
.bh-filter-tag-row { display:flex; align-items:center; gap:8px; min-width:0; }
.bh-filter-tag-row > input[type=search] { flex:1 1 auto; }
.bh-filter-tag-row > button { flex:0 0 auto; white-space:nowrap; }
.bh-filter-tag input[type=search] { width:100%; min-width:0; height:44px; padding:8px 12px; border:1px solid #d8d8e2; border-radius:6px; background:#fff; color:#14152a; font-size:14px; }
.bh-filter-tag input:focus-visible { outline:2px solid #2b3a9a; outline-offset:2px; }
.bh-tag-choices { position:absolute; z-index:45; top:72px; width:100%; max-height:260px; overflow-y:auto; border:1px solid #d8d8e2; border-radius:8px; background:#fff; box-shadow:0 12px 32px #14152a1a; }
.bh-tag-choices button { display:block; width:100%; padding:10px 12px; text-align:left; font-size:13px; overflow-wrap:anywhere; }
.bh-tag-choices button:hover,.bh-tag-choices button[aria-selected=true] { background:#f2f2f5; color:#2b3a9a; }
.bh-tag-status,.bh-filter-help,.bh-filter-anchor { font-size:12px; color:#555670; line-height:1.6; margin-top:6px; }
.bh-filter-clear-tag { text-align:left; font-size:12px; color:#2b3a9a; margin-top:6px; }
.bh-filter-actions,.bh-filter-chips { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.bh-filter-chips a { padding:6px 10px; border:1px solid #d8d8e2; border-radius:6px; color:#2b3a9a; background:#fff; font-size:12px; overflow-wrap:anywhere; }
.bh-filter-lookup { display:flex; flex-wrap:wrap; gap:10px; padding:16px; border:1px solid #d8d8e2; border-radius:6px; }
.bh-filter-lookup h2 { width:100%; font-weight:600; }
@media(max-width:760px){.bh-filter-fields{grid-template-columns:minmax(0,1fr)}.bh-filter-choice{justify-content:stretch}.bh-filter-choice .bh-sort-custom{max-width:none}}
[data-theme=dark] .bh-search-filters,.dark .bh-search-filters{color:#ececf4}
[data-theme=dark] .bh-filter-tag input,.dark .bh-filter-tag input,[data-theme=dark] .bh-tag-choices,.dark .bh-tag-choices{background:#151624;color:#ececf4;border-color:#2b2c41}
[data-theme=dark] .bh-search-filters summary,.dark .bh-search-filters summary,[data-theme=dark] .bh-filter-clear-tag,.dark .bh-filter-clear-tag{color:#a9b2ff}
[data-theme=dark] .bh-tag-status,.dark .bh-tag-status,[data-theme=dark] .bh-filter-help,.dark .bh-filter-help{color:#a3a4be}
:is([data-theme=dark],.dark) .bh-filter-times span { background:#151624; color:#ececf4; border-color:#2b2c41; }
:is([data-theme=dark],.dark) .bh-filter-times input:checked+span { background:#1d1e2f; color:#a9b2ff; border-color:#a9b2ff; }
:is([data-theme=dark],.dark) .bh-filter-count { background:#1d1e2f; color:#ececf4; }
:is([data-theme=dark],.dark) .bh-filter-chips a { background:#151624; color:#a9b2ff; border-color:#2b2c41; }
:is([data-theme=dark],.dark) .bh-filter-anchor { color:#a3a4be; }
:is([data-theme=dark],.dark) .bh-tag-choices button:hover,:is([data-theme=dark],.dark) .bh-tag-choices button[aria-selected=true] { background:#1d1e2f; color:#a9b2ff; }
.bh-search-filters .bh-primary-button { background:#2b3a9a; color:#fff; }
:is([data-theme=dark],.dark) .bh-search-filters { background:#151624; border-color:#2b2c41; padding:14px; border-radius:6px; }
:is([data-theme=dark],.dark) .bh-search-filters .bh-primary-button { background:#ececf4; color:#14152a; }

/* 04-A: bounded discovery guidance and collection actions, using A3 tokens. */
.bh-taxonomy-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0 24px; }
.bh-taxonomy-guide a { display:grid; gap:6px; padding:16px; border:1px solid #d8d8e2; border-radius:8px; background:#fff; color:#14152a; min-width:0; overflow-wrap:anywhere; }
.bh-taxonomy-guide strong { font-size:14px; }
.bh-taxonomy-guide span,.bh-taxonomy-note { font-size:13px; line-height:1.7; color:#555670; }
.bh-taxonomy-guide a[aria-current=page] { border-color:#2b3a9a; box-shadow:inset 0 0 0 1px #2b3a9a; }
.bh-taxonomy-guide a:focus-visible,.bh-collection-actions a:focus-visible { outline:2px solid #2b3a9a; outline-offset:3px; }
.bh-taxonomy-note { margin:12px 0 20px; }
.bh-collection-actions { display:flex; flex-wrap:wrap; gap:16px; align-items:center; margin-top:20px; }
.bh-collection-actions a { color:#2b3a9a; font-size:14px; }
.bh-collection-actions .bh-collection-start { padding:11px 18px; border-radius:6px; background:#2b3a9a; color:#fff; font-weight:600; }
.bh-topics .bh-page-title { overflow-wrap:anywhere; }
.bh-topics h2 { overflow-wrap:anywhere; }
:is([data-theme=dark],.dark) .bh-taxonomy-guide a { background:#151624; color:#ececf4; border-color:#2b2c41; }
:is([data-theme=dark],.dark) .bh-taxonomy-guide a[aria-current=page] { border-color:#a9b2ff; box-shadow:inset 0 0 0 1px #a9b2ff; }
:is([data-theme=dark],.dark) .bh-taxonomy-guide span,:is([data-theme=dark],.dark) .bh-topics > .mb-8 .bh-taxonomy-note { color:#a3a4be; }
:is([data-theme=dark],.dark) .bh-collection-actions a { color:#a9b2ff; }
:is([data-theme=dark],.dark) .bh-collection-actions .bh-collection-start { background:#ececf4; color:#14152a; }
@media(max-width:760px){.bh-taxonomy-guide{grid-template-columns:minmax(0,1fr)}.bh-taxonomy-guide a{padding:12px 16px}}
.bh-topics > .mb-8 { background:#fff; color:#14152a; border-top-color:#2b3a9a; }
.bh-topics > .mb-8 > .text-primary { color:#2b3a9a; }
.bh-topics > .mb-8 .bh-page-title,.bh-topics > .mb-8 > .font-headline { color:inherit; }
:is([data-theme=dark],.dark) .bh-topics > .mb-8 { background:#151624; color:#ececf4; border-color:#2b2c41; border-top-color:#a9b2ff; }
:is([data-theme=dark],.dark) .bh-topics > .mb-8 > .text-primary { color:#a9b2ff; }
:is([data-theme=dark],.dark) .bh-topics > .mb-8 .bh-page-description,:is([data-theme=dark],.dark) .bh-topics > .mb-8 > .text-muted-foreground { color:#a3a4be; }
.bh-tag-description { margin-top:16px; white-space:pre-line; overflow-wrap:anywhere; font-size:16px; line-height:1.7; color:inherit; }
/* Tag introduction uses A3 colors; the shared site shell follows route 05. */
.bh-tags > .mb-8 { background:#fff; color:#14152a; border-color:#dfe0e8; }
.bh-tags > .mb-8 > .text-primary { color:#2b3a9a; }
:is([data-theme=dark],.dark) .bh-tags > .mb-8 { background:#151624; color:#ececf4; border-color:#2b2c41; }
:is([data-theme=dark],.dark) .bh-tags > .mb-8 > .text-primary { color:#a9b2ff; }
:is([data-theme=dark],.dark) .bh-tags > .mb-8 > .text-muted-foreground { color:#a3a4be; }

.bh-interests { max-width: 68rem; padding-block: 2rem 4rem; }
.bh-interests h1 { margin-block: 1.5rem .5rem; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 650; }
.bh-interests h2 { font-size: 1.25rem; font-weight: 650; }
.bh-interests-description { color: hsl(var(--muted-foreground)); margin-block: .25rem; }
.bh-interests-panel, .bh-interests-feed-item {
  margin-block: 1rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid hsl(var(--border));
  border-radius: .85rem; background: hsl(var(--card)); overflow-wrap: anywhere;
}
.bh-interests-article > * + * { margin-top: .4rem; }
.bh-interests-tabs, .bh-interests-choices, .bh-interests-native-header, .bh-interests-search {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
}
.bh-interests-native-header { justify-content: space-between; min-height: 4.5rem; }
.bh-interests-tabs a, .bh-interests-action {
  display: inline-flex; align-items: center; min-height: 2.75rem; justify-content: center;
  padding: .45rem .85rem; border: 1px solid hsl(var(--border)); border-radius: .55rem;
  color: hsl(var(--foreground)); background: hsl(var(--card)); font-size: .9rem;
}
.bh-interests-tabs a[aria-current], .bh-interests-action:hover, .bh-interests-tabs a:hover {
  border-color: hsl(var(--primary)); color: hsl(var(--primary));
}
.bh-interests-link { text-decoration: underline; text-underline-offset: .15em; overflow-wrap: anywhere; }
.bh-interests-tabs a:focus-visible, .bh-interests-action:focus-visible, .bh-interests-link:focus-visible {
  outline: 2px solid hsl(var(--primary)); outline-offset: 3px;
}
.bh-interests-reason { margin-bottom: .55rem; color: hsl(var(--primary)); font-size: .9rem; font-weight: 600; }
.bh-interests-list { margin-block: .8rem; list-style: none; padding: 0; }
.bh-interests-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding-block: .45rem; }
.bh-interests-list li + li { border-top: 1px solid hsl(var(--border)); }
.bh-interests-search { align-items: end; margin-block: 1rem; }
.bh-interests-search label { display: grid; gap: .25rem; min-width: 0; }
.bh-interests-search input, .bh-interests-search select {
  width: 100%; min-height: 2.75rem; border: 1px solid hsl(var(--border));
  border-radius: .55rem; padding: .45rem .65rem; background: hsl(var(--background)); color: hsl(var(--foreground));
}
.bh-interests-panel .bh-interests-choices, .bh-interests-detail, .bh-interests-feedback { margin-block: .65rem; }
.bh-interests-public-inner { position: relative; display: flex; align-items: center; gap: .85rem; min-height: 4rem; }
.bh-interests-public-inner > a img { width: clamp(7rem, 13vw, 10rem); height: auto; }
.bh-interests-public-desktop { display: flex; align-items: center; gap: clamp(.55rem, 1.35vw, 1.25rem); font-size: .9rem; }
.bh-interests-public-search { margin-inline-start: auto; min-width: 0; }
.bh-interests-public-mobile { display: none; }
.bh-interests-public-inner summary { cursor: pointer; padding-block: .55rem; white-space: nowrap; }
.bh-interests-public-menu {
  position: absolute; top: 100%; margin-top: .35rem; z-index: 1; display: grid; gap: .3rem;
  width: max-content; max-width: min(20rem, calc(100vw - 2rem)); max-height: 65vh; overflow: auto;
  padding: .75rem; border: 1px solid hsl(var(--border)); border-radius: .65rem; background: hsl(var(--card));
}
.bh-interests-public-account { position: relative; }
.bh-interests-public-account > .bh-interests-public-menu { inset-inline-end: 0; }
.bh-interests-public-menu a { padding: .3rem .5rem; }
.bh-interests-public-menu .bh-interests-public-menu { position: static; width: auto; max-height: 11rem; }
@media (max-width: 900px) {
  .bh-interests-public-inner .bh-interests-public-desktop, .bh-interests-public-inner .bh-interests-public-search { display: none; }
  .bh-interests-public-mobile { display: block; }
  a.bh-interests-public-mobile { margin-inline-start: auto; }
  details.bh-interests-public-mobile > .bh-interests-public-menu { inset-inline-end: 1rem; }
}
/* A non-modal privacy card: never prepend a page-wide header strip. */
.bh-tracking-notice {
  --tracking-bottom: 24px;
  position: fixed; z-index: 55; inset-inline-end: 24px; bottom: var(--tracking-bottom);
  width: min(456px, calc(100% - 48px)); max-height: calc(100dvh - var(--tracking-bottom) - 24px);
  overflow: auto; overscroll-behavior: contain; color: hsl(var(--foreground));
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 12px;
  box-shadow: 0 12px 44px hsl(var(--foreground) / .12);
}
.bh-tracking-notice__inner { position: relative; display: grid; gap: 18px; padding: 24px; }
.bh-tracking-notice h2 { margin: 0 36px 8px 0; font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.015em; }
.bh-tracking-notice p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.75; }
.bh-tracking-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .625rem; }
.bh-tracking-actions button { min-height: 44px; padding: 8px 14px; border: 1px solid hsl(var(--border)); border-radius: 7px; background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; }
.bh-tracking-actions button:hover { background: hsl(var(--muted)); }
.bh-tracking-actions a { padding-block: 10px; text-underline-offset: 3px; text-decoration: underline; }
.bh-tracking-label-short { display: none; }
.bh-tracking-notice .bh-tracking-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; }
.bh-tracking-notice .bh-tracking-actions button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; font-size: 13px; line-height: 1.5; font-weight: 550; box-shadow: none; }
.bh-tracking-notice .bh-tracking-label-full { display: none; }
.bh-tracking-notice .bh-tracking-label-short { display: inline; }
.bh-tracking-notice .bh-tracking-actions a { grid-column: 1/-1; justify-self: start; display: inline-flex; align-items: center; min-height: 32px; padding: 2px 0; color: hsl(var(--muted-foreground)); font-size: 12px; text-decoration: none; }
.bh-tracking-notice .bh-tracking-actions a:hover { color: hsl(var(--link, var(--primary))); text-decoration: underline; }
.bh-tracking-notice button.bh-tracking-dismiss { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: hsl(var(--muted-foreground)); }
.bh-tracking-dismiss svg { width: 16px; height: 16px; }
.bh-tracking-notice button.bh-tracking-dismiss:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
.bh-tracking-notice :is(a,button):focus-visible,.bh-tracking-actions :is(a,button):focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }
.bh-tracking-notice[hidden],.bh-tracking-dismiss[hidden] { display: none !important; }
@media(max-width:1099px) {
 body:has(.bh-reading-actions) .bh-tracking-notice { --tracking-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media(max-width:1023px) {
 body:has(.a3-bottom-nav):not(:has(.bh-reading-actions)) .bh-tracking-notice { --tracking-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media(max-width:600px) {
 .bh-tracking-notice { inset-inline: 16px; width: auto; --tracking-bottom: calc(16px + env(safe-area-inset-bottom)); }
 .bh-tracking-notice__inner { gap: 16px; padding: 20px; }
 .bh-tracking-notice h2 { font-size: 15px; }
 .bh-tracking-notice button.bh-tracking-dismiss { top: 8px; inset-inline-end: 8px; }
}

.bh-tracking-current {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem .75rem;
}

/* Brand assets follow the resolved theme, including manual and System changes. */
.bh-brand-logo{width:auto;height:30px;object-fit:contain;background:transparent}
.bh-brand-logo--dark{display:none!important}
.dark .bh-brand-logo--light{display:none!important}
.dark .bh-brand-logo--dark{display:block!important}

/* Scope-specific feeds are quiet utility links, not article sort controls. */
a.bh-feed-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-height:44px;width:max-content;max-width:100%;margin-block:12px;padding:10px 14px;border:1px solid hsl(var(--border));border-radius:8px;background:hsl(var(--card));color:hsl(var(--muted-foreground));font-size:13px;font-weight:500;line-height:1.4;white-space:nowrap;text-decoration:none;transition:background-color .15s,border-color .15s,color .15s}
.bh-feed-link-icon{display:block;flex:none;width:16px;height:16px}
a.bh-feed-link:hover{background:hsl(var(--muted));border-color:hsl(var(--link,var(--primary))/.3);color:hsl(var(--link,var(--primary)))}
a.bh-feed-link:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}
