@import url("/leads/methodology.css");
@import url("/leads/notes.css");

.leads-page.ps-lead { max-width: 68rem; margin: 1.6rem auto 3rem; }
.ps-lead {
  --ps-accent: #8f2d1e;
  --ps-castres: #a62b1c;
  --ps-lectoure: #22544b;
  --ps-nimes: #39567a;
  --ps-toulon: #7c5821;
  --ps-amber: #d89b28;
  --ps-paper: #f7f3e9;
  --ps-on-accent: #ffffff;
}
[data-theme="dark"] .ps-lead {
  --ps-accent: #e06a55;
  --ps-castres: #eb6a56;
  --ps-lectoure: #5eb5a4;
  --ps-nimes: #7fa8d8;
  --ps-toulon: #d8a95d;
}
.ps-lead a { text-underline-offset: .17em; }
.ps-lead figure { min-width: 0; margin: 0; }
.ps-lead figcaption { margin: .5rem 0 0; font: .88rem/1.44 var(--serif); color: var(--muted); }

/* Masthead */
.ps-mast {
  margin: 1.5rem 0 1.4rem;
  border-block: 1px solid var(--ink);
  padding: clamp(1.2rem, 3vw, 2.2rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(14rem, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
}
.ps-mast .page-title {
  margin: .65rem 0 .9rem;
  max-width: 21ch;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.ps-deck {
  max-width: 50ch;
  margin: 0 0 1.15rem;
  color: var(--ink-2);
  font: clamp(1.06rem, 1.75vw, 1.25rem)/1.48 var(--serif);
}
.ps-jumps {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .45rem;
  font: .81rem/1.6 var(--mono);
  color: var(--muted);
}
.ps-jumps a { white-space: nowrap; }
.ps-plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.ps-plates img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--ps-paper);
}
.ps-plates figcaption {
  font: .77rem/1.36 var(--mono);
  margin-top: .4rem;
  color: var(--muted);
}

/* Body prose */
.ps-lead .lead-passage { color: var(--ink-2); font: 1.18rem/1.58 var(--serif); }
.ps-lead .lead-passage > h2 {
  margin: 1.9rem 0 .65rem;
  border: 0;
  padding: 0;
  font: 500 clamp(1.56rem, 2.9vw, 2.06rem)/1.15 var(--serif);
  letter-spacing: -.025em;
  color: var(--ink);
}
.ps-lead .lead-passage > h3 {
  margin: 1.45rem 0 .5rem;
  border: 0;
  padding: 0;
  font: 500 clamp(1.18rem, 2vw, 1.4rem)/1.22 var(--serif);
  color: var(--ink);
}
.ps-lead .lead-passage > p { margin: 0 0 .9em; }
.ps-lead :is(#roche-1795, #triangulation-map, #birthplace-map, #chronology-split, #scan-dossier, #killer-audit, #archival-roadmap, #methodology) {
  scroll-margin-top: 5.5rem;
}
.ps-eyebrow {
  margin: 0 0 .3rem;
  font: 500 .74rem/1.35 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.ps-pull {
  margin: 1.1rem 0 1.25rem;
  padding: .9rem 1.2rem;
  border-left: 3px solid var(--ps-accent);
  background: var(--bg-2);
  font: italic 1.2rem/1.48 var(--serif);
  color: var(--ink);
}

/* Roche featured discovery box */
.ps-feature-box {
  margin: 1.1rem 0 1.4rem;
  padding: clamp(1rem, 2.8vw, 1.75rem);
  border: 1px solid var(--rule);
  background: var(--bg-2);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
  gap: clamp(1.1rem, 3vw, 2rem);
  align-items: start;
}
.ps-feature-copy {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.ps-feature-copy h3 {
  margin: 0 0 .7rem;
  font: 500 1.32rem/1.22 var(--serif);
  color: var(--ink);
}
.ps-feature-quote {
  margin: .75rem 0;
  padding: .7rem .9rem;
  border-left: 3px solid var(--ps-castres);
  background: color-mix(in srgb, var(--ps-castres) 6%, var(--bg));
  font: 1.04rem/1.52 var(--serif);
  color: var(--ink);
}
.ps-feature-meta {
  margin: .75rem 0 0;
  padding-top: .65rem;
  border-top: 1px solid var(--rule);
  font: .8rem/1.48 var(--mono);
  color: var(--muted);
}

/* Scan frames */
.ps-scan-link {
  display: block;
  position: relative;
  border: 1px solid var(--rule);
  background: var(--ps-paper);
  overflow: hidden;
  transition: border-color .16s ease, transform .16s ease;
}
.ps-scan-link:hover {
  border-color: var(--ps-accent);
}
.ps-scan-link img {
  display: block;
  width: 100%;
  height: auto;
}
.ps-scan-zoom {
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  padding: .22rem .5rem;
  background: rgba(24, 20, 16, .84);
  color: #f7f3e9;
  font: 500 .7rem/1.2 var(--mono);
  letter-spacing: .03em;
  border-radius: 2px;
}

/* Candidate evidence belongs to the article; the atlas supplies its own map furniture. */
.ps-evidence[hidden] { display: none; }
.ps-map-shell { display: block; margin: 1.2rem 0 2.2rem; }
.ps-map-controls { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 1rem; }
.ps-hyp-btn { appearance: none; text-align: left; border: 0; border-bottom: 2px solid var(--rule);
  background: transparent; color: var(--ink); padding: .65rem .85rem; cursor: pointer; }
.ps-hyp-btn strong { display: block; font: 600 1.1rem/1.25 var(--serif); }
.ps-hyp-btn span { display: block; margin-top: .16rem; color: var(--muted); font: .78rem/1.3 Arial, sans-serif; }
.ps-hyp-btn:hover { background: var(--bg-2); }
.ps-hyp-btn[aria-pressed="true"] { border-color: var(--ps-castres); background: color-mix(in srgb,var(--ps-castres) 6%,var(--bg)); }
.ps-hyp-btn[aria-pressed="true"] strong { color: var(--ps-castres); }
.ps-evidence:not([hidden]) { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.2fr);
  gap: clamp(1rem,4vw,3.5rem); padding-block: 1.3rem .3rem; }
.ps-evidence-summary h3 { font: 600 clamp(1.3rem,2.2vw,1.8rem)/1.15 var(--serif); margin: 0; }
.ps-evidence-summary > p { font: .88rem/1.5 Arial,sans-serif; color: var(--ink-2); margin: .5rem 0 1.1rem; }
.ps-panel-scores { display: flex; gap: 1.5rem; margin: 0; }
.ps-panel-scores dt, .ps-distances dt { color: var(--muted); font: .78rem/1.4 Arial,sans-serif; }
.ps-panel-scores dd { margin: .1rem 0 0; font: 600 1.06rem/1.4 var(--mono); }
.ps-distances { margin-top: 1rem; font: .83rem/1.4 Arial,sans-serif; }
.ps-distances summary { cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.ps-distances dl { margin: .6rem 0; }
.ps-distances dl div { padding: .25rem 0; }
.ps-distances dd { margin: 0; }
.ps-panel-checks { list-style: none; margin: 0; padding: 0; font: .95rem/1.45 var(--serif); color: var(--ink-2); }
.ps-panel-checks li { padding: .45rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: .9rem 1fr; gap: .45rem; }
.ps-panel-checks li > span:first-child { font-family: var(--mono); font-weight: 700; }
.ps-check-ok { color: #246b45; }
.ps-check-warn { color: #965907; }
.ps-check-fail { color: #a62b1c; }
[data-theme="dark"] .ps-check-ok { color: #63c48e; }
[data-theme="dark"] .ps-check-warn { color: #e2a54b; }
[data-theme="dark"] .ps-check-fail { color: #eb6a56; }
@media (max-width: 640px) {
  .ps-dossier-list { grid-template-columns: minmax(0,1fr); }
  .ps-dossier-list .ps-entry summary { grid-template-columns: minmax(0,1fr) auto; gap: .35rem; }
  .ps-entry-cat { justify-self: start; }
  .ps-entry-title { grid-column: 1 / -1; grid-row: 2; }
  .ps-entry-page { grid-column: 2; grid-row: 1; }

  .ps-evidence:not([hidden]) { grid-template-columns: 1fr; }
  .ps-hyp-btn { padding: .55rem .3rem; }
  .ps-hyp-btn strong { font-size: 1rem; }
  .ps-hyp-btn span { font-size: .7rem; }
}

/* Chronology Split comparator */
.ps-chrono-grid {
  margin: 1rem 0 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.ps-chrono-card {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: .85rem;
}
.ps-chrono-tag {
  display: inline-block;
  margin-bottom: .45rem;
  padding: .15rem .45rem;
  font: 600 .7rem/1.25 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.ps-chrono-tag.is-older { color: var(--ps-castres); border-color: var(--ps-castres); }
.ps-chrono-tag.is-younger { color: var(--ps-lectoure); border-color: var(--ps-lectoure); }
.ps-chrono-card h4 {
  margin: 0 0 .55rem;
  font: 600 1rem/1.28 var(--serif);
  color: var(--ink);
}
.ps-chrono-card p {
  margin: .55rem 0 0;
  font: .89rem/1.45 var(--serif);
  color: var(--ink-2);
}

/* Primary-Source Dossier */
.ps-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .9rem 0 1rem;
}
.ps-filter-btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-2);
  padding: .36rem .68rem;
  font: 500 .76rem/1.25 var(--mono);
  cursor: pointer;
}
.ps-filter-btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.ps-dossier-list {
  display: grid;
  gap: .8rem;
  margin: 0 0 1.4rem;
}
.ps-entry {
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.ps-entry summary {
  list-style: none;
  cursor: pointer;
  padding: .85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: .75rem;
}
.ps-entry summary::-webkit-details-marker { display: none; }
.ps-entry-cat {
  font: 600 .7rem/1.25 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .16rem .42rem;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ps-accent);
  white-space: nowrap;
}
.ps-entry-title {
  font: 500 1.08rem/1.3 var(--serif);
  color: var(--ink);
}
.ps-entry-page {
  font: .75rem/1.25 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.ps-entry-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.15rem;
  padding-top: 1rem;
  align-items: start;
}
.ps-entry-quote {
  margin: 0 0 .7rem;
  padding: .65rem .85rem;
  border-left: 3px solid var(--ps-amber);
  background: var(--bg);
  font: italic 1rem/1.48 var(--serif);
  color: var(--ink);
}
.ps-entry-note {
  margin: 0 0 .65rem;
  font: .95rem/1.5 var(--serif);
  color: var(--ink-2);
}
.ps-entry-cite {
  margin: 0;
  font: .76rem/1.45 var(--mono);
  color: var(--muted);
}

/* Tables */
.ps-table-wrap {
  margin: 1rem 0 1.4rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
}
.ps-table {
  width: 100%;
  border-collapse: collapse;
  font: .9rem/1.42 var(--serif);
  background: var(--bg);
}
.ps-table th, .ps-table td {
  padding: .62rem .75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.ps-table th {
  font: 600 .73rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--bg-2);
  color: var(--muted);
}
.ps-table .col-mono {
  font: .78rem/1.35 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.ps-status {
  display: inline-block;
  padding: .12rem .42rem;
  font: 600 .7rem/1.25 var(--mono);
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.ps-status-lead { color: var(--ps-castres); }
.ps-status-proved { color: #246b45; }
.ps-status-tension { color: #a86414; }
[data-theme="dark"] .ps-status-proved { color: #63c48e; }
[data-theme="dark"] .ps-status-tension { color: #e2a54b; }

/* Killer Audit & Roadmap lists */
.ps-audit-grid {
  margin: 1rem 0 1.3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.ps-audit-card {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: .95rem 1.05rem;
}
.ps-audit-card h4 {
  margin: 0 0 .45rem;
  font: 600 1.05rem/1.28 var(--serif);
  color: var(--ink);
}
.ps-audit-card p {
  margin: 0;
  font: .94rem/1.5 var(--serif);
  color: var(--ink-2);
}
.ps-next-list { margin: .65rem 0 1.2rem; padding-left: 1.35rem; }
.ps-next-list li { margin: .6rem 0; }
.ps-next-list li::marker { color: var(--ps-accent); font: 600 .86em/1 var(--mono); }

/* Lightbox */
.ps-lightbox {
  max-width: min(94vw, 68rem);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
}
.ps-lightbox::backdrop { background: rgba(16, 13, 10, .78); }
.ps-lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}
.ps-lightbox-caption {
  margin: 0;
  font: .82rem/1.4 var(--mono);
  color: var(--ink-2);
}
.ps-lightbox-close {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  padding: .3rem .65rem;
  font: 600 .78rem/1.2 var(--mono);
  cursor: pointer;
  white-space: nowrap;
}
.ps-lightbox-stage {
  overflow: auto;
  max-height: calc(92vh - 4rem);
  padding: 1rem;
  background: #1a1714;
  text-align: center;
}
.ps-lightbox-stage img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

@media (max-width: 860px) {
  .ps-mast, .ps-feature-box, .ps-chrono-grid, .ps-entry-body, .ps-audit-grid {
    grid-template-columns: 1fr;
  }
}
