/*
 * Dossier explorer
 * ----------------
 * Shared, progressively enhanced presentation for question-scoped dossiers.
 * All rules are namespaced beneath .dossier-explorer so the existing atlas
 * pages keep their current appearance. JavaScript is optional: the generated
 * HTML remains a readable, fully expanded document without it.
 *
 * Interaction contract:
 *   [data-focus][data-focus-target="ID"]  selectable claim/edge/source/etc.
 *   [data-focus-panel="ID"]               corresponding detail panel
 *   [data-trail][data-steps='["ID",...]'] guided trail launcher
 *   [data-evidence-card]                   filterable evidence card
 *   [data-local-nav] / [data-section]      local section navigation
 */

.dossier-explorer {
  --dossier-radius: 7px;
  --dossier-shadow: 0 8px 28px rgba(44, 36, 24, 0.08);
  --dossier-local-nav-height: 3rem;
  --dossier-control-size: 2.5rem;
  max-width: 100%;
}

/* The global tertiary token is decorative-weight gray. Dossiers use it for
 * epistemic statuses and navigation, so keep it above WCAG AA at small sizes. */
body.dossier-explorer-page {
  --text-tertiary: #75685b;
  --dossier-accent-contrast: #76570c;
}

@media (prefers-color-scheme: dark) {
  body.dossier-explorer-page {
    --text-tertiary: #b5aa9c;
    --dossier-accent-contrast: var(--accent);
  }
}

/* ---------- first viewport / orientation ---------- */

.dossier-first-viewport {
  min-height: calc(100svh - 7rem);
  padding: clamp(1.4rem, 4vw, 3.2rem) 0 2rem;
  display: grid;
  align-content: start;
  gap: clamp(1.1rem, 2.5vw, 1.8rem);
}

.dossier-first-viewport h1,
.dossier-question {
  max-width: 27ch;
  margin: 0;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.15;
  font-weight: normal;
  text-wrap: balance;
}

.dossier-kicker,
.dossier-eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--font-ui);
  color: var(--text-tertiary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.dossier-deck {
  max-width: 62ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}

.dossier-trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  align-items: center;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--meta);
  border-radius: 4px;
  background: var(--meta-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.45;
}

.dossier-trust-line strong { color: var(--text); }

.dossier-trust-line a {
  font-weight: 600;
  text-underline-offset: 0.18em;
}

/* ---------- decomposed status cards ---------- */

.dossier-status-grid,
.claim-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.claim-status-card,
.dossier-status-card {
  position: relative;
  min-width: 0;
  padding: 0.9rem 1rem 0.95rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top-width: 4px;
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.claim-status-card::before,
.dossier-status-card::before {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.35rem 0.45rem 0;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.claim-status-card[data-status="well-supported"],
.claim-status-card[data-status="established"],
.dossier-status-card[data-status="well-supported"],
.dossier-status-card[data-status="established"] {
  border-top-color: var(--evidence);
}

.claim-status-card[data-status="well-supported"]::before,
.claim-status-card[data-status="established"]::before,
.dossier-status-card[data-status="well-supported"]::before,
.dossier-status-card[data-status="established"]::before {
  content: "✓";
  color: var(--evidence);
}

.claim-status-card[data-status="plausible"],
.claim-status-card[data-status="variable"],
.dossier-status-card[data-status="plausible"],
.dossier-status-card[data-status="variable"] {
  border-top-color: var(--warrant);
}

.claim-status-card[data-status="plausible"]::before,
.claim-status-card[data-status="variable"]::before,
.dossier-status-card[data-status="plausible"]::before,
.dossier-status-card[data-status="variable"]::before {
  content: "≈";
  color: var(--warrant);
}

.claim-status-card[data-status="underdetermined"],
.claim-status-card[data-status="uncertain"],
.dossier-status-card[data-status="underdetermined"],
.dossier-status-card[data-status="uncertain"] {
  border-top-color: var(--gap);
  border-top-style: dashed;
}

.claim-status-card[data-status="underdetermined"]::before,
.claim-status-card[data-status="uncertain"]::before,
.dossier-status-card[data-status="underdetermined"]::before,
.dossier-status-card[data-status="uncertain"]::before {
  content: "?";
  color: var(--gap);
}

.claim-status-card[data-status="contested"],
.claim-status-card[data-status="not-established"],
.dossier-status-card[data-status="contested"],
.dossier-status-card[data-status="not-established"] {
  border-top-color: var(--counter);
}

.claim-status-card[data-status="contested"]::before,
.claim-status-card[data-status="not-established"]::before,
.dossier-status-card[data-status="contested"]::before,
.dossier-status-card[data-status="not-established"]::before {
  content: "!";
  color: var(--counter);
}

.status-card-label,
.claim-status-label {
  display: inline;
  font-family: var(--font-ui);
  color: var(--text-tertiary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-card-claim,
.claim-status-statement {
  margin: 0.25rem 0 0.35rem;
  color: var(--text);
  font-size: 0.91rem;
  font-weight: 600;
  line-height: 1.42;
}

.status-card-read,
.claim-status-read {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.45;
}

/* ---------- sticky local dossier navigation ---------- */

.dossier-local-nav-wrap {
  position: sticky;
  z-index: 30;
  top: 0;
  margin: 0 -1px 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 5px 14px rgba(44, 36, 24, 0.05);
}

.dossier-local-nav {
  display: flex;
  min-height: var(--dossier-local-nav-height);
  gap: 0.1rem;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.dossier-local-nav [data-local-nav] {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.7rem 0.72rem 0.6rem;
  align-items: center;
  flex: 0 0 auto;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.dossier-local-nav [data-local-nav]:hover {
  color: var(--text);
  background: var(--bg-aside);
}

.dossier-local-nav [data-local-nav].is-active,
.dossier-local-nav [data-local-nav][aria-current="location"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 750;
}

.dossier-local-nav [data-local-nav].is-active::before,
.dossier-local-nav [data-local-nav][aria-current="location"]::before {
  content: "•";
  margin-right: 0.35rem;
  color: var(--accent);
  font-size: 1rem;
  line-height: 0;
}

/* ---------- guided trails ---------- */

.dossier-trails {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-aside);
}

.dossier-trails-heading {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.dossier-trail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

[data-trail] {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.7rem 0.8rem;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

[data-trail]::before {
  content: "→";
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 800;
}

[data-trail]:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(44, 36, 24, 0.07);
}

[data-trail].is-active,
[data-trail][aria-pressed="true"] {
  border-width: 2px;
  border-color: var(--accent);
  background: var(--accent-light);
}

[data-trail].is-active::before,
[data-trail][aria-pressed="true"]::before { content: "▶"; }

.trail-title {
  font-family: var(--font-ui);
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.3;
}

.trail-description {
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.35;
}

.dossier-trail-controls,
[data-trail-controls] {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  align-items: center;
  border-top: 1px solid var(--border);
}

[data-trail-status] {
  min-width: 0;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

[data-trail-prev],
[data-trail-next],
[data-trail-exit] {
  min-height: var(--dossier-control-size);
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
}

[data-trail-prev]::before { content: "← "; }
[data-trail-next]::after { content: " →"; }

[data-trail-prev]:hover:not(:disabled),
[data-trail-next]:hover:not(:disabled),
[data-trail-exit]:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-light);
}

[data-trail-prev]:disabled,
[data-trail-next]:disabled {
  border-style: dashed;
  opacity: 0.48;
  cursor: not-allowed;
}

/* ---------- argument workspace ---------- */

.dossier-workspace {
  display: grid;
  grid-template-columns: minmax(15.5rem, 0.72fr) minmax(0, 1.55fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin: 1rem 0 3rem;
}

.dossier-argument-sidebar,
.argument-sidebar {
  position: sticky;
  top: calc(var(--dossier-local-nav-height) + 0.85rem);
  max-height: calc(100svh - var(--dossier-local-nav-height) - 1.7rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.argument-spine,
[data-argument-spine] {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.2rem 0;
}

.argument-stage-label {
  margin: 0.75rem 0 0.35rem;
  padding-left: 0.2rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.argument-node,
.argument-spine .argument-node[data-focus][data-focus-target] {
  position: relative;
  display: block;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.7rem 2.7rem 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1.4;
  text-align: left;
}

.argument-node:hover,
.argument-spine [data-focus][data-focus-target]:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(44, 36, 24, 0.07);
}

.argument-node.is-active,
.argument-node[aria-pressed="true"],
.argument-spine [data-focus][data-focus-target].is-active,
.argument-spine [data-focus][data-focus-target][aria-pressed="true"] {
  padding-right: 5.25rem;
  border-width: 2px;
  border-color: var(--accent);
  background: var(--accent-light);
}

.argument-node.is-active::after,
.argument-node[aria-pressed="true"]::after,
.argument-spine [data-focus][data-focus-target].is-active::after,
.argument-spine [data-focus][data-focus-target][aria-pressed="true"]::after {
  content: "Selected";
  position: absolute;
  top: 0.45rem;
  right: 0.48rem;
  padding: 0.12rem 0.32rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.argument-node.is-active .argument-node-id,
.argument-node[aria-pressed="true"] .argument-node-id,
.argument-spine [data-focus][data-focus-target].is-active .argument-node-id,
.argument-spine [data-focus][data-focus-target][aria-pressed="true"] .argument-node-id {
  color: var(--dossier-accent-contrast);
}

.argument-node-id {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.argument-node-text {
  display: block;
  font-family: var(--font-body);
  font-size: 0.83rem;
  line-height: 1.4;
}

.argument-node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  margin-top: 0.4rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
}

.inference-edge-wrap {
  position: relative;
  display: grid;
  min-height: 3.15rem;
  padding: 0.25rem 0;
  place-items: center;
}

.inference-edge-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.15rem;
  border-left: 2px solid var(--border);
}

.inference-edge,
button.inference-edge[data-focus-target] {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  width: calc(100% - 1.25rem);
  min-height: 2.55rem;
  margin-left: 1.25rem;
  padding: 0.45rem 0.65rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: var(--bg-aside);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: left;
}

.inference-edge::before,
button.inference-edge[data-focus-target]::before {
  content: "↓";
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
}

.inference-edge:hover,
button.inference-edge[data-focus-target]:hover {
  border-color: var(--accent);
  color: var(--text);
}

.inference-edge.is-active,
.inference-edge[aria-pressed="true"],
button.inference-edge[data-focus-target].is-active,
button.inference-edge[data-focus-target][aria-pressed="true"] {
  border-width: 2px;
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
}

.inference-edge[data-strength="sound"]::before { content: "✓"; color: var(--evidence); }
.inference-edge[data-strength="qualified"]::before { content: "≈"; color: var(--warrant); }
.inference-edge[data-strength="underdetermined"]::before { content: "?"; color: var(--gap); }
.inference-edge[data-strength="break"]::before,
.inference-edge[data-strength="invalid"]::before { content: "!"; color: var(--counter); }

.edge-id {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.edge-status-text {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.61rem;
  font-weight: 650;
  text-transform: uppercase;
}

/* ---------- selected focus pane ---------- */

.dossier-focus-pane,
.focus-pane {
  position: relative;
  min-width: 0;
  min-height: 23rem;
  scroll-margin-top: calc(var(--dossier-local-nav-height) + 1rem);
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
  box-shadow: var(--dossier-shadow);
}

.focus-pane-header {
  padding: 1rem 1.15rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
}

.focus-pane-body,
[data-focus-panel] {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  scroll-margin-top: calc(var(--dossier-local-nav-height) + 1rem);
}

.dossier-explorer.is-enhanced [data-focus-panel][hidden] { display: none; }

.dossier-explorer.is-enhanced [data-focus-panel].is-active {
  animation: dossier-panel-in 150ms ease-out both;
}

@keyframes dossier-panel-in {
  from { transform: translateY(4px); }
  to { transform: translateY(0); }
}

.focus-kind {
  margin: 0 0 0.35rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-title {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.3;
}

.focus-summary {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}

.focus-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 1rem;
}

.focus-chip,
.evidence-facet,
.provenance-chip {
  display: inline-flex;
  min-height: 1.65rem;
  padding: 0.2rem 0.48rem;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.63rem;
  font-weight: 650;
  line-height: 1.25;
}

.focus-chip[data-review="human"]::before,
.provenance-chip[data-review="human"]::before { content: "✓"; color: var(--evidence); }
.focus-chip[data-review="machine"]::before,
.provenance-chip[data-review="machine"]::before { content: "◇"; color: var(--meta); }
.focus-chip[data-review="unreviewed"]::before,
.provenance-chip[data-review="unreviewed"]::before { content: "!"; color: var(--counter); }

.focus-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.focus-column {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg);
}

.focus-column.support { border-left: 4px solid var(--evidence); }
.focus-column.challenge { border-left: 4px solid var(--counter); }

.focus-column-title {
  margin: 0 0 0.45rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.focus-column.support .focus-column-title::before { content: "+ "; color: var(--evidence); }
.focus-column.challenge .focus-column-title::before { content: "− "; color: var(--counter); }

.focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-light);
}

.focus-actions a,
.focus-actions button {
  min-height: 2.25rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--link);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.focus-actions a:hover,
.focus-actions button:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ---------- evidence filters, facets and cards ---------- */

.evidence-filter-bar,
[data-evidence-filters] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin: 0.9rem 0 1rem;
  padding: 0.8rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-aside);
}

.evidence-filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.evidence-filter-label {
  margin-right: 0.15rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-filter-name][data-filter-value] {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 650;
}

[data-filter-name][data-filter-value]:hover { border-color: var(--accent); color: var(--text); }

[data-filter-name][data-filter-value].is-active,
[data-filter-name][data-filter-value][aria-pressed="true"] {
  border-width: 2px;
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
}

[data-filter-name][data-filter-value].is-active::before,
[data-filter-name][data-filter-value][aria-pressed="true"]::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 900;
}

.evidence-result-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.2rem 0 0.65rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
}

.dossier-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dossier-explorer [data-evidence-card] {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 5px;
  background: var(--bg-surface);
}

.dossier-explorer [data-evidence-card][data-direction="supports"] { border-left-color: var(--evidence); }
.dossier-explorer [data-evidence-card][data-direction="challenges"] { border-left-color: var(--counter); }
.dossier-explorer [data-evidence-card][data-direction="mixed"] {
  border-left-color: var(--warrant);
  border-left-style: dashed;
}

.dossier-explorer [data-evidence-card][hidden] { display: none; }

.evidence-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: flex-start;
}

.evidence-card-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.42;
}

.evidence-direction {
  flex: 0 0 auto;
  padding: 0.15rem 0.38rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-direction="supports"] .evidence-direction { color: var(--evidence); }
[data-direction="supports"] .evidence-direction::before { content: "+ "; }
[data-direction="challenges"] .evidence-direction { color: var(--counter); }
[data-direction="challenges"] .evidence-direction::before { content: "− "; }
[data-direction="mixed"] .evidence-direction { color: var(--warrant); }
[data-direction="mixed"] .evidence-direction::before { content: "± "; }

.evidence-card-summary {
  margin: 0.55rem 0;
  color: var(--text-secondary);
  font-size: 0.79rem;
  line-height: 1.55;
}

.evidence-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.55rem;
}

.evidence-facet[data-facet-status="verified"]::before { content: "✓"; color: var(--evidence); }
.evidence-facet[data-facet-status="limited"]::before { content: "△"; color: var(--warrant); }
.evidence-facet[data-facet-status="unknown"]::before,
.evidence-facet[data-facet-status="unverified"]::before { content: "?"; color: var(--gap); }
.evidence-facet[data-facet-status="conflict"]::before { content: "!"; color: var(--counter); }

.evidence-can-cannot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
}

.evidence-can,
.evidence-cannot {
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.67rem;
  line-height: 1.45;
}

.evidence-can strong,
.evidence-cannot strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.59rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.evidence-can strong { color: var(--evidence); }
.evidence-can strong::before { content: "✓ "; }
.evidence-cannot strong { color: var(--counter); }
.evidence-cannot strong::before { content: "× "; }

[data-evidence-empty] {
  margin: 0.75rem 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  text-align: center;
}

/* ---------- evolution / turning points ---------- */

.evolution-turning-strip,
[data-evolution-strip] {
  position: relative;
  display: flex;
  gap: 0.55rem;
  margin: 1rem 0 1.35rem;
  padding: 1.35rem 0.2rem 0.75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.evolution-turning-strip::before,
[data-evolution-strip]::before {
  content: "";
  position: absolute;
  top: 2rem;
  right: 1rem;
  left: 1rem;
  border-top: 2px solid var(--border);
}

.evolution-point,
[data-evolution-strip] [data-focus][data-focus-target] {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 7.2rem;
  min-height: 5.6rem;
  padding: 1.35rem 0.6rem 0.55rem;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.evolution-point::before,
[data-evolution-strip] [data-focus][data-focus-target]::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: calc(50% - 0.38rem);
  width: 0.76rem;
  height: 0.76rem;
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  outline: 1px solid var(--border);
  background: var(--text-tertiary);
}

.evolution-point[data-turning-point="true"]::before,
[data-evolution-strip] [data-turning-point="true"]::before {
  border-radius: 1px;
  outline: 2px solid var(--accent);
  background: var(--accent);
  transform: rotate(45deg);
}

.evolution-point[data-turning-point="true"]::after,
[data-evolution-strip] [data-turning-point="true"]::after {
  content: "Turning point";
  position: absolute;
  top: 0.18rem;
  left: 0.35rem;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.evolution-point:hover,
[data-evolution-strip] [data-focus][data-focus-target]:hover { border-color: var(--accent); }

.evolution-point.is-active,
.evolution-point[aria-pressed="true"],
[data-evolution-strip] [data-focus][data-focus-target].is-active,
[data-evolution-strip] [data-focus][data-focus-target][aria-pressed="true"] {
  border-width: 2px;
  border-color: var(--accent);
  background: var(--accent-light);
}

.evolution-year {
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
}

.evolution-book {
  margin-top: 0.1rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
}

.evolution-change {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.7rem;
  line-height: 1.35;
}

/* ---------- cruxes ---------- */

.dossier-crux-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.crux-card {
  position: relative;
  min-width: 0;
  padding: 1rem 1rem 1rem 3.15rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--warrant);
  border-radius: 5px;
  background: var(--bg-surface);
}

.crux-number {
  position: absolute;
  top: 0.9rem;
  left: 0.8rem;
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--warrant);
  border-radius: 50%;
  color: var(--warrant);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 800;
}

.crux-title {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.crux-question {
  margin: 0 0 0.55rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
}

.crux-resolve {
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.67rem;
  line-height: 1.45;
}

.crux-resolve strong {
  color: var(--text-tertiary);
  font-size: 0.59rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- generic interactive/accessibility states ---------- */

.dossier-explorer button,
.dossier-explorer a,
.dossier-explorer [tabindex] {
  -webkit-tap-highlight-color: transparent;
}

.dossier-explorer button:focus-visible,
.dossier-explorer a:focus-visible,
.dossier-explorer [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.dossier-explorer [hidden] { display: none !important; }

.dossier-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[data-section] { scroll-margin-top: calc(var(--dossier-local-nav-height) + 1rem); }

/* ---------- responsive ---------- */

@media (max-width: 64em) {
  .dossier-first-viewport { min-height: auto; }

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

  .dossier-argument-sidebar,
  .argument-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .argument-spine,
  [data-argument-spine] {
    max-width: 36rem;
    margin: 0 auto;
  }
}

@media (max-width: 48em) {
  .dossier-status-grid,
  .claim-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .dossier-trail-list,
  .dossier-evidence-grid,
  .dossier-crux-grid { grid-template-columns: 1fr; }

  .focus-columns,
  .evidence-can-cannot { grid-template-columns: 1fr; }

  .dossier-focus-pane,
  .focus-pane { min-height: 16rem; }

  .dossier-explorer.is-enhanced [data-focus-panel].is-active {
    animation-name: dossier-panel-in-mobile;
  }

  @keyframes dossier-panel-in-mobile {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 34em) {
  .dossier-status-grid,
  .claim-status-grid { grid-template-columns: 1fr; }

  .dossier-first-viewport h1,
  .dossier-question { font-size: 1.7rem; }

  .dossier-trail-controls,
  [data-trail-controls] {
    grid-template-columns: 1fr 1fr;
  }

  [data-trail-status] {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  [data-trail-prev],
  [data-trail-next] { width: 100%; }

  .evidence-filter-bar,
  [data-evidence-filters] { align-items: stretch; }

  .evidence-filter-group { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dossier-explorer *,
  .dossier-explorer *::before,
  .dossier-explorer *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .dossier-local-nav-wrap,
  .dossier-trails,
  [data-trail-controls],
  [data-evidence-filters],
  .focus-actions { display: none !important; }

  .dossier-first-viewport { min-height: auto; }
  .dossier-workspace { display: block; }

  .dossier-argument-sidebar,
  .argument-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 1.5rem;
  }

  .dossier-focus-pane,
  .focus-pane {
    border: 0;
    box-shadow: none;
  }

  .dossier-explorer.is-enhanced [data-focus-panel][hidden] {
    display: block !important;
  }

  .dossier-explorer [data-evidence-card][hidden] { display: block !important; }
}

/* ========================================================================
 * Generated dossier explorer markup
 *
 * The rules above define the reusable component vocabulary. These aliases
 * bind it to the dependency-free HTML emitted by build_dossier_explorer.py.
 * ====================================================================== */

.dossier-explorer-page .page-header { background: var(--bg); }

.dossier-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13.5rem;
  gap: clamp(1.3rem, 3vw, 2.5rem);
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  align-items: start;
}

.dossier-shell > .dossier-explorer {
  min-width: 0;
  padding-bottom: 6rem;
}

.dossier-explorer > section {
  margin: 0;
  padding: clamp(2.3rem, 6vw, 4.8rem) 0;
  border-top: 1px solid var(--border);
}

.dossier-explorer > section:first-child { border-top: 0; }

.dossier-hero {
  min-height: calc(100svh - 7rem);
  display: grid;
  align-content: center;
  gap: 1rem;
}

.dossier-hero h1 {
  max-width: 28ch;
  margin: 0;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  font-weight: normal;
  line-height: 1.16;
  text-wrap: balance;
}

.dossier-subtitle {
  max-width: 58ch;
  margin: -0.25rem 0 0.25rem;
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 1.8vw, 1.12rem);
  line-height: 1.5;
}

.provenance-strip {
  display: block;
  width: min(100%, 50rem);
  overflow: hidden;
  border: 1px solid var(--meta-border);
  border-left: 4px solid var(--meta);
  border-radius: 4px;
  background: var(--meta-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.5;
}

.provenance-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--meta-border);
}

.provenance-head span { color: var(--text-secondary); }

.provenance-strip > p {
  margin: 0;
  padding: 0.65rem 0.75rem;
  color: var(--text);
}

.provenance-strip strong { color: var(--text); }
.provenance-strip strong::before { content: "◇ "; color: var(--meta); }

.provenance-strip details {
  border-top: 1px solid var(--meta-border);
  padding: 0.55rem 0.75rem 0.65rem;
}

.provenance-strip summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 600;
}

.provenance-strip ul { margin: 0.6rem 0 0.4rem 1.1rem; padding: 0; }
.provenance-strip li + li { margin-top: 0.3rem; }
.provenance-strip details p { margin: 0.6rem 0 0; }

.short-answer {
  max-width: 50rem;
  margin: 0.5rem 0 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
  box-shadow: var(--dossier-shadow);
}

.short-answer-label {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.short-answer p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.62;
}

.synthesis-line {
  max-width: 65ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.summary-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  max-width: 58rem;
}

.summary-boundaries p {
  min-width: 0;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.48;
}

.summary-boundaries strong {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  letter-spacing: 0.025em;
}

.dossier-dependencies {
  display: grid;
  gap: 0.45rem;
  max-width: 58rem;
}

.dossier-dependencies-label {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.dossier-dependency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dossier-dependency {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--evidence);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.45;
  text-decoration: none;
}

.dossier-dependency strong { color: var(--text); font-size: 0.76rem; }
.dossier-dependency small { color: var(--link); font-weight: 750; }
.dossier-dependency:hover,
.dossier-dependency:focus-visible { border-color: var(--accent); }

.summary-judgments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
  max-width: 62rem;
}

.summary-judgment {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.45rem;
  min-width: 0;
  min-height: 3.6rem;
  padding: 0.55rem 0.62rem;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text);
  text-decoration: none;
}

.summary-judgment::before {
  content: "◇";
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--meta);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 850;
}

.summary-judgment.status-supported::before { content: "✓"; color: var(--evidence); }
.summary-judgment.status-qualified::before { content: "≈"; color: var(--warrant); }
.summary-judgment.status-underdetermined::before { content: "?"; color: var(--gap); }
.summary-judgment.status-not-established::before { content: "!"; color: var(--counter); }

.summary-judgment > span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.32;
}

.summary-judgment > strong {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.54rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1.3;
  text-transform: uppercase;
}

.summary-judgment:hover,
.summary-judgment:focus-visible {
  border-color: var(--accent);
  background: var(--accent-light);
}

.summary-glyph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  max-width: 62rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.6rem;
}

.summary-glyph-legend span { white-space: nowrap; }
.summary-glyph-legend strong { margin-right: 0.15rem; color: var(--text); }

.depth-links,
.record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.depth-links a,
.trace-button {
  min-height: 2.35rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--link);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.depth-links a:first-child {
  border-color: var(--accent);
  background: var(--accent-light);
}

.depth-links a:hover,
.trace-button:hover { border-color: var(--accent); }

.section-heading {
  max-width: 52rem;
  margin-bottom: 1.25rem;
}

.section-heading > span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  line-height: 1.35;
}

.section-heading p {
  max-width: 70ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Generated conclusion cards. */

.judgment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.judgment-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top-width: 4px;
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.judgment-card.status-supported { border-top-color: var(--evidence); }
.judgment-card.status-qualified { border-top-color: var(--warrant); }
.judgment-card.status-underdetermined { border-top-color: var(--gap); border-top-style: dashed; }
.judgment-card.status-not-established { border-top-color: var(--counter); }
.judgment-card.status-provisional { border-top-color: var(--meta); }

.judgment-card > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.2rem 0.6rem;
  min-height: 5.2rem;
  padding: 0.85rem 0.95rem;
  align-content: start;
  cursor: pointer;
  list-style: none;
}

.judgment-card > summary::-webkit-details-marker { display: none; }

.judgment-card > summary::before {
  content: "?";
  grid-row: 1 / span 3;
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--gap);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 850;
}

.judgment-card.status-supported > summary::before { content: "✓"; color: var(--evidence); }
.judgment-card.status-qualified > summary::before { content: "≈"; color: var(--warrant); }
.judgment-card.status-not-established > summary::before { content: "!"; color: var(--counter); }
.judgment-card.status-provisional > summary::before { content: "◇"; color: var(--meta); }

.judgment-id {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.judgment-title {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.43;
}

.judgment-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.28rem;
  padding: 0.12rem 0.36rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.025em;
  line-height: 1.3;
  text-transform: uppercase;
}

.judgment-status.status-supported { border-color: var(--evidence-border); color: var(--evidence); }
.judgment-status.status-qualified { border-color: var(--warrant-border); color: var(--warrant); }
.judgment-status.status-underdetermined { border-style: dashed; color: var(--gap); }
.judgment-status.status-not-established { border-color: var(--counter-border); color: var(--counter); }
.judgment-status.status-provisional { border-color: var(--meta-border); color: var(--meta); }

.judgment-body {
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.55;
}

.judgment-body p { margin: 0 0 0.65rem; }
.judgment-body p:last-child { margin-bottom: 0; }

/* Generated trail picker/controller. */

.guided-trails {
  padding: clamp(1.4rem, 4vw, 2.2rem) !important;
  border: 1px solid var(--border) !important;
  border-radius: calc(var(--dossier-radius) + 2px);
  background: var(--bg-aside);
}

.trail-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.trail-card > span {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
}

.trail-card > small {
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  line-height: 1.4;
}

.trail-controller {
  grid-template-columns: auto minmax(8rem, 1fr) auto auto;
  gap: 0.6rem;
  margin: 0;
  padding: 0.7rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  background: color-mix(in srgb, var(--bg-surface) 96%, transparent);
  box-shadow: 0 8px 30px rgba(44, 36, 24, 0.2);
}

.trail-controller:not([hidden]) {
  position: fixed;
  z-index: 90;
  right: auto;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  width: min(calc(100% - 2rem), 46rem);
  transform: translateX(-50%);
}

.trail-controller [data-trail-prev]::before,
.trail-controller [data-trail-next]::after { content: none; }

/* On a wide screen the trail controller belongs in the navigation rail, not
 * over the record it is teaching. The sidebar remains scrollable beneath it. */
@media (min-width: 70.01em) {
  .trail-controller:not([hidden]) {
    right: max(1rem, calc((100vw - 78rem) / 2));
    left: auto;
    width: 13.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none;
  }

  .trail-controller [data-trail-status] {
    grid-column: 1 / -1;
    text-align: left;
  }

  .trail-controller [data-trail-exit] { grid-column: 1 / -1; }

  .dossier-shell:has(> .dossier-explorer.has-active-trail) > .dossier-sidebar {
    padding-bottom: 10rem;
  }
}

/* Generated proof map. */

.proof-map {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.55fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.proof-map > .argument-spine {
  position: sticky;
  top: 1rem;
  max-height: calc(100svh - 2rem);
  padding: 0.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* A constrained flex column otherwise shrinks every row to fit the viewport,
 * while the row text keeps painting at its intrinsic height. Keep each claim
 * and inference intact and let the spine itself provide the scrollbar. */
.proof-map > .argument-spine > .argument-node,
.proof-map > .argument-spine > .inference-edge {
  flex: 0 0 auto;
}

.argument-node-title {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.4;
}

.proof-map .argument-node .judgment-status {
  margin: 0.4rem 0 0;
  font-size: 0.52rem;
}

.proof-map .inference-edge {
  grid-template-columns: 1.35rem minmax(0, 1fr);
  width: calc(100% - 1.15rem);
  min-height: 3rem;
  margin: 0.28rem 0 0.28rem 1.15rem;
  padding: 0.45rem 0.65rem;
}

.proof-map .inference-edge::before { display: none; }

.edge-line {
  position: absolute;
  top: -0.45rem;
  bottom: -0.45rem;
  left: -0.75rem;
  border-left: 2px solid var(--border);
}

.edge-arrow {
  display: inline-flex;
  width: 1.3rem;
  height: 1.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 850;
}

.inference-edge.status-supported .edge-arrow::before { content: "✓"; }
.inference-edge.status-qualified .edge-arrow::before { content: "≈"; }
.inference-edge.status-underdetermined .edge-arrow::before { content: "?"; }
.inference-edge.status-not-established .edge-arrow::before { content: "!"; }
.inference-edge .edge-arrow { font-size: 0; }
.inference-edge .edge-arrow::before { font-size: 0.68rem; }

.edge-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.edge-copy strong { color: var(--text); }
.edge-copy small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.proof-map > .focus-pane {
  position: sticky;
  top: 1rem;
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.focus-panel h3 {
  margin: 0.25rem 0 0.55rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
  font-weight: normal;
  line-height: 1.35;
}

.focus-kicker,
.objection-kicker {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.required-assumption {
  margin: 0.9rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--warrant-border);
  border-left: 4px solid var(--warrant);
  border-radius: 4px;
  background: var(--warrant-bg);
}

.required-assumption strong {
  color: var(--warrant);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.required-assumption p { margin: 0.25rem 0 0; font-size: 0.82rem; }

.focus-quote {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.6;
}

.focus-quote cite {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-style: normal;
}

.focus-links {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.7rem;
}

.focus-links strong { color: var(--text); margin-right: 0.25rem; }
.focus-links a { display: inline-block; margin: 0.1rem 0.15rem; }

.record-chip,
.inference-relation a {
  display: inline-flex;
  margin: 0.1rem 0.12rem;
  padding: 0.12rem 0.32rem;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  background: var(--bg-aside);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  line-height: 1.25;
  text-decoration: none;
}

.inference-relation {
  margin: 0.75rem 0;
  padding: 0.6rem 0.7rem;
  border: 1px dashed var(--warrant-border);
  border-radius: 4px;
  background: var(--warrant-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
}

/* Optional study-by-inference evidence ladder. */

.evidence-matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.64rem;
}

.evidence-matrix-legend li { display: inline-flex; gap: 0.32rem; align-items: center; }

.matrix-scroll-hint {
  margin: -0.35rem 0 0.45rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  text-align: right;
}

.matrix-legend-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-aside);
}

.matrix-tone-positive { background: var(--evidence-bg); border-color: var(--evidence-border); }
.matrix-tone-mixed { background: var(--counter-bg); border-color: var(--counter-border); }
.matrix-tone-constraint { background: var(--warrant-bg); border-color: var(--warrant-border); }
.matrix-tone-unestimated { background: var(--bg-aside); border-style: dashed; }

.evidence-matrix-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  overscroll-behavior-inline: contain;
}

.evidence-matrix-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 3px;
}

.evidence-matrix {
  width: 100%;
  min-width: 54rem;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.4;
}

.evidence-matrix th,
.evidence-matrix td {
  min-width: 7.6rem;
  padding: 0.65rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  text-align: left;
}

.evidence-matrix th:first-child { min-width: 10.5rem; }
.evidence-matrix thead th { background: var(--bg-aside); color: var(--text); }
.evidence-matrix tbody th { color: var(--text); font-weight: 700; }
.matrix-source-link { display: grid; gap: 0.25rem; }
.matrix-source-link small {
  color: var(--link);
  font-size: 0.56rem;
  font-weight: 600;
}
.evidence-matrix tr:last-child > * { border-bottom: 0; }
.evidence-matrix tr > *:last-child { border-right: 0; }

.evidence-matrix td[data-matrix-tone="positive"] { background: var(--evidence-bg); }
.evidence-matrix td[data-matrix-tone="mixed"] { background: var(--counter-bg); }
.evidence-matrix td[data-matrix-tone="constraint"] { background: var(--warrant-bg); }
.evidence-matrix td[data-matrix-tone="unestimated"] {
  background: var(--bg-aside);
  color: var(--text-tertiary);
}

.matrix-cell-status {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text-tertiary);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.matrix-cell-note { display: block; color: var(--text-secondary); }
.matrix-cell-links {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  white-space: nowrap;
}

/* Optional rival-framework / normative-decision grammar. */

.epistemic-grammar {
  display: grid;
  width: min(100%, 50rem);
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--warrant-border);
  border-left: 4px solid var(--warrant);
  border-radius: 4px;
  background: var(--warrant-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.5;
}

.epistemic-grammar > div { display: grid; gap: 0.1rem; }
.epistemic-grammar > div span {
  color: var(--text-tertiary);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.epistemic-grammar > div strong { color: var(--text); font-size: 0.78rem; }
.epistemic-grammar p,
.epistemic-grammar ul { margin: 0; }
.epistemic-grammar ul { padding-left: 1.15rem; }
.epistemic-grammar summary { cursor: pointer; color: var(--link); font-weight: 700; }

.argument-node-role {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.value-premise-grid,
.authority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.value-premise-card,
.authority-card,
.decision-scenario,
.decision-tradeoff {
  position: relative;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.value-premise-card { border-left: 4px solid var(--warrant); }
.authority-card { border-left: 4px solid var(--meta); }
.value-premise-card h3,
.authority-card h3,
.decision-scenario h3 {
  margin: 0.2rem 0 0.55rem;
  font-size: 1rem;
  line-height: 1.35;
}
.value-premise-card > p,
.authority-card > p { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.55; }
.premise-statement,
.framework-thesis,
.decision-question { color: var(--text) !important; font-size: 0.9rem !important; line-height: 1.6; }

.framework-kicker {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.representation-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0.2rem 0 0.45rem;
  padding: 0.14rem 0.38rem;
  border: 1px solid var(--meta-border);
  border-radius: 999px;
  background: var(--meta-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.54rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}

[data-representation="explicit"] > .representation-badge,
td[data-representation="explicit"] .representation-badge {
  border-color: var(--evidence-border);
  background: var(--evidence-bg);
  color: var(--evidence);
}
[data-representation="contested"] > .representation-badge,
td[data-representation="contested"] .representation-badge {
  border-color: var(--counter-border);
  background: var(--counter-bg);
  color: var(--counter);
}
[data-representation="variant-dependent"] > .representation-badge,
td[data-representation="variant-dependent"] .representation-badge {
  border-color: var(--gap-border);
  background: var(--gap-bg);
  color: var(--gap);
}

.normative-boundary,
.framework-matrix-boundary,
.decision-unresolved {
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--warrant-border);
  border-radius: 4px;
  background: var(--warrant-bg);
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.55;
}

.framework-list,
.decision-scenario-list,
.decision-options {
  display: grid;
  gap: 0.7rem;
}

.framework-card,
.decision-option {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.framework-card > summary,
.decision-option > summary {
  display: flex;
  min-height: 3.8rem;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}
.framework-card > summary::-webkit-details-marker,
.decision-option > summary::-webkit-details-marker { display: none; }
.framework-card > summary::after,
.decision-option > summary::after {
  content: "+";
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-weight: 850;
}
.framework-card[open] > summary::after,
.decision-option[open] > summary::after { content: "−"; }
.framework-card > summary > span:first-child,
.decision-option > summary > span:first-child { display: grid; gap: 0.14rem; min-width: 0; }
.framework-card > summary small,
.decision-option > summary small {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.framework-card > summary strong,
.decision-option > summary strong { font-size: 0.9rem; line-height: 1.35; }
.framework-card > summary .representation-badge { margin: 0 0 0 auto; flex: 0 0 auto; }

/* Provenance is supporting context, so give it a full row instead of making a
 * long qualification compete with the framework name and disclosure control. */
.framework-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.framework-card > summary > span:first-child {
  grid-column: 1;
  grid-row: 1;
}

.framework-card > summary .representation-badge {
  grid-column: 1 / -1;
  grid-row: 2;
  width: auto;
  max-width: 100%;
  margin: 0.5rem 0 0;
  justify-self: stretch;
  overflow-wrap: anywhere;
  white-space: normal;
}

.framework-card > summary::after {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

/* The generated focused-record marker and disclosure glyph are both
 * reader-facing controls. Reserve independent space for each. */
.dossier-explorer details.framework-card[data-record-id].is-record-active > summary {
  position: relative;
  padding-right: 0.9rem;
}

.dossier-explorer details.framework-card.is-record-active > summary > span:first-child {
  padding-right: 8rem;
}

.dossier-explorer details.framework-card.is-record-active::after {
  right: 2.5rem;
}

.framework-card-body,
.decision-option-body { padding: 0 0.9rem 0.9rem; border-top: 1px solid var(--border-light); }

.framework-dimensions,
.authority-dimensions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.framework-dimensions > div,
.authority-dimensions > div {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-aside);
}
.framework-dimensions dt,
.authority-dimensions dt {
  margin-bottom: 0.2rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.framework-dimensions dd,
.authority-dimensions dd {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}
.framework-dimensions dd ul { margin: 0; padding-left: 1rem; }

.framework-matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin: 0 0 0.8rem;
  padding: 0;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  list-style: none;
}
.framework-matrix-legend li { display: inline-flex; gap: 0.28rem; align-items: center; }
.framework-legend-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--meta-border);
  border-radius: 2px;
  background: var(--meta-bg);
}
.framework-legend-swatch[data-representation="explicit"] { background: var(--evidence-bg); border-color: var(--evidence-border); }
.framework-legend-swatch[data-representation="contested"] { background: var(--counter-bg); border-color: var(--counter-border); }
.framework-legend-swatch[data-representation="variant-dependent"] { background: var(--gap-bg); border-color: var(--gap-border); }
.framework-legend-swatch[data-representation="not-recorded"] { background: var(--bg-aside); border-style: dashed; }

.framework-matrix-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  overscroll-behavior-inline: contain;
}
.framework-matrix-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 3px;
}
.framework-matrix {
  width: 100%;
  min-width: 62rem;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  line-height: 1.42;
}
.framework-matrix th,
.framework-matrix td {
  min-width: 9rem;
  padding: 0.65rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  text-align: left;
}
.framework-matrix th:first-child { min-width: 10.5rem; }
.framework-matrix thead th { background: var(--bg-aside); color: var(--text); }
.framework-matrix th small { display: block; margin-top: 0.25rem; color: var(--text-tertiary); font-weight: 500; }
.framework-matrix tbody th {
  position: sticky;
  z-index: 1;
  left: 0;
  background: var(--bg-surface);
  box-shadow: 2px 0 0 var(--border-light);
}
.framework-matrix tbody th > a { display: block; font-weight: 750; }
.framework-matrix tr:last-child > * { border-bottom: 0; }
.framework-matrix tr > *:last-child { border-right: 0; }
.framework-cell-position,
.framework-cell-note,
.framework-cell-links { display: block; }
.framework-cell-position { color: var(--text); }
.framework-cell-note { margin-top: 0.35rem; color: var(--text-secondary); }
.framework-cell-links { margin-top: 0.45rem; color: var(--text-tertiary); font-size: 0.56rem; }

.decision-scenario { padding: 1rem; }
.fixed-facts {
  margin: 0.8rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--evidence-border);
  border-radius: 4px;
  background: var(--evidence-bg);
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.fixed-facts > strong { color: var(--evidence); font-family: var(--font-ui); font-size: 0.62rem; text-transform: uppercase; }
.fixed-facts ul { margin: 0.45rem 0 0; padding-left: 1.15rem; }
.decision-tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}
.decision-tradeoff-grid > div {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-size: 0.74rem;
}
.decision-tradeoff-grid > div > strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.decision-tradeoff-grid ul { margin: 0.35rem 0 0; padding-left: 1rem; }
.decision-condition {
  margin: 0.55rem 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}
.decision-condition ul { margin: 0.3rem 0 0; padding-left: 1rem; }
.decision-tradeoffs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}
.decision-tradeoff { border-left: 4px solid var(--warrant); }
.decision-tradeoff h4 { margin: 0.2rem 0 0.4rem; font-size: 0.86rem; }
.decision-tradeoff p { margin: 0.35rem 0; color: var(--text-secondary); font-size: 0.72rem; }

/* ---------- reader-operated conditional judgment ---------- */

.reader-judgment {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
  box-shadow: var(--dossier-shadow);
}

.reader-disclaimer {
  max-width: 72ch;
  margin: -0.45rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--warrant);
  background: var(--warrant-light);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.5;
}

.reader-judgment > .section-heading { margin-bottom: 0.75rem; }

.reader-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 1rem;
}

.reader-progress button {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
}

.reader-progress button[data-reader-answer-state="accept"],
.reader-progress button[data-reader-answer-state="reject"],
.reader-progress button[data-reader-answer-state="undecided"] {
  position: relative;
  border-color: var(--text-tertiary);
  background: var(--bg-aside);
  color: var(--text);
}

/* A/R/? keeps answer state visible without success/error colour semantics;
 * the button's generated aria-label supplies the same state to screen readers. */
.reader-progress button[data-reader-answer-state="accept"]::after,
.reader-progress button[data-reader-answer-state="reject"]::after,
.reader-progress button[data-reader-answer-state="undecided"]::after {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  display: inline-grid;
  width: 0.85rem;
  height: 0.85rem;
  place-items: center;
  border: 1px solid var(--text-tertiary);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.48rem;
  line-height: 1;
}

.reader-progress button[data-reader-answer-state="accept"]::after { content: "A"; }
.reader-progress button[data-reader-answer-state="reject"]::after { content: "R"; }
.reader-progress button[data-reader-answer-state="undecided"]::after { content: "?"; }
.reader-progress button.is-active { outline: 3px solid var(--accent-light); border-color: var(--accent); color: var(--accent); }

.reader-progress-status,
[data-reader-progress-status] {
  margin-left: 0.35rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 700;
}

.reader-step-stack { max-width: 56rem; }

.reader-judgment-step {
  scroll-margin-top: 6rem;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.reader-judgment:not(.is-enhanced) .reader-judgment-step + .reader-judgment-step { margin-top: 1rem; }

.reader-step-kicker {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.reader-step-kicker a { color: var(--link); }
.reader-judgment-step h3 { max-width: 46rem; margin: 0.4rem 0 0.35rem; font-size: clamp(1.05rem, 2.4vw, 1.35rem); line-height: 1.35; }
.reader-joint-label { margin: 0 0 1rem; color: var(--text-secondary); font-size: 0.78rem; }

.reader-responses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.reader-responses legend {
  width: 100%;
  margin: 0 0 0.45rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reader-response {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 8.25rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-aside);
  cursor: pointer;
  font-family: var(--font-ui);
}

.reader-response input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.reader-response > span { display: grid; gap: 0.35rem; align-content: start; }
.reader-response strong { color: var(--text); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; }
.reader-response small { color: var(--text-secondary); font-size: 0.68rem; line-height: 1.48; }
.reader-response:hover { border-color: var(--accent); }
.reader-response:has(input:focus-visible) { outline: 3px solid var(--accent-light); border-color: var(--accent); }
.reader-response.is-selected,
.reader-response:has(input:checked) { border-color: var(--accent); background: var(--accent-light); box-shadow: inset 0 0 0 1px var(--accent); }

.reader-change {
  min-height: 2.5rem;
  margin: 0.75rem 0;
  padding: 0.6rem 0.7rem;
  border-left: 3px solid var(--border);
  background: var(--bg-aside);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  line-height: 1.5;
}

.reader-change.has-answer { border-left-color: var(--accent); color: var(--text); }

.reader-inspect {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.reader-inspect details { min-width: 0; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-aside); }
.reader-inspect summary { padding: 0.55rem 0.65rem; cursor: pointer; color: var(--link); font-family: var(--font-ui); font-size: 0.67rem; font-weight: 750; }
.reader-inspect p { margin: 0; padding: 0 0.65rem 0.65rem; font-family: var(--font-ui); font-size: 0.64rem; line-height: 1.55; }
.reader-inspect .record-links a { overflow-wrap: anywhere; }

.reader-controls,
.reader-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
  align-items: center;
}

.reader-controls button,
.reader-result-actions button {
  min-height: 2.45rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--link);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 750;
}

.reader-controls [data-reader-next],
.reader-controls [data-reader-show-results] { margin-left: auto; border-color: var(--accent); background: var(--accent-light); }
.reader-controls button:disabled { cursor: not-allowed; opacity: 0.5; }

.reader-reason { margin: 1rem 0; }
.reader-reason label { display: block; margin-bottom: 0.35rem; font-weight: 700; }
.reader-reason label span { font-weight: 400; }
.reader-reason textarea, .reader-reuse textarea {
  box-sizing: border-box; width: 100%; min-width: 0; resize: vertical;
  padding: 0.65rem; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-surface); color: var(--text); font: inherit;
  font-size: 1rem; line-height: 1.5;
}
.reader-reason p, .reader-reuse p, .reader-save-status { font-size: 0.875rem; line-height: 1.5; }
.reader-reuse { margin: 1rem 0; padding: 0.8rem; border: 1px solid var(--border); border-radius: 4px; }
.reader-reuse summary { cursor: pointer; font-size: 1rem; font-weight: 700; }
.reader-reuse button { font-size: 0.875rem; }
.reader-saved-reason { white-space: pre-wrap; overflow-wrap: anywhere; }

.reader-results {
  scroll-margin-top: 6rem;
  max-width: 68rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--accent);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
}

.reader-results-head > span { color: var(--accent); font-family: var(--font-ui); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.reader-results-head h3 { margin: 0.3rem 0 0.4rem; font-size: 1.3rem; }
.reader-results-head p,
.reader-result-summary p { max-width: 75ch; color: var(--text-secondary); font-size: 0.72rem; line-height: 1.55; }

.reader-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.reader-result-grid > article { min-width: 0; padding: 0.8rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-aside); }
.reader-result-grid h4 { margin: 0 0 0.55rem; font-size: 0.82rem; }
.reader-result-record + .reader-result-record { margin-top: 0.65rem; padding-top: 0.65rem; border-top: 1px solid var(--border-light); }
.reader-result-record h5 { margin: 0 0 0.3rem; font-family: var(--font-ui); font-size: 0.69rem; }
.reader-result-record p,
.reader-result-record li,
.reader-unresolved-item,
.reader-result-empty { color: var(--text-secondary); font-family: var(--font-ui); font-size: 0.63rem; line-height: 1.5; }
.reader-result-record ul { margin: 0.3rem 0 0; padding-left: 1rem; }
.reader-result-record p { margin: 0.25rem 0; }
.reader-mixed { padding: 0.35rem 0.45rem; border-left: 3px solid var(--gap); background: var(--gap-light); color: var(--text) !important; }
[data-reader-copy-status] { color: var(--text-tertiary); font-family: var(--font-ui); font-size: 0.64rem; }
[data-reader-copy-status] input { display: inline-block; width: min(28rem, 100%); margin-left: 0.35rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.28rem 0.4rem; }
.reader-noscript { color: var(--counter); font-family: var(--font-ui); font-size: 0.7rem; }

/* Generated evidence ledger. */

.evidence-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-aside);
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.evidence-record {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 5px;
  background: var(--bg-surface);
}

.evidence-record[data-direction="supports"] { border-left-color: var(--evidence); }
.evidence-record[data-direction="qualifies"],
.evidence-record[data-direction="mixed"] { border-left-color: var(--warrant); border-left-style: dashed; }
.evidence-record[data-direction="challenges"] { border-left-color: var(--counter); }

.evidence-record > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  min-height: 4.4rem;
  padding: 0.78rem 0.85rem;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.evidence-record > summary::-webkit-details-marker { display: none; }

.evidence-record > summary::before {
  content: "Open record";
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-record[open] > summary::before { content: "Close record"; }

.evidence-title {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
}

.evidence-title small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: normal;
  line-height: 1.35;
}

.evidence-relation {
  padding: 0.15rem 0.38rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.evidence-relation.relation-supports { color: var(--evidence); }
.evidence-relation.relation-supports::before { content: "+ "; }
.evidence-relation.relation-qualifies { color: var(--warrant); }
.evidence-relation.relation-qualifies::before { content: "± "; }
.evidence-relation.relation-challenges { color: var(--counter); }
.evidence-relation.relation-challenges::before { content: "− "; }

.facet-access,
.facet-independence { border-style: dashed; }

.evidence-record-body {
  padding: 0.8rem 0.85rem 0.9rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

.evidence-record-body p { margin: 0 0 0.6rem; }
.evidence-record-body p:last-child { margin-bottom: 0; }

.facet-label {
  color: var(--text-tertiary);
  font-size: 0.56rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.facet-value { color: var(--text-secondary); }

.can-cannot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.can-establish,
.cannot-establish {
  padding: 0.65rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg);
}

.can-establish { border-left: 3px solid var(--evidence); }
.cannot-establish { border-left: 3px solid var(--counter); }
.can-establish strong::before { content: "✓ "; color: var(--evidence); }
.cannot-establish strong::before { content: "× "; color: var(--counter); }

.can-establish strong,
.cannot-establish strong {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.can-establish p,
.cannot-establish p { margin: 0.25rem 0 0; }

.open-limitation {
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--gap);
  background: var(--gap-bg);
}

.review-note {
  padding-left: 0.65rem;
  border-left: 3px solid var(--meta-border);
  color: var(--text-tertiary);
  font-size: 0.68rem;
}

.source-details {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
}

/* Generated adversarial, evolution, crux and editorial sections. */

.objection-card {
  margin: 0 0 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--counter-border);
  border-left: 4px solid var(--counter);
  border-radius: 5px;
  background: var(--counter-bg);
}

.objection-card h3 {
  margin: 0.25rem 0 0.5rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: normal;
}

.objection-card > p { margin: 0.45rem 0; font-size: 0.82rem; }

.dialogue-grid,
.revision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.dialogue-grid > div,
.revision-grid > div {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-surface);
}

.dialogue-grid strong,
.revision-grid strong {
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dialogue-grid p,
.revision-grid p { margin: 0.25rem 0 0; font-size: 0.75rem; }

.evolution-strip {
  position: relative;
  display: flex;
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 1.4rem 0.2rem 0.7rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.evolution-caution {
  max-width: 78ch;
  margin: -0.45rem 0 1rem;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--meta);
  background: var(--meta-bg);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.45;
}

.evolution-strip::before {
  content: "";
  position: absolute;
  top: 2rem;
  right: 1rem;
  left: 1rem;
  border-top: 2px solid var(--border);
}

.evolution-event {
  position: relative;
  z-index: 1;
  flex: 0 0 11.5rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface);
}

.evolution-event::before {
  content: "◆";
  position: absolute;
  top: -0.72rem;
  left: calc(50% - 0.45rem);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.8rem;
}

.evolution-event > summary {
  display: grid;
  gap: 0.25rem;
  min-height: 6.2rem;
  padding: 1rem 0.75rem 0.7rem;
  align-content: start;
  cursor: pointer;
  list-style: none;
}

.evolution-event > summary::-webkit-details-marker { display: none; }
.event-year { color: var(--accent); font-family: var(--font-ui); font-size: 0.68rem; font-weight: 850; }
.evolution-event > summary span:last-child { font-size: 0.74rem; line-height: 1.35; }

.evolution-body {
  padding: 0.7rem 0.75rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.5;
}

.evolution-body p { margin: 0 0 0.5rem; }

.crux-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.crux-grid .crux-card {
  padding-left: 3.2rem;
}

.crux-id {
  position: absolute;
  top: 0.9rem;
  left: 0.8rem;
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--warrant);
  border-radius: 50%;
  color: var(--warrant);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 850;
}

.crux-grid .crux-card h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  line-height: 1.4;
}

.crux-grid .crux-card > p { margin: 0; color: var(--text-secondary); font-size: 0.8rem; }

.resolution-path {
  margin: 0.75rem 0;
  padding: 0.65rem 0.7rem;
  border: 1px dashed var(--warrant-border);
  border-radius: 4px;
  background: var(--warrant-bg);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.resolution-path::before {
  content: "Test → ";
  color: var(--warrant);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resolution-path > strong { color: var(--text); }
.resolution-path p { margin: 0.25rem 0 0; }

.editorial-note {
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--meta-border);
  border-left: 5px solid var(--meta);
  border-radius: var(--dossier-radius);
  background: var(--meta-bg);
}

.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.67rem;
}

.editorial-note ol { margin: 1rem 0 1rem 1.2rem; }
.editorial-note li { margin-bottom: 0.55rem; font-size: 0.87rem; line-height: 1.55; }
.editorial-note > p { margin: 0; }

/* A guided trail can pause on any stable record, not only an argument panel.
 * The outline, inset marker and open disclosure make that current step clear
 * without relying on colour alone. */
.dossier-explorer [data-record-id].is-record-active {
  position: relative;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px var(--bg-surface), 0 7px 22px rgba(44, 36, 24, 0.12);
  scroll-margin-top: 5.5rem;
}

.dossier-explorer [data-record-id].is-record-active::after {
  content: "Focused record";
  position: absolute;
  z-index: 2;
  top: 0.35rem;
  right: 0.45rem;
  padding: 0.18rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dossier-explorer details[data-record-id].is-record-active > summary {
  padding-right: 8rem;
}

/* Desktop sidebar; becomes a sticky horizontal local nav on smaller screens. */

.dossier-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  max-height: calc(100svh - 2rem);
  padding: 0.8rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--dossier-radius);
  background: var(--bg-surface);
  box-shadow: 0 5px 18px rgba(44, 36, 24, 0.06);
  scrollbar-width: thin;
}

.dossier-sidebar .sidebar-heading { margin-bottom: 0.35rem; }

.dossier-sidebar a {
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  border-left: 3px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.69rem;
  line-height: 1.35;
  text-decoration: none;
}

.dossier-sidebar a:hover { background: var(--bg-aside); color: var(--text); }

.dossier-sidebar a.is-active,
.dossier-sidebar a[aria-current="location"] {
  border-left-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
  font-weight: 750;
}

.dossier-sidebar a.is-active::before,
.dossier-sidebar a[aria-current="location"]::before {
  content: "• ";
  color: var(--accent);
}

.dossier-sidebar hr {
  width: 100%;
  margin: 0.55rem 0;
  border: 0;
  border-top: 1px solid var(--border-light);
}

.dossier-sidebar a:not([data-local-nav]) { color: var(--text-tertiary); }

@media (max-width: 70em) {
  .dossier-shell {
    display: flex;
    width: min(100% - 2rem, 60rem);
    flex-direction: column;
    gap: 0;
  }

  .dossier-sidebar {
    position: sticky;
    z-index: 40;
    top: 0;
    order: -1;
    display: flex;
    width: 100%;
    max-height: none;
    padding: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    border-radius: 0 0 5px 5px;
    overscroll-behavior-inline: contain;
  }

  .dossier-sidebar .sidebar-heading,
  .dossier-sidebar hr,
  .dossier-sidebar a:not([data-local-nav]) { display: none; }

  .dossier-sidebar a {
    min-height: 2.6rem;
    padding: 0.65rem 0.7rem;
    flex: 0 0 auto;
    align-content: center;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .dossier-sidebar a.is-active,
  .dossier-sidebar a[aria-current="location"] { border-bottom-color: var(--accent); }

  /* With the local navigation occupying the top edge, keep active trail
   * controls directly below it. Focus targets reserve the same offset, so the
   * control never masks the record's opening lines on tablet or mobile. */
  .trail-controller:not([hidden]) {
    top: calc(3.25rem + env(safe-area-inset-top));
    bottom: auto;
  }

  .trail-controller [data-trail-status] {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .dossier-explorer.has-active-trail .proof-map > .focus-pane,
  .dossier-explorer.has-active-trail [data-record-id].is-record-active {
    scroll-margin-top: 12rem;
  }

  .dossier-hero { min-height: calc(100svh - 10rem); }
}

@media (max-width: 60em) {
  .proof-map { grid-template-columns: 1fr; }

  .proof-map > .argument-spine,
  .proof-map > .focus-pane {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .proof-map > .argument-spine { max-width: 38rem; margin: 0 auto; width: 100%; }
}

@media (max-width: 46em) {
  .summary-boundaries,
  .summary-judgments,
  .dossier-dependency-grid,
  .judgment-grid,
  .trail-picker,
  .evidence-list,
  .crux-grid,
  .value-premise-grid,
  .authority-grid,
  .framework-dimensions,
  .authority-dimensions,
  .reader-responses,
  .reader-inspect,
  .reader-result-grid,
  .decision-tradeoff-grid,
  .decision-tradeoffs { grid-template-columns: 1fr; }

  .dialogue-grid,
  .revision-grid,
  .can-cannot { grid-template-columns: 1fr; }

  .evidence-matrix-wrap { overflow: visible; border: 0; background: transparent; }
  .evidence-matrix { display: block; min-width: 0; }
  .evidence-matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .evidence-matrix tbody,
  .evidence-matrix tr,
  .evidence-matrix th,
  .evidence-matrix td { display: block; width: 100%; min-width: 0; }
  .evidence-matrix tr {
    margin-bottom: 0.8rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
  }
  .evidence-matrix tbody th {
    border-right: 0;
    background: var(--bg-aside);
  }
  .evidence-matrix td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.42fr) minmax(0, 0.58fr);
    gap: 0.65rem;
    border-right: 0;
  }
  .evidence-matrix td::before {
    content: attr(data-label);
    color: var(--text);
    font-weight: 700;
  }
  .evidence-matrix .matrix-cell-status,
  .evidence-matrix .matrix-cell-note { grid-column: 2; }
  .evidence-matrix .matrix-cell-note { margin-top: -0.7rem; }
  .evidence-matrix .matrix-cell-links { grid-column: 2; }
  .matrix-scroll-hint { display: none; }

  .framework-matrix-wrap { overflow: visible; border: 0; background: transparent; }
  .framework-matrix { display: block; min-width: 0; }
  .framework-matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .framework-matrix tbody,
  .framework-matrix tr,
  .framework-matrix th,
  .framework-matrix td { display: block; width: 100%; min-width: 0; }
  .framework-matrix tr {
    margin-bottom: 0.8rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
  }
  .framework-matrix tbody th {
    position: static;
    border-right: 0;
    background: var(--bg-aside);
    box-shadow: none;
  }
  .framework-matrix td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.38fr) minmax(0, 0.62fr);
    gap: 0.45rem 0.65rem;
    border-right: 0;
  }
  .framework-matrix td::before {
    content: attr(data-label);
    grid-row: 1 / span 4;
    color: var(--text);
    font-weight: 750;
  }
  .framework-matrix td > * { grid-column: 2; }
  .framework-matrix td .representation-badge { margin-top: 0; }

  .dossier-explorer > section { padding: 2.6rem 0; }
  .guided-trails { padding: 1rem !important; }
  .dossier-hero { min-height: auto; padding-top: 2.8rem !important; }
}

@media (max-width: 34em) {
  .provenance-strip { width: 100%; }
  .provenance-head { display: grid; gap: 0.2rem; }

  .trail-controller:not([hidden]) { grid-template-columns: repeat(3, 1fr); }
  .trail-controller [data-trail-status] { grid-column: 1 / -1; grid-row: 1; }

  .evidence-record > summary { grid-template-columns: 1fr; }
  .evidence-relation { width: fit-content; }

  .framework-card > summary { flex-wrap: wrap; }
  .framework-card > summary .representation-badge { margin-left: 0; }
}

@media print {
  .dossier-shell { display: block; width: 100%; }
  .dossier-sidebar { display: none !important; }
  .dossier-hero { min-height: auto; }
  .proof-map { display: block; }
  .proof-map > .argument-spine { margin-bottom: 1.5rem; }
  .proof-map > .focus-pane { max-height: none; overflow: visible; }
  .evidence-list { display: block; }
  .evidence-record { margin-bottom: 0.7rem; break-inside: avoid; }
  .framework-matrix { display: table; }
  .framework-matrix tbody { display: table-row-group; }
  .framework-matrix tr { display: table-row; }
  .framework-matrix th,
  .framework-matrix td { display: table-cell; }
  .framework-card,
  .value-premise-card,
  .authority-card,
  .decision-option,
  .decision-tradeoff { break-inside: avoid; }
}
.reader-saved-state { padding: 1rem; margin: 1rem 0; border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--bg-aside); }
.reader-saved-state details { margin-top: .8rem; }
.reader-saved-state summary { cursor: pointer; font-weight: 600; }
.reader-saved-state p { margin: .7rem 0; overflow-wrap: anywhere; }
