@font-face {
  font-family: "Inter";
  src: url(inter.ttf) format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Apple Light Surface + Liquid Glass + Schoolhouse Emerald Accent */
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --tertiary: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.13);
  --green: #146947;
  --green-bright: #1f845b;
  --dark: #0f4c35;
  --mint: #e2f5e9;
  --mint-ink: #116442;
  --sky-bg: #e7f2ff;
  --sky-ink: #0066cc;
  --amber-bg: #fff2db;
  --amber-ink: #9c5908;
  --coral-bg: #ffe9e7;
  --coral-ink: #c62828;
  --lilac-bg: #f3ebff;
  --lilac-ink: #7239b3;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.76);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --focus: #0071e3;
  --rail: 256px;
  --r-pill: 9999px;
  --r-card: 20px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  font-synthesis: none;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a,
button,
input,
select,
textarea,
summary {
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--focus);
}

svg {
  flex-shrink: 0;
}

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

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.036em;
  line-height: 1.08;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
}

h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 660;
  letter-spacing: -0.024em;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 640;
  letter-spacing: -0.018em;
}

.num-val {
  font-variant-numeric: tabular-nums;
}

.muted-text {
  color: var(--muted);
  font-size: 0.85rem;
}

.skip-link {
  position: fixed;
  left: 14px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* =========================================================
   MACOS TAHOE LIQUID GLASS SIDEBAR & TOPBAR SHELL
   ========================================================= */

.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--glass);
  backdrop-filter: saturate(190%) blur(26px);
  -webkit-backdrop-filter: saturate(190%) blur(26px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow-y: auto;
  transition: transform 280ms var(--ease);
}

.brand,
.guest-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.036em;
}

.brand {
  padding: 20px 20px 18px;
}

.brand:hover,
.sidebar-account:hover,
.school-chip:hover,
.guest-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #21855d 0%, #135a3d 100%);
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 3px 10px -3px rgba(19, 90, 61, 0.42);
}

.school-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin: 0 14px 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.06);
}

.school-chip strong,
.sidebar-account strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 620;
  letter-spacing: -0.014em;
}

.school-chip small,
.sidebar-account small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 1px;
}

.school-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--mint);
  color: var(--mint-ink);
}

.site-nav {
  padding: 2px 12px 20px;
}

.site-nav p {
  padding: 18px 12px 6px;
  font-size: 0.69rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tertiary);
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 9px 12px;
  color: rgba(29, 29, 31, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 11px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current] {
  background: rgba(20, 105, 71, 0.11);
  color: var(--green);
  font-weight: 620;
  text-decoration: none;
}

.sidebar-account {
  margin-top: auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.sidebar-account > svg {
  margin-left: auto;
  color: var(--tertiary);
}

.avatar,
.top-avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #e5f5eb 0%, #d3ecd9 100%);
  color: var(--dark);
  font-size: 0.78rem;
  font-weight: 700;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(20, 105, 71, 0.14);
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.main-shell {
  margin-left: var(--rail);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 14;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(190%) blur(22px);
  -webkit-backdrop-filter: saturate(190%) blur(22px);
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.crumb {
  color: var(--muted);
}

.crumb-slash {
  color: rgba(0, 0, 0, 0.22);
}

.topbar > strong {
  font-weight: 620;
  letter-spacing: -0.015em;
}

.icon-btn {
  color: var(--muted);
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 6px;
  border-radius: 9px;
  transition: background-color 150ms ease, color 150ms ease;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.055);
  color: var(--ink);
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-size: 0.77rem;
  font-weight: 550;
  color: var(--ink);
}

.top-avatar {
  width: 32px;
  height: 32px;
}

.top-avatar:hover {
  text-decoration: none;
}

.page {
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(22px, 2.6vw, 38px) clamp(18px, 3vw, 44px) 56px;
}

/* =========================================================
   DASHBOARD HERO, STAT TILES & APPLE CARDS
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 178px;
  border-radius: 24px;
  background: linear-gradient(135deg, #104231 0%, #165d43 100%);
  color: #ffffff;
  margin-bottom: 22px;
  box-shadow:
    0 20px 44px -22px rgba(16, 66, 49, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-art {
  position: absolute;
  inset: 0 0 0 28%;
  z-index: -1;
  background:
    linear-gradient(90deg, #104231 0%, #104231eb 16%, #1042316b 46%, #10423108 82%),
    url(campus.webp) center 55% / cover no-repeat;
  filter: saturate(0.8);
}

.hero-content {
  padding: 30px 34px;
  max-width: 68%;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-weight: 540;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 2.95rem);
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero p {
  font-size: 0.96rem;
  color: rgba(235, 246, 239, 0.9);
  line-height: 1.5;
  margin-top: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(185px, 100%), 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat,
.card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--r-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 24px -12px rgba(15, 23, 42, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.03);
}

.stat {
  padding: 18px 20px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

a.stat:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 30px -14px rgba(15, 23, 42, 0.14),
    0 2px 6px rgba(15, 23, 42, 0.04);
  text-decoration: none;
}

.stat-wide {
  grid-column: span 2;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--muted);
}

.tile {
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mint {
  background: linear-gradient(180deg, #e5f6ec 0%, #d4eedf 100%);
  color: var(--mint-ink);
}

.sky {
  background: linear-gradient(180deg, #e8f2ff 0%, #d6e8ff 100%);
  color: var(--sky-ink);
}

.peach {
  background: linear-gradient(180deg, #fff3df 0%, #fce6c2 100%);
  color: var(--amber-ink);
}

.lilac {
  background: linear-gradient(180deg, #f3ebff 0%, #e7d9ff 100%);
  color: var(--lilac-ink);
}

.coral {
  background: linear-gradient(180deg, #ffecea 0%, #ffd8d4 100%);
  color: var(--coral-ink);
}

.stat > strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.036em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat small,
.quick-list small,
.section-top p,
.card small,
.page-header p {
  color: var(--muted);
}

.stat small,
.quick-list small,
.activity-line small {
  font-size: 0.8rem;
}

.card {
  padding: 22px 24px;
  margin-bottom: 18px;
  min-width: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr);
  gap: 18px;
}

.section-top,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section-top p {
  font-size: 0.88rem;
  margin-top: 4px;
}

.section-top select {
  font-size: 0.82rem;
  padding: 7px 28px 7px 12px;
  min-height: 36px;
}

/* Charts */

.chart-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  margin: 18px 0 14px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--green);
}

.plot {
  display: flex;
  height: 155px;
  margin: 0 0 34px;
}

.axis {
  width: 38px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0 1px;
  color: var(--tertiary);
  font-size: 0.7rem;
  line-height: 1;
}

.bar-grid {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 6px;
  background: repeating-linear-gradient(to top, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 25%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bar-column {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: end;
  max-width: 60px;
}

.bar-column > small {
  position: absolute;
  top: calc(100% + 7px);
  font-size: 0.72rem;
}

.bar {
  position: relative;
  width: 52%;
  min-width: 5px;
  max-width: 30px;
  height: var(--v);
  background: linear-gradient(180deg, #74be95 0%, #9bd3b3 100%);
  border-radius: 6px 6px 2px 2px;
  transition: opacity 160ms ease;
}

.bar.latest {
  background: linear-gradient(180deg, #1d7b55 0%, #146947 100%);
}

.bar span {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.74rem;
  background: var(--ink);
  color: #fff;
  z-index: 2;
}

.bar:hover span,
.bar:focus span {
  display: block;
}

.chart-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.chart-foot strong {
  color: var(--green);
}

.empty-chart {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
}

/* Lists */

.quick-list {
  margin-top: 10px;
}

.quick-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  margin: 0 -8px;
  border-radius: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
  color: var(--ink);
  transition: background-color 150ms var(--ease);
}

.quick-list a:hover {
  background: #f5f5f7;
  text-decoration: none;
}

.quick-list a:last-child {
  border-bottom: 0;
}

.quick-list strong,
.activity-line strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.quick-list small,
.activity-line small {
  display: block;
  margin-top: 2px;
}

.quick-list a > svg {
  margin-left: auto;
  color: var(--tertiary);
}

.activity-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.activity-line:last-child {
  border-bottom: 0;
}

.activity-line time,
.activity-line > span:last-child {
  color: var(--muted);
  margin-left: auto;
  font-size: 0.82rem;
}

.text-link {
  font-size: 0.85rem;
  font-weight: 600;
}

.recent .section-top {
  margin-bottom: 6px;
}

.sidebar-hidden .sidebar {
  display: none;
}

.sidebar-hidden .main-shell {
  margin-left: 0;
}

.scrim {
  display: none;
}

/* =========================================================
   HEADERS, BUTTONS, FORMS & INPUTS (APPLE HIG PILLS)
   ========================================================= */

.page-header {
  margin: 2px 0 22px;
}

.page-header p {
  margin-top: 6px;
  font-size: 0.94rem;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 660;
  margin-bottom: 6px;
}

.eyebrow a {
  color: var(--green);
}

.toolbar,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar {
  align-items: flex-end;
  margin-bottom: 14px;
}

.form-gap {
  margin-top: 16px;
}

.form-actions {
  margin-top: 22px;
}

.btn,
button:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #ffffff;
  border-radius: var(--r-pill);
  padding: 9px 17px;
  line-height: 1.2;
  font-size: 0.88rem;
  font-weight: 580;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.06);
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 140ms var(--ease);
}

.btn:active,
button:not([class]):active {
  transform: scale(0.975);
}

.btn:hover,
button:not([class]):hover {
  background: #f5f5f7;
  text-decoration: none;
}

.btn-primary,
button.btn-primary {
  background: linear-gradient(180deg, #1d7b55 0%, #135d3f 100%);
  color: #ffffff;
  border-color: rgba(12, 72, 47, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 8px 18px -6px rgba(19, 93, 63, 0.42);
}

.btn-primary:hover,
button.btn-primary:hover {
  background: linear-gradient(180deg, #21865d 0%, #156646 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 12px 24px -6px rgba(19, 93, 63, 0.48);
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.btn-dark:hover {
  background: #333336;
  color: #ffffff;
}

.btn-subtle {
  background: #f5f5f7;
  border-color: transparent;
  box-shadow: none;
  color: var(--muted);
}

.btn-subtle:hover {
  background: #ebebef;
  color: var(--ink);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
}

.btn:disabled,
button:disabled {
  opacity: 0.48;
  cursor: default;
  transform: none;
}

.field,
label {
  font-weight: 560;
  font-size: 0.84rem;
  color: var(--ink);
}

.field,
.form-grid > label,
form p {
  display: grid;
  gap: 6px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border: 1px solid var(--line-strong);
  background-color: #ffffff;
  color: var(--ink);
  border-radius: 11px;
  min-height: 40px;
  padding: 8px 12px;
  max-width: 100%;
  font-size: 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3.5px rgba(0, 113, 227, 0.18);
  outline: none;
}

input[aria-invalid="true"] {
  border-color: var(--coral-ink);
  background: #fff7f6;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%236e6e73' fill='none' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

select::picker-icon {
  display: none;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.form-grid > .btn {
  align-self: end;
}

.form-grid p,
.stack-form p {
  margin: 0 0 14px;
}

.helptext,
form small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.79rem;
  line-height: 1.45;
}

.helptext ul {
  margin: 0;
  padding-left: 20px;
}

.stack-form {
  max-width: 650px;
}

.stack-form p > input,
.stack-form p > select {
  width: 100%;
}

.compact-wide {
  max-width: 820px;
}

/* =========================================================
   TABLES & SEMANTIC APPLE BADGES
   ========================================================= */

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: 15px;
  background: #ffffff;
}

.data-table,
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.89rem;
}

th {
  color: var(--tertiary);
  background: #fafafa;
  font-size: 0.73rem;
  font-weight: 630;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

th small {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
  vertical-align: middle;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafafb;
}

td a {
  font-weight: 580;
}

td small {
  display: block;
  color: var(--muted);
  font-size: 0.79rem;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.cell-actions .toolbar {
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-pill);
  padding: 4px 11px;
  background: var(--mint);
  color: var(--mint-ink);
  font-size: 0.77rem;
  font-weight: 620;
  white-space: nowrap;
}

.badge.amber {
  background: var(--amber-bg);
  color: var(--amber-ink);
}

.badge.coral {
  background: var(--coral-bg);
  color: var(--coral-ink);
}

.badge.sky {
  background: var(--sky-bg);
  color: var(--sky-ink);
}

.badge.lilac {
  background: var(--lilac-bg);
  color: var(--lilac-ink);
}

.badge.neutral {
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
}

.badge-row,
.mini-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.card > h2 {
  margin-bottom: 14px;
}

.empty-state {
  padding: 22px 6px;
  color: var(--muted);
  font-size: 0.91rem;
}

.empty-panel {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 42px 20px;
}

.empty-panel p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.92rem;
}

/* =========================================================
   NEW APPLE WORKFLOW COMPONENTS (ATTENDANCE / EXAMS / ASSIGNMENTS)
   ========================================================= */

.segmented-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(118, 118, 128, 0.11);
}

.segmented-links a {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 0.83rem;
  font-weight: 560;
  color: rgba(29, 29, 31, 0.72);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}

.segmented-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.segmented-links a.is-active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 630;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
}

.date-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.date-stepper input[type="date"] {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.85rem;
}

/* 1-Tap Apple Segmented Radio Pills for Attendance & Assignments */

.pill-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #f2f2f5;
  border: 1px solid rgba(0, 0, 0, 0.045);
}

.pill-choice {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.pill-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pill-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  min-width: 72px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--muted);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease), transform 120ms var(--ease);
  user-select: none;
}

.pill-choice:hover span {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.pill-choice input:focus-visible + span {
  outline: 2.5px solid var(--focus);
  outline-offset: 1px;
}

.pill-choice.tone-present input:checked + span,
.pill-choice.tone-submitted input:checked + span {
  background: #146947;
  color: #ffffff;
  font-weight: 630;
  box-shadow: 0 3px 10px -2px rgba(20, 105, 71, 0.42);
}

.pill-choice.tone-late input:checked + span {
  background: #d97706;
  color: #ffffff;
  font-weight: 630;
  box-shadow: 0 3px 10px -2px rgba(217, 119, 6, 0.38);
}

.pill-choice.tone-absent input:checked + span,
.pill-choice.tone-missing input:checked + span {
  background: #dc2626;
  color: #ffffff;
  font-weight: 630;
  box-shadow: 0 3px 10px -2px rgba(220, 38, 38, 0.38);
}

.pill-choice.tone-excused input:checked + span {
  background: #0071e3;
  color: #ffffff;
  font-weight: 630;
  box-shadow: 0 3px 10px -2px rgba(0, 113, 227, 0.38);
}

.pill-choice.tone-pending input:checked + span {
  background: #ffffff;
  color: var(--ink);
  font-weight: 630;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* Floating Liquid Glass Sticky Save Bar */

.sticky-bar {
  position: sticky;
  bottom: 16px;
  z-index: 12;
  margin-top: 18px;
  padding: 13px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 16px 38px -14px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.sticky-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.sticky-summary strong {
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}

.sticky-summary small {
  color: var(--muted);
  font-size: 0.83rem;
}

/* Progress bars */

.progress-wrap {
  display: grid;
  gap: 6px;
}

.progress-top {
  margin-bottom: 18px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.progress-head strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #1b7f56 0%, #269d6e 100%);
  transition: width 320ms var(--ease);
}

.score-bar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-track {
  width: 72px;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: inline-block;
  flex-shrink: 0;
}

.mini-fill {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--green-bright);
}

/* Publication Readiness Checklist */

.publish-panel.is-ready {
  background: linear-gradient(180deg, #f3fbf6 0%, #ffffff 100%);
  border-color: rgba(20, 105, 71, 0.22);
}

.readiness-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.readiness-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #f8f8fa;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.readiness-list li.is-done {
  background: rgba(226, 245, 233, 0.55);
  border-color: rgba(20, 105, 71, 0.14);
}

.readiness-list li > a {
  margin-left: auto;
}

.readiness-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e5e5ea;
  color: var(--muted);
  flex-shrink: 0;
}

.readiness-list li.is-done .readiness-dot {
  background: var(--green);
  color: #ffffff;
}

.readiness-list strong {
  display: block;
  font-size: 0.9rem;
}

.readiness-list small {
  display: block;
  margin-top: 2px;
}

/* Quick Chips & Mark Sheet */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.quick-chip {
  border: 1px solid var(--line);
  background: #f5f5f7;
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 560;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.quick-chip:hover {
  background: var(--mint);
  border-color: rgba(20, 105, 71, 0.25);
  color: var(--dark);
}

.mark-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mark-input {
  width: 78px;
  min-height: 36px;
  padding: 6px 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-weight: 600;
}

.abs-toggle {
  border: 1px solid var(--line-strong);
  background: #f5f5f7;
  color: var(--muted);
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 0.75rem;
  font-weight: 630;
  line-height: 1;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.abs-toggle:hover {
  color: var(--ink);
  background: #ececf0;
}

.abs-toggle.is-active {
  background: var(--coral-bg);
  color: var(--coral-ink);
  border-color: rgba(198, 40, 40, 0.28);
}

.score-input {
  width: 84px;
  min-height: 36px;
  padding: 6px 9px;
  font-variant-numeric: tabular-nums;
}

.note-input {
  width: 100%;
  min-width: 150px;
  min-height: 36px;
  padding: 6px 10px;
}

/* Assignment Board Cards */

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 16px;
  margin-top: 14px;
}

.assignment-card {
  background: #fafafc;
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.assignment-card:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(15, 23, 42, 0.14);
}

.assignment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assignment-card h3 {
  font-size: 1.08rem;
}

.assignment-card h3 a {
  color: var(--ink);
}

.assignment-card h3 a:hover {
  color: var(--green);
  text-decoration: none;
}

.assignment-excerpt {
  font-size: 0.87rem;
  line-height: 1.52;
  color: var(--muted);
}

.assignment-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.assignment-card-foot small {
  white-space: nowrap;
}

.assignment-card-foot .toolbar {
  gap: 6px;
  flex-wrap: nowrap;
}

.register-controls input[type="search"] {
  min-width: 240px;
}

.instructions-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}

/* =========================================================
   STUDENT PERSPECTIVE & TWO-WAY ASSIGNMENT SUBMISSION
   ========================================================= */

.student-task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.student-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border-radius: 16px;
  background: #f8f8fa;
  border: 1px solid rgba(0, 0, 0, 0.055);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.student-task-row:hover {
  background: #ffffff;
  border-color: rgba(20, 105, 71, 0.18);
  box-shadow: 0 10px 26px -18px rgba(15, 23, 42, 0.16);
}

.student-task-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.student-task-info strong {
  font-size: 0.96rem;
  font-weight: 640;
  color: var(--ink);
}

.student-task-info small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.student-submit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.student-submit-grid > .card {
  margin-bottom: 0;
}

.brief-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.brief-meta span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.brief-meta strong {
  display: block;
  font-size: 0.9rem;
  margin-top: 2px;
}

.grade-callout {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #effaf3 0%, #e1f4e8 100%);
  border: 1px solid rgba(20, 105, 71, 0.16);
}

.grade-callout > div > span {
  display: block;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
  color: var(--green);
}

.grade-callout strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--dark);
  margin-top: 4px;
}

.grade-callout strong small {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mint-ink);
}

.grade-feedback {
  padding-top: 12px;
  border-top: 1px solid rgba(20, 105, 71, 0.14);
}

.grade-feedback p {
  margin-top: 4px;
  color: var(--dark);
  font-size: 0.92rem;
  line-height: 1.5;
}

.submitted-preview {
  margin-top: 16px;
  padding: 15px 17px;
  border-radius: 14px;
  background: #f8f8fa;
  border: 1px solid rgba(0, 0, 0, 0.055);
}

.submitted-preview small {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.submitted-preview p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
}

.tracker-table .pill-group {
  flex-wrap: nowrap;
}

.tracker-table .pill-choice span {
  min-width: 60px;
  padding: 6px 10px;
  font-size: 0.79rem;
}

.upload-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8f8fa;
  border: 1.5px dashed rgba(20, 105, 71, 0.25);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.upload-box input[type="file"],
.portal-submit-form input[type="file"] {
  border: 0;
  background: transparent;
  padding: 2px 0;
  min-height: auto;
  font-size: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.attached-file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 0.83rem;
}

.feedback-pill {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(226, 245, 233, 0.65);
  border: 1px solid rgba(20, 105, 71, 0.15);
  font-size: 0.83rem;
  color: var(--dark);
  line-height: 1.45;
}

.student-work-disclosure {
  margin-top: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: #f4f8f6;
  border: 1px solid rgba(20, 105, 71, 0.14);
  max-width: 340px;
}

.student-work-disclosure > summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 620;
  color: var(--green);
}

.student-work-text {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--ink);
  white-space: normal;
}

.work-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 580;
  color: var(--ink);
}

.work-file-link:hover {
  background: var(--mint);
  border-color: rgba(20, 105, 71, 0.25);
  color: var(--dark);
  text-decoration: none;
}

/* Account-Free Student & Family Portal Segmented Tabs */

.portal-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: saturate(190%) blur(20px);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 10px 26px -14px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.portal-tabs a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 0.87rem;
  font-weight: 580;
  color: rgba(29, 29, 31, 0.74);
  white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.portal-tabs a:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.045);
  text-decoration: none;
}

.portal-tabs a.is-active {
  background: var(--ink);
  color: #ffffff;
  font-weight: 630;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.34);
}

.tab-hidden-screen {
  display: none;
}

.portal-assignment-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.portal-assignment-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: #fafafc;
  border: 1px solid rgba(0, 0, 0, 0.065);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.portal-assignment-card h3 {
  font-size: 1.05rem;
}

.portal-submit-box {
  margin-top: 4px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(20, 105, 71, 0.18);
  min-width: 0;
  max-width: 100%;
}

.portal-submit-box > summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 630;
  color: var(--green);
}

.portal-submit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

.portal-submit-form .field {
  min-width: 0;
  max-width: 100%;
}

/* Notices & Errors */

.notice,
.errorlist,
.error {
  padding: 13px 17px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--dark);
  font-size: 0.9rem;
  font-weight: 520;
  margin: 0 0 16px;
}

.errorlist,
.error,
.notice.error {
  background: var(--coral-bg);
  color: var(--coral-ink);
}

.errorlist {
  list-style: none;
}

/* =========================================================
   GUEST AUTH SHELL & PUBLIC FAMILY RESULT PORTAL (/results/)
   ========================================================= */

.guest-shell {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 68% 48% at 50% 0%, rgba(206, 238, 221, 0.58), transparent 68%),
    var(--canvas);
  padding: 28px 18px;
}

.guest-brand {
  margin-bottom: 22px;
}

.guest-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(22px);
  max-width: 460px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  padding: 32px;
  box-shadow:
    0 24px 60px -24px rgba(15, 35, 27, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.055);
}

.guest-content h1,
.compact-card h1 {
  font-size: 1.85rem;
}

.guest-content p,
.compact-card p {
  line-height: 1.52;
}

.guest-content h1 + p,
.compact-card h1 + p {
  margin: 8px 0 20px;
  color: var(--muted);
}

.guest-content .btn {
  margin-top: 6px;
}

.portal-callout {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.portal-callout strong {
  display: block;
  font-size: 0.92rem;
}

.portal-callout p {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 3px;
}

/* Public Student Result Portal */

.portal-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 72% 45% at 50% -4%, rgba(206, 238, 221, 0.58), transparent 66%),
    radial-gradient(ellipse 46% 34% at 86% 18%, rgba(214, 234, 252, 0.36), transparent 64%),
    var(--canvas);
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 18px 0;
}

.portal-nav-pill {
  max-width: 960px;
  margin: 0 auto;
  min-height: 56px;
  padding: 7px 10px 7px 14px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 12px 30px -12px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.portal-brand:hover {
  text-decoration: none;
}

.portal-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.portal-links a {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 0.86rem;
  font-weight: 540;
  color: rgba(29, 29, 31, 0.74);
}

.portal-links a:hover,
.portal-links a[aria-current="page"] {
  background: rgba(0, 0, 0, 0.055);
  color: var(--ink);
  text-decoration: none;
}

.portal-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.portal-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 580;
  color: var(--ink);
  margin-bottom: 16px;
  box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.12);
}

.portal-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
}

.portal-hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  letter-spacing: -0.042em;
}

.portal-hero h1 em {
  font-style: normal;
  background: linear-gradient(108deg, #0f4e36 0%, #1a7a54 55%, #29936d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal-hero > p {
  margin-top: 12px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.5;
}

.portal-lookup-card {
  width: 100%;
  margin-top: 26px;
  padding: 22px 24px;
  text-align: left;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 20px 50px -22px rgba(15, 35, 27, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.055);
}

.portal-lookup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.portal-samples {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-samples-label {
  font-size: 0.78rem;
  font-weight: 560;
  color: var(--muted);
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.79rem;
  color: var(--ink);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.sample-chip span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sample-chip:hover {
  background: var(--mint);
  border-color: rgba(20, 105, 71, 0.22);
  text-decoration: none;
}

.portal-alert,
.portal-empty {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-alert p,
.portal-empty p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.student-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.student-banner-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}

.exam-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 560;
}

.switch-pill small {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 650;
}

.switch-pill.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.switch-pill.is-active small {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.switch-pill:hover {
  text-decoration: none;
}

/* Executive Apple Report Card Sheet */

.report-sheet {
  padding: clamp(22px, 3vw, 34px);
}

.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.report-grade-box {
  text-align: right;
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #effaf3 0%, #dff3e7 100%);
  border: 1px solid rgba(20, 105, 71, 0.16);
  min-width: 140px;
}

.report-grade-box span {
  display: block;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
  color: var(--green);
}

.report-grade-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--dark);
  margin-top: 2px;
}

.report-grade-box small {
  display: block;
  font-size: 0.88rem;
  font-weight: 620;
  color: var(--mint-ink);
  font-variant-numeric: tabular-nums;
}

.report-student-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8f8fa;
}

.report-student-strip span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.report-student-strip strong {
  display: block;
  font-size: 0.94rem;
  margin-top: 2px;
}

.component-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.component-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f5f5f7;
  font-size: 0.8rem;
  color: var(--muted);
}

.component-pill strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.report-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.report-foot p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.portal-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.assignment-mini-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.assignment-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8f8fa;
  border: 1px solid rgba(0, 0, 0, 0.045);
}

.assignment-mini-item strong {
  display: block;
  font-size: 0.9rem;
}

.mini-note {
  margin-top: 4px;
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.45;
}

.assignment-mini-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* Setup & Utility Cards */

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
}

.setup-grid .card {
  margin: 0;
  color: var(--ink);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.setup-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(15, 23, 42, 0.14);
  text-decoration: none;
}

.setup-grid strong {
  display: block;
  margin-top: 12px;
}

.setup-grid small {
  display: block;
  margin-top: 5px;
}

.compact-card {
  max-width: 630px;
}

.compact-card .toolbar {
  margin-top: 16px;
}

.setup-key {
  display: block;
  overflow-wrap: anywhere;
  letter-spacing: 0.05em;
  margin: 12px 0;
}

.invite-output {
  width: 100%;
  margin: 8px 0;
}

.otp-code img {
  display: block;
  width: 165px;
  height: 165px;
}

.pagination {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.details-form > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green);
}

.details-form[open] > summary {
  margin-bottom: 16px;
}

.drawer-close {
  display: none;
}

.account-signin {
  margin-top: 1rem;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 1150px) {
  :root {
    --rail: 224px;
  }

  .page {
    padding-left: 22px;
    padding-right: 22px;
  }

  .stat-wide {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .drawer-close {
    position: absolute;
    right: 10px;
    top: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    border: 0;
    color: var(--ink);
    font-size: 1.35rem;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 256px;
    background: rgba(255, 255, 255, 0.94);
  }

  .main-shell {
    margin-left: 0;
  }

  .mobile-nav .sidebar {
    transform: translateX(0);
  }

  .mobile-nav .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(4px);
    border: 0;
    z-index: 15;
  }

  .sidebar-hidden .sidebar {
    display: flex;
  }

  .topbar {
    height: 58px;
  }

  .page {
    padding: 18px 16px 40px;
  }

  .dashboard-grid,
  .portal-secondary-grid,
  .student-submit-grid {
    grid-template-columns: 1fr;
  }

  .portal-lookup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page {
    padding: 14px 12px 32px;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .crumb,
  .crumb-slash,
  .portal-links {
    display: none;
  }

  .hero {
    min-height: 152px;
  }

  .hero-art {
    inset: 0;
    background:
      linear-gradient(90deg, #104231 0%, #104231f2 46%, #104231cc 78%, #10423185 100%),
      url(campus.webp) center 55% / cover no-repeat;
  }

  .hero-content {
    padding: 20px;
    max-width: 100%;
  }

  .segmented-links {
    width: 100%;
    border-radius: 16px;
  }

  .segmented-links a {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .portal-assignment-card {
    padding: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    padding: 14px 13px;
  }

  .card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .pill-choice span {
    padding: 8px 6px;
    min-width: 0;
    width: 100%;
    font-size: 0.78rem;
  }

  .register-table thead,
  .tracker-table thead {
    display: none;
  }

  .register-table tbody,
  .tracker-table tbody {
    display: grid;
  }

  .register-table tr,
  .tracker-table tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 10px;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    align-items: center;
  }

  .register-table td,
  .tracker-table td {
    padding: 0;
    border: 0;
  }

  .register-table td:nth-child(3),
  .tracker-table td:nth-child(3),
  .tracker-table td:nth-child(4),
  .tracker-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .register-table .pill-group,
  .tracker-table .pill-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .register-controls input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .sticky-bar {
    bottom: 10px;
    padding: 12px 14px;
  }

  .report-grade-box {
    text-align: left;
    width: 100%;
  }

  .student-task-row {
    flex-direction: column;
    align-items: stretch;
  }

  .student-task-row .btn {
    width: 100%;
  }

  .brief-meta {
    grid-template-columns: 1fr;
  }

  .student-work-disclosure {
    max-width: none;
  }

  .portal-tabs {
    border-radius: 18px;
    flex-wrap: wrap;
  }

  .portal-tabs a {
    flex: 1 1 auto;
    padding: 9px 12px;
    font-size: 0.81rem;
  }
}

@media print {
  .tab-hidden-screen {
    display: block !important;
  }

  body,
  .guest-shell,
  .portal-body {
    background: #ffffff !important;
  }

  .sidebar,
  .topbar,
  .scrim,
  .notice,
  .no-print,
  .skip-link,
  .guest-brand,
  .portal-header {
    display: none !important;
  }

  .main-shell,
  .page,
  .portal-main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .card,
  .guest-content,
  .report-sheet {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .table-wrap {
    overflow: visible;
    border-color: #d1d5db;
  }

  tr {
    break-inside: avoid;
  }

  button {
    display: none !important;
  }

  .layout {
    min-height: 0;
  }

  .page,
  .portal-main {
    font-size: 11pt;
  }
}
