/* First game page (first-game.html, es/first-game.html). Loaded after style-web.css.
   Everything is scoped under .fg. One signal colour (hazard amber, the Core Rules cover stock)
   marks "this is happening now" and the primary action; everything else is ink on paper. */
.fg { --ink: #0c0c0c; --ink-2: #3d3b36; --rule: #b9b5ab; --tint: #eeece6; --signal: #f6df5e; --on-signal: #0c0c0c;
  --f-display: "Saira Condensed", "Arial Narrow", sans-serif; --f-body: "PT Serif", Georgia, serif; --f-mono: "Ubuntu Mono", "Courier New", monospace;
  font-size: 17px; line-height: 1.55; overflow-x: clip; }
.fg [id] { scroll-margin-top: calc(var(--sticky-top, 82px) + 12px); }
.fg :focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.fg .w-sec { padding-block: 48px; }
.fg .w-h2 { text-wrap: balance; }
.fg h3 { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 6px; line-height: 1.1; }
.fg p { margin: 0 0 12px; max-width: 65ch; }
.fg .note { font-family: var(--f-mono); font-size: 13px; line-height: 1.5; }
.fg .eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.fg .w-btn { cursor: pointer; justify-content: center; }
.fg .w-btn--sm { min-height: 40px; height: auto; padding: 0 12px; font-size: 15px; }
.fg .w-btn:disabled { opacity: .35; cursor: default; }
.fg button.w-btn { appearance: none; }
.fg .w-btn.right { background: var(--signal); color: var(--on-signal); }

/* progressive enhancement: .fg-live is set by the script once it runs */
.fg .js-only { display: none; }
.fg-live .fg .js-only { display: block; }
.fg-live .fg .no-js-only { display: none; }

.fg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .fg-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.fg-hero { padding-block: 40px 44px; }



@media (max-width: 860px) { .fg-live .fg-hero .fg-cols, .fg-live .goalcols { grid-template-columns: minmax(0, 1fr); } .fg-hero { padding-top: 28px; } }
.fg .w-h1 { text-wrap: balance; }
@media (max-width: 900px) { .fg .w-h1 { font-size: 56px; } }
.fg .lead { font-size: 19px; font-style: italic; max-width: 60ch; margin: 16px 0 0; }
.facts { display: flex; flex-wrap: wrap; margin: 22px 0 24px; border: 1.5px solid var(--ink); width: max-content; max-width: 100%; }
.facts div { padding: 6px 14px; border-right: 1px solid var(--ink); }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; }
.facts span { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }

/* goal */
.rules3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-top: 18px; }
.rules3 div { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--ink); font-size: 16px; line-height: 1.45; }
.rules3 div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
@media (max-width: 640px) { .rules3 { grid-template-columns: minmax(0, 1fr); } .rules3 div + div { padding-left: 0; border-left: 0; } }

/* setup, crews */
.fg ol.proc { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fg ol.proc li { counter-increment: s; position: relative; padding-left: 34px; max-width: 65ch; }
.fg ol.proc li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; background: var(--ink); color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.fg figure { margin: 0; }
.fg figcaption { font-family: var(--f-mono); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.fg table.st { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.3; }
.fg table.st th { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--ink); background: none; color: var(--ink); }
.fg table.st td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; background: none; color: var(--ink); }
.fg table.st tr:last-child td { border-bottom: 0; }
.fg table.st td.n { font-family: var(--f-display); font-weight: 800; font-size: 16px; text-transform: uppercase; white-space: nowrap; }
.fg table.st td.n .who { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--ink-2); margin-top: 2px; }
.fg table.st td.d { font-family: var(--f-mono); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fg table.st td.k { font-size: 13px; color: var(--ink-2); }
@media (max-width: 700px) {
  .fg table.st, .fg table.st tbody { display: block; }
  .fg table.st thead { display: none; }
  .fg table.st tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 6px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
  .fg table.st tr:last-child { border-bottom: 0; }
  .fg table.st td { border: 0; padding: 1px 0; }
  .fg table.st td.n, .fg table.st td.k { grid-column: 1 / -1; }
  .fg table.st td.d::before { content: attr(data-l); display: block; font-family: var(--f-display); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
}
.fg table.beh { border-collapse: collapse; font-size: 14px; width: 100%; max-width: 560px; margin: 8px 0 12px; }
.fg table.beh th { font-family: var(--f-display); text-transform: uppercase; letter-spacing: 1px; text-align: left; padding: 4px 8px; border-bottom: 2px solid var(--ink); background: none; color: var(--ink); font-size: 13px; }
.fg table.beh td { padding: 4px 8px; border-bottom: 1px solid var(--rule); background: none; color: var(--ink); }
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .others { grid-template-columns: minmax(0, 1fr); } }
.other { border: 1.5px solid var(--ink); padding: 14px; min-width: 0; }
.other .statline { font-family: var(--f-mono); font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.other p { font-size: 15px; line-height: 1.45; }
.other ul { margin: 0 0 8px; padding-left: 18px; font-size: 14px; line-height: 1.4; }
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-top: 12px; }
.acts div { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.acts b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 18px; text-transform: uppercase; }
@media (max-width: 640px) { .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* dice sandbox */
.sandbox { border: 1.5px solid var(--ink); }
.sandbox .row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); border-bottom: 1px solid var(--ink); }
@media (max-width: 640px) { .sandbox .row { grid-template-columns: minmax(0, 1fr); } .sandbox .mid { border-left: 0 !important; border-right: 0 !important; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); } }
.side { padding: 14px; }
.side .who { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tiers { display: flex; gap: 4px; margin: 8px 0 12px; flex-wrap: wrap; }
.tier { min-width: 52px; min-height: 40px; border: 1.5px solid var(--ink); background: #fff; font-family: var(--f-display); font-weight: 800; font-size: 18px; cursor: pointer; color: var(--ink); }
.tier[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pair { display: flex; align-items: center; gap: 8px; }
.pair .die { width: 44px; height: 44px; font-size: 26px; }
.pair .tot { font-size: 40px; min-width: 54px; }
.mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.result { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 640px) { .result { grid-template-columns: minmax(0, 1fr); } }
.outcome { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; }
.outcome .tag { display: inline-block; background: var(--signal); color: var(--on-signal); border: 1.5px solid var(--ink); padding: 2px 8px; margin-right: 8px; }
.why { font-size: 16px; margin-top: 8px; }
.odds { font-family: var(--f-mono); font-size: 13px; }
.bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 46px; gap: 8px; align-items: center; margin: 4px 0; }
.bar i { display: block; height: 12px; background: var(--tint); position: relative; }
.bar i b { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width .4s; }
.bar.sig i b { background: var(--signal); outline: 1px solid var(--ink); }

/* checklist, pack */
.check { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.check label { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 1.5px solid var(--ink); margin: 0; flex: 0 0 auto; display: grid; place-content: center; cursor: pointer; background: #fff; border-radius: 0; }
.check input:checked { background: var(--ink); }
.check input:checked::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check label:has(input:checked) span { text-decoration: line-through; color: var(--ink-2); }
.count { font-family: var(--f-mono); font-size: 13px; margin-top: 10px; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .packs { grid-template-columns: minmax(0, 1fr); } }
.fg .pack { border: 1.5px solid var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 4px; text-decoration: none !important; }
.fg .pack:hover { background: var(--tint); }
.fg .pack.dark { background: var(--ink); color: #fff; }
.fg .pack.dark * { color: #fff; }
.fg .pack .k { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }
.fg .pack b { font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; line-height: 1; }
.fg .pack .f { margin-top: auto; padding-top: 10px; border-top: 1px solid currentColor; font-family: var(--f-mono); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.packlinks { font-family: var(--f-mono); font-size: 13px; margin-top: 12px; display: flex; gap: 6px 16px; flex-wrap: wrap; }

/* FAQ */
.fg details { border-bottom: 1px solid var(--ink); }
.fg details:first-of-type { border-top: 2px solid var(--ink); }
.fg summary { cursor: pointer; list-style: none; padding: 12px 0; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: .5px; text-transform: uppercase; display: flex; justify-content: space-between; gap: 12px; }
.fg summary::-webkit-details-marker { display: none; }
.fg summary::after { content: "+"; font-family: var(--f-mono); font-weight: 700; }
.fg details[open] summary::after { content: "−"; }
.fg details p { padding-bottom: 10px; }


/* ---- team identity: DS stock fills + a pattern and a letter on every one (print and colour-blind safe) ---- */
.fg { --ct: #a9cbe8; --rc: #f2a68f; --acc: #f6df5e; --fc: #0c0c0c; }
.fg .dg { display: block; width: 100%; height: auto; }
.dg .tbl { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.dg .grid { stroke: var(--rule); stroke-width: .6; }
.dg .ter { fill: var(--tint); stroke: var(--ink); stroke-width: .8; }
.dg .band-ct { fill: var(--ct); } .dg .band-rc { fill: var(--rc); } .dg .band-fc { fill: var(--fc); }
.dg .bs .bf { stroke: var(--ink); stroke-width: 1.2; }
.dg .bs-ct .bf { fill: var(--ct); } .dg .bs-rc .bf { fill: var(--rc); } .dg .bs-fc .bf { fill: var(--fc); }
.dg .bs-cw .bf { fill: #fff; stroke-dasharray: 2 1.4; }
.dg .sq rect { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.dg .sq.slate rect { fill: var(--acc); } .dg .sq.slate circle { fill: var(--ink); }
.dg .sq text { font: 700 5px var(--f-mono); text-anchor: middle; fill: var(--ink); }
.dg .lb { font: 600 5.5px var(--f-mono); fill: var(--ink); }
.dg .lb.b { font-weight: 700; }
.dg .plate { fill: #fff; stroke: var(--ink); stroke-width: .6; }
.bs .bi { fill: #fff; stroke: var(--ink); stroke-width: .5; }
.dg .lb.inv { fill: #fff; stroke: var(--fc); stroke-width: .5px; paint-order: stroke; }
.dg .zone, .dg .ring { fill: none; stroke: var(--ink); stroke-width: .9; stroke-dasharray: 3 2; }
.dg .ghost { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 1.5; }
.dg .arw { stroke: var(--ink); stroke-width: 1.4; } .dg .arh { fill: var(--ink); }
.dg .sc { stroke: var(--ink); stroke-width: 1.2; }
.dg .sheet { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.dg .cut { stroke: var(--ink); stroke-width: .8; stroke-dasharray: 3 2; }
.dg.map .lb { font-size: 6px; }
.bs text { font: 700 5px var(--f-display); text-anchor: middle; fill: var(--ink); }
.bs .bf { stroke: var(--ink); stroke-width: 1.2; }
.bs-ct .bf { fill: var(--ct); } .bs-rc .bf { fill: var(--rc); } .bs-fc .bf { fill: var(--fc); } .bs-cw .bf { fill: #fff; stroke-dasharray: 2 1.4; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* HTML bands: same colour + pattern */
.fg .band { height: 12px; border-bottom: 1.5px solid var(--ink); }
.fg .squad.ct .band { background-color: var(--ct); background-image: repeating-linear-gradient(90deg, rgba(12,12,12,.55) 0 1px, transparent 1px 4px); }
.fg .squad.rc .band { background-color: var(--rc); background-image: radial-gradient(circle, rgba(12,12,12,.65) 0 1px, transparent 1.5px); background-size: 6px 6px; }
.fg .fc .band { background-color: var(--fc); background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 5px); }
.fg .cw .band { background: #fff; border-bottom-style: dashed; }
.fg .loot .band { background: var(--acc); }

/* ---- top ---- */
.fg-hero .fg-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .fg-hero .fg-cols { grid-template-columns: minmax(0, 1fr); } }
.fg .goalline { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.2; text-transform: uppercase; margin: 18px 0 0; background: linear-gradient(var(--acc), var(--acc)) no-repeat 0 100% / 100% .45em; }
.mapbox { border: 1.5px solid var(--ink); background: #fff; padding: 10px; width: 100%; max-width: 480px; justify-self: end; }
@media (max-width: 860px) { .mapbox { justify-self: start; } }
.fg figcaption { font-family: var(--f-mono); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.fg figure { margin: 0; }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.legend li { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; line-height: 1.25; }
.legend svg { flex: none; }
.mapbox .note { margin: 8px 0 0; }
@media (max-width: 420px) { .legend { grid-template-columns: minmax(0, 1fr); } }

/* chips */
.chips { position: sticky; top: var(--sticky-top, var(--app-menu-height, 0px)); z-index: 5; background: #fff; border-block: 1.5px solid var(--ink); }
.chips ol { list-style: none; margin: 0; padding: 8px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; position: relative; }
.chips li { flex: none; }
.fg a.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 6px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; text-decoration: none; }
.fg a.chip i { font-style: normal; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-family: var(--f-mono); font-size: 13px; }
.fg a.chip.is-done { background: var(--tint); }
.fg a.chip.is-done i::after { content: "\2713"; margin-left: 1px; }
.fg a.chip.is-now { background: var(--acc); box-shadow: 0 2px 0 var(--ink); }
.fg a.chip:hover { background: var(--tint); }
.fg a.chip.is-now:hover { background: var(--acc); }

/* ---- lessons ---- */
.fg .lesson { padding-block: 18px 0; }
.fg .lcard { border: 1.5px solid var(--ink); padding: 18px 20px 14px; }
.fg .lno { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 4px; }
.fg .lcard .w-h2 { margin: 0 0 12px; }
.fg .lbody { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .fg .lbody { grid-template-columns: minmax(0, 1fr); gap: 14px; } .fg .lcard { padding: 14px 12px 12px; } }
.fg .ldia { border: 1px solid var(--ink); background: #fff; padding: 8px; }
.fg .ltext > :last-child { margin-bottom: 0; }
.fg p.try { margin: 12px 0 0; padding: 8px 10px; border-left: 6px solid var(--acc); background: var(--tint); font-size: 16px; }
.fg .lnav { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ink); }
.fg .more { margin: 12px 0 0; }
.fg .lcard > .others, .fg .lcard > .squads, .fg .lcard > .sandbox, .fg .lcard > .acts, .fg .lcard > .other, .fg .lcard > .fg-cols { margin-top: 18px; }

/* squads: one section each */
.squads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.squad { border: 2px solid var(--ink); min-width: 0; }
.squad .band { height: 14px; }
.squad .sh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 12px; border-bottom: 1.5px solid var(--ink); flex-wrap: wrap; }
.squad.ct .sh { background: var(--ct); } .squad.rc .sh { background: var(--rc); }
.squad .sh b { font-family: var(--f-display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.squad .sh span { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }
.fg .squad .play { margin: 0; padding: 8px 12px 0; font-family: var(--f-mono); font-size: 13px; max-width: none; }
.roster { list-style: none; margin: 0; padding: 8px 12px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; border-bottom: 1px solid var(--rule); }
.roster li { display: flex; flex-direction: column; align-items: center; width: 80px; text-align: center; }
.roster b { font-family: var(--f-display); font-size: 14px; text-transform: uppercase; line-height: 1.1; margin-top: 2px; }
.roster span { font-family: var(--f-mono); font-size: 11px; line-height: 1.2; }

/* other factions */
.other { padding: 0 14px 14px; }
.other .band { margin: 0 -14px 12px; }
.other.cw { border-style: dashed; }
.other h3 { margin-top: 0; }
.fg details.mini { border: 0; border-top: 1px solid var(--rule); margin-top: 8px; }
.fg details.mini:first-of-type { border-top: 1px solid var(--rule); }
.fg details.mini summary { font: 700 14px var(--f-mono); text-transform: none; letter-spacing: 0; padding: 8px 0; min-height: 40px; align-items: center; }
.fg .trybtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fg .sandbox .die { width: 44px; height: 44px; font-size: 26px; }
.fg .result { display: block; }

/* print: black and white, colours drop to their patterns */
@media print {
  .fg { --ct: #fff; --rc: #fff; --acc: #fff; }
  .fg .chips, .fg .sandbox, .fg .lnav, .fg .trybtns { display: none !important; }
  .fg .goalline { background: none; border-bottom: 3px solid #000; }
  .fg .lcard, .fg .squad, .fg .other { break-inside: avoid; }
  .fg p.try { border-left-color: #000; background: none; }
  .fg .squad .sh { background: #fff !important; }
}
/* dice sandbox: dice read as dice before and after the roll */
.fg .sandbox .pair { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.fg .sandbox .die { display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--ink, #000); background: var(--paper, #fff); font-family: "Saira Condensed", sans-serif; font-weight: 800; line-height: 1; }
.fg .sandbox .tot { display: inline-flex; align-items: center; gap: 8px; font-family: "Saira Condensed", sans-serif; font-weight: 800; font-size: 40px; line-height: 1; min-width: 54px; }
.fg .sandbox .tot::before { content: "="; font-size: 28px; }
/* done lessons collapse to their number, so the current one stays in view */
.fg a.chip.is-done { font-size: 0; gap: 0; padding: 0 6px; }
.fg a.chip.is-done i { font-size: 13px; }
.legend li span { text-wrap: balance; }
.fg :is(ol, ul) + .note { margin-top: 10px; }
@media (max-width: 420px) {
    :lang(es) .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    :lang(es) .facts div:nth-child(2) { border-right: 0; }
    :lang(es) .facts div:nth-child(n+3) { border-top: 1px solid var(--ink); }
}
