:root {
  color-scheme: dark;
  --bg: #020b1f;
  --surface: #071831;
  --surface-2: #0c2445;
  --text: #f5f9ff;
  --muted: #a7bad4;
  --accent: #2dd4ff;
  --accent-2: #ffb02e;
  --border: #1e4a72;
  --danger: #ff7b75;
  --success: #5ce1a8;
  --shadow: 0 18px 44px rgba(0, 0, 0, .3);
}

html[data-theme="bruxa-rustica-moderna"] {
  color-scheme: dark;
  --bg: #090d0a;
  --surface: #0f1611;
  --surface-2: #182019;
  --text: #f4eedf;
  --muted: #aa9e89;
  --accent: #d8a85f;
  --accent-2: #91b28b;
  --border: #806f54;
  --danger: #e77c72;
  --success: #9aca99;
  --shadow: 0 22px 58px rgba(0, 0, 0, .45);
}

html[data-theme="total-orange"] {
  color-scheme: dark;
  --bg: #050301;
  --surface: #0b0603;
  --surface-2: #170b04;
  --text: #fff7ed;
  --muted: #c69b7a;
  --accent: #ff7800;
  --accent-2: #ffad33;
  --border: #71310b;
  --danger: #ff645e;
  --success: #78e6a4;
  --shadow: 0 20px 54px rgba(0, 0, 0, .55);
}

html[data-theme="mystic-aerospace"] {
  color-scheme: dark;
  --bg: #070613;
  --surface: #100d22;
  --surface-2: #17112d;
  --text: #f5f4ff;
  --muted: #aaa4c5;
  --accent: #4de7ff;
  --accent-2: #f2b450;
  --border: #59487c;
  --danger: #ff7d88;
  --success: #72ddb0;
  --shadow: 0 20px 54px rgba(0, 0, 0, .44);
}

html[data-theme="aerospace"] {
  color-scheme: dark;
  --bg: #020b1f;
  --surface: #071831;
  --surface-2: #0c2445;
  --text: #f5f9ff;
  --muted: #a7bad4;
  --accent: #2dd4ff;
  --accent-2: #ffb02e;
  --border: #1e4a72;
  --danger: #ff7b75;
  --success: #5ce1a8;
  --shadow: 0 18px 44px rgba(0, 0, 0, .3);
}

html[data-theme="aerospace-light"] {
  color-scheme: light;
  --bg: #edf6ff;
  --surface: #ffffff;
  --surface-2: #dceeff;
  --text: #0a2038;
  --muted: #506b84;
  --accent: #006f9e;
  --accent-2: #b85d00;
  --border: #a7c8df;
  --danger: #a6302d;
  --success: #196d4c;
  --shadow: 0 18px 44px rgba(33, 72, 104, .14);
}

html[data-theme="rustic-light"] {
  color-scheme: light;
  --bg: #f4efe3;
  --surface: #fffaf0;
  --surface-2: #e8ddca;
  --text: #2d281f;
  --muted: #6d6253;
  --accent: #725533;
  --accent-2: #9a5d2c;
  --border: #cdbb9d;
  --danger: #8a322d;
  --success: #476b43;
  --shadow: 0 18px 44px rgba(77, 55, 31, .13);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f12;
  --surface: #171a1f;
  --surface-2: #20252c;
  --text: #f2f4f7;
  --muted: #a4abb5;
  --accent: #66a3ff;
  --accent-2: #f0a95a;
  --border: #343a43;
  --danger: #ff847f;
  --success: #64d6a1;
  --shadow: 0 18px 44px rgba(0, 0, 0, .34);
}

html[data-theme="minimal"] {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #475569;
  --border: #dbe3ec;
  --danger: #b42318;
  --success: #18794e;
  --shadow: 0 8px 24px rgba(30, 41, 59, .08);
}

html[data-theme="sepia"] {
  color-scheme: light;
  --bg: #f3e7cf;
  --surface: #fbf1dc;
  --surface-2: #e7d3ac;
  --text: #3b2d20;
  --muted: #74604d;
  --accent: #8a4f2b;
  --accent-2: #4f6b4f;
  --border: #cbb28a;
  --danger: #943b32;
  --success: #4f6b4f;
  --shadow: 0 18px 40px rgba(83, 54, 27, .14);
}

html[data-theme="oceanic"] {
  color-scheme: dark;
  --bg: #031b24;
  --surface: #082c38;
  --surface-2: #0d3d4c;
  --text: #effcff;
  --muted: #9cc8d1;
  --accent: #2ed7d1;
  --accent-2: #ffc857;
  --border: #1f6673;
  --danger: #ff8c85;
  --success: #68dfa8;
  --shadow: 0 18px 44px rgba(0, 13, 18, .34);
}

html[data-theme="green"] {
  color-scheme: dark;
  --bg: #061711;
  --surface: #0d281e;
  --surface-2: #14382a;
  --text: #f1fff8;
  --muted: #a5c9b6;
  --accent: #48d597;
  --accent-2: #e9ba5b;
  --border: #28684d;
  --danger: #ff8d83;
  --success: #48d597;
  --shadow: 0 18px 44px rgba(0, 16, 9, .34);
}

html[data-theme="natural"] {
  color-scheme: light;
  --bg: #f2f4ea;
  --surface: #fbfcf7;
  --surface-2: #e5ead8;
  --text: #263126;
  --muted: #64705f;
  --accent: #507550;
  --accent-2: #a2683c;
  --border: #bdc9ae;
  --danger: #963f38;
  --success: #4e7957;
  --shadow: 0 18px 40px rgba(51, 70, 46, .12);
}

html[data-theme="forest"] {
  color-scheme: dark;
  --bg: #07130c;
  --surface: #10251a;
  --surface-2: #193524;
  --text: #f0faef;
  --muted: #a7c0a9;
  --accent: #7bcf78;
  --accent-2: #d4a95f;
  --border: #315c3c;
  --danger: #ff958a;
  --success: #7bcf78;
  --shadow: 0 18px 44px rgba(0, 13, 4, .35);
}

html[data-theme="wizard-academy"] {
  color-scheme: dark;
  --bg: #170f24;
  --surface: #281b3b;
  --surface-2: #38264f;
  --text: #fff8e8;
  --muted: #c9b7d9;
  --accent: #d4ad58;
  --accent-2: #7ca7d8;
  --border: #644c7b;
  --danger: #ff8c88;
  --success: #9bd38c;
  --shadow: 0 18px 44px rgba(12, 3, 23, .4);
}

html[data-theme="comic-hero"] {
  color-scheme: dark;
  --bg: #101729;
  --surface: #1a2640;
  --surface-2: #273658;
  --text: #fffdf5;
  --muted: #b8c6dc;
  --accent: #ffd04a;
  --accent-2: #e34d59;
  --border: #435477;
  --danger: #ff7d86;
  --success: #70d9a4;
  --shadow: 0 18px 44px rgba(4, 8, 20, .38);
}

html[data-theme="modern-serious"] {
  color-scheme: light;
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #e3e8ef;
  --text: #152033;
  --muted: #5c687a;
  --accent: #244f88;
  --accent-2: #8a5b2f;
  --border: #c3ccd8;
  --danger: #9d2f2b;
  --success: #276b50;
  --shadow: 0 15px 36px rgba(37, 54, 78, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 3%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 32rem),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--surface-2)), var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

html[data-theme="sepia"] body,
html[data-theme="rustic-light"] body,
html[data-theme="wizard-academy"] body {
  font-family: Georgia, "Times New Roman", ui-serif, serif;
}

html[data-theme="bruxa-rustica-moderna"] body {
  background:
    linear-gradient(115deg, rgba(216, 168, 95, .028) 1px, transparent 1px),
    linear-gradient(25deg, rgba(145, 178, 139, .02) 1px, transparent 1px),
    radial-gradient(circle at 82% 3%, rgba(184, 154, 197, .08), transparent 32rem),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--surface-2)), var(--bg));
  background-size: 42px 42px, 42px 42px, auto, auto;
}

html[data-theme="bruxa-rustica-moderna"] h1,
html[data-theme="bruxa-rustica-moderna"] h2,
html[data-theme="bruxa-rustica-moderna"] h3 {
  font-family: Georgia, "Times New Roman", ui-serif, serif;
  letter-spacing: -.025em;
}
html[data-theme="minimal"] .card,
html[data-theme="minimal"] .story {
  border-radius: .7rem;
}
html[data-theme="comic-hero"] h1,
html[data-theme="comic-hero"] h2,
html[data-theme="comic-hero"] h3 {
  letter-spacing: -.025em;
  text-transform: uppercase;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, select, input {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 100;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: .7rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1520px, calc(100% - 32px)); margin-inline: auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .04em;
}
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.top-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.pill, .button, .theme-select {
  min-height: 42px;
  border-radius: 999px;
  padding: .62rem .9rem;
}
.pill { border: 1px solid var(--border); color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.button.secondary { background: var(--surface); }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 900;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 9vw, 8rem) 0 clamp(2.5rem, 7vw, 6rem);
}
.hero h1 {
  margin: .6rem 0 1rem;
  max-width: 14ch;
  font-size: clamp(2.65rem, 7vw, 6.7rem);
  line-height: .95;
  letter-spacing: -.055em;
}
.hero p { max-width: 70ch; color: var(--muted); font-size: clamp(1.03rem, 1.6vw, 1.24rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.mission-mark {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 52%),
    repeating-radial-gradient(circle, transparent 0 38px, color-mix(in srgb, var(--border) 48%, transparent) 39px 40px);
  box-shadow: var(--shadow);
}
.mission-mark::before {
  content: "";
  position: absolute;
  inset: 20%;
  border: 1px dashed var(--accent);
  border-radius: 50%;
  transform: rotate(-18deg) scaleY(.52);
}
.mission-mark img {
  position: absolute;
  inset: 25%;
  width: 50%;
  height: 50%;
  border-radius: 26%;
  object-fit: cover;
  box-shadow: 0 0 36px color-mix(in srgb, var(--accent) 38%, transparent);
}
.total-football-model {
  display: grid;
  grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr);
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
  margin-bottom: clamp(2.4rem, 6vw, 5rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-2) 72%, var(--surface)));
  box-shadow: var(--shadow);
}
.total-football-model h2 { margin: .35rem 0 .85rem; font-size: clamp(1.8rem, 4vw, 3.5rem); line-height: 1; }
.model-copy { color: var(--muted); max-width: 72ch; }
.model-principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.1rem 0 1.25rem; }
.model-principles span { padding: .75rem; border: 1px solid var(--border); border-radius: .85rem; color: var(--muted); font-size: .86rem; }
.model-principles b { display: block; color: var(--accent-2); margin-bottom: .15rem; }
.english-pitch {
  position: relative;
  width: min(100%, 360px);
  min-height: 480px;
  justify-self: center;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 1.3rem;
  background:
    linear-gradient(90deg, transparent 49.7%, color-mix(in srgb, var(--border) 72%, transparent) 49.9% 50.1%, transparent 50.3%),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, var(--surface)) 0 12.5%, color-mix(in srgb, var(--accent-2) 8%, var(--surface)) 12.5% 25%);
}
.english-pitch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--border);
  border-radius: 50%;
}
.english-pitch span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--accent-2) 62%, var(--border));
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent-2);
  font-weight: 950;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--bg) 66%, transparent);
}
.section { padding: clamp(2.2rem, 6vw, 5rem) 0; }
.section-head { display: flex; justify-content: space-between; gap: 1.2rem; align-items: end; margin-bottom: 1.25rem; }
.section h2 { margin: .35rem 0 0; font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.05; }
.section-copy { max-width: 68ch; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.card {
  grid-column: span 4;
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-2) 62%, var(--surface)));
  box-shadow: var(--shadow);
}
.card.feature { grid-column: span 6; }
.card h3 { margin: .6rem 0 .5rem; font-size: 1.22rem; }
.card p { color: var(--muted); margin: 0 0 1rem; }
.card a:not(.button) { color: var(--accent); font-weight: 800; }
.icon { font-size: 1.55rem; }
.status {
  display: inline-flex;
  padding: .25rem .52rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  font-size: .78rem;
  font-weight: 900;
}
.notice {
  border: 1px solid color-mix(in srgb, var(--accent-2) 66%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 9%, var(--surface));
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.notice strong { color: var(--accent-2); }
.footer {
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.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;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .mission-mark { width: min(74vw, 360px); order: -1; }
  .total-football-model { grid-template-columns: 1fr; }
  .english-pitch { width: min(82vw, 380px); }
  .card, .card.feature { grid-column: span 6; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 1520px); }
  .brand span { display: none; }
  .topbar-inner { min-height: 62px; }
  .top-actions .pill { display: none; }
  .theme-select { max-width: 146px; }
  .hero { padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.45rem, 15vw, 4.4rem); }
  .total-football-model { padding: 1rem; }
  .english-pitch { min-height: 420px; }
  .model-principles { grid-template-columns: 1fr; }
  .card, .card.feature { grid-column: 1 / -1; }
  .section-head { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  @page { margin: 14mm; }
  html[data-theme] {
    color-scheme: light !important;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f3f5f7;
    --text: #111111;
    --muted: #444444;
    --accent: #075d72;
    --accent-2: #574d78;
    --border: #71869a;
    --danger: #922b2b;
    --success: #2f6b46;
    --shadow: none;
  }
  body { background: #ffffff !important; color: #111111 !important; }
  .topbar { position: static; background: #ffffff !important; backdrop-filter: none; }
  .top-actions, .hero-actions, .controls-wrap, .aldenirmed89-cosmos { display: none !important; }
  .card, .notice, .total-football-model, .english-pitch, .mission-mark, .metric, .story, .visual {
    background: #ffffff !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  a { color: #064b5c; text-decoration: underline; }
}
