/* Lower Level Legends site pages beyond the reader (workflow.html). Tokens are the reader's own
   (reader/index.template.html): magenta from the basement neon, cyan, caption yellow, Bangers / Comic Neue / Space Mono. */
:root {
  --gutter: #0b0a12; --bar: #151320; --panel: #07060c; --line: #2c2940;
  --text: #f1effa; --muted: #a09db8; --ink: #14121f; --paper: #ffffff;
  --magenta: #ff4d94; --cyan: #35d6ea; --caption: #ffe48a;
  --font-display: "Bangers", "Impact", sans-serif;
  --font-body: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  --font-util: "Space Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--gutter); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; text-decoration-color: var(--magenta); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
img { max-width: 100%; display: block; }

/* top bar: same as the reader's */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bar); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.bar-title { flex: 1; min-width: 0; font-family: var(--font-util); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.bar nav { display: flex; gap: 14px; }
.bar nav a { font-family: var(--font-util); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--magenta); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }
.kicker { font-family: var(--font-util); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin: 0; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 13vw, 92px); line-height: .95; letter-spacing: .02em; margin: 6px 0 14px; text-wrap: balance; text-shadow: 3px 3px 0 var(--magenta); }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 8vw, 46px); line-height: 1; letter-spacing: .03em; margin: 0 0 14px; text-shadow: 2px 2px 0 var(--magenta); }
.lede { font-size: 19px; max-width: 60ch; margin: 0; }
.sect { margin-top: 56px; }
.sect > p { max-width: 64ch; }
.muted { color: var(--muted); }

/* page head: a strip of three real panels */
.head { padding: 48px 0 8px; }
.strip3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: 320px; gap: 6px; margin: 28px -16px 0; }
.strip3 figure { margin: 0; position: relative; overflow: hidden; background: var(--panel); }
.strip3 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.strip3 figcaption, .shot figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; font-family: var(--font-util); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px #000; }

/* the yellow comic caption box, used for rules */
.rule { background: var(--caption); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.6); padding: 12px 16px; font-weight: 700; margin: 20px 0; max-width: 62ch; }
.rule b { font-family: var(--font-util); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 2px; }

/* how a page is made: numbered steps */
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--bar); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--magenta); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 15px; }
.steps code, .entry code { font-family: var(--font-util); font-size: .82em; color: var(--cyan); overflow-wrap: anywhere; }

/* a panel with its speech bubble, shown the way the reader draws it */
.shot { position: relative; margin: 20px -16px 0; aspect-ratio: 16/9; overflow: hidden; background: var(--panel); container-type: inline-size; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bub { position: absolute; transform: translate(-50%, -50%); max-width: 46%; background: var(--paper); color: var(--ink); border: .45cqw solid var(--ink); border-radius: 3.2cqw; padding: 1.6cqw 2.8cqw; font-weight: 700; font-size: clamp(12px, 2.8cqw, 21px); line-height: 1.22; text-align: center; box-shadow: .6cqw .6cqw 0 rgba(0,0,0,.35); }
.bub .who { display: block; font-family: var(--font-util); font-size: .62em; letter-spacing: .1em; text-transform: uppercase; color: #8a1c1c; }

/* the build log */
.log { list-style: none; padding: 0; margin: 24px 0 0; border-left: 3px solid var(--line); }
.entry { position: relative; padding: 0 0 28px 22px; }
.entry::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; background: var(--magenta); border: 3px solid var(--gutter); border-radius: 50%; }
.date { display: inline-block; font-family: var(--font-util); font-size: 12px; font-weight: 700; letter-spacing: .08em; background: var(--caption); color: var(--ink); border: 2px solid var(--ink); padding: 1px 8px; box-shadow: 3px 3px 0 rgba(0,0,0,.6); }
.entry h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: .03em; line-height: 1.05; margin: 10px 0 6px; }
.entry p { margin: 0 0 8px; max-width: 62ch; }
.entry ul { margin: 0; padding-left: 20px; max-width: 62ch; }
.entry li { margin: 2px 0; }
.quote { font-family: var(--font-util); font-size: 14px; color: var(--cyan); }

.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.cast div { background: var(--bar); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.cast b { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: .03em; display: block; }
.cast span { font-size: 14px; color: var(--muted); }

.next { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-block; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; font-family: var(--font-util); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.btn:hover { border-color: var(--magenta); }
.btn.primary { background: var(--magenta); border-color: var(--magenta); color: #fff; font-weight: 700; }

.foot { border-top: 1px solid var(--line); background: var(--bar); }
.foot p { max-width: 760px; margin: 0 auto; padding: 20px 16px 32px; font-size: 14px; color: var(--muted); }

@media (max-width: 560px) {
  .strip3 { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .strip3 figure:first-child { grid-column: 1 / -1; }
  .cast { grid-template-columns: 1fr; }
  .bar-title .long { display: none; }
}
@media (max-width: 440px) { .bar-title { visibility: hidden; } }
