:root {
  color-scheme: light;
  font-family: "Montserrat", Arial, sans-serif;

  --ink: #1f1b17;
  --cream: #f3eadb;
  --paper: #faf4e9;
  --sand: #e7d9c0;
  --espresso: #2a2320;
  --marigold: #f5a623;
  --ember: #e07a1f;
  --terracotta: #d9472b;
  --honey: #fbd38a;
  --slate-blue: #3c6e8f;
  --coffee: #5c5047;
  --taupe: #8a7e6f;

  --success: #3e8e5a;
  --success-bg: #e4f0e7;
  --warning: #9d6c08;
  --warning-bg: #fbefd2;
  --error: #c0392b;
  --error-bg: #f7e0dc;
  --info-bg: #e1eaf0;

  --border: #e3d6bf;
  --border-strong: #c9bca8;
  --grad-sunrise: linear-gradient(135deg, #f5a623, #e07a1f);
  --grad-ink: linear-gradient(160deg, #2a2320, #1f1b17);
  --grad-paper: linear-gradient(180deg, #faf4e9, #f3eadb);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 3px rgb(31 27 23 / 6%);
  --shadow-sm: 0 2px 6px rgb(31 27 23 / 8%);
  --shadow-md: 0 6px 16px rgb(31 27 23 / 10%);
  --shadow-lg: 0 12px 32px rgb(31 27 23 / 14%);
  --focus-ring: 0 0 0 3px rgb(245 166 35 / 45%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgb(251 211 138 / 32%), transparent 34%),
    linear-gradient(180deg, #fcf7ee 0, var(--cream) 46%, #eee2cb 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

::selection {
  color: var(--ink);
  background: var(--marigold);
}

.shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
}

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 26px;
}

.brand-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgb(31 27 23 / 8%);
  border-radius: 16px;
  color: var(--ink);
  background: var(--grad-sunrise);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-copy {
  min-width: 0;
  flex: 1;
}

.auth-logout {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--coffee);
  background: rgb(250 244 233 / 82%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.auth-shell {
  display: grid;
  max-width: 520px;
  gap: 16px;
  margin: 4vh auto 0;
}

.auth-intro {
  padding: 8px 4px 2px;
}

.auth-intro h2 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 6vw, 34px);
}

.auth-intro p,
.auth-help,
.password-hint {
  color: var(--coffee);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form {
  padding: 22px;
}

.auth-form input {
  min-height: 48px;
  font-size: 16px;
}

.auth-help {
  padding: 0 8px;
  text-align: center;
}

.student-preview-button--access {
  border-color: rgb(245 166 35 / 48%);
  color: var(--ink);
  background: var(--warning-bg);
}

.web-access-card {
  display: grid;
  gap: 14px;
  margin: 12px 0 18px;
  padding: 20px;
  border: 1px solid rgb(62 142 90 / 24%);
  border-radius: var(--radius-xl);
  background: var(--success-bg);
  box-shadow: var(--shadow-sm);
}

.web-access-card h3 {
  margin-top: 7px;
}

.web-access-card label {
  display: grid;
  gap: 7px;
  color: var(--coffee);
  font-size: 12px;
  font-weight: 700;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-row input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgb(62 142 90 / 25%);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--paper);
}

.copy-row button {
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-md);
  color: white;
  background: var(--success);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.web-access-card p {
  margin: 0;
  color: var(--coffee);
  font-size: 12px;
  line-height: 1.55;
}

.student-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.student-create-form .button {
  min-height: 45px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--coffee);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--marigold);
  content: "";
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  overflow: hidden;
  margin: 4px 0 0;
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  margin-bottom: 13px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 7px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.018em;
}

.stack {
  display: grid;
  gap: 12px;
}

.section {
  margin-top: 26px;
}

.card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.card--accent {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  color: var(--ink);
  background: var(--grad-sunrise);
  box-shadow: var(--shadow-lg);
}

.card--accent::after {
  position: absolute;
  top: -42px;
  right: -26px;
  width: 112px;
  height: 112px;
  border: 22px solid rgb(250 244 233 / 18%);
  border-radius: 50%;
  content: "";
}

.card--accent .meta {
  color: rgb(31 27 23 / 66%);
}

.card--accent .pill {
  color: var(--ink);
  background: rgb(250 244 233 / 54%);
}

.meta,
.muted {
  color: var(--taupe);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.body-copy {
  margin: 11px 0 0;
  color: var(--coffee);
  white-space: pre-wrap;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.58;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: var(--honey);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pill--submitted {
  color: var(--warning);
  background: var(--warning-bg);
}

.pill--accepted {
  color: var(--success);
  background: var(--success-bg);
}

.pill--revision {
  color: var(--error);
  background: var(--error-bg);
}

.empty {
  padding: 26px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  color: var(--coffee);
  background: rgb(250 244 233 / 46%);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

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

.practice-feature {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 106px;
  border: 1px solid rgb(250 244 233 / 14%);
  border-radius: var(--radius-2xl);
  padding: 18px;
  color: var(--paper);
  background: var(--grad-ink);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  text-align: left;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.practice-feature:hover {
  box-shadow: 0 18px 40px rgb(31 27 23 / 19%);
  transform: translateY(-3px);
}

.practice-feature .menu-icon {
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--grad-sunrise);
}

.practice-feature__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.practice-feature__copy > span {
  color: var(--marigold);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.practice-feature__copy strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-feature__copy small {
  color: #d9c9ae;
  font-size: 10px;
  font-weight: 550;
}

.practice-feature__arrow {
  color: var(--marigold);
  font-size: 23px;
  transition: transform 0.3s var(--ease);
}

.practice-feature:hover .practice-feature__arrow {
  transform: translateX(4px);
}

.menu-tile {
  display: grid;
  min-height: 152px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 17px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}

.menu-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.menu-tile:active {
  transform: scale(0.98);
}

.menu-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  color: var(--ink);
  background: var(--honey);
}

.menu-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.menu-icon--lessons {
  color: var(--slate-blue);
  background: var(--info-bg);
}

.menu-icon--payment {
  color: var(--marigold);
  background: var(--espresso);
}

.menu-icon--results {
  color: var(--ink);
  background: var(--grad-sunrise);
}

.menu-tile--results {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  grid-column: 1 / -1;
  gap: 14px;
  min-height: 98px;
}

.menu-tile--results > .menu-icon {
  align-self: center;
}

.menu-tile__copy {
  display: grid;
  align-self: center;
  gap: 5px;
  min-width: 0;
}

.menu-tile__arrow {
  align-self: center;
  color: var(--ember);
  font-size: 22px;
  transition: transform 0.3s var(--ease);
}

.menu-tile--results:hover .menu-tile__arrow {
  transform: translateX(4px);
}

.menu-tile strong {
  align-self: end;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.menu-value {
  color: var(--taupe);
  font-size: 11px;
  font-weight: 550;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 2px;
  font-size: 23px;
}

.back-button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 21px;
  transition: background-color 0.2s, transform 0.3s var(--ease);
}

.back-button:hover {
  background: var(--marigold);
  transform: translateX(-2px);
}

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

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

.stat-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.stat-card strong {
  overflow-wrap: anywhere;
  color: var(--slate-blue);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.stat-card span {
  color: var(--taupe);
  font-size: 10px;
  font-weight: 600;
}

.balance-card {
  position: relative;
  display: grid;
  overflow: hidden;
  gap: 9px;
  padding: 22px;
  border: 1px solid rgb(250 244 233 / 14%);
  border-radius: var(--radius-2xl);
  color: var(--paper);
  background: var(--grad-ink);
  box-shadow: var(--shadow-lg);
}

.balance-card::after {
  position: absolute;
  right: -54px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(245 166 35 / 26%), transparent 68%);
  content: "";
}

.balance-card--warning {
  border-color: rgb(217 71 43 / 58%);
}

.balance-card > span {
  color: #d9c9ae;
  font-size: 12px;
  font-weight: 600;
}

.balance-card > strong {
  position: relative;
  z-index: 1;
  color: var(--marigold);
  font-size: clamp(30px, 9vw, 42px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.balance-details {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 5px;
  color: #d9c9ae;
  font-size: 11px;
  font-weight: 550;
}

.notice {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #ecd99d;
  border-radius: var(--radius-lg);
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.payment-row strong {
  font-variant-numeric: tabular-nums;
}

.payment-lessons {
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  color: var(--success);
  background: var(--success-bg);
  font-size: 11px;
  font-weight: 750;
}

.payment-note {
  grid-column: 1 / -1;
}

.practice-card > .body-copy {
  margin-bottom: 4px;
}

.practice-form,
.practice-readonly {
  display: grid;
  gap: 14px;
  margin-top: 17px;
}

.practice-question {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 11px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.practice-question__number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  background: var(--honey);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.practice-question__content {
  min-width: 0;
}

.practice-question__content > p {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.practice-form > .button {
  margin-top: 3px;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  color: var(--coffee);
  background: #fffaf1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
}

.choice-option:has(input:checked) {
  border-color: var(--marigold);
  color: var(--ink);
  background: var(--warning-bg);
  box-shadow: var(--focus-ring);
}

.choice-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: var(--marigold);
  box-shadow: none;
}

.answer-review {
  padding: 11px 12px;
  border-left: 3px solid var(--marigold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--coffee);
  background: var(--cream);
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.55;
}

.practice-sent {
  margin-top: 15px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  color: var(--success);
  background: var(--success-bg);
  font-size: 11px;
  font-weight: 650;
}

.practice-feedback {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #ecd99d;
  border-radius: var(--radius-md);
  color: var(--coffee);
  background: var(--warning-bg);
}

.practice-feedback strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 11px;
}

.practice-feedback p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.55;
}

.practice-editors {
  display: grid;
  gap: 12px;
}

.practice-editor {
  display: grid;
  gap: 11px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--cream);
}

.practice-editor legend {
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.practice-editor .row {
  margin-bottom: 0;
}

.editor-remove {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--error);
  background: var(--error-bg);
  cursor: pointer;
  font-size: 18px;
}

.editor-remove:disabled {
  opacity: 0.25;
  cursor: default;
}

.is-hidden {
  display: none !important;
}

.teacher-practice-answers {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.teacher-practice-answer {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--cream);
}

.teacher-practice-answer span {
  color: var(--taupe);
  font-size: 10px;
  line-height: 1.45;
}

.teacher-practice-answer strong {
  color: var(--ink);
  white-space: pre-wrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.stats-grid--results .stat-card strong {
  color: var(--ink);
}

.result-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.result-score {
  --score: 0;
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--marigold) calc(var(--score) * 1%), var(--sand) 0);
  text-align: center;
}

.result-score::before {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.result-score strong,
.result-score span {
  position: relative;
  z-index: 1;
}

.result-score strong {
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.result-score span {
  margin-top: 1px;
  color: var(--taupe);
  font-size: 9px;
  font-weight: 600;
}

.result-card__content {
  min-width: 0;
}

.result-breakdown {
  grid-column: 1 / -1;
  overflow: hidden;
  margin-top: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--cream);
}

.result-breakdown > summary {
  display: grid;
  min-height: 49px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}

.result-breakdown > summary::-webkit-details-marker {
  display: none;
}

.result-breakdown > summary small {
  color: var(--taupe);
  font-size: 9px;
  font-weight: 600;
}

.result-breakdown > summary i {
  color: var(--ember);
  font-size: 17px;
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.result-breakdown[open] > summary {
  border-bottom: 1px solid var(--border);
}

.result-breakdown[open] > summary i {
  transform: rotate(180deg);
}

.result-breakdown__body {
  min-width: 0;
  padding: 12px;
  animation: breakdown-open 0.32s var(--ease);
}

@keyframes breakdown-open {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
}

.result-component {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.result-component:last-child {
  border-bottom: 0;
}

.result-component__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-component__head strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.result-component__head span {
  color: var(--slate-blue);
  white-space: nowrap;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.result-component__bar {
  height: 5px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: var(--radius-pill);
  background: var(--sand);
}

.result-component__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--slate-blue);
}

.result-component p {
  margin: 8px 0 0;
  color: var(--coffee);
  white-space: pre-wrap;
  font-size: 10px;
  line-height: 1.55;
}

.result-breakdown--empty {
  padding: 12px 14px;
  color: var(--taupe);
  font-size: 10px;
}

.result-breakdown--teacher {
  margin-top: 10px;
}

.result-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  scrollbar-width: thin;
}

.result-breakdown .result-table-wrap {
  border: 0;
  border-radius: var(--radius-md);
}

.result-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--coffee);
  font-size: 10px;
  line-height: 1.5;
}

.result-table th,
.result-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.result-table th {
  color: var(--taupe);
  background: var(--cream);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.result-table tbody tr:hover td {
  background: rgb(245 166 35 / 4%);
}

.result-table td strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

.result-table__score {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.result-table__percent,
.result-table__award {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  color: var(--ink);
  background: var(--sand);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.result-table__award {
  color: var(--ember);
  background: rgb(245 166 35 / 14%);
}

.result-table__feedback {
  min-width: 230px;
  white-space: pre-wrap;
}

.result-table--history {
  min-width: 660px;
}

.result-card__content h3 {
  margin: 3px 0 9px;
}

.result-progress {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--sand);
}

.result-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-sunrise);
}

.certificate-list {
  display: grid;
  gap: 14px;
}

.certificate-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(250 244 233 / 14%);
  border-radius: var(--radius-2xl);
  padding: 24px;
  color: var(--paper);
  background: var(--grad-ink);
  box-shadow: var(--shadow-lg);
}

.certificate-card::before,
.certificate-card::after {
  position: absolute;
  border: 1px solid rgb(245 166 35 / 22%);
  border-radius: 50%;
  content: "";
}

.certificate-card::before {
  top: -62px;
  right: -42px;
  width: 170px;
  height: 170px;
}

.certificate-card::after {
  top: -37px;
  right: -17px;
  width: 118px;
  height: 118px;
}

.certificate-seal {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 21px;
  place-items: center;
  border-radius: 16px;
  color: var(--ink);
  background: var(--grad-sunrise);
  box-shadow: 0 7px 24px rgb(245 166 35 / 22%);
}

.certificate-seal span {
  font-size: 12px;
  font-weight: 800;
}

.certificate-overline {
  margin-bottom: 7px;
  color: var(--marigold);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.certificate-card h3 {
  max-width: 82%;
  margin-bottom: 14px;
  color: var(--paper);
  font-size: 20px;
}

.certificate-card p {
  margin-bottom: 8px;
  color: #d9c9ae;
  font-size: 12px;
  line-height: 1.5;
}

.certificate-card p strong {
  color: var(--paper);
}

.certificate-meta {
  color: #d9c9ae;
  font-size: 9px;
  font-weight: 550;
}

.certificate-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 18px;
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  color: var(--ink);
  background: var(--marigold);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.certificate-link--muted {
  color: #d9c9ae;
  background: rgb(250 244 233 / 8%);
}

.teacher-result-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.result-score--small {
  width: 62px;
  height: 62px;
  background: var(--grad-sunrise);
}

.result-score--small::before {
  inset: 6px;
}

.teacher-result-card .row {
  margin-bottom: 4px;
}

.toggle-row {
  display: flex;
  min-height: 44px;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--cream);
  cursor: pointer;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--marigold);
  box-shadow: none;
}

.certificate-fields {
  display: grid;
  gap: 12px;
  border-left: 3px solid var(--marigold);
  padding-left: 13px;
}

.form-subhead {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.form-subhead strong {
  color: var(--ink);
  font-size: 13px;
}

.form-subhead span {
  color: var(--taupe);
  font-size: 10px;
  line-height: 1.45;
}

.result-component-editor {
  display: grid;
  gap: 11px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--cream);
}

.result-component-editor legend {
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.result-component-editor .row {
  margin-bottom: 0;
}

.student-record-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  align-items: stretch;
  gap: 18px;
}

.student-record-picker__action {
  display: grid;
  align-content: end;
  gap: 7px;
}

.student-record-picker__action p {
  margin: 0 4px;
  color: var(--taupe);
  font-size: 9px;
  line-height: 1.55;
}

.student-preview-launch {
  width: 100%;
}

.student-record {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.student-record-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: var(--radius-xl);
  padding: 20px;
  color: var(--paper);
  background: var(--grad-ink);
  box-shadow: var(--shadow-md);
}

.student-record-head .eyebrow {
  color: #d9c9ae;
  font-size: 8px;
}

.student-record-head h3 {
  margin: 8px 0 3px;
  color: var(--paper);
  font-size: 20px;
}

.student-record-head .meta {
  color: #d9c9ae;
}

.student-record-head__id {
  flex: 0 0 auto;
  border: 1px solid rgb(250 244 233 / 14%);
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  color: var(--marigold);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.student-record-head__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.student-preview-button {
  padding: 10px 13px;
  border: 1px solid var(--espresso);
  border-radius: var(--radius-pill);
  color: var(--paper);
  background: var(--espresso);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}

.student-preview-button:hover {
  background: var(--ember);
  transform: translateY(-1px);
}

.student-preview-banner {
  position: sticky;
  z-index: 20;
  top: max(8px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgb(245 166 35 / 42%);
  border-radius: var(--radius-lg);
  color: var(--paper);
  background: rgb(42 35 32 / 96%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.student-preview-banner div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.student-preview-banner span {
  color: var(--marigold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.student-preview-banner strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-preview-banner button {
  flex: 0 0 auto;
  padding: 9px 11px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-pill);
  color: var(--paper);
  background: rgb(255 255 255 / 8%);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.student-record-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.student-record-stats .stat-card {
  min-width: 0;
  padding: 13px 9px;
}

.student-record-stats .stat-card strong {
  font-size: 18px;
}

.student-record-stats .stat-card span {
  font-size: 7px;
  line-height: 1.35;
}

.student-record-sections {
  display: grid;
  gap: 9px;
}

.student-record-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.student-record-section > summary {
  display: grid;
  min-height: 54px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 750;
}

.student-record-section > summary::-webkit-details-marker {
  display: none;
}

.student-record-section > summary small {
  color: var(--taupe);
  font-size: 8px;
  font-weight: 600;
}

.student-record-section > summary i {
  color: var(--ember);
  font-size: 17px;
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.student-record-section[open] > summary {
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}

.student-record-section[open] > summary i {
  transform: rotate(180deg);
}

.student-record-section__body {
  padding: 13px;
  animation: breakdown-open 0.32s var(--ease);
}

.record-list {
  display: grid;
  gap: 8px;
}

.record-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--cream);
}

.record-item > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 11px;
}

.record-item p {
  margin: 6px 0 0;
  color: var(--coffee);
  white-space: pre-wrap;
  font-size: 9px;
  line-height: 1.5;
}

.student-record-table {
  min-width: 650px;
}

.student-record-results {
  margin-top: 12px;
}

.result-total {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgb(245 166 35 / 28%);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  color: var(--coffee);
  background: rgb(245 166 35 / 8%);
  font-size: 10px;
  line-height: 1.45;
}

.result-total > strong {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.result-total b {
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  color: var(--ink);
  background: var(--marigold);
  font-size: 10px;
}

.form {
  display: grid;
  gap: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--coffee);
  font-size: 11px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  padding: 12px 13px;
  color: var(--ink);
  background: #fffaf1;
  font-size: 14px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--marigold);
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  color: var(--ink);
  background: var(--marigold);
  box-shadow: 0 2px 0 rgb(31 27 23 / 12%), var(--shadow-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.button:hover {
  background: var(--ember);
  box-shadow: 0 3px 0 rgb(31 27 23 / 14%), var(--shadow-md);
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.button--quiet {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.button--danger {
  color: var(--error);
  background: var(--error-bg);
  box-shadow: inset 0 0 0 1px rgb(192 57 43 / 24%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.actions .button {
  flex: 1 1 120px;
}

.submission-form {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.submission-preview {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--cream);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 12px 17px;
  border: 1px solid rgb(250 244 233 / 14%);
  border-radius: var(--radius-pill);
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms var(--ease);
  font-size: 12px;
  font-weight: 650;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.error {
  padding: 22px;
  border: 1px solid rgb(192 57 43 / 18%);
  border-radius: var(--radius-xl);
  color: var(--error);
  background: var(--error-bg);
  line-height: 1.55;
}

.skeleton {
  display: grid;
  gap: 12px;
}

.skeleton div {
  height: 110px;
  border-radius: var(--radius-xl);
  background: linear-gradient(90deg, var(--paper), var(--sand), var(--paper));
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    padding-inline: 12px;
  }

  .card,
  .menu-tile {
    border-radius: 20px;
  }

  .result-table th,
  .result-table td {
    padding: 10px 11px;
  }

  .result-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-record-picker {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .student-record-head__actions {
    width: 100%;
    align-items: stretch;
  }

  .student-record-head__id {
    align-self: flex-start;
  }

  .student-preview-button {
    width: 100%;
  }

  .student-preview-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .student-preview-banner button {
    width: 100%;
  }

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

  .student-create-form,
  .copy-row {
    grid-template-columns: 1fr;
  }

  .copy-row button {
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-tile {
    min-height: 126px;
  }

  .menu-tile--results {
    grid-column: auto;
  }

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

  .stats-grid--two {
    grid-template-columns: 1fr 1fr;
  }
}

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