/*
Theme Name: Complete Story
Description: A plain, readable theme for publishing court files in full.
Version: 1.7.0
Author: —
*/

:root {
  --paper:      #FBF9F5;
  --paper-2:    #F3EFE7;
  --ink:        #16202B;
  --ink-soft:   #5A6470;
  --rule:       #E0DACF;
  --accent:     #8A3324;
  --accent-dim: #B4695A;
  --shadow:     rgba(22, 32, 43, .10);

  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 34rem;
  --wide:    64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #14181D;
    --paper-2: #1C222A;
    --ink:     #E6E2DA;
    --ink-soft:#9AA3AD;
    --rule:    #2C333C;
    --accent:  #D98570;
    --accent-dim: #B4695A;
    --shadow:  rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1.5rem;
}
.site-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0;
}
.site-title a { color: var(--ink); text-decoration: none; }

/* The mark: a redaction bar that hides nothing. Same device the pages use
   for C.W. and M.W. — the point of the site in one shape. */
.logo {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .18em;
  line-height: 1;
}
.logo-bar {
  background: var(--ink);
  color: var(--paper);
  padding: .42em .5em .42em .62em;
}
.logo-word {
  color: var(--ink);
  padding: .42em .3em .42em .62em;
  border: 1px solid var(--rule);
  border-left: 0;
}
.site-title a:hover .logo-bar { background: var(--accent); }

/* the two people, in running text */
.cw, .mw {
  font-family: var(--sans);
  font-size: .8em;
  font-weight: 700;
  color: #fff;
  padding: .12em .38em;
  border-radius: 1px;
  white-space: nowrap;
}
.cw { background: #1C3E94; }
.mw { background: #961428; }
.site-tag {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .78;
}
.nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  font-family: var(--sans);
  font-size: .84rem;
}
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* ---------- layout ---------- */

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose > * { margin-inline: auto; }

main { padding: 3rem 0 4rem; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; font-weight: 600; }
h1 { font-size: 2.1rem; letter-spacing: -.02em; margin: 0 0 .5rem; }
h2 { font-size: 1.4rem; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.08rem; margin: 2rem 0 .4rem; }

p, ul, ol { margin: 0 0 1.15rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .35rem; }

blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }

.dek {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .7rem;
}

/* ---------- table of contents ---------- */

.tochead { font-size: 1.15rem; margin: 2.5rem 0 .5rem; }

ol.toc {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--rule);
}
ol.toc li {
  counter-increment: toc;
  border-bottom: 1px solid var(--rule);
  padding: .6rem 0 .6rem 2.2rem;
  margin: 0;
  position: relative;
}
ol.toc li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: .68rem;
  font-family: var(--sans);
  font-size: .72rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
ol.toc a { text-decoration: none; font-weight: 600; }
ol.toc a:hover { text-decoration: underline; }
.tocmeta {
  display: block;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--ink-soft);
  margin-top: .12rem;
}
ol.toc li.absent { color: var(--ink-soft); font-style: italic; }

/* ---------- section headings down the page ---------- */

h2[id] {
  scroll-margin-top: 1.5rem;
  border-top: 2px solid var(--ink);
  padding-top: .9rem;
  margin-top: 4.5rem;
  max-width: var(--measure);
  margin-inline: auto;
}
.secdate, .secnote {
  max-width: var(--measure);
  margin: 0 auto .4rem;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--ink-soft);
}
.secnote { margin-top: .6rem; margin-bottom: 1.4rem; line-height: 1.55; }
.plain { font-size: 1rem; }

/* ---------- the index list ---------- */

.docindex { list-style: none; padding: 0; margin: 2rem 0 0; }
.docindex li {
  border-top: 1px solid var(--rule);
  padding: 1.15rem 0;
  margin: 0;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1.5rem;
}
.docindex li:last-child { border-bottom: 1px solid var(--rule); }
.docindex .when {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  padding-top: .32rem;
  font-variant-numeric: tabular-nums;
}
.docindex .what { margin: 0; }
.docindex .what a { font-weight: 600; text-decoration: none; }
.docindex .what a:hover { text-decoration: underline; }
.docindex .note { display: block; color: var(--ink-soft); font-size: .95rem; margin-top: .2rem; }
.docindex .pp {
  font-family: var(--sans); font-size: .74rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.docindex .star { color: var(--accent); font-family: var(--sans); font-size: .72rem; letter-spacing: .06em; }

@media (max-width: 40rem) {
  .docindex li { grid-template-columns: 1fr; gap: .2rem; }
  .docindex .when { padding-top: 0; }
}

/* ---------- document pages ---------- */

.docnav {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  font-family: var(--sans); font-size: .82rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: .9rem 0;
  margin: 2.5rem 0;
}
.docnav a { text-decoration: none; }
.docnav .spacer { margin-left: auto; }

.sheet { margin: 2.5rem auto; max-width: 46rem; }
.sheet figure { margin: 0; }
.sheet img {
  width: 100%;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 3px var(--shadow);
  background: #fff;
}
.sheet figcaption {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .55rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

details.transcript {
  margin-top: .6rem;
  border-top: 1px solid var(--rule);
}
details.transcript summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: .55rem 0;
  list-style: none;
}
details.transcript summary::-webkit-details-marker { display: none; }
details.transcript summary::before { content: "+ "; color: var(--accent); }
details.transcript[open] summary::before { content: "– "; }
details.transcript summary:hover { color: var(--accent); }
.transcript .body {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-bottom: 1rem;
  max-width: var(--measure);
}
.transcript .body p { margin: 0 0 .7rem; }

/* ---------- callouts ---------- */

.note-box {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.3rem;
  margin: 2rem auto;
  font-size: .95rem;
}
.note-box p:last-child { margin-bottom: 0; }
.note-box .dek { margin-bottom: .45rem; }

/* ---------- search ---------- */

.searchform { display: flex; gap: .5rem; margin: 1.5rem 0; }
.searchform input[type=search] {
  flex: 1; padding: .55rem .7rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 2px;
}
.searchform button {
  padding: .55rem 1rem; font-family: var(--sans); font-size: .85rem;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 2px; cursor: pointer;
}
.searchform button:hover { background: var(--ink); border-color: var(--ink); }

.result { border-top: 1px solid var(--rule); padding: 1.1rem 0; }
.result h3 { margin: 0 0 .25rem; }
.result h3 a { text-decoration: none; }
.result p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- photographs in the story ---------- */

.kgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  max-width: 58rem;
  margin: 2rem auto 2.5rem;
}
.kfig { margin: 0; }
.kfig img {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  box-shadow: 0 1px 3px var(--shadow);
}
.kfig a { display: block; }
.kfig a:hover img { border-color: var(--accent); }
.kfig figcaption {
  font-family: var(--sans);
  font-size: .78rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: .45rem;
}
.kfig.wide {
  max-width: 58rem;
  margin: 2rem auto 2.5rem;
}
.kfig.wide figcaption { font-size: .82rem; }

/* ---------- before / after wipe ---------- */

.kcompare { max-width: 46rem; margin: 2.5rem auto 3rem; }
.kc-frame {
  position: relative;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  border: 1px solid var(--rule);
  overflow: hidden;
  line-height: 0;
}
.kc-frame img { width: 100%; display: block; }
.kc-clip {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: var(--pos);
  overflow: hidden;
}
/* the overlay image must stay the size of the whole frame, not the clip,
   so the two photographs stay in register as the handle moves */
.kc-clip img {
  position: absolute; top: 0; left: 0;
  height: 100%; width: auto; max-width: none;
}
.kc-handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}
.kc-handle::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.kc-handle:focus-visible { outline: none; }
.kc-handle:focus-visible::after { box-shadow: 0 0 0 3px var(--accent); }
.kc-tag {
  position: absolute; bottom: 10px;
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,.62);
  padding: .28em .6em;
  line-height: 1.3;
  pointer-events: none;
}
.kc-tag-l { left: 10px; }
.kc-tag-r { right: 10px; }
.kcompare figcaption {
  font-family: var(--sans);
  font-size: .8rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: .6rem;
}

/* ---------- video ---------- */

.kvideo {
  max-width: 58rem;
  margin: 2rem auto 2.5rem;
}
.kvideo video {
  width: 100%;
  display: block;
  background: #000;
  border: 1px solid var(--rule);
}
.kvideo figcaption {
  font-family: var(--sans);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: .5rem;
}
.kvtabs {
  display: flex;
  gap: .5rem;
  margin-bottom: .6rem;
  font-family: var(--sans);
  font-size: .8rem;
}
.kvtabs button {
  padding: .4rem .9rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
}
.kvtabs button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- the story ---------- */

.story h2 { margin-top: 4rem; }
.story h3 {
  max-width: var(--measure);
  margin: 2.5rem auto .6rem;
  font-size: 1.02rem;
  letter-spacing: .01em;
}
.story hr { max-width: var(--measure); margin: 3rem auto; }
.story blockquote { max-width: var(--measure); }
.story .dek { max-width: var(--measure); margin-bottom: 2rem; }

.tablewrap { overflow-x: auto; max-width: var(--measure); margin: 1.5rem auto; }
.tablewrap table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tablewrap td {
  border-bottom: 1px solid var(--rule);
  padding: .45rem .8rem .45rem 0;
  vertical-align: top;
}

/* ---------- comments ---------- */

.comments {
  border-top: 2px solid var(--ink);
  margin-top: 5rem;
  padding-top: 1rem;
}
.comments .tochead { margin-top: 1.5rem; }

ol.commentlist, ol.commentlist ol { list-style: none; padding: 0; margin: 0; }
ol.commentlist ol.children { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
ol.commentlist li.comment { border-bottom: 1px solid var(--rule); padding: 1.2rem 0; }
.comment-meta {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.comment-meta a { color: var(--ink-soft); text-decoration: none; }
.comment-author .fn { font-style: normal; font-weight: 600; color: var(--ink); }
.comment-content p { margin: 0 0 .7rem; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { font-family: var(--sans); font-size: .78rem; }
.comment-awaiting-moderation {
  display: inline-block;
  font-family: var(--sans);
  font-size: .74rem;
  color: var(--accent);
}

.cnote { font-size: .9rem; color: var(--ink-soft); }
.cfield { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.cfield label {
  font-family: var(--sans);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cfield label span { text-transform: none; letter-spacing: 0; }
.cfield input, .cfield textarea {
  font: inherit;
  font-size: 1rem;
  padding: .55rem .7rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  width: 100%;
}
.cfield textarea { resize: vertical; line-height: 1.5; }
.comment-form-cookies-consent {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--ink-soft);
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}
.form-submit { margin: 0; }
.form-submit input[type=submit] {
  font-family: var(--sans);
  font-size: .85rem;
  letter-spacing: .04em;
  padding: .6rem 1.6rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  cursor: pointer;
}
.form-submit input[type=submit]:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */

.sitefoot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--ink-soft);
}
.sitefoot .inner { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.sitefoot p { margin: 0 0 .5rem; max-width: 42rem; }
.sitefoot a { color: var(--ink-soft); }

@media print {
  .masthead, .nav, .sitefoot, .docnav { display: none; }
  details.transcript { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- documents: every exhibit shown whole, with the PDF beside it ---------- */

.kdoc {
  max-width: 58rem;
  margin: 2.4rem auto 3rem;
  padding: 0;
}
.kdoc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1.2rem;
  font-family: var(--sans);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--rule);
}
.kdoc-head strong {
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.35;
  color: var(--ink);
}
.kdoc-meta {
  font-size: .76rem;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kdoc-meta a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule); }
.kdoc-meta a:hover { border-bottom-color: var(--accent); }

.kdoc-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .7rem;
  margin: .9rem 0 0;
}
.kdoc-pages a { display: block; line-height: 0; }
.kdoc-pages img {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  box-shadow: 0 1px 3px var(--shadow);
}
.kdoc-pages a:hover img { border-color: var(--accent); }

/* a single-page document is worth showing larger */
.kdoc-pages.kdoc-wide {
  grid-template-columns: minmax(0, 22rem);
  justify-content: center;
}

.kdoc-note {
  font-family: var(--sans);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: .75rem;
  max-width: 44rem;
}

@media (max-width: 640px) {
  .kdoc-pages { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: .5rem; }
  .kdoc-meta { white-space: normal; }
}
