/* Copyright (c) 2026 Robbe Wulgaert */

:root {
  color-scheme: light;
  --brand: #5200ff;
  --brand-dark: #3700b3;
  --brand-soft: #f7f3ff;
  --accent: #3dffd0;
  --ink: #160033;
  --text: #1d1930;
  --muted: #625a72;
  --line: rgba(82, 0, 255, 0.14);
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --max-width: 1180px;
  --shadow: 0 18px 55px rgba(32, 20, 54, 0.1);
  --font-body: Inter, Roboto, "Segoe UI", Arial, sans-serif;
  --font-size-hero: clamp(2.45rem, 7vw, 5.8rem);
  --font-size-section-title: clamp(1.8rem, 4vw, 3.25rem);
  --font-size-lead: clamp(1.05rem, 2vw, 1.32rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--surface-soft);
  color: var(--text);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(82, 0, 255, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(var(--max-width), calc(100% - 2rem));
  min-height: 4.75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand-link,
.nav-links,
.nav-actions,
.hero-actions,
.cta-actions,
.footer-links {
  display: flex;
  align-items: center;
}

.brand-link {
  min-width: 15rem;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-weight: 900;
}

.brand-subtitle {
  color: #6c657d;
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-links {
  gap: 1rem;
  color: #342a4e;
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links a,
.footer-links a {
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.nav-actions {
  gap: 0.65rem;
}

.btn,
.menu-button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(82, 0, 255, 0.22);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary,
.menu-button {
  border: 1px solid rgba(82, 0, 255, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
}

.btn-small {
  min-height: 2.45rem;
  padding: 0.62rem 0.86rem;
  font-size: 0.9rem;
}

.menu-button {
  display: none;
}

.landing-hero {
  min-height: 640px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(82, 0, 255, 0.1);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 46%, rgba(255, 255, 255, 0.22) 100%),
    url("media/landing_page_photo.jpg");
  background-position: center right;
  background-size: cover;
}

.hero-content {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
}

.hero-content > * {
  max-width: 720px;
}

.landing-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: var(--font-size-hero);
  line-height: 1;
  letter-spacing: 0;
}

.hero-lead {
  margin: 1.3rem 0 0;
  color: #413854;
  font-size: var(--font-size-lead);
  line-height: 1.55;
  font-weight: 650;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.section {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
}

.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title {
  max-width: 860px;
  margin: 0;
  color: var(--ink);
  font-size: var(--font-size-section-title);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-lead {
  max-width: 860px;
  margin: 1rem 0 0;
  color: #4c465d;
  font-size: 1.08rem;
  line-height: 1.7;
}

.steps,
.feature-grid,
.privacy-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.privacy-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.step-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(32, 20, 54, 0.06);
}

.step-number,
.feature-icon {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
}

.card-title {
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 1.12rem;
  letter-spacing: 0;
}

.card-copy {
  margin: 0.55rem 0 0;
  color: #554e63;
  line-height: 1.65;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1.2rem;
  align-items: center;
}

.audience-card {
  max-width: 900px;
}

.photo-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-frame figcaption {
  border-top: 1px solid rgba(82, 0, 255, 0.1);
  padding: 0.85rem 1rem;
  color: #615b70;
  font-size: 0.9rem;
  font-weight: 700;
}

.bullet-list {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  color: #4d465e;
  line-height: 1.75;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  border-radius: 8px;
  padding: 2.25rem;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.cta-band h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.cta-band p {
  max-width: 680px;
  margin: 0.55rem 0 0;
  color: #dfd7ef;
  line-height: 1.6;
}

.cta-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.site-footer {
  margin-top: 2rem;
  background: var(--ink);
  color: #ffffff;
}

.footer-inner {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.footer-title {
  font-weight: 900;
}

.site-footer p {
  margin: 0.5rem 0 0;
  color: #d9d0e8;
  line-height: 1.55;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
  color: #efe9ff;
  font-weight: 800;
}

.app-page {
  background: #f4f6f8;
}

.app-header,
.app-footer {
  background: var(--ink);
  color: #ffffff;
}

/* Delphi-style landing alignment */
:root {
  --brand-dark: #3a00b8;
  --brand-softer: #f7f3ff;
  --accent: #03ddef;
  --line: #e2ddea;
  --surface-soft: #f8f7f3;
  --card-shadow: 0 10px 30px rgba(32, 20, 54, 0.08);
  --font-body: Roboto, Inter, "Segoe UI", Arial, sans-serif;
}

.landing-page {
  background:
    radial-gradient(circle at top left, rgba(82, 0, 255, 0.09), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
}

.site-header {
  border-bottom-color: rgba(226, 221, 234, 0.78);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(var(--max-width), 100%);
  min-height: auto;
  padding: 16px 22px;
  gap: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 24px rgba(82, 0, 255, 0.24);
}

.nav-links {
  gap: 6px;
}

.nav-links a {
  border-radius: 999px;
  padding: 10px 12px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand);
  background: var(--brand-softer);
  outline: none;
}

.btn,
.menu-button {
  min-height: 46px;
  border-radius: 999px;
  padding: 13px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.btn:hover,
.menu-button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  box-shadow: 0 16px 30px rgba(82, 0, 255, 0.23);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
}

.step-card,
.feature-card,
.audience-card,
.privacy-grid .feature-card {
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

.photo-frame,
.cta-band {
  border-radius: 24px;
}

.curriculum-section {
  border-top: 1px solid rgba(82, 0, 255, 0.1);
}

.family-tree {
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--card-shadow);
}

.tree-root {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.tree-node {
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(82, 0, 255, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tree-node strong {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.tree-node span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.tree-node.root {
  width: min(560px, 100%);
  border-color: var(--brand);
  background: var(--brand);
  text-align: center;
}

.tree-node.root strong,
.tree-node.root span {
  color: #ffffff;
}

.tree-node:hover,
.tree-node:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 18px 38px rgba(82, 0, 255, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.tree-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tree-branches::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 2px;
  height: 24px;
  background: var(--brand);
  opacity: 0.32;
}

.tree-branch {
  position: relative;
  border: 1.5px dashed rgba(82, 0, 255, 0.28);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(247, 243, 255, 0.92), rgba(255, 255, 255, 0.94));
}

.tree-branch::before {
  content: "";
  position: absolute;
  top: -17px;
  width: 50%;
  height: 17px;
  border-top: 2px solid rgba(82, 0, 255, 0.32);
}

.tree-branch:first-child::before {
  right: 0;
  border-left: 2px solid rgba(82, 0, 255, 0.32);
  border-radius: 14px 0 0 0;
}

.tree-branch:last-child::before {
  left: 0;
  border-right: 2px solid rgba(82, 0, 255, 0.32);
  border-radius: 0 14px 0 0;
}

.branch-title {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--accent);
  color: #0d2130;
  font-weight: 900;
}

.tree-stack {
  display: grid;
  gap: 12px;
}

.tree-node.current {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(82, 0, 255, 0.08), 0 16px 32px rgba(82, 0, 255, 0.14);
}

.tree-node.dodona {
  background: linear-gradient(135deg, #ffffff, #dffff7);
  border-color: rgba(3, 221, 239, 0.72);
}

.delphi-dodona-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.logic-note {
  margin-top: 18px;
  border-left: 6px solid var(--brand);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .tree-branches,
  .delphi-dodona-pair {
    grid-template-columns: 1fr;
  }

  .tree-branches::before,
  .tree-branch::before {
    display: none;
  }
}

@media (max-width: 560px) {
  .family-tree {
    padding: 16px;
  }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100% - var(--max-width)) / 2));
}

.app-header h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-header .eyebrow {
  color: #d7c7ff;
}

.header-actions,
.toolbar,
.table-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.header-link {
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 850;
}

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.hidden {
  display: none !important;
}

.notice {
  border: 1px solid #ffcf70;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: #fff7df;
  color: #5c3d00;
}

.notice p {
  margin: 0.25rem 0;
}

.workflow-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.workflow-step {
  min-height: 2.7rem;
  display: grid;
  place-items: center;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0.5rem;
  background: #ffffff;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-weight: 850;
}

.workflow-step.is-active {
  border-color: var(--brand);
}

.workflow-step.is-complete {
  background: var(--brand);
  color: #ffffff;
}

.workflow-section {
  scroll-margin-top: 7.5rem;
  margin-top: 1rem;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 1.1rem;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.checklist,
.form-grid,
.control-panel,
.live-layout,
.game-layout {
  display: grid;
  gap: 1rem;
}

.checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0.85rem;
  background: #fbfdff;
  font-weight: 750;
}

.checklist input {
  width: 1.1rem;
  height: 1.1rem;
}

.control-panel,
.live-layout,
.game-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  align-items: stretch;
}

.diagnostics-panel,
.calibration-values,
.game-status,
.game-card {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 1rem;
  background: #f7fafc;
}

.diagnostics-panel h3,
.game-card h3 {
  margin: 0 0 0.5rem;
}

.diagnostics-panel ul {
  margin: 0.6rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.diagnostics-panel small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.calibration-values {
  display: grid;
  gap: 0.55rem;
  align-content: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.68rem 0.75rem;
  background: #ffffff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 2.5rem;
  border: 0;
  border-radius: 8px;
  padding: 0.62rem 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

.primary-button {
  background: var(--brand);
  color: #ffffff;
}

.secondary-button {
  background: #eee7ff;
  color: #2a0068;
}

.ghost-button {
  border: 1px solid #d8e0ea;
  background: #ffffff;
  color: #344154;
}

.hand-panel,
.finger-panel {
  min-width: 0;
}

.connected-fingers-panel {
  margin-bottom: 0.85rem;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0.9rem;
  background: #fbfdff;
}

.connected-fingers-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.connected-fingers-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.connected-fingers-heading p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-toolbar {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.finger-toggle-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.finger-toggle {
  position: relative;
  display: grid;
  gap: 0.2rem;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0.65rem;
  background: #ffffff;
  color: #334154;
  font-weight: 850;
  cursor: pointer;
}

.finger-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.finger-toggle span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.finger-toggle span::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--toggle-color, var(--brand));
  background: #ffffff;
}

.finger-toggle small {
  color: var(--muted);
  font-weight: 780;
}

.finger-toggle:has(input:checked) {
  border-color: var(--toggle-color, var(--brand));
  background: #f5f0ff;
  color: var(--ink);
}

.finger-toggle:has(input:checked) span::before {
  background: var(--toggle-color, var(--brand));
}

.hand-visual {
  position: relative;
  height: clamp(300px, 42vw, 520px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f3f7fb);
}

.hand-skeleton {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.palm-shape {
  fill: var(--ink);
  stroke: rgba(22, 0, 51, 0.2);
  stroke-width: 3;
}

.palm-label {
  fill: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.skeleton-bone {
  fill: none;
  stroke: var(--finger-color);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 7px 12px rgba(22, 0, 51, 0.14));
  transition: points 120ms linear;
}

.skeleton-joint {
  fill: #ffffff;
  stroke: var(--finger-color);
  stroke-width: 4;
}

.skeleton-joint.is-base {
  fill: var(--finger-color);
}

.skeleton-label {
  fill: #334154;
  font-size: 11px;
  font-weight: 850;
  pointer-events: none;
}

.skeleton-finger.is-inactive {
  --finger-color: #94a3b8 !important;
  opacity: 0.32;
}

.finger-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.finger-card {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 0.75rem;
  background: #ffffff;
}

.finger-card.is-inactive {
  background: #f1f5f9;
  color: #64748b;
}

.finger-card > div:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.finger-value {
  overflow-wrap: anywhere;
  text-align: right;
}

.finger-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  margin: 0.65rem 0;
  background: #e8eef6;
}

.finger-fill {
  display: block;
  width: 0;
  height: 100%;
  transition: width 120ms linear;
}

.finger-card small {
  color: var(--muted);
}

.muted-cell {
  color: #64748b;
  font-size: 0.86rem;
}

.finger-card.is-inactive .finger-fill {
  width: 0 !important;
  background: #94a3b8 !important;
}

.finger-card.is-inactive .finger-raw {
  color: #64748b;
}

#finger-chart {
  display: block;
  width: 100%;
  height: clamp(240px, 36vw, 320px);
  min-height: 240px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
}

.table-actions {
  justify-content: flex-end;
  margin: 1rem 0;
}

.report-actions {
  margin: 1rem 0 0;
}

.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(22, 0, 51, 0.72);
}

.report-modal {
  position: relative;
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(82, 0, 255, 0.22);
  border-radius: 8px;
  padding: 1.35rem;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(22, 0, 51, 0.32);
}

.report-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.45rem;
  background: var(--brand);
}

.report-modal h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.55rem;
  letter-spacing: 0;
}

.report-modal label {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  color: #334154;
  font-weight: 780;
}

.report-modal input:focus {
  outline: 3px solid rgba(82, 0, 255, 0.18);
  border-color: var(--brand);
}

.close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: #eee7ff;
  color: #2a0068;
  font-weight: 900;
  cursor: pointer;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 0.7rem;
  border-bottom: 1px solid #d8e0ea;
  text-align: left;
}

th {
  background: #eee7ff;
  color: #2a0068;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.game-card {
  display: grid;
  gap: 0.85rem;
}

.inline-warning {
  margin: 0;
  border: 1px solid #ffcf70;
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
  background: #fff7df;
  color: #5c3d00;
  font-weight: 780;
  line-height: 1.45;
}

.game-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.game-status div {
  border-radius: 8px;
  padding: 0.75rem;
  background: #ffffff;
}

.game-status span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.game-status strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 1.2rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.game-card label {
  display: grid;
  gap: 0.35rem;
  color: #334154;
  font-weight: 780;
}

.app-footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
}

.app-footer p {
  margin: 0;
  color: #efe8ff;
}

@media (max-width: 980px) {
  .nav {
    min-height: auto;
    padding: 0.8rem 0;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 0.3rem;
  }

  .landing-hero {
    min-height: min(640px, calc(100svh - 112px));
    background-image:
      linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0.68) 100%),
      url("media/landing_page_photo.jpg");
  }

  .steps,
  .feature-grid,
  .split,
  .workflow-nav,
  .checklist,
  .control-panel,
  .live-layout,
  .game-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .finger-metrics {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  }

  .finger-toggle-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connected-fingers-heading {
    display: grid;
  }

  .cta-band,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-actions,
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .toolbar,
  .table-actions {
    width: 100%;
  }

  .header-actions > *,
  .toolbar button,
  .table-actions button {
    flex: 1 1 100%;
  }

  .workflow-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-link {
    min-width: 0;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-links {
    display: none;
    padding: 0.5rem 0 0.2rem;
  }

  .nav-links.is-open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .menu-button {
    display: inline-flex;
  }

  .landing-hero {
    min-height: min(540px, calc(100svh - 112px));
  }

  .hero-content {
    padding: 2.5rem 0;
  }

  .landing-hero h1 {
    font-size: clamp(2.15rem, 13vw, 3.1rem);
  }

  .section {
    padding: 3.25rem 0;
  }

  .hand-visual {
    min-height: 330px;
  }

  .hand-skeleton {
    min-height: 330px;
  }

  .finger-metrics {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions {
    width: 100%;
  }
}

/* Platform visual consistency shared with the current landing pages. */
.app-page {
  --brand: #5200ff;
  --brand-dark: #3700b3;
  --brand-softer: #f7f3ff;
  --accent: #3dffd0;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --text: #1d1930;
  --muted: #625b70;
  --line: #e2ddea;
  --font-body: Roboto, Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(82, 0, 255, 0.08), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-body);
}

.app-page .app-header,
.app-page .app-footer {
  background: #160033;
  color: #ffffff;
}

.app-page .primary-button,
.app-page .secondary-button,
.app-page .ghost-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.app-page .primary-button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(82, 0, 255, 0.23);
}

.app-page .primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.app-page .secondary-button,
.app-page .ghost-button {
  border: 1px solid rgba(82, 0, 255, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
}

.app-page .secondary-button:hover,
.app-page .ghost-button:hover {
  background: var(--brand-softer);
  border-color: rgba(82, 0, 255, 0.4);
  transform: translateY(-1px);
}

.app-page .workflow-step {
  border-color: var(--line);
  color: var(--text);
}

.app-page .workflow-step.is-active {
  border-color: var(--brand);
  background: var(--brand-softer);
  color: var(--brand-dark);
}

.app-page .workflow-step.is-complete {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.app-page .workflow-section,
.app-page .checklist label,
.app-page .diagnostics-panel,
.app-page .calibration-values,
.app-page .game-status,
.app-page .game-card,
.app-page .connected-fingers-panel,
.app-page .finger-toggle,
.app-page .metric-card {
  border-color: var(--line);
}

.app-page input:focus,
.app-page select:focus,
.app-page textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(82, 0, 255, 0.12);
  outline: none;
}

@media (max-width: 560px) {
  .app-page .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-page .header-actions > * {
    min-width: 0;
    width: 100%;
  }

  .app-page .primary-button,
  .app-page .secondary-button,
  .app-page .ghost-button {
    width: 100%;
    white-space: normal;
  }
}

/* JS in de Klas platformheader alignment. */
.app-page .app-header {
  background: #fff;
  color: var(--text);
  border-bottom: 1.5px solid #eee;
  box-shadow: none;
  padding: 0.8rem 1.2rem;
}

.app-page .app-header h1 {
  color: var(--text);
}

.app-page .app-header .eyebrow {
  color: var(--brand);
}

.app-page .header-actions {
  gap: 0.6rem;
}

.app-page .primary-button,
.app-page .secondary-button,
.app-page .ghost-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0.7em 1.1em;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(82, 0, 255, 0.08);
}

.app-page .primary-button {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(82, 0, 255, 0.10);
}

.app-page .primary-button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.app-page .secondary-button,
.app-page .ghost-button {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid rgba(82, 0, 255, 0.22);
}

.app-page .workflow-nav {
  gap: 0.65rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.app-page .workflow-step {
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
}

.app-page .workflow-step.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #ece6fa;
}

.app-page .control-panel .toolbar,
.app-page .connected-fingers-heading .toolbar {
  column-gap: 1.05rem;
  row-gap: 0.8rem;
}

@media (max-width: 560px) {
  .app-page .app-header {
    padding: 0.8rem 1.2rem;
  }
}
