/* ─────────────────────────────────────────────────────────────────────────
   blog.nonarkara.org — the baggage system
   Lineage: the airline baggage tag (IATA Res. 740/753 thermal stock).
   Test for any component: would this belong on a tag looped round a handle?

   TOKEN ROLES — one job each, no bleed. Checkable against a diff:
     --route   destination/wayfinding ONLY (dest code, active nav, hover rule)
     --ink     print. all text. never a signal.
     --stock   thermal face stock. ground only. never a text colour.
     --void    die-cut rules and perforations. structure only, never emphasis.
   --route is the ONLY chromatic channel. A second colour is a regression
   unless it encodes a new domain (explicit rating, priority).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --stock:    #efeee9;
  --stock-2:  #ffffff;
  --ink:      #14110f;
  --ink-2:    #57524c;
  --ink-3:    #8d867d;
  --void:     #cdc7bd;
  --route:    #c2410c;
  --explicit: #14110f;

  --t-display: clamp(3rem, 11vw, 9rem);
  --t-body:    1rem;
  --t-micro:   0.6875rem;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gap: 1.5rem;
  --rule: 1px solid var(--void);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--stock); color: var(--ink);
  font: var(--t-body)/1.55 var(--font-body); font-synthesis-weight: none;
}
.mono, code, .lpn, time, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }

/* ── PERFORATION. The tear line. Real punched dots, not a dashed border. ── */
.perf-x {
  height: 10px; width: 100%;
  background-image: radial-gradient(circle at 5px 5px, var(--stock) 3.2px, transparent 3.4px);
  background-size: 14px 10px; background-repeat: repeat-x;
  border-top: 1px dashed var(--void); border-bottom: 1px dashed var(--void);
}
/* The loop hole — how the tag attaches to the handle. */
.punch {
  width: 16px; height: 16px; border: 2px solid var(--ink);
  border-radius: 50% !important; background: var(--stock);
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
}

/* ── Masthead: the carrier block ─────────────────────────────────────── */
.masthead { border-bottom: 2px solid var(--ink); background: var(--stock-2); position: sticky; top: 0; z-index: 20; }
.masthead-in { max-width: var(--max); margin: 0 auto; padding: .8rem var(--gap);
  display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
.carrier { font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.carrier .dot { color: var(--route); }
.masthead nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.masthead nav a { font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .12em; text-transform: uppercase; padding-bottom: 2px;
  border-bottom: 2px solid transparent; }
.masthead nav a[aria-current="page"] { border-bottom-color: var(--route); }
.masthead nav a:hover { border-bottom-color: var(--void); }

/* ── THE TAG STRIP — full-bleed hero. This is the whole aesthetic. ────── */
.strip { background: var(--stock-2); border-bottom: 2px solid var(--ink); position: relative; }
.strip-in { max-width: var(--max); margin: 0 auto; padding: 2.75rem var(--gap) 0; }
/* the destination block: the single largest mark on the page */
.dest { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2rem; align-items: end; }
.dest h1 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--t-display);
  line-height: .82; letter-spacing: -.045em; margin: .25rem 0 0; text-transform: uppercase;
}
.dest .sub { max-width: 54ch; color: var(--ink-2); margin: 1rem 0 0; }
/* the vertical stub, rotated — exactly how a real tag prints its carrier */
.stub-v {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3);
  border-left: 1px dashed var(--void); padding-left: .6rem; align-self: stretch;
  display: flex; align-items: flex-end; white-space: nowrap;
}
/* the machine layer, full width */
.barcode { display: flex; gap: 1px; height: 3.25rem; align-items: stretch;
  margin: 2rem 0 0; overflow: hidden; }
.barcode i { background: var(--ink); display: block; flex: none; }
.strip-foot {
  display: flex; gap: 2.5rem; flex-wrap: wrap; padding: .9rem 0 1.4rem;
  font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.strip-foot b { display: block; font-size: 1.35rem; color: var(--ink); letter-spacing: 0; font-weight: 600; }

/* ── SIDE-BY-SIDE SERIES PANELS. Two shows, never one roll. ──────────── */
.decks { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 2px solid var(--ink); }
.deck { background: var(--stock-2); border-left: var(--rule); padding: 2rem var(--gap) 1.5rem; position: relative; min-width: 0; }
.deck:first-child { border-left: 0; }
.deck::before {   /* the adhesive band down the spine of a real tag */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 14px);
  opacity: .18;
}
.deck-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .35rem; }
.deck-code {
  font-family: var(--font-display); font-weight: 700; font-size: 3.25rem;
  line-height: .85; letter-spacing: -.04em;
}
.deck h2 { font-size: 1.0625rem; font-weight: 600; margin: 0; }
.deck .blurb { color: var(--ink-2); font-size: .9375rem; margin: .5rem 0 1.1rem; max-width: 46ch; }
.deck-stats { display: flex; gap: 1.5rem; font-family: var(--font-mono);
  font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: .9rem; border-bottom: 1px dashed var(--void); }
.deck-stats b { color: var(--ink); font-size: .9375rem; letter-spacing: 0; }
.deck-list { list-style: none; margin: .9rem 0 1.2rem; padding: 0; }
.deck-list li { border-bottom: 1px dashed var(--void); }
.deck-list a { display: grid; grid-template-columns: 5.5rem 1fr; gap: .85rem; padding: .6rem 0; align-items: baseline; }
.deck-list a:hover .t { color: var(--route); }
.deck-list .k { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); letter-spacing: .06em; }
.deck-list .t { font-size: .9375rem; line-height: 1.35; }
.deck-more { font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--route); padding-bottom: 2px; }

/* the essays band — source material, deliberately subordinate to the shows */
.source-band { background: var(--stock); border-bottom: 2px solid var(--ink); }
.source-band .wrap { padding: 1.5rem var(--gap); display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.source-band .deck-code { font-size: 2.25rem; }

/* ── SUB-TABS within a series ────────────────────────────────────────── */
.subtabs { display: flex; gap: 0; border-bottom: 2px solid var(--ink); background: var(--stock-2); flex-wrap: wrap; }
.subtab {
  font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; padding: .75rem 1.1rem; background: none;
  border: 0; border-right: var(--rule); cursor: pointer; color: var(--ink-2);
}
.subtab[aria-selected="true"] { background: var(--ink); color: var(--stock-2); }
.subtab:hover:not([aria-selected="true"]) { color: var(--route); }

/* ── Field label: declares the DOMAIN of the value beneath ───────────── */
.field { font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin-bottom: .2rem; }

/* ── The tag. One item = one bag. ────────────────────────────────────── */
.tags { display: grid; gap: .75rem; padding: 2rem 0 4rem; }
.tag { background: var(--stock-2); border: var(--rule); border-left: 3px solid var(--ink);
  display: grid; grid-template-columns: 7.5rem 1fr;
  transition: border-left-color .12s cubic-bezier(.2,.8,.2,1); }
.tag:hover { border-left-color: var(--route); }
.tag-code { border-right: 1px dashed var(--void); padding: .9rem .75rem;
  display: flex; flex-direction: column; justify-content: space-between; }
.tag-code b { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem;
  line-height: 1; letter-spacing: -.02em; display: block; }
.tag-code .seq { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); margin-top: .35rem; }
.tag-body { padding: .9rem 1rem; min-width: 0; }
.tag-body h3 { margin: 0 0 .3rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.tag-body p { margin: 0 0 .55rem; color: var(--ink-2); font-size: .9375rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-meta { display: flex; gap: .9rem; flex-wrap: wrap; font-family: var(--font-mono);
  font-size: var(--t-micro); color: var(--ink-3); letter-spacing: .04em; }
.tag-meta .lpn { color: var(--ink-2); }
.rating { border: 1px solid var(--explicit); color: var(--stock-2); background: var(--explicit);
  padding: 0 .3rem; letter-spacing: .1em; font-weight: 600; }

/* ── Search + filters ────────────────────────────────────────────────── */
.controls { padding-top: 1.75rem; }
#q { width: 100%; padding: .7rem .85rem; font: var(--t-body)/1.2 var(--font-mono);
  background: var(--stock-2); color: var(--ink); border: var(--rule); border-left: 3px solid var(--ink); }
#q::placeholder { color: var(--ink-3); }
#q:focus { outline: none; border-left-color: var(--route); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }
.chip { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .08em;
  text-transform: uppercase; padding: .28rem .55rem; background: var(--stock-2);
  border: var(--rule); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--stock-2); border-color: var(--ink); }
.count { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); margin-top: .9rem; }

/* ── Item page ───────────────────────────────────────────────────────── */
.stub { background: var(--stock-2); border: var(--rule); border-left: 3px solid var(--route);
  padding: 1.25rem; margin-bottom: 2rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem,1fr)); gap: 1.1rem; }
.stub .v { font-family: var(--font-mono); font-size: .9375rem; }
.ep-title { font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem,4vw,3rem); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 .6rem; }
.player { width: 100%; margin: 0 0 2rem; }
.transcript { max-width: 68ch; }
.transcript p { margin: 0 0 1.15rem; }
.backlink { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); display: inline-block; margin: 2rem 0 1.5rem; }
.backlink:hover { color: var(--route); }
.linked { list-style: none; padding: 0; margin: 0; }
.linked li { border-bottom: 1px dashed var(--void); }
.linked a { display: grid; grid-template-columns: 5.5rem 1fr; gap: .85rem; padding: .55rem 0; align-items: baseline; }
.linked a:hover .t { color: var(--route); }
.linked .k { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); }

/* ── MAPS ────────────────────────────────────────────────────────────── */
.map-shell { background: var(--stock-2); border: var(--rule); border-left: 3px solid var(--ink); margin-bottom: 2.5rem; }
.map-head { display: flex; gap: 1rem; align-items: baseline; padding: .9rem 1rem;
  border-bottom: 1px dashed var(--void); flex-wrap: wrap; }
.map-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.map-head .field { margin: 0; }
.map-head .hint { margin-left: auto; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); }
.mm { width: 100%; height: 620px; display: block; }
#graph { width: 100%; height: 700px; display: block; cursor: grab; }
#graph:active { cursor: grabbing; }
.legend { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: .75rem 1rem;
  border-top: 1px dashed var(--void); font-family: var(--font-mono);
  font-size: var(--t-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.legend i { display: inline-block; width: 9px; height: 9px; background: var(--ink); margin-right: .4rem; }
.legend .r { background: var(--route); }
.legend .o { background: var(--stock-2); border: 1.5px solid var(--ink); }

/* ── Footer: the claim stub ──────────────────────────────────────────── */
footer { border-top: 2px solid var(--ink); background: var(--stock-2); margin-top: 0; }
footer .wrap { padding: 1.5rem var(--gap); }
footer p { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3);
  letter-spacing: .04em; margin: 0 0 .4rem; max-width: 78ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto; } }
@media (max-width: 860px) {
  .decks { grid-template-columns: 1fr; }
  .deck { border-left: 0; border-top: var(--rule); }
  .dest { grid-template-columns: 1fr; }
  .stub-v { display: none; }
}
@media (max-width: 640px) {
  .tag { grid-template-columns: 5.25rem 1fr; }
  .tag-code b { font-size: 1.35rem; }
  .mm, #graph { height: 460px; }
}
@media print {
  body { background: #fff; }
  .masthead nav, .controls, .player, .map-shell { display: none; }
  .tag, .stub { break-inside: avoid; }
}
