:root {
  --blue: #1d4ed8; --blue-d: #1e3a8a; --blue-l: #dbeafe;
  --orange: #f97316; --green: #16a34a; --green-l: #dcfce7; --red: #dc2626; --red-l: #fee2e2;
  --yellow-l: #fef9c3; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f1f5f9; --card: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.5; }
a { color: var(--blue); }
.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--blue-d); color: #fff; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--orange); font-weight: 900; font-size: 22px; }
#who { display: flex; gap: 10px; align-items: center; font-size: 15px; }
#who button { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35); }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
h1 { font-size: 28px; margin: 0 0 6px; } h2 { font-size: 21px; margin: 0 0 12px; } h3 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
button, .btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; background: var(--blue); color: #fff; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { filter: brightness(1.08); }
button.secondary, .btn.secondary { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 600; padding: 6px 12px; }
button.danger { background: #fff; color: var(--red); border: 1px solid #fca5a5; font-weight: 600; padding: 6px 12px; }
button.big, .btn.big { font-size: 20px; padding: 14px 28px; }
button:disabled { opacity: .5; cursor: default; }
label { display: block; font-weight: 700; margin: 10px 0 4px; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]) {
  font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
input:focus { outline: none; border-color: var(--blue); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg { padding: 10px 14px; border-radius: 10px; margin: 10px 0; font-weight: 600; }
.msg.err { background: var(--red-l); color: #991b1b; } .msg.ok { background: var(--green-l); color: #166534; } .msg.warn { background: var(--yellow-l); color: #854d0e; }
.hero { text-align: center; padding: 30px 10px; }
.hero h1 { font-size: 36px; }
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 640px; margin: 24px auto; }
.pick a { display: block; text-decoration: none; color: inherit; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 28px 20px; text-align: center; transition: .15s; }
.pick a:hover { border-color: var(--blue); transform: translateY(-2px); }
.pick .ico { font-size: 40px; font-weight: 900; color: var(--blue); }
.narrow { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { background: #e2e8f0; color: var(--ink); }
.tabs button.on { background: var(--blue); color: #fff; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: 3px; background: var(--blue-l); color: var(--blue-d); padding: 2px 10px; border-radius: 8px; }
.code.huge { font-size: 40px; padding: 6px 18px; display: inline-block; }

/* progress */
.bar { height: 12px; background: #e2e8f0; border-radius: 99px; overflow: hidden; min-width: 120px; flex: 1; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.skillrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.skillrow:first-of-type { border-top: 0; }
.skillrow .nm { flex: 2; min-width: 200px; }
.std { font-size: 12px; font-weight: 800; color: var(--blue); background: var(--blue-l); border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.done { color: var(--green); font-weight: 800; }

/* practice */
.practice { max-width: 760px; margin: 0 auto; }
.ptop { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.count { font-weight: 800; font-size: 18px; white-space: nowrap; }
.prompt { font-size: 21px; line-height: 1.7; margin-bottom: 16px; }
.eq { font-family: "Cambria Math", "Times New Roman", serif; font-style: italic; font-size: 1.1em; white-space: nowrap; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .85em; line-height: 1.1; margin: 0 2px; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px; }
.frac > span:last-child { padding: 0 3px; }
.mixed { white-space: nowrap; }
table.data { border-collapse: collapse; margin: 6px 0 16px; font-size: 19px; }
table.data th, table.data td { border: 2px solid #94a3b8; padding: 8px 18px; text-align: center; }
table.data th { background: var(--blue-l); font-size: 16px; }
.graphwrap { margin: 4px 0 16px; }
.graphwrap svg { width: 100%; max-width: 440px; height: auto; background: #fff; }
.answer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.answer input { max-width: 300px; font-size: 22px; }
.hint { font-size: 14px; color: var(--muted); margin-top: 6px; }
.choices { display: grid; gap: 10px; margin-bottom: 12px; }
.choice { text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); font-weight: 600; padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.choice .let { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; font-weight: 800; }
.choice.sel { border-color: var(--blue); background: var(--blue-l); }
.choice.right { border-color: var(--green); background: var(--green-l); }
.choice.wrong { border-color: var(--red); background: var(--red-l); }
.result { border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.result.good { background: var(--green-l); border: 2px solid #86efac; }
.result.bad { background: #fff7ed; border: 2px solid #fdba74; }
.result h3 { font-size: 22px; margin-bottom: 6px; }
.steps { margin: 12px 0 4px; padding: 0; list-style: none; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; line-height: 1.8; }
.finished { text-align: center; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #fde68a, #fdba74); font-weight: 800; font-size: 20px; margin-bottom: 12px; }

/* teacher tables */
table.grid { border-collapse: collapse; width: 100%; font-size: 15px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.grid th { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
table.grid tr.click:hover td { background: #f8fafc; cursor: pointer; }
.cell { display: inline-block; min-width: 64px; text-align: center; border-radius: 8px; padding: 3px 8px; font-weight: 800; }
.cell.full { background: var(--green-l); color: #166534; } .cell.part { background: var(--yellow-l); color: #854d0e; } .cell.none { background: #f1f5f9; color: #94a3b8; }
.label-in { width: 140px !important; padding: 4px 8px !important; font-size: 14px !important; }
.skillpick { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.skillpick input[type=number] { width: 80px; }
.attempt { border-left: 5px solid var(--line); }
.attempt.correct { border-left-color: var(--green); } .attempt.wrong { border-left-color: var(--red); }
.scroll { overflow-x: auto; }
@media print { .top, .foot, button { display: none !important; } body { background: #fff; } .card { border: 0; box-shadow: none; } }

.bigmath { font-size: 30px; margin: 14px 0 4px; font-family: "Cambria Math", "Times New Roman", serif; }

/* standards library */
.libtools { margin: 4px 0 12px; }
.libtools input { max-width: 460px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.tile { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.tile.open { grid-column: 1 / -1; }
.tilehead { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; border-radius: 0; padding: 12px 16px; background: #4f46e5; color: #fff; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tcount { font-size: 13px; font-weight: 600; opacity: .85; white-space: nowrap; }
.tile.g6 .tilehead { background: #0f766e; } .tile.g8 .tilehead { background: #b45309; } .tile.g9 .tilehead { background: #be123c; }
.tcode { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; background: rgba(255,255,255,.18); border-radius: 6px; padding: 2px 8px; font-size: 14px; }
.tname { font-size: 18px; line-height: 1.25; }
.tgrade { font-size: 13px; font-weight: 700; background: rgba(255,255,255,.92); color: #312e81; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.tchev { display: inline-block; font-size: 18px; transition: transform .15s; }
.tile.open .tchev { transform: rotate(90deg); }
.tilebody { padding: 8px 16px 14px; }
.stepslist { margin: 0; padding: 0; list-style: none; }
.stepslist li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepslist li:last-child { border-bottom: 0; }
.stepnum { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; font-weight: 800; flex: none; }
.stepslist li.mainstep .stepnum { background: #4f46e5; color: #fff; }
.stepslist li.mainstep .stepname b { color: #4f46e5; }
.stepname { min-width: 0; flex: 1 1 260px; }
.stepctl { display: flex; align-items: center; gap: 8px; }
.stepctl .req { width: 74px; padding: 6px 8px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.tag.pre { background: #f1f5f9; color: #475569; } .tag.main { background: #e0e7ff; color: #3730a3; }
.ck { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.small-btn { padding: 6px 14px; font-size: 15px; }


.ol { text-decoration: overline; text-decoration-thickness: 2px; }
.nlwrap { margin: 4px 0 16px; overflow-x: auto; }
.nlwrap svg { width: 100%; max-width: 560px; height: auto; background: #fff; }
.tabs.fmt button { padding: 6px 12px; font-size: 14px; }

.domainhead { margin: 18px 0 10px; font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.selbox { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; max-width: 420px; width: 100%; }
/* pre-reqs teal, the standard purple */
.stepslist li.prestep .stepnum { background: #ccfbf1; color: #0f766e; }
.stepslist li.prestep .stepname b { color: #115e59; }
.tag.pre { background: #ccfbf1; color: #0f766e; }
.stepslist li.mainstep { background: #eef2ff; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

/* ===================== Design pass (Nov 2026) ===================== */
:root { --navy: #14213d; --navy-2: #1e2f57; --ink: #13203a; --muted: #5b6782; --line: #e3e8f2; --bg: #f5f7fb; --orange: #f97316; --blue: #2156e8; }
body {
  font-family: "Lexend", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(33, 86, 232, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(33, 86, 232, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  letter-spacing: -0.005em;
}
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 800; }
.top { background: var(--navy); border-bottom: 4px solid var(--orange); padding: 12px 24px; }
.brand { font-weight: 500; }
.brand b { font-weight: 800; }
.logo { background: var(--orange); box-shadow: 0 2px 0 rgba(0,0,0,.25); transform: rotate(-4deg); }
.logo.sm { display: inline-grid; width: 20px; height: 20px; font-size: 12px; border-radius: 5px; color: #fff; vertical-align: -4px; margin-right: 4px; }
.foot { padding: 28px 16px; }
.card { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(19,32,58,.04), 0 8px 24px -14px rgba(19,32,58,.18); }
button, .btn { border-radius: 12px; box-shadow: 0 2px 0 rgba(19,32,58,.15); transition: transform .08s, filter .15s; background: var(--blue); }
button:active, .btn:active { transform: translateY(1px); box-shadow: none; }
button.secondary, .btn.secondary { box-shadow: none; color: var(--blue); border-color: var(--blue); }
button.ghost, button.danger { box-shadow: none; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); margin-bottom: 6px; }

/* welcome page */
.hero { text-align: left; max-width: 760px; margin: 18px auto 8px; padding: 30px 4px 10px; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.05; }
.hero .hl { background: linear-gradient(transparent 62%, #fed7aa 62%); padding: 0 4px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 600px; }
.pick { max-width: 760px; gap: 18px; margin: 22px auto; }
.pick a.role { text-align: left; border-radius: 20px; padding: 24px; border: 2px solid var(--line); background: #fff; box-shadow: 0 10px 30px -18px rgba(19,32,58,.35); display: flex; flex-direction: column; gap: 4px; }
.pick a.role svg { width: 52px; height: 52px; margin-bottom: 8px; }
.pick a.role h2 { margin: 0; font-size: 22px; }
.pick a.role p { margin: 0; color: var(--muted); }
.pick a.role .go { margin-top: 12px; font-weight: 700; color: var(--blue); }
.pick a.role.teacher .go { color: #6d28d9; }
.pick a.role:hover { border-color: var(--blue); transform: translateY(-3px); }
.pick a.role.teacher:hover { border-color: #6d28d9; }
.features { max-width: 760px; margin: 8px auto 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.features div { background: rgba(255,255,255,.75); border: 1px dashed #c7d2fe; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.features span { color: var(--muted); font-size: 14px; }

/* student dashboard */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.welcome h1 { margin: 0; }
.welcome p { margin: 6px 0 0; max-width: 560px; }
.ringbox { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.card.assign { padding: 0; overflow: hidden; }
.card.assign .assignhead { display: flex; gap: 16px; align-items: center; padding: 18px 20px; background: linear-gradient(135deg, #eef2ff, #fff7ed); border-bottom: 1px solid var(--line); }
.card.assign.complete .assignhead { background: linear-gradient(135deg, #dcfce7, #f0fdf4); }
.card.assign h2 { margin: 0 0 6px; }
.card.assign .skillrow { padding: 14px 20px; border-top: 1px solid var(--line); }
.card.assign .skillrow:first-of-type { border-top: 0; }
.skillrow.isdone .nm { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12.5px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; color: #334155; }
.chip.soon { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.chip.late { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.card.empty { text-align: center; padding: 40px 20px; }
.bar { height: 14px; background: #edf1f7; }
.bar > i { background: linear-gradient(90deg, #22c55e, #16a34a); }

/* practice screen */
.practice .card#pcard { padding: 26px 28px; }
.prompt { font-size: 22px; font-weight: 500; }
.bigmath { font-size: 34px; }
.answer input { border-width: 2px; font-size: 24px; padding: 12px 14px; border-radius: 14px; }
.choice { border-radius: 14px; font-size: 18px; padding: 14px 16px; box-shadow: none; }
.choice:hover { border-color: #93c5fd; }
.result { border-radius: 18px; }
.result.good { background: linear-gradient(135deg, #dcfce7, #f0fdf4); }
.result.bad { background: linear-gradient(135deg, #fff7ed, #fffbeb); }
.steps li { border-radius: 12px; }
.finished { border-radius: 16px; }
.std { background: #e0e7ff; color: #3730a3; }

/* teacher */
.grid2 > .card { position: relative; overflow: hidden; }
.grid2 > .card h2 { margin-top: 2px; }
.code { background: #fff7ed; color: #9a3412; border: 1px dashed #fdba74; }
table.grid tr:hover td { background: #f8fafc; }
.tile { box-shadow: 0 6px 18px -14px rgba(19,32,58,.45); border-radius: 16px; }
.tilehead { background: linear-gradient(135deg, #4f46e5, #6d28d9); }
.tile.g6 .tilehead { background: linear-gradient(135deg, #0f766e, #0e7490); }
.tile.g8 .tilehead { background: linear-gradient(135deg, #c2410c, #b45309); }
@media (max-width: 560px) {
  main { padding: 16px 14px 48px; }
  .practice .card#pcard { padding: 18px; }
  .prompt { font-size: 19px; }
  .top { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* show-your-work pad */
.workpad { border: 2px dashed #c7d2fe; border-radius: 16px; padding: 12px; margin: 4px 0 16px; background: #fbfcff; }
.workpad.locked { opacity: .85; }
.wphead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wptabs { margin: 0 0 0 auto; }
.wptabs button { padding: 5px 12px; font-size: 14px; box-shadow: none; }
.wptools { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.wptools button { padding: 4px 10px; font-size: 14px; }
.wptools button.on { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
#wpcanvas { width: 100%; display: block; background: #fff; border-radius: 10px; border: 1px solid var(--line); touch-action: none; cursor: crosshair;
  background-image: linear-gradient(#eef2f7 1px, transparent 1px); background-size: 100% 28px; }
.wptext { width: 100%; min-height: 160px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.workview { width: 100%; max-width: 520px; border: 1px solid var(--line); border-radius: 10px; display: block; }
.worktext { white-space: pre-wrap; font: inherit; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0 0; }
.workcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
.workdetails summary { cursor: pointer; font-weight: 600; }

/* inline figures */
.fig{margin:12px 0;overflow-x:auto}
.fig svg{display:block;height:auto}

/* ZPath brand */
.brandtext { display: flex; flex-direction: column; line-height: 1.05; }
.brandtext b { font-size: 22px; letter-spacing: .3px; }
.brandtext small { font-size: 11.5px; font-weight: 500; opacity: .8; margin-top: 2px; }
.foot a { color: inherit; font-weight: 600; }
