/* Flatline - The Shiba Circuit. The game's pages on a2cogs.com.
   Own look (the title screen's red and cyan on near-black), the CoGS
   site's pixel font for the HUD-style labels. */
@font-face {
  font-family: "PrintChar21";
  src: url("/assets/fonts/PrintChar21.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --panel: #12121b;
  --panel-2: #181826;
  --line: #23233a;
  --line-2: #2f2f4d;
  --text: #e6e4ec;
  --text-dim: #a9a7b8;
  --muted: #6d6b80;
  --red: #ff2a4f;
  --red-2: #ff5f7a;
  --cyan: #3ee0ff;
  --cyan-2: #8bedff;
  --amber: #ffb547;
  --pixel: "PrintChar21", "Courier New", monospace;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --r: 10px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-2); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: .4rem 0 .9rem; }
.dim { color: var(--text-dim); }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin: 0 auto; }
.narrow { max-width: 68ch; }
.narrow ul.dl { margin: .4rem 0 1rem; padding-left: 1.2rem; }
.narrow ul.dl li { margin: .25rem 0; }

/* The bar: back to a2cogs, the game, the pages. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 7, 11, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1.2rem; height: 56px; }
.top .home { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.top .home:hover { color: var(--text); text-decoration: none; }
.top .game { font-family: var(--pixel); font-size: .85rem; letter-spacing: .04em; color: var(--red); white-space: nowrap; }
.top .game:hover { color: var(--red-2); text-decoration: none; }
.top .pages { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; margin-left: .4rem; }
.top .pages a { font-size: .82rem; padding: .3rem .7rem; color: var(--text-dim); white-space: nowrap; }
.top .pages a + a { border-left: 1px solid var(--line-2); }
.top .pages a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.top .pages a.on { color: var(--cyan); background: rgba(62,224,255,.08); }
.toc a.back { display: block; font-size: .82rem; color: var(--cyan); margin-bottom: .9rem; }
.top nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { font-size: .9rem; color: var(--text-dim); white-space: nowrap; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav a.on { color: var(--cyan); }
@media (max-width: 760px) { .top nav a.hide-sm { display: none; } }

/* Hero: the title screen over the Shiba Harbour painting (the title
   painting has the logo in it, which fought the page, 2026-11-05). */
.hero {
  position: relative; overflow: hidden;
  background: #04040a url("img/art/sprawl-stage-harbour.jpg") center 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,4,10,.74) 0%, rgba(4,4,10,.9) 60%, var(--bg) 100%);
}
.hero .wrap { position: relative; padding: 3.5rem 0 3rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero .shot { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(62,224,255,.08); }
.kicker { font-family: var(--pixel); font-size: .7rem; letter-spacing: .12em; color: var(--cyan); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin: 0 0 .6rem; }
.hero h1 small { display: block; font-size: .45em; color: var(--text-dim); font-weight: 500; letter-spacing: .02em; margin-top: .3rem; }
.hero .lede { font-size: 1.1rem; color: var(--text-dim); max-width: 52ch; }
.btns { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn {
  display: inline-block; padding: .65rem 1.1rem; border-radius: 6px;
  font-family: var(--pixel); font-size: .72rem; letter-spacing: .06em;
  border: 1px solid var(--red); color: var(--red); background: rgba(255,42,79,.06);
}
.btn:hover { background: rgba(255,42,79,.16); color: var(--red-2); text-decoration: none; }
.btn.alt { border-color: var(--cyan); color: var(--cyan); background: rgba(62,224,255,.06); }
.btn.alt:hover { background: rgba(62,224,255,.14); color: var(--cyan-2); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding: 2.4rem 0 2rem; } }

/* Head to head: the CoGS callout over the two-monitor video, still on
   the hero painting. The video and poster are on disks.a2cogs.com. */
.hero .wrap.h2h { display: block; padding: 0 0 3.2rem; }
.h2h-head { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; align-items: center; margin-bottom: 1.2rem; }
.h2h-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0; line-height: 1.15; }
.h2h-head p { grid-column: 1 / -1; color: var(--text-dim); max-width: 78ch; margin: .2rem 0 0; }
/* No control bar over the monitors until it plays: a play button on the
   poster, then the browser's controls (they hide themselves while playing). */
.h2h-video .player { position: relative; }
.h2h-video .play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); background: rgba(7,7,11,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); transition: transform .15s ease, background .15s ease; }
.h2h-video .play svg { width: 46px; height: 46px; margin-left: 5px; }
.h2h-video .player:hover .play { transform: scale(1.06); background: rgba(255,42,79,.75); border-color: #fff; }
.h2h-video .player.on .play { display: none; }
.h2h-video video { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(231,184,80,.10); }
.h2h-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; }
.h2h-foot .kicker { margin: 0; color: var(--muted); }
.h2h-foot a { font-family: var(--mono); font-size: .82rem; color: var(--cyan); }
.badge-cogs { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid #b8893a; background: linear-gradient(180deg, rgba(231,184,80,.16), rgba(231,184,80,.04)); color: #f2cd6f; font-weight: 750; letter-spacing: .01em; font-size: .95rem; white-space: nowrap; }
a.badge-cogs:hover { background: linear-gradient(180deg, rgba(231,184,80,.28), rgba(231,184,80,.10)); color: #f7dc8e; text-decoration: none; border-color: #e7b850; }
.brand-o { display: inline-block; width: .62em; height: .62em; color: #e7b850; vertical-align: -.08em; }
@media (max-width: 860px) { .hero .wrap.h2h { padding-bottom: 2.4rem; } .h2h-head { grid-template-columns: 1fr; justify-items: start; } }

/* Sections. */
section { padding: 3.6rem 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.sec-head { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.sec-head .num { font-family: var(--pixel); font-size: .72rem; color: var(--red); letter-spacing: .1em; }
.sec-head p { margin: 0; color: var(--text-dim); }

/* Screenshot grids. */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.shots.two { grid-template-columns: repeat(2, 1fr); }
.shots.four { grid-template-columns: repeat(4, 1fr); }
figure { margin: 0; }
figure img { width: 100%; border: 1px solid var(--line-2); border-radius: 6px; background: #000; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: .45rem; line-height: 1.45; }
figure.big img { box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (max-width: 860px) { .shots, .shots.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shots, .shots.two, .shots.four { grid-template-columns: 1fr; } }

/* Story: the game's own text, 40 columns. */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.story p { color: var(--text-dim); font-size: 1.05rem; }
.story .tag { font-family: var(--pixel); font-size: .8rem; color: var(--red); margin-top: 1rem; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

/* Roster cards. */
.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card img.head { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.card .body { padding: .9rem 1rem 1.1rem; }
.card h3 { font-family: var(--pixel); font-size: .85rem; letter-spacing: .04em; color: var(--text); margin: 0 0 .3rem; }
.card .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .02em; line-height: 1.7; }
.card .meta b { color: var(--cyan); font-weight: 500; }
.card p { font-size: .88rem; color: var(--text-dim); margin: .6rem 0 0; }
.card a.more { font-size: .8rem; margin-top: .6rem; display: inline-block; }
@media (max-width: 960px) { .roster { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .roster { grid-template-columns: 1fr; } }

/* Stages: the paintings. */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.stage { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; }
.stage img.paint { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .92; }
.stage .label { position: absolute; left: 10px; top: 10px; font-family: var(--pixel); font-size: .7rem; letter-spacing: .06em; color: #fff; background: rgba(7,7,11,.72); padding: .3rem .5rem; border-radius: 4px; }
.stage .label small { display: block; font-family: var(--mono); font-size: .62rem; color: var(--cyan); letter-spacing: .04em; margin-top: .15rem; }
@media (max-width: 860px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stages { grid-template-columns: 1fr; } }

/* Two-column text + picture. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.split.rev > :first-child { order: 2; }
.split p { color: var(--text-dim); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }

/* Spec table and plain tables. */
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td.k { font-family: var(--mono); color: var(--cyan); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.tbl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .4rem .6rem; overflow-x: auto; }

/* Keycaps and joystick arrows. */
kbd {
  display: inline-block; min-width: 1.7em; padding: .1em .45em; text-align: center;
  font-family: var(--mono); font-size: .82em; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  line-height: 1.5; margin: 0 .05em;
}
.mot { font-family: var(--mono); color: var(--amber); font-size: 1.05em; letter-spacing: .05em; white-space: nowrap; }

/* Footer. */
footer { padding: 2.5rem 0 3.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
footer a { color: var(--text-dim); }
footer .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }

/* ---- Manual ---- */
.manual { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding: 2.5rem 0 4rem; }
.toc { position: sticky; top: 76px; align-self: start; font-size: .88rem; }
.toc .t { font-family: var(--pixel); font-size: .68rem; color: var(--red); letter-spacing: .1em; margin-bottom: .8rem; }
.toc a { display: block; color: var(--text-dim); padding: .22rem 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.sub { padding-left: .9rem; font-size: .82rem; color: var(--muted); }
.manual article section { padding: 0 0 2.6rem; margin-bottom: 2.6rem; }
.manual h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: .4rem; }
.manual h2 { font-size: 1.6rem; margin-top: 0; }
.manual h2 .num { font-family: var(--pixel); font-size: .68rem; color: var(--red); letter-spacing: .1em; display: block; margin-bottom: .5rem; }
.manual h3 { margin-top: 1.6rem; color: var(--cyan-2); font-size: 1.05rem; }
.manual p, .manual li { color: var(--text-dim); }
.manual li { margin: .25rem 0; }
.manual strong { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .manual { grid-template-columns: 1fr; gap: 1.5rem; } .toc { position: static; display: none; } }

/* Move table: frame, name, input, notes. */
.moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.move { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem .9rem .8rem; display: grid; grid-template-columns: 104px 1fr; gap: .9rem; align-items: end; }
.move .fr { height: 160px; display: flex; align-items: flex-end; justify-content: center; }
.move .fr img { max-height: 160px; max-width: 104px; width: auto; height: auto; object-fit: contain; }
.move h4 { margin: 0 0 .2rem; font-size: .95rem; color: var(--text); }
.move .in { font-family: var(--mono); font-size: .8rem; color: var(--amber); margin-bottom: .3rem; }
.move p { margin: 0; font-size: .82rem; color: var(--text-dim); line-height: 1.45; }

/* Fighter entries in the manual. */
.fighter { display: grid; grid-template-columns: 180px 1fr; gap: 1.6rem; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; margin: 1.2rem 0; }
.fighter img.head { width: 180px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); }
.fighter h3 { margin: 0 0 .2rem; font-family: var(--pixel); font-size: .95rem; color: var(--text); letter-spacing: .04em; }
.fighter .sub { font-family: var(--mono); font-size: .74rem; color: var(--muted); letter-spacing: .03em; margin-bottom: .7rem; }
.fighter .sub b { color: var(--cyan); font-weight: 500; }
.fighter .quote { color: var(--text); font-style: italic; }
.fighter .stats { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: .6rem 0 .4rem; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.fighter .stats b { display: block; color: var(--text); font-size: 1rem; font-weight: 500; }
.strip { display: flex; gap: 1.1rem; align-items: flex-end; flex-wrap: nowrap; overflow-x: auto; margin: .9rem 0 .2rem; padding: .8rem 1rem; background: var(--bg-2); border-radius: 6px; border: 1px solid var(--line); }
.strip figure { text-align: center; min-width: 64px; }
.strip img { max-height: 140px; max-width: 150px; width: auto; height: auto; object-fit: contain; border: 0; background: none; margin: 0 auto; }
.strip figcaption { font-size: .7rem; font-family: var(--mono); margin-top: .3rem; }
.special { margin-top: .9rem; padding: .9rem 1rem; border-left: 3px solid var(--red); background: var(--bg-2); border-radius: 0 6px 6px 0; }
.special h4 { margin: 0 0 .25rem; font-size: .95rem; color: var(--text); }
.special h4 .mot { margin-left: .6rem; }
.special p { margin: .2rem 0; font-size: .9rem; }
.fighter .shots { margin-top: 1rem; }
@media (max-width: 700px) { .fighter { grid-template-columns: 1fr; } .fighter img.head { width: 140px; } }

/* Callouts. */
.note { padding: .9rem 1.1rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font-size: .92rem; color: var(--text-dim); margin: 1rem 0; }
.note b { color: var(--amber); font-weight: 600; }

/* Lightbox: any picture opens large. X in the corner, Esc, or a click
   outside the picture closes it. flatline.js builds the markup. */
img[data-lb] { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; flex-direction: column; gap: .8rem; padding: 2.5rem 1.5rem 1.5rem; background: rgba(7,7,11,.94); backdrop-filter: blur(6px); }
.lb.on { display: flex; }
.lb img { max-width: min(96vw, 1600px); max-height: calc(100vh - 7rem); width: auto; height: auto; border: 1px solid var(--line-2); border-radius: 6px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.7); cursor: default; }
.lb .cap { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-align: center; max-width: 70ch; }
.lb .x { position: absolute; top: .9rem; right: 1rem; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(7,7,11,.8); color: #fff; font: 1.3rem/1 var(--mono); cursor: pointer; }
.lb .x:hover { border-color: var(--cyan); color: var(--cyan); }
