:root {
  color-scheme: light;
  --bg: #f6efe4;
  --bg-deep: #e7dccb;
  --paper: rgba(255, 250, 244, 0.82);
  --paper-strong: rgba(255, 249, 241, 0.94);
  --paper-loud: rgba(255, 252, 247, 0.96);
  --ink: #142326;
  --muted: #4b625e;
  --teal: #0f5a62;
  --sage: #8eab91;
  --rust: #d46e4d;
  --gold: #c6935d;
  --line: rgba(20, 35, 38, 0.1);
  --shadow: 0 24px 70px rgba(34, 48, 46, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 110, 77, 0.16), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(15, 90, 98, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf7f2 0%, var(--bg) 50%, var(--bg-deep) 100%);
  transition:
    background 220ms ease,
    color 220ms ease;
}

body.menu-open {
  overflow: hidden;
}

body.is-page-loading .page-shell,
body.is-page-transitioning .page-shell {
  opacity: 0.01;
  transform: translateY(10px) scale(0.995);
}

body.page-ready .page-shell {
  animation: page-shell-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(126, 216, 211, 0.08), transparent 30%),
    rgba(246, 239, 228, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
  backdrop-filter: blur(10px);
}

body.is-page-loading .page-transition,
body.is-page-transitioning .page-transition {
  opacity: 1;
  visibility: visible;
}

.page-transition-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-transition-mark span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #0c7883);
  box-shadow: 0 10px 22px rgba(12, 120, 131, 0.18);
  animation: transition-bob 0.9s ease-in-out infinite;
}

.page-transition-mark span:nth-child(2) {
  animation-delay: 0.12s;
}

.page-transition-mark span:nth-child(3) {
  animation-delay: 0.24s;
}

html[data-theme="dark"] .page-transition {
  background:
    radial-gradient(circle at center, rgba(126, 216, 211, 0.1), transparent 30%),
    rgba(9, 16, 19, 0.54);
}

body[data-view-mode="simple"] .detail-heavy-panel {
  display: none;
}

body[data-view-mode="simple"] .article-card .article-tags,
body[data-view-mode="simple"] .method-note {
  display: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.backdrop {
  position: fixed;
  inset: auto;
  z-index: 0;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.9;
  pointer-events: none;
}

.backdrop-a {
  width: 320px;
  height: 320px;
  top: 80px;
  right: 5vw;
  background: rgba(212, 110, 77, 0.14);
}

.backdrop-b {
  width: 260px;
  height: 260px;
  bottom: 8vh;
  left: 4vw;
  background: rgba(15, 90, 98, 0.14);
}

.content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 20px;
}

.nav-brand,
.nav-link {
  text-decoration: none;
}

.nav-brand {
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(20, 35, 38, 0.1);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(20, 35, 38, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 35, 38, 0.08);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.nav-menu-toggle span:not(.sr-only) {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.site-nav[data-menu-open="true"] .nav-menu-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-nav[data-menu-open="true"] .nav-menu-toggle span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(20, 35, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 35, 38, 0.08);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.theme-toggle:hover,
.nav-account-link:hover {
  transform: translateY(-1px);
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  min-width: 136px;
  min-height: 38px;
  padding: 0 12px;
}

.theme-toggle-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.theme-toggle-label:first-of-type {
  color: white;
}

.theme-toggle-label:last-of-type {
  color: var(--muted);
}

.theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 4px;
  width: calc(50% - 8px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #0c7883);
  box-shadow: 0 10px 22px rgba(12, 120, 131, 0.22);
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
  transform: translateY(-50%);
}

.nav-account-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(20, 35, 38, 0.1);
  background: linear-gradient(135deg, rgba(20, 35, 38, 0.08), rgba(255, 255, 255, 0.72));
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(20, 35, 38, 0.1);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.nav-account-link::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.nav-account-link.active {
  background: linear-gradient(135deg, var(--ink), #27444a);
  border-color: transparent;
  color: white;
}

.nav-account-link.active::before {
  background: rgba(255, 255, 255, 0.08);
}

.nav-account-avatar {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-account-avatar svg {
  width: 20px;
  height: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link.active {
  background: var(--ink);
  border-color: transparent;
  color: white;
}

.theme-toggle:focus-visible,
.nav-account-link:focus-visible,
.nav-link:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid rgba(15, 90, 98, 0.35);
  outline-offset: 2px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1114;
  --bg-deep: #111c21;
  --paper: rgba(15, 23, 27, 0.82);
  --paper-strong: rgba(18, 28, 33, 0.94);
  --paper-loud: rgba(21, 33, 37, 0.97);
  --ink: #edf6f1;
  --muted: #a7bab3;
  --teal: #7ed8d3;
  --sage: #9ab69d;
  --rust: #f09a74;
  --gold: #e4bd82;
  --line: rgba(237, 246, 241, 0.12);
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(240, 154, 116, 0.14), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(126, 216, 211, 0.14), transparent 26%),
    linear-gradient(180deg, #091013 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .search-form,
html[data-theme="dark"] .search-row input,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .checkbox-row,
html[data-theme="dark"] .password-toggle,
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .calendar-nav,
html[data-theme="dark"] .calendar-selectors select,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .empty-box,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .mini-stat,
html[data-theme="dark"] .preferred-auth-card,
html[data-theme="dark"] .restricted-card,
html[data-theme="dark"] .trend-meta-card,
html[data-theme="dark"] .trend-why,
html[data-theme="dark"] .trend-column,
html[data-theme="dark"] .trend-filter,
html[data-theme="dark"] .topic-tag,
html[data-theme="dark"] .link-pill,
html[data-theme="dark"] .sentence-item,
html[data-theme="dark"] .highlight-card,
html[data-theme="dark"] .detail-drawer {
  border-color: rgba(237, 246, 241, 0.08);
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .nav-link.active {
  background: linear-gradient(135deg, var(--gold), var(--rust));
  color: #10181c;
}

html[data-theme="dark"] .theme-toggle-label:first-of-type {
  color: var(--muted);
}

html[data-theme="dark"] .theme-toggle-label:last-of-type {
  color: #10181c;
}

html[data-theme="dark"] .theme-toggle-thumb {
  transform: translate(calc(100% - 2px), -50%);
  background: linear-gradient(135deg, var(--gold), var(--rust));
  box-shadow: 0 10px 22px rgba(240, 154, 116, 0.18);
}

html[data-theme="dark"] .nav-account-link {
  border-color: rgba(237, 246, 241, 0.08);
  background: linear-gradient(135deg, rgba(126, 216, 211, 0.16), rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .nav-account-link::before {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .nav-account-link.active {
  background: linear-gradient(135deg, var(--gold), var(--rust));
  color: #10181c;
}

html[data-theme="dark"] .nav-account-link.active::before {
  background: rgba(16, 24, 28, 0.16);
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow,
.section-label,
.note-title,
.meta-kicker,
.stat-label {
  margin: 0 0 10px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 700;
  line-height: 1.03;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.03em;
}

h4 {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

h1,
h2,
h3,
h4,
.hero-text,
.hero-purpose,
.mode-description,
.article-meta,
.citation-line,
.meta-line,
.detail-body,
.stat-detail,
.search-helper,
.search-label,
.link-pill,
.tag,
.article-tag,
.summary-chip span,
.summary-chip strong {
  overflow-wrap: anywhere;
}

.hero-text,
.panel p,
.detail-body,
.source-block p,
.glossary-item p,
.stat-detail {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.tag,
.article-tag,
.link-pill,
.quiet-note {
  display: inline-flex;
  align-items: center;
}

.tag,
.article-tag,
.link-pill {
  gap: 8px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 90, 98, 0.08);
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.quiet-note {
  margin: 18px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 35, 38, 0.06);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.content {
  display: grid;
  gap: 22px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  min-width: 0;
}

.control-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 90, 98, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(198, 147, 93, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 251, 246, 0.96), rgba(255, 247, 239, 0.84));
}

html[data-theme="dark"] .control-panel {
  background:
    radial-gradient(circle at top right, rgba(126, 216, 211, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(228, 189, 130, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 28, 33, 0.98), rgba(14, 22, 26, 0.9));
}

html[data-theme="dark"] .trend-hero,
html[data-theme="dark"] .trend-warning,
html[data-theme="dark"] .google-trends-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(15, 23, 27, 0.88);
  border-color: rgba(237, 246, 241, 0.08);
}

.control-panel::before,
.control-panel::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
}

.control-panel::before {
  width: 360px;
  height: 360px;
  top: -180px;
  right: -100px;
  background: radial-gradient(circle, rgba(15, 90, 98, 0.18), transparent 68%);
}

.control-panel::after {
  width: 260px;
  height: 260px;
  bottom: -140px;
  left: -80px;
  background: radial-gradient(circle, rgba(212, 110, 77, 0.16), transparent 68%);
}

.control-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.control-panel h1 {
  max-width: 14ch;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
}

.control-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(20, 35, 38, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-pill-soft {
  background: rgba(255, 255, 255, 0.8);
  color: var(--teal);
}

html[data-theme="dark"] .hero-pill {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

html[data-theme="dark"] .hero-pill-soft {
  background: rgba(126, 216, 211, 0.12);
  color: var(--teal);
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(20, 35, 38, 0.08);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

html[data-theme="dark"] .mode-switch {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(237, 246, 241, 0.08);
}

.mode-option {
  border: 0;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.mode-option.active {
  background: linear-gradient(135deg, var(--ink), #27444a);
  color: white;
  box-shadow: 0 10px 22px rgba(20, 35, 38, 0.14);
}

.control-panel h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
}

.control-summary {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding-top: 6px;
  border-top: 1px solid rgba(20, 35, 38, 0.08);
  min-width: 0;
}

html[data-theme="dark"] .control-summary {
  border-top-color: rgba(237, 246, 241, 0.08);
}

.hero-text {
  max-width: 72ch;
  margin: 0;
}

.hero-support-row {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  min-width: 0;
}

.mode-description {
  margin: 0;
  max-width: 60ch;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.55;
}

.search-form {
  margin-top: 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 35, 38, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.search-form-stack {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.article-form {
  margin-top: 0;
}

.smart-search-form {
  max-width: 920px;
}

.search-mode-hint {
  min-height: 1.4em;
  margin: 4px 2px 0;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 700;
}

html[data-theme="dark"] .search-form {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(10, 16, 19, 0.88);
  border-color: rgba(237, 246, 241, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
}

.search-divider::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 auto;
  width: 1px;
  background: rgba(20, 35, 38, 0.1);
}

.search-divider span {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[data-theme="dark"] .search-divider::before {
  background: rgba(237, 246, 241, 0.08);
}

html[data-theme="dark"] .search-divider span {
  background: rgba(10, 16, 19, 0.94);
}

.community-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.preferred-auth-card,
.restricted-card {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.field {
  display: grid;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 35, 38, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  line-height: 1.55;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
}

.checkbox-row span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.checkbox-row a {
  color: var(--teal);
  font-weight: 700;
}

.field > span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 35, 38, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  resize: vertical;
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .search-row input,
html[data-theme="dark"] .calendar-selectors select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: rgba(237, 246, 241, 0.1);
}

html[data-theme="dark"] .checkbox-row,
html[data-theme="dark"] .password-toggle,
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .calendar-nav,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .empty-box,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .mini-stat,
html[data-theme="dark"] .preferred-auth-card,
html[data-theme="dark"] .restricted-card,
html[data-theme="dark"] .trend-meta-card,
html[data-theme="dark"] .trend-why,
html[data-theme="dark"] .trend-column,
html[data-theme="dark"] .trend-filter,
html[data-theme="dark"] .topic-tag,
html[data-theme="dark"] .takeaway-card,
html[data-theme="dark"] .google-trends-hit,
html[data-theme="dark"] .loading,
html[data-theme="dark"] .error-box,
html[data-theme="dark"] .loading-card,
html[data-theme="dark"] .evidence-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border-color: rgba(237, 246, 241, 0.08);
}

html[data-theme="dark"] .month-trend-pill {
  background: rgba(126, 216, 211, 0.14);
  color: var(--teal);
}

html[data-theme="dark"] .article-rank,
html[data-theme="dark"] .temperature-pill,
html[data-theme="dark"] .mode-badge {
  background: rgba(126, 216, 211, 0.12);
  color: var(--teal);
}

html[data-theme="dark"] .article-tag {
  background: rgba(240, 154, 116, 0.14);
  color: #ffd4c0;
}

html[data-theme="dark"] .source-pill-peer {
  background: rgba(126, 216, 211, 0.12);
  color: var(--teal);
}

html[data-theme="dark"] .source-pill-official {
  background: rgba(154, 182, 157, 0.18);
  color: #cce7d0;
}

html[data-theme="dark"] .source-pill-influencer {
  background: rgba(240, 154, 116, 0.14);
  color: #ffd4c0;
}

html[data-theme="dark"] .source-pill-marketing {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

html[data-theme="dark"] .status-pill.pending {
  background: rgba(240, 154, 116, 0.14);
  color: #ffd4c0;
}

html[data-theme="dark"] .status-pill.approved {
  background: rgba(154, 182, 157, 0.18);
  color: #cce7d0;
}

html[data-theme="dark"] .status-pill.denied {
  background: rgba(255, 133, 133, 0.14);
  color: #ffc4c4;
}

html[data-theme="dark"] .error-text {
  color: #ffb4b4;
}

html[data-theme="dark"] .success-text {
  color: #bdeac7;
}

html[data-theme="dark"] .walkthrough-item,
html[data-theme="dark"] .source-block,
html[data-theme="dark"] .glossary-item,
html[data-theme="dark"] .stat-item {
  border-top-color: rgba(237, 246, 241, 0.08);
}

html[data-theme="dark"] .skeleton-line {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .skeleton-line::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
}

html[data-theme="dark"] .signal-loader span {
  border-color: rgba(126, 216, 211, 0.2);
}

html[data-theme="dark"] .error-box {
  border-color: rgba(240, 154, 116, 0.22);
}

html[data-theme="dark"] .search-row input::placeholder,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder {
  color: rgba(237, 246, 241, 0.46);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(15, 90, 98, 0.22);
  border-color: rgba(15, 90, 98, 0.38);
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.password-toggle {
  border: 1px solid rgba(20, 35, 38, 0.1);
  border-radius: 14px;
  min-height: 46px;
  padding: 0 14px;
  background: rgba(20, 35, 38, 0.06);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  transform: translateY(-1px);
}

.calendar-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(15, 90, 98, 0.12), transparent 35%),
    radial-gradient(circle at bottom left, rgba(198, 147, 93, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 35, 38, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.calendar-toolbar,
.calendar-selectors,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  gap: 10px;
}

.calendar-toolbar {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.calendar-title {
  margin: 0;
  text-align: center;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-transform: capitalize;
}

.calendar-nav {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(20, 35, 38, 0.08);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.calendar-nav[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.calendar-selectors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-selectors label {
  display: grid;
  gap: 6px;
}

.calendar-selectors span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-selectors select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(20, 35, 38, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0 12px;
}

.calendar-weekdays,
.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-day {
  border: 0;
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(20, 35, 38, 0.04);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.calendar-day:hover {
  transform: translateY(-1px);
  background: rgba(15, 90, 98, 0.12);
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--teal), #0c7883);
  box-shadow: 0 12px 24px rgba(12, 120, 131, 0.22);
  color: white;
}

.calendar-day.blank {
  background: transparent;
  pointer-events: none;
}

.calendar-day[disabled] {
  opacity: 0.28;
  cursor: not-allowed;
}

.calendar-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.stack-form button,
.approve-button,
.deny-button,
.secondary-button,
.primary-button,
.preferred-auth-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.stack-form button,
.approve-button,
.primary-button,
.preferred-auth-card button {
  background: linear-gradient(135deg, var(--teal), #0c7883);
  color: white;
}

.deny-button,
.secondary-button {
  background: rgba(20, 35, 38, 0.08);
  color: var(--ink);
}

.stack-form button:hover,
.approve-button:hover,
.deny-button:hover,
.secondary-button:hover,
.primary-button:hover,
.preferred-auth-card button:hover {
  transform: translateY(-1px);
}

.auth-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.auth-switch-secondary {
  margin: 0;
}

.toggle-chip {
  border: 1px solid rgba(20, 35, 38, 0.12);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.toggle-chip.active {
  background: var(--ink);
  color: white;
  border-color: transparent;
}

.account-card,
.empty-box,
.request-card,
.mini-stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.request-list-block {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-card-top,
.panel-actions,
.admin-counts {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.panel-actions {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.admin-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.compact-heading {
  margin-bottom: 12px;
}

.usage-policy-card {
  display: grid;
  gap: 8px;
}

.usage-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.usage-card h4 {
  margin-right: 12px;
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.disabled-auth-form button[disabled],
.disabled-auth-form input[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.legal-panel a {
  color: var(--teal);
  font-weight: 700;
}

.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.pending {
  background: rgba(212, 110, 77, 0.12);
  color: #8c4a35;
}

.status-pill.approved {
  background: rgba(96, 161, 109, 0.16);
  color: #2f6d3a;
}

.status-pill.denied {
  background: rgba(146, 71, 78, 0.14);
  color: #7a3840;
}

.account-callout-panel {
  display: grid;
  gap: 10px;
}

.account-callout-panel .hero-text {
  max-width: 48rem;
}

.account-link-button {
  width: fit-content;
  min-width: 0;
}

.error-text,
.success-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.error-text {
  color: #9b3f3f;
}

.success-text {
  color: #2f6d3a;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-purpose {
  margin: 18px 0 0;
  max-width: 54rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink);
}

.topic-rotator-line {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  vertical-align: baseline;
}

.topic-rotator-shell {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: min(100%, 12ch);
  min-height: 2.15em;
  min-width: 0;
  padding: 0.12em 0.54em 0.18em;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 90, 98, 0.14), rgba(198, 147, 93, 0.18)),
    rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 14px 28px rgba(20, 35, 38, 0.08);
  vertical-align: baseline;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

html[data-theme="dark"] .topic-rotator-shell {
  background:
    linear-gradient(135deg, rgba(126, 216, 211, 0.16), rgba(240, 154, 116, 0.1)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 28px rgba(0, 0, 0, 0.24);
}

.topic-rotator {
  display: inline-block;
  color: var(--teal);
  max-width: 100%;
  white-space: normal;
  line-height: 1.02;
  text-wrap: balance;
  will-change: transform, opacity, filter;
}

.topic-rotator.is-entering {
  animation: topicSwapIn 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.topic-rotator.is-leaving {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  filter: blur(4px);
}

@keyframes topicSwapIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(20, 35, 38, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.search-row input:focus {
  outline: 2px solid rgba(15, 90, 98, 0.24);
  border-color: rgba(15, 90, 98, 0.4);
}

.search-row button,
.preset-button,
.article-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.search-row button {
  border: 0;
  border-radius: 18px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--teal), #0c7883);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.search-row button:hover,
.preset-button:hover,
.article-card:hover {
  transform: translateY(-2px);
}

.search-helper {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: flex-start;
}

.preset-button {
  border: 1px solid rgba(20, 35, 38, 0.1);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.preset-button.active {
  background: var(--ink);
  color: white;
  border-color: transparent;
}

.method-note {
  margin: 0;
  color: var(--muted);
}

.stats-grid,
.insight-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.single-insight {
  grid-template-columns: 1fr;
}

.panel-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.chart-stack {
  display: grid;
  gap: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr auto;
  gap: 12px;
  align-items: center;
}

.chart-term,
.chart-year {
  font-weight: 700;
}

.chart-bar-shell {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 35, 38, 0.08);
}

.chart-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rust), #f2a269);
  animation: fill-bar 650ms ease forwards;
}

.chart-row:nth-child(even) .chart-bar {
  background: linear-gradient(90deg, var(--teal), #49a0a7);
}

@keyframes fill-bar {
  from {
    width: 0;
  }
  to {
    width: var(--target-width);
  }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.article-list-panel {
  min-width: 0;
  overflow: hidden;
}

.article-list {
  display: grid;
  gap: 12px;
}

.article-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(20, 35, 38, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 243, 236, 0.72));
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(20, 35, 38, 0.06);
}

html[data-theme="dark"] .article-card {
  background: linear-gradient(180deg, rgba(20, 31, 36, 0.95), rgba(13, 21, 24, 0.88));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.article-card.active {
  background:
    linear-gradient(180deg, rgba(15, 90, 98, 0.16), rgba(255, 255, 255, 0.92));
  border-color: rgba(15, 90, 98, 0.25);
  box-shadow: 0 18px 32px rgba(15, 90, 98, 0.12);
}

html[data-theme="dark"] .article-card.active {
  background: linear-gradient(180deg, rgba(21, 72, 78, 0.52), rgba(18, 31, 35, 0.96));
  border-color: rgba(126, 216, 211, 0.24);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

.article-rank {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 90, 98, 0.1);
  color: var(--teal);
  font-weight: 800;
  font-size: 0.88rem;
}

.article-card h4 {
  margin-bottom: 10px;
}

.article-summary {
  color: var(--ink);
}

.article-meta,
.citation-line,
.meta-line {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.article-tag {
  min-height: 30px;
  padding: 6px 10px;
  background: rgba(212, 110, 77, 0.1);
  color: #9e4e36;
  font-size: 0.82rem;
}

.article-detail {
  min-width: 0;
  min-height: 760px;
  display: grid;
  gap: 22px;
}

.article-detail.empty-state {
  place-items: center;
}

.empty-copy {
  max-width: 56ch;
  text-align: center;
}

.detail-top {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.mode-banner {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 90, 98, 0.1), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(15, 90, 98, 0.12);
}

.mode-banner p {
  margin: 0;
  color: var(--ink);
}

.mode-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 35, 38, 0.08);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simple-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.detail-title {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.detail-meta {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.meta-pills,
.source-links,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.glossary-list,
.stat-list {
  display: grid;
  gap: 14px;
}

.link-pill {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

html[data-theme="dark"] .link-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--teal);
}

.simple-summary-stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.simple-summary-line {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 90, 98, 0.1), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(15, 90, 98, 0.12);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}

html[data-theme="dark"] .simple-summary-line {
  background: linear-gradient(180deg, rgba(126, 216, 211, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(126, 216, 211, 0.12);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  min-width: 0;
}

.detail-section,
.source-section,
.mini-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  min-width: 0;
}

html[data-theme="dark"] .detail-section,
html[data-theme="dark"] .source-section,
html[data-theme="dark"] .mini-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border-color: rgba(237, 246, 241, 0.08);
}

.detail-section h4,
.source-section h4,
.mini-panel h4 {
  margin-bottom: 10px;
}

.walkthrough-list,
.source-list {
  display: grid;
  gap: 16px;
}

.walkthrough-list-compact {
  gap: 12px;
}

.detail-highlight-panel {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(212, 110, 77, 0.12), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(212, 110, 77, 0.16);
}

html[data-theme="dark"] .detail-highlight-panel {
  background: linear-gradient(180deg, rgba(240, 154, 116, 0.1), rgba(255, 255, 255, 0.03));
  border-color: rgba(240, 154, 116, 0.16);
}

.deep-dive-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 90, 98, 0.08), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(15, 90, 98, 0.12);
}

html[data-theme="dark"] .deep-dive-panel {
  background: linear-gradient(180deg, rgba(126, 216, 211, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(126, 216, 211, 0.12);
}

.sentence-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.sentence-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

html[data-theme="dark"] .sentence-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(237, 246, 241, 0.08);
}

.sentence-source {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sentence-original,
.sentence-plain {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sentence-plain {
  margin-top: 8px;
  color: var(--ink);
}

.highlight-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.highlight-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border-left: 4px solid var(--rust);
}

.detail-drawer {
  border-radius: 22px;
  border: 1px solid rgba(20, 35, 38, 0.08);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

html[data-theme="dark"] .detail-drawer {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(237, 246, 241, 0.08);
}

.legal-toc {
  display: grid;
  gap: 14px;
}

.legal-toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 35, 38, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-stack {
  display: grid;
  gap: 16px;
}

.legal-section {
  padding: 0;
  overflow: hidden;
}

.legal-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--ink);
}

.legal-section summary::-webkit-details-marker {
  display: none;
}

.legal-section summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 35, 38, 0.08);
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.legal-section[open] summary::after {
  content: "−";
}

.legal-section-content {
  display: grid;
  gap: 14px;
  padding: 0 24px 24px;
}

.legal-section-content p {
  margin: 0;
}

html[data-theme="dark"] .legal-toc-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(237, 246, 241, 0.08);
}

html[data-theme="dark"] .legal-section summary::after {
  background: rgba(255, 255, 255, 0.06);
}

.detail-drawer summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 800;
}

.detail-drawer summary::-webkit-details-marker {
  display: none;
}

.drawer-stack {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.trend-hero,
.trend-warning,
.trend-toolbar,
.trend-topic {
  overflow: hidden;
}

.trend-hero {
  display: grid;
  gap: 20px;
  background:
    radial-gradient(circle at top right, rgba(15, 90, 98, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(255, 248, 240, 0.84));
}

.trend-copy {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.trend-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

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

.trend-meta-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.trend-meta-card strong {
  display: block;
  color: var(--ink);
  line-height: 1.35;
}

.trend-warning {
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(212, 110, 77, 0.08), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(212, 110, 77, 0.14);
}

.source-legend,
.trend-filter-list,
.topic-tag-row,
.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.source-pill,
.topic-tag,
.temperature-pill,
.trend-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.source-pill {
  border: 1px solid transparent;
}

.source-pill-peer {
  background: rgba(15, 90, 98, 0.1);
  color: var(--teal);
}

.source-pill-official {
  background: rgba(142, 171, 145, 0.2);
  color: #305038;
}

.source-pill-influencer {
  background: rgba(212, 110, 77, 0.12);
  color: #8a4b34;
}

.source-pill-marketing {
  background: rgba(20, 35, 38, 0.08);
  color: var(--ink);
}

.trend-toolbar {
  display: grid;
  gap: 14px;
}

.trend-filter {
  cursor: pointer;
  border: 1px solid rgba(20, 35, 38, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.trend-filter:hover {
  transform: translateY(-1px);
}

.trend-filter.active {
  background: var(--ink);
  border-color: transparent;
  color: white;
}

.trend-topic-list {
  display: grid;
  gap: 22px;
}

.trend-topic {
  display: grid;
  gap: 18px;
}

.trend-topic-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.trend-topic-copy {
  display: grid;
  gap: 10px;
}

.trend-topic-copy h2 {
  max-width: 16ch;
}

.trend-topic-side {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.temperature-pill {
  background: rgba(15, 90, 98, 0.08);
  color: var(--teal);
}

.topic-tag {
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.trend-why {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.trend-why p:last-child,
.evidence-item p,
.takeaway-card p:last-child {
  margin: 0;
}

.trend-compare-grid,
.takeaway-grid {
  display: grid;
  gap: 16px;
}

.trend-compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.takeaway-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-column {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.column-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.evidence-stack {
  display: grid;
  gap: 12px;
}

.evidence-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(246, 239, 228, 0.72);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.evidence-meta {
  margin-bottom: 10px;
}

.evidence-meta a {
  font-size: 0.9rem;
  font-weight: 700;
}

.takeaway-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 241, 0.72));
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.takeaway-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trend-empty {
  text-align: center;
}

.google-trends-panel {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top left, rgba(142, 171, 145, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 243, 237, 0.82));
}

.google-trends-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

.google-trends-hit {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.google-trends-hit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.month-trend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(142, 171, 145, 0.22);
  color: #305038;
  font-size: 0.84rem;
  font-weight: 700;
}

.highlight-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.walkthrough-item,
.source-block,
.glossary-item,
.stat-item {
  padding-top: 14px;
  border-top: 1px solid rgba(20, 35, 38, 0.09);
}

.walkthrough-item:first-child,
.source-block:first-child,
.glossary-item:first-child,
.stat-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.walkthrough-source {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}

.important-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.disclaimer-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.source-block strong {
  color: var(--ink);
}

a {
  color: var(--teal);
}

.loading,
.error-box {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
}

.loading-cluster {
  display: grid;
  gap: 12px;
}

.loading-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 35, 38, 0.08);
}

.detail-loading-card {
  width: 100%;
}

.skeleton-line {
  position: relative;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 35, 38, 0.08);
}

.skeleton-line::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  animation: shimmer 1.35s ease-in-out infinite;
}

.skeleton-pill {
  width: 96px;
}

.skeleton-title {
  height: 18px;
}

.skeleton-line.short {
  width: 58%;
  margin-bottom: 0;
}

.skeleton-title.short {
  width: 72%;
}

.loading-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-loader {
  display: grid;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.detail-loader-copy {
  display: grid;
  gap: 8px;
}

.signal-loader {
  position: relative;
  width: 58px;
  height: 58px;
}

.signal-loader span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(15, 90, 98, 0.18);
  animation: pulse-ring 2s ease-out infinite;
}

.signal-loader span:nth-child(2) {
  animation-delay: 0.45s;
}

.signal-loader span:nth-child(3) {
  animation-delay: 0.9s;
}

.error-box {
  border: 1px solid rgba(212, 110, 77, 0.25);
}

.fade-up {
  animation: fade-up 520ms ease both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-ring {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes page-shell-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes transition-bob {
  0%,
  100% {
    transform: translateY(0) scale(0.92);
    opacity: 0.62;
  }
  50% {
    transform: translateY(-8px) scale(1);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .community-grid,
  .insight-grid,
  .workspace,
  .detail-grid,
  .simple-detail-grid,
  .stats-grid,
  .trend-compare-grid,
  .takeaway-grid,
  .google-trends-hit-grid {
    grid-template-columns: 1fr;
  }

  .admin-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-usage-grid {
    grid-template-columns: 1fr;
  }

  .trend-meta-grid {
    grid-template-columns: 1fr;
  }

  .trend-topic-head {
    grid-template-columns: 1fr;
  }

  .trend-topic-side {
    justify-items: start;
  }

  h1 {
    max-width: none;
  }

  .article-detail {
    min-height: auto;
  }

  .control-summary {
    min-height: 0;
  }

  .search-form-stack {
    grid-template-columns: 1fr;
  }

  .search-divider::before {
    inset: 50% 0 auto;
    width: auto;
    height: 1px;
  }
}

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

  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 108px 20px 28px;
    background:
      linear-gradient(180deg, rgba(251, 247, 242, 0.96), rgba(231, 220, 203, 0.98));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 220ms ease,
      visibility 220ms ease;
    scrollbar-width: none;
  }

  .nav-actions {
    position: relative;
    z-index: 91;
    width: auto;
    justify-content: flex-end;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    font-size: 1.15rem;
    border-radius: 18px;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .theme-toggle {
    flex: 0 0 auto;
    max-width: none;
  }

  .site-nav[data-menu-open="true"] .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav[data-menu-open="true"] .nav-brand,
  .site-nav[data-menu-open="true"] .nav-actions {
    position: relative;
    z-index: 92;
  }

  html[data-theme="dark"] .nav-links {
    background:
      linear-gradient(180deg, rgba(9, 16, 19, 0.98), rgba(17, 28, 33, 0.98));
  }

  .control-panel h1 {
    max-width: none;
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .control-topbar {
    align-items: stretch;
  }

  .mode-switch {
    width: 100%;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    min-height: 52px;
  }

  .hero-purpose,
  .hero-text {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .topic-rotator-shell {
    max-width: min(80vw, 100%);
    min-height: 2.45em;
  }

  .preset-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -2px;
    padding: 2px 2px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .preset-list::-webkit-scrollbar {
    display: none;
  }

  .preset-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .workspace {
    gap: 14px;
  }

  .article-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .article-list::-webkit-scrollbar {
    display: none;
  }

  .article-card {
    flex: 0 0 min(84vw, 320px);
    min-height: 100%;
    scroll-snap-align: start;
  }

  .article-detail {
    gap: 18px;
  }

  .detail-grid {
    gap: 14px;
  }

  .drawer-stack {
    padding: 0 14px 14px;
  }

  .detail-section,
  .source-section,
  .mini-panel {
    padding: 18px;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .trend-copy h1 {
    max-width: none;
  }

  .panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .legal-section summary {
    padding: 18px 20px;
    font-size: 1.08rem;
  }

  .legal-section-content {
    padding: 0 20px 20px;
  }
}
