:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-soft: #f5f5f7;
  --line: #e8e8ed;
  --line-strong: #d2d2d7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --blue: #0071e3;
  --blue-ink: #06c;
  --green: #248a3d;
  --amber: #8a6100;
  --rose: #d70015;
  --shadow: none;
  --topbar-bg: rgba(245, 245, 247, 0.88);
  --control-bg: rgba(255, 255, 255, 0.78);
  --reader-head-bg: rgba(255, 255, 255, 0.9);
  --panel-alt: #fbfbfa;
  --selected-bg: #f5f5f7;
  --hover-bg: #fbfdff;
  --brand-fill: #ffffff;
  --brand-stroke: #1d1d1f;
  --progress-bg: #e2e8f0;
  --tech-bg: rgba(247, 248, 250, 0.76);
  --video-bg: #111111;
  --code-bg: #e2e8f0;
  --code-text: #0f172a;
  --verified-bg: #f5f9ff;
  --caution-bg: #fffaf0;
  --toast-bg: #0f172a;
  --toast-text: #ffffff;
  --focus-ring: rgba(0, 113, 227, 0.12);
  --popover-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: #151821;
  --panel-soft: #1d222e;
  --line: #2b313f;
  --line-strong: #3a4252;
  --text: #f5f7fb;
  --muted: #a6adbb;
  --soft: #7f8797;
  --blue: #4c9dff;
  --blue-ink: #82bfff;
  --green: #6ee7a8;
  --amber: #f3bd5b;
  --rose: #ff6b7a;
  --topbar-bg: rgba(11, 13, 18, 0.9);
  --control-bg: rgba(18, 21, 30, 0.82);
  --reader-head-bg: rgba(21, 24, 33, 0.92);
  --panel-alt: #11141c;
  --selected-bg: #202532;
  --hover-bg: #1e2634;
  --brand-fill: #151821;
  --brand-stroke: #f5f7fb;
  --progress-bg: #2d3545;
  --tech-bg: rgba(31, 37, 49, 0.86);
  --video-bg: #05060a;
  --code-bg: #252c3a;
  --code-text: #f5f7fb;
  --verified-bg: #111d2c;
  --caution-bg: #2a210f;
  --toast-bg: #f5f7fb;
  --toast-text: #10131a;
  --focus-ring: rgba(76, 157, 255, 0.24);
  --popover-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: var(--blue-ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.app-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(320px, 780px) auto;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-mark rect {
  fill: var(--brand-fill);
  stroke: var(--brand-stroke);
  stroke-width: 2;
}

.brand-mark path {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 2.2;
}

.brand h1,
.pane-toolbar h2,
.filter-head h2,
.reader-title {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-field {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

.search-field svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--soft);
  stroke-linecap: round;
  stroke-width: 2;
}

.search-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-stack {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-self: center;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.search-filter-button,
.panel-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  outline: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.search-filter-button {
  position: relative;
  width: 46px;
  min-width: 46px;
  border-left: 1px solid var(--line);
  border-radius: 0 9px 9px 0;
}

.search-filter-button:hover,
.search-filter-button.active,
.panel-close-button:hover {
  background: var(--hover-bg);
  color: var(--blue-ink);
}

.search-filter-button:focus-visible,
.panel-close-button:focus-visible,
.reset-filters-button:focus-visible,
.apply-filters-button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.search-filter-button svg,
.panel-close-button svg,
.reset-filters-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.filter-count {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(780px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--popover-shadow);
}

.filter-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.filter-panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.panel-close-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.select-control {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.filter-panel .subject-control,
.filter-panel .relevance-control {
  grid-column: span 2;
}

.filter-panel .date-control {
  grid-column: span 2;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.select-control span,
.date-control legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.date-control legend {
  margin-bottom: 6px;
  padding: 0;
}

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

.date-range-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.select-control select,
.pane-toolbar select {
  min-width: 0;
  min-height: 36px;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.select-control select {
  width: 100%;
  padding: 0 11px;
}

.date-range-field input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.select-control select:hover,
.pane-toolbar select:hover,
.date-range-field input:hover {
  border-color: var(--soft);
}

.select-control:not(.date-control).has-value select,
.date-control select.has-value {
  border-color: var(--blue);
  background: var(--hover-bg);
  color: var(--blue-ink);
  font-weight: 650;
}

.date-range-field input.has-value {
  border-color: var(--blue);
  background: var(--hover-bg);
  color: var(--text);
}

.select-control select:focus,
.pane-toolbar select:focus,
.date-range-field input:focus,
.author-hub-button:focus-visible,
.icon-button:focus-visible,
.reader-action:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.filter-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-alt);
}

.reset-filters-button,
.apply-filters-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.reset-filters-button:hover {
  border-color: var(--soft);
  color: var(--text);
}

.apply-filters-button {
  min-width: 154px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.apply-filters-button:hover {
  border-color: var(--blue-ink);
  background: var(--blue-ink);
}

.apply-filters-button strong {
  font-weight: 750;
}

.settings-shell {
  position: relative;
}

.settings-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
}

.settings-toggle.active {
  border-color: var(--blue);
  color: var(--blue-ink);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 250px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--popover-shadow);
}

.settings-menu-title {
  margin: 0;
  padding: 7px 9px 8px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-login-dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(3, 7, 18, 0.32);
}

html.admin-login-open,
html.admin-login-open body {
  overflow: hidden;
}

.admin-login-dialog::backdrop {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(3px);
}

.admin-login-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.admin-login-head {
  display: grid;
  gap: 6px;
}

.admin-login-head .eyebrow,
.admin-login-head h2,
.admin-login-head p,
.admin-login-error {
  margin: 0;
}

.admin-login-head h2 {
  font-size: 22px;
  line-height: 1.25;
}

.admin-login-head > p:last-child {
  color: var(--muted);
  font-size: 14px;
}

.admin-login-label {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}

.admin-password-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control-bg);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.admin-password-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.admin-password-shell input {
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.admin-password-shell input[aria-invalid="true"] {
  color: var(--rose);
}

.admin-password-toggle {
  display: grid;
  width: 42px;
  min-width: 42px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  place-items: center;
}

.admin-password-toggle:hover,
.admin-password-toggle:focus-visible {
  background: var(--hover-bg);
  color: var(--text);
}

.admin-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.admin-password-hide-icon,
.admin-password-toggle.is-visible .admin-password-show-icon {
  display: none;
}

.admin-password-toggle.is-visible .admin-password-hide-icon {
  display: block;
}

.admin-login-error {
  min-height: 20px;
  color: var(--rose);
  font-size: 13px;
}

.admin-login-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.admin-login-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-weight: 700;
}

.admin-login-cancel {
  background: transparent;
  color: var(--text);
}

.admin-login-cancel:hover {
  background: var(--hover-bg);
}

.admin-login-submit {
  border-color: var(--blue) !important;
  background: var(--blue);
  color: #fff;
}

.admin-login-submit:hover {
  background: var(--blue-ink);
}

.admin-login-actions button:disabled,
.admin-password-toggle:disabled {
  cursor: wait;
  opacity: 0.62;
}

@media (max-width: 480px) {
  .admin-login-panel {
    padding: 20px;
  }

  .admin-login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.author-hub-button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  outline: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.author-hub-button:hover,
.author-hub-button.active {
  background: var(--hover-bg);
  color: var(--blue-ink);
}

.author-hub-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.author-hub-button span {
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
}

.author-hub-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
}

.author-hub-button.active strong {
  background: var(--blue);
  color: #fff;
}

.settings-back-button {
  grid-template-columns: 20px minmax(0, 1fr);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon-button,
.reader-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.icon-button svg,
.reader-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button:hover,
.reader-action:hover {
  border-color: var(--blue);
  color: var(--blue-ink);
}

.theme-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.theme-toggle .sun-icon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.stat {
  min-height: 52px;
  padding: 10px 18px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.stat strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.views-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow-x: auto;
}

.view-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  min-width: max-content;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.view-button:hover,
.view-button.active {
  border-color: var(--blue);
  color: var(--blue-ink);
  background: var(--hover-bg);
}

.view-button small {
  color: var(--soft);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(560px, 1fr);
  min-height: 0;
  overflow: hidden;
}

.list-pane,
.reader-pane {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.sidebar {
  background: var(--panel-alt);
  padding: 18px;
  overflow: auto;
}

.filter-block + .filter-block,
.toggle-row {
  margin-top: 22px;
}

.filter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.filter-head h2,
.pane-toolbar h2 {
  font-size: 16px;
}

.filter-head span {
  color: var(--soft);
  font-size: 13px;
}

.filter-list {
  display: grid;
  gap: 6px;
}

.filter-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.filter-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-button small {
  color: var(--soft);
  font-size: 12px;
}

.compact .filter-button {
  min-height: 34px;
}

.toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.list-pane {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  overflow: hidden;
}

.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.pane-toolbar select {
  height: 36px;
  max-width: 160px;
  padding: 0 8px;
}

.fiche-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0;
  padding: 0;
  overflow: auto;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

.empty-state p {
  margin: 0;
}

.fiche-card {
  width: 100%;
  min-height: 104px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.fiche-card:hover,
.fiche-card.active,
.fiche-card:focus-visible {
  border-color: var(--line);
  background: var(--selected-bg);
  box-shadow: none;
}

.fiche-card:focus-visible {
  box-shadow: inset 4px 0 0 var(--blue);
}

.fiche-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}

.fiche-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin-top: 9px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.review-list-status {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  color: var(--blue-ink);
  font-weight: 700;
}

.review-list-status.status-validated {
  color: var(--green);
}

.review-list-status.status-needs_review {
  color: var(--amber);
}

.review-list-status.status-low_confidence {
  color: var(--rose);
}

.tag-row,
.reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.tag.prompt {
  border-color: rgba(15, 118, 110, 0.3);
  color: var(--green);
  background: rgba(15, 118, 110, 0.08);
}

.tag.sources {
  border-color: rgba(180, 83, 9, 0.3);
  color: var(--amber);
  background: rgba(180, 83, 9, 0.08);
}

.tag.video {
  border-color: rgba(31, 111, 235, 0.28);
  color: var(--blue-ink);
  background: rgba(31, 111, 235, 0.07);
}

.tag.video.muted {
  border-color: var(--line);
  color: var(--soft);
  background: var(--panel-soft);
}

.reader-pane {
  position: relative;
  background: var(--panel);
  padding: 0;
  overflow: auto;
}

.mobile-reader-toolbar {
  display: none;
}

.mobile-reader-close {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--blue-ink);
  font-weight: 650;
}

.mobile-reader-close:hover {
  background: var(--hover-bg);
}

.mobile-reader-close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.mobile-reader-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.reader-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.home-head {
  min-height: 112px;
}

.home-page {
  gap: 0;
  max-width: 1120px;
}

.validation-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 48px;
  align-items: center;
  padding: 24px 0 32px;
}

.home-kicker {
  margin: 0 0 8px;
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.validation-intro h3 {
  max-width: 700px;
  margin: 0;
  color: var(--text);
  font-size: 36px;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: 0;
}

.validation-intro-copy > p:last-child {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.validation-rule {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line-strong);
}

.source-minimum {
  display: grid;
  grid-template-columns: 36px auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.source-minimum svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.source-minimum strong {
  color: var(--text);
  font-size: 52px;
  font-weight: 750;
  line-height: 1;
}

.source-minimum span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.validation-rule ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.validation-rule li {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--text);
  font-size: 14px;
}

.validation-rule li svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.library-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.library-proof div {
  min-width: 0;
  padding: 2px 20px;
  border-right: 1px solid var(--line);
}

.library-proof div:first-child {
  padding-left: 0;
}

.library-proof div:last-child {
  border-right: 0;
}

.library-proof strong,
.library-proof span {
  display: block;
}

.library-proof strong {
  color: var(--text);
  font-size: 23px;
  line-height: 1.1;
}

.library-proof span {
  margin-top: 3px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.home-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.home-section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.home-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0;
}

.validation-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.validation-flow::before {
  position: absolute;
  top: 25px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.validation-step {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.validation-step-marker {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  align-items: center;
  width: max-content;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 700;
}

.validation-step-marker svg,
.source-tier-icon svg,
.site-usage-step svg,
.home-trust-note svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.validation-step > strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.validation-step > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-tiers {
  display: grid;
}

.source-tier {
  display: grid;
  grid-template-columns: 38px minmax(250px, 1.1fr) minmax(230px, 0.9fr) 56px;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.source-tier:last-child {
  border-bottom: 1px solid var(--line);
}

.source-tier-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-ink);
  background: var(--panel-soft);
}

.source-tier-copy strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.source-tier-copy p,
.source-tier > span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.source-tier > span {
  margin: 0;
}

.source-strength {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}

.source-strength i {
  width: 7px;
  height: 22px;
  border-radius: 2px;
  background: var(--line-strong);
}

.source-tier.high .source-strength i,
.source-tier.medium .source-strength i:nth-child(-n + 2),
.source-tier.low .source-strength i:first-child {
  background: var(--blue);
}

.score-visual {
  display: grid;
  gap: 14px;
}

.score-track,
.score-labels {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.85fr 0.8fr;
  gap: 5px;
}

.score-track span {
  height: 9px;
  border-radius: 3px;
}

.score-low {
  background: #8e8e93;
}

.score-limited {
  background: #d79a16;
}

.score-test {
  background: #4b86d8;
}

.score-keep {
  background: #2f8f55;
}

.score-point {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.score-point strong,
.score-point span,
.score-point small {
  display: block;
}

.score-point strong {
  color: var(--text);
  font-size: 14px;
}

.score-point span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.score-point small {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
}

.site-usage-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-usage-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 12px;
  min-width: 0;
  padding: 2px 24px;
  border-right: 1px solid var(--line);
}

.site-usage-step:first-child {
  padding-left: 0;
}

.site-usage-step:last-child {
  border-right: 0;
}

.site-usage-step > div {
  display: grid;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-ink);
  background: var(--panel-soft);
}

.site-usage-step strong {
  color: var(--text);
  font-size: 14px;
}

.site-usage-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-trust-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 30px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.home-trust-note > div {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--amber);
  background: var(--caution-bg);
}

.home-trust-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.home-trust-note strong {
  color: var(--text);
}

.reader-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: end;
  overflow: hidden;
  padding: 14px 36px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--reader-head-bg);
  backdrop-filter: blur(18px);
}

.reader-progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--progress-bg);
}

.reader-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
}

.reader-title-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.reader-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.12;
}

.reader-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-toolbar {
  display: grid;
  grid-template-columns: 28px minmax(180px, 1fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-alt);
}

.review-toolbar.waiting {
  grid-template-columns: 28px minmax(0, 1fr);
  border-color: rgba(185, 122, 0, 0.28);
  background: var(--caution-bg);
}

.review-toolbar.review-required,
.review-toolbar.low-confidence {
  grid-template-columns: 28px minmax(180px, 1fr) auto;
}

.review-toolbar.review-required {
  border-color: color-mix(in srgb, var(--amber) 36%, var(--line));
  background: var(--caution-bg);
}

.review-toolbar.low-confidence {
  border-color: color-mix(in srgb, var(--rose) 36%, var(--line));
  background: color-mix(in srgb, var(--rose) 7%, var(--panel));
}

.review-toolbar.published-review {
  grid-template-columns: 28px minmax(180px, 1fr) auto;
}

.review-state-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--blue-ink);
}

.review-toolbar.waiting .review-state-icon {
  color: var(--amber);
}

.review-toolbar.review-required .review-state-icon {
  color: var(--amber);
}

.review-toolbar.low-confidence .review-state-icon {
  color: var(--rose);
}

.review-state-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.review-state-copy {
  min-width: 0;
}

.review-state-copy strong,
.review-state-copy span {
  display: block;
}

.review-state-copy strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.review-state-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.version-switch {
  display: inline-flex;
  min-height: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.version-switch button {
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.version-switch button:hover,
.version-switch button:focus-visible {
  color: var(--text);
  outline: none;
}

.version-switch button:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.version-switch button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.agent-score-list {
  display: inline-flex;
  gap: 4px;
}

.agent-score-list span {
  display: flex;
  gap: 4px;
  align-items: baseline;
  min-height: 26px;
  padding: 4px 7px;
  border-left: 1px solid var(--line);
}

.agent-score-list .score-pass strong {
  color: var(--green);
}

.agent-score-list .score-low strong {
  color: var(--amber);
}

.agent-score-list small {
  color: var(--soft);
  font-size: 10px;
}

.agent-score-list strong {
  color: var(--text);
  font-size: 12px;
}

.tech-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin: 8px 0 0;
}

.tech-summary-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  max-width: min(150px, 100%);
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--tech-bg);
}

.tech-summary-item dt {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  color: var(--soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
  text-transform: uppercase;
}

.tech-summary-item dt span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tech-summary-item svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  stroke: var(--blue);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-summary-item dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-action {
  width: auto;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}

.reader-action[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--blue-ink);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.source-dock a:hover,
.section-nav button:hover {
  color: var(--blue-ink);
  text-decoration: underline;
}

.source-dock a + a::before {
  content: "·";
  margin: 0 8px 0 2px;
  color: var(--soft);
  text-decoration: none;
}

.section-nav {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.reader-body {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px 42px 56px;
}

.video-lab {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}

.video-lab-head {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}

.video-lab-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-action,
.button-link {
  text-decoration: none;
}

.button-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.button-link:hover {
  border-color: var(--blue);
  color: var(--blue-ink);
  background: var(--hover-bg);
}

.button-link svg,
.compact-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.compact-action {
  min-height: 36px;
  height: 36px;
  padding: 0 11px;
  font-size: 13px;
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.single-media-grid {
  grid-template-columns: minmax(280px, 760px);
}

.single-media-grid.has-short-youtube {
  grid-template-columns: minmax(210px, 360px);
}

.single-media-grid.single-tiktok-grid {
  grid-template-columns: minmax(210px, 320px);
}

.media-grid.has-short-youtube:not(.single-media-grid) {
  grid-template-columns: repeat(2, minmax(210px, 320px));
}

.media-block {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.standard-media-block {
  width: 100%;
  max-width: 760px;
  justify-self: stretch;
}

.short-media-block {
  width: 100%;
  max-width: min(360px, 100%);
  justify-self: start;
}

.media-grid.has-short-youtube:not(.single-media-grid) .short-media-block {
  max-width: min(320px, 100%);
}

.media-block-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}

.media-block-head span {
  font-weight: 700;
}

.media-block-head small {
  overflow: hidden;
  max-width: 180px;
  color: var(--soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-frame {
  position: relative;
  background: var(--video-bg);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tiktok-frame {
  aspect-ratio: 9 / 16;
  max-height: 620px;
}

.youtube-frame {
  width: 100%;
}

.youtube-standard-frame {
  aspect-ratio: 16 / 9;
  min-height: 220px;
}

.youtube-short-frame {
  aspect-ratio: 9 / 16;
  max-height: 620px;
  min-height: 0;
}

.video-caption {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.video-caption strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.video-caption span {
  overflow-wrap: anywhere;
}

.video-placeholder {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 220px;
  padding: 18px;
  align-content: center;
  background: var(--panel-alt);
  color: var(--muted);
}

.video-placeholder strong {
  color: var(--text);
  font-size: 15px;
}

.video-placeholder p {
  margin: 0;
  overflow-wrap: anywhere;
}

.youtube-search {
  min-height: 260px;
}

.note-section {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: var(--shadow);
}

.note-section h3 {
  margin: 0;
  padding: 24px 0 4px;
  border-bottom: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.note-content {
  padding: 10px 0 24px;
  color: var(--text);
  font-size: 16px;
}

.note-content p {
  margin: 0 0 12px;
}

.note-content p:last-child,
.note-content ul:last-child,
.note-content ol:last-child {
  margin-bottom: 0;
}

.note-content ul,
.note-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.note-content li + li {
  margin-top: 6px;
}

.note-content code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: Consolas, "Fira Code", monospace;
  font-size: 0.92em;
}

.note-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 0 24px;
}

.example-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.example-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.example-card-head > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.example-evidence-status {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
}

.example-evidence-status.explained {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--green);
}

.example-card h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.example-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.example-details div {
  display: grid;
  gap: 3px;
}

.example-details dt,
.example-instruction span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.example-details dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.example-instruction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.example-instruction > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.example-instruction code {
  overflow-wrap: anywhere;
  color: var(--code-text);
  font-family: Consolas, "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.example-source {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  color: var(--blue-ink);
  font-size: 12px;
  text-decoration: none;
}

.example-source svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}

.example-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verification-section .note-content {
  padding-top: 0;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 0 12px;
}

.verification-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.verification-card > div {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.verification-card svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  stroke: var(--blue);
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verification-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.verification-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.verification-card.strong {
  border-color: rgba(0, 113, 227, 0.24);
  background: var(--verified-bg);
}

.verification-card.caution {
  border-color: rgba(185, 122, 0, 0.28);
  background: var(--caution-bg);
}

.verification-why,
.verification-conclusion {
  margin: 0 0 10px;
  max-width: 880px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.verification-conclusion {
  color: var(--text);
  font-weight: 650;
}

.review-blockers {
  max-width: 880px;
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--amber);
  background: var(--caution-bg);
}

.review-blockers strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.review-blockers ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.verification-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 22px;
}

.verification-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--panel-soft);
  color: var(--text);
}

.prompt-section {
  border-color: rgba(15, 118, 110, 0.35);
}

.prompt-section h3 {
  color: var(--green);
}

.source-fallback-section {
  border-color: rgba(0, 113, 227, 0.28);
}

.source-fallback-section h3 {
  color: var(--blue-ink);
}

.related-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.related-list [role="button"] {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.related-list [role="button"]:hover,
.related-list [role="button"]:focus-visible {
  border-color: var(--blue);
  background: var(--hover-bg);
}

.related-list small {
  color: var(--soft);
}

.author-reader {
  gap: 0;
}

html:has(.published-fiche-modal),
body:has(.published-fiche-modal) {
  overflow: hidden;
}

.published-fiche-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 16px;
  place-items: center;
}

.published-fiche-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.76);
  backdrop-filter: blur(4px);
}

.published-fiche-window {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1180px, calc(100vw - 32px));
  height: min(920px, calc(100dvh - 32px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(3, 7, 18, 0.38);
}

.published-fiche-window-head {
  display: flex;
  min-width: 0;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.published-fiche-window-head > div {
  min-width: 0;
}

.published-fiche-window-head h2 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-fiche-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.published-reader-head {
  max-width: none;
}

.published-reader-body {
  max-width: 1060px;
}

.author-settings-page-head {
  gap: 0;
  padding-bottom: 0;
}

.author-settings-page-head .reader-title-row {
  padding-bottom: 12px;
}

.author-settings-tabs {
  display: flex;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.author-settings-tabs::-webkit-scrollbar {
  display: none;
}

.author-settings-tab {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.author-settings-tab:hover,
.author-settings-tab:focus-visible {
  color: var(--text);
  background: var(--hover-bg);
  outline: none;
}

.author-settings-tab.active {
  border-bottom-color: var(--blue);
  color: var(--blue-ink);
}

.author-settings-tab svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-settings-page-body {
  align-content: start;
}

.author-settings-page-body[data-settings-mode="add"] .author-add-panel {
  max-width: 820px;
}

.author-add-panel {
  display: grid;
  gap: 18px;
}

.author-form-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.author-form-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.author-add-form {
  grid-template-columns: minmax(230px, 1.6fr) minmax(140px, 0.8fr) minmax(160px, 1fr);
  align-items: end;
}

.author-add-submit {
  grid-column: 1 / -1;
  justify-self: end;
}

.author-form-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--rose);
  font-size: 12px;
  font-weight: 700;
}

.schedule-form-message {
  color: var(--green);
}

.managed-author-control {
  display: grid;
  max-width: 368px;
  gap: 6px;
  margin-bottom: 16px;
}

.managed-author-control > label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.managed-author-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.managed-author-control select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.author-control-panel {
  display: grid;
  gap: 10px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.author-panel-head {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.author-panel-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.author-panel-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}


.author-discovery {
  position: relative;
  display: grid;
  gap: 6px;
}

.author-discovery-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 8px;
  align-items: end;
}

.author-suggestion-control,
.author-sort-control {
  display: grid;
  gap: 6px;
}

.author-suggestion-control > span,
.author-sort-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.author-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.author-search-field > svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--soft);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.author-form {
  display: grid;
  grid-template-columns: minmax(270px, 2.2fr) minmax(150px, 1fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

.author-form input,
.author-suggestion-control input,
.author-sort-control select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.author-suggestion-control input {
  padding-left: 38px;
  padding-right: 40px;
}

.author-search-field button {
  position: absolute;
  right: 5px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
}

.author-search-field button:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.author-search-field button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-form input:focus,
.author-suggestion-control input:focus,
.author-sort-control select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.author-suggestion-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  right: 198px;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.author-suggestion-option {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.author-suggestion-option:last-child {
  border-bottom: 0;
}

.author-suggestion-option:hover,
.author-suggestion-option:focus-visible,
.author-suggestion-option[aria-selected="true"] {
  background: var(--hover-bg);
  outline: none;
}

.author-suggestion-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--blue-ink);
}

.author-suggestion-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-suggestion-option strong,
.author-suggestion-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-suggestion-option strong {
  font-size: 13px;
}

.author-suggestion-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.author-suggestion-option em {
  color: var(--blue-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.author-suggestion-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.author-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.author-schedule {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-schedule-head,
.author-schedule-head > div,
.schedule-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.author-schedule-head {
  justify-content: space-between;
}

.author-schedule-head > div > svg {
  width: 18px;
  height: 18px;
  color: var(--blue-ink);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-schedule-head strong,
.author-schedule-head small {
  display: block;
}

.author-schedule-head strong {
  font-size: 13px;
}

.author-schedule-head small,
.author-schedule > p {
  color: var(--muted);
  font-size: 12px;
}

.author-schedule > p {
  margin: 0;
}

.schedule-toggle {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.author-schedule-fields {
  display: grid;
  grid-template-columns: minmax(200px, 1.35fr) minmax(155px, 0.75fr) minmax(105px, 0.5fr) minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.author-schedule-fields label {
  display: grid;
  gap: 5px;
}

.author-schedule-fields label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.author-schedule-fields select,
.author-schedule-fields input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.author-schedule-list {
  display: grid;
  gap: 6px;
}

.author-schedule-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 8px minmax(0, 1fr) 34px 34px;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.managed-author-select-row .icon-action {
  width: 38px;
  height: 38px;
}

.author-schedule-item.paused {
  opacity: 0.72;
}

.schedule-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.author-schedule-item.paused .schedule-status {
  background: var(--soft);
}

.author-schedule-item strong,
.author-schedule-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-schedule-item strong {
  font-size: 12px;
}

.author-schedule-item small,
.schedule-empty {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.author-schedule-item small {
  white-space: normal;
}

.schedule-empty {
  margin: 0;
  padding: 8px 0;
}

.icon-action {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-action:hover,
.icon-action:focus-visible {
  border-color: var(--blue);
  background: var(--hover-bg);
  color: var(--blue-ink);
  outline: none;
}

.icon-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-jobs-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-jobs-head,
.author-job-title,
.author-job-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.author-jobs-head strong {
  font-size: 13px;
}

.author-jobs-head span,
.author-job-meta,
.author-job-current {
  color: var(--muted);
  font-size: 12px;
}

.author-job-list {
  display: grid;
  gap: 7px;
}

.author-history-section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.author-history-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.author-history-head > div {
  display: grid;
  gap: 2px;
}

.author-history-head strong {
  font-size: 13px;
}

.author-history-head span,
.author-job-empty {
  color: var(--muted);
  font-size: 12px;
}

.author-job-empty {
  margin: 0;
  padding: 4px 0;
}

.author-settings-page-body[data-settings-mode="schedule"] .author-schedule,
.author-settings-page-body[data-settings-mode="history"] .author-jobs-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.author-settings-page-body[data-settings-mode="history"] .author-history-section {
  padding-top: 16px;
}

.author-job-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.author-job-card.historical {
  background: var(--panel-soft);
}

.author-job-card.complete {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
}

.author-job-card.error {
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
}

.author-job-summary {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.author-job-summary:hover,
.author-job-summary:focus-visible {
  background: var(--hover-bg);
  outline: none;
}

.author-job-summary:focus-visible {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.author-job-title > span:first-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.author-job-title strong,
.author-job-title small,
.author-job-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-job-title strong {
  font-size: 13px;
}

.author-job-title small {
  color: var(--muted);
  font-size: 11px;
}

.author-job-state {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  color: var(--blue-ink);
  font-size: 11px;
  font-weight: 650;
}

.author-job-state svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.author-job-card.expanded .author-job-state svg {
  transform: rotate(180deg);
}

.author-job-details {
  display: grid;
  gap: 9px;
  padding: 10px 11px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.author-job-details[hidden] {
  display: none;
}

.author-job-details .author-progress-steps {
  gap: 8px;
}

.author-job-details .author-progress-steps li {
  align-items: flex-start;
}

.author-job-details .author-progress-steps li > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.author-job-details .author-progress-steps strong,
.author-job-details .author-progress-steps small {
  display: block;
  overflow-wrap: anywhere;
}

.author-job-details .author-progress-steps strong {
  color: inherit;
  font-size: 12px;
}

.author-job-details .author-progress-steps small {
  color: var(--muted);
  font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.author-progress-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-progress-panel.complete {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
}

.author-progress-panel.error {
  border-color: color-mix(in srgb, var(--rose) 36%, var(--line));
}

.author-progress-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.author-progress-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.author-progress-head strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.25;
}

.author-progress-head small {
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
}

.author-progress-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--progress-bg);
}

.author-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 220ms ease;
}

.author-progress-message {
  color: var(--muted);
  font-size: 13px;
}

.author-progress-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-progress-steps li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.author-progress-steps li span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
}

.author-progress-steps li.running {
  color: var(--blue-ink);
  font-weight: 650;
}

.author-progress-steps li.running span {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.author-progress-steps li.done {
  color: var(--green);
}

.author-progress-steps li.done span {
  border-color: var(--green);
  background: var(--green);
}

.author-progress-steps li.error {
  color: var(--rose);
}

.author-progress-steps li.error span {
  border-color: var(--rose);
  background: var(--rose);
}

.reader-action:disabled,
.author-form input:disabled,
.author-suggestion-control input:disabled,
.author-sort-control select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-soft {
  border-color: var(--blue);
  color: var(--blue-ink);
  background: var(--hover-bg);
}

.danger-action {
  color: var(--rose);
}

.danger-action:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.author-card h3 {
  display: flex;
  gap: 8px;
  align-items: center;
}

.author-card {
  display: grid;
  min-height: 104px;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
}

.author-card-select {
  min-width: 0;
  min-height: 103px;
  padding: 14px 8px 14px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.author-card-select:focus-visible {
  outline: none;
  box-shadow: inset 4px 0 0 var(--blue);
}

.author-card-select .card-meta {
  display: block;
}

.author-card-remove {
  width: 30px;
  height: 30px;
  margin: 10px 10px 0 0;
  border-color: transparent;
  opacity: 0.72;
  transition: opacity 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.author-card:hover .author-card-remove,
.author-card-remove:focus-visible {
  opacity: 1;
}

.author-card-remove:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.author-card-remove.confirming {
  border-color: var(--danger);
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  opacity: 1;
}

.author-card h3 > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-loading-indicator {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: auto;
  place-items: center;
  border-radius: 6px;
  color: var(--blue-ink);
  background: var(--hover-bg);
}

.author-loading-indicator svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  animation: author-loading-spin 850ms linear infinite;
}

.author-card.scanning {
  background: var(--hover-bg);
}

@keyframes author-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.author-video-list {
  display: grid;
  gap: 8px;
  padding: 14px 0 24px;
}

.author-video-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-video-card img,
.author-video-thumb {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: var(--video-bg);
  object-fit: cover;
}

.author-video-thumb {
  display: grid;
  place-items: center;
  color: var(--soft);
}

.author-video-thumb svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.author-video-card h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.author-video-card p,
.muted-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-list {
  gap: 6px;
}

.queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.queue-row span,
.queue-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row small {
  color: var(--soft);
}

.draft-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.draft-open {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.draft-open:hover span,
.draft-open:focus-visible span {
  color: var(--blue-ink);
}

.draft-open:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.queue-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.queue-copy > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.queue-row .queue-reason,
.draft-open .draft-reason {
  display: block;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}

.draft-open .draft-path {
  color: var(--soft);
  font-size: 11px;
}

.queue-status {
  display: inline-flex;
  min-height: 27px;
  gap: 6px;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.queue-status svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.queue-status-published,
.queue-status-validated {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--green) 8%, transparent);
  color: var(--green);
}

.queue-status-revision {
  border-color: color-mix(in srgb, var(--amber) 42%, var(--line));
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  color: var(--amber);
}

.queue-status-blocked {
  border-color: color-mix(in srgb, var(--rose) 42%, var(--line));
  background: color-mix(in srgb, var(--rose) 7%, transparent);
  color: var(--rose);
}

.queue-status-draft {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, transparent);
  color: var(--blue-ink);
}

.queue-status-waiting {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, transparent);
  color: var(--blue-ink);
}

.draft-preview-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.draft-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.draft-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.draft-preview h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.draft-preview small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 12px;
}

.draft-preview pre {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--toast-bg);
  color: var(--toast-text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(300px, 380px) minmax(460px, 1fr);
  }

  .validation-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .validation-rule {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .library-proof,
  .validation-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-proof div:nth-child(2) {
    border-right: 0;
  }

  .library-proof div:nth-child(-n + 2) {
    padding-bottom: 12px;
  }

  .library-proof div:nth-child(n + 3) {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .library-proof div:nth-child(3) {
    padding-left: 0;
  }

  .validation-flow::before {
    display: none;
  }

  .media-grid {
    grid-template-columns: minmax(200px, 300px) minmax(280px, 1fr);
  }

  .single-media-grid {
    grid-template-columns: minmax(260px, 700px);
  }

  .single-media-grid.has-short-youtube {
    grid-template-columns: minmax(210px, 340px);
  }

  .media-grid.has-short-youtube:not(.single-media-grid) {
    grid-template-columns: repeat(2, minmax(200px, 300px));
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search-shell {
    grid-column: 1 / -1;
    order: 3;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .views-strip {
    padding-right: 16px;
    padding-left: 16px;
  }

  .workspace {
    grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr);
  }

  .reader-pane {
    min-height: 70vh;
    max-height: none;
  }

  .media-grid {
    grid-template-columns: minmax(220px, 320px) minmax(300px, 1fr);
  }

  .single-media-grid {
    grid-template-columns: minmax(260px, 680px);
  }

  .single-media-grid.has-short-youtube {
    grid-template-columns: minmax(210px, 340px);
  }

  .media-grid.has-short-youtube:not(.single-media-grid) {
    grid-template-columns: repeat(2, minmax(210px, 320px));
  }

  .reader-head {
    top: 0;
  }

  .source-tier {
    grid-template-columns: 38px minmax(0, 1fr) 56px;
  }

  .source-tier > span {
    grid-column: 2 / -1;
  }

  .site-usage-flow {
    grid-template-columns: 1fr;
  }

  .site-usage-step {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-usage-step:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .example-grid {
    grid-template-columns: 1fr;
  }

  html,
  body {
    height: auto;
    overflow: auto;
  }

  .app-frame {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .topbar {
    padding: 14px;
  }

  .filter-panel {
    position: fixed;
    top: 116px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100vh - 132px);
    overflow: auto;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .filter-panel .subject-control,
  .filter-panel .relevance-control {
    grid-column: span 1;
  }

  .filter-panel .date-control {
    grid-column: 1 / -1;
  }

  .filter-panel-actions {
    position: sticky;
    bottom: 0;
  }

  .brand h1 {
    font-size: 18px;
  }

  .stats-strip {
    display: block;
  }

  .workspace {
    display: flex;
    flex-direction: column;
  }

  .reader-pane.home-reader {
    order: -1;
  }

  .stat {
    min-height: 64px;
  }

  .sidebar,
  .list-pane,
  .reader-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-head {
    position: static;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    padding: 24px 16px 16px;
  }

  .reader-title-row {
    display: grid;
  }

  .review-toolbar {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .version-switch,
  .agent-score-list {
    grid-column: 1 / -1;
  }

  .version-switch {
    width: 100%;
  }

  .version-switch button {
    flex: 1;
  }

  .agent-score-list {
    justify-content: space-between;
  }

  .agent-score-list span {
    flex: 1;
    justify-content: center;
  }

  .video-lab-head,
  .media-grid {
    display: grid;
  }

  .verification-grid {
    grid-template-columns: 1fr;
  }

  .home-head {
    min-height: 0;
  }

  .validation-intro h3 {
    font-size: 28px;
  }

  .validation-rule,
  .validation-flow {
    grid-template-columns: 1fr;
  }

  .source-tier {
    grid-template-columns: 34px minmax(0, 1fr) 52px;
  }

  .score-track {
    display: none;
  }

  .score-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .score-point {
    padding: 10px;
    border-left: 4px solid #8e8e93;
    background: var(--panel-alt);
  }

  .score-point:nth-child(2) {
    border-left-color: #d79a16;
  }

  .score-point:nth-child(3) {
    border-left-color: #4b86d8;
  }

  .score-point:nth-child(4) {
    border-left-color: #2f8f55;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .author-video-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .author-form {
    grid-template-columns: 1fr;
  }

  .author-add-submit {
    grid-column: auto;
    justify-self: stretch;
  }

  .published-fiche-modal {
    padding: 0;
  }

  .published-fiche-window {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .published-fiche-window-head {
    padding-right: 14px;
    padding-left: 14px;
  }

  .published-fiche-window-head h2 {
    font-size: 16px;
  }

  .managed-author-control {
    max-width: none;
  }

  .author-schedule-fields {
    grid-template-columns: 1fr 1fr;
  }

  .author-discovery-toolbar {
    grid-template-columns: 1fr;
  }

  .author-suggestion-list {
    right: 0;
  }

  .author-panel-head {
    display: grid;
    gap: 4px;
    align-items: start;
  }

  .author-panel-head span {
    white-space: normal;
  }


  .author-video-card img,
  .author-video-thumb {
    width: 92px;
  }

  .youtube-search .media-actions {
    align-items: stretch;
  }

  .tiktok-frame {
    max-height: 560px;
  }

  .reader-body,
  .reader-head {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .search-field input {
    font-size: 14px;
  }

  .filter-panel {
    top: 106px;
    right: 10px;
    left: 10px;
    max-height: calc(100vh - 118px);
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-panel .date-control {
    grid-column: 1 / -1;
  }

  .filter-panel-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .author-schedule-fields {
    grid-template-columns: 1fr;
  }

  .author-job-title {
    align-items: flex-start;
  }

  .author-job-current {
    white-space: normal;
  }

  .apply-filters-button {
    min-width: 0;
  }

  .settings-menu {
    position: fixed;
    top: 62px;
    right: 12px;
    width: min(250px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .author-loading-indicator svg {
    animation: none;
  }
}

/* Accueil visuel */
.reader-pane {
  container-type: inline-size;
}

.home-page {
  max-width: 1180px;
  padding-top: 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 40px;
  align-items: center;
  min-height: 430px;
  padding: 34px 0 30px;
  border-bottom: 1px solid var(--line);
}

.home-hero-copy {
  min-width: 0;
}

.home-kicker {
  margin: 0 0 10px;
  color: var(--blue-ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero h2 {
  max-width: 680px;
  margin: 0;
  color: var(--text);
  font-size: 46px;
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: 0;
}

.home-hero h2 span {
  color: var(--blue-ink);
}

.home-lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.home-equation {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 600px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.home-equation-item {
  display: grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  gap: 0 9px;
  align-items: center;
  min-width: 0;
}

.home-equation-icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--blue-ink);
}

.home-equation-icon svg,
.home-visual figcaption svg,
.home-method-step svg,
.source-rank svg,
.home-trust-note svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-equation-item > strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.home-equation-item > strong svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.home-equation-item small {
  color: var(--soft);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.home-equation-item.verified .home-equation-icon {
  color: var(--green);
}

.home-equation-symbol {
  color: var(--line-strong);
  font-size: 22px;
  font-weight: 400;
}

.home-visual {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 360px;
  margin: 0;
  place-items: center;
}

.home-visual img {
  display: block;
  width: min(100%, 560px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.12));
}

:root[data-theme="dark"] .home-visual img {
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.28));
}

.home-visual figcaption {
  position: absolute;
  right: 8px;
  bottom: 18px;
  display: flex;
  gap: 9px;
  align-items: center;
  max-width: calc(100% - 16px);
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control-bg);
  color: var(--green);
  backdrop-filter: blur(14px);
}

.home-visual figcaption span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.home-visual figcaption strong {
  color: var(--text);
}

.library-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.library-proof div {
  min-width: 0;
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.library-proof div:first-child {
  padding-left: 0;
}

.library-proof div:last-child {
  padding-right: 0;
  border-right: 0;
}

.library-proof strong,
.library-proof span {
  display: block;
}

.library-proof strong {
  color: var(--text);
  font-size: 27px;
  line-height: 1.05;
}

.library-proof span {
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.35;
}

.home-method {
  padding: 42px 0 46px;
  border-bottom: 1px solid var(--line);
}

.home-section-heading {
  max-width: 600px;
  margin-bottom: 28px;
}

.home-section-heading h3,
.home-insight-grid h3 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: 0;
}

.home-method-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.home-method-step {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  min-width: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.home-method-step > span {
  position: absolute;
  top: -9px;
  left: 0;
  padding-right: 8px;
  background: var(--panel);
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

.home-method-step > div {
  display: grid;
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--blue-ink);
}

.home-method-step strong {
  align-self: end;
  color: var(--text);
  font-size: 15px;
}

.home-method-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.home-insight-grid > article {
  min-width: 0;
  padding: 42px 36px 42px 0;
}

.home-insight-grid > article + article {
  padding-right: 0;
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.source-rank-list {
  display: grid;
  margin-top: 22px;
}

.source-rank {
  display: grid;
  grid-template-columns: 28px minmax(110px, 0.75fr) minmax(130px, 1fr) 46px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.source-rank > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--blue-ink);
}

.source-rank > span svg {
  width: 17px;
  height: 17px;
}

.source-rank strong {
  color: var(--text);
  font-size: 13px;
}

.source-rank small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.source-rank i {
  display: flex;
  gap: 3px;
  align-items: end;
  justify-content: flex-end;
  min-width: 42px;
  height: 20px;
  font-style: normal;
}

.source-rank b {
  display: block;
  width: 7px;
  height: 100%;
  border-radius: 2px;
  background: var(--blue);
}

.source-rank:nth-child(2) b {
  height: 66%;
}

.source-rank:nth-child(3) b {
  height: 34%;
  background: var(--amber);
}

.home-score-guide .score-visual {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.home-score-guide .score-track,
.home-score-guide .score-labels {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.85fr 0.8fr;
  gap: 5px;
}

.home-score-guide .score-track span {
  height: 10px;
  border-radius: 2px;
}

.home-score-guide .score-labels div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-score-guide .score-labels strong {
  color: var(--text);
  font-size: 13px;
}

.home-score-guide .score-labels span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.score-explainer {
  max-width: 480px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.home-trust-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 26px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-trust-note > div {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: var(--caution-bg);
  color: var(--amber);
}

.home-trust-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.home-trust-note strong {
  color: var(--text);
}

@container (max-width: 780px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 32px;
  }

  .home-hero h2 {
    font-size: 40px;
  }

  .home-visual {
    min-height: 290px;
  }

  .home-visual img {
    width: min(100%, 500px);
  }

  .home-method-flow,
  .home-insight-grid {
    grid-template-columns: 1fr;
  }

  .home-method-step {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .home-method-step > div {
    width: 38px;
    height: 38px;
  }

  .home-insight-grid > article {
    padding: 36px 0;
  }

  .home-insight-grid > article + article {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@container (max-width: 520px) {
  .home-hero {
    min-height: 0;
    padding-top: 26px;
  }

  .home-hero h2 {
    font-size: 34px;
  }

  .home-lede {
    font-size: 15px;
  }

  .home-equation {
    gap: 8px;
    justify-content: space-between;
  }

  .home-equation-item {
    grid-template-columns: 26px auto;
    gap: 0 5px;
  }

  .home-equation-icon {
    width: 26px;
    height: 30px;
  }

  .home-equation-symbol {
    font-size: 17px;
  }

  .home-visual {
    min-height: 230px;
  }

  .home-visual figcaption {
    right: 0;
    bottom: 4px;
  }

  .library-proof div {
    padding: 0 10px;
  }

  .library-proof strong {
    font-size: 22px;
  }

  .home-method-flow {
    gap: 26px;
  }

  .source-rank {
    grid-template-columns: 26px minmax(100px, 0.8fr) minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .home-score-guide .score-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }
}

/* Accueil - parcours des trois agents */
.process-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 56px;
  align-items: end;
  padding: 46px 0 40px;
  border-bottom: 1px solid var(--line);
}

.process-intro-title h2 {
  max-width: 700px;
  margin: 0;
  color: var(--text);
  font-size: 44px;
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: 0;
}

.process-intro-title h2 span {
  color: var(--blue-ink);
}

.process-principle {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--line-strong);
}

.process-principle > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.process-principle > div > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--blue-ink);
}

.process-principle svg,
.agent-station svg,
.proof-gate svg,
.decision-map svg,
.source-foundation svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.process-principle p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.process-principle strong {
  color: var(--text);
}

.author-schedule-fields .schedule-add-button {
  width: 38px;
  height: 38px;
}

.agent-map {
  padding: 38px 0 44px;
  border-bottom: 1px solid var(--line);
}

.agent-map-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
}

.agent-map-head h3,
.source-foundation h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 730;
  line-height: 1.24;
  letter-spacing: 0;
}

.agent-map-head > p {
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid var(--blue);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.agent-map-head > p strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.agent-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: stretch;
}

.agent-station {
  --agent-color: var(--blue);
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  min-width: 0;
  min-height: 318px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-live-activity {
  display: grid;
  gap: 9px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.author-live-activity-head {
  display: flex;
  gap: 9px;
  align-items: center;
}

.author-live-activity-head > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--blue-ink);
}

.author-live-activity-head svg {
  width: 15px;
  height: 15px;
}

.author-live-activity.active .author-live-activity-head svg,
.author-action-running svg {
  animation: author-loading-spin 0.9s linear infinite;
}

.author-live-activity-head > div {
  display: grid;
  gap: 2px;
}

.author-live-activity-head strong {
  font-size: 13px;
}

.author-video-table-wrap {
  container-type: inline-size;
  margin: 14px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.author-video-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.author-video-table .video-col {
  width: 27%;
}

.author-video-table .status-col {
  width: 13%;
}

.author-video-table .score-col {
  width: 10%;
}

.author-video-table .reason-col {
  width: 29%;
}

.author-video-table .action-col {
  width: 21%;
}

.author-video-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--soft);
  font-size: 10px;
  font-weight: 760;
  text-align: left;
  text-transform: uppercase;
}

.author-video-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.author-video-table tr:last-child td {
  border-bottom: 0;
}

.video-table-identity {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.video-table-identity img,
.video-table-identity .author-video-thumb {
  width: 72px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.video-table-identity a,
.video-table-identity strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.video-table-identity a:hover,
.video-table-identity a:focus-visible {
  color: var(--blue-ink);
}

.video-table-identity small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 10px;
}

.video-table-reason {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.video-table-score {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
}

.video-table-score.score-strong {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green);
}

.video-table-score.score-partial {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
  color: var(--amber);
}

.video-table-score.score-weak {
  border-color: color-mix(in srgb, var(--rose) 38%, var(--line));
  color: var(--rose);
}

.video-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.video-table-actions .reader-action {
  min-width: 0;
}

.video-table-no-action {
  color: var(--soft);
  font-size: 11px;
}

@container (max-width: 720px) {
  .author-video-table,
  .author-video-table tbody,
  .author-video-table tr,
  .author-video-table td {
    display: block;
    width: 100%;
  }

  .author-video-table colgroup,
  .author-video-table thead {
    display: none;
  }

  .author-video-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px 12px;
    padding: 11px;
    border-bottom: 1px solid var(--line);
  }

  .author-video-table tr:last-child {
    border-bottom: 0;
  }

  .author-video-table td {
    padding: 0;
    border: 0;
  }

  .author-video-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .author-video-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .author-video-table td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .author-video-table td:nth-child(4),
  .author-video-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .video-table-identity {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .video-table-identity img,
  .video-table-identity .author-video-thumb {
    width: 88px;
  }

  .video-table-identity a,
  .video-table-identity strong {
    font-size: 13px;
  }

  .video-table-reason {
    padding-top: 8px !important;
  }
}

@container (max-width: 430px) {
  .author-video-table tr {
    grid-template-columns: 1fr;
  }

  .author-video-table td:nth-child(1),
  .author-video-table td:nth-child(2),
  .author-video-table td:nth-child(3),
  .author-video-table td:nth-child(4),
  .author-video-table td:nth-child(5) {
    grid-column: 1;
    grid-row: auto;
  }
}

.author-live-activity-head small {
  color: var(--muted);
  font-size: 12px;
}

.author-live-activity .author-job-card.historical {
  background: var(--panel-alt);
}

.author-action-running {
  min-width: 126px;
}

.author-bulk-publish {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.author-bulk-publish > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.author-bulk-publish .eyebrow,
.author-bulk-publish h3,
.author-bulk-publish p {
  margin: 0;
}

.author-bulk-publish h3 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.author-bulk-publish p {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.author-bulk-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.author-bulk-summary span {
  padding: 0 8px;
  border-left: 1px solid var(--line-strong);
}

.author-bulk-summary span:first-child {
  padding-left: 0;
  border-left: 0;
}

.author-bulk-summary .summary-published,
.author-bulk-summary .summary-validated {
  color: var(--green);
}

.author-bulk-summary .summary-revision {
  color: var(--amber);
}

.author-bulk-summary .summary-waiting {
  color: var(--blue-ink);
}

.author-bulk-summary .summary-blocked {
  color: var(--rose);
}

.author-bulk-publish small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.author-bulk-publish-button {
  flex: 0 0 auto;
  min-height: 40px;
  white-space: nowrap;
}

.author-bulk-publish.running {
  border-bottom-color: color-mix(in srgb, var(--blue) 45%, var(--line));
}

@media (max-width: 720px) {
  .author-bulk-publish {
    align-items: stretch;
    flex-direction: column;
  }

  .author-bulk-publish-button {
    width: 100%;
    white-space: normal;
  }

  .queue-row,
  .draft-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .draft-actions {
    justify-content: flex-start;
  }

  .draft-preview-status {
    align-items: flex-start;
    flex-direction: column;
  }
}

.agent-station::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--agent-color);
  content: "";
}

.agent-concept {
  --agent-color: var(--blue);
}

.agent-examples {
  --agent-color: var(--amber);
}

.agent-verification {
  --agent-color: var(--green);
}

.agent-station > header {
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.agent-number {
  align-self: start;
  color: var(--agent-color);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.agent-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--agent-color);
}

.agent-station header div {
  min-width: 0;
}

.agent-station header small,
.decision-hub small {
  display: block;
  margin-bottom: 3px;
  color: var(--agent-color);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  text-transform: uppercase;
}

.agent-station h4,
.decision-hub h4 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: 0;
}

.agent-input {
  display: grid;
  grid-template-columns: 24px minmax(42px, auto) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--agent-color);
}

.agent-input svg {
  width: 16px;
  height: 16px;
}

.agent-input span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-input strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.agent-checks {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-checks li {
  position: relative;
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agent-checks li::before {
  position: absolute;
  top: 6px;
  left: 1px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--agent-color);
  border-radius: 50%;
  content: "";
}

.agent-station > footer {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.agent-station > footer span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-station > footer strong {
  min-width: 0;
  color: var(--agent-color);
  font-size: 12px;
  line-height: 1.3;
}

.agent-connector {
  position: relative;
  display: grid;
  place-items: center;
}

.agent-connector::before {
  width: 22px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.agent-connector::after {
  position: absolute;
  right: 7px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--soft);
  border-right: 1px solid var(--soft);
  transform: rotate(45deg);
  content: "";
}

.proof-gate {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(130px, 0.75fr));
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.proof-gate-title,
.proof-measure {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.proof-gate > :first-child {
  padding-left: 0;
}

.proof-gate > :last-child {
  padding-right: 0;
  border-right: 0;
}

.proof-gate-title {
  color: var(--green);
}

.proof-gate-title > span,
.proof-measure > span {
  display: grid;
  min-width: 0;
}

.proof-gate-title small {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.proof-gate-title strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.proof-measure strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.proof-measure span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.decision-map {
  display: grid;
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 2fr);
  gap: 30px;
  align-items: stretch;
  margin-top: 32px;
}

.decision-hub {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding-right: 30px;
  border-right: 1px solid var(--line-strong);
}

.decision-hub > span {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--blue-ink);
}

.decision-hub small {
  color: var(--blue-ink);
}

.decision-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.decision-result {
  --decision-color: var(--green);
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--decision-color);
  border-radius: 7px;
  background: var(--panel-alt);
}

.decision-result > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--decision-color);
}

.decision-result strong {
  color: var(--text);
  font-size: 13px;
}

.decision-result p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.decision-result > small {
  grid-column: 1 / -1;
  color: var(--amber);
  font-size: 9px;
  font-weight: 760;
  text-align: right;
  text-transform: uppercase;
}

.decision-research {
  --decision-color: var(--amber);
}

.decision-blocked {
  --decision-color: var(--rose);
}

.source-foundation {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 2fr);
  gap: 38px;
  align-items: start;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.source-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.source-level {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 14px 14px 0 0;
  color: var(--blue-ink);
}

.source-level + .source-level {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.source-level > svg {
  margin-top: 2px;
}

.source-level > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.source-level strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.source-level small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.source-independent {
  color: var(--green);
}

.source-start {
  color: var(--amber);
}

@container (max-width: 900px) {
  .process-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .process-principle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-principle > div {
    align-content: start;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding-right: 14px;
  }

  .process-principle > div + div {
    padding-left: 14px;
  }

  .process-principle > div:last-child {
    border-right: 0;
  }

  .agent-map-head,
  .source-foundation {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .agent-map-head > p {
    max-width: 620px;
  }

  .agent-flow {
    grid-template-columns: 1fr;
  }

  .agent-station {
    min-height: 0;
  }

  .agent-connector {
    height: 38px;
  }

  .agent-connector::before {
    width: 1px;
    height: 22px;
  }

  .agent-connector::after {
    right: auto;
    bottom: 7px;
    transform: rotate(135deg);
  }

  .proof-gate {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .proof-gate-title {
    grid-column: 1 / -1;
    padding-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-gate > .proof-measure:first-of-type {
    padding-left: 0;
  }

  .decision-map {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .decision-hub {
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .source-foundation {
    gap: 24px;
  }
}

@container (max-width: 600px) {
  .process-intro {
    padding: 32px 0 30px;
  }

  .process-intro-title h2 {
    font-size: 34px;
  }

  .process-principle {
    grid-template-columns: 1fr;
  }

  .process-principle > div,
  .process-principle > div + div {
    padding: 11px 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .agent-map {
    padding-top: 32px;
  }

  .agent-map-head {
    margin-bottom: 22px;
  }

  .agent-map-head > p {
    padding-left: 12px;
  }

  .proof-gate {
    grid-template-columns: 1fr;
  }

  .proof-gate-title {
    grid-column: auto;
  }

  .proof-measure,
  .proof-gate > .proof-measure:first-of-type {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-gate > :last-child {
    border-bottom: 0;
  }

  .decision-branches,
  .source-levels {
    grid-template-columns: 1fr;
  }

  .source-level,
  .source-level + .source-level {
    padding: 13px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .source-level:last-child {
    border-bottom: 0;
  }
}

/* Shared graphite layout: themes change the palette, never the content. */
.topbar {
  min-height: 64px;
  grid-template-columns: minmax(210px, 300px) minmax(340px, 720px) minmax(140px, 1fr);
  padding: 10px 22px;
  box-shadow: 0 12px 36px color-mix(in srgb, var(--text) 8%, transparent);
}

@media (max-width: 980px) {
  .search-stack {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (max-width: 920px) {
  .search-stack {
    grid-column: auto;
    order: initial;
  }
}

@media (max-width: 720px) {
  .search-stack {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
  }
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.brand-kicker {
  display: none;
}

.brand h1,
.brand-title {
  font-size: 16px;
  font-weight: 760;
}

.search-shell {
  min-height: 42px;
  border-radius: 7px;
}

.icon-button,
.author-settings-launch,
.filter-launch-button {
  border-radius: 7px;
}

.workspace {
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
}

.list-pane {
  border-right: 1px solid var(--line);
  background: var(--panel-alt);
}

.pane-toolbar,
.list-toolbar {
  min-height: 63px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.pane-toolbar h2,
.list-toolbar strong {
  font-size: 15px;
}

.pane-toolbar select,
.list-toolbar select,
select,
input,
textarea {
  border-radius: 6px;
}

.fiche-card {
  position: relative;
  min-height: 92px;
  padding: 17px 20px 15px 24px;
  background: transparent;
}

.fiche-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: transparent;
  content: "";
}

.fiche-card:hover {
  background: color-mix(in srgb, var(--text) 3%, transparent);
}

.fiche-card.active,
.fiche-card:focus-visible {
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
}

.fiche-card.active::before,
.fiche-card:focus-visible::before {
  background: var(--blue);
}

.fiche-card h3 {
  font-size: 14px;
  line-height: 1.32;
}

.fiche-card:not(.author-card) > p {
  display: none;
}

.fiche-card .meta-line,
.fiche-card .card-meta {
  margin-top: 9px;
  font-size: 10px;
}

.reader-pane {
  background: var(--panel);
}

.reader-head {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 28px 42px 0;
  border-bottom: 1px solid var(--line);
  background: var(--reader-head-bg);
}

.reader-title-row {
  align-items: flex-start;
}

.reader-title-row > div {
  width: 100%;
  min-width: 0;
}

.reader-head .eyebrow,
.reader-eyebrow {
  color: var(--soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.reader-title {
  max-width: 980px;
  margin-top: 7px;
  font-size: 37px;
  font-weight: 740;
  line-height: 1.08;
}

.reader-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-top: 13px;
}

.reader-meta,
.reader-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.reader-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
}

.newness-filter {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 30px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.newness-filter svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.newness-filter strong {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--soft);
  font-size: 10px;
}

.newness-filter:hover,
.newness-filter.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, var(--panel));
  color: var(--blue-ink);
}

.newness-filter.active strong {
  background: var(--blue);
  color: #fff;
}

.newness-filter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.reader-status-badge svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.reader-status-badge span {
  color: currentColor;
  opacity: 0.82;
}

.reader-status-badge.status-validated {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--panel));
  color: var(--green);
}

.reader-status-badge.status-needs_review {
  border-color: color-mix(in srgb, var(--amber) 48%, var(--line));
  background: color-mix(in srgb, var(--amber) 9%, var(--panel));
  color: var(--amber);
}

.reader-status-badge.status-low_confidence {
  border-color: color-mix(in srgb, var(--rose) 48%, var(--line));
  background: color-mix(in srgb, var(--rose) 9%, var(--panel));
  color: var(--rose);
}

.tech-summary {
  margin-top: 14px;
  gap: 7px;
}

.tech-summary-item {
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 5px;
}

.tech-summary-item dt {
  font-size: 8px;
}

.tech-summary-item dd {
  font-size: 10px;
}

.reader-tabs {
  display: flex;
  align-items: end;
  gap: 25px;
  min-height: 48px;
  margin-top: 17px;
  overflow-x: auto;
  scrollbar-width: none;
}

.reader-tabs::-webkit-scrollbar {
  display: none;
}

.reader-tab {
  position: relative;
  min-width: max-content;
  min-height: 48px;
  padding: 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
  font-weight: 670;
}

.reader-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.reader-tab:hover {
  color: var(--text);
}

.reader-tab[aria-selected="true"] {
  color: var(--text);
}

.reader-tab[aria-selected="true"]::after {
  background: var(--blue);
}

.reader-tab:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: -5px;
}

.reader-body {
  padding: 0;
}

.reader-tab-body {
  width: min(100%, 1280px);
  max-width: none;
  margin: 0;
  padding: 30px 42px 70px;
}

.reader-overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.reader-overview-grid.no-video {
  grid-template-columns: minmax(0, 860px);
}

.reader-overview-media,
.reader-overview-copy {
  min-width: 0;
}

.video-lab {
  padding: 0;
  border: 0;
  background: transparent;
}

.video-lab-head {
  margin-bottom: 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.video-lab-head h3 {
  color: var(--blue-ink);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.08em;
}

.reader-overview-media .media-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.reader-overview-media .media-block,
.media-block {
  overflow: hidden;
  border-radius: 7px;
}

.reader-overview-media .media-block.tiktok-card {
  max-width: 360px;
  justify-self: start;
}

.note-section {
  margin: 0;
  padding: 0 0 26px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.note-section + .note-section {
  margin-top: 28px;
}

.note-section h3,
.section-title {
  margin-bottom: 13px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

.note-section p,
.note-section li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

.reader-overview-copy > .note-section:first-child {
  padding-bottom: 30px;
}

.reader-overview-copy > .note-section:first-child p {
  color: var(--text);
  font-size: 17px;
  line-height: 1.72;
}

.example-grid,
.resource-grid {
  gap: 14px;
}

.example-card,
.resource-card,
.proof-card,
.review-toolbar,
.reader-tab-empty {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-alt);
}

.reader-tab-empty {
  padding: 20px;
}

.example-card {
  padding: 20px;
}

.verification-card,
.verification-card.strong,
.verification-card.caution {
  border-radius: 7px;
}

.filter-popover,
.settings-inline-shell,
.author-control-panel,
.author-video-table-wrap,
.modal-panel {
  border-radius: 7px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  }

  .reader-head,
  .reader-tab-body {
    padding-right: 30px;
    padding-left: 30px;
  }

  .reader-title {
    font-size: 32px;
  }

  .reader-overview-grid {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 30px;
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: minmax(170px, 220px) minmax(260px, 1fr) auto;
  }

  .search-shell {
    grid-column: auto;
    order: initial;
  }

  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .reader-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reader-overview-media .media-block,
  .reader-overview-media .media-block.tiktok-card {
    width: min(100%, 480px);
    max-width: 480px;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 8px 12px;
  }

  .brand h1,
  .brand-title {
    font-size: 14px;
  }

  .search-shell {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .list-pane {
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reader-head,
  .reader-tab-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .reader-head {
    padding-top: 21px;
  }

  .reader-title {
    font-size: 27px;
  }

  .reader-tabs {
    gap: 20px;
  }

  .reader-tab-body {
    padding-top: 22px;
  }

  .reader-overview-copy > .note-section:first-child p {
    font-size: 15px;
  }

  .example-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* DATACHECK graphite interface ------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030405;
  --panel: #080b0d;
  --panel-strong: #0d1113;
  --panel-soft: #101416;
  --panel-hover: #151a1d;
  --text: #f4f6f5;
  --muted: #929a9d;
  --muted-strong: #b7bec0;
  --line: #252b2e;
  --line-strong: #353d40;
  --blue: #43d7f3;
  --blue-ink: #69e2f4;
  --blue-soft: rgba(67, 215, 243, 0.1);
  --green: #65d57c;
  --green-soft: rgba(101, 213, 124, 0.1);
  --amber: #efbd60;
  --amber-soft: rgba(239, 189, 96, 0.1);
  --rose: #ef747f;
  --rose-soft: rgba(239, 116, 127, 0.1);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(116deg, #020303 0%, #090d0f 42%, #040506 72%, #0a0c0d 100%);
  color: var(--text);
}

:root[data-theme="dark"] .app-frame {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.015), transparent 24%),
    linear-gradient(145deg, #050708 0%, #0a0d0f 46%, #050607 100%);
}

:root[data-theme="dark"] .topbar {
  min-height: 64px;
  grid-template-columns: minmax(210px, 300px) minmax(340px, 720px) minmax(140px, 1fr);
  padding: 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(105deg, rgba(7, 9, 10, 0.96), rgba(12, 16, 18, 0.9) 52%, rgba(5, 7, 8, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .brand {
  gap: 10px;
}

:root[data-theme="dark"] .brand-mark {
  width: 28px;
  height: 28px;
  color: #f3f6f5;
  filter: drop-shadow(0 0 12px rgba(67, 215, 243, 0.12));
}

:root[data-theme="dark"] .brand-kicker {
  display: none;
}

:root[data-theme="dark"] .brand-title {
  color: #f7f8f7;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0;
}

:root[data-theme="dark"] .search-shell {
  min-height: 42px;
  border: 1px solid #30383b;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(25, 30, 32, 0.74), rgba(11, 14, 16, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 26px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .search-shell:focus-within {
  border-color: rgba(67, 215, 243, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(67, 215, 243, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .search-shell input {
  color: var(--text);
}

:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .author-settings-launch,
:root[data-theme="dark"] .filter-launch-button {
  border-color: #2d3437;
  border-radius: 7px;
  background: linear-gradient(180deg, #111619, #090c0e);
  color: #b7c0c2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .icon-button:hover,
:root[data-theme="dark"] .author-settings-launch:hover,
:root[data-theme="dark"] .filter-launch-button:hover {
  border-color: #4a565a;
  background: linear-gradient(180deg, #172024, #0b0f11);
  color: #f4f7f6;
}

:root[data-theme="dark"] .workspace {
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  background: transparent;
}

:root[data-theme="dark"] .list-pane {
  border-right: 1px solid #252b2e;
  background:
    linear-gradient(155deg, rgba(15, 19, 21, 0.96), rgba(6, 8, 9, 0.98) 68%);
}

:root[data-theme="dark"] .list-toolbar {
  min-height: 63px;
  padding: 11px 18px;
  border-bottom: 1px solid #252b2e;
  background: rgba(7, 9, 10, 0.56);
}

:root[data-theme="dark"] .list-toolbar strong {
  color: #edf1ef;
  font-size: 15px;
}

:root[data-theme="dark"] .list-toolbar select,
:root[data-theme="dark"] select,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea {
  border-color: #30383b;
  border-radius: 6px;
  background: linear-gradient(180deg, #111518, #090c0e);
  color: #eef2f0;
}

:root[data-theme="dark"] .fiche-list {
  scrollbar-color: #30383b transparent;
}

:root[data-theme="dark"] .fiche-card {
  position: relative;
  min-height: 92px;
  padding: 17px 20px 15px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: transparent;
}

:root[data-theme="dark"] .fiche-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: transparent;
}

:root[data-theme="dark"] .fiche-card:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006));
}

:root[data-theme="dark"] .fiche-card.active {
  background:
    linear-gradient(100deg, rgba(67, 215, 243, 0.105), rgba(255, 255, 255, 0.025) 58%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .fiche-card.active::before {
  background: linear-gradient(180deg, #7ceaf7, #2fbfd7);
  box-shadow: 0 0 14px rgba(67, 215, 243, 0.4);
}

:root[data-theme="dark"] .fiche-card h3 {
  color: #f2f5f4;
  font-size: 14px;
  line-height: 1.32;
}

:root[data-theme="dark"] .fiche-card:not(.author-card) > p {
  display: none;
}

:root[data-theme="dark"] .fiche-card .meta-line,
:root[data-theme="dark"] .fiche-card .card-meta {
  margin-top: 9px;
  color: #828b8e;
  font-size: 10px;
}

:root[data-theme="dark"] .reader-pane {
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.018), transparent 34%),
    linear-gradient(148deg, #090c0e 0%, #0d1113 46%, #060809 100%);
  scrollbar-color: #343c3f transparent;
}

:root[data-theme="dark"] .reader-head {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 28px 42px 0;
  border-bottom: 1px solid #272e31;
  background:
    linear-gradient(180deg, rgba(11, 14, 16, 0.98), rgba(9, 12, 14, 0.95));
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .reader-title-row {
  align-items: flex-start;
}

:root[data-theme="dark"] .reader-title-row > div {
  width: 100%;
  min-width: 0;
}

:root[data-theme="dark"] .reader-eyebrow {
  color: #7f888b;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

:root[data-theme="dark"] .reader-title {
  max-width: 980px;
  margin-top: 7px;
  color: #f7f8f7;
  font-size: 37px;
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: 0;
}

:root[data-theme="dark"] .reader-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-top: 13px;
}

:root[data-theme="dark"] .reader-subtitle {
  margin: 0;
  color: #8f989b;
  font-size: 12px;
}

:root[data-theme="dark"] .reader-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
}

:root[data-theme="dark"] .reader-status-badge svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

:root[data-theme="dark"] .reader-status-badge span {
  color: currentColor;
  opacity: 0.82;
}

:root[data-theme="dark"] .reader-status-badge.status-validated {
  border-color: rgba(101, 213, 124, 0.44);
  background: rgba(101, 213, 124, 0.08);
  color: #7be292;
}

:root[data-theme="dark"] .reader-status-badge.status-needs_review {
  border-color: rgba(239, 189, 96, 0.44);
  background: rgba(239, 189, 96, 0.08);
  color: #f2c76f;
}

:root[data-theme="dark"] .reader-status-badge.status-low_confidence {
  border-color: rgba(239, 116, 127, 0.44);
  background: rgba(239, 116, 127, 0.08);
  color: #f1848d;
}

:root[data-theme="dark"] .tech-summary {
  margin-top: 14px;
  gap: 7px;
}

:root[data-theme="dark"] .tech-summary-item {
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid #2b3336;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
}

:root[data-theme="dark"] .tech-summary-item dt {
  color: #6f797c;
  font-size: 8px;
}

:root[data-theme="dark"] .tech-summary-item dd {
  color: #b8c0c2;
  font-size: 10px;
}

:root[data-theme="dark"] .reader-tabs {
  display: flex;
  align-items: end;
  gap: 25px;
  min-height: 48px;
  margin-top: 17px;
  overflow-x: auto;
  scrollbar-width: none;
}

:root[data-theme="dark"] .reader-tabs::-webkit-scrollbar {
  display: none;
}

:root[data-theme="dark"] .reader-tab {
  position: relative;
  min-width: max-content;
  min-height: 48px;
  padding: 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7f898c;
  font-size: 12px;
  font-weight: 670;
}

:root[data-theme="dark"] .reader-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
}

:root[data-theme="dark"] .reader-tab:hover {
  color: #d9dedc;
}

:root[data-theme="dark"] .reader-tab[aria-selected="true"] {
  color: #f6f8f7;
}

:root[data-theme="dark"] .reader-tab[aria-selected="true"]::after {
  background: linear-gradient(90deg, #7beaf8, #35bfd8);
  box-shadow: 0 -3px 14px rgba(67, 215, 243, 0.22);
}

:root[data-theme="dark"] .reader-tab:focus-visible {
  outline: 1px solid rgba(67, 215, 243, 0.72);
  outline-offset: -5px;
}

:root[data-theme="dark"] .reader-body {
  padding: 0;
}

:root[data-theme="dark"] .reader-tab-body {
  width: min(100%, 1280px);
  padding: 30px 42px 70px;
}

:root[data-theme="dark"] .reader-overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

:root[data-theme="dark"] .reader-overview-grid.no-video {
  grid-template-columns: minmax(0, 860px);
}

:root[data-theme="dark"] .reader-overview-media,
:root[data-theme="dark"] .reader-overview-copy {
  min-width: 0;
}

:root[data-theme="dark"] .video-lab {
  padding: 0;
  border: 0;
  background: transparent;
}

:root[data-theme="dark"] .video-lab-head {
  margin-bottom: 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid #242a2d;
}

:root[data-theme="dark"] .video-lab-head h3 {
  color: #7de5f3;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.08em;
}

:root[data-theme="dark"] .reader-overview-media .media-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

:root[data-theme="dark"] .reader-overview-media .media-block,
:root[data-theme="dark"] .media-block {
  overflow: hidden;
  border: 1px solid #2a3134;
  border-radius: 7px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008) 45%),
    #080b0d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .reader-overview-media .media-block.tiktok-card {
  max-width: 360px;
  justify-self: start;
}

:root[data-theme="dark"] .media-block-head,
:root[data-theme="dark"] .media-caption {
  border-color: #252c2f;
  background: rgba(6, 8, 9, 0.74);
}

:root[data-theme="dark"] .note-section {
  margin: 0;
  padding: 0 0 26px;
  border-bottom: 1px solid #252c2f;
}

:root[data-theme="dark"] .note-section + .note-section {
  margin-top: 28px;
}

:root[data-theme="dark"] .note-section h3,
:root[data-theme="dark"] .section-title {
  margin-bottom: 13px;
  color: #f1f4f3;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

:root[data-theme="dark"] .note-section p,
:root[data-theme="dark"] .note-section li {
  color: #c3c9ca;
  font-size: 14px;
  line-height: 1.68;
}

:root[data-theme="dark"] .reader-overview-copy > .note-section:first-child {
  padding-bottom: 30px;
}

:root[data-theme="dark"] .reader-overview-copy > .note-section:first-child p {
  color: #e7ebea;
  font-size: 17px;
  line-height: 1.72;
}

:root[data-theme="dark"] .example-grid,
:root[data-theme="dark"] .resource-grid {
  gap: 14px;
}

:root[data-theme="dark"] .example-card,
:root[data-theme="dark"] .resource-card,
:root[data-theme="dark"] .proof-card,
:root[data-theme="dark"] .review-toolbar,
:root[data-theme="dark"] .reader-tab-empty {
  border: 1px solid #293134;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008) 52%),
    #090c0e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

:root[data-theme="dark"] .example-card {
  padding: 20px;
}

:root[data-theme="dark"] .example-card h4 {
  color: #f4f7f6;
}

:root[data-theme="dark"] .verification-card,
:root[data-theme="dark"] .verification-card.strong,
:root[data-theme="dark"] .verification-card.caution {
  border-color: #293134;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.007) 52%),
    #090c0e;
}

:root[data-theme="dark"] .verification-card.strong {
  border-color: rgba(67, 215, 243, 0.28);
}

:root[data-theme="dark"] .verification-card.caution {
  border-color: rgba(239, 189, 96, 0.3);
}

:root[data-theme="dark"] .copy-button,
:root[data-theme="dark"] .primary-soft,
:root[data-theme="dark"] button.primary {
  border-color: rgba(67, 215, 243, 0.7);
  background: linear-gradient(180deg, #68e6f7, #31bdd5);
  color: #041013;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 9px 22px rgba(34, 184, 207, 0.15);
}

:root[data-theme="dark"] .copy-button:hover,
:root[data-theme="dark"] .primary-soft:hover,
:root[data-theme="dark"] button.primary:hover {
  background: linear-gradient(180deg, #8beefa, #45cce0);
}

:root[data-theme="dark"] .filter-popover,
:root[data-theme="dark"] .settings-inline-shell,
:root[data-theme="dark"] .author-control-panel,
:root[data-theme="dark"] .author-video-table-wrap,
:root[data-theme="dark"] .modal-panel {
  border-color: #293134;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 42%),
    #090c0e;
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .author-video-table thead,
:root[data-theme="dark"] .author-video-table tr,
:root[data-theme="dark"] .author-video-table td,
:root[data-theme="dark"] .author-video-table th {
  border-color: #273033;
}

:root[data-theme="dark"] .author-video-table tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

:root[data-theme="dark"] .home-page,
:root[data-theme="dark"] .home-process {
  background: transparent;
}

:root[data-theme="dark"] .agent-station,
:root[data-theme="dark"] .proof-gate,
:root[data-theme="dark"] .decision-map {
  border-color: #293134;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.026), transparent 50%),
    #080b0d;
}

@media (max-width: 1180px) {
  :root[data-theme="dark"] .workspace {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  }

  :root[data-theme="dark"] .reader-head,
  :root[data-theme="dark"] .reader-tab-body {
    padding-right: 30px;
    padding-left: 30px;
  }

  :root[data-theme="dark"] .reader-title {
    font-size: 32px;
  }

  :root[data-theme="dark"] .reader-overview-grid {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 30px;
  }
}

@media (max-width: 920px) {
  :root[data-theme="dark"] .topbar {
    grid-template-columns: minmax(170px, 220px) minmax(260px, 1fr) auto;
  }

  :root[data-theme="dark"] .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  :root[data-theme="dark"] .reader-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root[data-theme="dark"] .reader-overview-media .media-block,
  :root[data-theme="dark"] .reader-overview-media .media-block.tiktok-card {
    width: min(100%, 480px);
    max-width: 480px;
  }
}

@media (max-width: 720px) {
  :root[data-theme="dark"] .topbar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 8px 12px;
  }

  :root[data-theme="dark"] .brand-title {
    font-size: 14px;
  }

  :root[data-theme="dark"] .search-shell {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  :root[data-theme="dark"] .workspace {
    grid-template-columns: 1fr;
  }

  :root[data-theme="dark"] .list-pane {
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid #252b2e;
  }

  :root[data-theme="dark"] .reader-head,
  :root[data-theme="dark"] .reader-tab-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  :root[data-theme="dark"] .reader-head {
    padding-top: 21px;
  }

  :root[data-theme="dark"] .reader-title {
    font-size: 27px;
  }

  :root[data-theme="dark"] .reader-tabs {
    gap: 20px;
  }

  :root[data-theme="dark"] .reader-tab-body {
    padding-top: 22px;
  }

  :root[data-theme="dark"] .reader-overview-copy > .note-section:first-child p {
    font-size: 15px;
  }

  :root[data-theme="dark"] .example-grid,
  :root[data-theme="dark"] .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile master-detail: show the library or one fiche, never both. */
@media (max-width: 720px) {
  body.mobile-library-layout:not(.mobile-reader-open) .reader-pane {
    display: none;
  }

  body.mobile-library-layout:not(.mobile-reader-open) .list-pane {
    max-height: none;
    border-right: 0;
    border-bottom: 0;
  }

  body.mobile-reader-open {
    height: 100dvh;
    overflow: hidden;
  }

  body.mobile-reader-open .app-frame {
    grid-template-rows: minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.mobile-reader-open .topbar,
  body.mobile-reader-open .list-pane {
    display: none;
  }

  body.mobile-reader-open .workspace {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.mobile-reader-open .reader-pane {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    border: 0;
  }

  body.mobile-reader-open .mobile-reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--reader-head-bg);
    backdrop-filter: blur(18px);
  }

  body.mobile-reader-open .reader-head {
    position: relative;
    top: auto;
  }
}
