/* Fjorra: field notes (the index of notes and the five articles). Loaded after /styles.css, which owns the shared
   Work Order vocabulary (.sheet .form .cell .lab .pen .print .tape .btn .reading .route .write). Only page parts live here. */

.perf--wp { --from: var(--paper); --to: var(--pink); }

/* ---------- Index: a ruled list of notes, one taped print per row ---------- */
.notes__main { container-type: inline-size; }
.notes__head { display: none; background: var(--tint); border-bottom: var(--rule-2); }
.notes__head p { padding: 10px 16px; border-right: var(--rule); }
.notes__head p:last-child { border-right: 0; }

.note { position: relative; display: grid; grid-template-columns: 52% minmax(0, 1fr); grid-template-areas: "pic meta" "body body"; border-bottom: var(--rule); }
.note:last-child { border-bottom: 0; }
.note:hover { background: rgba(36, 56, 160, .05); }
.note__pic { grid-area: pic; display: flex; justify-content: center; align-items: flex-start; padding: 28px 20px 18px; }
.note__meta { grid-area: meta; padding: 16px 14px 8px 0; }
.note__body { grid-area: body; min-width: 0; padding: 4px 16px 22px; }
.note__val { margin: 2px 0 12px; font: 700 1.375rem/1.2 var(--hand); }
.note__body h2 { font: 700 clamp(1.625rem, 2.4vw, 1.875rem)/1.08 var(--cond); letter-spacing: .03em; text-transform: uppercase; }
.note__body p { max-width: 56ch; margin-top: 10px; font: 400 1.0625rem/1.5 var(--body); }
.note__go { color: inherit; text-decoration: none; }
.note__go::after { content: ""; position: absolute; inset: 0; }
.note__go:focus-visible { outline: 0; }
.note__go:focus-visible::after { outline: 3px solid var(--red); outline-offset: -3px; }
.note:hover .note__go { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .06em; }

.print--thumb { max-width: 196px; padding: 8px 8px 8px; box-shadow: 0 10px 18px -8px rgba(40, 30, 20, .4), 0 1px 4px rgba(40, 30, 20, .2); }
.note:nth-child(odd) .print--thumb { transform: rotate(-1.6deg); }
.note:nth-child(even) .print--thumb { transform: rotate(1.4deg); }
.tape--t { top: -12px; left: 50%; right: auto; width: 70px; height: 22px; margin-left: -35px; transform: rotate(-3deg); }

@container (min-width: 640px) {
  .notes__head, .note { display: grid; grid-template-columns: 200px minmax(0, 1fr) 170px; }
  .note { grid-template-areas: "pic body meta"; }
  .note__pic { padding: 26px 20px 22px; border-right: var(--rule); }
  .note__body { padding: 20px 22px 24px; border-right: var(--rule); }
  .note__meta { padding: 16px 14px 8px; }
}
@container (min-width: 800px) {
  .notes__head, .note { grid-template-columns: 230px minmax(0, 1fr) 190px; }
  .note__body { padding-inline: 24px; }
  .note__meta { padding-inline: 16px; }
}

/* ---------- Article: one white sheet, a form head, then reading ---------- */
.note-head .form__head > div { flex: 1 1 480px; min-width: 0; }
.form__title--a { font-size: clamp(2.25rem, 4.2vw, 3.5rem); line-height: 1.02; }
.stub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: var(--rule-2); }
.stub .pen { display: flex; align-items: center; min-height: 44px; margin-top: 0; font: 700 1.5rem/1.2 var(--hand); }
.stub .pen a { padding: 8px 0; }

.read { display: grid; grid-template-columns: minmax(0, calc(66ch + 48px)) 380px; font-size: 1.125rem; }
.read__side { grid-column: 2; grid-row: 1; display: flex; justify-content: center; align-items: flex-start; padding: 40px 30px 34px; }
.read__side .print { position: sticky; top: 24px; max-width: 320px; transform: rotate(1.8deg); }
.print__credit a { padding-block: 14px; }

.prose { grid-column: 1; grid-row: 1; min-width: 0; max-width: calc(66ch + 48px); padding: 36px 24px 44px; color: var(--deep); font: 400 1.125rem/1.7 var(--body); }
.prose p { margin-bottom: 1.2em; }
.prose strong { font-weight: 600; }
.prose a { color: var(--pen); font-weight: 500; }
.prose h2 { margin-top: 2.1em; margin-bottom: .7em; padding-top: 12px; border-top: var(--rule-2); color: var(--ink); font: 700 clamp(1.75rem, 2.6vw, 2.125rem)/1.05 var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.prose ul { margin-bottom: 1.2em; border-top: var(--rule); }
.prose ul li { position: relative; padding: 8px 0 8px 30px; border-bottom: var(--rule); }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 10px; height: 10px; background: var(--ink); }
.prose blockquote { margin: 1.5em 0; padding: 14px 22px; border: 1.5px dashed var(--ink); background: rgba(36, 56, 160, .05); }
.prose blockquote p:last-child { margin-bottom: 0; }

/* The close: the sign-off (canary = your move) beside the route, only step 1 waits on the reader */
.close { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); border-top: var(--rule-2); }
.close__move { display: flex; flex-direction: column; align-items: flex-start; padding: 28px 32px 34px; background: var(--canary); outline: 4px solid var(--ink); outline-offset: -4px; }
.close__text { max-width: 54ch; margin: 10px 0 24px; font: 500 1.25rem/1.55 var(--body); }
.close__text a { padding-block: 10px; color: var(--pen); font-weight: 600; }
.close__move .btn { margin-top: auto; }
.trail__head { padding: 16px 24px 12px; border-bottom: var(--rule); }
.trail__title { font: 700 1.875rem/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.trail__head .lab { margin-top: 6px; }
.trail__step { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 0 16px; padding: 12px 24px; border-bottom: var(--rule); }
.trail__step:last-child { border-bottom: 0; }
.trail__num { display: grid; place-items: center; width: 44px; height: 44px; border: var(--rule-2); font: 700 1.5rem/1 var(--cond); }
.trail__step[aria-current] .trail__num { background: var(--canary); border: 3px solid var(--ink); }
.trail__name { font: 700 1.375rem/1.1 var(--cond); letter-spacing: .03em; text-transform: uppercase; }
.trail__when { margin-top: 2px; }

.more .form__title { font-size: clamp(2rem, 3.2vw, 2.75rem); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1180px) {
  .read { grid-template-columns: minmax(0, 1fr); }
  .read__side { grid-column: 1; border-bottom: var(--rule-2); padding: 34px 24px 30px; }
  .read__side .print { position: static; }
  .prose { grid-column: 1; grid-row: 2; }
}
@media (max-width: 900px) {
  .close { grid-template-columns: minmax(0, 1fr); }
  .trail { border-top: var(--rule-2); }
}
@media (max-width: 760px) {
  .stub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stub .cell:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: var(--rule); }
}
@media (max-width: 640px) {
  .prose { padding: 28px 16px 36px; font-size: 1.0625rem; }
  .read__side { padding: 30px 16px 28px; }
  .close__move { padding: 24px 20px 28px; }
  .close__move .btn { width: 100%; }
  .trail__head, .trail__step { padding-inline: 16px; }
}
