/* =============================================================================
   PreMed Track — styles
   Mobile-first. Students use phones; parents and advisors use laptops.
   ========================================================================== */

:root {
  --bg:         #FAF8F5;
  --surface:    #FFFFFF;
  --surface-2:  #F3F0EA;
  --ink:        #14201C;
  --ink-2:      #3A4A45;
  --muted:      #6A7873;
  --line:       #E4DFD6;
  --line-2:     #D5CEC2;

  --primary:      #0E6E5C;
  --primary-dark: #0A5446;
  --primary-soft: #E4F1ED;

  --good:     #2E7D53;
  --slipping: #B07A18;
  --behind:   #C2661C;
  --critical: #B3261E;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(20,32,28,.06), 0 4px 16px rgba(20,32,28,.05);
  --shadow-lg: 0 2px 6px rgba(20,32,28,.08), 0 12px 32px rgba(20,32,28,.09);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .8em; }
a  { color: var(--primary); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

.muted { color: var(--muted); }
.tiny  { font-size: .78rem; }
.small { font-size: .88rem; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- App shell ---------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250,248,245,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: 720px; margin: 0 auto; padding: 11px 18px;
  display: flex; align-items: center; gap: 12px;
}
.brand { font-weight: 700; letter-spacing: -.02em; font-size: 1rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--primary); }
.stage-chip {
  margin-left: auto; font-size: .76rem; font-weight: 600;
  background: var(--primary-soft); color: var(--primary-dark);
  padding: 4px 10px; border-radius: 100px; white-space: nowrap;
}

main { padding: 20px 0 96px; }

/* ---------- Tabs --------------------------------------------------------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { max-width: 720px; margin: 0 auto; display: flex; }
.tab {
  flex: 1; border: 0; background: none; cursor: pointer;
  padding: 9px 4px 11px; font: inherit; font-size: .72rem; font-weight: 600;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-top: 2px solid transparent; margin-top: -1px;
}
.tab svg { width: 20px; height: 20px; }
.tab.active { color: var(--primary); border-top-color: var(--primary); }

/* ---------- Cards -------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-flat { box-shadow: none; }
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .muted { margin-left: auto; }

/* ---------- The next-step hero ------------------------------------------ */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--step-color, var(--primary));
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}
.step-eyebrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.sev {
  padding: 2px 8px; border-radius: 100px; font-size: .68rem; letter-spacing: .05em;
  color: #fff; background: var(--muted);
}
.sev.critical { background: var(--critical); }
.sev.behind   { background: var(--behind); }
.sev.slipping { background: var(--slipping); }
.sev.on_track { background: var(--good); }
.sev.ahead    { background: var(--good); }

.step h2 { font-size: 1.3rem; line-height: 1.28; margin-bottom: 10px; }
.step-why {
  color: var(--ink-2); font-size: .94rem; margin-bottom: 14px;
  padding-left: 12px; border-left: 2px solid var(--line-2);
}
.step-action {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: .97rem; margin-bottom: 14px;
}
.step-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); font-weight: 600; }
.step-meta .pill {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 100px;
}
.guardrail {
  margin-top: 12px; font-size: .8rem; color: var(--ink-2);
  background: #FFF6E8; border: 1px solid #F0DDBC;
  border-radius: var(--radius-sm); padding: 9px 12px;
}
.step-actions { display: flex; gap: 9px; margin-top: 15px; flex-wrap: wrap; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  font: inherit; font-weight: 600; font-size: .92rem;
  border-radius: var(--radius-sm); padding: 10px 16px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Quick log ---------------------------------------------------- */
.quicklog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.qbtn {
  font: inherit; font-size: .88rem; font-weight: 600; text-align: left;
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--radius-sm); padding: 12px 13px; cursor: pointer;
  display: flex; align-items: center; gap: 9px; transition: background .12s, border-color .12s, transform .06s;
}
.qbtn:hover { border-color: var(--primary); background: var(--primary-soft); }
.qbtn:active { transform: scale(.98); }
.qbtn .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* ---------- Track meters ------------------------------------------------- */
.meters { display: flex; flex-direction: column; gap: 13px; }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.meter-label { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.meter-label .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.meter-val { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-bar {
  grid-column: 1 / -1; height: 7px; border-radius: 100px;
  background: var(--surface-2); overflow: hidden; position: relative;
}
.meter-fill { height: 100%; border-radius: 100px; transition: width .35s cubic-bezier(.4,0,.2,1); }
.meter-tick { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .28; }
.meter-note { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); }
.meter-row.na { opacity: .45; }

/* ---------- Habit strip -------------------------------------------------- */
.habit { display: flex; align-items: center; gap: 8px; }
.habit-days { display: flex; gap: 6px; }
.hday {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.hday.used { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary); }
.streak { margin-left: auto; font-size: .84rem; font-weight: 700; color: var(--primary-dark); }

/* ---------- Forms -------------------------------------------------------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .86rem; font-weight: 650; margin-bottom: 5px; }
.field .hint { font-size: .78rem; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
input[type=text], input[type=number], select, textarea {
  font: inherit; font-size: 1rem; width: 100%;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.choice { display: grid; gap: 8px; }
.choice label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; font-weight: 500; font-size: .92rem; margin: 0;
}
.choice label:hover { background: var(--surface-2); }
.choice input { margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.choice label.sel { border-color: var(--primary); background: var(--primary-soft); }
.choice strong { display: block; font-weight: 650; }

/* ---------- Roadmap ------------------------------------------------------ */
.yearpick { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.yearpick button {
  font: inherit; font-size: .85rem; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 100px; padding: 7px 14px; cursor: pointer;
}
.yearpick button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.month { border-bottom: 1px solid var(--line); padding: 13px 0; }
.month:last-child { border-bottom: 0; }
.month-head { display: flex; gap: 10px; align-items: baseline; cursor: pointer; }
.month-tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); width: 34px; flex: 0 0 34px; padding-top: 2px;
}
.month.now .month-tag { color: var(--primary); }
.month-title { font-weight: 600; font-size: .95rem; flex: 1; }
.month.now .month-title { color: var(--primary-dark); }
.nudges { list-style: none; padding: 0 0 0 44px; margin: 9px 0 0; display: none; }
.month.open .nudges { display: block; }
.nudges li {
  font-size: .89rem; color: var(--ink-2); padding: 5px 0 5px 20px; position: relative; cursor: pointer;
}
.nudges li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 11px; height: 11px; border: 1.5px solid var(--line-2); border-radius: 3px;
}
.nudges li.done { color: var(--muted); text-decoration: line-through; }
.nudges li.done::before { background: var(--primary); border-color: var(--primary); }
.chev { color: var(--muted); font-size: .8rem; transition: transform .15s; }
.month.open .chev { transform: rotate(90deg); }

/* ---------- Grades & scores ---------------------------------------------- */
.gpa-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gpa-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 13px 10px; text-align: center; }
.gpa-num { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--primary-dark); }
.gpa-lab { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

.course {
  display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px;
  align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.course:last-child { border-bottom: 0; }
.course-name { font-size: .92rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.course-name .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.course-meta { grid-column: 1 / 2; font-size: .76rem; color: var(--muted); }
.course-grade { width: 74px; }
.course-grade input {
  width: 100%; padding: 6px 8px; font-size: .88rem; text-align: right;
  border-radius: 7px; border: 1px solid var(--line-2);
}
.course-del { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; padding: 2px 6px; line-height: 1; }
.course-del:hover { color: var(--critical); }
.lvl {
  font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted);
}
.lvl.ap { background: #EDE4F5; color: #5C3480; }
.lvl.hon, .lvl.dual { background: var(--primary-soft); color: var(--primary-dark); }

.picker-list { max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.picker-item {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 6px; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; gap: 9px;
}
.picker-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.picker-item.sel { border-color: var(--primary); background: var(--primary-soft); }
.picker-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.picker-item .premed {
  margin-left: auto; font-size: .68rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft); padding: 2px 7px; border-radius: 100px; white-space: nowrap;
}

.sectionscore { display: grid; grid-template-columns: 1fr 90px; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.sectionscore label { font-size: .9rem; font-weight: 600; margin: 0; }
.sectionscore .hint { grid-column: 1 / 2; font-size: .74rem; color: var(--muted); margin: 0; }
.sectionscore input { text-align: right; }
.sectionscore.optional label { color: var(--muted); }

.study-what {
  font-size: 1.05rem; font-weight: 650; line-height: 1.3; margin-bottom: 8px;
}
.study-how { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .93rem; margin-bottom: 10px; }
.study-why { font-size: .86rem; color: var(--ink-2); padding-left: 11px; border-left: 2px solid var(--line-2); }

.gapitem { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.gapitem:last-child { border-bottom: 0; }
.gapitem strong { display: block; margin-bottom: 2px; }
.gapitem span { font-size: .82rem; color: var(--muted); }

/* ---------- Goals -------------------------------------------------------- */
.goal {
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.goal:last-child { border-bottom: 0; }
.goal-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.goal-name { font-weight: 650; font-size: .93rem; }
.goal-val { margin-left: auto; font-size: .86rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.goal-by { font-size: .74rem; color: var(--muted); }
.goal-bar { height: 6px; border-radius: 100px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.goal-bar span { display: block; height: 100%; border-radius: 100px; background: var(--primary); }
.goal-actions { display: flex; gap: 8px; margin-top: 10px; }

.goal-pending {
  border: 1px solid var(--primary); background: var(--primary-soft);
  border-radius: var(--radius-sm); padding: 13px 15px; margin-bottom: 10px;
}
.goal-pending .goal-name { font-size: 1rem; }
.goal-note { font-size: .86rem; color: var(--ink-2); font-style: italic; margin-top: 5px; }

.feas {
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: .86rem; margin-top: 10px;
  border: 1px solid var(--line);
}
.feas .verdict { font-weight: 700; display: block; margin-bottom: 3px; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em; }
.feas.good  { background: #E9F5EE; border-color: #BFE0CC; color: #1E5B38; }
.feas.warn  { background: #FFF6E8; border-color: #F0DDBC; color: #6B4A12; }
.feas.bad   { background: #FDECEA; border-color: #F3C9C4; color: #8A1F19; }
.feas.muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Log list ----------------------------------------------------- */
.logitem {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .89rem;
}
.logitem:last-child { border-bottom: 0; }
.logitem .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.logitem .when { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* ---------- Banner / toast ---------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 100px;
  font-size: .88rem; font-weight: 600; z-index: 60; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.notice {
  background: #FFF6E8; border: 1px solid #F0DDBC; color: #6B4A12;
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: .84rem; margin-bottom: 14px;
}

/* ---------- Landing page ------------------------------------------------- */
.lp-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.lp-nav-inner { max-width: 1040px; margin: 0 auto; padding: 15px 18px; display: flex; align-items: center; gap: 14px; }
.lp-nav a.brand { font-size: 1.05rem; }
.lp-nav .spacer { margin-left: auto; }

.hero { padding: 62px 0 46px; text-align: center; }
.hero h1 { font-size: 2.3rem; max-width: 17ch; margin: 0 auto .5em; }
.hero .sub { font-size: 1.08rem; color: var(--ink-2); max-width: 54ch; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--primary-dark);
  background: var(--primary-soft); padding: 5px 13px; border-radius: 100px; margin-bottom: 18px;
}

.loop { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 26px 0; }
.loop-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.loop-step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 700; margin-bottom: 8px;
}
.loop-step h3 { font-size: .96rem; margin-bottom: 3px; }
.loop-step p { font-size: .86rem; color: var(--muted); margin: 0; }

.section { padding: 42px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.5rem; margin-bottom: 6px; }
.section .lede { color: var(--ink-2); max-width: 60ch; margin-bottom: 22px; }

table.cmp { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.cmp th, table.cmp td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.cmp th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.cmp td.yes { color: var(--good); font-weight: 650; }
table.cmp td.no  { color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: .85rem; }

@media (min-width: 640px) {
  .quicklog { grid-template-columns: repeat(3, 1fr); }
  .loop { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 2.9rem; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =============================================================================
   Ask — its own tab.

   Was a floating button and overlay. A tab is better here: the questions are
   about the numbers on the other tabs, a full screen fits a real conversation,
   and there is nothing to dismiss before using the app again. It also deletes a
   whole bug class — an overlay that is invisible but still laid out swallows
   every tap on the app behind it, which is exactly what the first version did.
   ========================================================================== */

.ask-view {
  display: flex; flex-direction: column;
  /* Fill the space between the header and the tab bar so the composer sits at
     the bottom of the screen rather than floating mid-page. */
  height: calc(100dvh - 118px - env(safe-area-inset-bottom, 0px));
  min-height: 380px;
}

.ask-head { flex: none; padding: 2px 0 12px; }
.ask-head h2 { margin: 0; font-size: 1.22rem; }
.ask-sub { color: var(--muted); font-size: .84rem; }

.ask-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px; margin: 0 -2px; scroll-behavior: smooth;
}

.ask-msg { margin-bottom: 13px; font-size: .93rem; line-height: 1.5; }
.ask-msg p { margin: 0 0 .55em; }
.ask-msg p:last-child { margin-bottom: 0; }
.ask-msg ul { margin: .4em 0; padding-left: 1.15em; }
.ask-msg li { margin: .22em 0; }

.ask-user {
  background: var(--primary); color: #fff;
  padding: 9px 13px; border-radius: 14px 14px 3px 14px;
  margin-left: auto; max-width: 84%; width: fit-content;
}
.ask-bot {
  background: var(--surface-2); color: var(--ink);
  padding: 11px 13px; border-radius: 14px 14px 14px 3px;
  max-width: 92%; width: fit-content;
}
.ask-meta {
  margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line-2);
  font-size: .72rem; color: var(--muted);
}

.ask-thinking { display: flex; gap: 4px; padding: 14px 15px; }
.ask-thinking span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: askblink 1.3s infinite both;
}
.ask-thinking span:nth-child(2) { animation-delay: .18s; }
.ask-thinking span:nth-child(3) { animation-delay: .36s; }
@keyframes askblink { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ask-thinking span { animation: none; opacity: .5; }
  .ask-list { scroll-behavior: auto; }
}

.ask-chips {
  display: flex; gap: 7px; padding: 0 0 9px; flex-wrap: nowrap;
  overflow-x: auto; flex: none; -webkit-overflow-scrolling: touch;
}
.ask-chips::-webkit-scrollbar { display: none; }
.ask-chip {
  flex: none; white-space: nowrap; cursor: pointer;
  background: var(--primary-soft); color: var(--primary-dark);
  border: 1px solid transparent; border-radius: 999px;
  padding: 7px 13px; font-size: .82rem; font-family: var(--sans);
}
.ask-chip:hover { border-color: var(--primary); }

.ask-form { display: flex; gap: 8px; padding: 0 0 10px; flex: none; }
.ask-form input {
  flex: 1; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 16px;   /* 16px stops iOS zooming the whole page on focus */
  font-family: var(--sans); background: var(--surface); color: var(--ink);
}
.ask-form input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.ask-form button {
  border: 0; background: var(--primary); color: #fff; cursor: pointer;
  padding: 0 17px; border-radius: var(--radius-sm); font-weight: 600;
  font-family: var(--sans); font-size: .9rem;
}
.ask-form button:disabled { opacity: .5; cursor: default; }

/* Six tabs on a 360px phone is tight. Shrink the label rather than let the
   text wrap to two lines, which would make the bar taller on that screen only. */
@media (max-width: 400px) {
  .tab { font-size: .66rem; padding-left: 2px; padding-right: 2px; }
  .tab svg { width: 19px; height: 19px; }
}

/* ---------- Booked sessions ---------------------------------------------- */
.sess {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.sess:last-of-type { border-bottom: 0; }
.sess-main { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.4; }
.sess-acts { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 430px) {
  .sess { flex-direction: column; gap: 8px; }
  .sess-acts { justify-content: flex-start; }
}

/* Selectable chips, shared by session kind/repeat and the school term system. */
.chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem;
  cursor: pointer; margin: 0 6px 6px 0; font-family: var(--sans);
}
.chip:hover { border-color: var(--primary); }
.chip.on {
  background: var(--primary-soft); border-color: var(--primary);
  color: var(--primary-dark); font-weight: 600;
}

/* An inline caveat — used where a generated career path must say so. */
.note-inline {
  border-left: 3px solid var(--slipping); background: rgba(176,122,24,.09);
  padding: 10px 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .85rem; color: var(--ink-2); margin: 10px 0;
}
