/* /wizard: the owner's space. Same family as quirkyagents (cream, ink, Pixelify titles, Caslon reading, pixel edges),
   its own accent: deep indigo and starlight gold. Reading pages stay calm; the fun is one spell and the code. */
@font-face { font-family: "Pixelify"; src: url("/fonts/pixelify.4a5633a0c9.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
/* Pixelify's 8 reads as a 3 and its 5 as an S: digits from Jersey 10, as in home.css */
@font-face { font-family: "Pixelify"; src: url("/fonts/digits.a5a4e98428.woff2") format("woff2"); font-weight: 400 700; unicode-range: U+0030-0039; size-adjust: 118.5%; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("/fonts/caslon.29310efc10.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caslon"; src: url("/fonts/caslon-bold.2819c345e6.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("/fonts/literata-italic.1e98bfbbb4.woff2") format("woff2"); font-style: italic; font-display: swap; }

:root { color-scheme: light only; --ink: #231c26; --muted: #6b6258; --line: #e6dccb; --bg: #fbf6ec; --card: #fffdf8;
  --accent: #3b3a8c; --gold: #d9a441; --tint: #eeedf8; --night: #1e1b3a; --pixel: Pixelify, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 18px/1.6 Caslon, Georgia, "Times New Roman", serif; overflow-x: hidden; }
main { width: 100%; max-width: 42rem; margin: 0 auto; padding: 0 16px 3rem; flex: 1; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* header: the wizard's face, still, and three plain doors */
.wz-head { width: 100%; max-width: 42rem; margin: 0 auto; padding: 18px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wz-home { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font: 600 1.05rem/1 var(--pixel); }
.wz-face { width: 24px; height: 32px; image-rendering: pixelated; }
.wz-nav { display: flex; gap: 1.1rem; font: 500 .95rem/1 var(--pixel); }
.wz-nav a { color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.wz-nav a:hover, .wz-nav a[aria-current] { border-bottom-color: var(--gold); }

/* home */
.hero { display: flex; align-items: center; gap: 1.4rem; padding: max(5vh, 32px) 0 2.2rem; }
.wizard-big { width: 96px; height: 128px; image-rendering: pixelated; flex: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1 { font: 700 clamp(2rem, 7.5vw, 2.9rem)/1.08 var(--pixel); margin: 0 0 .6rem; letter-spacing: .01em; }
.hero h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
.lede { color: var(--muted); margin: 0 0 1rem; }
.card { background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); padding: 1.1rem 1.2rem; }
.badge { font: 500 .78rem/1.3 var(--pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .3rem !important; }
.shelf { margin: 0 0 2.6rem; }
.shelf h2 { font: 600 1.45rem/1.2 var(--pixel); margin: 0 0 .25rem; letter-spacing: .02em; }
.note { color: var(--muted); margin: 0 0 1rem; font-size: .98rem; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.card h3 { font: 700 1.2rem/1.3 Caslon, Georgia, serif; margin: 0 0 .35rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.card p { margin: 0 0 .4rem; }
.card .links { font: 500 .85rem/1.4 var(--pixel); margin: .5rem 0 0; }
.more { font: 600 .95rem/1.4 var(--pixel); margin: 1.1rem 0 0; }
.more a { text-decoration: none; border-bottom: 2px solid var(--gold); }
.shelf { scroll-margin-top: 1rem; }

/* reading */
.prose { padding-top: 2.6rem; }
.prose > h1 { margin-bottom: .5rem; }
.prose > h1.title { font: 700 clamp(1.9rem, 6.5vw, 2.5rem)/1.15 Caslon, Georgia, serif; letter-spacing: 0; }
.meta { font: 500 .85rem/1.4 var(--pixel); color: var(--muted); margin: 0 0 2rem; }
.prose h2 { font: 700 1.5rem/1.25 Caslon, Georgia, serif; margin: 2.4rem 0 .7rem; }
.prose h3 { font: 700 1.2rem/1.3 Caslon, Georgia, serif; margin: 1.9rem 0 .5rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose figure, .prose video { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0 0 .45rem; }
.prose img, .prose video { display: block; max-width: 100%; height: auto; border: 2px solid var(--ink); background: var(--card); }
.prose p > img { margin: .4rem 0; }
.prose blockquote { margin-left: 0; padding: .2rem 0 .2rem 1rem; border-left: 4px solid var(--gold); color: #4a4140; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 2.2rem 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .92rem; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.prose th { font: 700 .92rem/1.3 Caslon, Georgia, serif; background: var(--tint); }
.prose :not(pre) > code { font: .86em/1 var(--mono); background: var(--tint); padding: .12em .32em; border-radius: 2px; overflow-wrap: anywhere; }
.back { font: 500 .9rem/1.4 var(--pixel); margin-top: 2.6rem !important; }
.about { padding-top: max(9vh, 56px); }

/* a paragraph that is only "→ [label](url)" */
.cast .button { display: inline-block; font: 600 .92rem/1 var(--pixel); color: var(--bg); background: var(--ink); text-decoration: none;
  padding: .75rem 1rem; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--gold); }
.cast .button:hover { background: var(--accent); }
.cast .button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--gold); }

/* the spell: one phrase per page. wizard-page.js recolours it on hover or tap, with one pixel sparkle */
.spell { color: var(--spell, var(--accent)); transition: color .3s; position: relative; }
.spell.casting::after { content: ""; position: absolute; right: -7px; top: -5px; width: 2px; height: 2px; background: var(--gold); pointer-events: none;
  box-shadow: 0 -2px var(--gold), 0 2px var(--gold), -2px 0 var(--gold), 2px 0 var(--gold); animation: twinkle .6s steps(3) forwards; }
@keyframes twinkle { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .spell { transition: none; } .spell.casting::after { animation: none; opacity: 0; } }

/* code: the spellbook. A pixel tab names the language; the copy button arrives with JS */
figure.code { position: relative; margin: 0 0 1.3rem; border: 2px solid var(--ink); background: var(--night); box-shadow: 5px 5px 0 var(--line); }
figure.code figcaption { position: absolute; top: 0; left: 0; font: 500 .76rem/1 var(--pixel); letter-spacing: .06em; color: var(--night);
  background: var(--gold); padding: .3rem .5rem .28rem; }
figure.code pre { margin: 0; padding: 2rem 1rem 1rem; overflow-x: auto; }
figure.code code { font: 14px/1.6 var(--mono); color: #e9e4f5; white-space: pre; }
.copy { position: absolute; top: 0; right: 0; font: 500 .76rem/1 var(--pixel); letter-spacing: .04em; color: #e9e4f5; background: transparent;
  border: 0; border-left: 2px solid #3a3566; border-bottom: 2px solid #3a3566; padding: .3rem .55rem; cursor: pointer; }
.copy:hover { color: var(--gold); }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag { color: #f2c14e; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-string { color: #9fd49a; }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: #f29bb6; }
.hljs-comment, .hljs-quote, .hljs-deletion { color: #8c88b8; font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: #8fc3f0; }
.hljs-built_in, .hljs-type, .hljs-title.class_ { color: #c3a6f0; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-variable, .hljs-params, .hljs-selector-class { color: #f5d9a8; }
.hljs-meta, .hljs-meta .hljs-keyword { color: #d9a441; }
.hljs-punctuation, .hljs-operator { color: #b9b4d8; }

/* runes: the X and GitHub links, big enough to notice */
.summon { display: flex; flex-wrap: wrap; gap: .8rem; margin: .4rem 0 1.2rem; }
.rune { display: inline-flex; align-items: baseline; gap: .5rem; font: 700 1.1rem/1 var(--pixel); color: var(--bg); background: var(--accent);
  text-decoration: none; padding: .8rem 1.1rem; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--gold); }
.rune span { font: 500 .85rem/1 var(--pixel); color: #d8d6f4; }
.rune:hover { background: var(--ink); }
.rune:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--gold); }

/* footer: its own. One way back to the agents */
.wz-foot { width: 100%; max-width: 42rem; margin: 0 auto; padding: 1.6rem 16px 2.4rem; border-top: 2px solid var(--ink); font: 500 .9rem/1.5 var(--pixel); color: var(--muted); }
.wz-foot p { margin: 0 0 .5rem; }
/* the Summon page already shows the runes */
body:has(.about) .wz-foot .summon { display: none; }
.wz-quip { font: italic 1rem/1.5 Caslon, Georgia, serif; }
.wz-legal { font-size: .78rem; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .hero { gap: 1rem; }
  .wizard-big { width: 72px; height: 96px; }
  figure.code code { font-size: 13px; }
}
