:root {
  --ink: var(--chitram-ink);
  --paper: var(--chitram-paper);
  --line: #dedbd5;
  --muted: #726c63;
  --accent: #c83d2c;
  font-family: var(--chitram-font-interface);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  border: 1px solid #c9c4bb;
  border-radius: 4px;
  background: transparent;
  padding: 10px 14px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
button:hover,
.button:hover {
  background: #ece8e1;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.primary:hover {
  background: #36312a;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #bd6637;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font:
    600 34px/1.2 Spectral,
    Georgia,
    serif;
  letter-spacing: -0.9px;
  margin-bottom: 12px;
}
h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
  margin: 0;
}
h3 {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
}
p {
  line-height: 1.65;
  font-size: 13px;
}
.small {
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.mono,
.eyebrow {
  font-family: 'Space Mono', ui-monospace, monospace;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
  color: var(--muted);
}
.desk-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
  gap: 24px;
}
.desk-brand {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
}
.publication-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.publication-lockup__qualifier {
  font:
    8px 'Space Mono',
    ui-monospace,
    monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.publication-lockup__name-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.publication-lockup__name {
  font:
    600 28px Spectral,
    Georgia,
    serif;
  letter-spacing: -1px;
}
.publication-lockup__signal {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff2d20;
}
.desk-product-name {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  font-size: 13px;
  font-weight: 600;
}
.desk-header nav {
  display: flex;
  gap: 26px;
  font-size: 12px;
}
.desk-header nav a {
  text-decoration: none;
}
.actor-chip {
  font:
    10px 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
}
.desk-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 36px 60px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.workspace-heading > div:first-child {
  max-width: 760px;
}
.heading-actions,
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.heading-actions {
  flex-shrink: 0;
}
.workspace-tabs {
  display: flex;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  gap: 30px;
}
.workspace-tabs button {
  border: 0;
  border-radius: 0;
  padding: 18px 0;
  display: flex;
  gap: 10px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 400;
  color: var(--muted);
  font-size: 10px;
}
.workspace-tabs b {
  font:
    600 12px 'Work Sans',
    system-ui,
    sans-serif;
}
.workspace-tabs button[aria-selected='true'] {
  box-shadow: inset 0 -2px var(--accent);
  color: var(--ink);
}
.workspace-tabs span {
  font-size: 10px;
  color: var(--accent);
}
.ledger-grid {
  display: grid;
  grid-template-columns: 220px minmax(290px, 0.95fr) minmax(340px, 1.2fr);
  gap: 24px;
}
.source-list,
.claim-list,
.evidence-panel,
.review-grid > section,
.draft-context {
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-heading > span {
  font-size: 10px;
  color: var(--muted);
}
.source-list .small {
  line-height: 1.6;
}
.source-card {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 14px 10px;
  border-color: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-weight: 400;
}
.source-card.selected {
  background: #eeebe4;
  border-left: 2px solid var(--ink);
}
.source-number {
  font:
    10px 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
  padding-top: 2px;
}
.source-card b {
  display: block;
  font-size: 11px;
}
.source-card small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  line-height: 1.5;
}
.source-card em {
  display: block;
  font-size: 9px;
  font-style: normal;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.5;
}
.source-footnote {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.claim-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fffdf9;
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 10px;
  font-weight: 400;
  border-radius: 5px;
}
.claim-card.selected {
  border-color: #968b78;
  box-shadow: inset 3px 0 #b5904e;
}
.claim-card-top,
.claim-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.claim-card-top .mono {
  font-size: 10px;
  color: var(--muted);
}
.claim-card h3 {
  font-size: 14px;
  margin: 14px 0;
  line-height: 1.6;
}
.claim-card-bottom {
  font-size: 9px;
  color: var(--muted);
}
.assessment {
  display: inline-block;
  border-radius: 3px;
  font:
    10px 'Space Mono',
    ui-monospace,
    monospace;
  padding: 5px 7px;
  background: #eee9e1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.verified,
.corroborated {
  background: #e1eee6;
  color: #2e6551;
}
.single_source {
  background: #e6ecf0;
  color: #3f5b70;
}
.speculative {
  background: #f7e9d7;
  color: #8a5b21;
}
.not_established {
  background: #ece8e2;
  color: #6d6357;
}
.conflicting {
  background: #f5dfdb;
  color: #a23524;
}
.evidence-panel {
  background: #f0ede6;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 24px;
  align-self: start;
}
.claim-detail {
  padding-bottom: 20px;
  border-bottom: 1px solid #d5cfc3;
}
.claim-detail h3 {
  font:
    600 22px/1.4 Spectral,
    Georgia,
    serif;
  margin: 15px 0 10px;
}
.claim-detail p {
  font-size: 12px;
}
.citation-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.citation-links button {
  font-size: 10px;
  padding: 6px 8px;
}
.source-excerpt {
  padding-top: 24px;
}
.source-excerpt h3 {
  font-size: 12px;
}
.evidence-text {
  font:
    18px/1.8 Spectral,
    Georgia,
    serif;
  white-space: pre-wrap;
}
.source-excerpt a {
  font-size: 11px;
  font-weight: 600;
}
mark {
  background: #efd6a0;
  color: inherit;
  padding: 2px 0;
}
.run-metadata {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 20px;
  font:
    9px/1.8 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
}
.review-grid,
.draft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.proposal-card,
.fact-card,
.run-card,
.bundle-tile {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 24px;
  margin-bottom: 14px;
}
.proposal-card h3 {
  font:
    600 24px/1.4 Spectral,
    Georgia,
    serif;
}
.saved-decision {
  padding: 12px;
  background: #e5eee7;
  font-size: 11px;
  margin: 16px 0;
}
.saved-decision p {
  font-size: 11px;
  margin: 8px 0 0;
}
details {
  margin: 12px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
blockquote {
  padding-left: 14px;
  border-left: 2px solid #c5b89c;
  line-height: 1.7;
  margin: 16px 0;
}
cite {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: var(--muted);
}
.fact-card h3 {
  font-size: 14px;
  margin-top: 14px;
}
.draft-paper {
  padding: 30px;
  background: #fffdf9;
  border: 1px solid var(--line);
}
.draft-paper article {
  padding-top: 36px;
}
.draft-paper article h1 {
  font-size: 36px;
}
.draft-paper article p {
  font:
    18px/1.8 Spectral,
    Georgia,
    serif;
}
.draft-paper article .small {
  font:
    10px 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.65 'Space Mono',
    ui-monospace,
    monospace;
  background: #eeebe5;
  padding: 16px;
}
.empty {
  padding: 36px 12px;
  color: var(--muted);
}
.notice,
.pending,
.fixture-notice,
.error {
  padding: 14px 18px;
  font-size: 12px;
  margin: 0 0 18px;
  border-left: 3px solid #9f8a55;
  background: #efe8d8;
}
.error {
  border-color: #bb3429;
  background: #f9e4df;
}
.notice {
  border-color: #4f775d;
  background: #e5eee7;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 18px 0;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #c7c0b5;
  border-radius: 4px;
  background: white;
  padding: 10px;
  font-size: 13px;
  color: var(--ink);
}
textarea {
  min-height: 85px;
  resize: vertical;
}
.evidence-entry {
  min-height: 160px;
}
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.source-editor {
  border: 1px solid var(--line);
  padding: 18px 24px;
  margin: 30px 0;
}
.source-editor legend {
  font:
    11px 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
}
.bundle-editor {
  max-width: 950px;
}
.desk-dashboard {
  max-width: 1100px;
}
.bundle-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.seed-tile {
  background: #efe8db;
  padding: 32px;
  border: 1px solid #d6c8ad;
  border-radius: 6px;
  margin-bottom: 30px;
}
.seed-tile h2 {
  font:
    600 30px Spectral,
    Georgia,
    serif;
  margin: 12px 0;
}
.seed-tile p {
  max-width: 600px;
}
.bundle-tile h2 {
  font:
    600 24px/1.35 Spectral,
    Georgia,
    serif;
  margin: 12px 0;
}
.eval-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.metric {
  border: 1px solid var(--line);
  background: #fffdf9;
  padding: 18px;
}
.metric b {
  display: block;
  font:
    600 28px Spectral,
    Georgia,
    serif;
  margin-bottom: 8px;
}
.metric span {
  font-size: 11px;
}
.metric small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.eval-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.history-panel {
  max-width: 1000px;
}
.run-card h3 {
  margin-bottom: 0;
}
.run-card time {
  font-size: 11px;
  color: var(--muted);
}
.eval-run-row {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.eval-run-row a {
  font-size: 15px;
  font-weight: 600;
}
.eval-run-row p {
  font-size: 11px;
  margin: 8px 0;
}
.desk-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  font:
    10px 'Space Mono',
    ui-monospace,
    monospace;
  color: var(--muted);
}
@media (min-width: 1400px) {
  .ledger-grid {
    grid-template-columns: 245px minmax(350px, 1fr) minmax(410px, 1.2fr);
    gap: 30px;
  }
}
@media (max-width: 1100px) {
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .heading-actions {
    flex-shrink: 1;
  }
  .ledger-grid {
    grid-template-columns: 190px 1fr;
  }
  .evidence-panel {
    grid-column: 1/-1;
  }
  .desk-product-name {
    display: none;
  }
}
@media (max-width: 767px) {
  .desk-header {
    padding: 15px 18px;
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    gap: 15px;
  }
  .desk-header nav {
    gap: 18px;
  }
  .actor-chip {
    display: none;
  }
  .desk-main {
    padding: 24px 18px 40px;
  }
  h1 {
    font-size: 28px;
  }
  .workspace-tabs {
    gap: 18px;
    flex-wrap: wrap;
  }
  .workspace-tabs button {
    padding: 12px 0;
  }
  .ledger-grid,
  .review-grid,
  .draft-grid,
  .bundle-list,
  .eval-grid,
  .input-grid {
    display: block;
  }
  .source-list {
    margin-bottom: 24px;
  }
  .source-card {
    padding: 10px;
  }
  .source-footnote {
    margin-top: 10px;
  }
  .evidence-panel {
    margin-top: 24px;
    padding: 18px;
  }
  .review-grid > section {
    margin-bottom: 24px;
  }
  .draft-paper {
    padding: 20px;
  }
  .draft-context {
    margin-top: 24px;
  }
  .eval-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .desk-footer {
    gap: 14px;
    flex-wrap: wrap;
  }
  .eval-run-row {
    display: block;
  }
  .heading-actions button {
    padding: 10px;
  }
  .source-editor {
    padding: 12px;
  }
}
