/* Archive documents — index and reader */

.document-group {
  margin-bottom: 2rem;
}

.document-group h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.document-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.document-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.document-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: inherit;
}

.document-list-title {
  font-family: var(--font-body);
  font-size: 1rem;
  flex: 1 1 14rem;
  line-height: 1.4;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.document-list a:hover .document-list-title {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
}

.document-list-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Single document reader */
.document-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.document-meta {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.document-back {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin: 0;
}

.document-back a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.document-back a:hover {
  text-decoration-thickness: 1.5px;
}

.prose {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--ink-soft);
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.1rem; }

.prose p {
  margin: 0 0 1rem;
}

.prose p.doc-para {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
}

.prose .doc-para-num {
  flex: 0 0 auto;
  min-width: 2.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.prose .doc-para-body {
  flex: 1 1 auto;
  min-width: 0;
}

.prose ul, .prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--paper-warm);
  font-family: var(--font-display);
  color: var(--ink);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--paper-warm);
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
}

/* Timeline / polities source tags as links */
a.timeline-source-tag {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  color: var(--accent);
}

a.timeline-source-tag:hover {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  border-color: var(--accent);
  background: var(--accent-pale);
}
