/* ===================================================================
   Early Edge Pathways — brand stylesheet
   Palette pulled from the logo: deep navy, royal blue, light sky tint.
   =================================================================== */

/* The HTML `hidden` attribute must always win over component display rules
   (e.g. .ai-banner{display:flex} / .bubble.thinking{display:inline-flex}),
   otherwise hidden elements stay visible. */
[hidden] { display: none !important; }

:root {
  --navy: #0D2B7A;
  --navy-deep: #081B57;
  --royal: #1A4FC4;
  --blue: #2E6BE8;
  --sky: #5B9BF0;
  --tint: #EBF0FC;
  --tint-2: #F5F8FF;
  --teal: #0EA5A4;
  --amber: #E8A23C;
  --ink: #0F1B3D;
  --muted: #5B6478;
  --line: #E4EAF6;
  --bg: #F3F6FD;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(13, 43, 122, .06);
  --shadow: 0 6px 20px rgba(13, 43, 122, .08);
  --shadow-lg: 0 16px 40px rgba(13, 43, 122, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--royal); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; color: var(--ink); }
p { margin: 0 0 1em; }
small { color: var(--muted); }

/* ---------- App shell ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #cfe0ff;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark { width: 40px; height: 40px; flex: none; background: #fff; border-radius: 9px;
  padding: 5px; box-sizing: border-box; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .2px; }
.brand-sub { color: var(--sky); font-weight: 700; font-size: 1.05rem; }

.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1;
  overflow-y: auto; min-height: 0; }
.nav-section { color: #7f9bd6; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; padding: 14px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: #cfe0ff; font-weight: 500; font-size: .94rem;
  transition: background .15s, color .15s;
}
.nav-link svg { width: 19px; height: 19px; opacity: .85; flex: none; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.active { background: rgba(91, 155, 240, .22); color: #fff; box-shadow: inset 3px 0 0 var(--sky); }
.nav-link.active svg { opacity: 1; }
/* Square "Add student" CTA box, pinned to the bottom of the admin sidebar */
.nav-ctas { margin: 8px 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.nav-ctas .nav-cta { margin: 0; }
/* Owner has two CTAs (Team + Add student): stack them compact so both stay on screen */
.nav-ctas.two .nav-cta { aspect-ratio: auto; flex-direction: row; justify-content: flex-start;
  gap: 12px; padding: 12px 16px; }
.nav-ctas.two .nav-cta-icon { width: 40px; height: 40px; border-radius: 12px; }
.nav-ctas.two .nav-cta-icon svg { width: 22px; height: 22px; }

.nav-cta {
  margin: 8px 14px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: transparent;                       /* hollow — sidebar blue shows through */
  border: 1.5px solid rgba(255, 255, 255, .55);  /* thin white outline */
  color: #fff; font-weight: 700; font-size: .98rem;
  text-decoration: none; text-align: center;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.nav-cta:hover { background: rgba(255, 255, 255, .08); border-color: #fff; transform: translateY(-2px); color: #fff; }
.nav-cta.on { border-color: #fff; background: rgba(255, 255, 255, .1); }
.nav-cta-icon { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); border-radius: 14px; }
.nav-cta-icon svg { width: 26px; height: 26px; }

/* Team page: inline "reset password" disclosure */
.team-reset > summary { list-style: none; cursor: pointer; }
.team-reset > summary::-webkit-details-marker { display: none; }
.team-reset-form { display: flex; gap: 8px; margin-top: 10px; }
.team-reset-form input { flex: 1; min-width: 0; }

.sidebar-foot { padding: 18px 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .tagline { color: #9fb6e6; font-size: .8rem; font-style: italic; margin: 0; }

/* Sibling student chips on the admin student page */
.sibling-chip { display: inline-flex; align-items: center; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none;
  color: var(--ink); font-size: .85rem; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.sibling-chip:hover { border-color: var(--royal); box-shadow: var(--shadow-sm); }

/* Student "Info" card — clean label/value rows */
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row:first-child { padding-top: 2px; }
.info-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.info-val { color: var(--ink); font-size: .92rem; line-height: 1.45; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; background: var(--white); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; font-size: .9rem; }
.role-chip {
  background: var(--tint); color: var(--royal); font-weight: 700;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
}
.menu-btn { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--navy); cursor: pointer; }
.content { padding: 28px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; }
.page-head .sub { color: var(--muted); margin: 0; }

/* ---------- Hero banner ---------- */
.hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--royal) 55%, var(--blue) 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 30px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,155,240,.5), transparent 70%);
}
.hero h1, .hero h2 { color: #fff; position: relative; }
.hero p { color: #d6e4ff; margin: 0; position: relative; max-width: 640px; }
.hero .eyebrow { color: var(--sky); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 1.08rem; }
.card-sub { color: var(--muted); font-size: .9rem; margin: -8px 0 16px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-main { grid-template-columns: 1.6fr 1fr; align-items: start; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--royal); flex: none; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.teal { background: #e2f6f5; color: var(--teal); }
.stat-icon.amber { background: #fbf0dd; color: var(--amber); }
.stat-icon.navy { background: #e3e9fb; color: var(--navy); }
.stat-icon.red { background: #fdeaea; color: #c0392b; }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-label { color: var(--muted); font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .05s, box-shadow .15s, background .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--royal); color: #fff; box-shadow: 0 4px 12px rgba(26,79,196,.28); }
.btn-primary:hover { background: var(--navy); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--royal); color: var(--royal); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--tint); color: var(--royal); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-lg { padding: 13px 24px; font-size: 1rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .82rem; font-weight: 400; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  transition: border .15s, box-shadow .15s;
}
input { font-family: inherit; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(46,107,232,.15);
}
textarea { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

/* choice cards (radios that look like cards) */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice .box {
  border: 2px solid var(--line); border-radius: 12px; padding: 16px; height: 100%;
  transition: border .15s, background .15s; cursor: pointer;
}
.choice .box h4 { margin: 0 0 4px; }
.choice .box p { margin: 0; color: var(--muted); font-size: .85rem; }
.choice input:checked + .box { border-color: var(--royal); background: var(--tint); }
.choice input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(46,107,232,.15); }

.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.check-row input { width: 18px; height: 18px; accent-color: var(--royal); }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; text-transform: capitalize; }
.pill.active, .pill.confirmed { background: #e2f6f5; color: #0a7e7d; }
.pill.onboarding, .pill.requested, .pill.pending, .pill.pending_plan { background: #fbf0dd; color: #b9772a; }
.pill.cancelled, .pill.completed { background: #eef0f5; color: var(--muted); }
.pill.education { background: var(--tint); color: var(--royal); }
.pill.fitness { background: #e6f7ee; color: #1f9d57; }
.pill.general { background: #eef0f5; color: var(--muted); }
.pill.both { background: #efe7fb; color: #6b3fc0; }

/* ---------- Tasks ---------- */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--royal); border-radius: 12px; margin-bottom: 10px; }
.task.done { border-left-color: var(--teal); background: var(--tint-2); }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-check { margin-top: 2px; }
.task-check button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.task.done .task-check button { background: var(--teal); border-color: var(--teal); color: #fff; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; }
.task-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .8rem; margin-top: 3px; }
/* Formatted task/goal notes (markdown-lite rendered) */
.note-block { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.note-block p { margin: 0 0 5px; }
.note-block p:last-child { margin-bottom: 0; }
.note-block ul, .note-block ol { margin: 5px 0; padding-left: 18px; }
.note-block li { margin: 2px 0; }
.note-block strong { color: var(--ink); font-weight: 700; }

/* ---------- Tasks board (Past due / Current / Completed) ---------- */
.task-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.task-col { background: var(--tint-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 120px; }
/* Parent "Ask the AI" mini chat stream */
.ai-stream { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto;
  padding: 2px; }
.ai-stream:empty { display: none; }
.ai-stream .bubble { max-width: 92%; }
.ai-stream .bubble.user { align-self: flex-end; }
.ai-stream .bubble.assistant { align-self: flex-start; }

/* Password-policy checklist */
.pw-rules { list-style: none; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--tint-2); font-size: .82rem; }
.pw-rules li { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 2px 0; }
.pw-rules .pw-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cdd5e2;
  flex: none; position: relative; transition: all .15s; }
.pw-rules li.ok { color: #1f9d57; }
.pw-rules li.ok .pw-dot { background: #1f9d57; border-color: #1f9d57; }
.pw-rules li.ok .pw-dot::after { content: ""; position: absolute; left: 3px; top: 0;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Drag-and-drop kanban states */
[data-card] { cursor: grab; }
[data-card].dragging { opacity: .45; cursor: grabbing; }
.task-col [data-list] { min-height: 40px; }
.task-col.drop-hot { outline: 2px dashed var(--royal); outline-offset: -4px; background: #eef3ff; }
.task-col-head { margin-bottom: 12px; }
.task-col-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.col-empty { color: var(--muted); font-size: .85rem; padding: 14px 6px; display: flex; align-items: center; gap: 8px; }
.col-empty svg { width: 16px; height: 16px; }
.tcard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--royal); border-radius: 10px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.tcard.past { border-left-color: #c0392b; background: #fff7f6; }
.tcard.done { border-left-color: #1f9d57; background: #fff; opacity: .92; }
.tcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tcard-title { font-weight: 600; line-height: 1.35; }
.tcard-title.done { text-decoration: line-through; color: var(--muted); }
.tcard-due { font-size: .78rem; color: var(--muted); margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; }
.tcard-due svg { width: 13px; height: 13px; }
.tcard-due.overdue { color: #c0392b; font-weight: 700; }
.tcard .note-block { margin-top: 6px; }
/* Clear "Mark as done" affordance */
.mark-done-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px;
  background: #fff; border: 1.5px dashed #1f9d57; color: #1f9d57; font-weight: 700; font-size: .85rem;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s, border-style .15s; }
.mark-done-btn:hover { background: #1f9d57; color: #fff; border-style: solid; }
.mark-done-btn svg { width: 16px; height: 16px; }
.undo-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: none; border: 0;
  color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer; padding: 2px 0; }
.undo-btn:hover { color: var(--royal); }
.undo-btn svg { width: 14px; height: 14px; }
.task-meta .overdue { color: #c0392b; font-weight: 600; }

/* ---------- Lists / rows ---------- */
.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--royal), var(--navy)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-main .name { font-weight: 600; }
.row .row-main .sub { color: var(--muted); font-size: .84rem; }

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Invite code box ---------- */
.code-box { display: flex; align-items: center; gap: 14px; background: var(--tint); border: 1px dashed var(--royal); border-radius: 12px; padding: 16px 18px; }
.code-box .code { font-family: 'Courier New', monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: .08em; color: var(--navy); }
.code-box .label { color: var(--muted); font-size: .8rem; }

/* ---------- Flash messages ---------- */
.flashes { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 12px; font-size: .92rem; font-weight: 500; display: flex; align-items: center; gap: 10px; border: 1px solid; }
.flash.success { background: #e6f7ee; border-color: #b7e6cc; color: #157a44; }
.flash.error { background: #fdecec; border-color: #f6c9c9; color: #b3261e; }
.flash.warning { background: #fbf0dd; border-color: #f0d9af; color: #9a6516; }

/* ---------- Wizard (multi-step form) ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.steps .step { flex: 1; }
.steps .step .bar { height: 6px; border-radius: 4px; background: var(--line); transition: background .2s; }
.steps .step.active .bar, .steps .step.done .bar { background: var(--royal); }
.steps .step .lbl { font-size: .78rem; color: var(--muted); margin-top: 7px; font-weight: 600; }
.steps .step.active .lbl { color: var(--royal); }
.step-panel { display: none; }
.step-panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform:none;} }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* ---------- Chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 64px - 56px); max-height: 720px; }
.chat-stream { flex: 1; overflow-y: auto; padding: 8px 4px 18px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 76%; padding: 12px 16px; border-radius: 16px; font-size: .94rem; line-height: 1.5; }
.bubble.assistant { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: var(--shadow-sm); }
.bubble.user { background: linear-gradient(135deg, var(--royal), var(--navy)); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-meta { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.bubble.user + .chat-meta { text-align: right; }
.chat-form { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form input, .chat-form textarea { flex: 1; }
.chat-form .chat-input { resize: none; overflow-y: auto; min-height: 44px; max-height: 180px; line-height: 1.45; }
.chat-form .btn { white-space: nowrap; }
/* Attach button + filename */
.attach-btn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 44px;
  color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; flex: none;
  transition: color .15s, border-color .15s, background .15s; }
.attach-btn:hover { color: var(--royal); border-color: var(--royal); }
.attach-btn.has-file { color: #1f9d57; border-color: #1f9d57; background: #eaf8f0; }
.attach-btn svg { width: 18px; height: 18px; }
.attach-name { font-size: .78rem; color: var(--muted); max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; align-self: center; }
/* Attachments inside chat bubbles */
.chat-attach { display: inline-block; }
.chat-img { max-width: 240px; max-height: 240px; border-radius: 10px; margin-top: 6px; display: block; border: 1px solid var(--line); }
.bubble.user .chat-img { border-color: rgba(255, 255, 255, .35); }
.chat-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 7px 11px; border-radius: 9px;
  background: rgba(13, 43, 122, .06); color: var(--royal); font-size: .85rem; font-weight: 600; text-decoration: none; }
.bubble.user .chat-file { background: rgba(255, 255, 255, .18); color: #fff; }
.chat-file svg { width: 15px; height: 15px; }

/* ---------- Chat: tabs, header, cleaner card ---------- */
.chat-tabs { display: inline-flex; gap: 4px; background: var(--tint); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.chat-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 9px; font-weight: 600;
  font-size: .9rem; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.chat-tab svg { width: 16px; height: 16px; }
.chat-tab.on { background: #fff; color: var(--royal); box-shadow: var(--shadow-sm); }
.chat-tab:hover:not(.on) { color: var(--ink); }
.chat-card { padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #fbfcff; }
.chat-head-av { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.chat-head-av.ai { background: linear-gradient(135deg, var(--royal), var(--sky)); }
.chat-head-av.rep { background: linear-gradient(135deg, #e0a82e, #c98a1e); }
.chat-head-av svg { width: 20px; height: 20px; }
.chat-head-name { font-weight: 700; }
.chat-head-sub { font-size: .8rem; color: var(--muted); }
.chat-card .chat-wrap { padding: 14px 20px 18px; height: calc(100vh - 280px); min-height: 360px; }
.chat-system { align-self: center; text-align: center; font-size: .8rem; color: var(--muted); background: #f4f6fb;
  border-radius: 20px; padding: 6px 16px; margin: 8px auto 0; }

/* Profile button (topbar) + profile modal */
.profile-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer;
  padding: 4px 8px; border-radius: 10px; color: var(--ink); font: inherit; transition: background .15s ease; }
.profile-btn:hover { background: var(--tint); }
.profile-btn .user-name { font-weight: 600; }
/* Base avatar (used standalone in the topbar, pickers, etc.). Rows/inline styles override as needed. */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--royal), var(--navy)); color: #fff;
  display: grid; place-items: center; line-height: 1; font-weight: 700; font-size: .95rem;
  text-transform: uppercase; }
.avatar-img { border-radius: 50%; object-fit: cover; border: 1px solid var(--line); display: inline-block; vertical-align: middle; flex: none; }
.profile-av-row { display: flex; align-items: center; gap: 14px; }
.profile-av { position: relative; cursor: pointer; display: inline-block; flex: none; line-height: 0; }
.profile-av .avatar, .profile-av .avatar-img { width: 72px; height: 72px; }
.profile-av-edit { position: absolute; bottom: -2px; right: -2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--royal); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.profile-av-edit svg { width: 14px; height: 14px; }

/* New-chat people picker */
.picker-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.picker-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.picker-row:hover { background: var(--tint); }
.chat-form input:disabled, .chat-form button:disabled { opacity: .6; cursor: not-allowed; }
.chat-form .btn.stop-mode { background: #c0392b; }
.chat-form .btn.stop-mode:hover { background: #a83227; }
.stop-sq { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: #fff; vertical-align: middle; }
.chat-meta.me { text-align: right; }

/* Formatted AI replies inside bubbles */
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 6px 0 8px; padding-left: 20px; }
.bubble li { margin: 3px 0; }
.bubble strong { font-weight: 700; }
.bubble code { background: rgba(13, 43, 122, .08); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
.bubble.user code { background: rgba(255, 255, 255, .2); }

/* Thinking / typing indicator */
.bubble.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--royal); opacity: .4; animation: typing-bounce 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .18s; }
.typing span:nth-child(3) { animation-delay: .36s; }
.thinking-label { font-size: .8rem; }
@keyframes typing-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: .9; } }

/* Global AI working banner (student) */
.ai-banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, var(--tint), #fff);
  border: 1px solid #cdd9f5; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
  font-weight: 600; color: var(--navy); animation: fade .2s ease; }
.ai-banner-eta { font-weight: 500; color: var(--muted); font-size: .85rem; }
.ai-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #c7d4f2; border-top-color: var(--royal);
  animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Student status dropdown — green when active, red when inactive, pulsing */
.status-select { border: 2px solid; border-radius: 10px; padding: 8px 14px; font-weight: 700; cursor: pointer; -webkit-appearance: none; appearance: none; background-repeat: no-repeat; }
.status-select.active { background-color: #e9f8ef; color: #13713e; border-color: #1f9d57; animation: status-pulse-g 2.2s infinite; }
.status-select.inactive { background-color: #fdeaea; color: #c0392b; border-color: #d98a8a; animation: status-pulse-r 2.2s infinite; }
@keyframes status-pulse-g { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,157,87,.45); } 50% { box-shadow: 0 0 0 7px rgba(31,157,87,0); } }
@keyframes status-pulse-r { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); } 50% { box-shadow: 0 0 0 7px rgba(192,57,43,0); } }

/* AI plan builder (admin student page) */
.plan-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.plan-chat { display: flex; flex-direction: column; height: 470px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.plan-chat .chat-stream { flex: 1; }
.plan-chat .chat-form { padding-top: 10px; }
.draft-list { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; }
.draft-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--royal); border-radius: 10px; background: #fff; }
.draft-item.goal { border-left-color: #e0a82e; }
.draft-item.message { border-left-color: #1f9d57; }
.draft-main { flex: 1; min-width: 0; }
.draft-kind { font-size: .74rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.draft-kind svg { width: 14px; height: 14px; }
.draft-title { font-weight: 600; margin-top: 2px; }
/* Wide modal for the plan calendar preview — sized to fit without scrolling */
.modal.modal-lg { max-width: 820px; }
.plan-cal-grid .cal-cell { min-height: 60px; }
.plan-cal-grid .cal-ev { font-size: .7rem; }

/* A message pushed from the human mentor into the student's chat */
.bubble.mentor { background: #fff8e6; border: 1px solid #f0d98a; color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }

/* Two-button modal footer (Delete left, Save right) */
.modal-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 6px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* Danger / delete button */
.btn-danger { background: #c0392b; color: #fff; border: 0; }
.btn-danger:hover { background: #a83227; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* Username availability indicator (add-student wizard) */
.username-status { font-size: .82rem; margin-top: 5px; min-height: 1em; color: var(--muted); }
.username-status.ok { color: #1f9d57; font-weight: 600; }
.username-status.bad { color: #c0392b; font-weight: 600; }
input.input-ok { border-color: #1f9d57; }
input.input-bad { border-color: #e0b4b4; }

/* Small icon button (delete task/goal) */
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px;
  display: inline-flex; align-items: center; line-height: 0; transition: background .15s, color .15s; }
.icon-btn:hover { background: #fdeaea; color: #c0392b; }
.task-del { margin-left: auto; align-self: center; }
.task .task-del { flex: none; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.cal-cell { min-height: 92px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.out { background: var(--tint-2); opacity: .6; }
.cal-cell.today { border-color: var(--royal); box-shadow: inset 0 0 0 1px var(--royal); }
.cal-date { font-size: .8rem; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-date { color: var(--royal); }
.cal-ev { font-size: .72rem; padding: 3px 6px; border-radius: 6px; background: var(--tint); color: var(--royal); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-ev:hover { filter: brightness(.96); }
.task-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.cal-ev.session { background: #e2f6f5; color: #0a7e7d; }
.cal-ev.milestone { background: #fbf0dd; color: #b9772a; }
.cal-ev.goal { background: var(--tint); color: var(--royal); }

/* ---------- Auth (login / signup) ---------- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-brand { background: linear-gradient(160deg, var(--navy) 0%, var(--royal) 70%, var(--blue) 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(91,155,240,.4), transparent 70%); }
.auth-brand .mark { width: 64px; height: 64px; margin-bottom: 24px; background: #fff;
  border-radius: 14px; padding: 9px; box-sizing: border-box; object-fit: contain; }
.auth-brand h1 { color: #fff; font-size: 2.1rem; max-width: 420px; }
.auth-brand .tagline { color: var(--sky); font-size: 1.1rem; font-weight: 600; }
.auth-brand ul { list-style: none; padding: 0; margin: 28px 0 0; }
.auth-brand li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; color: #d6e4ff; max-width: 400px; }
.auth-brand li svg { flex: none; margin-top: 2px; color: var(--sky); }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-size: 1.55rem; }
.auth-card .muted-link { text-align: center; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 26px 0 12px; }
.callout { background: var(--tint); border: 1px solid #d4e0fb; border-radius: 12px; padding: 16px 18px; }
.callout.warn { background: #fbf0dd; border-color: #f0d9af; }

/* ---------- Pipeline + attention badges ---------- */
.pill.opportunity { background: var(--tint); color: var(--royal); }
.pill.appointment_scheduled { background: #fbf0dd; color: #b9772a; }
.pill.none { background: #eef0f5; color: var(--muted); }
.pill.scheduled { background: var(--tint); color: var(--royal); }
.pill.ontrack { background: #e6f7ee; color: #1f9d57; }
.pill.attention { background: #fdecec; color: #c0392b; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ontrack { background: #1f9d57; }
.dot.attention { background: #c0392b; }

/* ---------- Segmented control (view / filter toggles) ---------- */
.segmented { display: inline-flex; background: var(--tint-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.segmented a { padding: 7px 14px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.segmented a:hover { color: var(--royal); }
.segmented a.on { background: #fff; color: var(--royal); box-shadow: var(--shadow-sm); }

/* ---------- Big metric (revenue) ---------- */
.metric { font-size: 2.6rem; font-weight: 800; line-height: 1.05; color: var(--navy); }
.metric-sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.pill.ending { background: #fbf0dd; color: #b9772a; }

/* Money / value text — green wherever a dollar value is shown */
.money { color: #1f9d57; }
strong.money, .money strong { color: #1f9d57; }

/* ---------- Appointment / status pills ---------- */
.pill.need_rescheduling { background: #fbe2cc; color: #b9540a; }
.pill.not_active { background: #eef0f5; color: var(--muted); }

/* ---------- Sidebar nav badge ---------- */
.nav-badge { margin-left: auto; background: #ef5350; color: #fff; font-size: .7rem; font-weight: 800;
  border-radius: 999px; padding: 1px 8px; line-height: 1.5; min-width: 20px; text-align: center; }
.nav-link.active .nav-badge { background: #fff; color: var(--royal); }

/* ---------- Pulsing status dots ---------- */
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; vertical-align: middle; position: relative; }
.pulse-dot.green { background: #22c55e; box-shadow: 0 0 0 rgba(34,197,94,.6); animation: pulse-green 1.8s infinite; }
.pulse-dot.red { background: #ef4444; box-shadow: 0 0 0 rgba(239,68,68,.6); animation: pulse-red 1.8s infinite; }
.pulse-dot.yellow { background: #e9b53a; box-shadow: 0 0 0 rgba(233,181,58,.6); animation: pulse-yellow 1.8s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@keyframes pulse-yellow { 0% { box-shadow: 0 0 0 0 rgba(233,181,58,.5); } 70% { box-shadow: 0 0 0 7px rgba(233,181,58,0); } 100% { box-shadow: 0 0 0 0 rgba(233,181,58,0); } }

/* Service pills (students section): education = blue, fitness = brown */
.service-pill.education { background: #dbe7ff; color: #1a4fc4; }
.service-pill.fitness { background: #ece0d2; color: #8a5a2b; }
.service-pill.both { background: #e7e0fb; color: #5b3fb0; }
.service-pill.undecided { background: #eef0f5; color: #5b6478; }
/* "Not active" standing = yellow */
.pill.standing-na { background: #fbf0dd; color: #b9772a; }
.count-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* ---------- Live tracker dot ---------- */
.live-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 10px;
  vertical-align: middle; background: #22c55e; animation: pulse-green 1.8s infinite; }
.live-dot.down { background: #ef4444; animation: pulse-red 1.8s infinite; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(8, 27, 87, .5); display: none;
  align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; animation: fade .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-close { cursor: pointer; color: var(--muted); background: none; border: 0; font-size: 1.4rem; line-height: 1; }
option.taken { color: #b0b4bd; text-decoration: line-through; }

/* ---------- Search bar ---------- */
.search-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.search-bar svg { color: var(--muted); width: 18px; height: 18px; flex: none; }
.search-bar input { border: 0; outline: 0; flex: 1; font-size: .95rem; padding: 4px 0; background: transparent; }
.cal-ev.appt, .cal-ev.active { background: #ffe89e; color: #8a6411; }   /* active appointment = yellow */
.cal-ev.need_rescheduling { background: #fbd9bd; color: #b9540a; }
.cal-ev.not_active, .cal-ev.cancelled { background: #eef0f5; color: var(--muted); text-decoration: line-through; }
.cal-ev.opportunity { background: var(--tint); color: var(--royal); }
.cal-ev.completed { background: #eef0f5; color: var(--muted); }

/* Admin appointments: opportunity = yellow, student-booked = blue */
.cal-ev.appt-opp { background: #ffe89e; color: #8a6411; }
.cal-ev.appt-stud { background: #dbe7ff; color: #1a4fc4; }
.legend-dot.appt-opp { background: #ffe89e; }
.legend-dot.appt-stud { background: #9cc0ff; }
.appt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.appt-dot.opp { background: #f1c40f; }
.appt-dot.stud { background: #1a4fc4; }

/* Student calendar legend colors: task = blue, goal = yellow, meeting = green */
.cal-ev.s-task { background: #dbe7ff; color: #1a4fc4; }
.cal-ev.s-goal { background: #ffe89e; color: #8a6411; }
.cal-ev.s-meeting { background: #d8f5e3; color: #1f7a4d; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 14px; font-size: .82rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend-dot.task { background: #9cc0ff; }
.legend-dot.goal { background: #ffe89e; }
.legend-dot.meeting { background: #9ce0b8; }

/* ---------- Add-student wizard layout (with account side panel) ---------- */
.wizard-layout { display: flex; gap: 20px; align-items: flex-start; }
.wizard-card { flex: 1; max-width: 760px; }
.account-panel-wrap { width: 300px; flex: none; position: sticky; top: 20px; }

/* ---------- Responsive ---------- */
/* ===================== Responsive / mobile (no side-scroll) ===================== */
/* Hard guarantee the page never scrolls sideways on a phone. */
html, body { max-width: 100%; overflow-x: hidden; }
.layout, .main, .content, .card { min-width: 0; }
img, video, canvas, svg, table, pre { max-width: 100%; }
/* Wide tables scroll inside their own box, so the PAGE only scrolls vertically. */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 960px) {
  /* !important so inline grid-template-columns (e.g. repeat(3,1fr)) also collapse. */
  .grid-2, .grid-3, .grid-main, .form-grid, .choice-grid, .auth-split, .task-board { grid-template-columns: 1fr !important; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; }
  .auth-brand { display: none; }
  .wizard-layout { flex-direction: column; }
  .account-panel-wrap { width: 100%; position: static; }
  .plan-layout { grid-template-columns: 1fr !important; }
}
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,27,87,.45);
  z-index: 39; }
.sidebar-backdrop.show { display: block; }
@media (min-width: 761px) { .sidebar-backdrop { display: none !important; } }
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 50px rgba(8,27,87,.35); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-title { font-size: .98rem; }
  .topbar-user { gap: 8px; }
  .role-chip, .topbar-user .user-name { display: none; }   /* keep the bar compact */
  .page-head h1 { font-size: 1.32rem; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; }
  .segmented { display: flex; flex-wrap: wrap; max-width: 100%; }
  .flex-between { flex-wrap: wrap; }
  .modal { padding: 18px; }
  .modal-overlay { padding: 12px; }
  /* Calendar: keep 7 columns but never let event text widen a cell. */
  .cal-cell { min-height: 64px; padding: 4px; min-width: 0; }
  .cal-ev { font-size: .64rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .cal-dow { font-size: .68rem; }
}
/* CTA cards (icon + text + button) stack on small screens so text isn't squished. */
@media (max-width: 620px) {
  .cta-row { flex-direction: column; align-items: flex-start; gap: 12px !important; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .stat-card { min-width: 0; }
  .stat-card .stat-value { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr !important; }
  .page-head { gap: 10px; }
  .btn-lg { padding: 11px 16px; }
}

/* =====================================================================
   Polish layer — modern, animated micro-interactions (CSS only).
   Purely cosmetic; respects reduced-motion. Does not alter behavior.
   ===================================================================== */
html { scroll-behavior: smooth; }

/* Gentle page-load reveal of content blocks (skips overlays/modals). */
@media (prefers-reduced-motion: no-preference) {
  .content > *:not(.modal-overlay) { animation: app-rise .45s cubic-bezier(.22, .61, .36, 1) both; }
  .content > *:not(.modal-overlay):nth-child(2) { animation-delay: .05s; }
  .content > *:not(.modal-overlay):nth-child(3) { animation-delay: .09s; }
  .content > *:not(.modal-overlay):nth-child(4) { animation-delay: .13s; }
  .content > *:not(.modal-overlay):nth-child(n+5) { animation-delay: .16s; }
}
@keyframes app-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Cards & stat cards lift on hover. */
.card { transition: box-shadow .25s ease, transform .25s ease, border-color .2s ease; }
.stat-card, .stat-icon { transition: box-shadow .25s ease, transform .25s ease; }
a.card:hover, .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-3deg); }

/* Buttons: subtle lift + glow (press still works via existing :active). */
.btn { transition: transform .12s ease, box-shadow .2s ease, background .15s ease, filter .15s ease, border-color .15s ease; }
.btn-primary:hover { box-shadow: 0 9px 22px rgba(26, 79, 196, .34); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn-outline:hover, .btn-ghost:hover { transform: translateY(-1px); }
.icon-btn { transition: background .15s ease, color .15s ease, transform .12s ease; }
.icon-btn:active { transform: scale(.92); }

/* Row + avatar micro-interactions. */
.row-list .row { border-radius: 10px; transition: background .15s ease; }
.row-list a.row:hover { background: var(--tint-2); }
.avatar { transition: transform .2s ease; }
.row:hover > .avatar, .row:hover > a > .avatar { transform: scale(1.05); }

/* Pills, chips, badges, nav, tabs smooth. */
.pill, .nav-badge, .sibling-chip, .chat-tab, .segmented a { transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.nav-link { transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.nav-link:hover { transform: translateX(2px); }

/* Stronger, springier focus ring. */
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(46, 107, 232, .16); }

/* Modal: scale-in (overrides the basic fade). */
.modal { animation: modal-in .24s cubic-bezier(.22, .61, .36, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* Chat bubbles pop in. */
@media (prefers-reduced-motion: no-preference) {
  .chat-stream .bubble { animation: bubble-in .28s ease both; }
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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

/* =====================================================================
   Marketing site (public landing page at /)
   ===================================================================== */
/* Weekly progress tracker (student home/tasks + parent child view) */
.wk-card { display: flex; align-items: center; gap: 22px; }
.wk-ring { --pct: 0; width: 96px; height: 96px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--royal) calc(var(--pct) * 1%), #e4eaf6 0);
  display: grid; place-items: center; }
.wk-ring-inner { width: 70px; height: 70px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px #eef2fb; }
.wk-pct { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.wk-pct small { font-size: .8rem; font-weight: 700; }
.wk-meta { flex: 1; min-width: 0; }
.wk-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--royal);
  font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.wk-eyebrow svg { width: 15px; height: 15px; }
.wk-big { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin: 7px 0 11px; }
.wk-big span { font-size: .95rem; font-weight: 600; color: var(--muted); }
.wk-bar { height: 10px; background: #e4eaf6; border-radius: 999px; overflow: hidden; max-width: 340px; }
.wk-bar > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), #3ddc84); transition: width .6s ease; }
.wk-range { color: var(--muted); font-size: .8rem; margin-top: 9px; }
@media (max-width: 560px) { .wk-card { gap: 16px; } .wk-ring { width: 78px; height: 78px; }
  .wk-ring-inner { width: 58px; height: 58px; } .wk-pct { font-size: 1.2rem; } }

/* Revenue page summary */
.rev-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.rev-hero { background: linear-gradient(135deg, var(--navy), var(--royal)); color: #fff;
  border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; }
.rev-hero::after { content: ""; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(91,155,240,.45), transparent 70%); }
.rev-hero .eyebrow { color: var(--sky); font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; font-size: .74rem; position: relative; }
.rev-big { font-size: 3rem; font-weight: 800; color: #fff; line-height: 1.05; margin: 6px 0 4px; position: relative; }
.rev-hero-sub { color: #d6e4ff; margin: 0; position: relative; }
.rev-side { display: flex; flex-direction: column; gap: 18px; }
.rev-mini { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center; flex: 1; }
.rev-mini-amt { font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1; }
@media (max-width: 780px) { .rev-summary { grid-template-columns: 1fr; } }

/* Student home hero with an inline weekly ring */
.hero-grid { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.hero-grid > div:first-child { min-width: 240px; }
.hero-ring-wrap { display: flex; align-items: center; gap: 14px; position: relative; }
.hero .wk-ring { background: conic-gradient(#fff calc(var(--pct) * 1%), rgba(255,255,255,.22) 0); }
.hero .wk-ring-inner { background: rgba(8,21,75,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.hero .wk-pct { color: #fff; }
.hero-ring-cap strong { color: #fff; display: block; font-size: .95rem; }
.hero-ring-cap span { color: #cfe0ff; font-size: .82rem; }

/* Collapsible "Past" appointments (admin list view) */
.past-toggle > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; }
.past-toggle > summary::-webkit-details-marker { display: none; }
.past-toggle .past-hint { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.past-toggle .past-hint svg { width: 15px; height: 15px; }
.past-toggle[open] .past-hint { color: var(--royal); }

html { scroll-behavior: smooth; }
.mk { color: var(--ink); }
.mk-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mk section { scroll-margin-top: 80px; }

/* Sticky top nav */
.mk-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line);
  transition: transform .3s ease; }
.mk-nav.nav-hidden { transform: translateY(-100%); }
.mk-nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.mk-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy);
  font-size: 1.08rem; letter-spacing: .2px; }
.mk-brand img { width: 36px; height: 36px; object-fit: contain; }
.mk-nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.mk-nav-links a { color: var(--ink); font-weight: 600; font-size: .92rem; }
.mk-nav-links a:hover { color: var(--royal); }
.mk-nav .btn { white-space: nowrap; }
.mk-nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer;
  color: var(--navy); margin-left: auto; padding: 4px 8px; line-height: 1; }

/* Hero — live, moving aurora background */
.mk-hero { position: relative; overflow: hidden; color: #fff; padding: 92px 0 104px;
  background: linear-gradient(125deg, #081B57, #0D2B7A 30%, #1A4FC4 60%, #2f63d6 80%, #0D2B7A);
  background-size: 280% 280%; animation: mk-gradient 20s ease infinite; }
@keyframes mk-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; } }
/* Drifting blurred orbs over the gradient */
.mk-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: 1; }
.mk-orb.o1 { width: 420px; height: 420px; background: #5B9BF0; top: -120px; left: -80px; animation: mk-float1 17s ease-in-out infinite; }
.mk-orb.o2 { width: 340px; height: 340px; background: #7FB0F5; bottom: -140px; right: 8%; animation: mk-float2 21s ease-in-out infinite; }
.mk-orb.o3 { width: 300px; height: 300px; background: #3a73e0; top: 28%; right: -90px; animation: mk-float3 24s ease-in-out infinite; }
@keyframes mk-float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.12); } }
@keyframes mk-float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-30px) scale(1.1); } }
@keyframes mk-float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,50px) scale(1.15); } }

.mk-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center;
  position: relative; z-index: 2; }
.mk-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.5rem); max-width: 15ch; letter-spacing: -.5px; }
.mk-hero .lead { color: #dbe7ff; font-size: clamp(1.05rem, 1.8vw, 1.28rem); max-width: 52ch; margin: 18px 0 30px; line-height: 1.6; }
.mk-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.mk-hero .mk-eyebrow { animation: mk-rise .6s ease both; }
.mk-hero h1 { animation: mk-rise .6s .08s ease both; }
.mk-hero .lead { animation: mk-rise .6s .16s ease both; }
.mk-hero-cta { animation: mk-rise .6s .24s ease both; }
.mk-hero-note { animation: mk-rise .6s .3s ease both; }
@keyframes mk-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Floating glass app-preview card */
.mk-appcard { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 22px; padding: 18px;
  box-shadow: 0 28px 70px rgba(5,16,55,.45); color: #fff; animation: mk-bob 6s ease-in-out infinite; }
.mk-appcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mk-appcard-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; background: linear-gradient(135deg, #7FB0F5, #1A4FC4); }
.mk-appcard-row { display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12); border-radius: 11px; padding: 11px 13px; margin-bottom: 8px; font-size: .92rem; }
.mk-appcard-row .ck { width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.5); color: #fff; }
.mk-appcard-row .ck svg { width: 13px; height: 13px; opacity: 0; }
.mk-appcard-row.done .ck { background: #3ddc84; border-color: #3ddc84; }
.mk-appcard-row.done .ck svg { opacity: 1; }
.mk-appcard-row.done span { text-decoration: line-through; opacity: .7; }
.mk-bar { height: 8px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.mk-bar > i { display: block; height: 100%; width: 72%; border-radius: 999px;
  background: linear-gradient(90deg, #7FB0F5, #3ddc84); animation: mk-grow 2.2s ease forwards; }
.mk-dot-live { margin-left: auto; width: 11px; height: 11px; border-radius: 50%; background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: mk-pulse 2s infinite; }
@keyframes mk-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes mk-grow { from { width: 0; } to { width: 72%; } }
@keyframes mk-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 12px rgba(61,220,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

/* Scrolling keyword strip under the hero */
.mk-marquee { background: var(--navy-deep); color: #cfe0ff; overflow: hidden; padding: 15px 0;
  white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.06); }
.mk-marquee-track { display: inline-block; animation: mk-scroll 26s linear infinite; }
.mk-marquee span { margin: 0 14px; font-weight: 700; letter-spacing: .03em; opacity: .85; }
.mk-marquee b { color: var(--sky); margin: 0 14px; }
@keyframes mk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Scroll-reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .08s; }
.js .reveal:nth-child(3) { transition-delay: .16s; }
.js .reveal:nth-child(4) { transition-delay: .24s; }
.mk-eyebrow { display: inline-block; background: rgba(255,255,255,.14); color: #eaf1ff;
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }
.mk-hero-note { color: #b9cdf5; font-size: .86rem; margin-top: 16px; }
.btn-white { background: #fff; color: var(--navy); font-weight: 700; }
.btn-white:hover { background: #eef3ff; color: var(--navy); }
.btn-ghost-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); font-weight: 700; }
.btn-ghost-white:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

/* Generic section */
.mk-sec { padding: 76px 0; }
.mk-sec.alt { background: #f6f8fd; }
.mk-sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.mk-sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.4px; }
.mk-sec-head p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 10px 0 0; }
.mk-kicker { color: var(--royal); font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  font-size: .78rem; margin-bottom: 8px; }

/* Step / feature cards */
.mk-grid { display: grid; gap: 22px; }
.mk-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.mk-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mk-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mk-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  box-shadow: 0 6px 22px rgba(13,43,122,.05); transition: transform .18s ease, box-shadow .18s ease; }
.mk-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13,43,122,.1); }
.mk-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.mk-card p { color: var(--muted); line-height: 1.6; margin: 0; font-size: .96rem; }
.mk-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--royal), var(--navy)); color: #fff; margin-bottom: 16px; }
.mk-ico svg { width: 26px; height: 26px; }
.mk-step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; margin-bottom: 14px; }

/* Pricing */
.mk-price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mk-price { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px;
  text-align: center; box-shadow: 0 6px 22px rgba(13,43,122,.05); }
.mk-price.featured { border: 2px solid var(--royal); box-shadow: 0 16px 40px rgba(26,79,196,.16); position: relative; }
.mk-price .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--royal); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.mk-price h3 { font-size: 1.2rem; }
.mk-price .amt { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }
.mk-price .amt span { font-size: .95rem; font-weight: 600; color: var(--muted); }
.mk-price .from { color: var(--muted); font-size: .82rem; }
.mk-price p { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 14px 0 0; }
.mk-price-note { text-align: center; color: var(--muted); margin-top: 26px; font-size: .92rem; }

/* Benefit chips (what your meetings cover) */
.mk-chips { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mk-chip { display: inline-flex; align-items: center; gap: 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 13px 22px; font-weight: 700;
  color: var(--ink); box-shadow: 0 4px 14px rgba(13,43,122,.05); transition: transform .16s ease, box-shadow .16s ease; }
.mk-chip:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(13,43,122,.1); }
.mk-chip svg { width: 18px; height: 18px; color: var(--royal); }

/* AI mentor section */
.mk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.mk-ailist { list-style: none; padding: 0; margin: 22px 0 0; }
.mk-ailist li { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 13px;
  color: var(--ink); font-weight: 600; }
.mk-ailist li svg { flex: none; width: 20px; height: 20px; color: #1f9d57; margin-top: 1px; }
.mk-chatmock { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px;
  box-shadow: 0 18px 46px rgba(13,43,122,.12); display: flex; flex-direction: column; gap: 11px; }
.mk-chatmock-head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px;
  margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mk-chatmock-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid;
  place-items: center; background: linear-gradient(135deg, var(--royal), var(--navy)); color: #fff; }
.mk-chatmock-av svg { width: 20px; height: 20px; }
.mk-chatmock-status { color: #1f9d57; font-size: .76rem; font-weight: 700; }
.mk-bubble { max-width: 86%; padding: 12px 16px; border-radius: 16px; font-size: .95rem; line-height: 1.45; }
.mk-bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--royal), var(--navy));
  color: #fff; border-bottom-right-radius: 5px; }
.mk-bubble.ai { align-self: flex-start; background: #f0f4fd; color: var(--ink); border-bottom-left-radius: 5px; }
@media (max-width: 860px) { .mk-split { grid-template-columns: 1fr; gap: 30px; } }

/* CTA band */
.mk-band { background: linear-gradient(135deg, var(--navy), var(--royal)); color: #fff;
  border-radius: 24px; padding: 56px 40px; text-align: center; }
.mk-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.mk-band p { color: #dbe7ff; font-size: 1.08rem; max-width: 54ch; margin: 12px auto 26px; }

/* Contact / lead form */
.mk-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.mk-contact-grid ul { list-style: none; padding: 0; margin: 22px 0 0; }
.mk-contact-grid li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px;
  color: var(--ink); line-height: 1.5; }
.mk-contact-grid li svg { flex: none; color: var(--royal); margin-top: 2px; }
.mk-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px;
  box-shadow: 0 10px 30px rgba(13,43,122,.08); }
.mk-form .field { margin-bottom: 14px; }

/* Footer */
.mk-footer { background: var(--navy-deep); color: #aebfe6; padding: 0; }
.mk-footer .mk-brand { color: #fff; }
.mk-footer a { color: #cdd9f5; text-decoration: none; }
.mk-footer a:hover { color: #fff; }
.mk-footer small { color: #8fa3d6; }
.mk-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding: 56px 0 36px; }
.mk-footer-col h4 { color: #cdd9f5; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin: 0 0 14px; }
.mk-footer-col p { color: #8fa3d6; font-size: .88rem; line-height: 1.65; margin: 0; }
.mk-footer-col ul { list-style: none; padding: 0; margin: 0; }
.mk-footer-col ul li { margin-bottom: 9px; }
.mk-footer-col ul a { color: #a0b4d8; font-size: .9rem; }
.mk-footer-col ul a:hover { color: #fff; }
.mk-footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* All plans expanded grid */
.mk-all-plans-grid { display: flex; flex-direction: column; gap: 2px; }
.mk-plan-row { display: grid; grid-template-columns: 200px 1fr 90px; gap: 16px; align-items: center;
  padding: 12px 16px; background: var(--surface); border-radius: 10px; }
.mk-plan-row:nth-child(even) { background: var(--pale); }
.mk-plan-row-price { text-align: right; font-weight: 700; font-size: 1.05rem; color: var(--royal); }
.mk-plan-row-inc { color: var(--muted); font-size: .84rem; line-height: 1.45; }

/* Inline flashes on the public page */
.mk-flashes { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 60;
  width: min(560px, 92vw); }
.mk-flash { padding: 13px 18px; border-radius: 12px; margin-bottom: 10px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(13,43,122,.16); }
.mk-flash.success { background: #e8f7ee; color: #14794a; border: 1px solid #b6e4c8; }
.mk-flash.error { background: #fdecec; color: #b3261e; border: 1px solid #f3c2c0; }

@media (max-width: 860px) {
  .mk-nav-toggle { display: block; }
  .mk-nav-links { display: none; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; top: 66px; left: 0; right: 0; background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--line); padding: 12px 24px 20px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .mk-nav-links.open { display: flex; }
  .mk-nav-links a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .mk-nav-links a:last-child { border-bottom: none; margin-top: 6px; }
  .mk-nav-links .btn { width: auto; margin-top: 4px; }
  .mk-grid.cols-4, .mk-grid.cols-3, .mk-grid.cols-2, .mk-price-grid, .mk-contact-grid { grid-template-columns: 1fr; }
  .mk-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .mk-hero { padding: 64px 0 72px; }
  .mk-footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 24px; }
  .mk-plan-row { grid-template-columns: 1fr; gap: 4px; }
  .mk-plan-row-price { text-align: left; }
  .mk-contact-info-grid { grid-template-columns: 1fr !important; }
}

/* -------- Streak banner (student home) -------- */
.streak-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #fff8e0, #fff0b8);
  border: 1.5px solid #f0c93a; border-radius: 16px;
  padding: 18px 22px; margin-bottom: 22px;
}
.streak-fire { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }
.streak-info { flex: 1; min-width: 0; }
.streak-count { font-size: 1.25rem; font-weight: 800; color: #5c4200; }
.streak-sub { font-size: .82rem; color: #8a7030; margin-top: 3px; }
.streak-rank-badge {
  background: #f0c93a; color: #5c4200; border-radius: 99px;
  padding: 7px 18px; font-weight: 800; font-size: .95rem; white-space: nowrap; flex-shrink: 0;
}

/* -------- Leaderboard -------- */
.lb-list { display: flex; flex-direction: column; gap: 10px; }
.lb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px;
  background: #f6f8fd; border: 1.5px solid var(--line);
  transition: border-color .15s;
}
.lb-row.lb-me { background: var(--tint); border-color: var(--royal); }
.lb-row.lb-top1 { background: linear-gradient(135deg, #fff8e0, #fff3c0); border-color: #f0c93a; }
.lb-rank { font-size: 1.3rem; font-weight: 800; width: 36px; text-align: center; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 600; color: var(--ink); }
.lb-streak { display: flex; align-items: center; gap: 5px; font-weight: 700; color: #e8700a; }
.lb-longest { font-size: .8rem; color: var(--muted); margin-left: 6px; }
.lb-zero { color: var(--muted); font-weight: 400; }

/* -------- Session notes -------- */
.note-card {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 10px; background: #fff;
}
.note-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.note-meta { font-size: .8rem; color: var(--muted); }
.note-body { color: var(--ink); font-size: .93rem; line-height: 1.6; white-space: pre-wrap; }
.note-emailed { font-size: .76rem; color: #27ae60; margin-top: 8px; display: flex; align-items: center; gap: 4px; }

/* -------- Admin students dropdown -------- */
.pg-tools { position: relative; display: inline-block; }
.pg-tools > summary { list-style: none; }
.pg-tools > summary::-webkit-details-marker { display: none; }
.pg-tools-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 300; overflow: hidden;
  animation: fadeIn .12s ease;
}
.pg-tools-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; color: var(--ink); text-decoration: none;
  font-size: .9rem; font-weight: 500; transition: background .1s;
}
.pg-tools-menu a:hover { background: var(--tint); }
.pg-tools-menu a svg { color: var(--muted); }
