/* Shared look for the landing and accuracy pages. Same palette and type as the simulator:
   ember = attacker, frost = defender, on cold grey-white; Saira Condensed headings, IBM Plex Sans text. */
:root {
  --bg: #eef1f3; --panel: #ffffff; --ink: #18212a; --muted: #5b6873; --line: #d3dade;
  --att: #c2412b; --att-soft: #fbe9e4; --def: #2f6e9e; --def-soft: #e3eef6;
  --accent: #e0761f; --accent-ink: #9a4c0c; --good: #2a7449;
  --f-display: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 62ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1418; --panel: #171e24; --ink: #e4eaee; --muted: #8e9ba5; --line: #2a343c;
    --att: #ee7a5f; --att-soft: #2b1b17; --def: #6fb0e2; --def-soft: #16242f; --accent: #f0954a; --accent-ink: #f0954a; --good: #5cc08a;
    color-scheme: dark;
  }
}
/* the visitor's own choice (theme.js), same values as the device's dark mode above */
:root[data-theme="dark"] {
  --bg: #0f1418; --panel: #171e24; --ink: #e4eaee; --muted: #8e9ba5; --line: #2a343c;
  --att: #ee7a5f; --att-soft: #2b1b17; --def: #6fb0e2; --def-soft: #16242f; --accent: #f0954a; --accent-ink: #f0954a; --good: #5cc08a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--f-body); font-variant-numeric: tabular-nums; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: .005em; }
p { margin: 0; max-width: var(--measure); }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.mark { font-family: var(--f-display); font-weight: 800; font-size: 22px; text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.mark svg { width: 26px; height: 26px; flex: none; }
.nav { margin-inline-start: auto; display: flex; gap: 18px; font-size: 15px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

.langsel { width: auto; padding: 3px 6px; font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px; flex: none; }
.themebtn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; margin-inline-end: -6px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.themebtn:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 50%, transparent); }
.themebtn svg { width: 18px; height: 18px; }

/* buttons */
.btn { display: inline-block; font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: .02em;
  background: var(--accent); color: #1b1006; text-decoration: none; padding: 10px 24px; border-radius: 6px; }
.btn:hover { filter: brightness(1.06); }
.btn.alt { background: var(--def); color: #fff; display: inline-flex; align-items: center; gap: 9px; }
.btn.alt svg { width: 22px; height: 22px; flex: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.alt { color: #0b1a26; } }
:root[data-theme="dark"] .btn.alt { color: #0b1a26; }
.link { color: var(--def); font-weight: 600; text-underline-offset: 3px; }

/* hero */
.hero { padding-block: 56px 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.2vw, 68px); font-weight: 800; }
.hero .lede { margin-top: 18px; font-size: 19px; color: var(--muted); max-width: 46ch; }
.hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 44px; } }

/* the report card: one real fight, prediction against what happened */
.report { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.report .head { padding: 14px 18px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.report .head strong { color: var(--ink); font-weight: 600; }
.report .sides { display: grid; grid-template-columns: 1fr 1fr; }
.report .side { padding: 14px 18px 16px; }
.report .side.a { background: var(--att-soft); border-top: 3px solid var(--att); }
.report .side.d { background: var(--def-soft); border-top: 3px solid var(--def); }
.report .side h2 { font-size: 22px; }
.report .side.a h2 { color: var(--att); } .report .side.d h2 { color: var(--def); }
.report .side p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.report .bar { display: flex; height: 12px; margin: 16px 18px 6px; border-radius: 3px; overflow: hidden; background: var(--line); }
.report .bar span { display: block; height: 100%; }
.report .bar .a { background: var(--att); } .report .bar .d { background: var(--def); }
.report .verdict { padding: 0 18px; font-family: var(--f-display); font-weight: 800; font-size: 30px; color: var(--def); }
.report .verdict.a { color: var(--att); }
.hero .eyebrow { display: none; font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .01em; color: var(--muted); margin: 0 0 10px; }
.report table { width: calc(100% - 36px); margin: 12px 18px 16px; border-collapse: collapse; font-size: 15px; }
.report th, .report td { text-align: start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.report th { font-weight: 500; color: var(--muted); font-size: 13px; }
.report td.n, .report th.n { text-align: end; }
.report tr:last-child td { border-bottom: 0; }
.report .foot { padding: 12px 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .report .bar .d { animation: fill 900ms 200ms cubic-bezier(.2,.7,.2,1) both; transform-origin: right; }
  @keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

.hero .free { margin-top: 16px; font-size: 15px; color: var(--muted); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--muted); filter: none; }
.chip { display: inline-block; font-family: var(--f-body); font-size: 11px; font-weight: 600; letter-spacing: .02em; line-height: 1; padding: 4px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 2px; margin-inline-start: 4px; }
/* --accent-ink: the accent dark enough to read as small text on the light theme (the plain accent was 2.7:1) */
.chip.pro { border-color: var(--accent); color: var(--accent-ink); }
.chip.acct { border-color: var(--def); color: var(--def); }

/* content sections */
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; max-width: 22ch; }
.band .intro { margin-top: 12px; color: var(--muted); }
.covers { margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.covers div { padding: 16px 0; border-top: 1px solid var(--line); }
.covers dt { font-weight: 600; }
.covers dd { margin: 4px 0 0; color: var(--muted); font-size: 16px; max-width: 48ch; }
@media (max-width: 700px) { .covers { grid-template-columns: 1fr; } }
/* features, grouped by when you need them */
.groups { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.group h3 { font-size: 24px; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.gnum { font-size: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #1b1006; display: inline-grid; place-items: center; flex: none; }
.feats { margin: 0; }
.feats div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.feats div:last-child { border-bottom: 0; }
.feats dt { font-weight: 600; }
.feats dd { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.langs { margin-top: 24px; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .groups { grid-template-columns: 1fr; gap: 28px; } }
/* the groups are <details>: always open and not clickable on wider screens; on phones they fold (index.html closes them) */
.group summary { list-style: none; cursor: default; pointer-events: none; }
.group summary::-webkit-details-marker { display: none; }
@media (max-width: 600px) {
  .groups { gap: 0; }
  .group summary { cursor: pointer; pointer-events: auto; }
  .group h3 { justify-content: flex-start; padding: 14px 0; border-bottom-width: 1px; border-bottom-color: var(--line); }
  .group h3::after { content: ""; width: 9px; height: 9px; margin-inline-start: auto; margin-inline-end: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); flex: none; }
  .group[open] h3 { border-bottom: 2px solid var(--ink); }
  .group[open] h3::after { transform: rotate(-135deg); }
  .group summary:focus-visible h3 { outline: 2px solid var(--def); outline-offset: 2px; }
}
/* plans */
.plans { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 20px 22px; display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--accent); }
.plan h3 { font-size: 24px; }
.plan .price { font-family: var(--f-display); font-weight: 800; font-size: 34px; margin-top: 4px; }
.plan .price small { font-family: var(--f-body); font-weight: 400; font-size: 15px; color: var(--muted); }
.plan ul { list-style: none; margin: 14px 0 20px; padding: 0; flex: 1; }
.plan li { padding: 6px 0 6px 24px; position: relative; font-size: 15.5px; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 13px; width: 11px; height: 6px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.plan .btn { text-align: center; font-size: 18px; }
.plan .small { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-family: var(--f-display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--accent); margin-bottom: 8px; }
.steps h3 { font-size: 22px; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 22px; } }
.proof { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.proof .big { font-family: var(--f-display); font-weight: 800; font-size: clamp(56px, 9vw, 104px); line-height: .9; }
.proof .big small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 16px; color: var(--muted); margin-top: 10px; line-height: 1.4; }
@media (max-width: 700px) { .proof { grid-template-columns: 1fr; } }

/* accuracy page */
.page { padding-block: 44px 64px; }
.page h1 { font-size: clamp(38px, 5.5vw, 56px); font-weight: 800; }
.page .lede { margin-top: 14px; font-size: 19px; color: var(--muted); }
.page h2 { font-size: 30px; font-weight: 700; margin-top: 44px; }
.page p + p { margin-top: 12px; }
.page .body p { margin-top: 12px; }
.scroll { overflow-x: auto; margin-top: 18px; }
table.score { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table.score th, table.score td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.score th { font-weight: 500; color: var(--muted); font-size: 13px; }
table.score .n { text-align: end; white-space: nowrap; }
table.score tr.all td { font-weight: 700; border-bottom: 0; }
table.score td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.notes { margin: 14px 0 0; padding-inline-start: 20px; color: var(--muted); font-size: 15px; max-width: 70ch; }
.notes li + li { margin-top: 6px; }

/* footer */
.foot-site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot-site .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.foot-site p { max-width: 70ch; }
#langfoot { display: none; margin: 0; }
.foot-site .nav { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 820px) { #langbox { display: none; } #langfoot { display: block; } #langfoot .langmenu > button { font-size: 14px; padding: 7px 10px; } }
@media (max-width: 480px) {
  .top .wrap { gap: 12px; }
  .mark { font-size: 18px; white-space: nowrap; min-width: 0; }
  .mark svg { width: 22px; height: 22px; }
  .nav { gap: 14px; font-size: 14px; }
}
@media (max-width: 660px) { .mark-x { display: none; } }
/* three nav links (Timing added 7 Nov 2026) need the room on small phones: the mark keeps its first word */
@media (max-width: 540px) { .mark-y { display: none; } }
@media (max-width: 480px) { .nav { gap: 12px; } }
/* the nav links are longer in other languages (and don't break mid-word): on a phone the mark is just the logo */
@media (max-width: 480px) { html:not([lang="en"]) .mark > span { display: none; } }
/* four nav links (Guide added 8 Nov 2026): on a phone the mark is just the logo in every language */
@media (max-width: 560px) { .mark > span { display: none; } }
  /* the name moves above the home headline when the header drops it */
@media (max-width: 560px) { .hero .eyebrow { display: block; } }
/* other languages have longer nav words (Genauigkeit, Sincronización): the logo alone up to tablet width */
@media (max-width: 900px) { html:not([lang="en"]) .mark > span { display: none; } }
@media (max-width: 900px) { html:not([lang="en"]) .hero .eyebrow { display: block; } }
@media (max-width: 600px) {
  table.score { min-width: 0; font-size: 14px; }
  table.score th, table.score td { padding: 9px 8px; }
  table.score th { font-size: 12px; }
}
@media (max-width: 600px) { table.score th.n { white-space: normal; } table.score td.n { padding-inline-start: 4px; } table.score td.n:last-child { white-space: normal; } }
/* phones: the five-column table on the accuracy page fits the screen instead of hiding its last column off the edge (10 Nov 2026) */
@media (max-width: 480px) { table.score { font-size: 13px; } table.score th, table.score td { padding: 8px 5px; } table.score td.n { white-space: normal; } table.score td small { font-size: 12px; } }
.report .foot.open { font-size: 15px; }

/* accuracy page, 8 Nov 2026: headline figures, the win-chance table with bars, the six-duel strip */
.kpis { margin-top: 30px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 18px; }
.kpi .kv { font-family: var(--f-display); font-weight: 800; font-size: 46px; line-height: 1; color: var(--ink); }
.kpi .kt { font-weight: 600; margin-top: 6px; font-size: 15.5px; }
.kpi p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.kpi:first-child .kv { color: var(--accent); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpi .kv { font-size: 38px; } .kpi { padding: 14px; } }
.page .aside { margin-top: 12px; color: var(--muted); font-size: 15px; }
table.score.cal td { vertical-align: middle; }
table.score .barcol { width: 34%; min-width: 150px; }
table.score th.barcol { white-space: nowrap; }
.key { display: inline-flex; align-items: center; gap: 5px; margin-inline-end: 10px; }
.key .k { display: inline-block; width: 12px; height: 8px; border-radius: 2px; }
.k.said, .bars .said { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.k.won, .bars .won { background: var(--good); }
.bars { display: grid; gap: 4px; }
.bars span { display: block; height: 8px; border-radius: 2px; }
@media (max-width: 600px) { table.score .barcol { display: none; } }
.duel { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 18px; }
.duel-h strong { display: block; font-weight: 600; }
.duel-h span { color: var(--muted); font-size: 14.5px; }
.duel-r { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.duel-r li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; color: var(--muted); }
.duel-r b { display: block; font-family: var(--f-display); font-size: 20px; }
.duel-r b.w { color: var(--good); } .duel-r b.l { color: var(--att); }
.duel p { color: var(--muted); font-size: 15px; }
@media (max-width: 720px) { .duel-r { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hero .actions.sub { margin-top: 16px; gap: 10px 22px; }
@media (max-width: 480px) { .hero .actions .btn { flex: 1 1 100%; text-align: center; justify-content: center; } }

/* guide page, 8 Nov 2026 */
.guide section { scroll-margin-top: 16px; }
.toc { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { text-decoration: none; font-size: 14.5px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); }
.toc a:hover { border-color: var(--muted); }
.guide .steps { margin-top: 18px; }
.guide .steps p { font-size: 15.5px; }
.guide section > p { margin-top: 12px; }
.gl { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.gl div { padding: 14px 0; border-top: 1px solid var(--line); }
.gl dt { font-weight: 600; }
.gl dd { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; max-width: 54ch; }
@media (max-width: 760px) { .gl { grid-template-columns: 1fr; } }
.faq { margin-top: 14px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 15.5px; max-width: 70ch; }
.guide table.score td:not(:first-child) { color: var(--muted); }
/* the narrowest phones in Spanish (Sincronización) need the nav a little tighter */
@media (max-width: 380px) { .top .nav { gap: 10px; font-size: 13px; } }
/* top links (8 Nov 2026): the full name ("Battle Simulator") where there's room, the short one ("Simulator") where there isn't */
.top .nav .ns { display: none; }
@media (max-width: 1000px) { .top .nav .nl { display: none; } .top .nav .ns { display: inline; } }

/* Arabic (dir="rtl"): the page mirrors, but charts are drawn left to right, so their text anchors stay left to right */
[dir="rtl"] svg { direction: ltr; }
