:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #57534e;
  --faint: #a8a29e;
  --line: #e7e5e4;
  --paper: #ffffff;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Liberation Serif", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --label: 150px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

button, a { font-family: inherit; }

.pfd {
  padding: 22px 14px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.pfd-header { text-align: center; margin-bottom: 18px; }

.pfd-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pfd-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.7rem, 4.6vw, 2.55rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.pfd-subtitle {
  margin: 12px auto 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.pfd-credit {
  margin: 10px auto 0;
  max-width: 42rem;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.45;
}

.pfd-credit a { color: #44403c; }

.pfd-hint {
  margin: 14px auto 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.pfd-columns {
  display: grid;
  grid-template-columns: var(--label) 1fr var(--label);
  gap: 0;
  align-items: end;
  margin-bottom: 4px;
}

.pfd-colhead { padding-bottom: 6px; }

.pfd-colhead.left { text-align: right; padding-right: 16px; }
.pfd-colhead.right { text-align: left; padding-left: 16px; }

.pfd-colhead strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.pfd-colhead span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pfd-stage { position: relative; }

.pfd-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: manipulation;
}

.pfd-svg text {
  font-family: var(--sans);
  cursor: pointer;
}

.pfd-bg { cursor: default; }

.pfd-link { cursor: pointer; }
.pfd-link .line { fill: none; stroke-linecap: round; mix-blend-mode: multiply; }
.pfd-link .halo { fill: none; stroke: #fff; stroke-linecap: round; pointer-events: none; }
.pfd-link .hit { fill: none; stroke: transparent; stroke-linecap: round; }

.pfd-book { cursor: pointer; }
.pfd-ref text { cursor: pointer; }
.pfd-ref:hover text { text-decoration: underline; text-underline-offset: 3px; }
.pfd-svg a { cursor: pointer; }

.pfd-bubble {
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.1);
  padding: 7px 10px 8px;
  line-height: 1.25;
  pointer-events: auto;
}

.pfd-bubble-label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  white-space: normal;
}

.pfd-bubble-cite {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

.pfd-callouts {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.pfd-chip, .pfd-key, .pfd-clear {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

.pfd-chip:hover, .pfd-key:hover, .pfd-clear:hover { border-color: #a8a29e; }

.pfd-chip[aria-pressed="true"], .pfd-key[aria-pressed="true"] {
  border-color: var(--swatch, var(--ink));
  box-shadow: inset 0 0 0 1px var(--swatch, var(--ink));
  background: #fafaf9;
}

.pfd-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pfd-swatch {
  width: 18px;
  height: 4px;
  border-radius: 99px;
  background: var(--swatch);
}

.pfd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.pfd-legend-label {
  width: 100%;
  margin: 0 0 2px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.pfd-note, .pfd-footnote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 48rem;
}

.pfd-tooltip {
  position: fixed;
  z-index: 20;
  width: min(420px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: var(--ink);
  border: 1px solid #d6d3d1;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.14);
  padding: 12px 14px 10px;
  pointer-events: auto;
}

.pfd-tooltip.is-pinned { pointer-events: auto; }

.pfd-open {
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
  color: #1d4e89;
}

.pfd-refname a { color: inherit; }

.pfd-tooltip[hidden] { display: none; }

.pfd-tip-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.35;
}

.pfd-tip-kicker {
  margin: 10px 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}

.pfd-tip-ref {
  margin: 0 0 2px;
  font-size: 0.86rem;
  font-weight: 700;
}

.pfd-tip-passage {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pfd-tip-more {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.vn {
  color: var(--faint);
  font-family: var(--sans);
  font-size: 0.72em;
  font-weight: 650;
  margin-right: 0.28em;
  letter-spacing: 0;
}

.pfd-detail { margin-top: 22px; }
.pfd-detail[hidden] { display: none; }

.pfd-detail-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.pfd-detail-bar h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 560;
  line-height: 1.2;
}

.pfd-detail-meta {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pfd-entry {
  padding: 18px 0 6px;
  border-bottom: 1px solid var(--line);
}

.pfd-entry h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 560;
  line-height: 1.3;
}

.pfd-entry-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pfd-refblock h4 {
  margin: 16px 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pfd-refname {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 1rem;
}

.pfd-passage {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
}

.pfd-info {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.pfd-status, .pfd-error {
  padding: 24px 16px;
  color: var(--muted);
}

@media (min-width: 800px) {
  .pfd { padding: 36px 28px 48px; }
}

@media (max-width: 759px) {
  .pfd-callouts { display: flex; }
  .pfd-title { letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
