:root {
  --ink: #142236;
  --muted: #647489;
  --line: #dce7ee;
  --paper: #f7fbfc;
  --white: #ffffff;
  --green: #13a87b;
  --green-dark: #087453;
  --mint: #ddf8ef;
  --blue: #2478ff;
  --gold: #e9a323;
  --shadow: 0 24px 70px rgba(35, 67, 80, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(19, 168, 123, 0.1), transparent 30%),
    linear-gradient(220deg, rgba(36, 120, 255, 0.08), transparent 28%),
    var(--paper);
  font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(20, 34, 54, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 34, 54, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
.topbar, main, footer { width: min(1180px, 92vw); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 231, 238, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 44px rgba(35, 67, 80, 0.09);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 44px;
  padding-bottom: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), #36c7a0);
}
.brand-icon i { display: block; width: 5px; border-radius: 3px; background: white; }
.brand-icon i:nth-child(1) { height: 10px; opacity: 0.75; }
.brand-icon i:nth-child(2) { height: 19px; }
.brand-icon i:nth-child(3) { height: 14px; opacity: 0.86; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.08rem; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 0.76rem; }

.nav-links, .topbar-actions { display: flex; align-items: center; gap: 6px; }
.nav-links a, .nav-action, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 760;
  text-decoration: none;
}
.nav-links a { padding: 0 12px; color: #4a6072; }
.nav-links a:hover { color: var(--green-dark); background: #edf9f5; }
.nav-action, .button.primary {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 12px 26px rgba(19, 168, 123, 0.22);
  cursor: pointer;
}
.nav-action { padding: 0 16px; }
.login-action {
  border: 1px solid var(--line);
  color: var(--green-dark);
  background: white;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 110px);
  padding: 64px 0 46px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.eyebrow span { width: 26px; height: 3px; border-radius: 2px; background: var(--green); }
h1, h2, h3, p { margin: 0; }
h1 {
  max-width: 10ch;
  margin-top: 14px;
  font-size: clamp(3.5rem, 6.6vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}
.hero-lede { max-width: 58ch; margin-top: 24px; color: var(--muted); font-size: 1.08rem; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { min-width: 154px; padding: 0 18px; }
.button.secondary { border: 1px solid var(--line); color: var(--green-dark); background: white; }
.proof-row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: #566b7d; font-size: 0.84rem; font-weight: 700; }
.proof-row span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--green); vertical-align: 1px; }

.app-window {
  display: grid;
  grid-template-columns: 62px 1fr;
  overflow: hidden;
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg);
}
.app-sidebar { display: flex; flex-direction: column; align-items: center; padding: 14px 0; background: #122737; }
.mini-brand { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: white; background: var(--green); text-decoration: none; }
.side-nav { display: grid; gap: 19px; margin-top: 48px; }
.side-nav span { width: 20px; height: 20px; border: 2px solid #6d8190; border-radius: 6px; }
.side-nav span.active { border-color: #63e1bd; background: rgba(99, 225, 189, 0.2); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; margin-top: auto; border-radius: 50%; color: white; background: #385568; font-size: 0.66rem; font-weight: 850; }
.app-content { min-width: 0; padding: 24px; background: #f8fbfc; }
.app-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.app-header small, .app-header strong { display: block; }
.app-header small { color: var(--muted); font-size: 0.76rem; }
.app-header strong { margin-top: 5px; font-size: 1.45rem; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #cceee3; border-radius: 8px; color: var(--green-dark); background: #f0fbf7; font-size: 0.76rem; font-weight: 800; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(19, 168, 123, 0.12); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.metric-grid article { min-height: 112px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.metric-grid article.clear { border-color: #bde9dc; background: linear-gradient(150deg, var(--mint), white 70%); }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); font-size: 0.7rem; }
.metric-grid strong { display: block; margin: 7px 0 3px; font-size: 2rem; line-height: 1; }
.activity-panel { margin-top: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.panel-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 13px; }
.panel-heading span { color: var(--muted); font-size: 0.7rem; }
.pass-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 42px 66px; gap: 10px; align-items: center; min-height: 67px; border-top: 1px solid #edf2f5; }
.student { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-size: 0.66rem; font-weight: 850; }
.student.blue { color: #175bc4; background: #e5efff; }
.student.green { color: var(--green-dark); background: var(--mint); }
.student.gold { color: #97630c; background: #fff3d8; }
.pass-row div strong, .pass-row div small { display: block; }
.pass-row div strong { font-size: 0.82rem; }
.pass-row div small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.pass-row time { color: #526779; font-size: 0.72rem; font-weight: 750; }
.status { padding: 6px 7px; border-radius: 6px; text-align: center; font-size: 0.62rem; font-weight: 800; }
.status.active { color: var(--green-dark); background: var(--mint); }
.status.returning { color: #185bba; background: #e5efff; }

.overview { padding: 78px 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr); gap: 28px; align-items: end; }
.section-heading .eyebrow { align-self: start; margin-top: 10px; }
.section-heading h2, .workflow h2 { font-size: clamp(2.3rem, 5vw, 4.9rem); line-height: 0.98; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.feature-grid article { min-height: 250px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.82); }
.feature-number { color: var(--green); font-size: 0.76rem; font-weight: 850; }
.feature-grid h3 { margin-top: 58px; font-size: 2rem; }
.feature-grid p { margin-top: 12px; color: var(--muted); line-height: 1.62; }

.workflow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr); gap: 36px; align-items: center; padding: 78px 0; border-top: 1px solid var(--line); }
.workflow h2 { margin-top: 12px; }
.workflow-copy > p:not(.eyebrow) { margin-top: 20px; color: var(--muted); line-height: 1.7; }
.text-action { display: inline-flex; margin-top: 22px; padding: 0; border: 0; color: var(--green-dark); background: transparent; font-weight: 850; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.signal-board { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.signal-head, .signal-foot { display: flex; justify-content: space-between; gap: 16px; }
.signal-head span, .signal-foot { color: var(--muted); font-size: 0.78rem; }
.bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 10px; height: 250px; margin: 24px 0 12px; padding: 24px 14px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, #edf3f5 0, #edf3f5 1px, transparent 1px, transparent 54px); }
.bars span { height: var(--height); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #39c89f, var(--green-dark)); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 120px; border-top: 1px solid var(--line); }
footer p { color: var(--muted); }
footer > a:last-child { color: var(--green-dark); font-weight: 800; }

.demo-dialog {
  width: min(720px, 92vw);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 90px rgba(18, 39, 55, 0.28);
}
.demo-dialog::backdrop { background: rgba(18, 39, 55, 0.58); backdrop-filter: blur(4px); }
.demo-form { padding: 28px; }
.demo-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.demo-form-head h2 { max-width: 13ch; margin-top: 10px; font-size: clamp(2rem, 5vw, 3.3rem); line-height: 0.98; }
.dialog-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: #506477; background: #f7fafb; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.form-grid label { display: grid; gap: 7px; min-width: 0; }
.form-grid label > span { color: #506477; font-size: 0.78rem; font-weight: 800; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid #cfdde5; border-radius: 8px; color: var(--ink); background: #fbfdfe; outline: 0; }
.form-grid input, .form-grid select { height: 46px; padding: 0 12px; }
.form-grid textarea { min-height: 112px; padding: 12px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(19, 168, 123, 0.12); }
.full-field { grid-column: 1 / -1; }
.demo-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.demo-form-foot p { max-width: 42ch; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.demo-form-foot .button { flex: 0 0 auto; }
.email-fallback { margin-top: 14px; color: var(--muted); font-size: 0.78rem; }
.email-fallback a { color: var(--green-dark); font-weight: 800; }

@media (max-width: 1040px) {
  .hero, .section-heading, .workflow { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .app-window { transform: none; }
}

@media (max-width: 720px) {
  .topbar { position: static; flex-wrap: wrap; margin-top: 12px; }
  .topbar > .brand { flex: 1; }
  .topbar-actions { order: 2; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { order: 3; width: 100%; justify-content: space-between; }
  .nav-links a { flex: 1; padding: 0 5px; }
  .nav-action { width: 100%; min-width: 0; padding-inline: 10px; }
  .hero { padding-top: 46px; }
  h1 { max-width: none; font-size: clamp(3.25rem, 15vw, 4.8rem); }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .app-window { grid-template-columns: 46px minmax(0, 1fr); min-height: auto; }
  .app-content { padding: 15px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid article { min-height: 88px; }
  .pass-row { grid-template-columns: 32px minmax(0, 1fr) 42px; }
  .pass-row .status { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 220px; }
  .workflow { grid-template-columns: minmax(0, 1fr); }
  footer { flex-direction: column; align-items: flex-start; padding: 28px 0; }
  .demo-form { padding: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .demo-form-foot { align-items: stretch; flex-direction: column; }
  .demo-form-foot .button { width: 100%; }
}
