:root {
  color-scheme: dark;
  --bg: #05080b;
  --surface: #0a0f14;
  --surface-2: #101820;
  --surface-3: #17212b;
  --text: #f7fbff;
  --muted: #a6b1bd;
  --cyan: #00e9f4;
  --cyan-soft: rgba(0, 233, 244, .13);
  --cyan-border: rgba(0, 233, 244, .42);
  --red: #ff3658;
  --red-soft: rgba(255, 54, 88, .14);
  --green: #24e782;
  --border: rgba(255, 255, 255, .12);
  --shadow: 0 18px 44px rgba(0, 0, 0, .3);
  --chrome: rgba(5, 8, 11, .92);
  --chrome-strong: rgba(5, 8, 11, .97);
  --card-bg: rgba(10, 15, 20, .92);
  --soft-copy: #c0c9d1;
  --radius: 18px;
  --header-height: 78px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee5;
  --surface: #fffaf2;
  --surface-2: #e9e2d7;
  --surface-3: #ddd5ca;
  --text: #171a1e;
  --muted: #5e6871;
  --cyan: #007f89;
  --cyan-soft: rgba(0, 127, 137, .1);
  --cyan-border: rgba(0, 127, 137, .45);
  --red: #c51f43;
  --red-soft: rgba(197, 31, 67, .11);
  --green: #087a45;
  --border: rgba(23, 26, 30, .18);
  --shadow: 0 18px 40px rgba(42, 34, 25, .16);
  --chrome: rgba(243, 238, 229, .94);
  --chrome-strong: rgba(243, 238, 229, .98);
  --card-bg: rgba(255, 250, 242, .96);
  --soft-copy: #46515b;
}

:root[data-theme="contrast"] {
  color-scheme: dark;
  --bg: #000;
  --surface: #050505;
  --surface-2: #0c0c0c;
  --surface-3: #151515;
  --text: #fff;
  --muted: #e1e1e1;
  --cyan: #00ffff;
  --cyan-soft: rgba(0, 255, 255, .16);
  --cyan-border: #00ffff;
  --red: #ff3154;
  --red-soft: rgba(255, 49, 84, .18);
  --border: rgba(255, 255, 255, .42);
  --chrome: rgba(0, 0, 0, .97);
  --chrome-strong: #000;
  --card-bg: #050505;
  --soft-copy: #fff;
}

.help-privacy,
.contextual-help { border-inline-start: 4px solid var(--red); background: var(--surface); padding: 14px 16px; }
.help-urgent-boundary { display: grid; gap: 10px; margin-block: 14px; border: 2px solid var(--red); border-radius: 12px; background: var(--red-soft); padding: 14px 16px; }
.help-emergency-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.help-emergency-actions a { min-height: 44px; }
.help-offline-origin { display: grid; gap: 4px; margin-block: 12px; border-inline-start: 4px solid #ffcf4a; background: var(--surface); padding: 14px 16px; }
.help-offline-origin strong,
.help-offline-origin span { overflow-wrap: anywhere; }
.help-search-row { display: grid; gap: 6px; margin-block: 16px; font-weight: 700; }
.help-search-row input { inline-size: 100%; min-block-size: 48px; }
.help-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.help-filters legend { padding-inline: 6px; font-weight: 800; }
.help-filters label,
.help-submission label { display: grid; gap: 6px; font-weight: 700; }
.help-filters select,
.help-submission input,
.help-submission textarea { inline-size: 100%; min-block-size: 44px; }
.help-results { display: grid; gap: 12px; margin-block: 16px; }
.help-profile { border: 1px solid var(--border); border-radius: 12px; overflow: clip; }
.help-profile > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; cursor: pointer; }
.help-profile > summary span { display: grid; gap: 4px; }
.help-profile > summary em { max-inline-size: 288px; font-size: .82rem; font-style: normal; font-weight: 800; }
.help-profile__boundary.is-crisis { color: #ffcf4a; }
.help-profile__boundary.is-advice { color: var(--muted); }
.help-profile__body { padding: 0 16px 16px; }
.help-profile__body h3 { font-size: 1rem; margin-block-end: 4px; }
.help-tag { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; margin: 2px; font-size: .8rem; }
.help-submission { margin-block: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.help-submission label { margin-block: 12px; }
.help-filter-actions { display: flex; justify-content: flex-end; }
.help-result-count { color: var(--muted); font-weight: 800; }
.help-coverage-gaps { margin-block: 18px; border: 1px dashed #ffcf4a; border-radius: 12px; padding: 16px; }
.help-coverage-gaps h2 { font-size: 1.05rem; }
.contextual-help ul { display: grid; gap: 6px; padding-inline-start: 20px; }
.contextual-help li small { display: block; }
.briefing-preview .is-current { outline: 2px solid var(--red); outline-offset: 2px; }
.briefing-preview button { margin-block-start: 6px; }
.briefing-audio-notice { padding: 12px; border: 1px solid var(--border); border-radius: 8px; }

@media (max-width: 720px) {
  .help-filters { grid-template-columns: 1fr; }
  .help-profile > summary { align-items: flex-start; flex-direction: column; }
}

/* Planned 2.1 dossiers: evidence stays readable without implying truth. */
.overlooked-section,
.dossier-evidence {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.overlooked-section ul,
.dossier-evidence ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.overlooked-section button,
.home-today-removed {
  display: grid;
  width: 100%;
  gap: 3px;
  text-align: left;
}

.development-card.is-active-dossier {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.dossier-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  color: var(--muted);
}

.perspective-matrix-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.perspective-matrix {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: .86rem;
}

.perspective-matrix th,
.perspective-matrix td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.perspective-matrix th[scope="row"] {
  min-width: 220px;
}

.matrix-report {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.data-input-checklist {
  margin-top: .75rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: .62rem .72rem;
  background: var(--surface-2);
}

.data-input-checklist summary {
  cursor: pointer;
  font-weight: 800;
}

.data-input-checklist p {
  margin: .55rem 0;
  color: var(--muted);
}

.data-input-checklist ul {
  display: grid;
  gap: .3rem;
  margin: .5rem 0 0;
  padding-left: 1.25rem;
}

.data-input-checklist code {
  overflow-wrap: anywhere;
  font-size: .78rem;
}

@media (max-width: 640px) {
  .overlooked-section,
  .dossier-evidence {
    padding: 13px;
    border-radius: 12px;
  }

  .perspective-matrix-scroll:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 2px;
  }
}

:root[data-theme="pink"] {
  color-scheme: dark;
  --bg: #000;
  --surface: #240b19;
  --surface-2: #351027;
  --surface-3: #4a1737;
  --text: #fff5fb;
  --muted: #ddb6cc;
  --cyan: #ff4fa3;
  --cyan-soft: rgba(255, 79, 163, .17);
  --cyan-border: rgba(255, 79, 163, .58);
  --red: #9b82ff;
  --red-soft: rgba(155, 130, 255, .18);
  --green: #ffb5d9;
  --border: rgba(255, 191, 224, .2);
  --shadow: 0 18px 44px rgba(35, 0, 21, .4);
  --chrome: rgba(0, 0, 0, .94);
  --chrome-strong: rgba(0, 0, 0, .98);
  --card-bg: rgba(36, 11, 25, .94);
  --soft-copy: #edcde0;
}

:root[data-font-size="large"] {
  font-size: 112.5%;
}

:root[data-font-size="xlarge"] {
  font-size: 125%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 8% 6%, rgba(0, 233, 244, .08), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(255, 54, 88, .08), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--cyan);
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--cyan);
  color: #001013;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.next-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--chrome-strong);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .2);
}

.next-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, var(--cyan) 34%, rgba(255, 255, 255, .28) 50%, var(--red) 66%, transparent 96%);
  content: "";
  opacity: .65;
  pointer-events: none;
}

.next-header__inner {
  display: flex;
  min-height: var(--header-height);
  max-width: 1180px;
  margin: 0 auto;
  padding: 7px clamp(12px, 3vw, 28px);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.brand__logo {
  position: relative;
  display: block !important;
  width: 110px;
  height: 104px;
  overflow: visible;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 110px;
  height: 104px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--cyan) 38%, transparent)) drop-shadow(0 0 5px color-mix(in srgb, var(--red) 28%, transparent));
  flex: 0 0 auto;
}

.brand:hover img,
.brand:focus-visible img {
  filter: drop-shadow(0 0 13px color-mix(in srgb, var(--cyan) 58%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--red) 44%, transparent));
  transform: scale(1.035);
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(.84rem, 2.4vw, 1.05rem);
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: var(--cyan);
  font-size: .72rem;
}

.brand-edition {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--cyan-border);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: .68rem;
  font-weight: 800;
  align-items: center;
  letter-spacing: .035em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.language-control select,
.classic-link {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  place-items: center;
}

.icon-button {
  cursor: pointer;
}

.icon-button span {
  color: var(--cyan);
  font-size: 1.55rem;
  line-height: 1;
}

.language-control select {
  padding: 0 8px;
  cursor: pointer;
}

.classic-link {
  display: inline-flex;
  padding: 0 12px;
  color: var(--muted);
  font-size: .78rem;
  text-decoration: none;
}

.global-search {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px clamp(12px, 3vw, 28px) 14px;
}

.global-search label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
}

.global-search div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.global-search input {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
}

.global-search button,
.primary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  background: var(--cyan);
  color: #001013;
  font-weight: 800;
  cursor: pointer;
}

#next-main {
  width: min(1120px, calc(100% - 24px));
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 24px 0 calc(116px + env(safe-area-inset-bottom));
}

.loading-state {
  display: grid;
  min-height: 52vh;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.loading-star {
  display: inline-block;
  color: #050609;
  text-shadow:
    -1px -1px 0 var(--red),
    1px -1px 0 var(--red),
    -1px 1px 0 var(--red),
    1px 1px 0 var(--red);
}

.red-black-star {
  display: inline-grid;
  color: transparent;
  background: linear-gradient(90deg, #050508 0 48%, #ff3158 52% 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: .6px #ff3158;
  font-size: 1.3rem;
  line-height: 1;
  place-items: center;
  text-shadow: 2px 0 #050508, 0 0 8px rgba(255, 49, 88, .55);
  transform: rotate(0);
}

:root[data-theme="light"] .red-black-star {
  background-image: linear-gradient(90deg, #17141b 0 48%, #b5153b 52% 100%);
  -webkit-text-stroke-color: #b5153b;
  text-shadow: 1px 0 #17141b, 0 0 6px rgba(181, 21, 59, .28);
}

.loading-star {
  font-size: 3rem;
  animation: rotate-star 1.1s linear infinite;
}

@keyframes rotate-star {
  to { transform: rotate(360deg); }
}

.view-heading {
  display: flex;
  margin: 4px 0 18px;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.view-heading h1,
.view-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.05;
}

.view-heading p {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.home-hero {
  display: grid;
  overflow: hidden;
  min-height: 330px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr);
}

.home-hero__image {
  position: relative;
  display: grid;
  overflow: hidden;
  padding: 8px;
  min-height: 290px;
  background:
    linear-gradient(135deg, rgba(0, 233, 244, .12), rgba(255, 54, 88, .11)),
    var(--surface-3);
  place-items: center;
}

.home-hero__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
  object-position: center;
}

.home-hero__content {
  display: flex;
  padding: clamp(20px, 4vw, 38px);
  flex-direction: column;
  justify-content: center;
}

.home-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1.06;
}

.home-hero p {
  margin: 0 0 18px;
  color: var(--soft-copy);
  line-height: 1.55;
}

.meta-line {
  display: flex;
  color: var(--muted);
  font-size: .76rem;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.data-status--live {
  border-color: rgba(0, 233, 244, .5);
}

.data-status--offline {
  border-color: rgba(255, 48, 86, .72);
  color: #ff899d;
}

.data-status--snapshot {
  border-color: color-mix(in srgb, var(--red) 68%, var(--border));
  color: var(--red);
}

.data-status-action {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.data-freshness {
  display: flex;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .72rem;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.data-freshness strong {
  color: var(--red);
}

.data-freshness--warning {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--red) 55%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--red) 7%, var(--surface));
}

.tag {
  display: inline-flex;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid rgba(0, 233, 244, .35);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: .68rem;
  font-weight: 800;
  align-items: center;
}

.section-heading {
  display: flex;
  margin: 28px 0 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2,
.section-heading-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}

.section-heading small {
  color: var(--muted);
}

.section-text-action {
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.briefing-strip {
  display: grid;
  margin-bottom: 24px;
  gap: 9px;
}

.briefing-item {
  display: grid;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
}

.briefing-item b {
  color: var(--red);
  font-size: 1.05rem;
}

.briefing-item__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.briefing-item__copy strong {
  display: block;
  overflow: visible;
  font-weight: 700;
  line-height: 1.3;
}

.briefing-item__copy small {
  display: block;
  overflow: visible;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.35;
}

.home-today {
  margin: 4px 0 30px;
}

.home-today__heading {
  margin-top: 0;
}

.home-today__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.home-today-card {
  display: flex;
  min-width: 0;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  flex-direction: column;
  gap: 11px;
}

.home-today-card.has-warning {
  border-color: color-mix(in srgb, var(--red) 62%, var(--border));
}

.home-today-card--wide {
  min-height: 0;
  grid-column: span 2;
}

.home-today-card header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
}

.home-today-card header > span {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--cyan-border);
  border-radius: 10px;
  color: var(--cyan);
  place-items: center;
  font-weight: 900;
}

.home-today-card header div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.home-today-card header small,
.home-today-card > p {
  color: var(--muted);
}

.home-today-card header strong {
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.home-today-card > p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
}

.home-today-updates {
  display: grid;
  gap: 6px;
}

.home-today-updates button {
  display: grid;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  gap: 2px;
}

.home-today-updates strong {
  overflow: hidden;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-today-updates small {
  overflow: hidden;
  color: var(--muted);
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-today-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.home-today-metrics span {
  display: grid;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  place-items: center;
  font-size: .61rem;
  text-align: center;
  gap: 1px;
}

.home-today-metrics b {
  color: var(--text);
  font-size: .95rem;
}

.home-today-warning {
  color: var(--red);
  font-size: .7rem;
  font-weight: 850;
}

.home-today-link,
.home-today-actions button {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 850;
  cursor: pointer;
}

.home-today-link {
  width: 100%;
  margin-top: auto;
  text-align: left;
}

.home-today-actions {
  display: grid;
  margin-top: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.home-today-actions button:first-child {
  border-color: var(--cyan-border);
  background: var(--cyan-soft);
}

.home-service-grid {
  display: grid;
  margin: 2px 0 30px;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-service-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.home-service-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-service-card h2 {
  margin: 0;
  font-size: 1.08rem;
}

.home-service-link {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(0, 233, 244, .4);
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 900;
  place-items: center;
  cursor: pointer;
}

.home-service-list {
  display: grid;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  gap: 11px;
}

.home-service-list li {
  display: grid;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.home-service-list strong {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.home-service-list small {
  color: var(--muted);
  line-height: 1.4;
}

.home-service-empty {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.45;
}

.briefing-item[aria-busy="true"] {
  grid-template-columns: 34px minmax(0, 1fr) 22px;
}

.briefing-item[aria-busy="true"]::after {
  content: "★";
  color: transparent;
  background: linear-gradient(90deg, #050508 0 48%, #ff3158 52% 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: .6px #ff3158;
  text-shadow: 2px 0 #050508, 0 0 8px rgba(255, 49, 88, .55);
  animation: rotate-star .9s linear infinite;
}

.article-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  grid-template-columns: minmax(0, 1fr) minmax(118px, 34%);
}

.news-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--cyan), var(--red));
  content: "";
  opacity: 0;
}

.news-card:focus-within::before,
.news-card:hover::before {
  opacity: 1;
}

.news-card__body {
  display: flex;
  min-width: 0;
  padding: 15px 14px 13px 17px;
  flex-direction: column;
}

.news-card h3 {
  margin: 8px 0 8px;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.22;
}

.news-card__open {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.news-card p {
  display: block;
  overflow: visible;
  margin: 0 0 13px;
  color: var(--soft-copy);
  font-size: .9rem;
  line-height: 1.45;
}

.news-card__image {
  display: grid;
  overflow: hidden;
  padding: 6px;
  min-width: 0;
  min-height: 174px;
  max-height: 260px;
  background:
    linear-gradient(140deg, rgba(0, 233, 244, .08), rgba(255, 54, 88, .08)),
    var(--surface-3);
  place-items: center;
}

.news-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
  object-position: center;
}

.card-actions {
  display: flex;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  align-items: center;
  gap: 8px;
}

.article-classification {
  margin-top: auto;
  padding-top: 10px;
}

.home-hero .article-classification {
  margin-top: 0;
}

:root[data-density="compact"] .article-grid {
  gap: 9px;
}

:root[data-density="compact"] .news-card__body {
  padding: 11px 10px 9px 14px;
}

:root[data-density="compact"] .news-card p {
  margin-bottom: 8px;
}

:root[data-density="compact"] .news-card__image {
  min-height: 130px;
}

:root[data-density="compact"] .article-classification {
  padding-top: 6px;
}

:root[data-density="compact"] .card-actions {
  margin-top: 8px;
  padding-top: 8px;
}

:root[data-density="spacious"] .article-grid {
  gap: 20px;
}

:root[data-density="spacious"] .news-card__body {
  padding: 20px 18px 18px 21px;
}

:root[data-density="spacious"] .news-card p {
  margin-bottom: 18px;
}

.translate-card,
.save-card,
.small-action {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 54, 88, .42);
  border-radius: 10px;
  background: transparent;
  color: var(--red);
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.translate-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-actions .translate-card,
.card-actions .small-action {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.translate-card[aria-busy="true"] .red-black-star {
  animation: rotate-star .9s linear infinite;
}

.save-card {
  min-width: 38px;
  margin-left: auto;
  color: var(--muted);
}

.save-card[aria-pressed="true"] {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.translation-note {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: .67rem;
}

.preference-reason {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: .72rem;
  line-height: 1.35;
}

.choice-grid,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.website-button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #ff3158;
  border-radius: 12px;
  background: linear-gradient(135deg, #030306 0 58%, #c90032 58% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 0 18px rgba(255, 49, 88, .2), 0 0 17px rgba(255, 18, 65, .24);
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: .055em;
  white-space: nowrap;
  cursor: pointer;
}

.website-button__icon {
  color: #ff3158;
  font-size: 1.05rem;
}

.website-button > span:last-child {
  color: #ff3158;
  font-size: .9rem;
}

.website-button__short { display: none; }

.website-button:hover,
.website-button:focus-visible {
  border-color: #ff5574;
  background: linear-gradient(135deg, #000 0 52%, #f0003c 52% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 0 22px rgba(255, 18, 65, .4);
  color: #fff;
  transform: translateY(-1px);
}

.website-dialog {
  border-color: var(--cyan-border);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent), var(--shadow);
}

.website-shell header small { color: var(--cyan); }

.website-dialog-content {
  position: relative;
}

.website-dialog-content::before {
  display: block;
  width: 54px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) 0 64%, var(--red) 64% 100%);
  content: "";
}

.choice-grid--topics,
.filter-chips--topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.choice-grid--topics .choice-chip span,
.filter-chips--topics .filter-chip {
  width: 100%;
  border-radius: 11px;
  justify-content: flex-start;
  text-align: left;
}

.choice-chip,
.filter-chip {
  position: relative;
}

.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span,
.filter-chip {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  align-items: center;
  cursor: pointer;
}

.choice-chip input:checked + span,
.filter-chip.active {
  border-color: var(--red);
  background: var(--red);
  color: #07080a;
}

.personal-summary {
  display: flex;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.personal-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.followed-context {
  display: grid;
  margin-bottom: 18px;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.followed-context .section-heading {
  margin: 0 0 7px;
}

.followed-context__button {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--cyan-border);
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--text);
  line-height: 1.4;
  text-align: left;
}

.secondary-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.discover-controls {
  display: grid;
  margin-bottom: 18px;
  gap: 14px;
}

.discover-controls input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
}

.feature-grid,
.media-grid {
  display: grid;
  margin: 18px 0 26px;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.feature-card,
.media-card {
  display: flex;
  min-height: 132px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  color: var(--text);
  flex-direction: column;
  text-decoration: none;
}

.feature-card strong,
.media-card strong {
  margin: 7px 0;
  font-size: 1.05rem;
}

.feature-card p,
.media-card p {
  margin: 0;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.45;
}

.feature-card span,
.media-card span {
  color: var(--cyan);
  font-size: 1.3rem;
}

.feature-card {
  display: grid;
  min-height: 104px;
  padding: 13px;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 3px 10px;
}

.feature-card > span {
  grid-row: 1 / -1;
}

.feature-card strong {
  min-width: 0;
  margin: 0;
  font-size: .94rem;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.feature-card p {
  font-size: .76rem;
  line-height: 1.35;
}

.feature-grid--compact {
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.feature-grid--compact .feature-card {
  display: flex;
  min-height: 42px;
  padding: 7px 9px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.feature-grid--compact .feature-card:hover,
.feature-grid--compact .feature-card:focus-visible {
  border-color: var(--red);
  background: var(--red-soft);
}

.feature-grid--compact .feature-card > span {
  grid-row: auto;
  color: var(--red);
  font-size: .85rem;
  line-height: 1;
}

.feature-grid--compact .feature-card strong {
  margin: 0;
  font-size: .78rem;
  line-height: 1.15;
}

.feature-grid--compact .feature-card p {
  display: none;
}

.media-section-tabs {
  display: grid;
  margin: 18px 0 12px;
  gap: 9px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.media-section-tabs button {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.media-section-tabs button.active {
  border-color: var(--red);
  background: var(--red);
  color: #07080a;
}

.media-section-tabs button span {
  color: var(--cyan);
  font-size: 1rem;
}

.media-section-tabs button.active span {
  color: #07080a;
}

.media-section-tabs button strong {
  color: inherit;
  font-size: .82rem;
}

.media-privacy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .82rem;
}

.media-mode-tabs {
  margin-bottom: 12px;
}

.video-mode-explainer {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

.video-filter-panel {
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.video-filter-panel summary {
  display: flex;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--text);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 850;
  cursor: pointer;
}

.video-filter-panel summary span {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--cyan-border);
  border-radius: 999px;
  color: var(--cyan);
  place-items: center;
  font-size: .74rem;
}

.video-filter-panel .media-controls {
  margin: 0;
  padding: 0 12px 12px;
}

.video-portal {
  min-width: 0;
}

.video-portal-heading {
  display: flex;
  margin: 4px 0 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.video-portal-heading h2 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
}

.video-portal-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.video-portal-heading > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--cyan-border);
  border-radius: 999px;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 850;
}

.video-section-tabs {
  display: flex;
  margin: 0 -2px 12px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 7px;
}

.video-section-tabs button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}

.video-section-tabs button.active {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 15%, var(--surface));
  color: var(--text);
}

.video-section-tabs button span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--red);
  color: #07080a;
  place-items: center;
  font-size: .68rem;
  font-weight: 900;
}

.video-local-note,
.video-results-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .78rem;
}

.video-local-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-local-note button {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--soft-copy);
  cursor: pointer;
}

.video-results-summary {
  text-align: right;
}

.video-filter-panel__body {
  padding: 0 12px 12px;
}

.video-search-row,
.video-filter-grid {
  display: grid;
  gap: 10px;
}

.video-search-row {
  margin-bottom: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .35fr);
}

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

.video-search-row label,
.video-filter-grid label {
  display: grid;
  min-width: 0;
  color: var(--muted);
  gap: 5px;
  font-size: .7rem;
  font-weight: 800;
}

.video-search-row input,
.video-search-row select,
.video-filter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}

.video-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.video-portal-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.video-portal-card.is-playing {
  border-color: var(--cyan-border);
}

.video-portal-card__visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070a;
  color: var(--red);
  place-items: center;
  font-size: 2.5rem;
}

.video-portal-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-duration-badge {
  position: absolute;
  inset: auto auto 10px 10px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
}

.video-portal-card__body {
  padding: 16px;
}

.video-card-kicker {
  display: flex;
  color: var(--cyan);
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: .72rem;
  font-weight: 800;
}

.video-card-kicker time {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 600;
}

.video-portal-card h3 {
  margin: 8px 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.video-portal-card__body > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.video-card-tags,
.video-accessibility-meta,
.video-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.video-card-tags span,
.video-accessibility-meta span,
.video-accessibility-meta a {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--soft-copy);
  font-size: .68rem;
  text-decoration: none;
}

.video-accessibility-meta {
  min-height: 24px;
  margin: 9px 0 12px;
}

.video-card-actions {
  align-items: center;
}

.video-card-actions button,
.video-card-actions a {
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: .75rem;
}

.video-card-actions a {
  display: inline-flex;
  color: var(--cyan);
  align-items: center;
  text-decoration: none;
}

.video-player-shell {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.video-player-toolbar {
  display: flex;
  margin-bottom: 8px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .7rem;
}

.video-player-toolbar button {
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
}

.video-player-frame {
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player-frame iframe,
.video-player-frame video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player-shell > p {
  margin: 8px 0 0;
  font-size: .72rem;
}

.video-player-shell > p a {
  color: var(--cyan);
}

.video-lead-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: 0 18px 46px rgba(0, 0, 0, .2);
  grid-template-columns: minmax(280px, .92fr) minmax(0, 1.08fr);
}

.video-lead-card__visual {
  position: relative;
  display: grid;
  min-height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, rgba(0, 214, 230, .22), transparent 38%),
    radial-gradient(circle at 76% 78%, rgba(255, 46, 78, .2), transparent 42%),
    #05070a;
  place-items: center;
}

.video-lead-card__visual img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.video-lead-card__play {
  display: grid;
  width: 78px;
  height: 78px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: #07080a;
  color: var(--red);
  place-items: center;
  padding-left: 5px;
  font-size: 2rem;
  box-shadow: 0 0 28px rgba(255, 46, 78, .2);
}

.video-platform-badge {
  position: absolute;
  inset: auto 12px 12px auto;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: .7rem;
  font-weight: 850;
}

.video-lead-card__body {
  display: flex;
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  flex-direction: column;
  justify-content: center;
}

.video-lead-card__body h2 {
  margin: 9px 0 10px;
  color: var(--text);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.video-lead-card__body > p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.video-lead-card .article-classification {
  margin: 0 0 14px;
}

.video-list-heading {
  margin-top: 26px;
}

.media-controls {
  display: grid;
  margin: 0 0 20px;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .34fr) minmax(150px, .34fr);
}

.media-controls input,
.media-controls select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
}

.media-controls input + select:last-child {
  grid-column: 3;
}

.media-controls--two {
  grid-template-columns: minmax(180px, 1fr) minmax(170px, .38fr);
}

.media-controls--two input + select:last-child {
  grid-column: auto;
}

.podcast-library-controls {
  display: grid;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  gap: 13px;
}

.podcast-library-summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.podcast-library-summary strong {
  color: var(--text);
  font-size: .96rem;
}

.podcast-library-summary span {
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
}

.podcast-language-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.podcast-language-filter .filter-chip {
  min-height: 38px;
  padding: 6px 11px;
}

.podcast-source-filter {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
}

.podcast-source-filter span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.podcast-source-filter select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
}

.media-results {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zine-workspace-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.zine-subtabs {
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
}

.zine-subtabs button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}

.zine-subtabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgb(0 0 0 / .14);
}

.zine-stencil-library {
  margin-bottom: 18px;
}

.zine-stencil-library > p {
  max-width: 780px;
  margin: -3px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.zine-stencil-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.zine-stencil-card {
  display: grid;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  grid-template-rows: auto 1fr auto;
  gap: 11px;
}

.zine-stencil-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.zine-stencil-card h3,
.zine-stencil-card p {
  margin: 0;
}

.zine-stencil-card h3 {
  margin-top: 3px;
  font-size: .98rem;
}

.zine-stencil-safe {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--border));
  border-radius: 999px;
  color: var(--accent);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .025em;
  line-height: 1.25;
}

.zine-stencil-card p {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.zine-stencil-card button {
  width: 100%;
  min-height: 44px;
}

.zine-stencil-thumb {
  display: flex;
  height: 168px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.zine-stencil-thumb svg,
.zine-stencil-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zine-stencil-source {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
}

.zine-stencil-preview {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(320px, 1fr);
  align-items: start;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.zine-stencil-preview h2,
.zine-stencil-preview p {
  margin: 4px 0 0;
}

.zine-stencil-preview p {
  color: var(--muted);
  line-height: 1.55;
}

.zine-stencil-sheet {
  width: min(100%, 520px);
  margin-inline: auto;
  border: 1px solid #bbb;
  background: #fff;
  box-shadow: 0 14px 34px rgb(0 0 0 / .24);
}

.zine-stencil-sheet svg,
.zine-stencil-sheet img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
}

.zine-stencil-credit a {
  color: var(--accent);
  font-weight: 800;
}

.zine-stencil-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.zine-stencil-actions button {
  min-height: 46px;
}

.zine-stencil-actions a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.zine-toolbar {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}

.zine-compose-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin: 0 0 16px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
}

.zine-compose-panel__copy {
  display: grid;
  gap: 3px;
}

.zine-compose-panel__copy small {
  color: var(--muted);
}

.zine-toolbar button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  padding-inline: 12px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.zine-tool-group {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.zine-tool-group--add > button {
  flex: 1 1 160px;
}

.zine-tool-group--manage {
  justify-content: flex-end;
}

.zine-toolbar .zine-clear-button {
  border-color: color-mix(in srgb, var(--red) 54%, var(--border));
  color: var(--red);
}

.wrn-zine {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.zine-content {
  display: grid;
  gap: 10px;
}

.zine-workspace-item {
  display: grid;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.zine-workspace-item h3 {
  margin: 4px 0 6px;
  font-size: .94rem;
}

.zine-workspace-item p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.zine-workspace-item button,
.zine-item-actions button {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--red);
  border-radius: 10px;
  background: transparent;
  color: var(--red);
}

.zine-item-actions {
  display: grid;
  min-width: min(100%, 208px);
  gap: 7px;
}

.zine-item-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.zine-item-action-group button {
  min-width: 0;
  overflow-wrap: anywhere;
}

.zine-item-body {
  display: grid;
  gap: .7em;
}

.zine-item-body p {
  margin: 0;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.58;
}

.zine-workspace-image,
.zine-editor-preview {
  display: block;
  width: min(100%, 620px);
  height: auto;
  max-height: 520px;
  margin: 10px 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  object-fit: contain;
}

.zine-item-editor {
  display: grid;
  gap: 14px;
}

.zine-item-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .82rem;
}

.zine-item-editor input,
.zine-item-editor select,
.zine-item-editor textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

@media (max-width: 640px) {
  .zine-stencil-grid { grid-template-columns: 1fr; }
  .zine-stencil-preview { grid-template-columns: 1fr; }
  .zine-stencil-actions { grid-template-columns: 1fr; }
  .zine-compose-panel { grid-template-columns: 1fr; }
  .zine-toolbar { grid-template-columns: 1fr; }
  .zine-tool-group--manage { justify-content: stretch; }
  .zine-tool-group--manage > button { width: 100%; }
  .zine-workspace-item { grid-template-columns: 1fr; }
  .zine-item-actions { width: 100%; }
}

@media (min-width: 641px) and (max-width: 980px) {
  .zine-stencil-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.media-result-card {
  display: grid;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.media-result-card__icon,
.media-result-card > img {
  display: grid;
  width: 64px;
  height: 64px;
  border: 1px solid var(--cyan-border);
  border-radius: 14px;
  background: var(--cyan-soft);
  color: var(--cyan);
  object-fit: cover;
  place-items: center;
  font-size: 1.4rem;
}

.media-result-card h3 {
  margin: 9px 0 7px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.media-result-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.media-result-card audio {
  width: 100%;
  height: 42px;
  margin: 4px 0 10px;
  color-scheme: dark;
}

.media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-links a {
  display: inline-flex;
  min-height: 42px;
  padding: 7px 11px;
  border: 1px solid var(--cyan-border);
  border-radius: 11px;
  color: var(--cyan);
  align-items: center;
  text-decoration: none;
}

.stream-fallback {
  padding-left: 10px;
  border-left: 3px solid var(--red);
}

.empty-state.compact {
  min-height: 170px;
}

.empty-state {
  display: grid;
  min-height: 280px;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.15rem;
}

.empty-state p {
  max-width: 620px;
  margin: 8px 0;
  line-height: 1.5;
}

.file-preview-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.media-links button {
  display: inline-flex;
  min-height: 42px;
  padding: 7px 11px;
  border: 1px solid var(--cyan-border);
  border-radius: 11px;
  background: transparent;
  color: var(--cyan);
  align-items: center;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.podcast-card .media-play-host .media-button-row {
  display: grid;
  grid-template-columns: 1fr;
}

.podcast-card .media-play-host .btn-media-play {
  width: 100%;
  min-height: 46px;
  border-color: var(--cyan);
  background: var(--cyan);
  color: #001013;
  font-weight: 900;
  justify-content: center;
}

.podcast-card .audio-tool-card-actions,
.podcast-card .media-links {
  margin-top: 7px;
}

.podcast-card .audio-tool-card-actions button,
.podcast-card .media-links a {
  min-height: 36px;
  padding: 5px 9px;
  font-size: .75rem;
}

.video-result-card {
  grid-template-columns: 142px minmax(0, 1fr);
}

.video-result-card > img,
.video-result-card > .media-result-card__icon {
  width: 142px;
  height: 92px;
  border-radius: 12px;
}

.video-result-card > img {
  background: #05070a;
  object-fit: contain;
}

.video-result-card .article-classification {
  margin: 0 0 12px;
}

.media-links .video-open-link {
  border-color: var(--red);
  background: var(--red);
  color: #07080a;
  font-weight: 900;
}

.empty-state .file-preview-link + small {
  overflow-wrap: anywhere;
}

.bottom-nav {
  position: fixed;
  z-index: 90;
  inset: auto 0 0;
  display: grid;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  border-top: 1px solid var(--border);
  background: var(--chrome-strong);
  backface-visibility: hidden;
  contain: paint;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  isolation: isolate;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.bottom-nav button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: .66rem;
  place-items: center;
  align-content: center;
  gap: 2px;
  cursor: pointer;
  touch-action: manipulation;
}

.bottom-nav button span:first-child {
  color: #05080b;
  font-size: 1.15rem;
  font-weight: 900;
  -webkit-text-stroke: 1.15px var(--red);
  paint-order: stroke fill;
  text-shadow: 0 0 5px color-mix(in srgb, var(--red) 42%, transparent);
}

.bottom-nav .following-star {
  -webkit-text-stroke-width: 1.25px;
}

.bottom-nav button.active {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.bottom-nav button.active span:first-child {
  color: #05080b;
  -webkit-text-stroke-color: var(--red);
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(5px);
}

.article-dialog {
  width: min(920px, 100%);
  max-width: none;
  height: min(94dvh, 980px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.dialog-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  min-height: 72px;
  padding: max(9px, env(safe-area-inset-top, 0px)) 12px 9px;
  border-bottom: 1px solid var(--border);
  background: var(--chrome-strong);
  grid-template-columns: auto minmax(0, 1fr) 48px;
  align-items: center;
  gap: 9px;
}

.dialog-header > div {
  overflow: hidden;
}

.dialog-header small,
.dialog-header strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-header small {
  color: var(--cyan);
  font-size: .68rem;
}

.dialog-header strong {
  font-size: .86rem;
}

.dialog-close,
.save-icon {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.article-back-button {
  display: inline-flex;
  padding: 0 12px;
  border-color: color-mix(in srgb, var(--red) 62%, var(--border));
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
}

.article-back-button span:first-child {
  color: var(--red);
  font-size: 1.35rem;
  line-height: 1;
}

.article-dialog .save-icon {
  border-color: color-mix(in srgb, var(--red) 62%, var(--border));
  color: #05080b;
  font-size: 1.5rem;
  font-weight: 900;
  -webkit-text-stroke: 1.2px var(--red);
  paint-order: stroke fill;
  text-shadow: 0 0 7px color-mix(in srgb, var(--red) 38%, transparent);
}

.save-icon[aria-pressed="true"] {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 13%, var(--surface));
  color: var(--red);
  -webkit-text-stroke: 0;
}

#next-article-content {
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  border-left: 3px solid var(--cyan);
  padding: 0 clamp(18px, 5vw, 58px) 34px;
  overscroll-behavior: contain;
}

.article-lead-image-link {
  display: block;
  width: min(100%, 900px);
  max-width: 100%;
  margin: 18px auto 0;
}

.article-lead-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 16px;
  background: var(--surface-3);
  object-fit: contain;
  object-position: center;
}

.article-source-link {
  margin: 12px 0 0;
}

.article-source-link a {
  display: inline-flex;
  min-height: 36px;
  color: var(--cyan);
  font-size: .8rem;
  font-weight: 800;
  align-items: center;
  text-underline-offset: 3px;
}

.article-change-history {
  max-width: 72ch;
  margin: 12px auto 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  font-size: .82rem;
}

.article-change-history summary {
  min-height: 32px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.article-change-history ol {
  display: grid;
  margin: 8px 0 0;
  padding-left: 20px;
  gap: 7px;
}

.article-change-history li span,
.article-change-history li time {
  display: block;
}

.article-change-history li time {
  color: var(--muted);
  font-size: .75rem;
}

.article-correction {
  display: grid;
  max-width: 72ch;
  margin: 12px auto 18px;
  padding: 11px 12px;
  border-left: 3px solid var(--red);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--red) 10%, transparent);
  gap: 4px;
}

.article-correction strong {
  color: var(--red);
}

.article-tool-panel {
  max-width: 72ch;
  margin: 18px auto 24px;
  padding: 14px;
  border: 1px solid var(--cyan-border);
  border-radius: 15px;
  background: var(--surface);
}

.article-tool-panel > header {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-tool-panel h2,
.article-tool-panel h3 {
  margin: 0;
}

.article-tool-panel h2 {
  color: var(--cyan);
  font-size: 1rem;
}

.article-tool-panel > header button {
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.article-tool-panel__body > p:first-child {
  margin-top: 0;
}

.article-summary-lengths,
.article-podcast-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.article-summary-lengths button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.article-summary-lengths button.active {
  border-color: var(--red);
  background: var(--red);
  color: #07080a;
}

.article-summary-lead {
  color: var(--text);
  font-weight: 700;
  line-height: 1.55;
}

.article-tool-panel li,
.article-tool-panel__body > small {
  color: var(--soft-copy);
  line-height: 1.55;
}

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

.translation-comparison section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.translation-comparison h3 {
  margin-bottom: 8px;
  color: var(--red);
  font-size: .74rem;
  text-transform: uppercase;
}

.translation-comparison strong,
.translation-comparison p {
  overflow-wrap: anywhere;
}

.translation-comparison p {
  max-height: 300px;
  overflow-y: auto;
  color: var(--soft-copy);
  white-space: pre-line;
  line-height: 1.55;
}

.article-podcast-settings {
  display: grid;
  margin: 12px 0;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) minmax(100px, .3fr);
}

.article-podcast-settings label {
  display: grid;
  gap: 5px;
}

.article-podcast-settings label span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.article-podcast-settings select {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}

.article-podcast-controls > span {
  color: var(--muted);
  font-size: .76rem;
}

.menu-dialog {
  width: min(390px, 94vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--bg);
}

.menu-dialog[open] {
  animation: menu-in .18s ease-out;
}

@keyframes menu-in {
  from { transform: translateX(24px); opacity: .5; }
}

.menu-shell {
  display: flex;
  height: 100%;
  overflow-y: auto;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  flex-direction: column;
}

.menu-shell > header {
  display: flex;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.menu-shell h2 {
  margin: 2px 0 0;
  font-size: 1.3rem;
}

.menu-settings h3,
.menu-project h3,
.menu-updates h3 {
  margin: 0;
  color: var(--cyan);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.menu-settings label {
  display: grid;
  gap: 5px;
}

.menu-settings label > span {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
}

.menu-settings select {
  width: 100%;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
}

.menu-settings > small {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.4;
}

.menu-shell header small,
.menu-diagnostics > small {
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.menu-shell nav {
  display: grid;
  padding: 14px;
  gap: 8px;
}

.menu-shell nav button,
.menu-shell > section > button,
.menu-shell > section > a {
  display: flex;
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  align-items: center;
  gap: 11px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-updates {
  margin-top: auto;
}

.menu-updates ul {
  display: grid;
  margin: 0;
  padding: 12px 14px 12px 32px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--cyan) 7%, var(--surface));
  color: var(--soft-copy);
  font-size: .78rem;
  line-height: 1.45;
  gap: 7px;
}

.menu-shell > section > .menu-donate {
  border-color: color-mix(in srgb, var(--red) 72%, var(--border));
  background: linear-gradient(100deg, color-mix(in srgb, var(--red) 22%, var(--surface)), var(--surface));
  color: var(--text);
  font-weight: 900;
}

.menu-shell > .menu-project > button,
.menu-shell > .menu-project > a,
.menu-shell > .menu-project > .menu-donate {
  color: var(--red);
}

.menu-share-note {
  margin: 2px 2px 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

#next-menu-share-app {
  border-color: color-mix(in srgb, var(--red) 62%, var(--border));
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  font-weight: 900;
}

#next-menu-share-app span:first-child {
  display: inline-grid;
  width: 26px;
  place-items: center;
}

.menu-donate span:first-child {
  display: inline-grid;
  width: 26px;
  color: var(--red);
  font-size: 1.05rem;
  place-items: center;
}

.menu-shell nav button span:first-child {
  display: inline-grid;
  width: 26px;
  color: var(--cyan);
  place-items: center;
}

.menu-shell > section {
  display: grid;
  padding: 0 14px 14px;
  gap: 8px;
}

.menu-diagnostics {
  margin-top: auto;
}

.menu-diagnostics div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.menu-diagnostics div a {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  font-size: .75rem;
  align-items: center;
  text-decoration: none;
}

.donation-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
  color: var(--text);
}

.feedback-dialog {
  width: min(620px, calc(100vw - 24px));
  max-width: none;
  max-height: min(92dvh, 820px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--red);
  border-radius: 22px;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.feedback-dialog::backdrop {
  background: rgb(0 0 0 / .76);
  backdrop-filter: blur(5px);
}

.feedback-shell {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.feedback-shell > header,
.feedback-shell > footer {
  display: flex;
  padding: 14px 16px;
  background: var(--chrome-strong);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-shell > header { border-bottom: 1px solid var(--border); }

.feedback-shell > footer {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: initial;
}

.feedback-shell > footer button {
  min-width: 0;
  min-height: 44px;
  padding-inline: 8px;
  font-size: clamp(.68rem, 2.6vw, .82rem);
  line-height: 1.15;
  white-space: nowrap;
}

.feedback-shell h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.feedback-shell header small {
  color: var(--red);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.feedback-content {
  display: grid;
  overflow-y: auto;
  padding: 18px;
  gap: 14px;
}

.feedback-content > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-content label {
  display: grid;
  color: var(--soft-copy);
  font-size: .8rem;
  font-weight: 800;
  gap: 6px;
}

.feedback-content select,
.feedback-content input,
.feedback-content textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.feedback-content textarea {
  min-height: 180px;
  resize: vertical;
}

.feedback-privacy {
  color: var(--muted);
  line-height: 1.45;
}

.feedback-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%);
  white-space: nowrap;
}

.feedback-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.feedback-status.is-success { color: var(--cyan); }
.feedback-status.is-error { color: var(--red); }

.donation-dialog::backdrop {
  background: rgb(0 0 0 / .72);
  backdrop-filter: blur(5px);
}

.donation-shell > header,
.donation-shell > footer {
  display: flex;
  padding: 14px 16px;
  background: var(--chrome-strong);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.donation-shell > header {
  border-bottom: 1px solid var(--border);
}

.donation-shell > footer {
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.donation-shell h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.donation-shell header small {
  color: var(--red);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.donation-content {
  padding: 20px 18px;
  line-height: 1.55;
}

.donation-warning {
  margin: 16px 0 0;
  padding: 12px;
  border: 1px dashed var(--red);
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--text);
  font-weight: 800;
}

.donation-shell .primary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
}

.briefing-dialog {
  width: min(760px, 96vw);
  max-width: none;
  height: min(88dvh, 820px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
}

.briefing-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.briefing-shell > header,
.briefing-shell > footer {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--chrome-strong);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.briefing-shell > footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  justify-content: flex-end;
}

.briefing-shell h2 {
  margin: 2px 0 0;
}

.briefing-shell header small {
  color: var(--cyan);
}

#next-briefing-content {
  overflow-y: auto;
  padding: 18px;
}

.briefing-section + .briefing-section {
  margin-top: 22px;
}

.briefing-section h3 {
  margin: 0 0 10px;
}

.briefing-lengths {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.briefing-lengths label {
  display: grid;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.briefing-lengths label:has(input:checked) {
  border-color: var(--red);
  background: var(--red-soft);
}

.briefing-lengths input {
  accent-color: var(--red);
}

.briefing-language {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.briefing-preview {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.briefing-preview li {
  display: grid;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.briefing-preview b {
  color: var(--red);
}

.briefing-preview strong,
.briefing-preview small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.briefing-preview small {
  margin-top: 4px;
  color: var(--muted);
}

.briefing-history {
  margin: 12px 0 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.briefing-history summary {
  padding: 12px 14px;
  color: var(--cyan);
  font-weight: 800;
  cursor: pointer;
}

.briefing-history > div {
  display: grid;
  padding: 0 10px 10px;
  gap: 7px;
}

.briefing-history button {
  display: grid;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  gap: 3px;
}

.briefing-history button small { color: var(--muted); }
.briefing-history .briefing-history__clear { color: var(--red); text-align: center; }

#next-article-content h1 {
  margin: 26px 0 12px;
  font-size: clamp(1.65rem, 5vw, 3rem);
  line-height: 1.08;
}

#next-article-content .article-intro {
  color: var(--soft-copy);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.55;
}

#next-article-content .article-body {
  max-width: 72ch;
  margin: 24px auto 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
  font-size: 1rem;
  line-height: 1.72;
}

#next-article-content .article-structured-body {
  white-space: normal;
}

.article-structured-body > p,
.article-structured-body > blockquote {
  margin: 0 0 1.25em;
}

.article-structured-body > h2,
.article-structured-body > h3,
.article-structured-body > h4 {
  margin: 1.7em 0 .65em;
  line-height: 1.2;
}

.article-structured-body > blockquote {
  padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--red);
  color: var(--soft-copy);
  font-style: italic;
}

.article-inline-image {
  width: min(100%, 700px);
  margin: 26px 50%;
  transform: translateX(-50%);
}

.article-inline-image--inferred {
  width: min(92%, 560px);
  margin-block: 22px;
}

.article-inline-image a,
.article-inline-image img {
  display: block;
  width: 100%;
}

.article-inline-image a {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-3);
}

.article-inline-image img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

.article-inline-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.article-completeness-state {
  display: grid;
  min-height: min(56dvh, 540px);
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 0;
  align-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.article-completeness-state h1,
.article-completeness-state p {
  max-width: 42rem;
  margin: 0;
}

.article-completeness-state > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.article-continuation {
  display: grid;
  max-width: 72ch;
  margin: 28px auto 14px;
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--red) 66%, var(--border));
  border-left: 4px solid var(--red);
  border-radius: 14px;
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  gap: 8px;
}

.article-continuation strong {
  color: var(--red);
  font-size: .82rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.article-metadata-only {
  border-color: color-mix(in srgb, var(--cyan) 58%, var(--border));
  border-left-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 7%, var(--surface));
}

.article-metadata-only strong {
  color: var(--cyan);
}

.article-continuation p {
  margin: 0;
  color: var(--soft-copy);
  line-height: 1.55;
}

.article-continuation > div {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4px;
  gap: 9px;
}

.article-continuation a,
.article-continuation button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.article-loading-indicator {
  display: inline-grid;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-size: 3rem;
  animation: rotate-star 1.1s linear infinite;
  place-items: center;
}

.article-image-gallery {
  max-width: 960px;
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-image-gallery h2 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.article-image-gallery > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.article-image-gallery a {
  display: block;
  align-self: start;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-3);
}

.article-image-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 720px) {
  .article-image-gallery > div {
    grid-template-columns: 1fr;
  }
}

.article-lexicon-hint {
  max-width: 72ch;
  margin: 20px auto -10px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

.offline-ready-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  color: var(--cyan);
  font-size: .76rem;
  font-weight: 800;
}

.library-index-note {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--cyan) 6%, var(--surface));
  color: var(--soft-copy);
  line-height: 1.55;
}

.library-source-section,
.library-index-section {
  margin-top: 30px;
}

.library-source-grid,
.library-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.library-source-card,
.library-item-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.library-source-card h3,
.library-source-card p,
.library-item-card h3,
.library-item-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.library-source-card p,
.library-item-card p {
  color: var(--soft-copy);
  line-height: 1.5;
}

.library-source-card > a,
.library-downloads a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--red);
  border-radius: 10px;
  color: var(--copy);
  font-weight: 800;
  text-decoration: none;
}

.library-source-card > a {
  margin-top: auto;
}

.library-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(170px, .7fr));
  gap: 12px;
  margin-bottom: 14px;
}

.library-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.library-controls input,
.library-controls select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--copy);
}

.library-language-chips {
  margin-bottom: 18px;
}

.library-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

@media (max-width: 900px) {
  .library-source-grid,
  .library-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-controls {
    grid-template-columns: 1fr 1fr;
  }
  .library-controls > input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .library-source-grid,
  .library-item-grid,
  .library-controls {
    grid-template-columns: 1fr;
  }
  .library-controls > input {
    grid-column: auto;
  }
}

.article-lexicon-term {
  display: inline;
  margin: 0;
  padding: 0 1px;
  border: 0;
  border-bottom: 1px dotted var(--cyan);
  border-radius: 2px;
  background: linear-gradient(180deg, transparent 58%, var(--cyan-soft) 58%);
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: help;
}

.article-lexicon-term:hover,
.article-lexicon-term:focus-visible {
  outline: 2px solid var(--cyan-border);
  outline-offset: 2px;
  background: var(--cyan-soft);
}

.article-lexicon-summary {
  color: var(--text);
  font-weight: 750;
  line-height: 1.58;
}

.article-lexicon-related,
.article-lexicon-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-lexicon-related .tag {
  min-height: 34px;
  cursor: pointer;
}

.article-lexicon-sources a {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 800;
  align-items: center;
}

.article-lexicon-open {
  margin-top: 18px;
}

.publisher-related {
  max-width: 72ch;
  margin: 38px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.publisher-related h2 {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 1rem;
}

.publisher-related > div {
  display: grid;
  gap: 8px;
}

.publisher-related button {
  display: grid;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  gap: 4px;
}

.publisher-related button:hover,
.publisher-related button:focus-visible {
  border-color: var(--cyan);
}

.publisher-related small {
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  overflow-x: auto;
  padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--border);
  background: var(--chrome-strong);
  gap: 7px;
  scrollbar-width: thin;
}

.dialog-actions button {
  display: inline-flex;
  min-width: max-content;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: .72rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  cursor: pointer;
}

.dialog-actions #next-dialog-translate {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
}

.dialog-actions button:hover,
.dialog-actions button:focus-visible {
  border-color: var(--cyan);
  background: var(--red-soft);
}

.dialog-actions button[aria-pressed="true"] {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.dialog-actions button[aria-busy="true"] .red-black-star {
  animation: rotate-star .9s linear infinite;
}

.preferences-dialog {
  width: min(720px, calc(100% - 20px));
  max-height: min(90dvh, 850px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
}

.preferences-dialog form {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: inherit;
}

.preferences-dialog header,
.preferences-dialog footer {
  position: sticky;
  z-index: 2;
  display: flex;
  padding: 16px;
  background: var(--chrome-strong);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preferences-dialog header {
  top: 0;
  border-bottom: 1px solid var(--border);
}

.preferences-dialog footer {
  bottom: 0;
  border-top: 1px solid var(--border);
  justify-content: end;
}

.preferences-dialog h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.preferences-dialog header small {
  color: var(--cyan);
}

.preferences-dialog header button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
}

.preferences-dialog section {
  padding: 18px 16px 4px;
}

.preferences-dialog section:last-of-type {
  padding-bottom: 20px;
}

.preferences-dialog h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.preference-search {
  width: 100%;
  min-height: 44px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
}

.archive-periods {
  display: grid;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.archive-periods button {
  min-width: 0;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.archive-periods button.active {
  border-color: var(--red);
  background: var(--red);
  color: #07080a;
}

.filter-directory {
  display: grid;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  gap: 11px;
}

.filter-directory__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-directory__heading .filter-chip {
  min-height: 32px;
  padding: 4px 10px;
  font-size: .7rem;
}

.filter-chips--regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.filter-chips--regions .filter-chip {
  width: 100%;
  border-radius: 11px;
  justify-content: flex-start;
  text-align: left;
}

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

.topic-group {
  min-width: 0;
}

.topic-group h3 {
  margin: 0 0 8px;
  color: var(--soft-copy);
  font-size: .76rem;
}

.topic-group .filter-chips--topics {
  grid-template-columns: 1fr;
  gap: 6px;
}

.topic-group .filter-chip {
  min-height: 38px;
  padding: 7px 10px;
  font-size: .76rem;
}

.load-more-row {
  display: grid;
  margin: 18px 0 max(28px, env(safe-area-inset-bottom));
  scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom));
  place-items: center;
}

.load-more-row .secondary-button {
  min-width: min(100%, 260px);
}

.about-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.about-project-grid section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
}

.about-project-grid h3 {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: .9rem;
}

.about-project-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.source-preference-list {
  display: grid;
  max-height: 300px;
  padding-right: 4px;
  overflow-y: auto;
  gap: 7px;
}

.source-preference-row {
  display: grid;
  min-width: 0;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
  align-items: center;
  gap: 9px;
}

.source-preference-row > span {
  min-width: 0;
  overflow: hidden;
  font-size: .8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-preference-row select,
.preference-selects select {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
}

.preference-selects {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(260px, 1fr);
  gap: 14px;
}

.preference-selects > label {
  display: grid;
  align-content: start;
  gap: 8px;
}

.preference-selects > label > span,
.preference-selects legend {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.preference-selects fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.preference-briefing-lengths {
  margin-top: 8px;
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: 84px;
  left: 50%;
  width: min(430px, calc(100% - 24px));
  padding: 11px 15px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  background: #061318;
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateX(-50%);
}

button.feature-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.special-tabs {
  display: flex;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 2px 2px 7px;
  gap: 8px;
  scrollbar-width: thin;
}

.special-tabs .filter-chip {
  flex: 0 0 auto;
}

.special-filter-row {
  display: grid;
  margin-bottom: 20px;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 260px);
}

.special-filter-row input,
.special-filter-row select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
}

.result-count {
  display: grid;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--cyan);
  font-weight: 800;
  place-items: center;
}

.notice-card {
  margin: 0 0 18px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
  background: var(--surface);
}

.notice-card strong { color: var(--cyan); }
.notice-card p { margin: 5px 0; color: var(--muted); line-height: 1.55; }
.notice-card small { color: var(--muted); }

.event-grid,
.lexicon-grid,
.source-grid,
.prisoner-grid,
.development-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-card,
.lexicon-card,
.source-card,
.prisoner-card,
.development-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.event-card > img { width: 100%; height: 190px; object-fit: cover; }
.event-card > div,
.source-card,
.prisoner-card,
.development-card { padding: 17px; }

.event-card h3,
.source-card h3,
.prisoner-card h3,
.development-card h3 { margin: 6px 0 10px; line-height: 1.2; }

.event-card p,
.source-card p,
.prisoner-card p,
.development-card p { color: var(--muted); line-height: 1.55; }

.event-card dl { display: grid; margin: 12px 0; gap: 8px; }
.event-card dl div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.event-card dt { color: var(--cyan); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.event-card dd { margin: 0; overflow-wrap: anywhere; }
.event-card .small-action { display: inline-flex; margin-top: 12px; text-decoration: none; align-items: center; }
.event-archive-status { margin: 0 0 14px; }
.event-archive-ready { margin: 0 0 14px; color: var(--muted); font-size: .76rem; }
.event-more-button { display: flex; width: min(100%, 360px); margin: 18px auto 0; justify-content: center; }

.special-actions { display: flex; margin-bottom: 16px; justify-content: flex-end; }
.source-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.source-actions a { display: inline-flex; min-height: 42px; padding: 8px 11px; border: 1px solid var(--cyan); border-radius: 10px; align-items: center; text-decoration: none; }

.lexicon-card summary { display: grid; min-height: 170px; padding: 17px; cursor: pointer; align-content: start; }
.lexicon-card summary::marker { color: var(--cyan); }
.lexicon-card summary strong { margin: 7px 0; color: var(--text); font-size: 1.08rem; }
.lexicon-card summary p,
.lexicon-detail p { margin: 0; color: var(--muted); line-height: 1.55; }
.lexicon-detail { padding: 0 17px 18px; border-top: 1px solid var(--border); }
.lexicon-detail h4 { margin: 16px 0 5px; color: var(--cyan); font-size: .84rem; }
.lexicon-detail small { display: block; margin-top: 15px; color: var(--muted); }

.prisoner-card,
.development-card { grid-column: span 2; }
.prisoner-card > header,
.development-card > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.verification-badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--cyan); border-radius: 999px; color: var(--cyan); font-size: .7rem; font-weight: 800; }
.prisoner-card.stale .verification-badge { border-color: var(--red); color: var(--red); }
.prisoner-directory-summary {
  display: flex;
  margin: -6px 0 16px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prisoner-directory-summary strong { color: var(--text); }
.prisoner-source-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prisoner-source-card {
  display: grid;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  align-content: start;
  gap: 12px;
}
.prisoner-source-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.prisoner-source-card h3 { margin: 6px 0 0; line-height: 1.25; }
.prisoner-source-card h4 { margin: 2px 0 0; color: var(--soft-copy); font-size: .8rem; }
.prisoner-source-link {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  align-items: center;
  text-decoration: none;
}
.prisoner-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.prisoner-card details { margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.prisoner-card summary { color: var(--cyan); font-weight: 800; cursor: pointer; }
.prisoner-card address { margin-top: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.prisoner-related { margin: 14px 0; }
.prisoner-related h4 { margin: 0 0 8px; }
.prisoner-related button { display: grid; width: 100%; min-height: 48px; padding: 10px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.prisoner-related button small { color: var(--muted); }

.watch-button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--red); border-radius: 11px; background: transparent; color: var(--red); cursor: pointer; }
.watch-button[aria-pressed="true"] { background: var(--red); color: #060709; }
.evidence-line { display: flex; flex-wrap: wrap; margin: 13px 0; color: var(--muted); align-items: center; gap: 7px; }
.development-tag { gap: 5px; }
.development-tag--region { border-color: rgba(0, 233, 244, .48); }
.development-tag--topic { border-color: rgba(255, 54, 88, .42); background: var(--red-soft); color: var(--red); }
.development-quality-grid { display: grid; margin: 10px 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.development-quality-card { margin: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); background: rgba(255, 255, 255, .018); }
.development-quality-card summary { display: flex; color: var(--soft-copy); font-size: .78rem; font-weight: 800; cursor: pointer; justify-content: space-between; gap: 10px; }
.development-quality-card summary strong { color: var(--cyan); text-align: right; }
.development-mix--limited summary strong { color: var(--red); }
.development-quality-card p { margin: 9px 0 0; font-size: .78rem; line-height: 1.45; }
.source-mix-details dl { display: grid; margin: 10px 0 0; gap: 6px; }
.source-mix-details dl div { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr); gap: 8px; }
.source-mix-details dt { color: var(--muted); font-size: .72rem; }
.source-mix-details dd { margin: 0; color: var(--text); font-size: .74rem; overflow-wrap: anywhere; }
.development-caution { padding-left: 9px; border-left: 2px solid var(--red); color: var(--soft-copy) !important; }
.perspective-details { margin: 0 0 17px; border: 1px solid var(--border); border-radius: 12px; background: rgba(0, 233, 244, .025); }
.perspective-details > summary { padding: 12px; color: var(--cyan); font-size: .8rem; font-weight: 850; cursor: pointer; }
.perspective-details > p { margin: 0; padding: 0 12px 12px; font-size: .78rem; }
.perspective-grid { display: grid; padding: 0 12px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.perspective-card { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.perspective-card h4 { margin: 7px 0 5px; font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.perspective-card p { margin: 0 0 10px; font-size: .78rem; line-height: 1.45; }
.perspective-card .small-action { display: inline-flex; text-align: left; align-items: center; }
.perspective-meta { display: flex; flex-wrap: wrap; margin-top: 6px; gap: 5px; }
.perspective-meta span { padding: 3px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .64rem; }
.review-queue-button { margin-left: auto; }
.review-queue-button span { display: inline-grid; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #050608; place-items: center; }
.development-review-callout { display: flex; margin: 0 0 17px; padding: 12px; border: 1px solid rgba(255, 54, 88, .38); border-radius: 12px; background: var(--red-soft); align-items: center; justify-content: space-between; gap: 12px; }
.development-review-callout > div { display: grid; min-width: 0; gap: 3px; }
.development-review-callout strong { color: var(--text); font-size: .82rem; }
.development-review-callout small { color: var(--muted); line-height: 1.35; }
.development-review-callout button { flex: 0 0 auto; min-height: 40px; padding: 8px 11px; border: 1px solid var(--red); border-radius: 10px; background: transparent; color: var(--red); font-weight: 800; cursor: pointer; }
.development-review-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--cyan-border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.development-review-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(5px); }
.development-review-shell { display: grid; max-height: inherit; grid-template-rows: auto minmax(0, 1fr) auto; }
.development-review-shell > header { display: flex; padding: 18px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; justify-content: space-between; gap: 14px; }
.development-review-shell > header small { color: var(--cyan); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.development-review-shell h2 { margin: 3px 0 0; }
.development-review-content { overflow: auto; padding: 20px; }
.development-review-content > p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.development-review-shell > footer { display: flex; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); justify-content: flex-end; gap: 8px; }
.review-story-summary { display: grid; margin-bottom: 15px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); gap: 5px; }
.review-story-summary span { color: var(--cyan); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.development-review-form { display: grid; gap: 13px; }
.development-review-form label { display: grid; color: var(--soft-copy); font-size: .8rem; font-weight: 800; gap: 6px; }
.development-review-form select,
.development-review-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; }
.development-review-form textarea { resize: vertical; }
.development-review-list { display: grid; gap: 10px; }
.development-review-item { display: grid; padding: 13px; border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 12px; background: var(--surface-2); gap: 7px; }
.development-review-item.is-resolved { border-left-color: var(--cyan); opacity: .72; }
.development-review-item header { display: flex; color: var(--muted); font-size: .7rem; justify-content: space-between; gap: 10px; }
.development-review-item > small { color: var(--muted); }
.development-review-item > p { margin: 0; color: var(--soft-copy); font-size: .82rem; }
.review-history { padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.review-history summary { display: flex; color: var(--cyan); font-size: .75rem; font-weight: 800; cursor: pointer; justify-content: space-between; gap: 8px; }
.review-history summary span { color: var(--muted); }
.review-history ol { display: grid; margin: 9px 0 0; padding: 0; list-style: none; gap: 6px; }
.review-history li { display: flex; color: var(--soft-copy); font-size: .72rem; justify-content: space-between; gap: 10px; }
.review-history time { color: var(--muted); text-align: right; }
.development-review-item > div { display: flex; flex-wrap: wrap; gap: 7px; }
.development-review-item button { min-height: 36px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }
.review-status { color: var(--red); font-weight: 850; text-transform: uppercase; }
.is-resolved .review-status { color: var(--cyan); }
.timeline-heading { margin: 0 0 8px; color: var(--soft-copy); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.timeline-list { margin: 0; padding: 0; list-style: none; }
.timeline-list li { display: grid; min-width: 0; padding: 10px 0; border-top: 1px solid var(--border); grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 10px; }
.timeline-list time { color: var(--cyan); font-size: .76rem; }
.timeline-list button { display: grid; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.timeline-list button strong,
.timeline-list button small { overflow-wrap: anywhere; }
.timeline-list button small { margin-top: 3px; color: var(--muted); }

.wrn-solidarity-workshop-190 { z-index: 400 !important; }

@media (max-width: 820px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero__image {
    min-height: 230px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .home-service-grid {
    grid-template-columns: 1fr;
  }

  .home-today__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-results {
    grid-template-columns: 1fr;
  }

  .video-portal-grid {
    grid-template-columns: 1fr;
  }

  .media-controls {
    grid-template-columns: minmax(0, 1fr) minmax(150px, .45fr);
  }

  .media-controls input {
    grid-column: 1 / -1;
  }

  .media-controls input + select:last-child {
    grid-column: auto;
  }

  .feature-grid,
  .media-grid,
  .event-grid,
  .lexicon-grid,
  .source-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 112px;
  }

  .next-header__inner {
    min-height: var(--header-height);
    padding: 4px 8px;
    gap: 8px;
  }

  .brand img {
    width: 114px;
    height: 108px;
  }

  .brand__logo {
    width: 114px;
    height: 108px;
  }

  .brand .brand-edition {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .website-button {
    min-width: 50px;
    padding: 0 8px;
  }

  .website-button__label { display: none; }
  .website-button__short { display: inline; }
  .website-button__icon { display: none; }

  .classic-link {
    display: none;
  }

  #next-main {
    width: min(100% - 16px, 1120px);
    padding-top: 16px;
  }

  .about-project-grid {
    grid-template-columns: 1fr;
  }

  .view-heading {
    align-items: start;
    flex-direction: column;
  }

  .home-hero {
    min-height: 0;
    border-radius: 18px;
  }

  .home-hero__image {
    display: grid;
    padding: 7px;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .home-today__grid {
    grid-template-columns: 1fr;
  }

  .home-today-card--wide {
    grid-column: auto;
  }

  .home-hero__image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(62vh, 520px);
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    align-self: center;
  }

  .home-hero__content {
    padding: 18px;
  }

  .news-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-card__image {
    display: grid;
    order: -1;
    padding: 6px;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .news-card__image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(60vh, 520px);
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    align-self: center;
  }

  .news-card::before {
    opacity: 1;
  }

  .news-card__body {
    padding: 13px 10px 11px 14px;
  }

  .meta-line .optional-meta {
    display: none;
  }

  .translate-card {
    min-height: 40px;
  }

  .media-grid,
  .event-grid,
  .lexicon-grid,
  .source-grid,
  .prisoner-grid,
  .development-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid--compact {
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card {
    min-height: 72px;
    padding: 11px;
  }

  .feature-grid--compact .feature-card {
    min-height: 42px;
    padding: 7px 9px;
  }

  .feature-card strong {
    font-size: .86rem;
    line-height: 1.2;
  }

  .feature-card p {
    display: none;
  }

  .filter-chips--topics,
  .choice-grid--topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .topic-group .filter-chips--topics {
    grid-template-columns: 1fr;
  }

  .translation-comparison,
  .article-podcast-settings {
    grid-template-columns: 1fr;
  }

  .special-filter-row { grid-template-columns: 1fr; }

  .media-section-tabs {
    overflow: visible;
    padding-bottom: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .media-section-tabs button {
    min-height: 46px;
    padding: 5px 6px;
    gap: 5px;
  }

  .media-section-tabs button strong {
    font-size: .7rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .media-controls {
    grid-template-columns: 1fr;
  }

  .media-controls input,
  .media-controls input + select:last-child {
    grid-column: auto;
  }

  .video-portal-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

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

  .video-section-tabs {
    margin-right: -8px;
  }

  .video-portal-card__body {
    padding: 14px;
  }

  .video-card-kicker,
  .video-player-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-card-actions button,
  .video-card-actions a {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
  }

  .podcast-library-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .podcast-library-summary span {
    text-align: left;
  }

  .podcast-source-filter {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .media-result-card {
    padding: 13px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 11px;
  }

  .media-result-card__icon,
  .media-result-card > img {
    width: 52px;
    height: 52px;
  }

  .video-result-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-lead-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-lead-card__visual {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .video-lead-card__body {
    padding: 16px;
  }

  .video-lead-card__body h2 {
    font-size: 1.22rem;
  }

  .video-result-card > img,
  .video-result-card > .media-result-card__icon {
    width: 100%;
    height: auto;
    min-height: 150px;
    aspect-ratio: 16 / 9;
  }

  .menu-dialog,
  .briefing-dialog,
  .feedback-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .briefing-heading {
    align-items: stretch;
  }

  .briefing-heading .secondary-button {
    align-self: stretch;
  }

  #next-briefing-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #next-briefing-actions button {
    min-width: 0;
    width: 100%;
  }

  .prisoner-card,
  .development-card { grid-column: auto; }

  .prisoner-source-grid { grid-template-columns: 1fr; }

  .prisoner-card > header,
  .development-card > header,
  .prisoner-source-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .verification-badge,
  .watch-button { align-self: start; }

  .development-quality-grid,
  .perspective-grid { grid-template-columns: 1fr; }

  .review-queue-button { margin-left: 0; }
  .development-review-callout { align-items: stretch; flex-direction: column; }
  .development-review-callout button { width: 100%; }

  .source-mix-details dl div { grid-template-columns: 1fr; gap: 2px; }

  .timeline-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .article-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dialog-actions {
    padding-top: 7px;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .personal-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .followed-context,
  .preference-selects {
    grid-template-columns: 1fr;
  }

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

  .source-preference-row > span {
    overflow: visible;
    white-space: normal;
  }

  .source-preference-row select {
    width: 100%;
  }
}

@media (max-width: 360px) {
  :root {
    --header-height: 102px;
  }

  .next-header__inner {
    padding-inline: 6px;
    gap: 5px;
  }

  .brand,
  .header-actions {
    flex: 0 0 auto;
  }

  .brand img {
    width: 94px;
    height: 92px;
  }

  .brand__logo {
    width: 94px;
    height: 92px;
  }

  .header-actions {
    gap: 4px;
  }

  #next-search-toggle {
    display: none;
  }

  .website-button {
    min-width: 48px;
    min-height: 40px;
    padding-inline: 6px;
  }

  .website-button > span:last-child {
    display: none;
  }

  .icon-button,
  .language-control select {
    min-width: 40px;
    min-height: 40px;
  }

  .language-control select {
    width: 50px;
    padding-inline: 4px;
  }
}

@media (min-width: 1440px) {
  .bottom-nav {
    top: 50%;
    right: auto;
    bottom: auto;
    left: max(12px, calc((100vw - 1240px) / 2));
    width: 74px;
    height: auto;
    min-height: 0;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--chrome);
    grid-template-columns: 1fr;
    transform: translateY(-50%);
  }

  .bottom-nav button {
    min-height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.notification-permission {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.notification-settings {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.notification-settings > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.notification-settings input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--red);
}

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

.notification-times label {
  display: grid;
  gap: 6px;
}

.notification-times input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--text);
}

@media (max-width: 520px) {
  .notification-times { grid-template-columns: 1fr; }
}

.source-archive-panel {
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}

.source-archive-heading,
.source-archive-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-archive-heading h2 {
  margin: 3px 0 0;
  font-size: 1.15rem;
}

.source-archive-panel > p {
  color: var(--muted);
  line-height: 1.55;
}

.source-archive-coverage {
  display: inline-flex;
  max-width: 28rem;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25;
  text-align: center;
}

.source-archive-coverage--complete {
  border-color: var(--green);
  color: var(--green);
}

.source-archive-coverage--partial,
.source-archive-coverage--loading {
  border-color: #d7a448;
  color: #e2b75f;
}

.source-archive-coverage--unavailable {
  border-color: var(--red);
  color: var(--red);
}

.source-archive-tools input {
  flex: 1 1 18rem;
  min-width: 0;
}

.source-archive-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.source-archive-selected button,
.source-archive-source {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.source-archive-selected button {
  min-height: 40px;
  padding: 7px 11px;
  border-radius: 999px;
}

.source-archive-source-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 8px;
  max-height: 352px;
  margin-top: 12px;
  padding-right: 4px;
  overflow: auto;
}

.source-archive-source {
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  gap: 3px;
  text-align: left;
}

.source-archive-source strong,
.source-archive-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-archive-source small,
.source-archive-limit {
  color: var(--muted);
}

.source-archive-source.active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.source-archive-source:disabled {
  opacity: .48;
}

.source-archive-limit {
  display: block;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .source-archive-heading,
  .source-archive-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .source-archive-coverage {
    max-width: none;
    justify-content: center;
  }

  .source-archive-tools input {
    flex-basis: auto;
    width: 100%;
  }

  .source-archive-source-list {
    grid-template-columns: 1fr;
    max-height: 416px;
  }
}
