/* ==========================================================
   Questswatchpatch — Ice Chrome design system
   ========================================================== */
:root {
  --bg: #0e1013;
  --bg-raised: #15191e;
  --graphite: #1e232a;
  --graphite-2: #2a3038;
  --text: #f4f6f8;
  --muted: #b9c1cc;
  --silver: #cfd6df;
  --ice: #8fdcff;
  --ice-deep: #3fb4ea;
  --crimson: #c8102e;
  --crimson-dark: #8f0a21;
  --crimson-bright: #ff7085;
  --line: rgba(200, 215, 230, 0.18);
  --radius: 14px;
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --max: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(143, 220, 255, 0.07), transparent 60%), radial-gradient(900px 500px at -10% 20%, rgba(200, 16, 46, 0.08), transparent 60%), var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }

/* While holding / charging a shot: block text selection, copy callouts and highlights page-wide */
body.is-shooting,
body.is-shooting * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
body.is-shooting ::selection { background: transparent; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--s3);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p, li, dt, dd, label, td, th, legend, address, a, span, output, button { overflow-wrap: anywhere; }
p { margin: 0 0 var(--s3); }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #ffffff; }
strong { color: #ffffff; }
code { font-family: var(--mono); }

:focus-visible { outline: 3px solid var(--ice); outline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, canvas:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--crimson);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 8px; color: #ffffff; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
.section { padding: var(--s6) 0; }
.eyebrow {
  margin: 0 0 var(--s2);
  color: var(--ice);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-head { max-width: 760px; margin-bottom: var(--s5); }
.section-lead { color: var(--muted); font-size: 1.05rem; }

/* Grid / flex children can shrink */
.header-inner > *, .hero-grid > *, .arena-grid > *, .telemetry-layout > *, .topic-grid > *, .method-grid > *,
.telemetry-grid > *, .session-stats > *, .card-readouts > *, .article-layout > *, .contact-grid > *, .footer-inner > *,
.control-row > *, .segmented > *, .hero-stats > *, .next-grid > *, .cookie-inner > *, .cookie-actions > *, .acc-grid > *,
.hero-actions > *, .field-head > *, .aside-readouts > *, .form-row > * { min-width: 0; }

/* ---------- Glass panel ---------- */
.glass-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 700 0.95rem/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-primary {
  background: linear-gradient(180deg, #d4153a, #b00d28);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--crimson-dark); color: #ffffff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(143, 220, 255, 0.14); color: #ffffff; border-color: rgba(143, 220, 255, 0.5); }
.btn-compact { min-height: 36px; padding: 6px 16px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 40;
  background: linear-gradient(180deg, #15181d, #101216);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  height: 60px;
  margin: 0 auto;
  padding: 0 var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand:hover { color: #ffffff; }
.brand-mark { flex: none; display: block; }
.brand-name { font-size: 1rem; line-height: 1.1; }
.site-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--silver);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-list a:hover { background: rgba(143, 220, 255, 0.12); color: #ffffff; }
.nav-list a[aria-current="page"] { background: rgba(200, 16, 46, 0.35); color: #ffffff; }
.header-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(143, 220, 255, 0.14); color: #ffffff; }
.nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) and (max-width: 1000px) {
  .nav-list a { padding: 8px; font-size: 0.82rem; }
  .brand-name { font-size: 0.92rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: var(--s6) 0; }
.hero-ice-rink-backdrop {
  background: linear-gradient(180deg, rgba(14, 16, 19, 0) 0%, rgba(14, 16, 19, 0.9) 100%), radial-gradient(800px 400px at 70% 40%, rgba(143, 220, 255, 0.12), transparent 70%);
  color: var(--text);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s5); align-items: center; }
.hero-lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s4) 0 var(--s5); }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 12px; margin: 0; }
.stat-value { margin: 0; font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: #ffffff; line-height: 1.1; }
.stat-label { margin: 0; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-visual { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.hero-ice-canvas { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #0b0d10; color: var(--text); }
.hero-visual-caption { margin: 0; padding: 0 var(--s2); color: var(--muted); font-size: 0.82rem; }

/* ---------- Arena ---------- */
.arena-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.rink-panel { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.rink-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: #0a0c0f;
  color: var(--text);
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
}
.game-status {
  margin: 0;
  padding: var(--s3);
  border-radius: 10px;
  background: rgba(143, 220, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(143, 220, 255, 0.25);
  font-size: 0.95rem;
}
.how-to { margin: 0; padding: 0 var(--s3) 0 var(--s5); color: var(--muted); font-size: 0.9rem; display: grid; gap: var(--s2); }
.control-panel { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); -webkit-tap-highlight-color: transparent; }
.control-group { display: flex; flex-direction: column; gap: 12px; }
.control-title { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--silver); }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.seg-btn {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 600 0.9rem/1.2 var(--font);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.seg-btn:hover { background: rgba(143, 220, 255, 0.14); color: #ffffff; }
.seg-btn.is-active { background: linear-gradient(180deg, #d4153a, #a50d26); color: #ffffff; border-color: rgba(255, 255, 255, 0.3); }
.control-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.form-field { display: flex; flex-direction: column; gap: var(--s2); }
.form-field label, .field-head span { font-size: 0.85rem; font-weight: 600; color: var(--silver); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.field-head output { font-family: var(--mono); color: #ffffff; font-weight: 700; }
select, input[type="text"], input[type="email"], textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d10;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
select:hover, input[type="text"]:hover, input[type="email"]:hover, textarea:hover { border-color: rgba(143, 220, 255, 0.45); background: #0b0d10; color: var(--text); }
textarea { min-height: 150px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--crimson); min-height: 32px; background: transparent; color: var(--text); }
.power-meter {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0d10;
  color: var(--crimson);
  overflow: hidden;
}
.power-meter::-webkit-progress-bar { background: #0b0d10; border-radius: 999px; }
.power-meter::-webkit-progress-value { background: linear-gradient(90deg, var(--ice), #ffffff 55%, var(--crimson)); border-radius: 999px; }
.power-meter::-moz-progress-bar { background: linear-gradient(90deg, var(--ice), #ffffff 55%, var(--crimson)); border-radius: 999px; }
.shoot-btn { min-height: 56px; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; touch-action: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.shoot-btn.is-charging { background: linear-gradient(180deg, #ffffff, #dfe7ee); color: #8f0a21; border-color: var(--crimson); box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.35), 0 0 30px rgba(143, 220, 255, 0.35); }

.telemetry-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--s4); margin-top: var(--s4); align-items: start; }
.telemetry-panel, .accuracy-panel, .log-panel { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.panel-title { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: #ffffff; }
.panel-note { margin: 0; color: var(--muted); font-size: 0.88rem; }
.telemetry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--s3); margin: 0; }
.tel-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--s3);
  border-radius: 10px;
  background: rgba(8, 10, 13, 0.55);
  color: var(--text);
  border: 1px solid var(--line);
}
.tel-item dt { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.tel-item dd { margin: 0; font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: #ffffff; line-height: 1.25; }
.tel-result { padding: 4px 8px; border-radius: 6px; align-self: flex-start; background: rgba(255, 255, 255, 0.06); color: #ffffff; }
.tel-result.result-goal { background: var(--crimson); color: #ffffff; }
.tel-result.result-saved { background: #1f5f82; color: #ffffff; }
.tel-result.result-post { background: #d7dde4; color: #14171b; }
.tel-result.result-miss { background: #3a4049; color: #ffffff; }

.acc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); padding: var(--s2); border: 3px solid var(--crimson); border-bottom: 0; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 6px, transparent 6px 12px); color: var(--text); }
.acc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 72px;
  padding: var(--s3) var(--s2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  text-align: center;
  transition: background-color 0.3s ease;
}
.acc-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.acc-count { font-family: var(--mono); font-weight: 700; font-size: 1rem; }
.acc-cell.heat-1 { background: rgba(143, 220, 255, 0.14); color: #ffffff; }
.acc-cell.heat-2 { background: rgba(143, 220, 255, 0.3); color: #ffffff; }
.acc-cell.heat-3 { background: rgba(200, 16, 46, 0.7); color: #ffffff; }
.acc-cell.heat-1 .acc-label, .acc-cell.heat-2 .acc-label, .acc-cell.heat-3 .acc-label { color: #ffffff; }
.session-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); margin: 0; }
.session-stats .stat-value { font-size: 1.1rem; }

.shot-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); max-height: 420px; overflow-y: auto; }
.shot-log li {
  padding: 12px var(--s3);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.55);
  color: var(--text);
  border-left: 3px solid var(--line);
  font-size: 0.88rem;
  font-family: var(--mono);
}
.shot-log .log-goal { border-left-color: var(--crimson); }
.shot-log .log-saved { border-left-color: var(--ice); }
.shot-log .log-post { border-left-color: var(--silver); }
.shot-log .log-miss { border-left-color: #6b7380; }
.shot-log .shot-log-empty { font-family: var(--font); color: var(--muted); }

/* ---------- Topic cards ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); }
.data-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-top: 3px solid var(--crimson);
  background: linear-gradient(160deg, rgba(143, 220, 255, 0.08), rgba(255, 255, 255, 0.02) 45%, rgba(200, 16, 46, 0.05));
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.data-card:hover { transform: translateY(-3px); border-color: rgba(143, 220, 255, 0.45); }
.data-card p { margin: 0; color: var(--muted); }
.card-tag { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.data-card .card-tag { color: var(--ice); }
.card-title { margin: 0; font-size: 1.25rem; }
.card-readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.readout {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  padding: var(--s3);
  border-radius: 10px;
  background: rgba(8, 10, 13, 0.6);
  color: var(--text);
  border: 1px solid var(--line);
}
.readout-value { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: #ffffff; }
.readout-label { margin: 0; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1); max-width: 120px; padding: var(--s1); border: 2px solid var(--crimson); border-bottom: 0; }
.mini-cell { display: block; height: 18px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.mini-cell.is-lit { background: linear-gradient(135deg, var(--ice), #ffffff); color: #0e1013; box-shadow: 0 0 10px rgba(143, 220, 255, 0.6); }
.card-link { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--ice); }
.card-link:hover { color: #ffffff; text-decoration: underline; }

/* ---------- Method ---------- */
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.method-step { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.method-step h3, .method-step p { margin: 0; }
.method-step p { color: var(--muted); }
.step-index { font-family: var(--mono); font-size: 1.6rem; font-weight: 800; }
.method-step .step-index { color: var(--crimson-bright); }
.formula {
  margin: 0;
  padding: var(--s3) 20px;
  border-radius: 8px;
  border-left: 3px solid var(--crimson);
  background: #090b0e;
  color: #e6f6ff;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
}
.formula code { background: transparent; color: #e6f6ff; }

/* ---------- Article pages ---------- */
.page-hero {
  padding: var(--s6) 0 var(--s5);
  background: linear-gradient(180deg, rgba(143, 220, 255, 0.08), transparent), linear-gradient(90deg, rgba(200, 16, 46, 0.12), transparent 60%);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-lead { margin-bottom: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0 0 var(--s4); padding: 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s2); color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: var(--s5); align-items: start; }
.prose { max-width: 75ch; }
.prose h2 { margin-top: var(--s5); font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s4); }
.prose p, .prose li { color: #dde3ea; }
.prose ul, .prose ol { padding-left: var(--s4); margin: 0 0 var(--s3); display: grid; gap: var(--s2); }
.prose .formula { margin: var(--s4) 0; }
.aside-panel { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.aside-panel h2 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.aside-panel p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.aside-readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.table-scroll { overflow-x: auto; margin: var(--s4) 0; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
caption { padding: var(--s3); text-align: left; color: var(--muted); font-size: 0.85rem; }
th, td { padding: 12px var(--s3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: rgba(143, 220, 255, 0.08); color: #ffffff; font-weight: 700; }
td { color: #dde3ea; }
tbody tr:last-child td { border-bottom: 0; }
.next-section { padding-bottom: var(--s6); }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s4); }
.next-card { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); text-decoration: none; color: var(--text); }
.next-card:hover { border-color: rgba(143, 220, 255, 0.5); color: #ffffff; }
.next-card span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ice); }
.next-card strong { font-size: 1.1rem; }
.callout {
  margin: var(--s4) 0;
  padding: var(--s4);
  border-radius: 10px;
  border: 1px solid rgba(200, 16, 46, 0.45);
  background: rgba(200, 16, 46, 0.1);
  color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Legal ---------- */
.legal-body section { margin-bottom: var(--s5); }
.legal-meta { color: var(--muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.contact-form { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.field-error { margin: 0; color: #ff9aa9; font-size: 0.875rem; }
.is-invalid, select.is-invalid, input.is-invalid, textarea.is-invalid { border-color: #ff7085; box-shadow: 0 0 0 3px rgba(255, 112, 133, 0.25); }
input[type="checkbox"].is-invalid { outline: 2px solid #ff7085; outline-offset: 2px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; font-size: 0.92rem; color: var(--text); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--crimson); flex: none; }
.form-success {
  margin: 0;
  padding: var(--s3);
  border-radius: 10px;
  background: rgba(143, 220, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(143, 220, 255, 0.45);
}
.contact-info { display: flex; flex-direction: column; gap: var(--s4); }
.info-card { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.info-card h2 { margin: 0; font-size: 1.1rem; }
.info-card p, .info-card address { margin: 0; color: #dde3ea; font-style: normal; }
.map-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #161b22, #0d1014);
  color: var(--text);
}
.map-svg { display: block; width: 100%; height: auto; }
.map-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  max-width: 260px;
  padding: 12px var(--s3);
  border-radius: 10px;
  background: rgba(10, 12, 15, 0.9);
  color: #ffffff;
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line); background: #0a0c0f; color: var(--text); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s5); padding-bottom: var(--s5); }
.footer-brand { display: flex; flex-direction: column; gap: var(--s3); }
.footer-text { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--silver); margin-bottom: var(--s3); }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.footer-list a { color: #dde3ea; text-decoration: none; font-size: 0.92rem; }
.footer-list a:hover { color: #ffffff; text-decoration: underline; }
.footer-address { font-style: normal; color: #dde3ea; font-size: 0.92rem; line-height: 1.7; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); padding-top: var(--s4); padding-bottom: var(--s5); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.footer-base p { margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 980px;
  margin: 0 auto;
  padding: var(--s4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.97);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.cookie-copy { flex: 1 1 16rem; }
.cookie-title { font-size: 1.05rem; margin-bottom: var(--s2); }
.cookie-copy p { margin: 0; color: #dde3ea; font-size: 0.9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cookie-prefs { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.cookie-fieldset { margin: 0; padding: var(--s3); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); }
.cookie-fieldset legend { padding: 0 var(--s2); font-size: 0.85rem; color: var(--silver); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .telemetry-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .telemetry-panel { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-grid, .arena-grid, .article-layout, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .method-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .header-inner { height: 50px; padding: 0 var(--s3); gap: var(--s2); }
  .brand-mark { width: 28px; height: 28px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--s3);
    background: #13161b;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: var(--s1); }
  .nav-list a { padding: 12px var(--s3); font-size: 1rem; }
  .telemetry-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .rink-canvas { aspect-ratio: 4 / 3; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .control-row { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .cookie-actions .btn { flex: 1 1 100%; }
}
@media (max-width: 399px) {
  .container { padding: 0 var(--s3); }
  .header-inner { padding: 0 12px; }
  .brand-name { font-size: 0.84rem; }
  .btn-compact { padding: 6px 12px; }
  .nav-toggle { width: 40px; padding: 0 10px; }
  .glass-panel.control-panel, .telemetry-panel, .accuracy-panel, .log-panel, .data-card, .aside-panel, .contact-form, .info-card, .method-step { padding: var(--s3); }
  .segmented { grid-template-columns: minmax(0, 1fr); }
  .card-readouts, .aside-readouts, .session-stats { grid-template-columns: minmax(0, 1fr); }
  .acc-cell { padding: var(--s3) var(--s1); min-height: 64px; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: var(--s3); }
  h1 { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}