:root {
  --bg: #070809;
  --panel: #101214;
  --panel-2: #171a1d;
  --card: #1d2024;
  --line: #2d3237;
  --line-strong: #444b52;
  --text: #f4f5f6;
  --muted: #a2a9b0;
  --quiet: #6f7780;
  --accent: #c6ff3d;
  --accent-2: #8da2ff;
  --danger: #ff776f;
  --warn: #f0bf62;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: min(8vw, 92px);
  min-height: 76px;
  padding: 0 24px;
  color: var(--text);
  font-weight: 800;
  background: rgba(7, 8, 9, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-nav {
  position: absolute;
  color: #0d1014;
  background: transparent;
  border-bottom: 0;
}

.brand {
  position: absolute;
  left: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand span {
  width: 13px;
  height: 13px;
  background: #2bd86d;
}

.site-nav nav {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
}

.site-nav nav a {
  position: relative;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.site-nav nav a:hover::after,
.site-nav nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 110px 24px 210px;
  text-align: center;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: #b8cdd8;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.hero-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.0) 40%,
    rgba(7, 8, 9, 0.55) 100%
  );
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 380px;
  background: linear-gradient(
    180deg,
    rgba(7, 8, 9, 0) 0%,
    rgba(7, 8, 9, 0.5) 70%,
    var(--bg) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 24px;
  width: min(860px, 100%);
  margin-top: 46px;
}

.hero-kicker,
.eyebrow {
  margin: 0;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-kicker {
  color: rgba(10, 12, 16, 0.72);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  animation: fade-up 0.6s ease both;
  animation-delay: 0.05s;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4.2rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-synthesis: none;
  color: #0d1014;
}

.hero-title {
  opacity: 0;
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.18s;
}

.hero-title em {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
}

/* remove old word-split animation classes */
.hero-word {
  display: inline;
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-copy {
  max-width: 560px;
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  font-weight: 500;
  line-height: 1.45;
  color: rgba(10, 12, 16, 0.78);
}

.hero-copy-anim {
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
  animation-delay: 0.44s;
}

.hero-btn-anim {
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
  animation-delay: 0.6s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-button,
button:not(.nav-toggle) {
  min-height: 52px;
  border: 1px solid #0d0f12;
  border-radius: 999px;
  padding: 0 32px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #0d1014;
  border-color: #0d1014;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.hero-button:hover,
.hero-button:focus-visible {
  transform: translateY(-3px) scale(1.02);
  background: #1e2530;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.landing-page .section:first-of-type {
  margin-top: -28px;
  position: relative;
  z-index: 3;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2,
.table-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.toolkit-main {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 104px 0 70px;
}

.toolkit-heading {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin-bottom: 22px;
}

.toolkit-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
}

.toolkit-heading p:last-child {
  max-width: 620px;
  margin: 0;
  color: #c5ccd4;
  font-size: 1rem;
  line-height: 1.45;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.steps-grid article,
.upload-panel,
.results-panel,
.stats-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(16, 18, 20, 0.72);
  box-shadow: none;
}

.steps-grid article {
  min-height: 210px;
  padding: 22px;
}

.steps-grid span {
  color: var(--accent);
  font-weight: 900;
}

.steps-grid h3 {
  margin: 50px 0 14px;
  font-size: 1.35rem;
}

.steps-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 260px;
}

.product-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.72fr) auto;
  gap: 28px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(198, 255, 61, 0.08), transparent 36%),
    #101214;
  box-shadow: var(--shadow);
}

.product-footer h2 {
  margin: 10px 0 0;
  max-width: 620px;
  font-size: clamp(1.75rem, 3.4vw, 3.8rem);
  line-height: 1;
}

.product-footer p:last-of-type {
  margin: 0;
  color: #c7d0d8;
  max-width: 430px;
  line-height: 1.45;
}

.product-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  color: #101214;
  background: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.toolkit-section {
  padding-top: 30px;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.results-panel {
  grid-column: 1 / -1;
  border-top: 0;
}

.stats-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
}

.stats-panel div {
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
}

.stats-panel div:last-child {
  border-right: 0;
}

.stats-panel span {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 900;
}

.stats-panel small,
.table-head span,
.subtle,
.filename,
.drop-copy,
.process-box {
  color: #c7d0d8;
  font-size: 0.85rem;
}

.upload-panel {
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 16px;
}

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(198, 255, 61, 0.08), transparent 38%),
    #0c0e10;
  cursor: pointer;
  overflow: hidden;
}

.drop-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--accent) 50%, transparent 0) top left / 18px 1px repeat-x,
    linear-gradient(90deg, var(--accent) 50%, transparent 0) bottom left / 18px 1px repeat-x,
    linear-gradient(0deg, var(--accent) 50%, transparent 0) top left / 1px 18px repeat-y,
    linear-gradient(0deg, var(--accent) 50%, transparent 0) top right / 1px 18px repeat-y;
  opacity: 0.24;
  animation: trace-dots 1.8s linear infinite;
}

@keyframes trace-dots {
  to {
    background-position:
      18px 0,
      -18px 100%,
      0 -18px,
      100% 18px;
  }
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  color: var(--accent);
  opacity: 0.7;
  flex-shrink: 0;
}

.drop-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.drop-copy {
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.actions [hidden] {
  display: none;
}

.primary {
  color: #101214;
  background: var(--accent);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.secondary {
  color: var(--text);
  background: #111417;
  border-color: var(--line-strong);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.primary:hover:not(:disabled),
.primary:focus-visible:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(198, 255, 61, 0.18);
  filter: brightness(1.04);
}

.secondary:hover:not(:disabled),
.secondary:focus-visible:not(:disabled) {
  transform: translateY(-3px);
  border-color: #6b747d;
  background: #171b1f;
}

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

.process-box {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 62px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0b0d0f;
  line-height: 1.45;
}

.process-box p {
  margin: 0;
}

.process-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--quiet);
}

.processing .process-dot {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.45);
  animation: pulse 1.1s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(198, 255, 61, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(198, 255, 61, 0);
  }
}

.results-panel {
  overflow: hidden;
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.table-head .eyebrow {
  margin-bottom: 8px;
  color: #91a3b8;
}

.table-head h2 {
  font-size: clamp(1.65rem, 2.4vw, 2.5rem);
}

.table-wrap {
  overflow-x: auto;
  scrollbar-color: #8b929a #1b1f23;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #9aa8b8;
  background: #0d0f11;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: #edf2f6;
}

.student-name {
  display: block;
  font-weight: 800;
}

.filename,
.subtle {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}

.pair {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.pair span:first-child {
  color: var(--text);
  font-weight: 700;
}

.pair span:last-child {
  color: var(--muted);
}

.confidence {
  width: 126px;
}

.meter {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #30343a;
  overflow: hidden;
}

.meter span,
.meter-fill {
  display: block;
  height: 100%;
  background: var(--accent);
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.verified {
  color: #101214;
  background: var(--accent);
}

.partial_match,
.needs_review,
.fetch_failed {
  color: #15110a;
  background: var(--warn);
}

.mismatch,
.qr_not_found {
  color: #1d0d0b;
  background: var(--danger);
}

.evidence-link {
  color: var(--accent-2);
  font-weight: 800;
}

.empty-row td {
  padding: 50px 18px;
  color: var(--quiet);
  text-align: center;
}

@media (max-width: 1120px) {
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav {
    min-height: 64px;
    justify-content: space-between;
    padding: 0 16px;
  }

  .brand {
    position: static;
  }

  .landing-nav {
    color: #0d1014;
  }

  .landing-nav .nav-toggle {
    display: block;
  }

  .landing-nav nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 0;
    padding: 8px;
    color: var(--text);
    background: rgba(7, 8, 9, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .landing-nav.nav-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .landing-nav nav a {
    padding: 14px 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .landing-nav nav a:last-child {
    border-bottom: 0;
  }

  .toolkit-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 84vh;
    padding: 92px 18px 150px;
  }

  .hero-content {
    gap: 20px;
    margin-top: 12px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 16vw, 6rem);
  }

  .hero-copy {
    max-width: 330px;
    font-size: 0.98rem;
  }

  .section {
    width: min(100% - 22px, 1180px);
    padding: 58px 0;
  }

  .landing-page .section:first-of-type {
    margin-top: -24px;
  }

  .toolkit-main {
    width: min(100% - 22px, 1320px);
    padding: 84px 0 42px;
  }

  .toolkit-heading {
    margin-bottom: 20px;
  }

  .toolkit-heading h1 {
    font-size: clamp(2.05rem, 11vw, 3.1rem);
  }

  .toolkit-heading p:last-child {
    font-size: 0.94rem;
  }

  .steps-grid,
  .dashboard,
  .actions,
  .product-footer {
    grid-template-columns: 1fr;
  }

  .stats-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard {
    border-right: 1px solid rgba(255, 255, 255, 0.18);
  }

  .stats-panel,
  .upload-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .upload-panel .drop-zone,
  .upload-panel .actions,
  .upload-panel .process-box {
    width: 100%;
  }

  .stats-panel div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .stats-panel div:last-child {
    border-bottom: 0;
  }

  .steps-grid article {
    min-height: auto;
  }

  .drop-zone {
    min-height: 220px;
    padding: 20px;
  }

  .drop-title {
    font-size: 1.7rem;
  }

  .table-head {
    display: grid;
    align-items: start;
  }

  .table-head h2 {
    font-size: 2.2rem;
  }

  .table-head span {
    text-align: left;
  }

  .table-wrap {
    overflow-x: visible;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 0;
  }

  td::before {
    color: #91a3b8;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  td:nth-child(1)::before {
    content: "Name";
  }

  td:nth-child(2)::before {
    content: "Course";
  }

  td:nth-child(3)::before {
    content: "Code";
  }

  td:nth-child(4)::before {
    content: "Assignment";
  }

  td:nth-child(5)::before {
    content: "Exam";
  }

  td:nth-child(6)::before {
    content: "Total";
  }

  td:nth-child(7)::before {
    content: "Confidence";
  }

  td:nth-child(8)::before {
    content: "QR";
  }

  .empty-row td {
    display: block;
    padding: 34px 18px;
    text-align: center;
  }

  .empty-row td::before {
    content: "";
  }

  .product-footer {
    width: min(100% - 22px, 1180px);
    margin-bottom: 22px;
    padding: 22px;
  }

  .product-footer a {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .hero-button,
  button:not(.nav-toggle) {
    width: 100%;
    padding: 0 18px;
  }

  td {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
