/* FM Helper guides — "Taktiktafel" design system, shared with the tactics hub.
   Light: whiteboard. Dark: chalkboard. Self-hosted fonts only. */
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --bg-2: #eef2f6;
  --panel: #ffffff;
  --panel-2: #f4f7fa;
  --line: #d7dee7;
  --line-strong: #aab6c4;
  --ink: #1c2430;
  --pop: #1c2430;
  --text: #1c2430;
  --body-text: #2f3a48;
  --muted: #4e5a6a;
  --faint: #667183;
  --lime: #1d4ed8;
  --lime-2: #1e3a8a;
  --lime-ink: #ffffff;
  --brand-soft: rgba(29, 78, 216, .09);
  --marker: #c9372e;
  --highlight-soft: rgba(253, 224, 120, .6);
  --row-hover: #fffbea;
  --grid-line: #e6ebf1;
  --gold: #a16207;
  --blue: #0e6b8a;
  --red: #c9372e;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 16px 40px rgba(28, 36, 48, .12);
  --max: 1180px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17211e; --bg-2: #131b18; --panel: #1e2a26; --panel-2: #23312c;
    --line: #34463f; --line-strong: #52685f; --ink: #d6e0da; --pop: #0a0f0d;
    --text: #eef3f0; --body-text: #cfdad4; --muted: #b0beb7; --faint: #8f9e97;
    --lime: #8fb5ff; --lime-2: #c4d8ff; --lime-ink: #0f1d3d; --brand-soft: rgba(143, 181, 255, .14);
    --marker: #ff9086; --highlight-soft: rgba(242, 213, 107, .24); --row-hover: rgba(242, 213, 107, .07);
    --grid-line: rgba(255, 255, 255, .035);
    --gold: #f2c66d; --blue: #7fd0e3; --red: #ff9086;
    --shadow: 0 18px 44px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17211e; --bg-2: #131b18; --panel: #1e2a26; --panel-2: #23312c;
  --line: #34463f; --line-strong: #52685f; --ink: #d6e0da; --pop: #0a0f0d;
  --text: #eef3f0; --body-text: #cfdad4; --muted: #b0beb7; --faint: #8f9e97;
  --lime: #8fb5ff; --lime-2: #c4d8ff; --lime-ink: #0f1d3d; --brand-soft: rgba(143, 181, 255, .14);
  --marker: #ff9086; --highlight-soft: rgba(242, 213, 107, .24); --row-hover: rgba(242, 213, 107, .07);
  --grid-line: rgba(255, 255, 255, .035);
  --gold: #f2c66d; --blue: #7fd0e3; --red: #ff9086;
  --shadow: 0 18px 44px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #fde68a; color: #1c2430; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-2); text-decoration: underline; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 22px; }
li { margin: 6px 0; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--lime); color: var(--lime-ink); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 2px solid var(--ink);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(14px);
}
.header-row { min-height: 72px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); border: 2px solid var(--ink); color: var(--lime); transform: rotate(-4deg); transition: transform .2s ease; }
.brand:hover .brand-mark { transform: rotate(3deg); }
.brand-mark svg { width: 24px; height: 24px; }
.brand strong { color: var(--marker); font-family: var(--hand); font-size: 1.5rem; line-height: 1; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 700; font-size: .92rem; padding: 8px 11px; border-radius: var(--radius-sm); white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--lime); text-decoration: underline wavy var(--lime) 1.5px; text-underline-offset: 7px; }
.nav .hub-link { color: var(--lime); border: 2px solid var(--lime); }
.nav .hub-link:hover { color: var(--lime-ink); background: var(--lime); }
.nav a.nav-support { color: #fff; background: #0070ba; border: 2px solid #0070ba; padding: 6px 13px; }
.nav a.nav-support:hover { color: #fff; background: #005ea6; border-color: #005ea6; }
.nav .icon-button { width: 36px; height: 36px; flex: 0 0 auto; }
.nav a.nav-login { color: var(--text); border: 2px solid var(--ink); }
.nav a.nav-login:hover { color: var(--text); background: var(--panel); box-shadow: 3px 3px 0 var(--pop); transform: translate(-1px, -1px); }
.nav a.nav-register { color: var(--lime-ink); background: var(--lime); border: 2px solid var(--ink); font-weight: 800; box-shadow: 3px 3px 0 var(--pop); }
.nav a.nav-register:hover { color: var(--lime-ink); background: var(--lime); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pop); }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--ink); }
/* Show the icon of the theme you would switch to. */
.theme-icon-moon { display: block; }
.theme-icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-icon-sun { display: block; }
}
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 2px; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--panel); }
.lang-switch a { padding: 4px 8px; font-size: .72rem; font-weight: 800; color: var(--muted); border-radius: 999px; text-decoration: none; }
.lang-switch a:hover { color: var(--text); text-decoration: none; background: transparent; }
.lang-switch a[aria-current="page"] { color: var(--lime-ink); background: var(--lime); text-decoration: none; }

.hero { padding: 64px 0 40px; }
.eyebrow { display: inline-block; color: var(--marker); font-family: var(--hand); font-size: 1.55rem; font-weight: 700; line-height: 1.1; margin-bottom: 14px; transform: rotate(-2deg); transform-origin: left center; }
.hero h1 { max-width: 980px; margin-bottom: 20px; }
.hero h1 em {
  color: var(--lime); font-style: normal;
  background: linear-gradient(transparent 58%, var(--highlight-soft) 58%, var(--highlight-soft) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .08em;
}
.hero-lead { max-width: 72ch; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--faint); font-size: .84rem; margin-top: 22px; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); border: 1.5px solid var(--ink); display: inline-block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button-guide {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 18px;
  border-radius: 10px; border: 2px solid var(--ink); background: var(--lime); color: var(--lime-ink);
  font-weight: 800; text-decoration: none; box-shadow: 3px 3px 0 var(--pop);
  transition: transform .15s ease, box-shadow .15s ease;
}
.button-guide:hover { color: var(--lime-ink); text-decoration: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--pop); }
.button-guide:active { transform: translate(1px, 1px); box-shadow: none; }
.button-guide.secondary { background: var(--panel); color: var(--text); box-shadow: none; }
.button-guide.secondary:hover { color: var(--text); box-shadow: 3px 3px 0 var(--pop); }

.tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 20px 0 60px; }
.tier-card {
  position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 26px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tier-card:hover { text-decoration: none; color: var(--text); transform: translate(-2px, -2px) rotate(-.3deg); box-shadow: 6px 6px 0 var(--pop); }
.tier-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); color: var(--lime); margin-bottom: 18px; transform: rotate(-6deg); }
.tier-icon svg { width: 26px; height: 26px; }
.tier-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.tier-card p { color: var(--muted); font-size: .95rem; }
.tier-card ul { color: var(--muted); font-size: .9rem; margin-top: auto; }
.tier-card .card-cta { margin-top: 18px; color: var(--lime); font-weight: 800; font-size: .92rem; }
.tier-card:hover .card-cta { text-decoration: underline wavy; text-underline-offset: 5px; }
.tier-card.elite { border-top: 8px solid var(--gold); }
.tier-card.mid { border-top: 8px solid var(--blue); }
.tier-card.relegation { border-top: 8px solid var(--red); }
.tier-card.elite .tier-icon { color: var(--gold); }
.tier-card.mid .tier-icon { color: var(--blue); }
.tier-card.relegation .tier-icon { color: var(--red); }

.section { padding: 34px 0; border-top: 2px dashed var(--line-strong); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 {
  display: inline;
  background: linear-gradient(transparent 60%, var(--highlight-soft) 60%, var(--highlight-soft) 94%, transparent 94%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .1em;
}
.section-head h2 + p { margin-top: 10px; }
.section-head p { color: var(--muted); max-width: 720px; margin: 0; }

.guide-hero { padding: 54px 0 30px; }
.guide-hero .tier-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--panel); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 18px; }
.guide-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); max-width: 900px; }
.guide-hero .lead { max-width: 72ch; color: var(--muted); font-size: 1.1rem; }

.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 70px; }
.toc { position: sticky; top: 94px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); padding: 18px; }
.toc h2 { font-family: var(--hand); font-size: 1.5rem; font-weight: 700; letter-spacing: 0; color: var(--marker); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; color: var(--muted); font-size: .88rem; font-weight: 600; padding: 6px 8px; border-radius: 7px; }
.toc a:hover { color: var(--text); background: var(--row-hover); text-decoration: none; }
.toc .toc-cta { margin-top: 14px; padding-top: 14px; border-top: 2px dashed var(--line); }
.toc .toc-cta a { color: var(--lime); font-weight: 800; }
.guide-main { min-width: 0; max-width: 80ch; }
.guide-main > section { scroll-margin-top: 94px; padding: 32px 0; border-bottom: 2px dashed var(--line); }
.guide-main > section:first-child { padding-top: 0; }
.guide-main h2 { margin-bottom: 14px; }
.guide-main h3 { margin-top: 26px; color: var(--text); }
.guide-main p, .guide-main li { color: var(--body-text); }
.guide-main strong { color: var(--text); }
.lead-box { border: 2px solid var(--ink); background: var(--panel); border-radius: var(--radius); padding: 22px 24px; margin: 18px 0 8px; box-shadow: 5px 5px 0 var(--pop); }
.lead-box h3 { margin-top: 0; color: var(--marker); font-family: var(--hand); font-size: 1.7rem; font-weight: 700; letter-spacing: 0; }
.lead-box ul { margin-bottom: 0; }
.callout { border-left: 4px solid var(--lime); background: var(--panel); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 18px 0; color: var(--muted); font-size: .94rem; }
.callout.warn { border-color: var(--gold); }
.callout.danger { border-color: var(--red); }
.callout strong { color: var(--text); }

.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); margin: 18px 0; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
td { color: var(--body-text); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
td strong { color: var(--text); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.kpi { border: 2px solid var(--ink); border-radius: 12px; background: var(--panel); padding: 14px 16px; }
.kpi:nth-child(odd) { transform: rotate(-.5deg); }
.kpi:nth-child(even) { transform: rotate(.5deg); }
.kpi .label { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.kpi .value { display: block; color: var(--lime); font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--faint); font-size: .8rem; }

.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: -4px; color: var(--lime); font-family: var(--hand); font-size: 1.5rem; font-weight: 700; }
.checklist.cross li::before { content: "×"; color: var(--red); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.two-col > *, .card { min-width: 0; }
.card { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); padding: 20px; }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.tier-footer { border-top: 2px dashed var(--line-strong); padding: 28px 0 54px; color: var(--faint); font-size: .86rem; }
.tier-footer .footer-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.site-footer { border-top: 2px solid var(--ink); background: var(--panel-2); padding: 36px 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.site-footer p { color: var(--faint); font-size: .84rem; margin: 0; }
.site-footer nav { display: grid; gap: 7px; }
.site-footer nav a { color: var(--muted); font-size: .9rem; font-weight: 600; }
.site-footer nav a:hover { color: var(--text); }

@media (max-width: 980px) {
  .tier-grid { grid-template-columns: 1fr; }
  .tier-card { min-height: 0; }
  .guide-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .header-row { flex-wrap: wrap; padding: 10px 0; }
  .nav { order: 2; flex: 0 0 100%; flex-wrap: wrap; overflow: visible; margin-left: 0; padding-bottom: 5px; row-gap: 6px; }
  .hero { padding-top: 44px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .shell { width: min(var(--max), calc(100% - 32px)); }
  h1 { font-size: clamp(2rem, 10vw, 3rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .tier-card:hover, .button-guide:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .toc, .hero-meta, .card-cta { display: none; }
  body { background: #fff; color: #111; }
  .guide-layout { display: block; }
  .guide-main p, .guide-main li, td { color: #222; }
  a { color: #0645ad; }
  .table-wrap, .card, .lead-box, .callout, .kpi { border-color: #bbb; background: #fff; box-shadow: none; transform: none; }
}
