/* codex.slopped.site: the lore of the slopped.site world. Hand-written (the build doesn't touch it).
   Brand tokens and type as on slopped.site (slopped-brand). The idea: a printed reference work on the site's
   paper. Headwords in Archivo Black, indexes ruled with hairlines, pictures set as plates on a panel with a
   caption, pixel sprites enlarged without smoothing. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@font-face { font-family: "Archivo Black Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Noto Sans Bold"), local("NotoSans-Bold"); size-adjust: 112%; }
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #171815;
  --acid: #e3ff59;
  --muted: #6b6b62;
  --line: #d4d2c9;
  --panel: #ebe7dc;
  --card: #fbf9f3;
  --head: "Archivo Black", "Arial Black", "Archivo Black Fallback", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #728600; outline-offset: 5px; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 1000; letter-spacing: -1.5px; line-height: 1.02; font-synthesis: none; }
img { max-width: 100%; }
img.pixel { image-rendering: pixelated; }
.wrap { max-width: 1280px; margin: auto; padding: 0 5%; }
html:not(.can-install) [data-install] { display: none !important; }

/* header: the masthead (slopped-brand, "Subsite header") */
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100px; border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; min-width: 0; }
.masthead .brand { display: flex; align-items: center; min-height: 42px; flex: none; }
.masthead .brand img { display: block; width: auto; height: 30px; }
.site-name { display: inline-flex; align-items: center; min-height: 42px; margin-left: 16px; padding-left: 17px; background: linear-gradient(var(--line), var(--line)) left center / 1px 22px no-repeat; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.3px; text-decoration: none; white-space: nowrap; }
.site-name:hover, .site-name[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
nav { display: flex; align-items: center; gap: 4px 18px; font-size: 14px; }
nav a { display: inline-flex; align-items: center; min-height: 42px; text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
nav a[aria-current] { font-weight: 700; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 700 14px Arial, Helvetica, sans-serif; text-decoration: none; cursor: pointer; }
.pill.dark { background: var(--ink); color: var(--paper); }
.pill.install-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; min-height: 42px; padding: 0; }
.lede { max-width: 680px; margin: 16px 0; font-size: 21px; line-height: 1.4; letter-spacing: -.3px; }
.small { color: var(--muted); font-size: 13px; }
.count { color: var(--muted); font-size: 14px; }
.prose { max-width: 680px; font-size: 17px; }
.prose p { margin: 0 0 14px; }
.prose a, .lede a, footer a, .legends p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: #728600; text-decoration-thickness: 2px; }
h2.sub { margin: 34px 0 12px; font-size: 22px; letter-spacing: -.5px; }

/* the index: a ruled list of entries, small plate + name + one line */
.index { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 34px; margin: 0 0 40px; padding: 0; list-style: none; }
.index li { border-top: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; min-height: 86px; padding: 10px 0; text-decoration: none; }
.index a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.tx { display: grid; gap: 2px; min-width: 0; }
.tx b { font-size: 16px; line-height: 1.25; }
.tx span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.th { display: block; width: 64px; height: 64px; overflow: hidden; border-radius: 9px; background: var(--panel); }
.th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th.px img { object-fit: contain; padding: 6px; }
.th.none { background: repeating-linear-gradient(-45deg, var(--panel) 0 6px, var(--paper) 6px 12px); }

/* page heads */
.page-head { padding: 52px 0 26px; }
.page-head h1 { font-size: clamp(48px, 7vw, 96px); }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.kinds a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; }
.kinds a:hover { border-color: var(--ink); }
.kinds a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* home */
.home-intro { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: end; padding: 56px 0 50px; }
.home-intro h1 { font-size: clamp(54px, 7.4vw, 112px); }
.home-intro .lede { margin-top: 0; }
.home-intro p { max-width: 600px; }
.search { position: relative; margin: 22px 0 10px; max-width: 600px; }
.search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.search-row { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; min-height: 50px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font: 17px Arial, Helvetica, sans-serif; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search .pill { min-height: 50px; }
.results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px 16px; list-style: none; border: 1px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 0 18px 40px #17181526; }
.results li + li { border-top: 1px solid var(--line); }
.results a { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; min-height: 58px; padding: 6px 0; text-decoration: none; }
.results .th { width: 44px; height: 44px; border-radius: 7px; }
.results .tx b { font-size: 15px; }
.results .tx span { font-size: 13px; }
.results .empty { padding: 14px 0; color: var(--muted); }
mark { background: var(--acid); color: inherit; }

.figures { padding: 46px 0 50px; border-top: 1px solid var(--line); }
.figures h2, .by-kind h2, .by-world h2 { margin-bottom: 24px; font-size: 32px; }
.figure-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); grid-auto-rows: auto; gap: 26px 22px; }
.figure-grid a { display: grid; align-content: start; gap: 4px; text-decoration: none; }
.figure-grid a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.figure-grid .lead { grid-row: span 2; }
.figure-grid .lead figure { margin: 0 0 10px; }
.figure-grid .lead img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.figure-grid .lead b { font: 1000 30px/1.05 var(--head); letter-spacing: -1px; }
.figure-grid .th { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 8px; border-radius: 12px; transition: transform .2s; }
.figure-grid .th.px img { padding: 16%; }
.figure-grid a:hover .th { transform: translateY(-4px); }
.figure-grid b { font-size: 16px; }
.figure-grid span:not(.th) { color: var(--muted); font-size: 13px; }
.figure-grid .lead span:not(.th) { font-size: 16px; }

/* by kind: the words themselves are the index */
.by-kind { padding: 46px 0 40px; border-top: 1px solid var(--line); }
.by-kind ul { display: flex; flex-wrap: wrap; gap: 0 34px; margin: 0; padding: 0; list-style: none; }
.by-kind a { display: inline-flex; align-items: flex-start; gap: 6px; padding: 4px 0; text-decoration: none; }
.by-kind b { font: 1000 clamp(40px, 6.2vw, 86px)/1.02 var(--head); letter-spacing: -2.5px; font-synthesis: none; }
.by-kind sup { margin-top: .5em; padding: 2px 8px; border-radius: 999px; background: var(--acid); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.by-kind a:hover b { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }

.by-world { padding: 46px 0 30px; border-top: 1px solid var(--line); }
.by-world ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.by-world li { border-top: 1px solid var(--line); }
.by-world a { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; padding: 18px 0; text-decoration: none; }
.wpic { display: block; overflow: hidden; border-radius: 10px; background: var(--panel); aspect-ratio: 16 / 10; }
.wpic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.by-world a:hover .wpic img { transform: scale(1.04); }
.wtx { display: grid; gap: 4px; }
.wtx b { font: 1000 24px/1.05 var(--head); letter-spacing: -.8px; }
.by-world a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.wtx span { font-size: 15px; }
.wtx small { color: var(--muted); font-size: 13px; }

.statement { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; margin: 40px 0 10px; padding: 46px 5%; border-radius: 18px; background: var(--acid); }
.statement h2 { font-size: clamp(32px, 4vw, 54px); }
.statement p { max-width: 560px; margin: 10px 0 0; font-size: 17px; }
.statement .cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }

/* an entry */
.entry-head { padding: 46px 0 6px; }
.crumbs { margin: 0 0 10px; font-size: 14px; }
.crumbs a { text-decoration: none; font-weight: 700; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legend-tag { padding: 2px 10px; border: 1px dashed var(--ink); border-radius: 999px; font-size: 12px; font-weight: 800; }
.entry h1 { font-size: clamp(48px, 7vw, 100px); overflow-wrap: anywhere; }
.entry-head .lede { margin-bottom: 30px; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 54px; align-items: start; padding-top: 30px; border-top: 1px solid var(--line); }
.plate { position: sticky; top: 24px; margin: 0; }
.plate img { display: block; width: 100%; height: auto; max-height: 76vh; object-fit: contain; border-radius: 12px; background: var(--panel); }
.plate.px { max-width: 460px; }
.plate.px img { aspect-ratio: 1; padding: 14%; object-fit: contain; }
.plate figcaption, .more-pics figcaption, .banner figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.plate .placeholder { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: repeating-linear-gradient(-45deg, var(--panel) 0 10px, var(--paper) 10px 20px); color: var(--muted); font-weight: 700; }
.entry-text h2.sub:first-of-type { margin-top: 26px; }
.facts { display: grid; grid-template-columns: max-content 1fr; max-width: 680px; margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { padding-right: 26px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.facts dd { font-size: 15px; }
.facts a { font-weight: 700; text-underline-offset: 3px; }
.appears { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.gallery-row, .lines, .connections { margin-top: 40px; padding-top: 4px; border-top: 1px solid var(--line); }
.more-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.more-pics figure { margin: 0; }
.more-pics img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--panel); }
.more-pics .px img { object-fit: contain; padding: 10%; }
.more-pics .sq img { object-fit: contain; padding: 3%; }
.lines ol { columns: 2 340px; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.lines li { break-inside: avoid; display: grid; gap: 4px; padding: 14px 0 14px 18px; border-left: 3px solid var(--acid); margin-bottom: 10px; }
.lines q { font-size: 17px; line-height: 1.4; quotes: "“" "”"; }
.lines q.nq { quotes: none; } /* the line already opens with a quotation */
.lines small { color: var(--muted); font-size: 12px; font-weight: 700; }
.connections ul { columns: 3 260px; column-gap: 34px; margin: 0 0 30px; padding: 0; list-style: none; }
.connections li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.connections a { font-weight: 700; text-underline-offset: 3px; }
.as { color: var(--muted); }

/* a world */
.world-head { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; padding: 46px 0 40px; }
.world-head h1 { font-size: clamp(46px, 6.4vw, 92px); }
.banner { margin: 0; }
.banner img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: 14px; background: var(--panel); }
.banner.px img { object-fit: contain; }
.group { padding-top: 10px; }
.group h2 { margin: 18px 0 14px; font-size: 28px; }

/* timeline */
.timeline-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 50px; align-items: start; padding-bottom: 30px; }
.timeline-grid h2 { margin-bottom: 18px; font-size: 30px; }
.record { position: relative; margin: 0; padding: 0; list-style: none; }
.record::before { content: ""; position: absolute; top: 20px; bottom: 20px; left: 21px; border-left: 2px solid var(--ink); }
.record li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px; gap: 20px; align-items: start; padding: 16px 0; }
.record .n { z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; background: var(--acid); font: 900 16px var(--head); }
.record .legend .n { background: var(--paper); border-style: dashed; }
.record small, .legends small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.record h3, .legends h3 { margin: 4px 0 6px; font-size: 24px; letter-spacing: -.8px; }
.record p, .legends p { margin: 0; font-size: 16px; }
.record .legend p { font-style: italic; color: var(--muted); }
.record img { display: block; width: 150px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; background: var(--panel); }
.record img.badge { object-fit: contain; background: none; transform: rotate(-6deg); }
.go { display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px; font-weight: 700; font-size: 14px; }
.legends { position: sticky; top: 24px; padding: 22px 24px; border: 1.5px dashed var(--ink); border-radius: 16px; }
.legends ol { margin: 18px 0 0; padding: 0; list-style: none; }
.legends li { padding: 14px 0; border-top: 1px solid var(--line); }
.legends p { font-style: italic; }

/* map */
.map { margin: 0 0 30px; padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.map svg { display: block; width: 100%; height: auto; }
.map .edge path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.map .edge text { fill: var(--muted); font: 700 14px Arial, Helvetica, sans-serif; paint-order: stroke; stroke: var(--card); stroke-width: 5px; }
.map .node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.map .node text { fill: var(--ink); font: 1000 17px var(--head); letter-spacing: -.3px; }
.map .node:hover rect, .map .node:focus rect { fill: var(--acid); }
.map .node:focus { outline: none; }
.map .node:focus-visible rect { stroke: #728600; stroke-width: 4; }
.map .w-workshop rect { fill: #f7e7b7; } .map .w-sea rect { fill: #cfe6f1; } .map .w-theatre rect { fill: #f2cbd2; }
.map .w-shop rect { fill: #e6efd2; } .map .w-vats rect { fill: #e0e3cf; } .map .w-wall rect { fill: #ffffff; }
.map figcaption { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; }
.key::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 1.5px solid var(--ink); border-radius: 50%; vertical-align: -1px; }
.key.w-workshop::before { background: #f7e7b7; } .key.w-sea::before { background: #cfe6f1; } .key.w-theatre::before { background: #f2cbd2; }
.key.w-shop::before { background: #e6efd2; } .key.w-vats::before { background: #e0e3cf; } .key.w-wall::before { background: #fff; }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.split > h2 { font-size: 30px; }
.routes { columns: 2 300px; column-gap: 34px; margin: 0; padding: 0; list-style: none; }
.routes li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.routes a { font-weight: 700; }
.routes small { display: block; color: var(--muted); font-size: 12px; }

/* glossary */
.glossary { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; max-width: 980px; margin: 0 0 40px; }
.glossary dt, .glossary dd { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.glossary dt { font: 1000 21px/1.2 var(--head); letter-spacing: -.5px; scroll-margin-top: 16px; }
.glossary dd { font-size: 16px; }
.glossary dd a { font-weight: 700; white-space: nowrap; }
.small-gloss dt { font-size: 17px; }
.small-gloss small { color: var(--muted); }

.results-full { margin-top: 10px; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 26px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer img { width: 120px; height: auto; }
footer p { max-width: 640px; margin: 0; text-align: right; }
.sloppywright { display: block; margin-top: 4px; }

@media (max-width: 980px) {
  .home-intro, .world-head, .entry-grid, .timeline-grid { grid-template-columns: 1fr; gap: 26px; }
  .figure-grid { grid-template-columns: repeat(3, 1fr); }
  .figure-grid .lead { grid-column: 1 / -1; grid-row: auto; }
  .by-world ol { grid-template-columns: 1fr; }
  .plate { position: static; max-width: 560px; }
  .legends { position: static; }
  .split { grid-template-columns: 1fr; gap: 16px; }
  .statement { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  header { flex-wrap: wrap; align-content: center; gap: 0 16px; height: auto; padding: 14px 0 6px; }
  header nav { width: 100%; gap: 0 18px; }
  .masthead .brand img { height: 24px; }
  .site-name { margin-left: 11px; padding-left: 12px; font-size: 15px; background-size: 1px 18px; }
  .lede { font-size: 18px; }
  .home-intro { padding-top: 34px; }
  .page-head, .entry-head { padding-top: 32px; }
  .figure-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .by-kind ul { gap: 0 22px; }
  .by-world a { grid-template-columns: 112px 1fr; gap: 14px; }
  .wtx b { font-size: 20px; }
  .wtx span { font-size: 14px; }
  .index { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
  .record li { grid-template-columns: 44px minmax(0, 1fr); }
  .record img { grid-column: 2; width: 100%; max-width: 320px; }
  .glossary { grid-template-columns: 1fr; }
  .glossary dd { border-top: 0; padding-top: 0; }
  .map { padding: 8px; }
  .statement { padding: 32px 22px; }
  footer { flex-direction: column; align-items: flex-start; }
  footer p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
