/* Futblast public docs: the game's identity on top of the Material theme.
   Colours are the client's tokens (futblast apps/web/src/app.css); light/dark
   follows prefers-color-scheme through the theme's palette. Nothing loads from
   outside the site: both faces are self-hosted woff2 under type/. */

/* ---- faces ------------------------------------------------------------ */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("type/Inter-4.1-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("type/Inter-4.1-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("type/BarlowCondensed-1.408-Bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("type/BarlowCondensed-1.408-ExtraBold.woff2") format("woff2"); }

/* ---- tokens ------------------------------------------------------------- */
:root {
  /* the client's, verbatim */
  --fb-surface: #141b27;
  --fb-surface-sunken: #0b1018;
  --fb-ink-strong: #eef2f7;
  --fb-ink-muted: #8c99ad;
  --fb-action: #f5c84b;
  --fb-border-subtle: #2a3547;
  --fb-turf: #1d553a;
  --fb-turf-mown: #215e40;
  --fb-red: #c0392b; --fb-blue: #215f96; --fb-green: #27ae60;
  --fb-black: #333a45; --fb-yellow: #f1c40f;

  --fb-display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --md-text-font: "Inter";               /* theme.font is false; this only names the face */
}

/* Light: a white page, the navy header kept so the brand holds. */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #1f2a3a;
  --md-default-fg-color--light: #5b677a;
  --md-default-fg-color--lighter: #a3adbb;
  --md-default-fg-color--lightest: #e3e7ed;
  --md-typeset-color: #1f2a3a;
  --md-typeset-a-color: #141b27;          /* ink, 17.4:1 on white; the gold is the underline (ui-ux SCREENS §11) */
  --md-accent-fg-color: #141b27;
  --md-primary-fg-color: var(--fb-surface);
  --md-primary-fg-color--dark: var(--fb-surface-sunken);
  --md-primary-bg-color: var(--fb-ink-strong);
  --md-primary-bg-color--light: var(--fb-ink-muted);
  --md-code-bg-color: #f2f4f7;
  --md-code-fg-color: #1f2a3a;
  --md-footer-bg-color: var(--fb-surface);
  --md-footer-bg-color--dark: var(--fb-surface-sunken);
  --md-typeset-table-color: #e3e7ed;
  --fb-accent: #e0ad1f;                   /* the brand gold, a step deeper so a 3px bar reads on white; never text (2.07:1) */
  --fb-link-line: #e0ad1f;
  --fb-accent-ink: #a87b00;               /* gold for icons on white, 3.82:1 (non-text 3:1) */
  --fb-heading: #141b27;
  --fb-raised: #ffffff;
  --fb-raised-border: #dde2e9;
  --fb-chip-bg: #edf1f6;
  --fb-chip-fg: #141b27;
  --fb-note-bg: #fff4d6;
  --fb-note-fg: #6b4e00;                  /* 7.06:1 on its ground */
  --fb-note-border: #e8c766;
}

/* Dark: navy surfaces like the client; links in the action yellow. */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--fb-surface);
  --md-default-fg-color: var(--fb-ink-strong);
  --md-default-fg-color--light: var(--fb-ink-muted);
  --md-default-fg-color--lighter: #5b677a;
  --md-default-fg-color--lightest: var(--fb-border-subtle);
  --md-typeset-color: var(--fb-ink-strong);
  --md-typeset-a-color: var(--fb-action); /* 10.89:1 on --surface */
  --md-accent-fg-color: #ffd970;
  --md-primary-fg-color: var(--fb-surface-sunken);
  --md-primary-fg-color--dark: #070b11;
  --md-primary-bg-color: var(--fb-ink-strong);
  --md-primary-bg-color--light: var(--fb-ink-muted);
  --md-code-bg-color: var(--fb-surface-sunken);
  --md-code-fg-color: var(--fb-ink-strong);
  --md-footer-bg-color: var(--fb-surface-sunken);
  --md-footer-bg-color--dark: #070b11;
  --md-typeset-table-color: var(--fb-border-subtle);
  --md-default-bg-color--light: var(--fb-surface);
  --fb-accent: var(--fb-action);
  --fb-accent-ink: var(--fb-action);
  --fb-heading: var(--fb-ink-strong);
  --fb-raised: #1a2332;
  --fb-raised-border: var(--fb-border-subtle);
  --fb-chip-bg: #222c3c;
  --fb-chip-fg: var(--fb-ink-strong);
  --fb-note-bg: #3a3018;
  --fb-note-fg: #f2d68a;                  /* 9.14:1 on its ground */
  --fb-note-border: #7a6420;
}

/* ---- header: the lockup, a quiet label, an action-yellow rule ------------ */
.md-header,
.md-header--shadow {
  background: var(--fb-surface-sunken);
  color: var(--fb-ink-strong);
  box-shadow: 0 3px 0 0 var(--fb-action);   /* the game bar's active-tab yellow (ui-ux SCREENS §11.1 item 4) */
}
[data-md-color-scheme="default"] .md-header { background: var(--fb-surface); }
.md-header__inner { padding-inline: 0.6rem; }
.md-header__title { margin-left: 0.6rem; }
[dir] .md-header__button.md-icon[for="__drawer"] + .md-header__title { margin-left: 0.2rem; }
.fb-brand { display: flex; align-items: center; gap: 0.7rem; }
.fb-wordmark,
.fb-wordmark:hover {
  font-family: var(--fb-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--fb-ink-strong);
}
.fb-wordmark { display: flex; align-items: center; height: 100%; }
.md-header__topic.fb-brand { height: 100%; }   /* Material's topic is absolutely placed and content-high, so the lockup hung from the top edge (ui-ux audit 2026-10-27) */
.fb-lockup { display: block; height: 1.4rem; width: auto; align-self: center; }   /* 28px at the 20px root; scales with the header as Material raises the root on wide screens */
.fb-section {
  padding: 0.1rem 0 0.1rem 0.7rem;
  line-height: 1.2;
  border-left: 1px solid var(--fb-border-subtle);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fb-ink-muted);
}
.fb-section--page { text-transform: none; letter-spacing: 0.02em; font-size: 0.7rem; color: var(--fb-ink-strong); }
.md-search__form { border-radius: 6px; }
.md-search__input { font-size: 0.75rem; }
.md-header__button.md-icon:hover { color: var(--fb-action); opacity: 1; }

/* ---- body type ---------------------------------------------------------- */
.md-typeset {
  font-size: 0.85rem;          /* 17px */
  line-height: 1.65;
}
.md-typeset p, .md-typeset ul, .md-typeset ol { margin-block: 0.85em; }
.md-grid { max-width: 61rem; }   /* nav + ~75ch measure + TOC, centred */
.md-main__inner { margin-top: 1.4rem; }
.md-content__inner { max-width: 33rem; }  /* ~75 characters at 17px */

.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 {
  font-family: var(--fb-display);
  color: var(--fb-heading);
  letter-spacing: 0.01em;
}
.md-typeset h1 {
  font-weight: 800;
  font-size: 2.6em;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.6em;
}
.md-typeset h2 {
  font-weight: 800;
  font-size: 1.75em;
  line-height: 1.15;
  margin: 2.2em 0 0.6em;
  padding-top: 0.55em;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset h3 {
  font-weight: 700;
  font-size: 1.32em;
  line-height: 1.2;
  margin: 1.7em 0 0.4em;
}
.md-typeset h4 { font-weight: 700; font-size: 1.1em; }
.md-typeset strong { font-weight: 600; color: var(--fb-heading); }
.md-typeset a { text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.md-typeset a:hover { text-decoration-color: currentColor; }
/* Light scheme: gold can't be text on white, so links are ink with a gold underline. */
[data-md-color-scheme="default"] .md-typeset a { text-decoration-color: var(--fb-link-line); text-decoration-thickness: 2px; }
[data-md-color-scheme="default"] .md-typeset a:hover { text-decoration-color: var(--md-typeset-a-color); }
.md-typeset .headerlink { text-decoration: none; color: var(--md-default-fg-color--lighter); }
.md-typeset code { font-size: 0.85em; border-radius: 4px; }
.md-typeset hr { border-bottom-color: var(--md-default-fg-color--lightest); }
.md-typeset blockquote {
  border-left: 3px solid var(--fb-accent);
  color: var(--md-default-fg-color--light);
  background: var(--md-code-bg-color);
  padding: 0.2em 1em;
  border-radius: 0 6px 6px 0;
}
.md-typeset table:not([class]) { font-size: 0.8em; border-radius: 6px; }
.md-typeset table:not([class]) th { font-weight: 600; background: var(--md-code-bg-color); }

/* ---- rule numbers: a compact tabular chip, hung in a margin column ------- */
.rule-no {
  display: inline-block;
  min-width: 3.4em;
  padding: 0.05em 0.45em;
  border-radius: 4px;
  background: var(--fb-chip-bg);
  color: var(--fb-chip-fg);
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: center;
  vertical-align: 0.06em;
}
@media screen and (min-width: 45em) {
  .md-typeset p:has(> .rule-no:first-child) { position: relative; padding-left: 4.2em; }
  .md-typeset p > .rule-no:first-child { position: absolute; left: 0; top: 0.22em; }
  /* a rule's own continuation (the next paragraph or list, up to two deep)
     stays in the rule's text column rather than breaking out under the chip */
  .md-typeset p:has(> .rule-no:first-child) + :is(p, ul, ol):not(:has(> .rule-no:first-child)),
  .md-typeset p:has(> .rule-no:first-child) + :is(p, ul, ol) + :is(p, ul, ol):not(:has(> .rule-no:first-child)) {
    margin-left: 4.2em;
  }
}
@media screen and (max-width: 44.99em) {
  .rule-no { min-width: 0; margin-right: 0.15em; }
}

/* ---- left nav and right TOC: quieter, active item on an accent bar ------- */
.md-nav { font-size: 0.72rem; }
.md-nav__title { font-family: var(--fb-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--md-default-fg-color--light); }
.md-nav__link { color: var(--md-default-fg-color--light); padding-left: 0.6rem;
  margin-top: 0.45em; border-radius: 0 4px 4px 0; }
.md-nav__link:hover, .md-nav__link:focus { color: var(--md-default-fg-color); }
.md-nav__item .md-nav__link--active,
.md-nav__item .md-nav__link--active code {
  color: var(--md-default-fg-color);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--fb-accent);
}
.md-sidebar--secondary .md-nav__link--active { font-weight: 400; }
.md-sidebar--primary .md-nav__item--active > .md-nav__link { color: var(--md-default-fg-color); }
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-nav--primary > .md-nav__title { display: none; }
}

/* ---- footer ------------------------------------------------------------- */
.md-footer { color: var(--fb-ink-strong); }
.md-footer__title { font-family: var(--fb-display); font-size: 1rem; }
.md-footer-meta { display: none; }        /* empty: generator is off, no copyright */

/* ---- "Not final yet." -- the public face of an [OPEN] marker ------------- */
.open-note, .kw-note {
  display: inline-block;
  padding: 0 0.5em;
  border: 1px solid var(--fb-note-border);
  border-radius: 999px;
  background: var(--fb-note-bg);
  color: var(--fb-note-fg);
  font-size: 0.78em;
  font-style: normal;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: 0.06em;
}

/* ---- Keywords page ------------------------------------------------------ */
/* Keyword headings become h2 (no level skipped under the h1) and carry .kw from
   kwpage.py; they keep the h3 scale, because thirty-odd ruled h2s would read as chapters. */
.md-typeset h2.kw { font-weight: 700; font-size: 1.32em; line-height: 1.2; margin: 1.25em 0 0.4em; padding-top: 0; border-top: 0; }
.md-typeset h2.kw:has(> .kw-glyph) { display: flex; align-items: baseline; gap: 0.5em; flex-wrap: wrap; }
.md-typeset h2.kw:has(> .kw-glyph) .headerlink { align-self: center; }
.kw-glyph {
  flex: none;
  align-self: center;
  width: 1.15em; height: 1.15em;
  color: var(--fb-heading);
}

/* ---- home ---------------------------------------------------------------- */
.md-content:has(.fb-hero) .md-content__inner { max-width: 54rem; }
.md-content:has(.fb-hero) .md-content__inner > h1:first-child { display: none; }
.md-typeset .fb-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.6rem;
  padding: 2.6rem 2.4rem 2.4rem;
  border-radius: 10px;
  color: var(--fb-ink-strong);
  background:
    linear-gradient(90deg, var(--fb-surface-sunken) 30%, rgb(11 16 24 / 0.55) 70%, rgb(11 16 24 / 0.15)),
    repeating-linear-gradient(90deg, var(--fb-turf) 0 3.2rem, var(--fb-turf-mown) 3.2rem 6.4rem);
  box-shadow: inset 0 -3px 0 var(--fb-turf-mown);
}
.fb-hero__pitch {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 46%; height: 100%;
  color: rgb(238 242 247 / 0.16);
  pointer-events: none;
}
.md-typeset .fb-hero > p, .md-typeset .fb-hero > h1 { position: relative; }
.md-typeset .fb-hero__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fb-action);
}
.md-typeset .fb-hero__mark {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.08em;
  color: var(--fb-ink-strong);
}
.md-typeset .fb-hero__pitch-line {
  max-width: 27em;
  margin: 1rem 0 0;
  font-size: 1.12em;
  line-height: 1.55;
  color: #d5dce6;
}
.md-typeset .fb-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.6rem;
}
.md-typeset a.fb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem 1.2rem 1.1rem;
  border: 1px solid var(--fb-raised-border);
  border-radius: 10px;
  background: var(--fb-raised);
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: border-color 140ms cubic-bezier(0.2, 0, 0, 1), transform 140ms cubic-bezier(0.2, 0, 0, 1);
}
.md-typeset a.fb-card:hover { border-color: var(--fb-accent); transform: translateY(-2px); }
.md-typeset a.fb-card--start { border: 2px solid var(--fb-accent); padding: calc(1.3rem - 1px) calc(1.2rem - 1px) calc(1.1rem - 1px); }
.fb-card__badge {
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: var(--fb-action);
  color: var(--fb-surface);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fb-card__icon { width: 2rem; height: 2rem; color: var(--fb-accent-ink); margin-bottom: 0.3rem; }
.fb-card__title {
  font-family: var(--fb-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--fb-heading);
}
.fb-card__text { font-size: 0.78rem; line-height: 1.55; color: var(--md-default-fg-color--light); flex: 1; }
.fb-card__go { margin-top: 0.4rem; font-size: 0.74rem; font-weight: 600; color: var(--md-typeset-a-color); }
.md-typeset .fb-legend {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: var(--md-code-bg-color);
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light);
}
@media screen and (max-width: 44.99em) {
  .md-typeset .fb-cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .md-typeset .fb-hero { padding: 1.8rem 1.3rem 1.6rem; }
  .md-typeset .fb-hero__mark { font-size: 2.9rem; }
  .md-typeset .fb-hero__pitch-line { font-size: 1em; }
}

/* Tables scroll inside themselves on narrow screens. */
.md-typeset__table { max-width: 100%; }

/* A source `---` followed by a section heading would draw two rules. */
.md-typeset hr + h2 { border-top: 0; padding-top: 0; margin-top: 1.2em; }

/* ---- the Play button (header) and the quickstart's EN · ES switch + CTA -------
   Not part of qs-site.css: the button is SCREENS §11.1 items 1 and 4, drawn
   after the mockup's .play (gold, Barlow, navy ink). */
.fb-play,
.md-typeset a.fb-play {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  background: var(--fb-action);
  color: var(--fb-surface-sunken);
  font-family: var(--fb-display);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;   /* .md-typeset a underlines every link */
}
.fb-play:hover, .md-typeset a.fb-play:hover { color: var(--fb-surface-sunken); filter: brightness(1.08); }
.fb-play--header { align-self: center; margin: 0 0.4rem; }
.md-typeset .qs-lang { text-align: right; font-size: 0.7rem; font-weight: 600; color: var(--md-default-fg-color--light); margin: 0 0 0.4rem; }
.md-typeset .qs-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.md-typeset .qs-cta a.fb-play { font-size: 1.1rem; padding: 0.7rem 1.3rem; }
@media screen and (max-width: 44.99em) { .fb-play--header { display: none; } }
/* The way back to futblast.com: quiet next to the gold Play, so Play stays the one action.
   Header at 45em and up; below that it is the drawer's last row, where the header has no room. */
.fb-home--header { align-self: center; margin: 0 0.4rem; color: inherit; opacity: 0.8; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.fb-home--header:hover, .fb-home--header:focus-visible { color: inherit; opacity: 1; text-decoration: underline; }
@media screen and (max-width: 44.99em) { .fb-home--header { display: none; } }
@media screen and (min-width: 76.25em) { .fb-home--drawer { display: none; } }

/* Quickstart step layout for docs.futblast.com: ui-ux SCREENS §11.1.
   Drop into core-rules etc/site/style.css. Uses the site's existing scheme
   variables, so it follows both schemes; --fb-action is the game's --action. */
.md-typeset .qs-hero h1 { font-size: 3.2rem; line-height: 1; margin: 0; }
.md-typeset .qs-hero p { color: var(--md-default-fg-color--light); font-size: 1.05em; margin-top: .5em; }

.md-typeset .qs-step {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 2rem;
  align-items: center;
  padding: 2.8rem 0;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset .qs-step img { width: 100%; border-radius: .5rem; margin: 0; }
.md-typeset .qs-step .qs-n {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: .9rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--fb-action, #f5c84b); margin: 0;
}
.md-typeset .qs-step h2 { font-size: 2rem; line-height: 1.05; margin: .4rem 0 .7rem; text-transform: uppercase; }
.md-typeset .qs-beat {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700;
  font-size: 1.5rem; line-height: 1.15; color: var(--fb-action, #f5c84b); margin: .9rem 0 0;
}
/* Light scheme: action yellow fails contrast on white (1.59:1), so the beat and
   the STEP label are ink on a gold marker bar, drawn per line by a thick
   underline painted under the glyphs. */
[data-md-color-scheme="default"] .md-typeset .qs-beat,
[data-md-color-scheme="default"] .md-typeset .qs-step .qs-n {
  color: var(--fb-surface);
  text-decoration: underline 0.42em var(--fb-action);
  text-underline-offset: -0.28em; text-decoration-skip-ink: none;
}

.md-typeset .qs-licence { color: var(--md-default-fg-color--light); border-top: 1px solid var(--md-default-fg-color--lightest); padding-top: 1.8rem; }

@media (max-width: 760px) {
  .md-typeset .qs-step { grid-template-columns: 1fr; gap: 1rem; padding: 1.8rem 0; }
  .md-typeset .qs-hero h1 { font-size: 2.2rem; }
  .md-typeset .qs-step h2 { font-size: 1.6rem; }
}

/* Quickstart pages only: wide content, step text flush with the picture. */
.md-content:has(.qs-step) .md-content__inner { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }   /* auto margins replace Material's side margin, so the gutter is padding (16px floor, ui-ux audit 2026-10-27) */
.md-typeset .qs-text > :first-child { margin-top: 0; }
/* The site h2 rule must not land under the STEP line. */
.md-typeset .qs-step h2 { border-top: 0; padding-top: 0; }
.md-typeset .qs-step .qs-n { border: 0; }
