:root {
  --bg: #eef4ff;
  --bg-soft: #f8fbff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-alt: rgba(240, 247, 255, 0.86);
  --line: rgba(101, 132, 179, 0.18);
  --line-strong: rgba(46, 115, 224, 0.32);
  --text: #12233d;
  --muted: #66788f;
  --brand: #1150d5;
  --brand-strong: #0b3b97;
  --brand-soft: #eaf2ff;
  --accent: #05b8da;
  --accent-strong: #047ea7;
  --accent-soft: rgba(5, 184, 218, 0.12);
  --success: #0d9f77;
  --danger: #d85170;
  --shadow: 0 30px 90px rgba(84, 119, 172, 0.16);
  --shadow-soft: 0 20px 42px rgba(101, 132, 179, 0.12);
  --radius-2xl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sans: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 16%, rgba(17, 80, 213, 0.18), transparent 0 22%),
    radial-gradient(circle at 88% 12%, rgba(5, 184, 218, 0.16), transparent 0 20%),
    radial-gradient(circle at 22% 100%, rgba(103, 189, 255, 0.18), transparent 0 28%),
    linear-gradient(180deg, #f8fbff 0%, #edf4ff 48%, #e8f0ff 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(67, 110, 176, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 110, 176, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 56%, transparent 100%);
  opacity: 0.6;
}

body::after {
  inset: auto;
  top: 14%;
  right: -8%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 184, 218, 0.2) 0%, rgba(5, 184, 218, 0) 72%);
  filter: blur(14px);
}

a,
button,
input {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

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

.page-shell {
  position: relative;
  width: min(1360px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 26px 0 72px;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}

.page-shell::before {
  top: 120px;
  right: 2%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(17, 80, 213, 0.18) 0%, rgba(17, 80, 213, 0) 74%);
}

.page-shell::after {
  bottom: 140px;
  left: -4%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(5, 184, 218, 0.16) 0%, rgba(5, 184, 218, 0) 74%);
}

.site-nav,
.site-header,
.section,
.table-card,
.intro-card,
.access-card,
.metric-card,
.highlight-card,
.system-card,
.process-card,
.hero-note {
  position: relative;
}

.site-nav,
.site-header,
.section,
.table-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px);
}

.site-nav::after,
.site-header::after,
.section::after,
.table-card::after,
.intro-card::after,
.access-card::after,
.metric-card::after,
.highlight-card::after,
.system-card::after,
.process-card::after,
.hero-note::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), transparent 28%, transparent 70%, rgba(17, 80, 213, 0.14));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.nav-brand {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform 200ms ease, background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.nav-links a:hover {
  transform: translateY(-1px);
  color: var(--brand);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 26px rgba(79, 119, 182, 0.12);
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 34px;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 255, 0.84)),
    var(--surface);
  overflow: hidden;
  backdrop-filter: blur(22px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(17, 80, 213, 0.14), transparent 0 24%),
    radial-gradient(circle at 92% 0%, rgba(5, 184, 218, 0.12), transparent 0 16%),
    linear-gradient(135deg, rgba(17, 80, 213, 0.04), transparent 24%, transparent 70%, rgba(5, 184, 218, 0.06));
  pointer-events: none;
}

.brand-lockup,
.hero-side {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 80, 213, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

h1 {
  max-width: 11ch;
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(46px, 6vw, 80px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, #0c1f3c 0%, var(--brand) 58%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.lead {
  max-width: 36ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-side {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.hero-note {
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(5, 184, 218, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(236, 246, 255, 0.8));
  box-shadow: var(--shadow-soft);
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-note p,
.intro-card p,
.access-header p,
.metric-card p,
.highlight-card p,
.system-card p,
.process-card p,
.table-meta {
  color: var(--muted);
  line-height: 1.75;
}

.intro-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.intro-card,
.access-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 255, 0.82));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.intro-card {
  padding: 22px;
}

.intro-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.access-card {
  padding: 26px;
}

.access-header {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.access-header h2 {
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field span {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 700;
}

.login-field input,
.table-toolbar input,
.ghost-button {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.login-error {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
}

.session-actions,
.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.secondary-link,
.tab-button,
.ghost-button {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.primary-link {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #ffffff;
  box-shadow: 0 22px 40px rgba(17, 80, 213, 0.24);
}

.secondary-link {
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand);
  border-color: rgba(17, 80, 213, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ghost-button {
  background: rgba(236, 243, 255, 0.78);
  color: var(--brand-strong);
  border-color: rgba(17, 80, 213, 0.12);
}

.primary-link:hover,
.secondary-link:hover,
.tab-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(84, 119, 172, 0.16);
}

.section {
  margin-top: 22px;
  padding: 34px;
  border-radius: var(--radius-2xl);
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.section-heading.split {
  flex-direction: row;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: var(--text);
  text-wrap: balance;
}

.metrics-grid,
.highlight-grid,
.system-layout,
.process-grid {
  display: grid;
  gap: 18px;
}

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

.highlight-grid,
.system-layout,
.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.highlight-card,
.system-card,
.process-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.82));
  box-shadow: var(--shadow-soft);
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--brand);
}

.highlight-card h3,
.system-card h3,
.process-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.35;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button {
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand-strong);
  border-color: rgba(17, 80, 213, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.tab-button.is-active {
  background: linear-gradient(135deg, rgba(17, 80, 213, 0.96), rgba(5, 184, 218, 0.96));
  color: #ffffff;
  border-color: transparent;
}

.table-card {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 255, 0.9));
  backdrop-filter: blur(20px);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-toolbar input {
  width: min(420px, 100%);
  padding: 0 18px;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(101, 132, 179, 0.12);
}

th {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:nth-child(odd) {
  background: rgba(17, 80, 213, 0.034);
}

.student-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 700;
  text-align: left;
}

.student-link:hover {
  text-decoration: underline;
}

.student-link.is-selected {
  color: var(--accent-strong);
  text-decoration: underline;
}

.student-insight-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.86));
}

.student-insight-card h3 {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
}

.student-insight-empty {
  color: var(--muted);
  line-height: 1.7;
}

.student-insight-header {
  display: grid;
  gap: 12px;
}

.student-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 80, 213, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.student-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.student-metrics article {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.student-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.student-metrics strong {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  color: var(--brand);
}

.student-school-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.student-school-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.student-school-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.student-school-top h4 {
  margin: 0;
  font-size: 18px;
}

.student-school-top span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 80, 213, 0.1);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.student-school-card p {
  margin-top: 8px;
  line-height: 1.5;
}

.student-school-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.student-school-card li {
  color: var(--text);
  line-height: 1.55;
}

.student-school-card li strong {
  color: var(--brand-strong);
}

.process-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(17, 80, 213, 0.12), rgba(5, 184, 218, 0.14));
  color: var(--brand);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

input::placeholder {
  color: rgba(102, 120, 143, 0.68);
}

input:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(17, 80, 213, 0.12);
}

@media (max-width: 1100px) {
  .site-header,
  .metrics-grid,
  .highlight-grid,
  .system-layout,
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  .intro-points {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding: 18px 0 34px;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .nav-links {
    gap: 8px;
  }

  .site-header,
  .section,
  .table-card,
  .access-card {
    padding: 22px;
    border-radius: 24px;
  }

  .site-header,
  .metrics-grid,
  .highlight-grid,
  .system-layout,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .table-toolbar input {
    width: 100%;
  }

  .student-metrics,
  .student-school-grid {
    grid-template-columns: 1fr;
  }

  .primary-link,
  .secondary-link,
  .tab-button,
  .ghost-button {
    width: 100%;
  }

  .session-actions,
  .workspace-actions,
  .filter-bar {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
