/* ============================================================
   THE PTACEK LEDGER — a personal broadsheet
   Loaded only by /press. Inherits every token from styles.css.
   Print grammar: nameplate, rules, columns, cuts, folios.
   ============================================================ */

.press {
  --gutter: clamp(14px, 1.7vw, 30px);
  --rule: 1px solid var(--line);
  --rule-strong: 1px solid var(--line-strong);
}

/* ---------- nameplate ---------- */

.nameplate {
  padding-top: clamp(18px, 3.5vh, 40px);
}

.np-brow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: var(--rule-strong);
}
.np-brow span { white-space: nowrap; }
.np-brow .np-mid { color: var(--ink-faint); }
@media (max-width: 760px) { .np-brow .np-mid { display: none; } }

.np-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 11.6vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-align: center;
  padding: clamp(16px, 3.2vh, 34px) 0 clamp(10px, 2vh, 20px);
}
.np-title .np-the {
  display: block;
  font-size: 0.24em;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-style: italic;
  color: var(--ink-soft);
  padding-bottom: 0.35em;
}
.np-title .np-dot { color: var(--accent); }

.np-rules {
  border-top: 3px solid var(--ink);
  border-bottom: var(--rule-strong);
  height: 5px;
}

.np-stand {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 2.5vw, 34px);
  padding: 12px 0;
  border-bottom: var(--rule-strong);
  text-align: center;
}
.np-stand p {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-inline: auto;
}
.np-stand .np-star {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}
.np-stand .np-edge {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.np-stand .np-edge:last-child { text-align: right; }
@media (max-width: 860px) {
  .np-stand { grid-template-columns: 1fr; }
  .np-stand .np-edge:first-child { display: none; }
  .np-stand .np-edge:last-child { text-align: center; }
}

/* ---------- desk index bar ---------- */

.desk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(12px, 2vw, 26px);
  padding: 11px 0;
  border-bottom: var(--rule-strong);
}
.desk-bar a {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.22s, border-color 0.22s;
}
.desk-bar a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- column scaffolding ---------- */

.cols { display: grid; }
.cols > * {
  min-width: 0;
  padding-inline: var(--gutter);
  border-left: var(--rule);
}
.cols > *:first-child { padding-left: 0; border-left: 0; }
.cols > *:last-child { padding-right: 0; }

.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-front { grid-template-columns: minmax(0, 2.5fr) minmax(0, 1.35fr) minmax(0, 1fr); }
.cols-wide-rail { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); }
.cols-rail-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); }

@media (max-width: 1100px) {
  .cols-front { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .cols-front > .front-rail {
    grid-column: 1 / -1;
    padding: 0;
    border-left: 0;
    border-top: var(--rule-strong);
    margin-top: 22px;
    padding-top: 18px;
  }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-4 > *:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .cols-4 > *:nth-child(n + 3) {
    border-top: var(--rule);
    margin-top: 24px;
    padding-top: 24px;
  }
}

@media (max-width: 820px) {
  .cols-2, .cols-3, .cols-4, .cols-front, .cols-wide-rail, .cols-rail-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .cols > * {
    padding-inline: 0;
    border-left: 0;
  }
  .cols > * + * {
    border-top: var(--rule);
    margin-top: 26px;
    padding-top: 26px;
  }
  .cols-front > .front-rail { margin-top: 26px; padding-top: 26px; }
  .cols-4 > *:nth-child(n + 3) { margin-top: 26px; padding-top: 26px; }
}

/* ---------- desks ---------- */

.desk {
  border-top: 3px solid var(--ink);
  margin-top: clamp(38px, 6vh, 72px);
  padding-top: 0;
}
.desk-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 14px;
  border-bottom: var(--rule-strong);
  margin-bottom: clamp(20px, 3vh, 30px);
}
.desk-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}
.desk-no {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.desk-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
.desk-note {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
}
@media (max-width: 620px) { .desk-note { display: none; } }

/* ---------- stories ---------- */

.story + .story {
  border-top: var(--rule);
  margin-top: 22px;
  padding-top: 22px;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}
.kicker .k-desk { color: var(--ink-faint); }
.kicker.k-fiction { color: var(--moss); }
.kicker.k-ledger { color: var(--amber); }

.hl {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.018em;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}
.hl-lead { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 0.95; letter-spacing: -0.03em; }
.hl-1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); }
.hl-2 { font-size: clamp(1.45rem, 2.1vw, 1.85rem); }
.hl-3 { font-size: clamp(1.2rem, 1.55vw, 1.4rem); line-height: 1.1; }
.hl-4 { font-size: 1.08rem; line-height: 1.15; }

.dek {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 10px;
  max-width: 46ch;
}
.hl-lead + .dek { font-size: 1.1rem; line-height: 1.6; max-width: 40ch; }
.hl-3 + .dek, .hl-4 + .dek { font-size: 0.875rem; margin-top: 8px; }

.byline {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 12px;
}
.byline .b-name { color: var(--ink-soft); }

.jump {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-top: 10px;
}

/* ---------- photographs ---------- */

.cut { margin: 0 0 16px; }
.cut-below { margin: 16px 0 0; }

.cut .frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-edge);
  border: 1px solid var(--line);
}
/* halftone tint — plain opacity, never a blend-mode overlay */
.cut .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(27, 24, 18, 0.5) 0.7px, transparent 0.9px);
  background-size: 3px 3px;
  opacity: 0.09;
}

.cut img {
  width: 100%;
  height: auto;
  display: block;
  /* full colour — just a touch of press-ink punch so it sits on the paper */
  filter: saturate(1.06) contrast(1.03);
  transition: filter 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.cut:hover img {
  filter: saturate(1.18) contrast(1.05) brightness(1.02);
  transform: scale(1.012);
}

.cut-4x3 img { aspect-ratio: 4 / 3; object-fit: cover; }
.cut-3x2 img { aspect-ratio: 3 / 2; object-fit: cover; }
.cut-16x9 img { aspect-ratio: 16 / 9; object-fit: cover; }
.cut-square img { aspect-ratio: 1 / 1; object-fit: cover; }
.cut-tall img { aspect-ratio: 3 / 4; object-fit: cover; }

.cut figcaption {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
  padding-top: 9px;
  border-bottom: var(--rule);
  padding-bottom: 9px;
}
.cut .credit {
  display: block;
  font-family: var(--mono);
  font-size: 0.5975rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 5px;
}

/* ---------- front page ---------- */

.front { padding-top: clamp(22px, 3.5vh, 34px); }

.front-lead .kicker { font-size: 0.6875rem; }

.front-sub .story + .story { margin-top: 20px; padding-top: 20px; }

.front-rail { }

.rail-head {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 4px;
}

.brief {
  display: block;
  padding: 12px 0;
  border-bottom: var(--rule);
}
.brief .b-desk {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.brief .b-hl {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.12;
  display: block;
  margin-top: 5px;
  transition: color 0.22s;
}
a.brief:hover .b-hl { color: var(--accent); font-style: italic; }

/* ---------- the ledger index strip ---------- */

.index-strip {
  border-top: 3px solid var(--ink);
  border-bottom: var(--rule-strong);
  background: var(--grain) var(--paper-deep);
  margin-top: clamp(30px, 5vh, 56px);
  padding: 0 clamp(12px, 2vw, 22px);
}
.is-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0 10px;
  border-bottom: var(--rule);
}
.is-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 4px 0 14px;
}
.is-cell {
  padding: 12px clamp(10px, 1.4vw, 18px);
  border-left: var(--rule);
  min-width: 0;
}
.is-cell:first-child { border-left: 0; padding-left: 0; }
.is-k {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.is-v {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
  line-height: 1.05;
  margin-top: 7px;
  display: block;
}
.is-v .accent { color: var(--accent); }
.is-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 5px;
  line-height: 1.4;
}
@media (max-width: 1000px) { .is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .is-cell:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .is-cell:nth-child(n + 4) { border-top: var(--rule); }
}
@media (max-width: 620px) { .is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-cell:nth-child(3n + 1) { border-left: var(--rule); padding-left: clamp(10px, 1.4vw, 18px); }
  .is-cell:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .is-cell:nth-child(n + 3) { border-top: var(--rule); }
}

/* ---------- full stories (details, zero JS) ---------- */

.story-details summary {
  list-style: none;
  cursor: pointer;
  display: block;
}
.story-details summary::-webkit-details-marker { display: none; }
.story-details summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.story-details summary .hl { transition: color 0.25s; }
.story-details summary:hover .hl { color: var(--accent); }

.read-cue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  margin-top: 16px;
  transition: color 0.22s, border-color 0.22s;
}
.story-details summary:hover .read-cue { color: var(--accent); border-color: var(--accent); }
.read-cue .cue-arrow { transition: transform 0.3s var(--ease-out); }
.story-details[open] .read-cue .cue-arrow { transform: rotate(180deg); }
.story-details[open] .read-cue .cue-open { display: none; }
.read-cue .cue-close { display: none; }
.story-details[open] .read-cue .cue-close { display: inline; }

.story-body {
  border-top: var(--rule);
  margin-top: 20px;
  padding-top: 20px;
  /* column-width, not column-count: narrow rails stay one column */
  columns: 18em;
  column-gap: clamp(22px, 3vw, 44px);
  column-rule: var(--rule);
}
.story-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.62;
  break-inside: avoid-column;
}
.story-body p + p { margin-top: 13px; text-indent: 1.15em; }
.story-body p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.5em;
  line-height: 0.76;
  padding: 0.04em 0.09em 0 0;
  color: var(--accent);
}
.story-body .pull {
  break-inside: avoid-column;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.22;
  color: var(--ink);
  border-top: var(--rule-strong);
  border-bottom: var(--rule-strong);
  padding: 14px 0;
  margin: 16px 0;
  text-indent: 0;
}
.story-body .ends {
  font-family: var(--mono);
  font-size: 0.5975rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-indent: 0;
  margin-top: 14px;
}
@media (max-width: 900px) { .story-body { columns: 1; } }

/* ---------- letters, almanac, cryptic ---------- */

.panel {
  border: 1px solid var(--line-strong);
  background: var(--grain) var(--paper-deep);
  padding: 2px 20px 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0 10px;
  border-bottom: var(--rule-strong);
}

.letter { padding: 14px 0; border-bottom: var(--rule); }
.letter:last-child { border-bottom: 0; padding-bottom: 4px; }
.letter p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.letter p em { color: var(--ink); }
.letter .sig {
  font-family: var(--mono);
  font-size: 0.5975rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 9px;
}

.almanac-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: var(--rule);
  font-size: 0.88rem;
  line-height: 1.45;
}
.almanac-row:last-child { border-bottom: 0; }
.almanac-row .a-k {
  font-family: var(--mono);
  font-size: 0.5975rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}
.almanac-row .a-v { color: var(--ink-soft); }

.cryptic {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 2px;
  margin: 16px 0 10px;
  max-width: 340px;
}
.cryptic i {
  aspect-ratio: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
  font-family: var(--mono);
  font-size: 0.5rem;
  font-style: normal;
  color: var(--ink-faint);
  padding: 1px 0 0 2px;
  line-height: 1;
}
.cryptic i.blk { background: var(--ink); border-color: var(--ink); }

/* ---------- folio + colophon ---------- */

.folio {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.5975rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: var(--rule);
  padding: 10px 0 0;
  margin-top: clamp(26px, 4vh, 40px);
}
.folio span:last-child { text-align: right; }
@media (max-width: 620px) { .folio .fo-mid { display: none; } }

.colophon {
  border-top: 3px solid var(--ink);
  margin-top: clamp(38px, 6vh, 72px);
  padding: clamp(24px, 4vh, 40px) 0 clamp(36px, 6vh, 64px);
}
.colophon h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.colophon p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 60ch;
}
.colophon p + p { margin-top: 12px; }
.colophon .set-in {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 20px;
  max-width: none;
}

/* ---------- print ---------- */

@media print {
  .nav, .footer, .desk-bar, .skip-link, .read-cue { display: none !important; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .story-details .story-body { display: block !important; columns: 2; }
  .cut img { filter: contrast(1.08); }
  .desk, .colophon, .index-strip { break-inside: avoid; }
  body { background: #fff; }
  .np-title { font-size: 4.2rem; }
}
