/* Drawstrike: an inker's desk. Pages are sheets of manga board over the battlefield at night; heroes are brush-pen ink;
   terrain is screentone; highlighter marks what you can do next. Dela Gothic One for display, Zen Kaku Gothic New
   for everything you read. */
:root {
  --mat: #23504a; --mat-deep: #1b3f3a; --mat-line: rgba(232, 244, 234, .09); --mat-line2: rgba(232, 244, 234, .2); --on-mat: #eef4ee; --on-mat-dim: #b9cdc2;
  --board: #fbfbf8; --ink: #141416; --graphite: #5d6068; --tone: #9a9da6; --guide: #86bde6; --rule: #e3e5e8;
  --blue: #2350e6; --red: #e3342c; --hi: #ffe146; --green: #1f9d55; --orange: #f07a1a; --purple: #7b3fe4; --pink: #f0509a;
  --display: "Dela Gothic One", "Arial Black", sans-serif; --text: "Zen Kaku Gothic New", "Helvetica Neue", Arial, sans-serif;
  --drop: var(--ink);   /* hard shadows under panels */
}
/* Backdrops: the inline script in each page's head sets data-mat on <html> (arena by default; ?mat= to preview).
   arena: the real 5v5 board at night behind everything (public/arena.jpg from scripts/backdrop.mjs), Blue Pen's glow
   on the left and Red Pen's on the right; night: the same without the board; paper: white manuscript board with
   non-photo-blue guides; mat: the green cutting mat. */
:root[data-mat="arena"], :root[data-mat="night"] { --mat: #11152a; --mat-deep: #0a0d1c; --mat-line: rgba(220, 228, 255, .04); --mat-line2: rgba(220, 228, 255, .08); --on-mat: #f3f4fa; --on-mat-dim: #a9b0c9; --drop: #03040a; }
:root[data-mat="paper"] { --mat: #eef1f4; --mat-deep: #dfe4ea; --mat-line: rgba(134, 189, 230, .22); --mat-line2: rgba(134, 189, 230, .5); --on-mat: #141416; --on-mat-dim: #5d6068; }
:root[data-mat="arena"] body, :root[data-mat="night"] body { background: var(--mat); }
:root[data-mat="arena"] body::before, :root[data-mat="night"] body::before { content: ""; position: fixed; inset: -4%; z-index: -1; pointer-events: none; }
:root[data-mat="arena"] body::before { background: linear-gradient(rgba(20, 26, 62, .66), rgba(20, 26, 62, .66)), url(/arena.jpg) center 35% / cover no-repeat; animation: pan 80s ease-in-out infinite alternate; will-change: transform; }
:root[data-mat="night"] body::before { background: repeating-conic-gradient(from 0deg at 50% -20%, rgba(255, 255, 255, .035) 0deg 1deg, transparent 1deg 7deg), radial-gradient(130% 100% at 50% 30%, #1a2042, #0a0c18 80%); }
@keyframes pan { from { transform: translate3d(-1.6%, -1.2%, 0) scale(1.02); } to { transform: translate3d(1.6%, 1.2%, 0) scale(1.07); } }   /* a slow camera over the board, like a game's menu */
:root[data-mat="arena"] body::after, :root[data-mat="night"] body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 60% at 0% 0%, rgba(35, 80, 230, .42), transparent 70%), radial-gradient(55% 60% at 100% 0%, rgba(227, 52, 44, .34), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1.4px) 0 0 / 6px 6px, radial-gradient(130% 100% at 50% 35%, transparent 30%, rgba(5, 6, 14, .88) 80%);
  -webkit-mask: radial-gradient(120% 90% at 50% 40%, rgba(0, 0, 0, .25) 30%, #000 75%); mask: radial-gradient(120% 90% at 50% 40%, rgba(0, 0, 0, .25) 30%, #000 75%); }
:root[data-mat="arena"] .stepbar li.done, :root[data-mat="night"] .stepbar li.done { background: #262c4a; border-color: #262c4a; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--text); font-weight: 500; color: var(--on-mat); background-color: var(--mat); line-height: 1.45; -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(var(--mat-line2) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line2) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; background-position: -1px -1px;
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.15; }
::selection { background: var(--hi); color: var(--ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.page { max-width: 1080px; margin: 0 auto; padding: 14px 16px 56px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 12px; white-space: nowrap; }
.logo { font-family: var(--display); font-size: 27px; text-decoration: none; color: var(--on-mat); line-height: 1; letter-spacing: .01em; position: relative; z-index: 0; }
.logo span { position: relative; padding: 0 2px; }
.logo span::before { content: ""; position: absolute; z-index: -1; left: -3px; right: -7px; top: 30%; bottom: -3px; background: var(--red); transform: skewX(-20deg) rotate(-2deg); }
nav.links { display: flex; gap: 16px; font-weight: 700; font-size: 15px; align-items: center; }
nav.links a { color: var(--on-mat); text-decoration: none; border-bottom: 2px solid transparent; }
nav.links a:hover { border-bottom-color: var(--hi); }
.navcta { padding: 6px 12px; font-size: 14px; color: var(--ink) !important; border-bottom: 2.5px solid var(--ink) !important; box-shadow: 3px 3px 0 var(--drop); }
@media (max-width: 600px) { .logo { font-size: 22px; } nav.links { gap: 10px; font-size: 13px; } }

/* a sheet of board: anything you read sits on one */
.board, .tools, .today .box, .case, .about-sheet { background: var(--board); color: var(--ink); border: 3px solid var(--ink); border-radius: 3px; }
.prompt { font-family: var(--display); font-size: 26px; margin: 4px 0 12px; min-height: 30px; color: var(--on-mat); line-height: 1.15; }
.prompt small { display: block; font-family: var(--text); font-weight: 500; font-size: 15px; color: var(--on-mat-dim); margin-top: 6px; max-width: 70ch; line-height: 1.45; }

.studio { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .studio { grid-template-columns: minmax(420px, 560px) 1fr; align-items: start; } }
.studio > * { min-width: 0; }
/* the drawing panel: board with its non-photo-blue frame, like a manga page before inking */
.sheet { position: relative; width: 100%; aspect-ratio: 1; max-width: 560px; background: var(--board); border: 3px solid var(--ink); border-radius: 3px; overflow: hidden; touch-action: none; }
.sheet::after { content: ""; position: absolute; inset: 14px; border: 1.5px solid var(--guide); pointer-events: none; opacity: .75; }
.sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sheet .hint { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 14px; color: var(--tone); pointer-events: none; }
.sheet.alive-burst { animation: thump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes thump { 30% { transform: scale(1.025) rotate(-.4deg); } }
/* focus lines behind a hero as it comes alive: the one big moment */
.burst { position: absolute; inset: -40%; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(20,20,22,.9) 0deg .7deg, transparent .7deg 4.2deg); -webkit-mask: radial-gradient(circle, transparent 28%, #000 46%); mask: radial-gradient(circle, transparent 28%, #000 46%); opacity: 0; }
.burst.on { animation: burst 1.1s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: scale(.7) rotate(0); } 18% { opacity: .55; } 100% { opacity: 0; transform: scale(1.15) rotate(6deg); } }

.tools { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label { font-size: 13px; color: var(--graphite); margin-right: 2px; font-weight: 700; }
.btn { display: inline-block; background: var(--board); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 3px; padding: 7px 14px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .08s, background .12s; }
.btn:hover { background: #f0f1ec; } .btn:active { transform: translate(1px, 1px); }
.btn.on { background: var(--ink); color: var(--board); }
.btn.big { font-family: var(--display); font-weight: 400; font-size: 19px; padding: 12px 22px; letter-spacing: .01em; }
.btn.primary { background: var(--hi); color: var(--ink); box-shadow: 4px 4px 0 var(--drop); }
.btn.primary:hover { background: #ffd81a; } .btn.primary:active { box-shadow: 1px 1px 0 var(--drop); transform: translate(3px, 3px); }
.btn.ink { background: var(--ink); color: var(--board); box-shadow: 4px 4px 0 var(--hi); }
.btn.ink:hover { background: #2a2b30; } .btn.ink:active { box-shadow: 1px 1px 0 var(--hi); transform: translate(3px, 3px); }
.btn.quiet { border-color: transparent; color: var(--graphite); background: transparent; text-decoration: underline; text-underline-offset: 3px; padding-left: 6px; padding-right: 6px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn:focus-visible, .pen:focus-visible, .size:focus-visible, .linkish:focus-visible, nav.links a:focus-visible, .logo:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* pen colours: the caps of a row of brush pens */
.pen { width: 28px; height: 42px; border: 2.5px solid var(--ink); border-radius: 7px 7px 3px 3px; cursor: pointer; position: relative; background: var(--c); padding: 0; }
.pen::after { content: ""; position: absolute; right: 5px; top: 4px; bottom: 9px; width: 3px; border-radius: 2px; background: rgba(255,255,255,.55); }
.pen.on { transform: translateY(-7px); box-shadow: 0 7px 0 -3px var(--drop); }
.size { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--board); display: grid; place-items: center; cursor: pointer; padding: 0; }
.size i { display: block; background: var(--ink); border-radius: 50%; }
.size.on { background: var(--hi); }
.step { display: none; } .step.on { display: block; }
.nameplate { font-family: var(--display); font-size: 36px; line-height: 1.08; min-height: 40px; }
.nameplate .cursor { display: inline-block; width: 4px; height: 32px; background: var(--ink); margin-left: 3px; vertical-align: -4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bio { font-size: 16px; color: var(--graphite); }
.flag { background: #fff0ef; border: 2.5px solid var(--red); color: var(--ink); padding: 10px 12px; border-radius: 3px; }
.empty { color: var(--graphite); font-size: 16px; margin: 20px 0; }
.foot { margin-top: 44px; font-size: 14px; color: var(--on-mat-dim); display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--on-mat-dim); }
.linkish { background: none; border: none; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: 700 14px var(--text); }
.namefield { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-weight: 700; }
.namefield input { font: 700 20px var(--text); border: none; border-bottom: 3px solid var(--ink); background: transparent; padding: 4px 2px; width: min(260px, 60vw); color: var(--ink); outline: none; border-radius: 0; }
.namefield input:focus { border-bottom-color: var(--blue); background: rgba(255, 225, 70, .25); }
.namefield input::placeholder { color: var(--tone); font-weight: 500; }

/* the loading checklist while the reading writes a hero */
.loading { display: grid; gap: 8px; }
.loading h3 { margin: 0; font-size: 24px; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.lbar { height: 14px; border: 2.5px solid var(--ink); border-radius: 2px; background: var(--board); overflow: hidden; }
.lbar i { display: block; height: 100%; background: radial-gradient(circle, var(--ink) 1.4px, transparent 1.6px) 0 0 / 6px 6px, var(--hi); transition: width .45s ease-out; }
.lsteps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.lsteps li { display: grid; grid-template-columns: 26px 1fr; align-items: start; column-gap: 6px; }
.lsteps .lab { font-weight: 700; font-size: 15px; } .lsteps small { color: var(--graphite); }
.lsteps li.todo .lab { color: var(--tone); }
.lsteps li.now .lab::after { content: ''; animation: dots 1.2s steps(4) infinite; }
.tick { width: 20px; height: 20px; border: 2.5px solid var(--ink); border-radius: 2px; position: relative; background: var(--board); }
.lsteps li.todo .tick { border-color: var(--tone); }
.lsteps li.now .tick { border-color: var(--blue); animation: wig .5s ease-in-out infinite alternate; }
.lsteps li.done .tick { background: var(--hi); }
.lsteps li.done .tick::after { content: ''; position: absolute; left: 4px; top: -6px; width: 8px; height: 16px; border: solid var(--ink); border-width: 0 4px 4px 0; transform: rotate(40deg); animation: draw .25s ease-out; }
@keyframes wig { to { rotate: -6deg; } } @keyframes draw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes pop { from { transform: scale(.85); opacity: .3; } to { transform: scale(1); opacity: 1; } }

.idea { margin: 2px 0 0; font-size: 14px; color: var(--graphite); min-height: 22px; } .idea b { color: var(--ink); } .idea .linkish { margin-left: 6px; }
.gofloat { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; animation: floatin .3s ease-out; }
@keyframes floatin { from { transform: translate(-50%, 30px); opacity: 0; } }

/* pages that are mostly reading: About, Leaders, the numbers */
.about-sheet { padding: 18px 22px 24px; }
.about-sheet h1 { font-size: 34px; margin: 0 0 10px; } .about-sheet h2 { font-size: 22px; margin: 26px 0 8px; }
.about-sheet p, .about-sheet li { font-size: 16px; line-height: 1.6; max-width: 76ch; }
.about-sheet a { color: var(--blue); } .about-sheet a.btn { color: var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
td, th { border-bottom: 1.5px solid var(--rule); padding: 6px 7px; text-align: left; vertical-align: top; }
th { font-weight: 900; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition: none !important; } }
@media (prefers-reduced-motion: reduce) { :root[data-mat] body::before { animation: none; } }
