:root {
  --bg: #eef5f3;
  --bg-mint: #e7f2ef;
  --bg-elevated: #ffffff;
  --ink: #15202b;
  --muted: #6b7c85;
  --line: #d7e4df;
  --line-strong: #c2d4cd;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-soft: #ddf3ef;
  --accent-ink: #115e59;
  --danger: #e11d48;
  --warn: #d97706;
  --ok: #059669;
  --boy: #5b9fd4;
  --girl: #e08aa8;
  --shadow-sm: 0 1px 2px rgba(21, 32, 43, 0.04);
  --shadow: 0 8px 24px rgba(21, 32, 43, 0.07);
  --shadow-lg: 0 20px 50px rgba(21, 32, 43, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --nav-h: 64px;
  --av-1: #7dc4b8;
  --av-2: #7eb6e0;
  --av-3: #a78bda;
  --av-4: #f0a07a;
  --av-5: #e6c35c;
  --av-6: #e891b0;
  --av-7: #5eb8b0;
  --av-8: #b8a4e0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: .7rem 1.15rem;
  font-weight: 700;
  font-size: .92rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn.is-loading { opacity: .7; cursor: wait; transform: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: var(--ink);
  color: #fff;
}
.btn-secondary:hover { background: #1e293b; color: #fff; }
.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
}
.btn-ghost:hover { border-color: var(--line-strong); background: #fafafa; color: var(--ink); }
.btn-ghost-light {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: var(--radius-pill);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-lg { padding: .9rem 1.35rem; font-size: 1rem; }
.btn-xs { padding: .3rem .6rem; font-size: .78rem; border-radius: 8px; }
.btn-spinner, .load-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-ghost .btn-spinner { border-color: rgba(15,23,42,.15); border-top-color: var(--ink); }

/* Loading overlay */
.load-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.42);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  animation: fade .15s ease;
}
.load-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
}
.load-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  flex-shrink: 0;
}
.load-copy { display: flex; flex-direction: column; gap: .15rem; }
.load-copy strong { font-family: var(--display); font-size: 1.05rem; }
.load-copy span { color: var(--muted); font-size: .88rem; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1100;
  background: var(--ink);
  color: #fff;
  padding: .8rem 1.05rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: .2s ease;
  max-width: min(360px, calc(100vw - 2rem));
  font-weight: 600;
  font-size: .92rem;
}
.toast.in { opacity: 1; transform: none; }
.toast-ok { background: #134e4a; }
.toast-error { background: #9f1239; }

/* Marketing nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 245, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.marketing .site-nav {
  position: absolute;
  left: 0; right: 0; top: 0;
  background: transparent;
  border: none;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.brand > i { color: var(--accent); font-size: .95em; }
.brand span { color: var(--accent); }
.marketing .site-nav .brand,
.marketing .nav-links a { color: rgba(255, 255, 255, 0.88); }
.marketing .site-nav .brand span { color: #5eead4; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
}
.nav-links a.is-active { color: var(--accent); }
.marketing .nav-links a.is-active {
  color: #fff;
  background: rgba(94, 234, 212, 0.22);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.55);
  padding: .35rem .7rem;
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: .45rem .9rem;
  font-weight: 700;
}

/* Hero */
.hero-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 6vw 4rem;
  color: #fff;
  overflow: hidden;
}
.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 85% 15%, rgba(20, 184, 166, 0.28), transparent 55%),
    radial-gradient(700px 400px at 10% 80%, rgba(14, 165, 233, 0.18), transparent 50%),
    linear-gradient(145deg, #0b1220 0%, #111827 45%, #134e4a 100%);
  z-index: 0;
}
.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 2.5rem 3rem;
  align-items: center;
}
.made-in {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #99f6e4;
  margin: 0 0 .85rem;
}
.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: .95;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
  max-width: 10ch;
  color: #fff;
}
.hero-copy h1 span { color: #5eead4; }
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.78);
  max-width: 36ch;
  margin: 0 0 1.4rem;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.1rem;
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  font-weight: 600;
}
.hero-points i { color: #5eead4; margin-right: .35rem; }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-product {
  position: relative;
  width: 100%;
  max-width: 560px;
  border-radius: 22px;
  overflow: hidden;
  background: #e8f0ef;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255,255,255,.06);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .35s ease;
}
.hero-product:hover {
  transform: perspective(1200px) rotateY(-1deg) rotateX(0deg);
}
.hero-product img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-product-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-pill);
  padding: .45rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.hero-product-badge i { color: #5eead4; }

/* Legacy stage styles kept for any remaining demos */
.stage-board {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: .65rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: .7rem;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.stage-rail { display: flex; flex-direction: column; gap: .5rem; }
.stage-btn {
  background: var(--accent-hover);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: .6rem;
  text-align: center;
  font-size: .85rem;
}
.stage-metric {
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: .5rem .6rem;
  font-size: .72rem;
}
.stage-metric span { display: block; opacity: .75; }
.stage-metric b { font-size: .92rem; }
.stage-metric i {
  display: block;
  height: 5px;
  margin-top: .35rem;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
}
.stage-metric i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  background: #2dd4bf;
  border-radius: inherit;
}
.stage-metric.warn i::after { background: #fbbf24; }
.stage-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.stage-col {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: .65rem;
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--d);
  box-shadow: var(--shadow-sm);
}
.stage-col header { font-weight: 800; font-size: .8rem; margin-bottom: .4rem; }
.stage-chip {
  border-radius: 8px;
  padding: .32rem .4rem;
  margin-bottom: .28rem;
  font-size: .74rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.stage-chip.boy { border-left: 3px solid var(--boy); }
.stage-chip.girl { border-left: 3px solid var(--girl); }

.reveal { opacity: 0; transform: translateY(14px); transition: .65s ease; }
.reveal.in { opacity: 1; transform: none; }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }
.delay-4 { transition-delay: .36s; }

/* Sections */
.section { padding: 5rem 6vw; }
.section-head { max-width: 620px; margin-bottom: 2rem; }
.section-head h2, .page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  letter-spacing: -0.035em;
  margin: 0 0 .55rem;
  color: var(--ink);
}
.section-head p, .page-hero > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.section-head.light h2 { color: #fff; }
.section-head.light p { color: rgba(255,255,255,.72); }

.band { background: #fff; border-block: 1px solid var(--line); }
.band-dark {
  background: linear-gradient(145deg, #0b1220, #134e4a);
  color: #fff;
}

.mod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.mod-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mod-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #cfe8e4;
}
.mod-icon, .feat-icon, .cap-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .85rem;
  font-size: 1.05rem;
}
.band-dark .cap-icon {
  background: rgba(45, 212, 191, 0.14);
  color: #5eead4;
}
.mod-card h3 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.mod-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.split-feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
}
.split-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
  margin: 0 0 .7rem;
}
.split-copy > p { color: var(--muted); margin: 0 0 1.1rem; max-width: 42ch; }
.check-list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  color: var(--ink);
}
.check-list i { color: var(--accent); }
.split-media {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}
.split-media img { width: 100%; height: auto; display: block; }

.visual-steps .step-media {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: .9rem;
  aspect-ratio: 10 / 7;
  background: #f1f5f9;
  border: 1px solid var(--line);
}
.visual-steps .step-media img { width: 100%; height: 100%; object-fit: cover; }
.step-media-icon {
  display: grid !important;
  place-items: center;
  font-size: 2.2rem;
  color: var(--accent);
  background: var(--accent-soft) !important;
}
.cta-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: .6rem;
  display: inline-block;
}
.band-dark .mod-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}
.band-dark .mod-card p { color: rgba(255,255,255,.72); }
.band-dark .mod-card h3 { color: #fff; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.step .n {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: .35rem;
}
.step h3 { margin: 0 0 .35rem; font-family: var(--display); }
.step p { margin: 0; color: var(--muted); }

.feature-showcase, .feature-rail, .capability-grid, .pain-row, .contact-grid {
  display: grid;
  gap: 1rem;
}
.feature-showcase { grid-template-columns: repeat(3, 1fr); }
.feature-rail, .capability-grid { grid-template-columns: repeat(2, 1fr); }
.pain-row, .contact-grid { grid-template-columns: repeat(3, 1fr); }
.feature-showcase article,
.feature-rail article,
.capability-grid article,
.pain-row article,
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.band-dark .capability-grid article {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
.feature-showcase h3, .feature-rail h3, .capability-grid h3, .pain-row h3, .contact-card h3 {
  margin: 0 0 .35rem;
  font-family: var(--display);
  font-size: 1.05rem;
}
.feature-showcase p, .feature-rail p, .capability-grid p, .pain-row p, .contact-card p {
  margin: 0;
  color: var(--muted);
}
.band-dark .capability-grid h3 { color: #fff; }
.band-dark .capability-grid p { color: rgba(255,255,255,.72); }

.cta-band { padding-top: 2rem; }
.cta-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-card h2 {
  font-family: var(--display);
  margin: 0 0 .5rem;
  letter-spacing: -0.03em;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.cta-card p { color: var(--muted); margin: 0 0 1.2rem; }

.page-hero {
  padding: 8rem 6vw 3rem;
  background: linear-gradient(160deg, #0b1220, #134e4a 80%);
  color: #fff;
}
.page-hero h1 {
  color: #fff;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
  margin: 0 0 .75rem;
  line-height: 1.05;
}
.page-hero .made-in { color: #99f6e4; }
.page-hero > p { color: rgba(255,255,255,.75); max-width: 52ch; margin: 0; font-size: 1.08rem; }
.how-page .page-hero .hero-cta .btn-ghost-light { color: #fff; }

.how-overview .section-head { margin-bottom: 2rem; }
.how-path {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}
.how-path article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.how-path-n {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #c5ddd7;
}
.how-path-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .85rem;
}
.how-path h3 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-size: 1.2rem;
}
.how-path p { margin: 0; color: var(--muted); font-size: .95rem; }
.how-path-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.1rem;
  opacity: .7;
}

.how-step-block { padding-block: 4.5rem; }
.how-step-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
}
.how-step-grid.reverse { direction: rtl; }
.how-step-grid.reverse > * { direction: ltr; }
.how-step-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 .7rem;
}
.how-step-copy > p { color: var(--muted); margin: 0 0 1.1rem; max-width: 42ch; }
.step-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: .15rem .55rem;
  margin-right: .35rem;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.how-step-media {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}
.how-step-media img { width: 100%; height: auto; display: block; }
.how-demo-cred {
  margin: 1.1rem 0 0;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: .88rem;
  font-weight: 600;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.role-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.role-card h3 {
  margin: 0 0 .7rem;
  font-family: var(--display);
  color: #fff;
}
.role-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.role-card li {
  color: rgba(255,255,255,.78);
  font-size: .92rem;
  padding-left: 1.1rem;
  position: relative;
}
.role-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: #5eead4;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
}
.glossary-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.glossary-grid h3 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.glossary-grid h3 i { color: var(--accent); font-size: .9rem; }
.glossary-grid p { margin: 0; color: var(--muted); font-size: .92rem; }

.muted { color: var(--muted); }

@media (max-width: 960px) {
  .how-path { grid-template-columns: 1fr; }
  .how-path-arrow { transform: rotate(90deg); padding: .2rem 0; }
  .how-step-grid, .how-step-grid.reverse { grid-template-columns: 1fr; direction: ltr; }
  .role-grid, .glossary-grid { grid-template-columns: 1fr; }
}

.site-footer.deluxe {
  background: #0b1220;
  color: rgba(255,255,255,.7);
  padding: 3rem 6vw 1.4rem;
  margin-top: auto;
}
.site-footer.deluxe .brand { color: #fff; margin-bottom: .45rem; }
.site-footer.deluxe .brand span { color: #5eead4; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { color: #fff; margin: 0 0 .55rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid a, .footer-grid span { display: block; color: rgba(255,255,255,.68); margin-bottom: .35rem; font-size: .92rem; }
.footer-grid a:hover { color: #5eead4; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  font-size: .85rem;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(700px 380px at 10% 90%, rgba(14, 165, 233, 0.12), transparent 50%),
    linear-gradient(160deg, #eef2f6 0%, #f3f5f7 45%, #e8f5f3 100%);
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}
.auth-card-wide { width: min(480px, 100%); }
.teacher-actions { display: inline-flex; gap: .35rem; align-items: center; }
.teacher-invite-list li { align-items: flex-start; }
.setup-hint { margin-top: .85rem; font-size: .9rem; }
.invite-result-card {
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f0fdfa, #fff);
}
.invite-result-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; }
.auth-card .brand { display: inline-block; margin-bottom: .8rem; }
.auth-card h1 {
  font-family: var(--display);
  margin: 0 0 .25rem;
  letter-spacing: -0.03em;
  font-size: 1.8rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: .85rem; }
.field input, .field select, .field textarea,
.inline-form input, .inline-form select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .75rem .85rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus,
.inline-form input:focus, .inline-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.error {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: .65rem .8rem;
  font-size: .9rem;
  margin-bottom: .9rem;
}
.hint { color: var(--muted); font-size: .85rem; margin-top: 1rem; }

/* App chrome */
.app-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-nav .brand { color: var(--ink); font-size: 1.2rem; }
.app-nav .brand span { color: var(--accent); }
.app-nav .brand > i { color: var(--accent); }
.app-nav-right {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-wrap: wrap;
}
.app-nav a, .app-nav button.linkish {
  color: var(--muted);
  background: none;
  border: none;
  font-weight: 600;
  font-size: .9rem;
  padding: .45rem .75rem;
  border-radius: 10px;
}
.app-nav a:hover, .app-nav button.linkish:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.app-nav a.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.app-nav .nav-meta {
  color: var(--muted);
  font-size: .8rem;
  margin-left: .4rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-main {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg);
}

/* Pages */
.page { padding: 1.4rem 1.5rem 2.5rem; width: 100%; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -0.03em;
  font-size: 1.85rem;
}
.eyebrow {
  margin: 0 0 .3rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede { color: var(--muted); margin: .35rem 0 0; max-width: 54ch; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .75rem;
  margin: 1.25rem 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: .15s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem .75rem;
  align-items: center;
}
.stat:hover {
  border-color: #b7e4de;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
}
.stat strong {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.stat span {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}
.stat .stat-icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1rem;
}

.dash-panels, .setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Setup submenu */
.setup-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  align-items: start;
  min-height: 520px;
}
.setup-nav {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem;
  box-shadow: var(--shadow-sm);
}
.setup-nav-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: .65rem;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: .7rem .65rem;
  color: var(--ink);
  transition: .15s ease;
}
.setup-nav-item:hover { background: #f8fafc; }
.setup-nav-item.is-active {
  background: var(--accent-soft);
  border-color: #b7e4de;
}
.setup-nav-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--muted);
}
.setup-nav-item.is-active .setup-nav-icon {
  background: var(--accent);
  color: #fff;
}
.setup-nav-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.setup-nav-text strong { font-size: .92rem; }
.setup-nav-text small {
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setup-nav-count {
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.setup-nav-item.is-active .setup-nav-count {
  background: #fff;
  color: var(--accent-ink);
}
.setup-nav-tip {
  margin-top: .5rem;
  padding: .75rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: .8rem;
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}
.setup-nav-tip i { color: var(--warn); margin-top: .15rem; }
.setup-nav-tip p { margin: 0; line-height: 1.4; }
.setup-content { min-width: 0; }
.setup-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  animation: rise .25s ease;
}
.setup-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.setup-panel-head h2 {
  margin: 0 0 .3rem;
  font-family: var(--display);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.setup-panel-head h2 i { color: var(--accent); font-size: .95rem; }
.setup-panel-head p { margin: 0; color: var(--muted); }
.setup-list li {
  padding: .75rem 0;
}
.setup-list li span {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.setup-list .meta-line {
  font-style: normal;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}
.req-list .req-arrow {
  display: inline-block;
  margin: 0 .35rem;
  color: var(--muted);
  font-weight: 700;
}
.pri-pill {
  display: inline-block;
  font-style: normal;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .45rem;
  border-radius: 999px;
  margin-right: .35rem;
}
.pri-mandatory { background: #fee2e2; color: #b91c1c; }
.pri-important { background: #ffedd5; color: #c2410c; }
.pri-normal { background: #e2e8f0; color: #475569; }
.stacked-form {
  flex-direction: column;
  align-items: stretch;
  margin-top: 1rem;
}
.stacked-form .btn { align-self: flex-start; }
.pending-req-row {
  flex-wrap: wrap;
  gap: .75rem 1rem;
}
.pending-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.pending-actions select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .35rem .5rem;
  background: #fff;
  font-size: .85rem;
}
.pending-nudge {
  color: var(--warn, #c2410c);
  font-weight: 700;
}
.tag.status-pending {
  outline: 1px dashed currentColor;
  opacity: .9;
}

.req-manage-panel .setup-panel-head {
  align-items: flex-start;
}
.req-result-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #f1f5f9;
}
.req-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin: 0 0 1rem;
}
.req-toolbar-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.req-toolbar-search i {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
}
.req-toolbar-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem .65rem 2.2rem;
  background: #fff;
}
.req-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.req-toolbar-filters select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  background: #fff;
  font-size: .88rem;
}
.req-table-wrap { margin-top: 0; }
.req-table { width: 100%; border-collapse: collapse; }
.req-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.req-table td {
  padding: .65rem .7rem;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
  font-size: .92rem;
}
.req-table tr:hover td { background: #f8fafc; }
.req-pair-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .45rem;
}
.req-sep, .req-sep-cell {
  color: var(--muted);
  font-weight: 700;
}
.req-sep-cell { width: 2rem; text-align: center; }
.notes-cell {
  color: var(--muted);
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col-actions { width: 1%; white-space: nowrap; }
.row-actions {
  display: inline-flex;
  gap: .3rem;
  align-items: center;
  justify-content: flex-end;
}
.row-actions select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .3rem .45rem;
  background: #fff;
  font-size: .8rem;
}
.pri-select {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  cursor: pointer;
}
.pri-select.pri-mandatory { background: #fee2e2; color: #b91c1c; }
.pri-select.pri-important { background: #ffedd5; color: #c2410c; }
.pri-select.pri-normal { background: #e2e8f0; color: #475569; }
.empty-row { text-align: center; padding: 1.4rem .7rem !important; }
.btn-sm { padding: .55rem .85rem; font-size: .88rem; }

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: cookie-in .28s ease;
}
.cookie-banner.is-leaving {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.cookie-banner-inner {
  pointer-events: auto;
  width: min(860px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
}
.cookie-banner-copy {
  flex: 1 1 280px;
  min-width: 0;
}
.cookie-banner-copy strong {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  font-size: .95rem;
}
.cookie-banner-copy p {
  margin: .35rem 0 0;
  font-size: .88rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.cookie-banner-copy a {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.cookie-btn-secondary {
  background: transparent !important;
  border: 1px solid rgba(226, 232, 240, 0.55) !important;
  color: #fff !important;
  border-radius: var(--radius-sm);
}
.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-color: #fff !important;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.legal-page {
  display: grid;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}
.legal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, .04));
}
.legal-card h2 {
  margin: 0 0 .65rem;
  font-size: 1.15rem;
}
.legal-card p { margin: 0 0 .75rem; color: var(--text); line-height: 1.55; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card code {
  font-size: .82rem;
  background: #f1f5f9;
  padding: .1rem .35rem;
  border-radius: 6px;
}

.setup-form {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.app-nav a i, .app-nav button.linkish i { margin-right: .3rem; font-size: .85em; }
.year-switch select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .4rem .55rem;
  background: #fff;
  font-weight: 600;
  font-size: .82rem;
  color: var(--ink);
  max-width: 180px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
}
.survey-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .85rem .9rem;
  box-shadow: var(--shadow-sm);
  transition: .15s ease;
  color: inherit;
}
.survey-card:hover {
  border-color: #b7e4de;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.survey-card.is-done { border-color: #b7e4de; background: #f6fbfa; }
.survey-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.survey-card-body strong { font-size: .95rem; }
.survey-card-body small { color: var(--muted); font-size: .78rem; }
.survey-status {
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.survey-card.is-done .survey-status { color: var(--ok); }

.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .85rem;
}
.list-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.list-card.is-current { border-color: #b7e4de; box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.list-card-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.list-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
}
.pill {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
}
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.list-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .85rem;
}
.tag-x {
  border: none;
  background: none;
  color: inherit;
  font-weight: 800;
  margin-left: .25rem;
  cursor: pointer;
  padding: 0 .15rem;
}
.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.panel-card.wide { grid-column: 1 / -1; }
.panel-card h2, .panel-head h2 {
  font-family: var(--display);
  margin: 0 0 .8rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  counter-reset: path;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  counter-increment: path;
}
.checklist li::before {
  content: counter(path);
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 800;
  background: #e2e8f0;
  color: var(--muted);
  flex-shrink: 0;
}
.checklist li.done {
  background: var(--accent-soft);
  border-color: #b7e4de;
}
.checklist li.done::before {
  content: "✓";
  background: var(--accent);
  color: #fff;
}
.checklist li a { color: var(--ink); font-weight: 600; }
.checklist li.done a { color: var(--accent-ink); }
.tips { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.tips li {
  margin-bottom: .55rem;
  padding: .65rem .8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: .92rem;
}
.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.inline-form.stacked { flex-direction: column; }
.inline-form input, .inline-form select { min-width: 120px; flex: 1; }

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
.table-wrap.compact { box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
th {
  background: var(--bg-mint);
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: sticky;
  top: 0;
}
tr:hover td { background: #f4faf8; }
tr.clickable { cursor: pointer; }

.tag {
  display: inline-block;
  background: #f1f5f9;
  border-radius: 6px;
  padding: .15rem .4rem;
  margin: .15rem .2rem .15rem 0;
  font-size: .78rem;
  font-weight: 700;
}
.tag.pair { color: var(--accent-ink); background: var(--accent-soft); }
.tag.separate { color: #9f1239; background: #fff1f2; }
.tag.friend { color: #047857; background: #ecfdf5; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1rem;
  animation: fade .15s ease;
}
.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
}
.modal.student-card-modal { background: #f7fbfa; }
.modal h2 {
  margin: 0 0 .2rem;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.modal .sub { color: var(--muted); margin-bottom: 1rem; font-size: .9rem; }
.modal-profile {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #eef4f2;
  border-radius: 14px;
  padding: .75rem .9rem;
  margin-bottom: 1rem;
}
.modal-profile .avatar { width: 2.4rem; height: 2.4rem; font-size: 1rem; }
.modal-profile strong { display: block; font-size: 1rem; }
.modal-profile span { color: var(--muted); font-size: .82rem; }
.modal-section-title {
  margin: 1.1rem 0 .55rem;
  font-size: .95rem;
  font-family: var(--display);
  letter-spacing: -0.01em;
}
.req-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: .5rem;
}
.req-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .65rem .75rem;
}
.req-box label {
  display: block;
  font-size: .75rem;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.import-sample-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f0fdfa, #fff);
}
.import-sample-box strong { display: block; margin-bottom: .25rem; }
.import-sample-box p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  max-width: 28rem;
  line-height: 1.4;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

/* Board — matches product mockups */
.solve-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg);
}
.control-panel {
  background: var(--bg-mint);
  border-right: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  overflow: auto;
}
.panel-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .15rem;
}
.overview-cards {
  display: grid;
  gap: .5rem;
}
.overview-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .75rem .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.overview-card span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}
.overview-card strong {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.overview-card strong.is-ok { color: var(--accent-ink); }
.overview-card i {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.panel-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.move-help {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .7rem .8rem;
  box-shadow: var(--shadow-sm);
}
.metric-top {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.bar {
  height: 7px;
  background: #e2ece9;
  border-radius: 99px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ok);
  transition: width .35s ease;
}
.bar.orange > i { background: var(--warn); }
.bar.red > i { background: var(--danger); }
.bar.blue > i { background: var(--accent); }
.bar.grey > i { background: #94a3b8; }

.inspector {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: .85rem;
  font-size: .9rem;
}
.inspector h4 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.inspector h4 .avatar { width: 1.75rem; height: 1.75rem; font-size: .7rem; }

.board-wrap {
  padding: 1.1rem;
  overflow: auto;
  background: var(--bg);
}
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .9rem;
  align-items: start;
}
.class-col {
  background: var(--bg-mint);
  border: 1px solid var(--line);
  border-radius: 20px;
  min-height: 320px;
  box-shadow: var(--shadow-sm);
  transition: .15s ease;
  position: relative;
  padding: .55rem;
}
.class-head {
  padding: .65rem .7rem .75rem;
  border-bottom: none;
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
}
.class-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.class-count {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: .2rem .55rem;
}
.class-head .meta {
  width: 100%;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 0;
}
.student-list {
  padding: .2rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.student-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .65rem;
  border-radius: 14px;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid rgba(215, 228, 223, 0.9);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: element;
  transition: .12s ease;
  position: relative;
}
.student-row.is-draggable { cursor: grab; }
.student-row.is-draggable:active { cursor: grabbing; }
.student-row:hover {
  border-color: #b7d8cf;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.student-row.selected {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}
.student-row.moving {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.student-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.student-row .name,
.name.boy, .name.girl {
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-row .name { color: var(--ink); }
.student-row.boy .name,
.name.boy { color: #1d6fbf; }
.student-row.girl .name,
.name.girl { color: #d4538a; }
.student-row .subname {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Student detail drawer */
.student-drawer-root { position: relative; z-index: 40; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 43, 0.28);
  backdrop-filter: blur(3px);
  animation: fade .15s ease;
}
.student-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  background: #f7fbfa;
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 48px rgba(21, 32, 43, 0.12);
  padding: 1.15rem 1.2rem 1.5rem;
  overflow: auto;
  animation: slideIn .22s ease;
  z-index: 41;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}
.drawer-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.drawer-meta {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .85rem;
}
.drawer-close {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.drawer-close:hover { background: var(--accent-soft); border-color: #b7e4de; }
.drawer-profile {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem .9rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.drawer-profile .avatar { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
.drawer-profile strong { display: block; font-size: 1rem; }
.drawer-profile span { color: var(--muted); font-size: .8rem; }
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .85rem;
}
.drawer-cue {
  margin: 0 0 1rem;
  padding: .65rem .8rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid #b7e4de;
  color: var(--accent-ink);
  font-size: .85rem;
  font-weight: 600;
}
.drawer-section { margin-bottom: 1rem; }
.drawer-section h4 {
  margin: 0 0 .45rem;
  font-size: .92rem;
  font-family: var(--display);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.drawer-section h4 i { color: var(--accent); font-size: .85rem; }
.drawer-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.drawer-notes {
  margin: 0;
  padding: .7rem .8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.45;
}
.muted { color: var(--muted); font-size: .85rem; }
@keyframes slideIn {
  from { transform: translateX(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: .78rem;
  flex-shrink: 0;
}
.avatar.av-1 { background: var(--av-1); }
.avatar.av-2 { background: var(--av-2); }
.avatar.av-3 { background: var(--av-3); }
.avatar.av-4 { background: var(--av-4); }
.avatar.av-5 { background: var(--av-5); }
.avatar.av-6 { background: var(--av-6); }
.avatar.av-7 { background: var(--av-7); }
.avatar.av-8 { background: var(--av-8); }
.glyph {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: .62rem;
  font-weight: 800;
  color: #fff;
}
.glyph.m { background: var(--boy); }
.glyph.f { background: var(--girl); }
.row-more {
  color: #b0bfc0;
  font-size: .85rem;
  padding: .2rem;
}
.flag-icon {
  position: relative;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: .72rem;
  cursor: help;
  line-height: 1;
}
.flag-icon.green { color: #059669; background: #ecfdf5; }
.flag-icon.orange { color: #d97706; background: #fffbeb; }
.flag-icon.red { color: #e11d48; background: #fff1f2; }
.flag-icon::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  min-width: 140px;
  max-width: 220px;
  padding: .45rem .6rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  text-align: left;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: .12s ease;
}
.flag-icon:hover::after,
.flag-icon:focus::after,
.flag-icon:focus-visible::after {
  opacity: 1;
  transform: none;
}
.attr-tint {
  font-size: .68rem;
  background: var(--bg-mint);
  color: var(--muted);
  border-radius: 6px;
  padding: .12rem .35rem;
  font-weight: 700;
}
.lock-ico { color: var(--accent); font-size: .75rem; }

/* Drag polish */
.drag-banner {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: .8rem 1rem;
  margin-bottom: .85rem;
  box-shadow: var(--shadow);
  animation: rise .2s ease;
}
.drag-banner[hidden] { display: none !important; }
.drag-banner-pill {
  background: var(--accent);
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.board-hint {
  background: var(--accent-soft);
  border: 1px solid #99f6e4;
  color: var(--accent-ink);
  border-radius: 12px;
  padding: .7rem 1rem;
  margin-bottom: .8rem;
  font-size: .9rem;
}
.board-hint button {
  margin-left: .5rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: .2rem .55rem;
  font-weight: 700;
  cursor: pointer;
}
.drop-zone-label, .drop-slot { display: none; }
.is-dragging .drop-zone-label {
  display: inline-block;
  margin-top: .35rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.is-dragging .class-col.drag-ready .drop-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-bottom: .1rem;
  border: 2px dashed #7dc4b8;
  border-radius: 14px;
  background: rgba(125, 196, 184, 0.18);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: .85rem;
}
.is-dragging .class-col.drag-over {
  border-color: var(--accent);
  background: #dff3ee;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: scale(1.01);
  z-index: 2;
}
.is-dragging .class-col.drag-over .drop-slot {
  border-style: solid;
  background: rgba(15, 118, 110, 0.14);
}
.is-dragging .class-col.drag-source { opacity: .45; }
.is-dragging .class-col.drag-ready .class-head { background: transparent; }
.class-col.move-target .class-head { cursor: pointer; }
.drop-cue {
  margin-top: .35rem;
  font-size: .78rem;
  font-weight: 800;
  color: var(--accent);
}
.empty-drop {
  padding: .8rem;
  color: var(--muted);
  font-size: .85rem;
  min-height: 48px;
}
.student-row.dragging,
.student-row.drag-placeholder {
  background: rgba(125, 196, 184, 0.12);
  border: 2px dashed #7dc4b8;
  box-shadow: none;
  transform: none;
}
.student-row.drag-placeholder * { visibility: hidden; }
.student-row.drag-placeholder::after {
  content: "";
  visibility: visible;
  position: absolute;
  inset: 0;
}
.drag-ghost {
  position: absolute;
  top: -1000px;
  left: -1000px;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .65rem .85rem;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  z-index: 9999;
  pointer-events: none;
  transform: rotate(2deg);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1100px) {
  .hero-grid, .split-feature, .setup-shell { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-product { transform: none; max-width: none; }
  .hero-product:hover { transform: none; }
  .setup-nav { position: static; }
  .setup-nav-text small { display: none; }
}

@media (max-width: 960px) {
  .mod-grid, .steps, .feature-showcase, .feature-rail, .capability-grid,
  .pain-row, .contact-grid, .footer-grid, .stage-board, .stage-cols,
  .stat-grid, .dash-panels, .setup-grid, .solve-layout { grid-template-columns: 1fr; }
  .section, .hero-home { padding-left: 1.2rem; padding-right: 1.2rem; }
  .hero-home { min-height: auto; padding-top: 6rem; padding-bottom: 3rem; }
  .nav-toggle { display: inline-flex; }
  .marketing .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: #0b1220;
    border-radius: 14px;
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .marketing .nav-links.open { display: flex; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .app-nav { height: auto; min-height: var(--nav-h); flex-wrap: wrap; padding: .7rem 1rem; }
  .app-nav-right { width: 100%; overflow-x: auto; }
  .setup-nav { flex-direction: row; overflow-x: auto; }
  .setup-nav-item { min-width: 150px; }
  .setup-nav-tip { display: none; }
}
