/* Late edition — a broadsheet. Chapters set in CSS multi-column layout with rules between the columns, a drop cap
   from initial-letter where the browser has it and a floated ::first-letter where it doesn't.
   Designed by machine for the Slopwright. */
:root {
  color-scheme: light;
  --newsprint: #f2efe6;
  --ink: #161513;
  --grey: #4f4c45;
  --rule: #24221e;
  --serif: Georgia, "Times New Roman", Times, serif;
  --head: "Times New Roman", Times, Georgia, serif;
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; min-width: 320px; background: #d9d5c9; color: var(--ink); font: 16px/1.5 var(--serif); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; background: #fff7b0; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: 10px; top: -80px; z-index: 10; padding: 8px 12px; background: var(--ink); color: #fff; }
.skip:focus { top: 10px; }
.main:focus { outline: none; }

.page { max-width: 1240px; margin: 0 auto; padding: 14px 3% 40px; background: var(--newsprint); box-shadow: 0 0 30px rgba(0,0,0,.15); }

/* the ears and dateline */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font: 13px Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.masthead { display: flex; align-items: center; gap: 10px; }
.masthead .brand { display: inline-flex; align-items: center; min-height: 32px; }
.masthead .brand img { display: block; height: 20px; width: auto; }
.site-name { display: inline-flex; align-items: center; min-height: 32px; padding-left: 10px; border-left: 1px solid var(--rule); font-weight: 700; text-decoration: none; }
.site-name::after { content: " · Price: free"; font-weight: 400; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* the nameplate */
.title-block { padding: 14px 0 10px; text-align: center; border-bottom: 4px double var(--rule); }
.title { margin: 0; font: 900 clamp(38px, 8.6vw, 112px)/.95 "Old English Text MT", "UnifrakturMaguntia", var(--head); letter-spacing: -.02em; }
.edition { order: 2; margin: 10px 0 0; padding: 4px 0; border-block: 1px solid var(--rule); font: 700 12px Arial, sans-serif; text-transform: uppercase; letter-spacing: 2px; }
.title-block { display: flex; flex-direction: column; }
.title { order: 1; }
.subtitle { order: 3; margin: 10px auto 0; max-width: 60ch; font-style: italic; font-size: 18px; }

/* contents as an index strip */
.contents { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--rule); font: 13px Arial, sans-serif; }
.contents-title { margin: 0; font: 700 13px Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.contents-title::after { content: ":"; }
.contents-list { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; padding: 0; list-style: none; counter-reset: p; }
.contents-list li { counter-increment: p; }
.contents-list a { display: inline-flex; align-items: center; min-height: 28px; }
.contents-list li::after { content: " · p." counter(p); color: var(--grey); }

/* the front page: the article flows as stories, each in columns */
.manual { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.title-block, .contents { grid-column: 1 / -1; }
.chapter { grid-column: 1 / -1; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.chapter-1 { grid-column: 1 / span 8; border-right: 1px solid var(--rule); padding-right: 24px; }
.chapter-2 { grid-column: 9 / -1; }
.chapter-3 { grid-column: 1 / span 5; border-right: 1px solid var(--rule); padding-right: 24px; }
.chapter-4 { grid-column: 6 / -1; }
.chapter-title { margin: 0 0 10px; font: 700 clamp(26px, 3.2vw, 40px)/1.05 var(--head); letter-spacing: -.01em; }
.chapter-1 .chapter-title { font-size: clamp(30px, 4.4vw, 56px); }
.chapter-num { display: block; margin-bottom: 4px; font: 700 11px Arial, sans-serif; text-transform: uppercase; letter-spacing: 2px; color: var(--grey); }
.chapter-num::before { content: "Section "; }
.chapter-body { columns: 3 220px; column-gap: 24px; column-rule: 1px solid #b9b3a4; text-align: justify; hyphens: auto; }
.chapter-2 .chapter-body, .chapter-3 .chapter-body, .chapter-4 .chapter-body { columns: 1; }
.chapter-1 .chapter-body { columns: 2 220px; }
.chapter-body p { margin: 0 0 10px; }
.first { font-size: 17px; }
/* the drop cap: initial-letter where supported, a floated first letter otherwise */
.first::first-letter { float: left; margin: 4px 8px 0 0; font: 700 4.1em/.8 var(--head); }
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .first::first-letter { float: none; margin: 0 8px 0 0; font-size: 1em; line-height: inherit; -webkit-initial-letter: 3; initial-letter: 3; }
}
.plate { break-inside: avoid; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #b9b3a4; }
.plate img { display: block; width: 100%; filter: grayscale(1) contrast(1.15); }
.plate figcaption { margin-top: 6px; font: italic 13px/1.4 var(--serif); text-align: left; color: var(--grey); }
.tools { margin: 0; padding-left: 18px; text-align: left; }
.tools li { margin: 4px 0; }
.note { break-inside: avoid; margin: 0 0 12px; padding: 10px 12px; border: 2px solid var(--ink); text-align: left; }
.note p { margin: 0; }
.note p::before { content: "Notice. "; font: 700 12px Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.table-wrap { break-inside: avoid; overflow-x: auto; }
table { width: 100%; min-width: 380px; border-collapse: collapse; font: 14px/1.35 Arial, sans-serif; text-align: left; }
caption { padding-bottom: 6px; font: 700 12px Arial, sans-serif; text-align: left; text-transform: uppercase; letter-spacing: 1px; }
th, td { padding: 6px 8px 6px 0; border-bottom: 1px solid #b9b3a4; vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); }
.chapter-5 .chapter-body, .chapter-6 .chapter-body, .chapter-7 .chapter-body { text-align: left; }
.rules { margin: 0; padding-left: 22px; }
.rules li { break-inside: avoid; margin: 0 0 8px; }
.saying { break-inside: avoid; margin: 8px 0; padding: 12px 0; border-block: 3px solid var(--ink); text-align: center; }
.saying p { margin: 0; font: italic 700 22px/1.25 var(--head); }
.saying footer { margin-top: 6px; font: 12px Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.hazards { margin: 0; }
.hazard { break-inside: avoid; margin-bottom: 10px; }
.hazard dt { font: 700 17px var(--head); }
.hazard dd { margin: 2px 0 0; }
.glossary { margin: 0; }
.glossary dt { break-after: avoid; font-weight: 700; font-variant: small-caps; letter-spacing: .5px; }
.glossary dd { margin: 0 0 8px; }
.sign-off { font-style: italic; }

/* the outfits: the classifieds */
.outfits { padding: 20px 0; border-top: 4px double var(--rule); }
.outfits-title { margin: 0; font: 700 clamp(24px, 3vw, 34px) var(--head); text-align: center; }
.outfits-title::before { content: "Classified · "; font: 700 12px Arial, sans-serif; text-transform: uppercase; letter-spacing: 2px; vertical-align: middle; }
.outfits-lede { text-align: center; font-style: italic; }
.outfit-list { columns: 4 220px; column-gap: 20px; column-rule: 1px solid #b9b3a4; margin: 12px 0 0; padding: 0; list-style: none; }
.outfit { break-inside: avoid; margin-bottom: 8px; padding: 6px 8px; border: 1px solid #b9b3a4; font: 13px/1.4 Arial, sans-serif; }
.outfit-link { display: inline-block; min-height: 24px; font: 700 15px var(--head); text-transform: uppercase; }
.outfit-by, .outfit-note { display: none; }
.outfit-technique { display: block; color: var(--grey); }
#th-newspaper { background: var(--ink); color: var(--newsprint); border-color: var(--ink); }
#th-newspaper a, #th-newspaper .outfit-technique, #th-newspaper .outfit-by, #th-newspaper .outfit-note { color: var(--newsprint); }
#th-newspaper .outfit-link::before { content: "Today: "; }
#th-newspaper .outfit-by, #th-newspaper .outfit-note { display: block; margin-top: 4px; }

.site-foot { padding-top: 10px; border-top: 1px solid var(--rule); font: 12px/1.5 Arial, sans-serif; color: var(--grey); }
.site-foot p { margin: 0 0 4px; }
.extra { display: none; }

@media (max-width: 860px) {
  .chapter-1, .chapter-2, .chapter-3, .chapter-4 { grid-column: 1 / -1; border-right: 0; padding-right: 0; }
}
@media (max-width: 560px) {
  .page { padding: 10px 14px 30px; }
  .site-name::after { content: ""; }
  .chapter-body { text-align: left; }
  .title { font-size: 40px; }
}

/* moving between outfits: a cross-document view transition where the browser has them (Chromium did, Firefox did not, when check.mjs last ran), with the
   masthead and the title carried across; an ordinary page load elsewhere, and under reduced motion */
@view-transition { navigation: auto; }
.masthead { view-transition-name: masthead; }
.title { view-transition-name: manual-title; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
