:root {
  --bg: #f7f8f6;
  --paper: #ffffff;
  --paper-soft: #fbfcfa;
  --ink: #111613;
  --muted: #667169;
  --line: #dce3dc;
  --line-strong: #c6d0c9;
  --green: #006a4e;
  --green-strong: #00523e;
  --green-soft: #e5f3ec;
  --amber: #f2c94c;
  --amber-soft: #fff2c1;
  --danger: #b24536;
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --brand: #062d22;
  --chip-bg: #e9eeea;
  --chip-text: #2f3832;
  --body-copy: #39433d;
  --lead-copy: #253028;
  --shadow: 0 18px 45px rgba(19, 32, 25, 0.08);
  --radius: 8px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #101513;
  --paper: #151d19;
  --paper-soft: #111815;
  --ink: #edf4ef;
  --muted: #a5b4ab;
  --line: #2c3932;
  --line-strong: #3c4c44;
  --green: #5fd1a5;
  --green-strong: #8be4bf;
  --green-soft: #18372d;
  --amber: #f3c75d;
  --amber-soft: #3c3217;
  --danger: #ff9d8f;
  --topbar-bg: rgba(17, 24, 21, 0.94);
  --brand: #dff8ec;
  --chip-bg: #223229;
  --chip-text: #d7e5dc;
  --body-copy: #c7d1ca;
  --lead-copy: #d7e1dc;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body.menu-open {
  overflow-x: hidden;
}

body.public-mode .admin-only {
  display: none !important;
}

body.public-mode .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.public-mode .main-news {
  border-right: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.static-page {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.static-page .brand {
  display: inline-block;
  margin-bottom: 38px;
}

.static-page article {
  display: grid;
  gap: 18px;
}

.static-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
}

.static-page h2 {
  margin: 18px 0 0;
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
  color: var(--ink);
  font-size: 18px;
}

.static-page p {
  margin: 0;
  color: var(--body-copy);
  font-size: 18px;
  line-height: 1.68;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "brand actions"
    "nav nav";
  column-gap: 28px;
  row-gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 14px 38px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
}

.brand {
  grid-area: brand;
  color: var(--brand);
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
}

.nav {
  grid-area: nav;
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 7px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-link.active {
  background: var(--green-soft);
  color: var(--green-strong);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--green-soft);
  color: var(--green-strong);
  box-shadow: inset 0 -2px 0 var(--green);
  transform: translateY(-1px);
}

.nav-link.active {
  box-shadow: inset 0 -2px 0 var(--green-strong);
}

.topbar-actions {
  grid-area: actions;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: end;
  justify-self: end;
  width: auto;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}

.topbar-actions::-webkit-scrollbar {
  display: none;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 2px;
}

.segment {
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.segment.active {
  background: var(--green);
  color: #fff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.theme-mark {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 170px;
  max-width: 100%;
  border-bottom: 1px solid transparent;
  color: var(--muted);
}

.search:focus-within {
  border-color: var(--green);
}

.search input {
  width: 120px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 22px;
  line-height: 1;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.editor-shortcut {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 30px 0 12px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  overflow: visible;
}

.editor-shortcut:hover,
.editor-shortcut:focus-visible {
  border-color: var(--green);
  background: var(--green-soft);
}

.bell {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 4px 4px;
  position: relative;
}

.bell::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.count {
  position: absolute;
  top: -6px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--topbar-bg);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  z-index: 2;
}

.editor-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.profile {
  position: relative;
  margin-left: auto;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(260px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 10px;
}

.profile-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--paper);
  transform: rotate(45deg);
}

.profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.profile-head strong,
.profile-head span {
  display: block;
}

.profile-head span:not(.avatar) {
  color: var(--muted);
  font-size: 13px;
}

.profile-dropdown button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
  font-weight: 750;
}

.profile-dropdown button:hover {
  background: var(--green-soft);
  color: var(--green-strong);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex: 0 0 38px;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: #063d2e;
  color: #fff;
  font-weight: 800;
}

.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  display: block;
  background: rgba(255, 255, 255, 0.94);
  transform: translateX(-50%);
}

.avatar::before {
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.avatar::after {
  bottom: 7px;
  width: 22px;
  height: 12px;
  border-radius: 999px 999px 6px 6px;
}

.avatar.has-image {
  background: var(--paper);
}

.avatar.has-image::before,
.avatar.has-image::after {
  display: none;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.main-news {
  padding: 30px 36px 28px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(420px, 1fr);
  gap: 34px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.lead-grid[hidden] {
  display: none;
}

.kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-title {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(42px, 3.6vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead-summary {
  max-width: 650px;
  margin: 0 0 20px;
  color: var(--lead-copy);
  font-size: 19px;
  line-height: 1.48;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

figure,
.article-media,
.queue-media {
  position: relative;
  margin: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.meta strong {
  color: var(--green);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.lead-photo,
.article-photo,
.queue-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #e5ebe5;
  transition: filter 180ms ease, transform 220ms ease;
}

.lead-photo {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo-credit {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.photo-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  border-radius: 5px;
  background: rgba(17, 22, 19, 0.82);
  color: #fff;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 850;
}

.photo-badge.official {
  background: rgba(0, 106, 78, 0.9);
}

.photo-badge.public_domain,
.photo-badge.cc_by,
.photo-badge.cc_by_sa,
.photo-badge.cc0 {
  background: rgba(0, 106, 78, 0.9);
}

.photo-badge.source_image {
  background: rgba(0, 92, 138, 0.9);
}

.photo-badge.needs_exact {
  background: rgba(105, 69, 0, 0.9);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 28px;
  padding-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0 9px;
}

.section-head h2,
.review-head h2,
.pipeline-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#resultCount {
  color: var(--muted);
  font-size: 13px;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 0;
  padding-left: 0;
  border-bottom: 1px solid var(--line-strong);
}

.older-stories-label {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-mount:empty {
  display: none;
}

.ad-placement {
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 160px;
  margin: 24px 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, var(--ink));
}

.ad-placement .ad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ad-placement .adsbygoogle {
  width: 100%;
  min-height: 120px;
}

.article-list > .ad-placement {
  grid-column: 1 / -1;
}

.side-rail .ad-placement {
  min-height: 260px;
  margin-top: 0;
}

.article-page-body > .ad-placement {
  min-height: 180px;
  margin: 32px 0;
}

.ad-settings-card {
  display: grid;
  gap: 24px;
}

.ad-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ad-settings-head h3,
.ad-slot-settings h4 {
  margin: 6px 0 8px;
}

.ad-settings-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.ad-readiness {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ad-readiness.ready {
  border-color: var(--accent);
  color: var(--accent);
}

.ad-slot-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ad-slot-settings h4 {
  grid-column: 1 / -1;
}

.ad-slot-settings label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ad-slot-settings input {
  width: 100%;
}

.ad-layout-preview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  gap: 8px;
  min-height: 190px;
  padding: 10px;
  border: 1px solid var(--line);
}

.ad-layout-preview span {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.ad-map-lead { grid-column: 1; }
.ad-map-top { grid-column: 1; }
.ad-map-feed { grid-column: 1; min-height: 70px; }
.ad-map-side { grid-column: 2; grid-row: 1 / span 3; }

.ad-settings-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.empty-list {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.empty-list strong {
  color: var(--ink);
}

.article-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.article-row:first-child {
  border-top: 1px solid var(--line-strong);
}

.article-row-major {
  grid-column: span 2;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 26px 0 30px;
}

.article-photo {
  aspect-ratio: 16 / 9;
  border-radius: 7px;
}

.article-row > div,
.article-media {
  min-width: 0;
}

.article-row h3,
.brief h3,
.queue-item h3 {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: 0;
}

.article-row h3 {
  max-width: 760px;
  font-size: clamp(24px, 2vw, 29px);
  line-height: 1.08;
}

.article-row-major h3 {
  max-width: 880px;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1;
}

.headline-link,
.brief-link {
  color: inherit;
  text-decoration: none;
}

.headline-link:hover,
.brief-link:hover {
  color: var(--green-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.image-link {
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  border-radius: 7px;
}

.image-link:hover img {
  filter: saturate(1.04) contrast(1.03);
}

.lead-grid figure .image-link {
  border-radius: var(--radius);
}

@media (hover: hover) {
  .article-row:hover {
    background: color-mix(in srgb, var(--green-soft) 38%, transparent);
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--green-soft) 38%, transparent);
  }

  .article-row:hover .article-photo,
  .lead-grid figure:hover .lead-photo {
    filter: saturate(1.06) contrast(1.04);
    transform: scale(1.018);
  }

  .brief:hover .brief-link {
    color: var(--green-strong);
  }
}

.article-row p {
  max-width: 760px;
  margin: 10px 0 12px;
  color: var(--body-copy);
  font-size: 16px;
  line-height: 1.55;
}

.article-row-major p {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.5;
}

.article-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 160ms ease, transform 120ms ease;
}

.button,
.queue-actions button,
.amount-chip,
.segment,
.theme-toggle,
.editor-menu,
.icon-button {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.button:active,
.queue-actions button:active,
.amount-chip:active,
.segment:active,
.theme-toggle:active,
.editor-menu:active,
.icon-button:active,
.link-button:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.briefs {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.side-rail {
  display: grid;
  align-content: start;
  gap: 26px;
}

.side-block + .side-block {
  padding-top: 4px;
}

.brief {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.brief:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.brief h3 {
  font-size: 21px;
  line-height: 1.15;
}

.brief-category {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brief-link {
  display: inline;
}

.brief time {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: start;
  padding: 28px;
  background: var(--paper-soft);
}

.admin-view {
  display: grid;
  gap: 22px;
  padding: 34px clamp(18px, 4vw, 48px) 58px;
  background: var(--paper);
}

.admin-page-head {
  max-width: 920px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
}

.admin-page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.admin-page-head p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--body-copy);
  font-size: 18px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 8px;
}

.admin-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--body-copy);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-tab:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-1px);
}

.admin-tab.active {
  border-color: rgba(86, 211, 168, 0.42);
  background: var(--green-soft);
  color: var(--green-strong);
}

.editor-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  background: var(--paper-soft);
  padding: 22px;
}

.editor-command-copy h2 {
  max-width: 760px;
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
}

.editor-command-copy p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--body-copy);
  font-size: 16px;
  line-height: 1.55;
}

.editor-command-actions {
  display: grid;
  gap: 10px;
  min-width: min(330px, 100%);
}

.command-primary {
  min-height: 48px;
  padding-inline: 18px;
  font-size: 15px;
}

.command-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.command-stats div {
  display: grid;
  gap: 4px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
}

.command-stats div:first-child {
  border-left: 0;
  padding-left: 0;
}

.command-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.command-stats strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.admin-card,
.admin-view .review-panel {
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.article-manager {
  padding: 28px;
}

.article-manager-list {
  display: grid;
  gap: 0;
}

.manager-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.manager-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.manager-item img {
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
}

.manager-item h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.08;
}

.manager-item p {
  margin: 8px 0 0;
  color: var(--body-copy);
  font-size: 14px;
}

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.review-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 16px;
}

.review-head p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-head select {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
}

.queue {
  order: 3;
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0 16px;
}

.queue-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.queue-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.queue-empty {
  padding: 24px 0;
}

.queue-empty h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
}

.queue-empty p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--body-copy);
  font-size: 15px;
  line-height: 1.5;
}

.queue-photo {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
}

.image-placeholder {
  display: grid;
  place-items: center;
  min-height: 70px;
  border: 1px dashed var(--line-strong);
  background: var(--paper-soft);
  color: var(--muted);
  padding: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.manager-image {
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
}

.queue-copy {
  min-width: 0;
}

.queue-line {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.queue-item h3 {
  font-size: 19px;
  line-height: 1.16;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 5px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.status.review {
  background: var(--amber-soft);
  color: #654a00;
}

.status.ready {
  background: #d5eedf;
  color: #174f2d;
}

.status.sources {
  background: #ffe1a8;
  color: #614000;
}

.queue-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.draft-quality {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper-soft) 86%, transparent);
  padding: 10px 12px;
}

.draft-quality.is-strong {
  border-left-color: var(--green);
}

.draft-quality.is-review {
  border-left-color: #a57916;
}

.draft-quality.is-weak {
  border-left-color: var(--danger);
}

.draft-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.draft-quality-head span {
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  padding: 3px 9px;
  font-size: 11px;
  text-transform: uppercase;
}

.draft-quality-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.draft-quality-grid span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.draft-quality-grid strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}

.quality-explanation {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--body-copy);
  font-size: 12px;
  line-height: 1.5;
}

.quality-explanation summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 800;
}

.quality-explanation > strong {
  display: block;
  margin-top: 8px;
}

.quality-explanation p {
  margin: 6px 0 0;
}

.queue-notes {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper-soft) 82%, transparent);
  padding: 9px 10px;
  color: var(--body-copy);
  font-size: 13px;
  line-height: 1.45;
}

.queue-notes summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 850;
}

.queue-notes ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.queue-notes li + li {
  margin-top: 5px;
}

.draft-image-options {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper-soft) 84%, transparent);
  padding: 10px;
}

.draft-image-options > strong {
  color: var(--ink);
  font-size: 13px;
}

.draft-image-option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.draft-image-option {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 6px;
  text-align: left;
}

.draft-image-option img {
  width: 76px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

.draft-image-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.draft-image-option strong,
.draft-image-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-image-option strong {
  font-size: 12px;
}

.draft-image-option small {
  color: var(--muted);
  font-size: 11px;
}

.draft-image-option.is-selected {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--paper));
}

.draft-image-option.needs-rights {
  border-style: dashed;
  border-color: color-mix(in srgb, #9a6400 55%, var(--line));
  background: color-mix(in srgb, #9a6400 7%, var(--paper));
  cursor: not-allowed;
  opacity: 0.78;
}

.queue-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.button,
.queue-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary,
.queue-actions button.approve {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button:disabled,
.queue-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary:hover,
.queue-actions button.approve:hover {
  background: var(--green-strong);
}

.queue-actions button.reject:hover {
  border-color: #d5aaa2;
  color: var(--danger);
}

.publication-safety {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 86%, var(--green) 14%);
  color: var(--ink);
  font-size: 13px;
}

.publication-safety strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-safety small {
  color: var(--muted);
}

.publication-safety.is-clear {
  border-left-color: var(--green);
}

.publication-safety.is-blocking {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--paper) 84%, var(--danger) 16%);
}

.pipeline-card {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.review-panel > .pipeline-card {
  min-height: 100%;
}

.aggregator-card {
  order: 1;
  grid-column: 1;
}

.ai-draft-card {
  order: 2;
  grid-column: 2;
}

.ai-settings-card {
  order: 4;
  grid-column: 1;
}

.source-config-card {
  order: 5;
  grid-column: 2;
}

.review-panel > .pipeline-card:not(.aggregator-card):not(.ai-draft-card):not(.ai-settings-card):not(.source-config-card):not(.api-card):not(.paywall-card) {
  order: 6;
}

.api-card {
  order: 7;
}

.paywall-card {
  order: 8;
}

.paywall-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.reader-access {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
}

.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.access-row strong {
  color: var(--ink);
}

.paywall-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.setting-line.stacked {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 7px;
}

.setting-line select,
.setting-line input,
.setting-line textarea {
  min-width: 142px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 800;
}

.setting-line input,
.setting-line textarea {
  width: 100%;
  font-weight: 650;
}

.setting-line textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.45;
}

.full-width {
  width: 100%;
}

.ai-draft-card {
  display: grid;
  gap: 12px;
}

.ai-draft-card p,
.ai-settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toggle-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
}

.ai-settings-card textarea {
  min-height: 150px;
  font-family: var(--sans);
}

.pipeline-card h3 {
  margin-bottom: 12px;
}

.pipeline-card .full-width {
  margin-top: 12px;
}

.pipeline-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.pipeline-row:first-of-type {
  border-top: 0;
}

.pipeline-row strong {
  color: var(--ink);
}

.candidate-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.candidate-diagnostics {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  color: var(--body-copy);
  font-size: 13px;
  line-height: 1.45;
}

.scan-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 55%, var(--line));
  border-radius: 8px;
  background: var(--green-soft);
}

.scan-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
}

.scan-progress-head strong {
  font-weight: 950;
}

.scan-progress-head span,
.scan-progress small {
  color: var(--muted);
  font-weight: 800;
}

.scan-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
}

.scan-progress-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.candidate-diagnostics p {
  margin: 0;
}

.diagnostics-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.diagnostics-top strong {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagnostics-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.diagnostic-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.diagnostic-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.diagnostic-metrics strong {
  color: var(--ink);
  font-size: 15px;
}

.candidate-diagnostics-note {
  color: var(--muted);
}

.candidate-diagnostics-error {
  color: var(--danger);
  overflow-wrap: anywhere;
}

.last-ai-error {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 7px;
  background: var(--paper);
}

.last-ai-error.is-error {
  border-left-color: var(--danger);
}

.last-ai-error strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.last-ai-error small,
.last-ai-error p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.last-ai-error.is-error p {
  color: var(--danger);
}

.candidate-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.candidate-section-head h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.candidate-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.source-status-panel,
.candidate-scroll-panel {
  display: grid;
  gap: 10px;
}

.source-status-list {
  display: grid;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.source-status-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.source-status-item:last-child {
  border-bottom: 0;
}

.source-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-status-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-status-top span {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(86, 211, 168, 0.16);
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.source-status-item.is-error .source-status-top span {
  background: rgba(177, 96, 86, 0.16);
  color: var(--danger);
}

.source-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.source-status-meta strong {
  color: var(--ink);
}

.source-status-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.candidate-list-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.candidate-scroll-list {
  display: grid;
  max-height: min(620px, 68vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.candidate-item {
  display: grid;
  gap: 8px;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}

.candidate-item:last-child {
  border-bottom: 0;
}

.candidate-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.18;
}

.candidate-summary {
  margin: 0;
  color: var(--body-copy);
  font-size: 13px;
}

.candidate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.candidate-story {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  padding: 8px 10px;
}

.candidate-story-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.candidate-story-line strong {
  color: var(--green-strong);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.candidate-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.candidate-source-chips span {
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
}

.candidate-story small {
  color: var(--muted);
  font-size: 12px;
}

.candidate-sources {
  color: var(--body-copy);
  font-size: 12px;
}

.candidate-sources summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}

.candidate-sources ul {
  display: grid;
  gap: 7px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.candidate-sources li {
  display: grid;
  gap: 2px;
}

.candidate-sources a {
  color: var(--green);
  font-weight: 850;
}

.candidate-sources small {
  overflow-wrap: anywhere;
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-actions .button,
.candidate-actions .link-button {
  min-height: 32px;
  font-size: 13px;
}

.command-action-status,
.candidate-action-status {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.command-action-status[hidden],
.candidate-action-status[hidden] {
  display: none;
}

.command-action-status[data-state="loading"],
.candidate-action-status[data-state="loading"] {
  color: var(--green-strong);
}

.command-action-status[data-state="success"],
.candidate-action-status[data-state="success"] {
  color: var(--green-strong);
}

.command-action-status[data-state="error"],
.candidate-action-status[data-state="error"] {
  color: var(--danger);
}

.candidate-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.candidate-status {
  color: var(--green);
}

.candidate-status.is-failed,
.candidate-failure {
  color: var(--danger);
}

.source-config-card {
  display: grid;
  gap: 12px;
}

.source-config-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.source-config-head h3,
.source-config-head p {
  margin: 0;
}

.source-config-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

#sourceConfigCount {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

.source-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.45fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.source-add-form .source-url-line,
.source-add-form .full-width,
.source-add-status {
  grid-column: 1 / -1;
}

.source-add-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.source-add-status[data-state="success"] {
  color: var(--green-strong);
}

.source-add-status[data-state="error"] {
  color: var(--danger);
}

.source-config-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.source-config-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  padding: 10px;
}

.source-toggle-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.source-config-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.source-config-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-config-name strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
}

.source-config-name span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-config-category {
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-custom-badge {
  border-radius: 999px;
  background: rgba(86, 211, 168, 0.16);
  color: var(--green-strong);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.source-remove-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--danger);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.source-remove-button:hover {
  border-color: #d5aaa2;
}

.about-view {
  flex: 1;
  padding: 70px 36px;
  background: var(--paper);
}

.about-copy {
  max-width: 980px;
  margin: 0 auto;
}

.about-copy h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.about-copy > p {
  max-width: 780px;
  margin: 0 0 36px;
  color: var(--lead-copy);
  font-size: 21px;
}

[data-theme="dark"] .about-copy > p {
  color: #dbe7df;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.principles article {
  padding: 24px;
  background: var(--paper-soft);
}

.principles h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 26px;
}

.principles p {
  margin: 0;
  color: var(--body-copy);
}

.support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.support-strip h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
}

.support-strip p {
  max-width: 680px;
  margin: 0;
  color: var(--body-copy);
}

.donation-panel {
  display: grid;
  min-width: 250px;
  gap: 10px;
}

.donation-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 8px;
}

.amount-chip {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.amount-chip:hover,
.amount-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.donation-custom {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.donation-custom input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.footer {
  display: flex;
  align-items: center;
  gap: 34px;
  min-height: 52px;
  padding: 0 36px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}

.footer button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 6px 0;
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.footer button:hover {
  color: var(--green-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-right {
  margin-left: auto;
  color: var(--ink);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.editor-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
}

.editor-dialog::backdrop {
  background: rgba(10, 20, 15, 0.44);
}

.editor-dialog form {
  display: grid;
  gap: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-head h2 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.05;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.icon-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(17, 22, 19, 0.06);
}

.icon-close:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-strong);
}

[data-theme="dark"] .icon-close {
  border-color: #63766b;
  background: #223129;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.editor-dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legal-dialog,
.cookie-dialog {
  width: min(760px, calc(100vw - 32px));
}

.legal-copy {
  display: grid;
  gap: 16px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.legal-copy section {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.legal-copy section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.legal-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.legal-copy p,
.dialog-copy {
  margin: 0;
  color: var(--body-copy);
  font-size: 16px;
  line-height: 1.6;
}

.cookie-options {
  display: grid;
  gap: 10px;
}

.cookie-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 14px;
}

.cookie-option strong {
  color: var(--ink);
  font-size: 15px;
}

.cookie-option p {
  margin: 4px 0 0;
  color: var(--body-copy);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-option input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.cookie-state {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.editor-dialog input,
.editor-dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

.article-edit-dialog {
  width: min(980px, calc(100vw - 32px));
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  padding: 8px;
}

.rich-editor-toolbar button {
  flex: 0 0 auto;
  min-width: 42px;
  height: 36px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 850;
}

.rich-editor-toolbar button[data-rich-action="image"] {
  min-width: 86px;
}

.rich-editor-toolbar button:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-strong);
}

.rich-editor-toolbar button.is-active,
.rich-editor-toolbar button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.rich-editor {
  min-height: 360px;
  max-height: min(58vh, 680px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  padding: 18px;
  font-size: 18px;
  line-height: 1.68;
}

.rich-editor:empty::before {
  content: "Raksta teksts...";
  color: var(--muted);
}

.rich-editor p,
.rich-editor h2,
.rich-editor h3,
.rich-editor blockquote,
.rich-editor ul,
.rich-editor ol,
.rich-editor figure {
  margin: 0 0 16px;
}

.rich-editor h2,
.article-body h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.12;
}

.rich-editor h3,
.article-body h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.16;
}

.rich-editor blockquote,
.article-body blockquote {
  margin: 4px 0;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  color: var(--ink);
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.32;
}

.rich-editor figure,
.article-body figure {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.rich-editor figure img,
.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  object-fit: cover;
}

.rich-editor figcaption,
.article-body figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.manager-create-button {
  width: fit-content;
  margin: 0 0 14px auto;
}

.article-dialog p {
  margin: 0;
  color: var(--body-copy);
  font-size: 18px;
}

.article-body {
  display: grid;
  gap: 14px;
  color: var(--body-copy);
}

.article-body p {
  margin: 0;
  font-size: 17px;
  line-height: 1.62;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--body-copy);
  font-size: 17px;
  line-height: 1.6;
}

.article-body li::marker {
  color: var(--green-strong);
  font-weight: 900;
}

.article-page-view {
  padding: 46px clamp(24px, 4vw, 54px) 64px;
  background: var(--paper);
}

.article-page-shell {
  width: min(980px, calc(100% - 2px));
  margin: 0 auto;
}

.article-page-nav {
  margin-bottom: 28px;
}

.article-page-header {
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-page-header h1 {
  max-width: 920px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.article-page-header p {
  max-width: 780px;
  margin: 0;
  color: var(--body-copy);
  font-size: 21px;
  line-height: 1.46;
}

.article-page-media {
  margin: 28px 0;
}

.article-page-media img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.article-page-media figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.article-page-body {
  max-width: 760px;
  gap: 18px;
}

.article-page-body p {
  font-size: 19px;
  line-height: 1.72;
}

.article-page-sources {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.article-source-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper-soft);
}

.article-source-card h2,
.article-note-list h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-note-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.article-note-list ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--body-copy);
  font-size: 14px;
  line-height: 1.5;
}

.article-note-list.is-editorial {
  color: var(--muted);
}

.article-editorial-flags {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.article-page-comments {
  max-width: 760px;
  margin-top: 30px;
}

.article-review-tools {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 5px;
  background: var(--amber-soft);
  color: #614000;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.dialog-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialog-source-list.article-page-sources {
  display: grid;
  gap: 14px;
}

.dialog-source-list .article-source-card {
  flex: 1 1 100%;
  width: 100%;
}

.comments-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comments-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.comments-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comments-list {
  display: grid;
  gap: 0;
}

.comment-item {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.comment-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.comment-item p {
  margin: 0;
  color: var(--body-copy);
  font-size: 15px;
  line-height: 1.5;
}

.comment-compose {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  padding: 12px;
}

.comment-compose p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.comment-input-line {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comment-input-line textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-edit-box {
  display: grid;
  gap: 10px;
}

.comment-edit-box textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px;
  font: inherit;
}

.comment-status {
  color: var(--green);
}

.empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.paywall-dialog > form > p {
  margin: 0;
  color: var(--body-copy);
  font-size: 17px;
}

.admin-login-dialog > form > p {
  margin: 0;
  color: var(--body-copy);
  font-size: 16px;
}

.google-login-slot {
  display: grid;
  place-items: center;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 1px 2px;
  box-sizing: border-box;
}

.google-login-slot > div {
  max-width: 100% !important;
}

.google-login-slot iframe {
  max-width: 100% !important;
  min-width: 0 !important;
}

.google-login-message {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  color: var(--body-copy);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.account-summary {
  display: grid;
  gap: 16px;
}

.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  padding: 12px;
}

.account-avatar-row strong,
.account-avatar-row span {
  display: block;
}

.account-avatar-row strong {
  color: var(--ink);
  font-size: 18px;
}

.account-avatar-row span:not(.avatar) {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.account-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.account-summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.account-summary dt {
  color: var(--muted);
  font-weight: 800;
}

.account-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  text-align: right;
}

.account-summary p {
  margin: 0;
  color: var(--body-copy);
}

.account-actions {
  flex-wrap: wrap;
}

.danger-button {
  color: var(--danger);
}

.danger-button:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.paywall-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paywall-options article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-soft);
  padding: 14px;
}

.paywall-options strong {
  color: var(--ink);
}

.paywall-options span {
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "actions";
    gap: 9px;
    min-height: 0;
    padding: 14px 24px 12px;
  }

  .nav,
  .topbar-actions {
    justify-content: start;
    justify-self: stretch;
    width: 100%;
    overflow-x: auto;
    max-width: 100%;
  }

  .topbar-actions {
    overflow: visible;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .lead-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .lead-title {
    max-width: 780px;
  }

  .main-news {
    border-right: 0;
  }

  .review-panel {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line);
  }

  .editor-command-panel {
    grid-template-columns: 1fr;
  }

  .editor-command-actions {
    min-width: 0;
  }

  .aggregator-card,
  .ai-draft-card,
  .ai-settings-card,
  .source-config-card {
    grid-column: 1;
  }
}

@media (max-width: 1450px) and (min-width: 1181px) {
  .topbar {
    gap: 20px;
    padding: 12px 28px 10px;
  }

  .brand {
    font-size: 40px;
  }

  .nav {
    gap: 3px;
  }

  .nav-link {
    padding: 9px 9px;
    font-size: 15px;
  }

  .search {
    min-width: 108px;
  }

  .theme-label,
  .editor-label {
    display: none;
  }

  .search input {
    width: 72px;
  }

  .lead-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lead-title {
    font-size: clamp(40px, 4.1vw, 54px);
    max-width: 760px;
  }

  .lead-summary {
    font-size: 18px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .queue-actions button {
    min-width: 0;
    padding: 0 6px;
    font-size: 12px;
  }

  .briefs {
    padding-left: 0;
    border-left: 0;
  }

  body.public-mode .lead-grid {
    grid-template-columns: minmax(420px, 0.9fr) minmax(360px, 1fr);
    gap: 28px;
  }

  body.public-mode .content-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  }

  body.public-mode .briefs {
    padding-left: 28px;
    border-left: 1px solid var(--line);
  }
}

body[data-active-filter="latest"] .content-grid {
  grid-template-columns: 1fr;
}

body[data-active-filter="latest"] .briefs {
  display: none;
}

@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .briefs {
    display: none;
  }
}

@media (max-width: 820px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .source-add-form {
    grid-template-columns: 1fr;
  }

  .source-config-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .source-status-list,
  .candidate-scroll-list {
    max-height: none;
    overflow: visible;
  }

  .source-status-top,
  .scan-progress-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .source-status-top strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

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

  .candidate-actions .button,
  .candidate-actions .link-button {
    justify-content: center;
    width: 100%;
  }

  .source-config-category,
  .source-remove-button {
    justify-self: start;
  }

  .topbar {
    position: static;
    gap: 8px;
    padding: 12px 18px 10px;
  }

  .brand {
    font-size: 34px;
  }

  .nav {
    gap: 4px;
    padding-bottom: 2px;
    scroll-padding-inline: 18px;
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 14px;
  }

  .topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    width: 100%;
  }

  .segmented-control {
    height: 36px;
  }

  .segment {
    min-width: 31px;
    min-height: 30px;
  }

  .theme-toggle {
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .search {
    flex: 1 1 96px;
    width: 100%;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper-soft);
    padding: 0 10px;
  }

  .search:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
  }

  .search input {
    width: 100%;
    font-size: 15px;
  }

  .search-icon {
    width: 16px;
    height: 16px;
    font-size: 18px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .editor-shortcut {
    max-width: 118px;
    min-height: 36px;
    padding: 0 24px 0 9px;
    font-size: 12px;
  }

  .editor-shortcut #queueJumpLabel {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .editor-menu {
    justify-content: center;
    min-width: 50px;
    min-height: 36px;
    gap: 4px;
  }

  .profile {
    flex: 0 0 auto;
    justify-self: auto;
    margin-left: 0;
  }

  .avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-basis: 36px;
  }

  .avatar::before {
    top: 8px;
    width: 11px;
    height: 11px;
  }

  .avatar::after {
    bottom: 7px;
    width: 20px;
    height: 11px;
  }

  .main-news,
  .review-panel,
  .admin-view,
  .about-view {
    padding: 22px 18px;
  }

  .editor-command-panel {
    padding: 18px;
  }

  .command-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 0;
  }

  .command-stats div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .lead-grid,
  .content-grid,
  .principles {
    grid-template-columns: 1fr;
  }

  .lead-grid > figure {
    order: -1;
  }

  .briefs {
    padding-left: 0;
    border-left: 0;
  }

  .queue-item {
    grid-template-columns: 1fr;
  }

  .draft-quality-grid,
  .draft-image-option-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .manager-item img {
    width: 96px;
  }

  .manager-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .article-list {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 0;
    border-left: 0;
  }

  .article-row,
  .article-row-major {
    grid-column: auto;
    grid-template-columns: minmax(124px, 38vw) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px 0;
  }

  .article-photo {
    aspect-ratio: 1 / 1;
  }

  .article-row h3,
  .article-row-major h3 {
    max-width: none;
    font-size: clamp(19px, 4.8vw, 23px);
    line-height: 1.12;
  }

  .article-row p,
  .article-row-major p {
    display: none;
  }

  .article-row .meta {
    margin-top: 7px;
    gap: 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .article-row .meta > span:nth-of-type(3),
  .article-row .meta > span:nth-of-type(4) {
    display: none;
  }

  .article-row .photo-credit {
    display: none;
  }

  .article-actions {
    margin-top: 8px;
    gap: 10px;
  }

  .article-actions .chip {
    display: none;
  }

  .article-actions .link-button {
    font-size: 13px;
  }

  body[data-active-filter="all"] .briefs {
    display: none;
  }

  body[data-active-filter="all"] .content-grid {
    padding-top: 16px;
  }

  body[data-active-filter="all"] .article-list {
    border-bottom: 0;
  }

  .queue-photo {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 560px) {
  .ad-placement {
    min-height: 120px;
    margin: 18px 0;
  }

  .side-rail .ad-placement {
    min-height: 180px;
  }

  .ad-settings-head,
  .ad-slot-settings,
  .ad-layout-preview {
    grid-template-columns: 1fr;
  }

  .ad-settings-head {
    display: grid;
  }

  .ad-readiness {
    justify-self: start;
  }

  .ad-slot-settings h4,
  .ad-map-lead,
  .ad-map-top,
  .ad-map-feed,
  .ad-map-side {
    grid-column: 1;
    grid-row: auto;
  }

  .ad-layout-preview span {
    min-height: 42px;
  }
  .topbar {
    gap: 7px;
    padding: 10px 14px 9px;
  }

  .brand {
    font-size: 32px;
  }

  .nav-link {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .search {
    min-width: 0;
    height: 34px;
  }

  .topbar-actions {
    gap: 7px;
    overflow-x: visible;
  }

  .segmented-control {
    flex: 0 0 auto;
  }

  .search {
    flex-basis: 78px;
  }

  .draft-quality-grid,
  .draft-image-option-list {
    grid-template-columns: 1fr;
  }

  .theme-toggle,
  .icon-button {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }

  .editor-menu {
    min-width: 48px;
    min-height: 34px;
    gap: 4px;
  }

  .editor-shortcut {
    width: 38px;
    max-width: 38px;
    min-height: 34px;
    padding: 0;
  }

  .editor-shortcut #queueJumpLabel {
    display: none;
  }

  .count {
    top: -7px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    font-size: 10px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex-basis: 34px;
  }

  .avatar::before {
    top: 7px;
    width: 10px;
    height: 10px;
  }

  .avatar::after {
    bottom: 7px;
    width: 19px;
    height: 10px;
  }

  .editor-menu span:not(.avatar):not(.chevron) {
    display: none;
  }

  .lead-title {
    font-size: 35px;
    line-height: 1.04;
  }

  body[data-active-filter="all"] .lead-title {
    margin-bottom: 12px;
    font-size: clamp(28px, 7.5vw, 34px);
  }

  body[data-active-filter="all"] .lead-summary {
    margin-bottom: 12px;
    font-size: 15px;
  }

  body[data-active-filter="all"] .lead-grid {
    gap: 14px;
    padding-bottom: 16px;
  }

  body[data-active-filter="all"] .lead-photo {
    aspect-ratio: 2 / 1;
  }

  .lead-summary,
  .about-copy > p {
    font-size: 18px;
  }

  .review-head,
  .queue-line,
  .setting-line,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .footer {
    gap: 10px;
    padding: 18px;
  }

  .command-stats {
    grid-template-columns: 1fr;
  }

  .command-stats div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 10px 0 0;
  }

  .command-stats div:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .footer-right {
    margin-left: 0;
  }

  .queue-actions {
    grid-template-columns: 1fr;
  }

  .paywall-actions,
  .paywall-options {
    grid-template-columns: 1fr;
  }

  .support-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .donation-panel {
    min-width: 0;
  }

  .article-page-view {
    padding: 30px 22px 50px;
  }

  .article-page-header h1 {
    font-size: 38px;
  }

  .article-page-header p,
  .article-page-body p {
    font-size: 17px;
  }

  .article-row,
  .article-row-major {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 12px;
  }

  .article-row h3,
  .article-row-major h3 {
    font-size: 20px;
  }

  .theme-label,
  .editor-label {
    display: none;
  }

  .profile-dropdown {
    right: 0;
    left: auto;
  }
}
