:root {
  --blue: #2d57c5;
  --blue-dark: #244ab0;
  --ink: #131a2a;
  --muted: #727887;
  --line: #e5e7ec;
  --canvas: #f7f8fc;
  --green: #2f8b45;
  --panel-shadow: 0 2px 4px rgb(24 35 66 / 6%);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Satoshi", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

.sidebar {
  position: fixed;
  inset: 8px auto 8px 8px;
  z-index: 5;
  width: 220px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  transition: width 160ms ease;
}

.brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.brand-mark { width: 27px; height: 27px; display: inline-grid; place-items: center; border: 3px solid #fff; border-radius: 50%; font-size: 20px; font-weight: 800; line-height: 1; transform: rotate(-8deg); }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.07em; }
.collapse-button { width: 29px; height: 29px; border: 0; border-radius: 7px; background: #fff; color: var(--blue); font-size: 23px; line-height: 1; }

.sidebar-nav { overflow: auto; }
.nav-section-label { margin: 0 6px 8px; color: rgb(255 255 255 / 62%); font-size: 10px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.nav-section-label:not(:first-child) { margin-top: 20px; }
.nav-list { display: grid; gap: 3px; }
.nav-item, .profile-link { width: 100%; min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 8px; background: transparent; color: #fff; text-align: left; }
.nav-item:hover, .profile-link:hover { background: rgb(255 255 255 / 10%); }
.nav-item.spotlight, .nav-item.active, .profile-link { background: #fff; color: var(--blue); }
.nav-icon { width: 20px; flex: 0 0 20px; display: inline-grid; place-items: center; font-size: 20px; line-height: 1; }
.nav-copy { min-width: 0; display: grid; gap: 2px; font-size: 15px; font-weight: 500; }
.nav-copy small { color: #8a92a4; font-size: 11px; font-weight: 400; white-space: nowrap; }
.profile-link { margin-top: auto; min-height: 56px; }
.sidebar-collapsed { width: 72px; }
.sidebar-collapsed .brand-name, .sidebar-collapsed .nav-copy, .sidebar-collapsed .nav-section-label { display: none; }
.sidebar-collapsed .brand-row { justify-content: center; }
.sidebar-collapsed .nav-item, .sidebar-collapsed .profile-link { justify-content: center; padding-inline: 0; }

.content { min-height: 100vh; margin-left: 236px; padding: 27px 24px 56px; }
.content-frame { width: min(100%, 704px); margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; gap: 12px; min-height: 42px; }
.back-link, .inline-back { border: 0; background: transparent; color: #717988; }
.back-link { justify-self: start; padding: 0; font-size: 13px; }
.back-link:hover, .inline-back:hover { color: var(--ink); }
.page-title { text-align: left; }
.page-header > div:last-child { flex: 1; }
.page-title h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.page-title p { margin: 4px 0 0; color: #7d8492; font-size: 12px; }

.panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--panel-shadow); }
.setup-panel, .question-panel { margin-top: 50px; padding: 32px; }
.setup-panel h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.panel-lede { margin: 7px 0 30px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 16px; }
.field, .notes-field { display: grid; gap: 8px; color: #283044; font-size: 13px; font-weight: 500; }
.field b { color: #d94b58; }
.field small, .notes-field small { color: #8c92a0; font-weight: 400; }
.field input, .field select, .notes-field textarea { width: 100%; border: 1px solid #d4d7df; border-radius: 9px; background: #fff; color: var(--ink); outline: 0; transition: border-color 120ms ease, box-shadow 120ms ease; }
.field input, .field select { height: 42px; padding: 0 14px; }
.field input::placeholder, .notes-field textarea::placeholder { color: #a8adb8; }
.field input:focus, .field select:focus, .notes-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(45 87 197 / 12%); }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.primary-button, .secondary-button { min-height: 41px; padding: 0 18px; border-radius: 7px; font-weight: 700; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); }
.primary-button:disabled { border-color: #9dadde; background: #9dadde; color: #f5f6fc; }
.primary-button span { margin-left: 12px; font-size: 20px; vertical-align: -1px; }
.secondary-button { border: 1px solid #d7d9e1; background: #fff; color: #4a5263; }
.secondary-button:hover { background: #f7f8fb; }

.question-panel { padding: 22px 32px 33px; }
.progress-head { display: flex; justify-content: space-between; color: #89909f; font-size: 12px; }
.progress-track { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #e7e8ed; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.prompt-card { margin-top: 26px; padding: 26px 24px 25px; border: 1px solid #e4e6eb; border-radius: 14px; background: #fbfcfd; }
.prompt-card h2 { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.025em; }
.prompt-card p { margin: 17px 0 0; color: #707785; font-size: 14px; line-height: 1.6; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 25px; }
.answer-button { min-height: 48px; padding: 12px 14px; border: 2px solid #dfe2e9; border-radius: 7px; background: #fff; color: #4f5665; font-weight: 700; }
.answer-button:hover, .answer-button:focus-visible { border-color: var(--blue); color: var(--blue); outline: 0; }
.inline-back { margin-top: 22px; padding: 0; }

.review-panel { margin-top: 50px; padding: 32px; }
.score-panel { padding: 31px 24px 25px; text-align: center; }
.person-summary { display: grid; justify-items: center; gap: 3px; }
.person-avatar { color: #a8adb8; font-size: 30px; line-height: 1; }
.person-summary strong { font-size: 17px; }
.person-summary > span:last-child { color: #8f95a0; font-size: 13px; }
.gpa { margin-top: 25px; color: var(--green); font-size: 64px; font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.gpa-label { margin: 6px 0 18px; color: #9a9eaa; font-size: 13px; }
.grade-badges { display: flex; justify-content: center; gap: 8px; }
.grade-badge { padding: 6px 12px; border-radius: 99px; background: #dff6e5; color: #28763a; font-size: 13px; font-weight: 700; }
.grade-badge.secondary { background: #f0f1f3; color: #404651; font-weight: 500; }
.grade-badge.grade-b { background: #fff0d4; color: #8a5c16; }
.grade-badge.grade-c { background: #ffe1e1; color: #9a3e43; }
.callout { margin-top: 22px; padding: 17px 18px 18px; border: 1px solid #e1e4e9; border-radius: 12px; background: #f8fafb; color: #242a34; }
.callout strong { font-size: 14px; }
.callout p { margin: 8px 0 0; color: #646b77; font-size: 13px; line-height: 1.55; }
.breakdown-section { margin-top: 30px; }
.breakdown-section h2 { margin: 0 0 15px; font-size: 14px; }
.breakdown-list { overflow: hidden; border: 1px solid #e5e7eb; border-radius: 11px; background: #fff; }
.breakdown-row { min-height: 44px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #eceef2; color: #646b78; font-size: 13px; }
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-pill { flex: 0 0 auto; padding: 5px 10px; border-radius: 99px; background: #e0f5e5; color: #317a40; font-size: 12px; }
.score-pill.score-b { background: #fff1d8; color: #8a631f; }
.score-pill.score-c { background: #ffe8e8; color: #9b4a4a; }
.notes-field { margin-top: 24px; }
.notes-field textarea { min-height: 86px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.review-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.help-button { position: fixed; right: 20px; bottom: 20px; z-index: 8; min-height: 42px; padding: 0 17px; border: 1px solid #214aa9; border-radius: 99px; background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgb(45 87 197 / 24%); font-size: 13px; font-weight: 500; }
.help-button span { margin-right: 8px; font-size: 16px; }
.toast { position: fixed; top: 18px; right: 20px; z-index: 20; padding: 12px 15px; border: 1px solid #d9dde5; border-radius: 9px; background: #fff; box-shadow: 0 8px 28px rgb(26 34 54 / 16%); color: #273044; }

@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar .brand-name, .sidebar .nav-copy, .sidebar .nav-section-label { display: none; }
  .sidebar .brand-row { justify-content: center; }
  .sidebar .nav-item, .sidebar .profile-link { justify-content: center; padding-inline: 0; }
  .content { margin-left: 88px; }
}

@media (max-width: 620px) {
  .content { margin-left: 0; padding: 20px 14px 100px; }
  .sidebar { inset: 8px auto 8px 8px; width: 58px; }
  .sidebar .collapse-button { display: none; }
  .content-frame { width: 100%; }
  .page-header { gap: 8px; }
  .page-title h1 { font-size: 19px; }
  .setup-panel, .question-panel { margin-top: 34px; padding: 22px 18px 24px; }
  .form-grid, .answer-grid { grid-template-columns: 1fr; }
  .form-grid { gap: 14px; }
  .panel-actions { margin-top: 20px; }
  .primary-button { width: 100%; }
  .question-panel .answer-button { min-height: 45px; }
  .prompt-card { padding: 20px 17px; }
  .review-panel { margin-top: 34px; padding: 18px; }
  .score-panel { padding-inline: 16px; }
  .breakdown-row { align-items: flex-start; padding-inline: 12px; }
  .breakdown-row > span { white-space: normal; }
  .review-actions { flex-direction: column-reverse; }
  .secondary-button { width: 100%; }
  .help-button { right: 14px; bottom: 14px; }
}
