:root {
  --ds-ink: #142b26;
  --ds-ink-soft: #344b41;
  --ds-muted: #59695f;
  --ds-paper: #f7f6ee;
  --ds-paper-soft: #eeeee3;
  --ds-line: #d4d9cb;
  --ds-accent: #264f39;
  --ds-accent-ink: #f7f6ee;
  --ds-warn: #8d5129;
  --ds-ok: #264f39;
  --ds-highlight: #e8f66c;
  --ds-arena-clay: #bc6447;
  --ds-arena-teal: #417d70;
  --ds-arena-skin: #d9ab7c;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; }
p { max-width: 68ch; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button, select { font: inherit; }
button { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:not(:disabled):hover, .ds-btn:hover { filter: brightness(.94); }
button, .ds-btn { transition: background .16s ease, transform .16s ease; }
[hidden] { display: none !important; }
::selection { color: var(--ds-ink); background: var(--ds-highlight); }
.skip-link { position: absolute; z-index: 50; top: -90px; left: 16px; background: var(--ds-highlight); padding: 12px 18px; color: var(--ds-ink); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--ds-muted); }
.site-header { border-bottom: 1px solid var(--ds-line); }
.site-header > .ds-wrap { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ds-ink); text-decoration: none; font-weight: 800; font-size: inherit; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { display: inline-flex; width: 35px; height: 35px; align-items: center; justify-content: center; color: var(--ds-paper); background: var(--ds-ink); border-radius: 9px 9px 3px 9px; line-height: 1; font-weight: 900; }
.main-nav { display: flex; gap: 30px; align-items: center; }
.main-nav a { font-size: var(--ds-font-small); font-weight: 600; color: var(--ds-ink); text-decoration: none; padding-block: 10px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.eyebrow, .section-number, .tag, .trust-row, .hero-art-label, .card-index { font-family: "Courier New", monospace; font-size: var(--ds-font-small); font-weight: 600; letter-spacing: .07em; }
.eyebrow { text-transform: uppercase; color: var(--ds-muted); display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow::before { content: ""; height: 7px; width: 7px; background: var(--ds-accent); border-radius: 50%; flex-shrink: 0; }
.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 36px; align-items: center; padding-top: 58px; padding-bottom: 53px; }
.hero-copy { padding-bottom: 9px; }
.hero h1 { letter-spacing: -.055em; line-height: 1.06; margin-bottom: 23px; }
.hero h1 span { display: block; color: var(--ds-accent); }
.hero-copy > p:not(.eyebrow) { max-width: 47ch; color: var(--ds-ink-soft); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-actions .ds-btn { padding-inline: 21px; }
.ds-btn { border-radius: 5px; }
.ds-btn--primary { background: var(--ds-ink); }
.ds-btn--primary:hover { background: var(--ds-accent); }
.text-link { font-size: var(--ds-font-small); color: var(--ds-ink); font-weight: 700; text-decoration: none; padding: 12px 2px; }
.text-link:hover { text-decoration: underline; }
.trust-row { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--ds-muted); margin-top: 24px; letter-spacing: 0; }
.trust-row span { display: inline-flex; gap: 7px; align-items: center; }
.trust-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--ds-accent); }
.hero-art { margin: 0; position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.hero-art img { width: 100%; border-radius: 12px; }
.hero-art-label { display: flex; justify-content: space-between; gap: 14px; margin-top: 12px; color: var(--ds-muted); letter-spacing: 0; }
.hero-art-label span { font-size: var(--ds-font-small); }
.intro-strip { border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); }
.intro-strip .ds-wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 18px; }
.intro-strip p { margin: 0; color: var(--ds-muted); font-size: var(--ds-font-small); }
.intro-strip a { font-size: var(--ds-font-small); font-weight: 600; white-space: nowrap; }
.section-heading { display: flex; gap: 28px; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { color: var(--ds-muted); max-width: 50ch; margin: 10px 0 0; }
.section-number { display: block; color: var(--ds-muted); margin-bottom: 13px; text-transform: uppercase; }
.section-aside { max-width: 34ch; color: var(--ds-muted); }
.section-heading a { font-size: var(--ds-font-small); white-space: nowrap; font-weight: 600; }
.game-shell { border: 1px solid var(--ds-line); border-radius: 10px; overflow: hidden; background: var(--ds-paper); }
.game-readout { border-bottom: 1px solid var(--ds-line); color: var(--ds-ink-soft); background: var(--ds-paper-soft); }
.game-setup { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; padding: 20px 24px; background: var(--ds-paper-soft); border-bottom: 1px solid var(--ds-line); }
.game-setup label { font-size: var(--ds-font-small); font-weight: 700; display: block; }
.game-setup select { display: block; width: 100%; margin-top: 7px; border: 1px solid var(--ds-line); border-radius: 5px; padding: 10px 34px 10px 12px; background-color: var(--ds-paper); color: var(--ds-ink); min-height: 46px; font-size: 1rem; }
.arena-stage { position: relative; background: var(--ds-ink); isolation: isolate; }
#game-canvas { display: block; width: 100%; height: auto; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--ds-paper); background: color-mix(in srgb, var(--ds-ink) 87%, transparent); }
.game-overlay h3 { margin-bottom: 0; }
.game-overlay p { max-width: 45ch; margin: 0; color: var(--ds-paper); }
.game-overlay .ds-btn { background: var(--ds-highlight); color: var(--ds-ink); }
.arena-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px 0; }
.arena-toolbar > div { display: flex; gap: 8px; flex-wrap: wrap; }
.arena-toolbar button, .touch-controls button { min-height: 44px; border: 1px solid var(--ds-line); background: var(--ds-paper); border-radius: 5px; padding: 7px 14px; font-size: var(--ds-font-small); font-weight: 600; cursor: pointer; }
.arena-toolbar .arena-label { font-family: "Courier New", monospace; font-size: var(--ds-font-small); font-weight: 600; color: var(--ds-muted); }
#game-status { padding: 12px 24px 0; margin: 0; color: var(--ds-muted); font-size: 1rem; }
.touch-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 24px 22px; }
.touch-controls button { touch-action: none; user-select: none; -webkit-user-select: none; min-width: 64px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.touch-controls button[data-action="special"] { background: var(--ds-highlight); border-color: var(--ds-highlight); }
.touch-controls button:active, .touch-controls button.active { background: var(--ds-ink); color: var(--ds-paper); }
.touch-controls kbd { color: inherit; border: 0; padding: 0; font-size: inherit; opacity: .75; }
.game-footnote { padding: 0 24px 20px; color: var(--ds-muted); }
.game-footnote p, #local-control-note { font-size: var(--ds-font-small); margin-bottom: 0; }
.key, kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; padding: 0 6px; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--ds-paper-soft); font-size: inherit; font-family: "Courier New", monospace; color: var(--ds-ink); box-shadow: 0 2px 0 var(--ds-line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide-card { display: flex; flex-direction: column; padding: 26px; }
.guide-card p { color: var(--ds-muted); }
.guide-card a:last-child { margin-top: auto; font-weight: 700; font-size: var(--ds-font-small); }
.card-index { color: var(--ds-muted); margin-bottom: 22px; display: block; }
.guide-card h3 { margin-bottom: 14px; }
.quick-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0 0 20px; }
.quick-controls div { display: flex; gap: 8px; align-items: center; }
.quick-controls dt, .quick-controls dd { margin: 0; }
.quick-controls dd { color: var(--ds-muted); }
.soft-section { background: var(--ds-paper-soft); border-block: 1px solid var(--ds-line); }
.how-grid { display: grid; grid-template-columns: .85fr 1.3fr; gap: 90px; }
.how-intro p { color: var(--ds-muted); }
.step-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step-list li { position: relative; counter-increment: step; padding-left: 58px; margin: 0 0 27px; }
.step-list li::before { content: "0" counter(step); position: absolute; left: 0; top: 0; height: 34px; width: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ds-line); border-radius: 50%; font-family: "Courier New", monospace; font-size: var(--ds-font-small); font-weight: 700; }
.step-list h3 { margin-bottom: 8px; }
.step-list p { margin: 0; color: var(--ds-muted); }
.table-scroll { overflow-x: auto; margin-block: 24px; border: 1px solid var(--ds-line); border-radius: 7px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { background: var(--ds-paper-soft); font-weight: 700; }
th, td { padding: 15px 20px; border-bottom: 1px solid var(--ds-line); vertical-align: top; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
.comparison-table { min-width: 640px; }
.comparison-table th:first-child { width: 22%; }
.comparison-table td { color: var(--ds-ink-soft); }
caption { text-align: left; padding: 15px 20px; font-weight: 600; font-size: 1rem; background: var(--ds-paper); }
.source-note { color: var(--ds-muted); font-size: var(--ds-font-small); max-width: 68ch; }
.game-shell + .source-note { margin-top: 14px; }
.source-note a { color: var(--ds-accent); }
.faq-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 90px; }
.faq-intro p { color: var(--ds-muted); }
.faq-list details { padding: 20px 0; border-bottom: 1px solid var(--ds-line); }
.faq-list details:first-child { border-top: 1px solid var(--ds-line); }
.faq-list summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 32px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--ds-muted); margin: 13px 0 0; }
.end-card { display: flex; justify-content: space-between; align-items: center; gap: 32px; background: var(--ds-ink); color: var(--ds-paper); padding: 38px 42px; border-radius: 8px; }
.end-card h2 { margin-bottom: 8px; }
.end-card p { margin: 0; color: var(--ds-paper); }
.end-card .ds-btn { background: var(--ds-highlight); color: var(--ds-ink); white-space: nowrap; }
.site-footer { margin-top: 24px; }
.site-footer .ds-wrap > p:first-child { font-size: var(--ds-font-small); margin: 0; }
.site-footer .ds-fineprint { font-size: var(--ds-font-small); }
.site-footer nav a { font-size: var(--ds-font-small); }
.article-header { max-width: 850px; margin-bottom: 38px; }
.article-header h1 { margin-bottom: 20px; }
.article-header > p:not(.eyebrow):not(.breadcrumb) { color: var(--ds-muted); max-width: 65ch; }
.breadcrumb { color: var(--ds-muted); font-size: var(--ds-font-small); margin-bottom: 24px; }
.breadcrumb a { color: var(--ds-muted); }
.article-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 56px; align-items: start; }
.toc { padding: 20px 20px 20px 0; border-top: 1px solid var(--ds-line); }
.toc h2, .toc h3, .toc > strong { font-size: 1rem; font-weight: 700; margin: 0 0 12px; display: block; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0 0 10px; }
.toc a { font-size: var(--ds-font-small); text-decoration: none; color: var(--ds-muted); }
.toc a:hover { text-decoration: underline; }
.prose { min-width: 0; max-width: 68ch; }
.prose h2 { margin-top: 1.6em; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.3em; }
.prose p, .prose li { color: var(--ds-ink-soft); }
.prose .ds-card { margin-block: 22px; }
.prose .guide-card h3, .prose .fighter-card h3 { margin-top: 0; }
.prose table { min-width: 530px; }
.prose .table-scroll { max-width: 100%; }
.callout { border-left: 3px solid var(--ds-accent); padding: 19px 22px; margin-block: 26px; background: var(--ds-paper-soft); }
.callout > :last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }
.tag { background: var(--ds-paper-soft); padding: 4px 9px; border-radius: 4px; color: var(--ds-muted); display: inline-flex; letter-spacing: .025em; }
.roster-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-block: 24px; }
.fighter-card { border-top: 3px solid var(--ds-accent); }
.fighter-card p { margin-bottom: 12px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ds-muted); font-size: var(--ds-font-small); }
.article > .prose { margin-inline: auto; }

@media (max-width: 940px) {
  .hero { gap: 24px; }
  .hero-actions { gap: 9px; }
  .hero-actions .ds-btn { padding-inline: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .guide-card { display: grid; grid-template-columns: 42px 1fr; column-gap: 15px; }
  .guide-card > .card-index { grid-row: 1 / 5; }
  .guide-card > :not(.card-index) { grid-column: 2; }
  .guide-card p { max-width: 65ch; }
  .how-grid, .faq-layout { gap: 38px; grid-template-columns: .85fr 1.2fr; }
  .article-layout { grid-template-columns: 170px minmax(0,1fr); gap: 28px; }
  .main-nav { gap: 20px; }
}

@media (max-width: 700px) {
  h1 { font-size: clamp(2.1rem, 8vw, 2.4rem); }
  .site-header > .ds-wrap { min-height: 78px; flex-wrap: wrap; gap: 12px; padding-block: 18px; }
  .main-nav { gap: 19px; flex-wrap: wrap; }
  .main-nav a { padding-block: 4px; }
  .hero { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 32px; gap: 28px; }
  .hero-copy { padding-bottom: 0; }
  .hero-copy > p:not(.eyebrow) { max-width: 60ch; margin-bottom: 20px; }
  .hero-art { max-width: 530px; width: 100%; margin-inline: auto; }
  .hero-art img { max-height: 350px; object-fit: contain; }
  .hero-actions .ds-btn { width: auto; }
  .hero-actions .text-link { padding-inline: 0; }
  .hero .trust-row { margin-top: 18px; }
  .intro-strip .ds-wrap { align-items: start; flex-direction: column; gap: 5px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-heading p { margin-top: 8px; }
  .how-grid, .faq-layout { grid-template-columns: 1fr; gap: 26px; }
  .game-setup { gap: 12px; padding: 16px; }
  .game-setup label { font-size: var(--ds-font-small); }
  .game-setup select { padding-inline: 8px; }
  .game-setup > div:first-child { grid-column: span 3; }
  .game-setup > div:not(:first-child) { grid-column: span 1; }
  .game-setup { grid-template-columns: 1fr 1fr; }
  .game-setup > div:first-child { grid-column: span 2; }
  .game-overlay { gap: 10px; padding: 15px; }
  .game-overlay p { display: none; }
  .game-overlay .ds-btn { width: auto; padding-block: 10px; }
  .arena-toolbar { padding: 12px 16px 0; align-items: start; }
  .arena-toolbar .arena-label { display: none; }
  #game-status { padding-inline: 16px; }
  .touch-controls { gap: 7px; padding-inline: 16px; }
  .touch-controls button { flex: 1 0 20%; min-width: 60px; padding-inline: 9px; }
  .game-footnote { padding-inline: 16px; }
  .guide-card { padding: 22px; }
  .end-card { flex-direction: column; align-items: start; padding: 28px; gap: 22px; }
  .end-card .ds-btn { white-space: normal; }
  .article-layout { display: block; }
  .toc { padding: 18px 0 24px; margin-bottom: 28px; border-bottom: 1px solid var(--ds-line); }
  .toc ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .toc li { margin: 0; }
  .roster-grid { grid-template-columns: 1fr; }
  .site-footer .ds-wrap { gap: 18px; }
  .site-footer nav { gap: 10px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
