/* === kubishi.css === */
/* Site-specific styling, carried over from the Quartz build.
   Loaded automatically from .obsidian/snippets/ and served as /user.css. */

/* ── Byzantine Generals message tables ─────────────────────────────────── */

.bgp-table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.bgp-table th,
.bgp-table td {
  border: 1px solid var(--rule);
  padding: 8px 12px;
  text-align: center;
}

.bgp-table th {
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  font-weight: 600;
}

.bgp-table .attack { background-color: rgba(136, 255, 136, 0.3); }
.bgp-table .attack strong { color: #16a34a; font-weight: 700; }

.bgp-table .retreat { background-color: rgba(255, 136, 136, 0.3); }
.bgp-table .retreat strong { color: #dc2626; font-weight: 700; }

.bgp-table .empty { background: color-mix(in srgb, var(--muted) 12%, transparent); }

.bgp-table .majority-row { border-top: 5px double var(--rule); }

.bgp-table .decision-label {
  padding: 2px !important;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
}

:root[data-theme="dark"] .bgp-table .attack { background-color: rgba(136, 255, 136, 0.2); }
:root[data-theme="dark"] .bgp-table .attack strong { color: #22c55e; }
:root[data-theme="dark"] .bgp-table .retreat { background-color: rgba(255, 136, 136, 0.2); }
:root[data-theme="dark"] .bgp-table .retreat strong { color: #ef4444; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .bgp-table .attack { background-color: rgba(136, 255, 136, 0.2); }
  :root[data-theme="auto"] .bgp-table .attack strong { color: #22c55e; }
  :root[data-theme="auto"] .bgp-table .retreat { background-color: rgba(255, 136, 136, 0.2); }
  :root[data-theme="auto"] .bgp-table .retreat strong { color: #ef4444; }
}

/* ── > [!pull] pull quotes ─────────────────────────────────────────────── */

.callout[data-callout="pull"] {
  background: transparent;
  border: none;
  padding: 1.5rem 0;
  margin: 2rem 0;
  font-size: 1.35rem;
  font-style: italic;
  text-align: center;
  line-height: 1.6;
  max-width: 85%;
  margin-inline: auto;
}

.callout[data-callout="pull"]::before,
.callout[data-callout="pull"]::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
}

.callout[data-callout="pull"]::before { margin-bottom: 1.5rem; }
.callout[data-callout="pull"]::after { margin-top: 1.5rem; }

.callout[data-callout="pull"] > .callout-title { display: none; }
.callout[data-callout="pull"] > p { margin: 0; }

/* ── Reading list ──────────────────────────────────────────────────────── */

/* `cite: key` markers. Small, and quiet until hovered, so a paragraph with
   several of them still reads as prose. */
sup.citations {
  font-size: 0.72em;
  letter-spacing: 0.01em;
}

sup.citations a { text-decoration: none; }
sup.citations a:hover { text-decoration: underline; }

/* Jumping to an entry should land it clear of the viewport edge and make it
   obvious which one was hit. The anchor is an empty span inside the <li>. */
span[id^="ref-"] { scroll-margin-top: 3rem; }

li:has(> span[id^="ref-"]:target) {
  background: var(--wikilink-bg);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  margin-left: -0.4rem;
}

