/* Liner notes — the manual as the folded card in a cassette box, the kind a Lamewire tape would come in. Shows off
   writing-mode: the title runs up the spine (vertical-rl, turned to read bottom to top like a spine on a shelf) and
   stays there while the card scrolls past it, by position: sticky. The contents are a track list, side A and side B,
   numbered by counters. On a phone the spine lies down across the top. Nothing moves.
   Designed by machine for the Slopwright. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
:root {
  color-scheme: light;
  --desk: #2b2f3a; --card: #f3ead6; --card-2: #e9dcc0; --ink: #1f1a14; --dim: #5a4e3c; --red: #a3261b; --blue: #1f4f8c; --fold: rgb(31 26 20 / .18);
  --head: "Archivo Black", "Arial Black", Arial, sans-serif;
  --narrow: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-width: 320px; margin: 0; color: var(--ink); font: 17px/1.6 Georgia, "Times New Roman", serif;
  background: radial-gradient(ellipse at 50% 0, #3a4050, var(--desk) 70%) fixed, var(--desk); }
a { color: var(--blue); text-underline-offset: 3px; }
:where(a, [tabindex]):focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 16px; background: var(--card); color: var(--ink); font-weight: 700; }
.skip:focus { top: 12px; }
.extra { display: none; }
.main:focus { outline: none; }

/* the card: one long panel with fold lines, on the desk */
.page { max-width: 1080px; margin: 28px auto; padding: 0 0 10px; background:
  linear-gradient(90deg, transparent 150px, var(--fold) 150px 151px, transparent 151px) ,
  repeating-linear-gradient(0deg, transparent 0 3px, rgb(31 26 20 / .025) 3px 4px), var(--card);
  box-shadow: 0 30px 60px rgb(0 0 0 / .45); }
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding: 14px 28px 14px 176px; border-bottom: 2px solid var(--ink); font-family: var(--narrow); }
.masthead { display: flex; align-items: center; }
.masthead .brand img { display: block; height: 24px; width: auto; }
.site-name { margin-left: 12px; padding-left: 12px; border-left: 2px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--red); text-decoration: underline; }

/* the spine: the title block stands on end in the first column and stays put */
.manual { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.manual > * { grid-column: 2; }
.title-block {
  grid-column: 1; grid-row: 1 / span 20; align-self: start;
  position: sticky; top: 0; height: 100vh; max-height: 900px;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 26px 16px;
  writing-mode: vertical-rl; transform: rotate(180deg);    /* reads bottom to top, like a spine on the shelf */
  background: linear-gradient(90deg, var(--red) 0 10px, transparent 10px 14px, var(--ink) 14px 16px, transparent 16px), var(--card-2);
}
.edition { margin: 0; color: var(--dim); font: 700 12px/1.3 var(--narrow); letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: var(--head); font-weight: 1000; font-synthesis: none; }
.title { color: var(--ink); font-size: clamp(34px, 4.4vw, 50px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.subtitle { margin: 0; max-inline-size: min(70vh, 620px); color: var(--dim); font: italic 15px/1.35 Georgia, serif; }

/* side A and side B */
.contents { margin: 28px 28px 0; padding: 18px 22px; border: 2px solid var(--ink); font-family: var(--narrow); }
.contents-title { margin: 0 0 10px; font: 700 14px var(--narrow); letter-spacing: .25em; text-transform: uppercase; }
.contents-title::after { content: " · side A, side B"; color: var(--dim); }
.contents-list { columns: 2 220px; column-gap: 30px; column-rule: 1px dashed var(--fold); margin: 0; padding: 0; list-style: none; counter-reset: t; }
.contents-list li { counter-increment: t; break-inside: avoid; }
.contents-list a { justify-content: flex-start; gap: 12px; width: 100%; border-bottom: 1px dotted var(--fold); color: var(--ink); font-size: 17px; text-decoration: none; }
.contents-list a::before { content: "A" counter(t); min-width: 2.2em; color: var(--red); font-weight: 700; }
.contents-list li:nth-child(5) a::before { content: "B1"; } .contents-list li:nth-child(6) a::before { content: "B2"; } .contents-list li:nth-child(7) a::before { content: "B3"; }
.contents-list a:hover { color: var(--red); }

/* tracks */
.chapter { margin: 0 28px; padding: 34px 0; border-bottom: 1px solid var(--fold); scroll-margin-top: 10px; }
.chapter-title { display: flex; align-items: baseline; gap: 14px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.05; letter-spacing: -.01em; }
.chapter-num { flex: none; color: var(--red); font: 700 0/1 var(--narrow); }
.chapter-num::before { font-size: 18px; letter-spacing: .1em; }
.chapter-1 .chapter-num::before { content: "A1"; } .chapter-2 .chapter-num::before { content: "A2"; } .chapter-3 .chapter-num::before { content: "A3"; } .chapter-4 .chapter-num::before { content: "A4"; }
.chapter-5 .chapter-num::before { content: "B1"; } .chapter-6 .chapter-num::before { content: "B2"; } .chapter-7 .chapter-num::before { content: "B3"; }
.chapter-5 { border-top: 6px double var(--ink); }
.chapter-body { max-width: 64ch; margin-top: 14px; }
.chapter-body > :first-child { margin-top: 0; }
.first { font-size: 19px; }
.plate { margin: 24px 0 0; padding: 10px; background: #fff; box-shadow: 0 2px 0 var(--fold); transform: rotate(-.6deg); }
.plate img { display: block; width: 100%; filter: sepia(.25) contrast(1.05); }
.plate figcaption { margin-top: 8px; color: var(--dim); font: 14px var(--narrow); }
.tools, .rules { padding-left: 0; list-style: none; }
.tools li, .rules li { padding: 8px 0; border-top: 1px dotted var(--fold); }
.rules { counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding-left: 2.4em; }
.rules li::before { content: counter(r) "."; position: absolute; left: 0; color: var(--red); font: 700 16px var(--narrow); }
.note { margin: 20px 0; padding: 12px 16px; border: 2px solid var(--red); }
.note p { margin: 0; }
.saying { margin: 24px 0 0; padding: 0 0 0 18px; border-left: 4px solid var(--blue); }
.saying p { margin: 0; font: italic 23px/1.3 Georgia, serif; }
.saying footer { margin-top: 6px; color: var(--dim); font: 14px var(--narrow); letter-spacing: .1em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { padding-bottom: 8px; color: var(--dim); font-family: var(--narrow); letter-spacing: .1em; text-align: left; text-transform: uppercase; }
th, td { padding: 8px 10px 8px 0; border-top: 1px dotted var(--fold); text-align: left; vertical-align: top; }
thead th { border-top: 0; border-bottom: 2px solid var(--ink); font-family: var(--narrow); text-transform: uppercase; }
.hazards { margin: 0; }
.hazard { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 8px 0; border-top: 1px dotted var(--fold); }
.hazard dt { font-weight: 700; }
.hazard dd { margin: 0; }
.glossary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0; }
.sign-off { margin-top: 22px; font-style: italic; }

/* the other outfits: the credits panel */
.outfits { margin: 0 28px 0 178px; padding: 30px 0; font-family: var(--narrow); }
.outfits-title { font-size: clamp(24px, 3vw, 32px); text-transform: uppercase; }
.outfits-lede { color: var(--dim); }
.outfit-list { columns: 3 220px; column-gap: 26px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; }
.outfit { break-inside: avoid; padding: 4px 0; border-bottom: 1px dotted var(--fold); }
.outfit-link { color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.outfit-link:hover { color: var(--red); text-decoration: underline; }
.outfit-by, .outfit-note { display: none; }
.outfit-technique { display: block; color: var(--dim); }
#th-liner { padding: 4px 10px; background: var(--ink); }
#th-liner .outfit-link, #th-liner .outfit-technique { color: var(--card); }
#th-liner .outfit-link::after { content: " · in the deck"; margin-left: .3em; font-weight: 400; }
.site-foot { margin: 0 28px 0 178px; padding: 18px 0 8px; border-top: 2px solid var(--ink); color: var(--dim); font: 14px/1.5 var(--narrow); }
.site-foot p { margin: 0 0 6px; }

@media (max-width: 760px) {
  .page { margin: 0; }
  .page { background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(31 26 20 / .025) 3px 4px), var(--card); }
  .site-head { padding: 12px 16px; }
  .manual { display: block; }
  /* the spine lies down across the top */
  .title-block { position: static; height: auto; max-height: none; display: block; padding: 22px 16px 22px 30px; writing-mode: horizontal-tb; transform: none;
    background: linear-gradient(var(--red), var(--red)) 0 0 / 8px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) 12px 0 / 2px 100% no-repeat, var(--card-2); }
  .title { white-space: normal; margin: 6px 0; }
  .subtitle { max-inline-size: none; }
  .contents, .chapter, .outfits { margin-inline: 16px; }
  .site-foot { margin: 0 16px; }
  .hazard { grid-template-columns: 1fr; gap: 2px; }
  .glossary { grid-template-columns: 1fr; gap: 2px; }
  .glossary dd { margin-bottom: 8px; }
}
@media (forced-colors: active) { .title-block { border-inline: 2px solid CanvasText; } }

/* moving between outfits: a cross-document view transition where the browser has them, 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; } }

/* targets: every link outside running text is at least 44 px tall (the accessibility skill). The display has no
   specificity, so the outfit's own wins; the minimum size is made to stick over any outfit rule */
:where(.masthead, .site-nav, .contents-list) :where(a), :where(.outfit-link) { display: inline-flex; align-items: center; justify-content: center; }
:root:root body :is(.masthead, .site-nav, .contents-list) a, :root:root body .outfit-link { min-width: 44px; min-height: 44px; }
