/* InstantGPA v43 — student-first visual system.
   Loaded last to turn a dense academic workspace into a guided, friendly flow. */

:root {
  --student-ink: #17152b;
  --student-copy: #514e69;
  --student-muted: #74718b;
  --student-canvas: #f7f6ff;
  --student-surface: #ffffff;
  --student-line: #e4e1f1;
  --student-violet: #6d4aff;
  --student-violet-dark: #5635e8;
  --student-violet-soft: #eeebff;
  --student-cyan: #16b8cb;
  --student-cyan-soft: #e3fafd;
  --student-orange: #ff8b4c;
  --student-orange-soft: #fff0e8;
  --student-green: #20a76b;
  --student-green-soft: #e6f8ef;
  --student-red: #d94a61;
  --student-shadow: 0 18px 50px -34px rgba(47, 36, 111, .32);
  --student-shadow-hover: 0 22px 55px -30px rgba(73, 50, 185, .42);
}

html {
  background: var(--student-canvas);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 5% 5%, rgba(109, 74, 255, .11), transparent 26rem),
    radial-gradient(circle at 96% 16%, rgba(22, 184, 203, .1), transparent 28rem),
    linear-gradient(180deg, #fbfaff 0, var(--student-canvas) 48rem);
  color: var(--student-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#app {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 64px);
  border: 0;
  border-bottom: 1px solid rgba(228, 225, 241, .9);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(52, 39, 114, .06);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 11px;
  min-height: 50px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--student-violet), #8c73ff);
  box-shadow: 0 12px 22px -12px rgba(109, 74, 255, .72);
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

.brand-text strong {
  color: var(--student-ink);
  font-size: 22px;
  letter-spacing: -.045em;
}

.brand-text strong em {
  color: var(--student-violet);
}

.brand-text small {
  margin-top: 1px;
  color: var(--student-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}

.header-nav {
  margin-inline: auto 0;
}

.tools-menu > summary,
.icon-link,
.lang-switcher,
.pro-header-link {
  min-height: 44px;
  border: 1px solid var(--student-line);
  border-radius: 14px;
  background: #fff;
  color: var(--student-ink);
  box-shadow: none;
}

.tools-menu > summary {
  padding-inline: 15px;
}

.tools-menu > summary > span {
  display: inline !important;
  color: var(--student-violet);
  font-size: 18px;
}

.tools-menu__panel {
  border: 1px solid var(--student-line);
  border-radius: 20px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 28px 70px -35px rgba(38, 27, 91, .5);
}

.tools-menu__head {
  border-color: var(--student-line);
  background: linear-gradient(135deg, var(--student-violet-soft), #f9f8ff);
}

.tools-menu__head strong {
  color: var(--student-ink);
  font-size: 18px;
}

.tools-menu__head small {
  color: var(--student-copy);
  font-size: 12px;
  line-height: 1.5;
}

.tools-menu__grid a {
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--student-copy);
}

.tools-menu__grid a:hover {
  border-color: #d8d1ff;
  background: var(--student-violet-soft);
  color: var(--student-violet-dark);
}

.tools-menu__grid a > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--student-violet-soft);
  color: var(--student-violet);
}

.header-actions {
  gap: 8px;
}

.icon-link {
  min-width: 44px;
  width: auto;
  padding-inline: 13px;
  font-size: 13px;
  font-weight: 800;
}

.lang-switcher {
  min-width: 118px;
  padding: 0 6px;
}

.lang-switcher select {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--student-ink);
  font-size: 13px;
}

.pro-header-link {
  background: linear-gradient(135deg, #fff7d6, #fff);
  color: #6e5610;
}

.pro-header-link span {
  background: var(--student-violet);
  color: #fff;
}

main#mainContent {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 64px) 76px;
}

.home-stage.home-stage--portal {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
  min-height: calc(100vh - 76px);
  padding: clamp(48px, 7vw, 84px) 0;
}

.home-stage--portal .setup-hero {
  max-width: 740px;
}

.home-stage--portal .setup-hero .hero-eyebrow {
  min-height: 34px;
  margin: 0 0 18px;
  padding: 7px 13px;
  border: 1px solid #d8d0ff;
  border-radius: 999px;
  background: rgba(238, 235, 255, .9);
  color: var(--student-violet-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
}

.home-stage--portal .setup-hero .hero-eyebrow i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 5px;
  border-radius: 50%;
  background: var(--student-violet);
  box-shadow: 0 0 0 5px rgba(109, 74, 255, .12);
}

.home-stage--portal .setup-hero h2 {
  max-width: 14ch;
  color: var(--student-ink);
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 880;
  line-height: 1.02;
  letter-spacing: -.055em;
}

.home-stage--portal .setup-hero .hero-lead {
  max-width: 55ch;
  margin: 19px 0 0;
  color: var(--student-copy);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.58;
}

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

.student-goal {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  min-height: 116px;
  padding: 17px;
  border: 1px solid var(--student-line);
  border-radius: 19px;
  background: #fff;
  color: var(--student-ink);
  text-decoration: none;
  box-shadow: var(--student-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.student-goal:hover {
  transform: translateY(-3px);
  box-shadow: var(--student-shadow-hover);
}

.student-goal > span {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
}

.student-goal > strong,
.student-goal > small {
  grid-column: 2;
}

.student-goal strong {
  align-self: end;
  font-size: 14px;
  line-height: 1.25;
}

.student-goal small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--student-muted);
  font-size: 10px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-goal--violet { border-color: #d9d2ff; }
.student-goal--violet > span { background: var(--student-violet-soft); color: var(--student-violet); }
.student-goal--cyan { border-color: #bdebf0; }
.student-goal--cyan > span { background: var(--student-cyan-soft); color: #087f8d; }
.student-goal--orange { border-color: #ffd5bd; }
.student-goal--orange > span { background: var(--student-orange-soft); color: #c75c23; }
.student-goal--green { border-color: #bfe9d3; }
.student-goal--green > span { background: var(--student-green-soft); color: #13784d; }

.hero-reassurance {
  margin-top: 18px;
  background: transparent;
  color: var(--student-copy);
  font-size: 12px;
}

.hero-reassurance > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--student-green-soft);
  color: var(--student-green);
}

.home-setup-panel {
  position: relative;
  max-width: 490px;
  padding: 0 26px 26px;
  overflow: hidden;
  border: 1px solid #dcd7f0;
  border-radius: 26px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 34px 80px -45px rgba(55, 39, 137, .5);
}

.home-setup-panel::before {
  display: block;
  width: calc(100% + 52px);
  height: 8px;
  margin-inline: -26px;
  margin-bottom: 21px;
  content: "";
  background: linear-gradient(90deg, var(--student-violet), var(--student-cyan), #5bd59a);
}

.student-setup-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--student-line);
}

.student-setup-head > span {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--student-violet);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.student-setup-head > div {
  display: grid;
  gap: 4px;
}

.student-setup-head strong {
  color: var(--student-ink);
  font-size: 17px;
}

.student-setup-head small {
  color: var(--student-muted);
  font-size: 11px;
  line-height: 1.45;
}

.home-stage .context-title {
  display: none;
}

.home-stage .setup-intro {
  margin: 0 0 15px;
  padding: 0;
  color: var(--student-copy);
}

.home-stage .field > span,
.field > span,
.admin-form label {
  margin-bottom: 6px;
  color: #3f3b5d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-stage .field select,
.home-stage .field input,
.field input,
.field select,
.field textarea {
  min-height: 52px;
  border: 1.5px solid #dcd8e9;
  border-radius: 13px;
  background: #fff;
  color: var(--student-ink);
  font-size: 14px;
  box-shadow: 0 2px 0 rgba(58, 46, 115, .025);
}

.home-stage .field select:focus,
.home-stage .field input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--student-violet);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(109, 74, 255, .13);
}

.home-stage .row-actions .btn--primary {
  flex: 1;
  min-height: 52px;
}

.advanced-setup {
  border-color: var(--student-line);
  border-radius: 14px;
  background: #faf9ff;
}

.advanced-setup > summary {
  color: var(--student-copy);
  font-size: 12px;
}

.advanced-setup > summary::after {
  color: var(--student-violet);
}

.btn {
  min-height: 46px;
  height: auto;
  padding: 10px 19px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 820;
}

.btn--primary {
  border-color: var(--student-violet);
  background: var(--student-violet);
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(109, 74, 255, .8);
}

.btn--primary:hover {
  border-color: var(--student-violet-dark);
  background: var(--student-violet-dark);
}

.btn--ghost {
  border-color: #d8d2ec;
  background: #fff;
  color: #3e385f;
}

.btn--ghost:hover {
  border-color: #c8bdff;
  background: var(--student-violet-soft);
  color: var(--student-violet-dark);
}

.btn--text {
  color: var(--student-violet-dark);
}

.consent-banner {
  position: relative;
  inset: auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 11px clamp(18px, 4vw, 64px);
  border: 0;
  border-bottom: 1px solid #d9d4eb;
  border-radius: 0;
  background: rgba(245, 243, 255, .96);
  box-shadow: none;
}

.consent-banner p {
  max-width: 760px;
  margin: 0;
  color: var(--student-copy);
  font-size: 11px;
  line-height: 1.45;
}

.consent-banner > div {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  margin: 0;
}

.consent-banner .btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 11px;
}

.home-section {
  margin-top: 72px;
}

.home-section__head h2,
.workflow-section h2,
.pro-home-banner h2 {
  color: var(--student-ink);
  letter-spacing: -.035em;
}

.section-kicker {
  color: var(--student-violet-dark);
}

.home-workflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  max-width: 920px;
  margin: 25px auto 0;
}

.home-workflow a {
  min-height: 150px;
  padding: 21px;
  border: 1px solid var(--student-line);
  border-radius: 20px;
  background: #fff;
  color: var(--student-ink);
  box-shadow: var(--student-shadow);
}

.home-workflow a:hover {
  border-color: #c9c0ff;
  transform: translateY(-2px);
}

.home-workflow a b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--student-violet-soft);
  color: var(--student-violet);
  font-size: 15px;
}

.home-workflow a small {
  color: var(--student-muted);
  font-size: 10px;
}

.home-workflow a strong {
  color: var(--student-ink);
  font-size: 15px;
}

.home-workflow > i {
  color: #a9a2c3;
  font-size: 20px;
}

.pro-home-banner {
  border: 0;
  border-radius: 25px;
  background:
    radial-gradient(circle at 90% 0, rgba(56, 225, 235, .22), transparent 30%),
    linear-gradient(135deg, #3f2bb9, #6d4aff 65%, #7366f6);
  box-shadow: 0 28px 60px -36px rgba(66, 44, 183, .75);
}

.pro-home-banner .section-kicker,
.pro-home-banner h2,
.pro-home-banner p {
  color: #fff;
}

.pro-home-banner .section-kicker {
  opacity: .78;
}

.pro-home-banner .btn--primary {
  border-color: #fff;
  background: #fff;
  color: var(--student-violet-dark);
}

.pro-home-banner .btn--ghost {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.1);
  color: #fff;
}

.home-tool-search {
  border-color: var(--student-line);
  border-radius: 14px;
  background: #fff;
}

.home-tools-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-tool-card {
  min-height: 110px;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--student-shadow);
}

.home-tool-card:hover {
  border-color: #c9c0ff;
  box-shadow: var(--student-shadow-hover);
  transform: translateY(-2px);
}

.home-tool-card__icon {
  border-radius: 13px;
  background: var(--student-violet-soft);
  color: var(--student-violet);
}

.home-tool-card strong {
  color: var(--student-ink);
  font-size: 14px;
}

.home-tool-card small {
  color: var(--student-muted);
  font-size: 10px;
  line-height: 1.45;
}

.home-tool-card > i {
  color: var(--student-violet);
}

.home-trust-grid article {
  border-color: var(--student-line);
  border-radius: 18px;
  background: #fff;
}

/* Workspace hierarchy */
.student-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 20px;
}

.student-workspace-head > div {
  display: grid;
  gap: 4px;
}

.student-workspace-head > div > span {
  color: var(--student-violet);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-workspace-head h2 {
  margin: 0;
  color: var(--student-ink);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -.04em;
}

.student-workspace-head p {
  max-width: 65ch;
  margin: 0;
  color: var(--student-copy);
  font-size: 13px;
}

.profile-bar {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid #d8d2f0;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--student-violet-soft), #fff);
}

.profile-bar__label {
  color: var(--student-violet-dark);
}

.profile-bar__uni {
  color: var(--student-ink);
  font-size: 15px;
}

.profile-bar__system {
  color: var(--student-copy);
}

.profile-bar .btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 11px;
}

.workspace-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.workspace-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--student-line);
  border-radius: 15px;
  background: #fff;
  color: var(--student-copy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px -18px rgba(48, 37, 101, .8);
}

.workspace-nav a b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f2f0f8;
  color: var(--student-muted);
}

.workspace-nav a:hover {
  border-color: #c9c0ff;
  color: var(--student-violet-dark);
}

.workspace-nav a.is-active {
  border-color: var(--student-violet);
  background: var(--student-violet);
  color: #fff;
  box-shadow: 0 14px 28px -18px rgba(109, 74, 255, .86);
}

.workspace-nav a.is-active b {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.workspace-subnav {
  display: flex;
  gap: 7px;
  margin: 0 0 18px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--student-line);
  border-radius: 15px;
  background: rgba(255,255,255,.74);
  scrollbar-width: thin;
}

.workspace-subnav a {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--student-copy);
  font-size: 11px;
  font-weight: 780;
  text-decoration: none;
}

.workspace-subnav a:hover {
  background: var(--student-violet-soft);
  color: var(--student-violet-dark);
}

.workspace-subnav a.is-active {
  background: var(--student-ink);
  color: #fff;
}

.student-tool-guide {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 24px;
  margin: 0 auto 18px;
  padding: 20px 22px;
  border: 1px solid #d8d0ff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 95% 0, rgba(22, 184, 203, .12), transparent 28%),
    linear-gradient(135deg, #f2efff, #fff);
}

.student-tool-guide__title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.student-tool-guide__title > span {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--student-violet);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.student-tool-guide__title > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.student-tool-guide__title small {
  color: var(--student-violet-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-tool-guide__title strong {
  color: var(--student-ink);
  font-size: 18px;
}

.student-tool-guide__title p {
  display: -webkit-box;
  max-width: 58ch;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--student-copy);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-tool-guide ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-tool-guide li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px;
  border: 1px solid var(--student-line);
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  color: var(--student-copy);
  font-size: 10px;
  font-weight: 740;
}

.student-tool-guide li b {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--student-violet-soft);
  color: var(--student-violet);
}

.tool-host {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.setup-card,
.tool-card {
  max-width: 1120px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--student-line);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: var(--student-shadow);
}

.tool-card h2,
.setup-card h2 {
  color: var(--student-ink);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -.035em;
}

.tool-card h3 {
  color: var(--student-ink);
}

.tool-sub {
  max-width: 75ch;
  margin-bottom: 20px;
  color: var(--student-copy);
  font-size: 13px;
  line-height: 1.55;
}

.record-connected {
  border: 1px solid #bde8d3;
  border-radius: 12px;
  background: var(--student-green-soft);
  color: #17623f;
}

.record-connected--empty {
  border-color: #ddd8e9;
  background: #f6f5fa;
  color: var(--student-copy);
}

.gpa-summary-strip,
.preview-metrics,
.cgpa-breakdown,
.dash-grid,
.pro-dashboard-metrics {
  gap: 10px;
}

.gpa-summary-strip > span,
.preview-metrics > article,
.cgpa-breakdown > div,
.dash-stat,
.pro-dashboard-metrics article {
  border: 1px solid var(--student-line);
  border-radius: 15px;
  background: #fbfaff;
}

.result-headline {
  border: 1px solid #c9c0ff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--student-violet-soft), #fff);
}

.result-label {
  color: var(--student-violet-dark);
}

.result-value {
  color: var(--student-violet);
  font-size: clamp(34px, 5vw, 54px);
}

.result-note {
  border-radius: 12px;
  line-height: 1.5;
}

.result-note--muted {
  background: #f3f1f8;
  color: var(--student-copy);
}

.result-note--warn {
  background: #fff0f1;
  color: #a63348;
}

/* Editable row grids */
.course-rows,
.grading-rows {
  gap: 7px;
  margin: 18px 0;
}

.course-row--head,
.grading-row--head {
  padding: 0 10px 5px;
  color: var(--student-copy);
  font-size: 11px;
}

.course-row:not(.course-row--head),
.grading-row:not(.grading-row--head) {
  padding: 9px;
  border: 1px solid var(--student-line);
  border-radius: 14px;
  background: #fbfaff;
}

.course-row:not(.course-row--head):focus-within,
.grading-row:not(.grading-row--head):focus-within {
  border-color: #b9acff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, .09);
}

.course-row input,
.course-row select,
.grading-row input,
.grading-row select {
  min-height: 44px;
  border: 1px solid #d9d5e7;
  border-radius: 10px;
  background: #fff;
}

.student-cell {
  display: contents;
}

.student-cell__label {
  display: none;
}

.row-remove,
.course-delete-button {
  border: 1px solid #f0c7ce;
  border-radius: 10px;
  background: #fff3f5;
  color: var(--student-red);
  font-weight: 850;
}

.row-remove:hover,
.course-delete-button:hover {
  background: #ffe6eb;
}

/* Semantic data tables */
.record-table-wrap,
.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px -30px rgba(47, 36, 111, .45);
}

.student-table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.student-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid #d7d0fb;
  background: #f0edff;
  color: #454064;
  font-size: 10px;
  font-weight: 880;
  letter-spacing: .045em;
  text-align: start;
  text-transform: uppercase;
  white-space: nowrap;
}

.student-table tbody td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #ece9f4;
  background: #fff;
  color: var(--student-copy);
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle;
}

.student-table tbody tr:nth-child(even) td {
  background: #fcfbff;
}

.student-table tbody tr:hover td {
  background: #f5f2ff;
}

.student-table tbody tr:last-child td {
  border-bottom: 0;
}

.student-table td strong {
  color: var(--student-ink);
}

.student-table td small {
  display: block;
  margin-top: 3px;
  color: var(--student-muted);
}

.student-table input,
.student-table select {
  min-width: 90px;
  min-height: 42px;
  border: 1px solid #d9d5e7;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
}

.student-table tr.has-error td {
  background: #fff7f8;
}

.record-badge {
  border-radius: 999px;
  font-weight: 800;
}

/* Pro tools: group ten choices into a calm, scannable menu. */
.pro-header {
  border: 0;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 94% 0, rgba(45, 211, 223, .22), transparent 30%),
    linear-gradient(135deg, #31208f, #6243eb);
}

.pro-header p {
  color: rgba(255,255,255,.78);
}

.pro-header .section-kicker,
.pro-plan-chip span {
  color: #dcd5ff;
}

.pro-tabs {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 1px;
  padding: 8px;
  overflow: visible;
  border: 1px solid #dcd5fa;
  border-top: 0;
  border-radius: 0 0 20px 20px;
  background: #e8e3fb;
}

.pro-tabs button {
  min-height: 54px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: var(--student-copy);
}

.pro-tabs button span {
  color: var(--student-violet);
}

.pro-tabs button[aria-selected="true"] {
  background: var(--student-violet);
  color: #fff;
  box-shadow: none;
}

.pro-tabs button[aria-selected="true"] span {
  color: #fff;
}

.pro-semester-hero {
  border-color: #d7d0fb;
  background: linear-gradient(135deg, var(--student-violet-soft), #fff);
}

.pro-semester-hero h3,
.pro-card-head h3,
.pro-value-card h3 {
  color: var(--student-ink);
}

.pro-value-card {
  background: linear-gradient(145deg, #f5f2ff, #fff);
}

.pro-policy-grid > article,
.pro-scenario,
.pro-deadline-list article,
.pro-course-pulse button {
  border-color: var(--student-line);
  border-radius: 14px;
}

.pro-scenario--balanced {
  border-color: var(--student-violet);
  box-shadow: 0 14px 35px -28px rgba(109,74,255,.7);
}

.pro-target-ring,
.pro-integrity-score {
  border-color: #ddd7ff;
  border-top-color: var(--student-violet);
}

.pro-target-ring strong,
.pro-integrity-score strong,
.pro-dashboard-metrics strong {
  color: var(--student-violet);
}

.pro-paywall {
  border-color: #d8d0ff;
  border-radius: 24px;
}

.pro-paywall__visual {
  background:
    radial-gradient(circle at 80% 10%, rgba(22,184,203,.32), transparent 35%),
    linear-gradient(145deg, #3b28a6, #6d4aff);
}

.site-footer {
  border-color: var(--student-line);
  background: rgba(255,255,255,.6);
}

.footer-links a {
  color: var(--student-copy);
}

.footer-links a:hover {
  color: var(--student-violet);
}

@media (max-width: 980px) {
  .home-stage.home-stage--portal {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 48px 0;
  }

  .home-stage--portal .setup-hero,
  .home-setup-panel {
    max-width: 760px;
  }

  .home-stage--portal .setup-hero h2 {
    max-width: 16ch;
  }

  .home-setup-panel {
    width: 100%;
  }

  .student-tool-guide {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .site-header {
    padding-inline: 15px;
  }

  .brand-text small {
    display: block;
  }

  .pro-header-link {
    width: 44px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .pro-header-link span {
    font-size: 8px;
  }

  main#mainContent {
    padding-inline: 15px;
  }

  .student-workspace-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-top: 25px;
  }

  .student-workspace-head > a {
    min-height: 40px;
  }

  .workspace-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .workspace-nav a {
    flex: 0 0 auto;
    width: auto;
    min-width: 94px;
    padding-inline: 12px;
  }

  .workspace-nav a span {
    display: inline !important;
  }

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

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text small {
    display: none;
  }

  .tools-menu > summary {
    min-width: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .tools-menu > summary b {
    display: none;
  }

  .icon-link {
    min-width: 44px;
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .icon-link::before {
    content: "◉";
    color: var(--student-violet);
    font-size: 17px;
  }

  .lang-switcher {
    min-width: 58px;
    width: 58px;
  }

  .lang-switcher select {
    padding-inline: 5px;
    font-size: 11px;
  }

  .home-stage.home-stage--portal {
    gap: 32px;
    padding: 34px 0 42px;
  }

  .consent-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding-block: 10px;
  }

  .consent-banner > div {
    flex-wrap: wrap;
  }

  .home-stage--portal .setup-hero h2 {
    font-size: clamp(36px, 11vw, 50px);
    line-height: 1.04;
  }

  .home-stage--portal .setup-hero .hero-lead {
    font-size: 16px;
  }

  .student-goal-grid {
    grid-template-columns: 1fr;
  }

  .student-goal {
    min-height: 92px;
  }

  .home-setup-panel {
    padding: 0 18px 20px;
    border-radius: 21px;
  }

  .home-setup-panel::before {
    width: calc(100% + 36px);
    margin-inline: -18px;
  }

  .home-workflow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-workflow > i {
    transform: rotate(90deg);
    text-align: center;
  }

  [dir="rtl"] .home-workflow > i {
    transform: rotate(90deg) scaleX(-1);
  }

  .home-workflow a {
    min-height: 110px;
  }

  .home-tools-grid {
    grid-template-columns: 1fr;
  }

  .student-tool-guide {
    padding: 17px;
  }

  .student-tool-guide ol {
    grid-template-columns: 1fr;
  }

  .student-tool-guide li {
    min-height: 42px;
  }

  .profile-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-nav a {
    min-width: 86px;
    min-height: 50px;
    font-size: 11px;
  }

  .setup-card,
  .tool-card {
    padding: 18px 15px;
    border-radius: 18px;
  }

  .course-row--head,
  .grading-row--head {
    display: none;
  }

  .course-row:not(.course-row--head),
  .grading-row:not(.grading-row--head) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 13px;
    border-radius: 16px;
  }

  .student-cell {
    display: grid;
    grid-column: span 1;
    gap: 5px;
    min-width: 0;
  }

  .student-cell:first-child {
    grid-column: 1 / -1;
  }

  .student-cell:last-child {
    align-self: end;
    justify-self: end;
  }

  .student-cell__label {
    display: block;
    color: var(--student-copy);
    font-size: 10px;
    font-weight: 850;
  }

  .student-cell > input,
  .student-cell > select {
    width: 100%;
    min-width: 0;
  }

  .record-table-wrap,
  .admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

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

  .student-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .student-table tbody {
    display: grid;
    gap: 12px;
  }

  .student-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--student-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 25px -25px rgba(47,36,111,.55);
  }

  .student-table tbody td,
  .student-table tbody tr:nth-child(even) td,
  .student-table tbody tr:hover td {
    display: grid;
    grid-template-columns: minmax(84px, 35%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border-bottom: 1px solid #eeebf5;
    background: #fff;
    text-align: start;
  }

  .student-table tbody td::before {
    content: attr(data-label);
    color: var(--student-muted);
    font-size: 9px;
    font-weight: 880;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  .student-table tbody td:last-child {
    border-bottom: 0;
  }

  .student-table input,
  .student-table select {
    width: 100%;
    min-width: 0;
  }

  .pro-tabs button {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .header-actions {
    gap: 5px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 12px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .pro-header-link {
    display: none;
  }

  .student-goal {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .student-goal > span {
    width: 40px;
    height: 40px;
  }

  .course-row:not(.course-row--head),
  .grading-row:not(.grading-row--head) {
    grid-template-columns: 1fr;
  }

  .student-cell,
  .student-cell:first-child {
    grid-column: 1;
  }

  .pro-tabs {
    grid-template-columns: 1fr 1fr;
    margin-inline: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
