/* AutoBattleKit documentation: a night-dungeon theme built on the kit's own pixel art. Single dark look by design. */
/* Fonts ship with the docs (assets/fonts, SIL Open Font License), so the pages look the same offline. */
@font-face { font-family: "Silkscreen"; font-weight: 400; font-display: swap; src: url("fonts/Silkscreen-Regular.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-weight: 700; font-display: swap; src: url("fonts/Silkscreen-Bold.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("fonts/JetBrainsMono.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #17121d;          /* page */
  --panel: #231b2c;        /* cards, sidebar */
  --panel-2: #2d2338;      /* raised */
  --edge: #3d3049;         /* borders */
  --bone: #efe6dc;         /* text */
  --muted: #ab9fb3;        /* secondary text */
  --gold: #ffd569;         /* the kit's gold: links, accents */
  --ember: #e8765a;        /* warnings */
  --venom: #9ccf74;        /* tips */
  --frost: #8fd6ee;        /* notes, code */
  --pixel: "Silkscreen", "Courier New", ui-monospace, monospace;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--bone); font: 17px/1.6 var(--body); }
img.px, .px img { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #fff1c4; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* layout */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--panel); border-right: 2px solid var(--edge); padding: 20px 18px 40px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font: 700 15px/1.1 var(--pixel); letter-spacing: .04em; margin-bottom: 22px; }
.brand img { width: 36px; height: 36px; }
.side h4 { font: 400 11px/1 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; color: var(--bone); text-decoration: none; font-size: 15px; border: 2px solid transparent; }
.side a img { width: 18px; height: 18px; }
.side a:hover { background: var(--panel-2); }
.side a[aria-current="page"] { border-color: var(--gold); background: var(--panel-2); color: var(--gold); }
.menu-toggle { display: none; }
main { padding-block: 40px 80px; padding-inline: clamp(16px, 5vw, 64px); }
.content { max-width: 760px; }

/* page head */
.head { display: flex; align-items: flex-end; gap: 22px; padding-bottom: 22px; margin-bottom: 30px; border-bottom: 2px dashed var(--edge); }
.head .art { width: 96px; height: 96px; flex: none; }
.head .eyebrow { font: 400 12px/1 var(--pixel); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 700 34px/1.15 var(--pixel); letter-spacing: .01em; margin: 0 0 10px; color: #fff; }
.lede { font-size: 19px; color: var(--muted); margin: 0; max-width: 60ch; }
.hub { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; font: 400 12px/1 var(--pixel); letter-spacing: .06em; color: var(--frost); border: 2px solid var(--edge); padding: 6px 8px; }
h2 { font: 700 21px/1.3 var(--pixel); color: var(--gold); margin: 46px 0 12px; }
h3 { font-size: 19px; margin: 30px 0 8px; color: #fff; }
p, li { max-width: 68ch; }
strong { color: #fff; }

/* menus, keys, code */
.path { font: 600 14px/1.4 var(--mono); color: var(--frost); background: var(--panel); border: 1px solid var(--edge); padding: 1px 6px; white-space: nowrap; }
code { font: 14px/1.4 var(--mono); color: var(--frost); background: var(--panel); padding: 1px 5px; }
pre { background: #120e17; border: 2px solid var(--edge); padding: 16px 18px; overflow-x: auto; font: 14px/1.55 var(--mono); color: #dfe8ec; }
pre code { background: none; padding: 0; color: inherit; }

/* tables */
.tbl { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font: 400 12px/1.2 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); padding: 10px 12px; border-bottom: 2px solid var(--edge); }
td { padding: 9px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; }
td:first-child { color: #fff; font-weight: 700; }
tbody tr:hover td { background: var(--panel); }

/* callouts: an icon from the kit's status set + text */
.callout { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 14px 16px; margin: 20px 0; background: var(--panel); border: 2px solid var(--edge); }
.callout img { width: 36px; height: 36px; }
.callout p { margin: 0; }
.callout b.k { display: block; font: 400 11px/1 var(--pixel); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.callout.tip { border-color: #4f6b3c; } .callout.tip b.k { color: var(--venom); }
.callout.warn { border-color: #7a3d31; } .callout.warn b.k { color: var(--ember); }
.callout.note { border-color: #3b5f6d; } .callout.note b.k { color: var(--frost); }

/* quests: numbered steps (the order matters) */
ol.quests { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 18px; counter-reset: q; }
ol.quests > li { counter-increment: q; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 18px; background: var(--panel); border: 2px solid var(--edge); max-width: none; }
ol.quests > li::before { content: counter(q); grid-row: 1; grid-column: 1; align-self: start; display: grid; place-items: center; width: 64px; height: 64px; font: 700 28px/1 var(--pixel); color: var(--ink); background: var(--gold); box-shadow: inset -4px -4px 0 #c9993a, inset 4px 4px 0 #fff0bd; }
ol.quests > li > .q { grid-column: 2; min-width: 0; }
ol.quests h3 { margin: 4px 0 6px; font: 700 18px/1.3 var(--pixel); color: #fff; }
ol.quests p { margin: 6px 0; }
ol.quests .q img.sprite { float: right; width: 72px; height: 72px; margin: 0 0 8px 12px; }

/* screenshots */
figure.shot { margin: 18px 0; }
figure.shot img { display: block; max-width: 100%; height: auto; border: 2px solid var(--edge); box-shadow: 6px 6px 0 #0c0910; }
figure.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* cards (index) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .cards.two { grid-template-columns: 1fr; } }
.card { display: grid; grid-template-rows: auto auto 1fr; gap: 6px; padding: 16px; background: var(--panel); border: 2px solid var(--edge); text-decoration: none; color: var(--bone); }
.card:hover { border-color: var(--gold); color: var(--bone); }
.card img { width: 48px; height: 48px; }
.card b { font: 700 15px/1.3 var(--pixel); color: #fff; }
.card span { font-size: 15px; color: var(--muted); }

/* the big three on the welcome page */
.start { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 26px 0; }
.start a { display: grid; gap: 10px; padding: 20px; text-decoration: none; color: var(--bone); background: var(--panel-2); border: 2px solid var(--gold); box-shadow: 6px 6px 0 #0c0910; }
.start a:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 #0c0910; }
.start img { width: 64px; height: 64px; }
.start b { font: 700 18px/1.2 var(--pixel); color: var(--gold); }
.parade { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.parade img { width: 44px; height: 44px; }
.icons { display: flex; flex-wrap: wrap; gap: 10px; }
.icons figure { margin: 0; text-align: center; width: 72px; font-size: 12px; color: var(--muted); }
.icons img { width: 48px; height: 48px; display: block; margin: 0 auto 4px; }

/* file tree */
.tree { font: 14px/1.7 var(--mono); background: #120e17; border: 2px solid var(--edge); padding: 14px 18px; overflow-x: auto; white-space: pre; color: #dfe8ec; }
.tree b { color: var(--gold); font-weight: 600; }
.tree i { color: var(--muted); font-style: normal; }

.next { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 18px; border-top: 2px dashed var(--edge); font: 400 13px/1.4 var(--pixel); }
footer.foot { margin-top: 30px; font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 2px solid var(--edge); }
  .side nav { display: none; }
  .side.open nav { display: block; }
  .menu-toggle { display: inline-block; font: 400 12px/1 var(--pixel); background: var(--panel-2); color: var(--gold); border: 2px solid var(--edge); padding: 8px 10px; cursor: pointer; }
  .head { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 27px; }
  ol.quests > li { grid-template-columns: 1fr; }
  ol.quests > li::before { width: 44px; height: 44px; font-size: 20px; }
  ol.quests > li > .q { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .start a:hover { transform: none; } }
td img.px { width: 30px; height: 30px; vertical-align: middle; margin-right: 8px; }
.card img.px[alt="focus"], .card img[style] { width: 48px !important; height: 48px !important; }
.icons img[style] { width: 48px !important; height: 48px !important; vertical-align: 0 !important; }
