:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --ink: #222522;
  --muted: #5e6762;
  --panel: #ffffff;
  --line: #cfd5d0;
  --accent: #176148;
  --accent-dark: #104c38;
  --warn: #8b4b18;
  --danger: #a34435;
  --soft: #edf3ef;
  --soft-warm: #f5f0d7;
  --dash-gap: 18px;
  --dash-card-padding: 20px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.icon-text-button,
.edition-page-actions,
.passkey-row,
.auth-passkey-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button img,
.icon-text-button img,
.digest-share-button img {
  width: 18px;
  height: 18px;
}

button:not(.secondary):not(.icon-button) > img {
  filter: brightness(0) invert(1);
}

.edition-page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reading-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  margin: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f9faf7;
  padding: 11px 0;
}

.reading-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reading-progress-copy strong {
  color: var(--accent-dark);
}

.reading-progress-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: #dce3de;
}

.reading-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 180ms ease;
}

.reading-progress > button {
  grid-column: 2;
  grid-row: 1;
  min-height: 36px;
  padding: 5px 10px;
  font-size: 12px;
}

.digest-reading-item {
  scroll-margin-top: 88px;
  transition: background-color 240ms ease, border-color 240ms ease;
}

.digest-reading-item.deep-link-highlight {
  border-left: 4px solid var(--accent);
  background: var(--soft);
  padding-left: 14px;
}

.digest-share-button {
  display: grid;
  place-items: center;
}

.digest-share-button img {
  filter: none;
}

.passkey-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.passkey-list {
  display: grid;
  margin: 12px 0;
}

.passkey-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  border-top: 1px solid var(--line);
  padding: 11px 0;
}

.passkey-row > img {
  width: 20px;
  height: 20px;
  opacity: .72;
}

.passkey-row span,
.passkey-row strong,
.passkey-row small {
  display: block;
  min-width: 0;
}

.passkey-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.passkey-remove {
  min-height: 36px;
  padding: 5px 9px;
  font-size: 12px;
}

.passkey-remove[data-confirm-remove="true"] {
  border-color: var(--danger);
  color: var(--danger);
}

.passkey-name-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.passkey-name-field input {
  width: 100%;
}

.admin-rule {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.auth-passkey {
  display: grid;
  gap: 7px;
}

.auth-passkey-button {
  justify-content: center;
  width: 100%;
}

.auth-passkey small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

.installed-app-nav {
  display: none;
}

html.standalone-app .installed-app-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #bfc8c1;
  background: rgb(251 252 249 / 96%);
  padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  box-shadow: 0 -8px 22px rgb(24 35 29 / 9%);
  backdrop-filter: blur(14px);
}

.installed-app-nav button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 800;
}

.installed-app-nav button:hover,
.installed-app-nav button.active {
  background: transparent;
  color: var(--accent-dark);
}

.installed-app-nav button.active {
  box-shadow: inset 0 3px 0 var(--accent);
}

.installed-app-nav [data-app-tab="today"] {
  --installed-nav-icon: url('/icons/lucide/house.svg');
}

.installed-app-nav [data-app-tab="today-digest"] {
  --installed-nav-icon: url('/icons/lucide/newspaper.svg');
}

.installed-app-nav [data-app-tab="relationships"] {
  --installed-nav-icon: url('/icons/lucide/network.svg');
}

.installed-app-nav [data-app-tab="sources"] {
  --installed-nav-icon: url('/icons/lucide/menu.svg');
}

.installed-nav-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 26px;
  border-radius: 4px;
  opacity: .82;
}

.installed-nav-icon {
  display: block;
  width: 21px;
  height: 21px;
  background: currentColor;
  -webkit-mask: var(--installed-nav-icon) center / contain no-repeat;
  mask: var(--installed-nav-icon) center / contain no-repeat;
}

.installed-app-nav button.active .installed-nav-icon-wrap {
  background: #e7f0eb;
  box-shadow: inset 0 0 0 1px #c7d7ce;
  opacity: 1;
}

.installed-nav-dot {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 7px;
  height: 7px;
  border: 1px solid #fbfcf9;
  border-radius: 50%;
  background: var(--danger);
}

html.standalone-app .layout {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
  .edition-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .edition-page-actions button {
    width: 100%;
  }

  .digest-review-actions {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    justify-content: start;
    justify-self: start;
    width: max-content;
  }

  .digest-review-actions button {
    width: 44px;
  }

  .reading-progress {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .passkey-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .passkey-row button {
    grid-column: 2;
    justify-self: start;
    width: auto;
  }

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

  html.standalone-app .tabs {
    display: none;
  }

  html.standalone-app .reading-progress {
    position: sticky;
    top: 0;
    z-index: 9;
    background: rgb(249 250 247 / 97%);
    backdrop-filter: blur(12px);
  }
}

@media (max-width: 390px) {
  .reading-progress {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading-progress > button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

.admin-substatus {
  color: var(--muted);
  font-size: 13px;
}

.install-app-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fbfcf9;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 70px rgb(24 35 29 / 22%);
}

.install-app-dialog::backdrop {
  background: rgb(19 30 24 / 54%);
}

.install-app-sheet {
  padding: 24px;
}

.install-app-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 3px double var(--ink);
}

.install-app-head .eyebrow {
  margin: 0 0 6px;
}

.install-app-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1;
}

.dialog-close:hover {
  background: var(--soft);
  color: var(--accent-dark);
}

.install-app-steps {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding-left: 26px;
}

.install-app-steps li {
  padding-left: 6px;
  line-height: 1.45;
}

.install-app-steps li::marker {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.install-app-note {
  border-left: 4px solid var(--accent);
  background: var(--soft);
  margin: 0;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.install-app-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.install-app-actions a {
  color: var(--accent-dark);
  font-weight: 700;
}

@supports (padding: max(0px)) {
  html.standalone-app body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
  }

  html.standalone-app .layout {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  html.standalone-app .tabs {
    top: env(safe-area-inset-top);
  }
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 9px 13px;
  cursor: pointer;
  min-height: 44px;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary,
.tab {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.text-button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 0 0 0 6px;
  text-decoration: underline;
}

.text-button:hover {
  background: transparent;
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #fbfbf7;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.env-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd7d3;
  border-radius: 999px;
  background: #fff;
  color: #485652;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
}

.mini-pill.good {
  border-color: #a9c7bf;
  background: #edf6f3;
  color: #23564f;
}

.mini-pill.warn {
  border-color: #e3c98f;
  background: var(--soft-warm);
  color: var(--warn);
}

.mini-pill.info {
  border-color: #cfd7d3;
  background: #f7f9f6;
  color: #52615e;
}

.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 36, 36, 0.36);
  backdrop-filter: blur(2px);
}

.auth-panel form {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 22px 60px rgba(28, 36, 36, 0.2);
}

.auth-panel h2 {
  margin: 0;
  font-size: 20px;
}

.auth-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.auth-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-message {
  color: var(--warn);
  font-size: 13px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.run-actions {
  align-items: stretch;
  justify-content: flex-end;
}

.actions.compact {
  margin-top: 14px;
}

.control-toggle,
.control-select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.control-select {
  min-width: 210px;
}

.control-toggle span,
.control-toggle small,
.control-select span {
  display: block;
  line-height: 1.2;
}

.control-toggle span,
.control-select span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.control-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.control-select select {
  margin-top: 5px;
  min-height: 32px;
  padding: 4px 8px;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.snapshot-grid,
.stats-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

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

.snapshot-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 11px 12px;
}

.snapshot-card span,
.snapshot-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.snapshot-card strong {
  display: block;
  margin: 3px 0;
  font-size: 18px;
  line-height: 1.2;
}

.mode-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.compact-guide {
  margin: 12px 0 0;
}

.mode-guide div,
.tab-intro {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px 12px;
}

.mode-guide strong,
.tab-intro strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.tab-panel > .editor-head + .tab-intro strong {
  display: none;
}

.tab-panel > .editor-head + .tab-intro span {
  margin-top: 0;
}

.mode-guide span,
.tab-intro span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.tab-intro {
  margin-bottom: 12px;
}

.dashboard-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
}

.dashboard-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.25;
}

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

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px;
}

.compact-item strong {
  line-height: 1.3;
}

.compact-item small,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.compact-item a {
  color: var(--accent-dark);
  text-decoration: none;
}

.compact-item a:hover {
  text-decoration: underline;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

label span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.check.inline {
  min-height: 38px;
  padding-top: 20px;
}

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

.control-section {
  margin-top: 16px;
}

.control-section h2,
.watchlist-editor h2 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.25;
}

.watchlist-editor {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.watchlist-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(220px, 1.3fr) auto;
  gap: 12px;
  align-items: end;
}

.watchlist-items {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.watchlist-group {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
}

.watchlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.watchlist-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #c8d8d5;
  background: var(--soft);
  color: #28484b;
  border-radius: 999px;
  padding: 5px 8px 5px 10px;
  font-size: 13px;
}

.watchlist-chip button {
  width: 20px;
  height: 20px;
  min-height: 20px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d8e4e1;
  color: #28484b;
}

.watchlist-chip button:hover {
  background: #c5d6d2;
}

.watchlist-empty {
  color: #7a8581;
}

.issue-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--soft);
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.summary {
  margin-bottom: 12px;
  color: var(--muted);
}

.feedback-summary {
  margin: 0 0 12px;
  color: #42514f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.feedback-center {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

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

.feedback-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.feedback-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.feedback-card ul {
  margin: 0;
  padding-left: 18px;
}

.feedback-card li {
  margin: 6px 0;
  line-height: 1.35;
}

.feedback-card li span {
  color: var(--muted);
  font-size: 12px;
}

.feedback-wide {
  grid-column: 1 / -1;
}

.results-list,
.history-list {
  display: grid;
  gap: 10px;
}

.source-stat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.filter-row,
.history-toolbar,
.relationship-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 12px;
}

.filter-chip {
  min-height: 34px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
}

.filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-chip span {
  color: inherit;
  opacity: .75;
}

.history-toolbar label,
.relationship-toolbar label {
  min-width: 220px;
}

.sources-overview {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.criteria-overview {
  display: grid;
  gap: 18px;
}

.source-overview-grid,
.criteria-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.source-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 11px 12px;
}

.source-metric span,
.source-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.source-metric strong {
  display: block;
  margin: 3px 0;
  font-size: 18px;
  line-height: 1.2;
}

.source-overview-section {
  display: grid;
  gap: 10px;
}

.criteria-section {
  display: grid;
  gap: 10px;
}

.source-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-overview-head h3 {
  margin: 0;
  font-size: 16px;
}

.source-overview-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.source-card,
.criteria-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.source-card-head,
.criteria-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.source-card-pills {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.cadence-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid #c8d8d5;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--soft);
  color: #27484c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.cadence-pill.weekly {
  border-color: #d7c498;
  background: #fff7e6;
  color: #705018;
}

.cadence-pill.enforcement {
  border-color: #d0c4dd;
  background: #f6f1fb;
  color: #56386e;
}

.cadence-pill.disabled {
  border-color: var(--line);
  background: #f7f8f5;
  color: var(--muted);
}

.source-card strong,
.criteria-card strong {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
}

.source-card p,
.criteria-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.criteria-value {
  flex: 0 0 auto;
  border: 1px solid #c8d8d5;
  border-radius: 999px;
  background: var(--soft);
  color: #27484c;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.source-card a {
  color: var(--accent-dark);
  text-decoration: none;
}

.source-card a:hover {
  text-decoration: underline;
}

.source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.source-tags span {
  border: 1px solid #c8d8d5;
  border-radius: 999px;
  background: var(--soft);
  color: #27484c;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.2;
}

.source-card details {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.source-card details summary {
  cursor: pointer;
}

.source-card pre {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.source-schedule-grid {
  display: grid;
  gap: 14px;
}

.schedule-run-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.schedule-index-link {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  padding: 11px 12px;
  text-decoration: none;
}

.schedule-index-link:hover {
  border-color: #9bbab5;
  background: #f7fbfa;
}

.schedule-index-link span,
.schedule-index-link strong,
.schedule-index-link small {
  display: block;
}

.schedule-index-link span {
  color: #52615e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.schedule-index-link strong {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.3;
}

.schedule-index-link small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-run-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.schedule-run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-day {
  display: block;
  color: #52615e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.schedule-run-card h3 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.3;
}

.schedule-run-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.schedule-run-card .schedule-added-line {
  color: #354946;
}

.schedule-added-line strong {
  color: #27302f;
}

.schedule-count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.schedule-count-row span {
  border: 1px solid #cfd7d3;
  border-radius: 999px;
  background: #fbfcfa;
  color: #42514f;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.schedule-source-group,
.schedule-source {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.schedule-source-group > summary,
.schedule-source > summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
}

.schedule-source-group summary strong,
.schedule-source summary strong {
  display: block;
  line-height: 1.3;
}

.schedule-source-group summary small,
.schedule-source summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.schedule-source {
  margin-top: 0;
  background: #fff;
}

.schedule-source .cadence-pill {
  flex: 0 0 auto;
}

.schedule-target-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
}

.schedule-target-list li {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #27302f;
  font-size: 13px;
  line-height: 1.35;
}

.schedule-target-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.schedule-target-list a {
  color: var(--accent-dark);
  text-decoration: none;
}

.schedule-target-list a:hover {
  text-decoration: underline;
}

.target-kind {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border: 1px solid #c8d8d5;
  border-radius: 999px;
  background: var(--soft);
  color: #27484c;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.editor-subhead {
  margin-top: 6px;
  color: var(--muted);
}

.editor-subhead h2 {
  font-size: 15px;
}

.editor-subhead span {
  font-size: 13px;
}

.advanced-json {
  margin-top: 18px;
  color: var(--muted);
}

.advanced-json summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 700;
}

.advanced-json[open] summary {
  margin-bottom: 12px;
}

.source-stat-layout h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.source-table th,
.source-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.source-table th {
  color: #42514f;
  background: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
}

.source-table tr:last-child td {
  border-bottom: 0;
}

.source-table strong {
  display: block;
  min-width: 190px;
}

.policy-stack {
  display: grid;
  gap: 2px;
  min-width: 140px;
}

.policy-stack small {
  color: var(--muted);
  font-size: 12px;
}

.source-table a {
  color: var(--accent-dark);
  text-decoration: none;
}

.source-table a:hover {
  text-decoration: underline;
}

.source-parent {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #42514f;
  background: #fff;
  font-size: 12px;
}

.status-pill.ready {
  border-color: #9ab8b4;
  background: var(--soft);
  color: #245056;
}

.status-pill.good {
  border-color: #9ab8b4;
  background: var(--soft);
  color: #245056;
}

.status-pill.warn {
  border-color: #dbc590;
  background: var(--soft-warm);
  color: var(--warn);
}

.status-pill.cooling {
  border-color: #dbc590;
  background: var(--soft-warm);
  color: var(--warn);
}

.status-pill.blocked {
  border-color: #d9a0a0;
  background: #fbefed;
  color: #8a342d;
}

.status-pill.skipped,
.status-pill.idle {
  color: var(--muted);
}

.section-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.lead,
.history-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.history-item summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.history-item summary strong {
  display: block;
  line-height: 1.3;
}

.history-item summary small,
.history-leads small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.history-summary-metrics,
.history-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.history-metrics {
  margin-top: 12px;
}

.history-analytics {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.history-analytics p {
  margin: 0;
  color: #42514f;
  font-size: 14px;
  line-height: 1.45;
}

.history-leads,
.history-errors ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.history-leads li,
.history-errors li {
  margin: 8px 0;
  line-height: 1.4;
}

.history-deduped {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.history-deduped > strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.history-deduped .history-leads {
  margin-top: 8px;
}

.history-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-json {
  margin-top: 12px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
}

.history-email {
  margin-top: 12px;
}

.history-email iframe {
  width: 100%;
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
}

.relationship-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.relationship-highlight {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.relationship-highlight span,
.relationship-highlight p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.relationship-highlight strong {
  display: block;
  margin-top: 5px;
  line-height: 1.3;
}

.relationship-highlight p {
  margin: 7px 0 0;
}

.relationship-panel {
  min-width: 0;
}

.relationship-panel h3 {
  margin: 0 0 9px;
  font-size: 16px;
}

.relationship-wide {
  margin-top: 14px;
}

.relationship-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.relationship-section-head h3,
.relationship-section-head p {
  margin: 0;
}

.relationship-section-head p {
  max-width: 720px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.relationship-list {
  display: grid;
  gap: 10px;
}

.relationship-card,
.relationship-issue {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.relationship-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.relationship-card-head strong {
  min-width: 0;
  line-height: 1.3;
}

.relationship-card p {
  margin: 8px 0 0;
  color: #42514f;
  font-size: 14px;
  line-height: 1.45;
}

.relationship-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.relationship-mini span {
  font-weight: 700;
}

.relationship-mini em {
  border: 1px solid #cfd9d5;
  border-radius: 999px;
  background: #fbfcfa;
  color: #3f504c;
  font-style: normal;
  padding: 3px 7px;
}

.relationship-examples {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.relationship-examples summary {
  cursor: pointer;
}

.relationship-examples ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.relationship-examples li {
  margin: 7px 0;
  line-height: 1.35;
}

.relationship-examples small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

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

.relationship-issue strong,
.relationship-issue span {
  display: block;
}

.evidence-ledger-summary {
  margin: 0 0 12px;
}

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

.evidence-ledger-card {
  min-width: 0;
  padding: 14px 0 16px;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.evidence-ledger-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.evidence-ledger-card h4 {
  margin: 7px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
}

.evidence-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evidence-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #3e4b48;
  background: #f5f6f3;
  font-size: 11px;
}

.evidence-score strong {
  color: var(--ink);
  font-size: 13px;
}

.evidence-score.strong {
  border-color: #9fc3ac;
  background: #edf6ef;
}

.evidence-score.moderate {
  border-color: #d5bd84;
  background: #faf4df;
}

.evidence-score.limited {
  border-color: #d2aaa1;
  background: #faefec;
}

.evidence-score.neutral {
  border-color: #b9c6d5;
  background: #eef2f7;
}

.evidence-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  background: var(--line);
}

.evidence-facts > div {
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
}

.evidence-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.evidence-facts dd {
  overflow-wrap: anywhere;
  margin: 3px 0 0;
  color: #35413f;
  font-size: 13px;
  line-height: 1.4;
}

.evidence-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-entities > span {
  align-self: center;
  font-weight: 750;
  text-transform: uppercase;
}

.evidence-entities em {
  padding: 3px 7px;
  border: 1px solid #cfd9d5;
  border-radius: 999px;
  color: #3f504c;
  background: #fbfcfa;
  font-style: normal;
}

.evidence-match {
  margin: 11px 0 0;
  padding-left: 10px;
  border-left: 3px solid #b56a17;
  color: #4d4b3f;
  font-size: 13px;
  line-height: 1.5;
}

.evidence-link-status {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.evidence-link-status strong {
  color: var(--accent-dark);
  text-transform: capitalize;
}

.entity-alias-form {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(160px, 0.5fr);
  gap: 10px;
  margin-bottom: 12px;
}

.entity-alias-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.entity-alias-form .alias-wide-field {
  grid-column: span 2;
}

.entity-alias-form button {
  justify-self: start;
}

.entity-alias-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.entity-alias-rule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff;
}

.entity-alias-rule strong,
.entity-alias-rule span {
  display: block;
}

.entity-alias-rule span,
.entity-alias-rule p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.alias-remove-button {
  flex: 0 0 44px;
  font-size: 22px;
}

.lead-evidence-card {
  margin-top: 11px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lead-evidence-card > summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
}

.lead-evidence-card > summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.lead-evidence-card > p {
  color: var(--muted);
  font-size: 13px;
}

.relationship-issue span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.lead.near-miss {
  background: #fbfcf9;
  border-style: dashed;
}

.source-line {
  margin-bottom: 6px;
  color: #5b4234;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.material-source {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  border-left: 3px solid #687772;
  padding-left: 8px;
}

.material-label {
  flex: 0 0 auto;
  margin-right: 7px;
  color: #687772;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.material-source .source-name {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.material-reporting {
  border-left-color: #477564;
}

.material-reporting .material-label {
  color: #477564;
}

.material-filing {
  border-left-color: #965b49;
}

.material-filing .material-label {
  color: #965b49;
}

.material-opinion {
  border-left-color: #536b88;
}

.material-opinion .material-label {
  color: #536b88;
}

.material-oversight {
  border-left-color: #8a6b28;
}

.material-oversight .material-label {
  color: #8a6b28;
}

.material-records {
  border-left-color: #687772;
}

.material-records .material-label {
  color: #687772;
}

.lead h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

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

.feedback-actions {
  display: flex;
  gap: 6px;
}

.icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  font-weight: 700;
}

.tune-more {
  background: #0f6674;
  border-color: #0f6674;
}

.tune-less {
  background: #fff;
  border-color: #b7c1bd;
  color: #495754;
}

.tune-less:hover {
  background: #f1f3ef;
  color: var(--ink);
}

.lead.liked {
  border-color: #8bb9b3;
}

.lead.muted {
  border-color: #d8c59c;
}

.lead a {
  color: var(--accent-dark);
  text-decoration: none;
}

.lead a:hover {
  text-decoration: underline;
}

.badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8d8d5;
  background: var(--soft);
  color: #27484c;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.badge.warn {
  border-color: #e3c98f;
  background: var(--soft-warm);
  color: var(--warn);
}

.feedback-note {
  display: inline-flex;
  margin-bottom: 2px;
  color: #52615e;
  font-size: 13px;
}

.entry-summary,
.excerpt,
.why,
.metadata {
  margin: 8px 0 0;
  line-height: 1.45;
}

.entry-summary,
.why,
.metadata {
  color: var(--muted);
  font-size: 14px;
}

.entry-summary {
  color: #27302f;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.why-surfaced-box {
  margin-top: 10px;
  border: 1px solid #bfd3cf;
  border-radius: 8px;
  background: #f3faf8;
  padding: 11px;
}

.why-surfaced-box > strong {
  display: block;
  margin-bottom: 5px;
  color: #234f55;
  font-size: 13px;
  line-height: 1.3;
}

.why-surfaced-box p {
  margin: 0;
  color: #27302f;
  font-size: 14px;
  line-height: 1.45;
}

.why-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  padding: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.why-grid strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.excerpt {
  color: #27302f;
}

.reason-details {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.reason-details summary {
  cursor: pointer;
}

.reason-details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.errors {
  margin-top: 16px;
}

pre {
  white-space: pre-wrap;
  background: #202827;
  color: #eef7f4;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.editor-head h2 {
  margin: 0;
  font-size: 18px;
}

textarea {
  width: 100%;
  min-height: 64vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.global-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.global-status:empty {
  display: none;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #fbfbf7;
}

.app-header h1,
.hero-panel h2,
.focus-card h2,
.section-head h2,
.section-card h2,
.history-band h2 {
  margin: 0;
  line-height: 1.1;
}

.app-header h1 {
  max-width: 760px;
  font-size: 34px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.run-badge {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 13px;
}

.run-badge span,
.run-badge strong,
.run-badge small {
  display: block;
}

.run-badge span,
.run-badge small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.run-badge strong {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.25;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.admin-link {
  min-width: 78px;
}

.theme-lab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-link.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.dashboard-layout {
  display: grid;
  gap: var(--dash-gap);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--dash-gap);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 18px 45px rgba(31, 43, 41, 0.08);
}

.digest-brief {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.digest-brief p:last-child,
.dashboard-note,
.history-band p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-panel h2 {
  font-size: 32px;
}

.status-dot {
  width: 15px;
  height: 15px;
  margin-top: 9px;
  border-radius: 50%;
  background: #47745d;
  box-shadow: 0 0 0 5px rgba(71, 116, 93, 0.16);
}

.primary-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.edition-picker {
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
}

.edition-picker span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.edition-picker select {
  min-height: 30px;
  margin-top: 3px;
  border: 0;
  padding: 0;
}

.hero-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, .9fr));
  gap: var(--dash-gap);
  align-items: stretch;
}

.admin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.admin-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.admin-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .94em;
}

.admin-run-card {
  grid-row: span 2;
}

.admin-run-controls {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-run-controls .edition-picker {
  max-width: 520px;
}

.admin-action-row,
.admin-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-card .admin-link-grid {
  margin-top: 14px;
}

.explainer-admin-status {
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 11px;
}

.explainer-admin-state {
  display: grid;
  gap: 4px;
}

.explainer-admin-state strong,
.explainer-admin-state small,
.explainer-admin-state span {
  line-height: 1.4;
}

.explainer-admin-state small,
.explainer-admin-state span {
  color: var(--muted);
  font-size: 12px;
}

.explainer-admin-state .explainer-admin-alert {
  color: var(--danger, #9b3d32);
}

.admin-action-row button,
.admin-link-grid button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.admin-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-link-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.dashboard-home {
  display: none;
}

.dashboard-home.active {
  display: block;
}

.dashboard-home .dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.95fr;
  gap: var(--dash-gap);
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dash-gap);
}

.focus-card,
.section-card,
.history-band,
.source-layout,
.section-block {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: var(--dash-card-padding);
}

.focus-card h2,
.section-card h2,
.section-head h2,
.history-band h2 {
  font-size: 26px;
}

.widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.widget-head h2 {
  min-width: 0;
}

.widget-head .status-pill,
.widget-head button {
  flex: 0 0 auto;
}

.widget-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.widget-list,
.widget-split {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

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

.widget-split > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.widget-split > div > strong {
  font-size: 13px;
  line-height: 1.3;
}

.widget-row {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.widget-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.widget-row strong,
.widget-row span,
.widget-row small {
  display: block;
  min-width: 0;
  line-height: 1.35;
}

.widget-row strong,
.widget-row span {
  color: var(--ink);
  font-weight: 800;
}

.widget-row small {
  color: var(--muted);
  font-size: 12px;
}

.today-digest-review-section {
  margin-top: var(--dash-gap);
}

.section-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.digest-review-list {
  display: grid;
  gap: 10px;
}

.digest-review-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.digest-review-item:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.digest-review-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.digest-review-head a {
  color: var(--accent-dark);
  text-decoration: none;
}

.digest-review-head a:hover {
  text-decoration: underline;
}

.digest-review-actions {
  flex: 0 0 auto;
}

.thumb-button {
  font-size: 15px;
}

.thumb-button.selected {
  box-shadow: 0 0 0 3px rgba(15, 102, 116, 0.18);
  transform: translateY(-1px);
}

.thumb-button.tune-more.selected {
  background: #0b5964;
  border-color: #0b5964;
  color: #fff;
}

.thumb-button.tune-less.selected {
  background: #8a5b14;
  border-color: #8a5b14;
  color: #fff;
}

.digest-review-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.digest-review-status {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8faf7;
  color: var(--muted);
  padding: 2px 7px;
  font-weight: 700;
}

.digest-review-status.more {
  border-color: #a9c7bf;
  background: #edf6f3;
  color: #23564f;
}

.digest-review-status.less {
  border-color: #e3c98f;
  background: var(--soft-warm);
  color: var(--warn);
}

.digest-review-item.liked {
  border-color: #8bb9b3;
}

.digest-review-item.muted {
  border-color: #d8c59c;
}

.fun-fact-dashboard-card {
  border-left: 4px solid #c2772e;
}

.dashboard-fun-fact {
  margin: 12px 0 0;
  color: #25302f;
  font-size: 16px;
  line-height: 1.55;
}

.dashboard-fun-fact strong {
  color: #7a4f16;
}

.compact-row {
  padding-top: 7px;
}

.mini-budget-bars {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.mini-budget-bars div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.mini-budget-bars strong {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.mini-budget-bars em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

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

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.pipeline div {
  min-width: 0;
}

.pipeline strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.pipeline span,
.attention-list small,
.source-map small,
.edition-strip small,
.lead-list span {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

.pipeline-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pipeline-bars span {
  display: block;
  width: var(--w);
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.pipeline-bars span:nth-child(2) {
  background: #416d95;
}

.pipeline-bars span:nth-child(3) {
  background: #a66b1f;
}

.pipeline-bars span:nth-child(4) {
  background: #47745d;
}

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

.attention-list div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.attention-list strong,
.attention-list small {
  grid-column: 2;
}

.severity {
  grid-row: 1 / span 2;
  width: 10px;
  height: 100%;
  min-height: 38px;
  border-radius: 999px;
  background: #47745d;
}

.severity.warn {
  background: #a66b1f;
}

.severity.calm {
  background: #47745d;
}

.tuner-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.tuner-group {
  display: grid;
  gap: 8px;
}

.tuner-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.length-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 7px;
}

.day-tune {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 52px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 6px;
  line-height: 1.1;
}

.day-tune:hover {
  border-color: #9bbab5;
  background: #f7fbfa;
  color: var(--ink);
}

.day-tune span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.day-tune strong {
  font-size: 13px;
  white-space: nowrap;
}

.day-tune.short {
  border-color: #c9d8cf;
  background: #f2f7f4;
}

.day-tune.long {
  border-color: #c7d3e2;
  background: #f1f5f9;
}

.day-tune.deep {
  border-color: #b6d7d5;
  background: var(--soft);
}

.boost-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.boost-toggle {
  min-height: 34px;
  border-color: var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.boost-toggle:hover {
  border-color: #9bbab5;
  background: #f7fbfa;
  color: var(--ink);
}

.boost-toggle.active {
  border-color: #bcd6ce;
  background: #eaf5f1;
  color: #254f48;
}

.boost-toggle.academic {
  border-color: #cbc1dd;
  background: #f2eef8;
  color: #4e416d;
  font-weight: 800;
}

.tuner-save-row {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.tuner-save-row button:disabled {
  border-color: var(--line);
  background: #f5f7f4;
  color: var(--muted);
  cursor: default;
}

.tuner-save-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.section-block,
.source-layout,
.two-column,
.dashboard-widget-grid,
.history-band {
  margin-top: var(--dash-gap);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.edition-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.edition-card {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-left: 4px solid var(--line);
  border-radius: 0;
  background: #f8faf7;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.edition-card:hover {
  background: #f1f6f3;
  color: var(--ink);
}

.edition-card:nth-child(1) {
  border-color: #6e5d8f;
}

.edition-card:nth-child(2),
.edition-card:nth-child(3) {
  border-color: #416d95;
}

.edition-card:nth-child(4) {
  border-color: #a66b1f;
}

.edition-card:nth-child(5) {
  border-color: var(--accent);
}

.edition-card:nth-child(6) {
  border-color: #aa443d;
}

.edition-card:nth-child(7) {
  border-color: #47745d;
}

.edition-card.selected {
  background: var(--soft);
}

.edition-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.edition-card strong {
  display: block;
  margin: 8px 0 6px;
  line-height: 1.15;
}

.source-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--dash-gap);
}

.source-map article {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.source-map article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.source-map span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #edf0eb;
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: var(--accent);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--dash-gap);
}

.lead-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lead-list a,
.lead-list div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: inherit;
  text-decoration: none;
}

.lead-list a:hover strong {
  color: var(--accent-dark);
  text-decoration: underline;
}

.lead-list strong,
.lead-list span {
  display: block;
}

.signal-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.signal-bars div {
  display: grid;
  gap: 6px;
}

.signal-bars span {
  color: var(--muted);
  font-weight: 800;
}

.signal-bars strong {
  display: block;
  width: var(--w);
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
}

.signal-bars div:nth-child(2) strong {
  background: #6e5d8f;
}

.signal-bars div:nth-child(3) strong {
  background: #a66b1f;
}

.signal-bars div:nth-child(4) strong {
  background: #aa443d;
}

.history-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  background: #fffaf1;
}

.analytics-metrics,
.analytics-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.analytics-metrics {
  margin-bottom: 18px;
}

.analytics-stack {
  display: grid;
  gap: 18px;
}

.operations-section {
  margin-top: 18px;
}

.operations-details {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operations-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
}

.operations-details > summary strong,
.operations-details > summary small {
  display: block;
  line-height: 1.35;
}

.operations-details > summary small {
  color: var(--muted);
  font-size: 12px;
}

.operations-details > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}

.operations-details > :last-child {
  margin-bottom: 16px;
}

.analytics-band {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.analytics-band:first-child {
  border-top: 0;
}

.analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.analytics-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.analytics-head p:not(.eyebrow),
.analytics-note {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.analytics-metric,
.analytics-item,
.analytics-target-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.analytics-metric {
  background: #fbfcfa;
}

.analytics-metric.good {
  border-color: #a9c7bf;
  background: #edf6f3;
}

.analytics-metric.warn {
  border-color: #e3c98f;
  background: var(--soft-warm);
}

.analytics-metric span,
.analytics-metric small,
.analytics-target-row span,
.analytics-target-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analytics-metric strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
  line-height: 1.15;
}

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

.analytics-two-column h3,
.analytics-split-stack h3,
.analytics-bars h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.25;
}

.analytics-split-stack {
  display: grid;
  gap: 18px;
}

.analytics-bars {
  min-width: 0;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.analytics-bar-row:first-of-type {
  border-top: 0;
}

.analytics-bar-row span,
.analytics-bar-row small {
  display: block;
}

.analytics-bar-row span {
  font-weight: 800;
  line-height: 1.3;
}

.analytics-bar-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analytics-bar-row strong {
  color: var(--ink);
  font-size: 14px;
}

.analytics-bar-row i {
  grid-column: 1 / -1;
  display: block;
  width: var(--w);
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

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

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

.analytics-item {
  display: grid;
  gap: 9px;
}

.analytics-item.inventory {
  background: #fbfcfa;
}

.analytics-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.analytics-item-head strong,
.analytics-target-row strong {
  min-width: 0;
  line-height: 1.3;
}

.analytics-item p,
.analytics-item small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.analytics-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.analytics-chip-row span {
  border: 1px solid #c8d8d5;
  border-radius: 999px;
  background: var(--soft);
  color: #27484c;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.2;
}

.analytics-chip-row span.feedback-positive {
  border-color: #a9c7bf;
  background: #edf6f3;
  color: #23564f;
}

.analytics-chip-row span.feedback-negative {
  border-color: #e3c98f;
  background: var(--soft-warm);
  color: var(--warn);
}

.analytics-recent {
  display: grid;
  gap: 5px;
}

.analytics-recent a,
.analytics-recent span {
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.analytics-recent a:hover {
  text-decoration: underline;
}

.analytics-recent small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.health-queue-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 0;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--line);
}

.health-queue-summary {
  display: grid;
  gap: 3px;
}

.health-queue-summary p,
.health-queue-summary strong,
.health-queue-summary span {
  margin: 0;
}

.health-queue-summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.2;
}

.health-queue-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.health-queue-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 238px;
  cursor: pointer;
}

.health-queue-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.health-toggle-track {
  position: relative;
  width: 42px;
  height: 23px;
  border: 1px solid #9ea9a2;
  border-radius: 999px;
  background: #e6e9e5;
  transition: background 150ms ease, border-color 150ms ease;
}

.health-toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(24, 37, 28, 0.24);
  content: "";
  transition: transform 150ms ease;
}

.health-queue-toggle input:checked + .health-toggle-track {
  border-color: var(--accent);
  background: var(--accent);
}

.health-queue-toggle input:checked + .health-toggle-track::after {
  transform: translateX(19px);
}

.health-queue-toggle input:focus-visible + .health-toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.health-toggle-copy {
  display: grid;
  gap: 2px;
}

.health-toggle-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.health-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.health-review-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.health-review-card.monitoring {
  border-color: #d7c390;
  background: #fffaf1;
}

.health-review-card.decision-recorded {
  border-top-color: #8c9991;
  background: #fbfcfa;
}

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

.health-review-head h3 {
  margin: 7px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.health-review-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.health-action-status {
  display: inline-flex;
  justify-self: end;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.health-action-status.implemented,
.health-action-status.custom {
  border-color: #a9c7bf;
  background: #edf6f3;
  color: #23564f;
}

.health-action-status.pending {
  border-color: #b7c9d9;
  background: #eef5fb;
  color: #31506f;
}

.health-action-status.monitoring {
  border-color: #e3c98f;
  background: var(--soft-warm);
  color: var(--warn);
}

.health-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-evidence span {
  border: 1px solid #d9ddd7;
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.health-suggestions {
  display: grid;
  gap: 8px;
}

.health-suggestions > strong {
  font-size: 13px;
  line-height: 1.3;
}

.health-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.health-suggestion-row span {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.health-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.health-custom-form {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.health-custom-form label,
.health-custom-form textarea {
  width: 100%;
}

.health-decision-note {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.health-decision-note strong {
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.health-decision-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.health-queue-complete {
  display: grid;
  gap: 4px;
}

.pending-actions-panel {
  margin-bottom: 14px;
}

.pending-actions-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

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

.pending-actions-head h3,
.pending-actions-head p {
  margin: 0;
}

.pending-actions-head p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.pending-plan-list {
  display: grid;
  gap: 8px;
}

.pending-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.pending-plan:first-child {
  border-top: 0;
  padding-top: 0;
}

.pending-plan strong,
.pending-plan small,
.pending-plan p {
  display: block;
  min-width: 0;
}

.pending-plan strong {
  line-height: 1.3;
}

.pending-plan small,
.pending-plan p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.pending-plan p {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 13px;
}

.analytics-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.analytics-details > summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.analytics-details summary strong,
.analytics-details summary small {
  display: block;
}

.analytics-details summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analytics-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.analytics-target-row {
  background: #fff;
}

@media (max-width: 980px) {
  .app-header,
  .hero-panel,
  .history-band {
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .run-badge,
  .edition-picker {
    width: 100%;
  }

  .dashboard-home .dashboard-grid,
  .dashboard-widget-grid,
  .source-map,
  .two-column,
  .widget-split,
  .relationship-highlight-grid,
  .analytics-metrics,
  .analytics-card-grid,
  .analytics-two-column,
  .analytics-inventory-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-run-card {
    grid-row: auto;
  }

  .analytics-item-grid,
  .analytics-target-grid {
    grid-template-columns: 1fr;
  }

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

  .primary-actions,
  .history-actions,
  .section-head,
  .section-actions,
  .admin-action-row,
  .admin-link-grid {
    justify-content: flex-start;
  }

  .section-meta {
    text-align: left;
  }

  .digest-review-head,
  .health-review-head,
  .pending-actions-head,
  .pending-plan {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .digest-review-actions,
  .health-action-status,
  .pending-plan .status-pill {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .app-header {
    align-items: flex-start;
    padding: 16px 12px;
  }

  .hero-panel,
  .focus-card,
  .section-card,
  .history-band,
  .source-layout,
  .section-block {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-panel {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .edition-strip {
    grid-template-columns: 1fr;
  }

  .primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-actions button,
  .history-actions button,
  .section-actions button,
  .admin-action-row button,
  .admin-link-grid button,
  .tuner-save-row button,
  .pending-actions-head button,
  .health-review-actions button,
  .health-suggestion-row button {
    width: 100%;
  }

  .analytics-band {
    padding: 16px 0;
  }

  .analytics-head,
  .analytics-item-head,
  .health-suggestion-row,
  .analytics-details > summary,
  .operations-details > summary,
  .widget-head,
  .widget-foot {
    display: grid;
    grid-template-columns: 1fr;
  }

  .source-map article div {
    display: grid;
  }

  .source-map span {
    text-align: left;
  }

  .app-header h1 {
    font-size: 28px;
  }

  .hero-panel h2 {
    font-size: 27px;
  }

  .focus-card h2,
  .section-card h2,
  .section-head h2,
  .history-band h2 {
    font-size: 23px;
  }

  .pipeline strong {
    font-size: 31px;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .layout {
    padding: 10px;
  }

  .panel,
  .dashboard-section,
  .lead,
  .history-item,
  .schedule-run-card {
    padding: 12px;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 -10px;
    padding: 8px 10px;
    overflow-x: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

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

  .field-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-grid,
  .stats-cards,
  .mode-guide,
  .today-grid,
  .feedback-grid,
  .why-grid,
  .relationship-grid,
  .relationship-chip-grid,
  .source-overview-grid,
  .criteria-metric-grid,
  .source-card-grid,
  .criteria-card-grid,
  .source-stat-layout,
  .schedule-run-index,
  .schedule-source-list {
    grid-template-columns: 1fr;
  }

  .watchlist-form,
  .watchlist-group {
    grid-template-columns: 1fr;
  }

  .actions,
  .auth-actions,
  .history-actions,
  .run-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions button,
  .history-actions button,
  .run-actions button,
  .control-select,
  .control-select select {
    width: 100%;
  }

  .history-toolbar label,
  .relationship-toolbar label,
  .control-select {
    min-width: 0;
  }

  .history-toolbar,
  .relationship-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .editor-head,
  .source-overview-head,
  .source-card-head,
  .criteria-card-head,
  .schedule-run-head {
    align-items: stretch;
    flex-direction: column;
  }

  .source-card-pills {
    justify-content: flex-start;
  }

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

  .lead h3 {
    font-size: 16px;
  }

  .history-item summary {
    grid-template-columns: 1fr;
  }

  .check.inline {
    padding-top: 0;
  }

  textarea {
    min-height: 52vh;
    padding: 11px;
    font-size: 12px;
  }

  pre {
    max-width: 100%;
    font-size: 12px;
  }

  .table-wrap {
    overflow: visible;
  }

  .source-table {
    display: block;
    border: 0;
    background: transparent;
    font-size: 13px;
  }

  .source-table thead {
    display: none;
  }

  .source-table tbody,
  .source-table tr,
  .source-table td {
    display: block;
    width: 100%;
  }

  .source-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .source-table td {
    display: grid;
    grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
  }

  .source-table td:last-child {
    border-bottom: 0;
  }

  .source-table td::before {
    content: attr(data-label);
    color: #52615e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .source-table strong,
  .policy-stack {
    min-width: 0;
  }

  .schedule-count-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schedule-source-group > summary,
  .schedule-source > summary {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-target-list li {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 430px) {
  .env-line,
  .source-tags,
  .history-summary-metrics,
  .history-metrics {
    gap: 5px;
  }

  .mini-pill,
  .badge,
  .cadence-pill,
  .status-pill,
  .source-tags span {
    white-space: normal;
  }

  .snapshot-card strong,
  .source-metric strong {
    font-size: 16px;
  }
}

@supports (padding: max(0px)) {
  html.standalone-app .layout {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .digest-review-actions {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    justify-content: start;
    justify-self: start;
    width: max-content;
  }

  .digest-review-actions button {
    width: 44px;
  }

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

  html.standalone-app .tabs {
    display: none;
  }
}

/* The lead story and schedule badge belong to the Front Page, not the app shell. */
html:not(.front-page-active) .hero-panel,
html:not(.front-page-active) .run-badge {
  display: none;
}

html:not(.front-page-active) .header-actions {
  display: none;
}

@media (max-width: 760px) {
  .relationship-section-head,
  .evidence-ledger-kicker,
  .lead-evidence-card > summary {
    flex-direction: column;
    gap: 4px;
  }

  .entity-alias-form,
  .evidence-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .entity-alias-form .alias-wide-field {
    grid-column: auto;
  }

  .entity-alias-form button {
    width: 100%;
  }

  .evidence-ledger-card h4 {
    font-size: 18px;
  }

  .evidence-link-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

/* Intelligence and operations views */
.digest-feature-strip,
.operations-feature-grid,
.source-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.digest-feature-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 22px;
}

.digest-feature-strip article,
.operations-feature,
.human-source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.digest-feature-strip article {
  padding: 14px;
}

.digest-feature-strip span,
.digest-reading-kicker,
.human-source-head span,
.one-click-tests > span {
  color: #64716e;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.digest-feature-strip strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 15px;
}

.digest-feature-strip p,
.operations-note {
  margin: 0;
  color: #52615e;
  font-size: 13px;
  line-height: 1.5;
}

.digest-reading-list {
  max-width: 820px;
}

.digest-reading-item {
  padding: 18px 0 21px;
  border-bottom: 1px solid var(--line);
}

.digest-reading-item:first-child {
  border-top: 1px solid var(--line);
}

.digest-reading-item.liked {
  border-left: 3px solid #2e7d5a;
  padding-left: 12px;
}

.digest-reading-item.muted {
  border-left: 3px solid #a16656;
  padding-left: 12px;
}

.digest-reading-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.digest-reading-item h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.digest-reading-summary,
.digest-reading-explanation,
.digest-reading-relationship {
  margin: 10px 0;
  color: #35413f;
  font-size: 14px;
  line-height: 1.55;
}

.digest-reading-explanation strong {
  color: #253a35;
}

.source-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr);
  gap: 12px;
  margin: 18px 0;
}

.source-directory-toolbar label,
.budget-sim-controls label {
  display: grid;
  gap: 6px;
  color: #52615e;
  font-size: 12px;
  font-weight: 700;
}

.source-directory {
  margin-bottom: 28px;
}

.human-source-card {
  padding: 15px;
}

.human-source-head,
.widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.human-source-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

.human-source-card > p {
  margin: 10px 0;
  color: #44514f;
  font-size: 13px;
  line-height: 1.5;
}

.human-source-facts {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.human-source-facts span {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  color: #52615e;
  font-size: 12px;
  line-height: 1.4;
}

.human-source-facts strong {
  color: #2d3c39;
}

.human-source-card details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.human-source-card summary {
  color: #315d57;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.human-source-card ul,
.roi-columns ul,
.queue-errors {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.human-source-card li {
  padding: 7px 0;
  border-bottom: 1px solid #edf0ed;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.human-source-card li small {
  display: block;
  color: #77817f;
}

.operations-feature-grid {
  margin-bottom: 14px;
}

.operations-feature {
  padding: 16px;
}

.operations-feature h2 {
  margin: 3px 0 8px;
  font-size: 18px;
}

.operations-feature h3 {
  margin: 12px 0 6px;
  font-size: 13px;
}

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

.roi-columns li,
.auto-tuning-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0ed;
  color: #34413f;
  font-size: 12px;
}

.roi-columns small,
.auto-tuning-list small,
.queue-errors small {
  display: block;
  margin-top: 2px;
  color: #76817e;
  font-weight: 400;
}

.roi-columns strong {
  min-width: 74px;
  text-align: right;
}

.budget-sim-controls {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.budget-sim-controls label > span {
  display: flex;
  justify-content: space-between;
}

.budget-sim-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
}

.budget-sim-result strong {
  font-size: 17px;
}

.budget-sim-result span {
  color: #52615e;
  font-size: 12px;
}

.budget-sim-result meter {
  grid-column: 1 / -1;
  width: 100%;
}

.auto-tuning-list .positive { color: #23704f; }
.auto-tuning-list .negative { color: #9a4338; }

.queue-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.queue-counts span {
  padding: 9px;
  background: #f3f6f4;
  color: #66726f;
  font-size: 11px;
  text-align: center;
}

.queue-counts strong {
  display: block;
  color: #263b37;
  font-size: 17px;
}

.queue-errors li {
  padding: 7px 0;
  border-bottom: 1px solid #edf0ed;
  color: #6d3e35;
  font-size: 12px;
}

.operation-timings-feature {
  width: 100%;
}

.operation-threshold {
  color: #64716e;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.operation-timing-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.operation-timing-summary span {
  border-top: 2px solid var(--line-strong);
  padding: 9px 4px 2px;
  color: var(--muted);
  font-size: 11px;
}

.operation-timing-summary strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  font-weight: 500;
}

.operation-timing-list {
  border-top: 1px solid var(--line);
}

.operation-timing-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0ed;
  color: #34413f;
  font-size: 12px;
}

.operation-timing-row strong,
.operation-timing-row small {
  display: block;
}

.operation-timing-row small {
  margin-top: 2px;
  color: #76817e;
  line-height: 1.35;
}

.operation-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
}

.operation-status.good { border-color: #a8c8ba; color: #176148; }
.operation-status.warn { border-color: #d7b48f; color: #8b4b18; }
.operation-status.bad { border-color: #d1a29a; color: #a34435; }

.one-click-tests {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.one-click-test-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 760px) {
  .digest-feature-strip,
  .operations-feature-grid,
  .source-directory,
  .source-directory-toolbar,
  .roi-columns {
    grid-template-columns: 1fr;
  }

  .digest-reading-kicker {
    flex-direction: column;
    gap: 3px;
  }

  .digest-reading-item h3 {
    font-size: 17px;
  }

  .one-click-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operation-timing-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }

  .operation-timing-row > span:nth-child(2) {
    grid-column: 1 / -1;
  }
}

/* Editorial design system */

body {
  background: var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--accent);
}

a {
  text-underline-offset: 3px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 28px max(24px, calc((100vw - 1240px) / 2)) 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
}

.app-masthead {
  min-width: 0;
  text-align: center;
}

.app-header .eyebrow {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 11px;
}

.app-header h1 {
  max-width: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.02;
}

.editorial-masthead-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding: 9px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 3px double var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
}

.editorial-edition-cell {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.editorial-masthead-meta > span:last-child {
  text-align: right;
}

.editorial-issue-cell {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.masthead-admin-link.admin-link {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.masthead-admin-link.admin-link:hover,
.masthead-admin-link.admin-link:focus-visible,
.masthead-admin-link.admin-link.active {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
}

.masthead-admin-link.admin-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-header .env-line {
  justify-content: center;
  margin-top: 12px;
}

.app-header .env-line:empty {
  display: none;
}

.app-header .mini-pill {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 2px 9px 2px 3px;
  font-size: 11px;
}

.app-header .mini-pill:last-child {
  border-right: 0;
}

.header-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.run-badge {
  min-width: 190px;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  background: var(--soft);
  padding: 9px 12px;
}

.admin-link,
.theme-lab-link {
  min-height: 44px;
  border-radius: 4px;
}

.layout {
  max-width: 1240px;
  padding: 24px;
}

.dashboard-layout {
  gap: var(--dash-gap);
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 0;
  border-top: 5px solid var(--accent);
  border-bottom: 1px solid #bfcac3;
  border-radius: 0;
  background: var(--soft);
  padding: 30px;
  box-shadow: none;
}

.digest-brief {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.status-dot {
  display: none;
}

.hero-panel h2 {
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.08;
}

.digest-brief p:last-child,
.dashboard-note,
.history-band p {
  max-width: 800px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

.tabs {
  gap: 0;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 46px;
  border: 0;
  border-bottom: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 13px 8px;
  font-size: 13px;
  font-weight: 800;
}

.tab:hover {
  border-bottom-color: #9bb3a6;
  background: transparent;
  color: var(--ink);
}

.tab.active {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent-dark);
}

.global-status {
  min-height: 0;
  padding: 0 2px;
  font-family: Georgia, "Times New Roman", serif;
}

.tab-panel {
  min-width: 0;
  padding-top: 4px;
}

.section-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: #f5f7f5;
}

.section-switcher-title {
  grid-column: 1 / -1;
  padding: 7px 11px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-switcher button {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.section-switcher button:last-child {
  border-right: 0;
}

.section-switcher button:hover {
  border-bottom-color: #9bb3a6;
  background: #ffffff;
  color: var(--ink);
}

.section-switcher button.active {
  border-bottom-color: var(--accent);
  background: #ffffff;
  color: var(--accent-dark);
}

.page-directory {
  display: grid;
  grid-template-columns: minmax(118px, 0.18fr) minmax(0, 1fr);
  gap: 14px 20px;
  align-items: start;
  margin: 18px 0 26px;
  padding: 11px 0 12px;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.page-directory-heading {
  display: grid;
  gap: 2px;
}

.page-directory-heading span {
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-directory-heading strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}

.page-directory ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: page-directory;
}

.page-directory li {
  min-width: 0;
  counter-increment: page-directory;
}

.page-directory a {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-height: 34px;
  padding: 6px 9px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.page-directory a::before {
  content: counter(page-directory, decimal-leading-zero);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.page-directory a:hover,
.page-directory a:focus-visible,
.page-directory a.active {
  background: var(--soft);
  color: var(--accent-dark);
}

.page-directory a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.page-directory-dense ol {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.section-anchor {
  scroll-margin-top: 76px;
}

.section-anchor.section-jump-highlight {
  animation: section-jump-highlight 1.1s ease-out;
}

@keyframes section-jump-highlight {
  0% { box-shadow: inset 4px 0 0 var(--accent); }
  100% { box-shadow: inset 0 0 0 transparent; }
}

.tab-intro,
.mode-guide div {
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  background: var(--soft);
  padding: 12px 14px;
}

.tab-intro strong {
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.tab-intro span {
  font-size: 13px;
  line-height: 1.5;
}

.focus-card,
.section-card,
.history-band,
.source-layout,
.section-block,
.panel,
.dashboard-section,
.admin-card,
.feedback-card,
.source-card,
.criteria-card,
.history-item,
.lead,
.health-review-card,
.pending-actions-card,
.analytics-metric,
.analytics-item,
.analytics-target-row,
.human-source-card,
.operations-feature,
.operations-details,
.analytics-details {
  border-radius: 0;
  box-shadow: none;
}

.focus-card,
.section-card,
.history-band,
.source-layout,
.section-block {
  border: 0;
  border-top: 2px solid var(--ink);
  background: var(--panel);
  padding: var(--dash-card-padding);
}

.focus-card h2,
.section-card h2,
.section-head h2,
.history-band h2,
.analytics-head h2,
.editor-head h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.focus-card h2,
.section-card h2,
.section-head h2,
.history-band h2 {
  font-size: 24px;
  line-height: 1.15;
}

.section-head {
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
}

.dashboard-home .dashboard-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, .9fr);
  gap: var(--dash-gap);
}

.dashboard-home .lead-card {
  grid-column: span 2;
}

.dashboard-home .fun-fact-dashboard-card {
  grid-column: 3;
}

.dashboard-home .attention-card {
  grid-column: 1;
}

.dashboard-home .tuner-card {
  grid-column: 2 / 4;
}

.lead-card {
  border-top: 5px solid var(--accent);
  background: var(--soft);
}

.fun-fact-dashboard-card {
  border-top: 5px solid #b56a17;
  border-left: 0;
  background: #f8f3de;
}

.attention-card {
  border-top: 5px solid var(--danger);
  background: #fbf1ef;
}

.tuner-card {
  border-top-color: #416d95;
}

.dashboard-fun-fact {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

.dashboard-fun-fact strong {
  color: #8b4b18;
}

.pipeline {
  gap: 1px;
  background: #bfc8c2;
}

.pipeline div {
  padding: 14px 12px;
  background: #fbfcf9;
}

.pipeline strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}

.pipeline span {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-bars span,
.mini-budget-bars strong,
.signal-bars strong,
.analytics-bar-row i,
meter::-webkit-meter-bar,
meter::-webkit-meter-optimum-value {
  border-radius: 0;
}

.pipeline-bars span {
  height: 7px;
}

.attention-list div {
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2cfc9;
}

.severity {
  width: 5px;
  min-height: 42px;
  border-radius: 0;
  background: var(--danger);
}

.severity.warn {
  background: #b56a17;
}

.severity.calm {
  background: var(--accent);
}

.length-grid {
  gap: 5px;
}

.day-tune,
.boost-toggle,
.filter-chip {
  min-height: 44px;
  border-radius: 4px;
}

.boost-toggle {
  border-radius: 999px;
}

.boost-toggle.academic {
  border-color: #c1c9d6;
  background: #eef1f6;
  color: #384f6d;
}

.today-digest-review-section {
  border-top-color: var(--accent);
}

.digest-review-list,
.lead-list,
.widget-list,
.history-list,
.results-list {
  gap: 0;
}

.digest-review-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.digest-review-head h3,
.digest-reading-item h3,
.lead h3,
.history-item h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.digest-review-head h3 {
  font-size: 18px;
}

.front-page-review-lead .digest-review-head h3 {
  font-size: 22px;
  line-height: 1.2;
}

.digest-review-head a,
.lead-list a,
.compact-item a,
.analytics-recent a {
  color: var(--accent-dark);
}

.digest-review-meta,
.section-meta {
  font-family: Georgia, "Times New Roman", serif;
}

.digest-reading-slug {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.digest-reading-slug .story-status {
  color: #8b5b13;
}

.digest-reading-meta {
  margin: 7px 0 12px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.45;
}

.digest-reading-evidence {
  margin: 12px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #59635e;
  font-size: 12px;
  line-height: 1.45;
}

.digest-reading-item.front-page-lead {
  padding-top: 22px;
  border-top: 4px solid var(--accent);
}

.digest-reading-item.front-page-lead h3 {
  max-width: 900px;
  font-size: 29px;
  line-height: 1.12;
}

.thumb-button {
  min-width: 44px;
  min-height: 44px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.thumb-button.selected {
  box-shadow: inset 0 -4px 0 var(--accent);
  transform: none;
}

.digest-review-status,
.status-pill,
.badge,
.cadence-pill,
.mini-pill,
.source-tags span,
.analytics-chip-row span,
.health-action-status,
.health-evidence span {
  border-radius: 999px;
}

.edition-strip {
  gap: 7px;
}

.edition-card {
  min-height: 104px;
  border-left-width: 5px;
  background: #f8faf7;
}

.edition-card.selected {
  background: var(--soft);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.source-map {
  gap: 1px;
  background: var(--line);
}

.source-map article {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  padding: 15px;
}

.source-map article strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.two-column,
.dashboard-widget-grid {
  gap: var(--dash-gap);
}

.lead-list a,
.lead-list div,
.widget-row,
.analytics-bar-row,
.human-source-card li,
.roi-columns li,
.auto-tuning-list > div {
  padding-top: 11px;
  padding-bottom: 11px;
  border-color: var(--line);
}

.lead-list strong,
.widget-row strong,
.analytics-bar-row span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}

.lead-list .front-page-brief-lead {
  padding-top: 16px;
  padding-bottom: 17px;
  border-top: 3px double var(--ink);
}

.lead-list .front-page-brief-lead strong {
  font-size: 19px;
  line-height: 1.25;
}

.lead-list a small,
.lead-list div small {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-editorial-cartoon {
  margin: 34px 0 0;
  padding: 19px 0 22px;
  border-top: 4px double var(--ink);
  border-bottom: 1px solid var(--line);
}

.dashboard-editorial-cartoon figcaption {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.dashboard-editorial-cartoon figcaption span,
.dashboard-editorial-cartoon small {
  color: #8b4b18;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-editorial-cartoon figcaption strong,
.dashboard-editorial-cartoon p {
  font-family: Georgia, "Times New Roman", serif;
}

.dashboard-editorial-cartoon figcaption strong {
  font-size: 23px;
  font-weight: 500;
}

.dashboard-editorial-cartoon img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.dashboard-editorial-cartoon p {
  margin: 12px 0 7px;
  color: #402e28;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.dashboard-cartoon-story {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-cartoon-story a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dashboard-cartoon-gallery {
  margin-top: 36px;
  border-top: 5px double var(--ink);
  padding-top: 22px;
}

.dashboard-cartoon-gallery > .section-meta {
  margin-top: -3px;
}

.dashboard-cartoon-gallery .dashboard-editorial-cartoon {
  margin-top: 24px;
  border-top-width: 1px;
}

.dashboard-cartoon-gallery .dashboard-editorial-cartoon:last-child {
  border-bottom: 4px double var(--ink);
}

.edition-archive-item {
  padding: 0;
  border: 0;
  border-top: 2px solid var(--ink);
  background: transparent;
}

.edition-archive-item summary {
  grid-template-columns: 88px minmax(0, 1fr) 112px;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  list-style: none;
}

.edition-archive-item summary::-webkit-details-marker {
  display: none;
}

.edition-archive-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.edition-archive-stamp {
  display: grid;
  align-content: center;
  min-height: 74px;
  padding-right: 14px;
  border-right: 1px solid var(--ink);
  text-align: center;
}

.edition-archive-stamp small,
.edition-archive-stamp em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.edition-archive-stamp strong {
  margin: 4px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.edition-archive-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.edition-archive-copy > small {
  margin: 0 !important;
  color: var(--accent-dark) !important;
  font-size: 10px !important;
  font-weight: 800;
  text-transform: uppercase;
}

.edition-archive-copy > strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.18;
}

.edition-archive-copy > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.edition-cartoon-thumb,
.edition-archive-mark {
  width: 112px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}

.edition-cartoon-thumb {
  display: block;
  object-fit: cover;
}

.edition-archive-mark {
  display: grid;
  place-items: center;
  color: #8b4b18;
  background: #f8f3de;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.edition-archive-item > :not(summary) {
  margin-right: 18px;
  margin-left: 106px;
}

.signal-bars strong {
  height: 8px;
}

.history-band {
  border-top: 5px solid #b56a17;
  background: #faf6e7;
}

.snapshot-card,
.analytics-metric,
.analytics-item,
.analytics-target-row,
.feedback-card,
.compact-item,
.criteria-card,
.source-card,
.human-source-card,
.health-review-card,
.pending-actions-card,
.admin-card,
.dashboard-section,
.operations-feature {
  border-radius: 0;
  background: #ffffff;
}

.snapshot-card,
.analytics-metric {
  border: 0;
  border-top: 3px solid var(--accent);
  background: var(--soft);
}

.snapshot-card strong,
.analytics-metric strong,
.source-metric strong {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.analytics-metric.good {
  border-color: var(--accent);
  background: var(--soft);
}

.analytics-metric.warn {
  border-color: #b56a17;
  background: #f8f3de;
}

.analytics-band {
  border-top: 2px solid var(--ink);
}

.analytics-head h2 {
  font-size: 26px;
}

.analytics-item,
.analytics-target-row,
.source-card,
.criteria-card,
.human-source-card,
.health-review-card,
.pending-actions-card,
.admin-card,
.operations-feature {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}

.health-review-card.monitoring {
  border-color: #d7c390;
  border-top-color: #b56a17;
  background: #fbf8e9;
}

.operations-details,
.analytics-details {
  border-radius: 0;
}

.operations-details > summary,
.analytics-details > summary {
  min-height: 48px;
}

.source-table {
  border-radius: 0;
}

.source-table th {
  color: var(--accent-dark);
  background: var(--soft);
  font-family: Georgia, "Times New Roman", serif;
}

.filter-row,
.history-toolbar,
.relationship-toolbar {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

input[type="number"],
input[type="text"],
input[type="password"],
input[type="search"],
select,
textarea,
.control-select,
.control-toggle {
  min-height: 44px;
  border-radius: 4px;
}

.auth-panel form {
  border-radius: 4px;
}

.auth-panel h2,
.admin-card h3,
.health-review-head h3,
.human-source-head h3,
.operations-feature h2,
.feedback-card h3,
.dashboard-section h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.one-click-test-grid button,
.admin-action-row button,
.admin-link-grid button {
  min-height: 44px;
}

.queue-counts span {
  border-top: 3px solid #416d95;
  background: #f2f5f8;
}

.queue-counts strong {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

  .dashboard-home .lead-card,
  .dashboard-home .fun-fact-dashboard-card,
  .dashboard-home .attention-card,
  .dashboard-home .tuner-card {
    grid-column: auto;
  }

  .dashboard-home .lead-card,
  .dashboard-home .tuner-card {
    grid-column: span 2;
  }

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

@media (max-width: 760px) {
  body::before {
    height: 5px;
  }

  .app-header {
    padding: 20px 14px 14px;
  }

  .app-header h1 {
    font-size: 34px;
  }

  .editorial-masthead-meta {
    gap: 8px;
    font-size: 10px;
  }

  .app-header .env-line {
    gap: 3px;
  }

  .app-header .mini-pill {
    padding-right: 6px;
    font-size: 10px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .run-badge {
    width: auto;
    min-width: 0;
  }

  .admin-link {
    min-width: 76px;
  }

  .layout {
    padding: 10px;
  }

  .hero-panel,
  .focus-card,
  .section-card,
  .history-band,
  .source-layout,
  .section-block {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-panel {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .hero-panel h2 {
    font-size: 31px;
  }

  .digest-brief p:last-child,
  .dashboard-note,
  .history-band p {
    font-size: 15px;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: nowrap;
    margin: 0 -10px;
    padding: 0 10px;
    overflow-x: auto;
    background: #fbfcf9;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 48px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
  }

  .section-switcher {
    margin: 0 0 16px;
  }

  .section-switcher button {
    min-height: 54px;
    padding: 8px 6px 6px;
    font-size: 12px;
    white-space: normal;
  }

  .section-switcher-title {
    padding-right: 8px;
    padding-left: 8px;
  }

  .health-queue-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .health-queue-toggle {
    min-width: 0;
  }

  .page-directory {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 14px 0 20px;
    padding: 9px 0 10px;
  }

  .page-directory-heading {
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: baseline;
  }

  .page-directory-heading strong {
    font-size: 15px;
  }

  .page-directory ol,
  .page-directory-dense ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-directory a {
    min-height: 38px;
    padding: 7px 7px;
    font-size: 12px;
  }

  .page-directory li:nth-child(odd) a {
    border-left: 0;
  }

  .section-anchor {
    scroll-margin-top: 62px;
  }

  .dashboard-home .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-home .lead-card,
  .dashboard-home .tuner-card {
    grid-column: auto;
  }

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

  .pipeline strong {
    font-size: 30px;
  }

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

  .section-head,
  .digest-review-head,
  .health-review-head,
  .pending-actions-head,
  .pending-plan,
  .widget-head,
  .widget-foot,
  .analytics-head,
  .analytics-item-head,
  .human-source-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .section-actions,
  .digest-review-actions,
  .health-action-status,
  .pending-plan .status-pill {
    justify-self: stretch;
  }

  .section-actions,
  .digest-review-actions,
  .health-review-actions,
  .admin-action-row,
  .admin-link-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .section-actions button,
  .digest-review-actions button,
  .health-review-actions button,
  .admin-action-row button,
  .admin-link-grid button,
  .admin-link-grid .admin-link-button,
  .pending-actions-head button,
  .health-suggestion-row button {
    width: 100%;
  }

  .digest-review-head h3,
  .digest-reading-item h3 {
    font-size: 19px;
    line-height: 1.3;
  }

  .digest-reading-item.front-page-lead h3 {
    font-size: 25px;
    line-height: 1.16;
  }

  .edition-archive-item summary {
    grid-template-columns: 70px minmax(0, 1fr) 82px;
    gap: 11px;
  }

  .edition-archive-stamp {
    min-height: 62px;
    padding-right: 9px;
  }

  .edition-archive-stamp strong {
    font-size: 14px;
  }

  .edition-archive-copy > strong {
    font-size: 18px;
  }

  .edition-cartoon-thumb,
  .edition-archive-mark {
    width: 82px;
  }

  .edition-archive-item > :not(summary) {
    margin-right: 0;
    margin-left: 0;
  }

  .edition-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .edition-card {
    min-height: 0;
  }

  .source-map,
  .two-column,
  .dashboard-widget-grid,
  .analytics-metrics,
  .analytics-card-grid,
  .analytics-two-column,
  .analytics-inventory-grid,
  .analytics-item-grid,
  .editorial-detail-grid,
  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .source-map {
    background: transparent;
  }

  .source-map article {
    border-top: 1px solid var(--line);
  }

  .source-map article div {
    display: grid;
    gap: 5px;
  }

  .source-map span {
    text-align: left;
  }

  .source-table tr {
    border-radius: 0;
  }

  .source-table td {
    grid-template-columns: minmax(84px, .34fr) minmax(0, 1fr);
  }

  .one-click-test-grid,
  .queue-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .app-header h1 {
    font-size: 31px;
  }

  .editorial-masthead-meta {
    grid-template-columns: 1fr auto;
  }

  .editorial-masthead-meta > span,
  .editorial-edition-cell {
    text-align: left !important;
  }

  .editorial-edition-cell {
    justify-items: end;
    text-align: right !important;
  }

  .editorial-masthead-meta > span:last-child {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .editorial-issue-cell {
    justify-content: space-between;
    text-align: left !important;
  }

  .app-header .env-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-header .mini-pill {
    justify-content: center;
    border-right: 0;
  }

  .header-actions {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .run-badge strong {
    font-size: 14px;
  }

  .focus-card h2,
  .section-card h2,
  .section-head h2,
  .history-band h2 {
    font-size: 22px;
  }

  .analytics-metric strong {
    font-size: 20px;
  }

  .one-click-test-grid,
  .queue-counts {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-app-sheet {
    padding: 20px;
  }

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

  .install-app-actions button,
  .install-app-actions a {
    width: 100%;
    text-align: center;
  }
}

@supports (padding: max(0px)) {
  html.standalone-app .layout {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .digest-review-actions {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    justify-content: start;
    justify-self: start;
    width: max-content;
  }

  .digest-review-actions button {
    width: 44px;
  }

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

  html.standalone-app .tabs {
    display: none;
  }
}
