/* Documentary workspace. The source reader is a column, or a dedicated mobile view. */
#studio-page.documentary-page {
  max-width: 1720px;
  padding-top: 24px;
}
.documentary-page .studio-heading {
  margin-bottom: 24px;
}
.documentary-page .studio-heading h1 {
  font-size: 2rem;
}
.doc-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.doc-layout.has-reader {
  grid-template-columns: 190px minmax(0, 1fr) minmax(330px, 400px);
  gap: 24px;
}
#doc-main {
  min-width: 0;
}
#doc-rail {
  padding: 0;
  max-height: calc(100dvh - 40px);
  top: 20px;
}
#doc-rail h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 28px 10px 10px;
}
.doc-rail-nav {
  display: grid;
  gap: 4px;
}
.doc-rail-nav button,
.doc-dossier-link {
  display: block;
  width: 100%;
  text-align: left;
  border-color: transparent;
  background: none;
  border-radius: 6px;
  padding: 11px 12px;
  font-size: 0.86rem;
}
.doc-rail-nav [aria-current='page'],
.doc-dossier-link[aria-current='page'] {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
}
.doc-dossier-link {
  border-radius: 0;
  border-left: 2px solid transparent;
  margin: 4px 0;
  line-height: 1.45;
}
.doc-dossier-link[aria-current='page'] {
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
}
.doc-dossier-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.doc-dossier-link small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 7px;
}
.doc-dossier-link .failed {
  color: var(--danger);
}
.doc-dossier-link .running {
  color: var(--info);
}
#doc-mobile-nav {
  display: none;
}
.doc-section-heading h2 {
  font:
    1.5rem/1.25 Georgia,
    serif;
  margin: 0 0 10px;
}
.doc-section-heading p {
  margin: 0 0 24px;
}
.doc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 2px 0 22px;
  margin-bottom: 24px;
}
.doc-stats strong {
  display: block;
  font:
    1.8rem Georgia,
    serif;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.doc-stats span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}
.doc-empty {
  padding: 32px 0;
  max-width: 580px;
}
.doc-empty h2 {
  font:
    1.4rem Georgia,
    serif;
}
.doc-empty button {
  margin-top: 10px;
}
.doc-title {
  font:
    1.55rem/1.35 Georgia,
    serif;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.doc-main .eyebrow {
  line-height: 1.5;
}
.doc-brief {
  margin: -4px 0 20px;
  font-size: 1rem;
  line-height: 1.65;
}
.doc-brief summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 10px 0;
}
.doc-brief p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doc-actions,
.doc-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  align-items: center;
}
.doc-actions button,
.doc-actions a {
  font-size: 0.8rem;
}
.doc-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.8rem;
}
.doc-button:hover {
  border-color: var(--accent);
}
.doc-link {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 6px 0;
  min-height: 36px;
  border-radius: 2px;
  text-align: left;
  line-height: 1.45;
  font-size: 0.82rem;
}
.doc-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin: 22px 0;
  overflow: auto;
}
.doc-tabs button {
  background: none;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 3px;
  white-space: nowrap;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.doc-tabs [aria-current='page'],
.doc-tabs [aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.doc-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.69rem;
  line-height: 1.5;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}
.doc-badge.done,
.doc-badge.read,
.doc-badge.observation {
  color: var(--success);
  border-color: var(--success-border);
  background: var(--success-soft);
}
.doc-badge.running,
.doc-badge.indexed {
  color: var(--info);
  border-color: var(--info-border);
  background: var(--info-soft);
}
.doc-badge.partial,
.doc-badge.hypothesis {
  color: var(--warning);
  border-color: var(--warning-border);
  background: var(--warning-soft);
}
.doc-badge.failed,
.doc-badge.unavailable {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}
.doc-chip {
  border-radius: 20px;
  min-height: 36px;
  padding: 7px 13px;
  font-size: 0.8rem;
}
.doc-chip[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.doc-research-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 22px 0;
}
.doc-research-row h2 {
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}
.doc-research-row p {
  margin: 8px 0 0;
  font-size: 0.78rem;
}
.doc-research-row .doc-badge {
  flex-shrink: 0;
  max-width: 190px;
}
.doc-research-row:hover h2 {
  color: var(--accent);
}
.doc-running {
  padding: 0 0 26px;
}
.doc-running h2 {
  font-size: 1rem;
  line-height: 1.5;
}
.doc-progress {
  border-left: 3px solid var(--info-border);
  background: var(--info-soft);
  padding: 16px 18px;
  margin: 18px 0 12px;
}
.doc-progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.doc-progress-line .quiet {
  font-size: 0.7rem;
}
.doc-steps {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 18px 0;
  gap: 12px;
  justify-content: space-between;
}
.doc-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.4;
}
.doc-step-dot {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.doc-steps .done {
  color: var(--success);
}
.doc-steps .done .doc-step-dot {
  background: var(--success-soft);
  border-color: var(--success-border);
}
.doc-steps .active {
  color: var(--accent);
}
.doc-steps .active .doc-step-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.doc-steps .failed {
  color: var(--danger);
}
.doc-steps .skipped {
  opacity: 0.6;
}
.doc-steps .unknown .doc-step-dot {
  border-style: dashed;
}
.doc-current {
  font-size: 0.86rem;
  margin: 12px 0 4px;
  overflow-wrap: anywhere;
}
.doc-current-detail {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
}
.doc-progress-counts {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 12px;
}
.doc-overview {
  font:
    1.05rem/1.7 Georgia,
    serif;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.doc-prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  line-height: 1.75;
}
.doc-prose a {
  color: var(--accent);
}
.doc-overview .doc-prose {
  font: inherit;
}
.doc-citation {
  display: inline;
  min-height: 0;
  padding: 2px 4px;
  margin: 0 2px;
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid var(--info-border);
  border-radius: 4px;
  font-size: 0.78em;
  vertical-align: baseline;
}
.doc-toc {
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.doc-toc h2 {
  font-size: 0.85rem;
  color: var(--muted);
}
.doc-toc button {
  display: block;
  padding: 8px 0;
}
.doc-report-section {
  scroll-margin-top: 25px;
  margin: 32px 0;
  max-width: 860px;
}
.doc-report-section h2 {
  font:
    1.4rem/1.3 Georgia,
    serif;
}
.doc-findings h2,
.doc-limitations h2 {
  font-size: 0.95rem;
}
.doc-finding {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.doc-findings {
  margin: 24px 0;
}
.doc-limitations {
  border-left: 3px solid var(--warning-border);
  padding: 8px 0 8px 20px;
  margin: 30px 0;
}
.doc-limitations ul {
  padding-left: 18px;
}
.doc-limitations li {
  margin: 12px 0;
}
.doc-footnote {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 26px 0;
}
.doc-timeline {
  list-style: none;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--border-strong);
  margin: 28px 0;
}
.doc-timeline li {
  position: relative;
  padding: 0 0 24px;
}
.doc-timeline li:before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  position: absolute;
  left: -22px;
  top: 7px;
}
.doc-timeline .warning:before {
  background: var(--accent);
}
.doc-timeline time {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.doc-timeline span {
  font-size: 0.9rem;
  line-height: 1.5;
}
.doc-query {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.doc-query strong {
  color: var(--accent);
  margin-right: 14px;
}
.doc-error {
  color: var(--danger);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.doc-error.success {
  color: var(--success);
}
.doc-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin: 30px 0 38px;
}
.doc-chart {
  margin: 0;
  min-width: 0;
}
.doc-chart figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.doc-stack {
  display: flex;
  gap: 3px;
  width: 100%;
  height: 26px;
  margin-bottom: 12px;
}
.doc-stack button {
  border: 0;
  border-radius: 3px;
  padding: 0;
  min-height: 26px;
  min-width: 7px;
}
.reading-read {
  --reading-color: var(--success);
}
.reading-partial {
  --reading-color: var(--accent);
}
.reading-unavailable {
  --reading-color: var(--danger);
}
.reading-untraced {
  --reading-color: var(--faint);
}
.reading-indexed {
  --reading-color: var(--info);
}
.doc-stack button {
  background: var(--reading-color);
}
.doc-legend {
  display: grid;
  align-items: start;
}
.doc-legend button {
  color: var(--reading-color);
  font-size: 0.75rem;
  min-height: 32px;
}
.doc-domain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 5px;
  width: 100%;
  padding: 6px 0 8px;
  min-height: 44px;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 0.75rem;
  text-align: left;
}
.doc-domain > span:first-child {
  overflow-wrap: anywhere;
}
.doc-domain strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.doc-domain-track {
  grid-column: 1/-1;
  background: var(--surface-2);
  height: 4px;
}
.doc-domain-track span {
  display: block;
  height: 4px;
  background: var(--info);
}
.doc-matrix-scroll {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  margin: 16px 0 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.doc-matrix {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.75rem;
}
.doc-matrix th,
.doc-matrix td {
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 4px;
  min-width: 44px;
  height: 44px;
}
.doc-matrix th:first-child {
  min-width: 190px;
  max-width: 260px;
  text-align: left;
  padding: 12px;
  font-weight: 450;
  background: var(--bg);
  position: sticky;
  left: 0;
  z-index: 1;
}
.doc-matrix thead th {
  background: var(--surface-2);
  color: var(--accent);
}
.doc-matrix thead th:first-child {
  background: var(--surface-2);
}
.doc-matrix .doc-link {
  padding: 8px;
}
.doc-evidence {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success-border);
}
.doc-evidence.partial {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: var(--warning-border);
}
.doc-evidence.secondary {
  background: var(--surface-2);
  color: var(--muted);
  border-style: dashed;
}
.doc-no-evidence {
  color: var(--faint);
}
.doc-search {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.doc-search input {
  min-width: 0;
  font-size: 0.85rem;
}
.doc-search button {
  font-size: 0.8rem;
}
.doc-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 24px;
}
.doc-filter {
  margin: 0;
  flex: 1 1 130px;
  min-width: 0;
  font-size: 0.7rem;
}
.doc-filter > span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}
.doc-filter select {
  font-size: 0.76rem;
  padding: 9px 6px;
  min-height: 40px;
}
.doc-selection {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.doc-selection > span {
  font-size: 0.76rem;
  color: var(--muted);
  margin-right: auto;
}
.doc-selection button,
.doc-selection a {
  font-size: 0.74rem;
  padding: 7px 9px;
  min-height: 38px;
}
.doc-source-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(120px, 190px);
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.doc-source-row > input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}
.doc-source-row.selected {
  background: var(--accent-soft);
}
.doc-source-title {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 4px 0;
  min-height: 50px;
  min-width: 0;
}
.doc-source-title strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.doc-source-title:hover strong {
  color: var(--accent);
}
.doc-source-title span {
  display: block;
  font-size: 0.72rem;
  margin-top: 7px;
}
.doc-source-meta {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.doc-source-meta small {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.doc-tag-list {
  color: var(--muted) !important;
}
.doc-search-hits {
  margin: 24px 0;
}
.doc-search-hits h2 {
  font-size: 0.9rem;
}
.doc-hit {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  border-left: 2px solid var(--info);
  text-align: left;
  margin: 12px 0;
  padding: 8px 15px;
  overflow-wrap: anywhere;
}
.doc-hit strong {
  font-size: 0.84rem;
  display: block;
}
.doc-hit small {
  display: block;
  color: var(--accent);
  margin-top: 5px;
}
.doc-hit p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.doc-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px;
  margin: 20px 0;
}
.doc-compare section {
  min-width: 0;
  border-top: 2px solid var(--border-strong);
  padding-top: 8px;
}
.doc-compare h2 {
  font-size: 1rem;
  line-height: 1.5;
}
.doc-compare dt {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 20px 0 6px;
}
.doc-compare dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#doc-reader {
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 32px);
  padding: 0 0 24px 22px;
  border-left: 1px solid var(--border);
  overflow: auto;
  min-width: 0;
  scrollbar-gutter: stable;
}
#doc-reader h2 {
  font:
    1.45rem/1.35 Georgia,
    serif;
  overflow-wrap: anywhere;
  margin: 20px 0 10px;
}
.doc-reader-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.doc-reader-head > .doc-link {
  font-size: 0.75rem;
}
.doc-reader-nav {
  display: flex;
  gap: 6px;
}
.doc-reader-nav button {
  font-size: 0.69rem;
  padding: 6px 8px;
  min-height: 34px;
}
.doc-original {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  padding: 14px 0;
  text-underline-offset: 4px;
}
.doc-provenance {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 7px;
  font-size: 0.69rem;
  line-height: 1.6;
  margin: 8px 0 20px;
}
.doc-provenance dt {
  color: var(--muted);
}
.doc-provenance dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.doc-reader-update {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
.doc-reader-update[hidden] {
  display: none;
}
.doc-reader-body input[type='search'] {
  font-size: 1rem;
}
.doc-passages > .quiet {
  font-size: 0.72rem;
}
.doc-passage {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  scroll-margin: 18px;
}
.doc-passage > strong {
  font-size: 0.75rem;
  color: var(--success);
}
.doc-passage p {
  font:
    1rem/1.8 Georgia,
    serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.doc-passage.cited {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  background: var(--accent-soft);
}
.doc-passage mark {
  background: var(--selection);
  color: var(--text);
}
.doc-passage .doc-link {
  font-size: 0.7rem;
}
.doc-generated-note {
  font-size: 0.8rem;
  margin: 26px 0;
  line-height: 1.6;
}
.doc-generated-note summary {
  cursor: pointer;
  color: var(--muted);
  padding: 12px 0;
}
.doc-generated-note .doc-prose {
  font-size: 0.84rem;
}
.doc-note-form label {
  font-size: 0.8rem;
}
.doc-note-form input,
.doc-note-form select,
.doc-note-form textarea {
  font-size: 1rem;
}
.doc-note-form button {
  margin-top: 16px;
}
.doc-check {
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.5;
}
.doc-check input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.doc-note-status {
  font-size: 0.8rem;
  color: var(--accent);
}
.doc-callout {
  padding: 12px 14px;
  background: var(--warning-soft);
  border-left: 2px solid var(--accent);
  font-size: 0.8rem;
  line-height: 1.65;
}
.doc-use {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.doc-use p {
  margin: 4px 0;
  font-size: 0.75rem;
}
#research-dialog {
  max-width: 640px;
}
#research-dialog h2 {
  font:
    1.4rem Georgia,
    serif;
}
#research-dialog .quiet {
  font-size: 0.8rem;
}
@media (max-width: 1240px) {
  .doc-layout.has-reader {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  }
  .has-reader #doc-rail {
    display: none;
  }
  .documentary-page:has(.has-reader) #doc-mobile-nav {
    display: block;
    margin-bottom: 22px;
  }
  .doc-steps {
    gap: 6px;
  }
  .doc-steps li {
    flex-direction: column;
    align-items: flex-start;
  }
  .has-reader .doc-source-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .has-reader .doc-source-meta {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
  }
  .has-reader .doc-charts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .doc-layout,
  .doc-layout.has-reader {
    grid-template-columns: minmax(0, 1fr);
  }
  #doc-rail {
    display: none;
  }
  #doc-mobile-nav {
    display: block;
    margin-bottom: 22px;
  }
  .has-reader #doc-main {
    display: none;
  }
  #doc-reader {
    position: static;
    max-height: none;
    border-left: 0;
    padding: 0;
    scrollbar-gutter: auto;
  }
  .doc-reader-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
  }
  .doc-reader-nav button {
    min-height: 44px;
  }
  .doc-reader-head > .doc-link {
    min-height: 44px;
  }
  .doc-provenance {
    grid-template-columns: 120px 1fr;
  }
  .doc-passage p {
    font-size: 1.08rem;
  }
  .doc-reader-body {
    max-width: 760px;
  }
  .has-reader .doc-charts {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  #studio-page.documentary-page {
    padding: 20px 16px 48px;
  }
  .documentary-page .studio-heading {
    margin-bottom: 22px;
  }
  .documentary-page .studio-heading h1 {
    font-size: 1.8rem;
  }
  .documentary-page .studio-heading .row {
    margin: 16px 0;
  }
  .documentary-page .studio-heading button {
    font-size: 0.8rem;
  }
  .doc-section-heading h2 {
    font-size: 1.4rem;
  }
  .doc-stats {
    gap: 14px;
    grid-template-columns: 1fr 1fr;
  }
  .doc-stats strong {
    font-size: 1.6rem;
  }
  .doc-title {
    font-size: 1.4rem;
  }
  .doc-progress {
    padding: 14px 12px;
  }
  .doc-steps {
    gap: 5px;
    flex-wrap: wrap;
  }
  .doc-steps li {
    font-size: 0.65rem;
    min-width: 42px;
    flex: 1;
  }
  .doc-progress-counts {
    gap: 8px 12px;
  }
  .doc-tabs {
    gap: 8px;
  }
  .doc-tabs button {
    font-size: 0.82rem;
    flex: 1;
  }
  .doc-research-row {
    display: block;
    padding: 20px 0;
  }
  .doc-research-row > .doc-badge {
    margin-top: 12px;
  }
  .doc-charts,
  .has-reader .doc-charts {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .doc-chart .doc-link {
    min-height: 44px;
  }
  .doc-stack {
    height: 34px;
  }
  .doc-stack button {
    min-height: 34px;
  }
  .doc-filter {
    flex: 1 1 135px;
  }
  .doc-filter select {
    min-height: 44px;
  }
  .doc-filters {
    gap: 14px 10px;
  }
  .doc-selection {
    gap: 8px;
  }
  .doc-selection > span {
    width: 100%;
    margin-bottom: 4px;
  }
  .doc-selection button,
  .doc-selection a {
    min-height: 44px;
  }
  .doc-source-row,
  .has-reader .doc-source-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px 12px;
  }
  .doc-source-meta {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .doc-source-meta small {
    font-size: 0.7rem;
  }
  .doc-source-title strong {
    font-size: 0.9rem;
  }
  .doc-matrix th:first-child {
    min-width: 145px;
    max-width: 165px;
  }
  .doc-compare {
    grid-template-columns: 1fr;
  }
  .doc-compare section {
    padding-top: 14px;
  }
  .doc-compare h2 {
    font-size: 1.1rem;
  }
  .doc-prose {
    font-size: 0.94rem;
  }
  .doc-reader-body .doc-link {
    min-height: 44px;
  }
  .doc-original {
    min-height: 44px;
  }
  .doc-citation {
    padding: 4px 5px;
  }
  .doc-limitations {
    padding-left: 14px;
  }
  .doc-report-section h2 {
    font-size: 1.3rem;
  }
}
.doc-progress-detail > summary {
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
  padding: 12px 0 0;
}
.doc-progress-detail[open] > summary {
  padding-bottom: 4px;
}
.doc-progress:has(.doc-progress-detail:not([open])) {
  padding-top: 12px;
  padding-bottom: 12px;
}
