/* MathPath Academy design system */
:root {
  /* Syvara Learning brand: royal blue #1247BC, navy #0F1F82, mist #E7EDF8, mint #9AE8C1 */
  --bg: #f8f9fb;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --border: #e1e5ee;
  --text: #31333f;
  --heading: #0f1f82;
  --muted: #5b6072;
  --faint: #8a8fa3;
  --primary: #1247bc;
  --primary-hover: #0f1f82;
  --primary-soft: #e7edf8;
  --accent: #158237;
  --accent-soft: #e3f6ea;
  --mint: #9ae8c1;
  --warn: #926c05;
  --warn-soft: #fff8db;
  --danger: #c53030;
  --danger-soft: #fdeaea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 31, 130, .05), 0 4px 14px rgba(15, 31, 130, .06);
  --sidebar: 256px;
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Montserrat", "Source Sans 3", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1220; --surface: #171b2e; --surface-2: #1e2339; --border: #2a3050;
    --text: #e8eaf5; --heading: #c9d3ff; --muted: #a3a9c6; --faint: #737a9a;
    --primary: #6f9bff; --primary-hover: #9dbaff; --primary-soft: #232a52;
    --accent: #35c99c; --accent-soft: #15342c; --warn: #e6b04f; --warn-soft: #3a2f17;
    --danger: #f07070; --danger-soft: #3d1c1f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1220; --surface: #171b2e; --surface-2: #1e2339; --border: #2a3050;
  --text: #e8eaf5; --heading: #c9d3ff; --muted: #a3a9c6; --faint: #737a9a;
  --primary: #6f9bff; --primary-hover: #9dbaff; --primary-soft: #232a52;
  --accent: #35c99c; --accent-soft: #15342c; --warn: #e6b04f; --warn-soft: #3a2f17;
  --danger: #f07070; --danger-soft: #3d1c1f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; font-family: var(--display); color: var(--heading); font-weight: 700; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--heading); padding: 4px 10px 18px; }
.brand small { display: block; font-family: var(--font); font-weight: 500; font-size: .74rem; color: var(--faint); }
.brand:hover { text-decoration: none; }
/* ΣνΜ = S·V·M in Greek letters (Sigma, Nu, Mu) */
.brand-mark { min-width: 34px; height: 34px; padding: 0 7px; border-radius: 10px; background: linear-gradient(135deg, #1247bc, #0f1f82); color: #ffc72c; border: 2px solid #ffc72c; display: grid; place-items: center; flex: none; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; line-height: 1; }
.nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.main { min-width: 0; }
.topbar { display: none; }
.content { max-width: 1180px; margin: 0 auto; padding: 28px 32px 64px; }
.content.narrow { max-width: 820px; }

.public-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; max-width: 1180px; margin: 0 auto; gap: 12px; }
.public-top nav { display: flex; gap: 18px; align-items: center; }
.public-top nav a:not(.btn) { color: var(--muted); font-weight: 500; }
.public-top nav a { white-space: nowrap; }
.public-menu { display: none; position: relative; }
.public-menu summary { list-style: none; cursor: pointer; font-size: 1.35rem; line-height: 1; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); }
.public-menu summary::-webkit-details-marker { display: none; }
.public-menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: grid; z-index: 60; }
.public-menu-list a { padding: 9px 12px; border-radius: var(--radius-sm); }
.public-menu-list a:hover { background: var(--primary-soft); text-decoration: none; }
@media (max-width: 1100px) { .public-top nav { gap: 14px; } .public-top nav a.hide-md { display: none; } }
@media (max-width: 980px) { .public-top nav a.hide-sm { display: none; } .public-menu { display: block; } }
@media (max-width: 560px) {
  .public-top { gap: 8px; }
  .public-top nav { gap: 8px; }
  .public-top nav a.hide-xs { display: none; }
  .public-top .brand { gap: 8px; min-width: 0; }
  .public-top .brand-name { font-size: .8rem; padding: 4px 8px; white-space: normal; line-height: 1.2; max-width: 11em; }
  .public-top .brand-name small { display: none; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
  .content { padding: 20px 16px 48px; }
  .public-top { padding: 14px 16px; }
}
.scrim { display: none; }
.sidebar.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 45; }

/* ---------- components ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }  /* the grid gap spaces cards; extra margin made them uneven */
.grid + .card, .grid + .grid, .card + .grid { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 .95rem var(--font); cursor: pointer; background: var(--primary); color: #fff; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent); filter: brightness(.93); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: .84rem; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--primary); padding: 0; font: inherit; cursor: pointer; }
form.inline { display: inline; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-free { background: var(--accent-soft); color: var(--accent); }
.badge-locked { background: var(--warn-soft); color: var(--warn); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.diff-Easy { background: var(--accent-soft); color: var(--accent); }
.diff-Medium { background: var(--primary-soft); color: var(--primary); }
.diff-Hard { background: var(--danger-soft); color: var(--danger); }

.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); display: flex; justify-content: space-between; gap: 12px; }
.flash-success { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.flash-error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.flash-info { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.flash button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: .9rem; margin-bottom: 16px; }

/* forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .8rem; color: var(--faint); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 110px; font-family: var(--mono); font-size: .88rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 160px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--faint); padding: 28px 12px; }

/* stats */
.stat { padding: 18px 20px; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 1.65rem; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--faint); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .fill { width: 100%; max-width: 42px; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .bar span { font-size: .7rem; color: var(--faint); white-space: nowrap; }
.bars .bar:hover .fill { background: var(--primary-hover); }

/* courses */
.level-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.level-title:first-child { margin-top: 0; }
/* Course cards: royal blue -> navy gradient with a small code-editor "cover" */
.course-card { display: flex; flex-direction: column; color: #fff; border-radius: 20px; padding: 14px; overflow: hidden;
  background: linear-gradient(160deg, #1d5fe0 0%, #1247bc 35%, #0f1f82 75%, #0a1554 100%);
  border: 1.5px solid #6fb6ff; box-shadow: 0 10px 28px rgba(15, 31, 130, .28); transition: transform .15s, box-shadow .15s; }
.course-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 14px 34px rgba(18, 71, 188, .45), 0 0 0 3px rgba(111, 182, 255, .35); }
.course-cover { background: #0b1230; border: 1px solid rgba(111, 182, 255, .25); border-radius: 14px; padding: 10px 12px 12px; }
.cover-dots { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cover-dots span { width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; }
.cover-dots span:nth-child(2) { background: #ffc72c; }
.cover-dots span:nth-child(3) { background: #3ddc97; }
.cover-dots em { margin-left: 8px; font: .7rem "JetBrains Mono", monospace; color: #8aa0d6; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-cover pre { margin: 0; background: transparent !important; padding: 0; border: 0; overflow: hidden; }
.course-cover code { display: block; background: transparent !important; padding: 0 !important; font: .74rem/1.55 "JetBrains Mono", monospace; color: #dbe6ff; white-space: pre; overflow: hidden; }
.course-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 6px 4px; flex: 1; }
.course-card h3 { margin: 0; color: #fff; font-size: 1.2rem; }
.course-card .course-icon { background: rgba(255, 255, 255, .1); border: 1.5px solid #ffc72c; color: #ffc72c; width: 38px; height: 38px; font-size: 1.05rem; }
.track-pill { display: inline-block; padding: 4px 12px; border-radius: 99px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(10, 21, 84, .45); font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.course-meta { font-size: .8rem; color: #9fc4ff; font-weight: 600; }
.course-card .progress { background: rgba(255, 255, 255, .18); }
.course-card .progress > div { background: #ffc72c; }
.course-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font: 700 1.35rem var(--serif); flex: none; }
.course-card .desc { color: rgba(255, 255, 255, .82); font-size: .88rem; flex: 1; margin: 0; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border); font-size: .82rem; color: var(--muted); background: var(--surface); }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.q-list { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; color: var(--text); padding: 16px 18px; }
.q-item:hover { border-color: var(--primary); text-decoration: none; }
.q-num { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.q-item .teaser { color: var(--muted); font-size: .86rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 620px) { .q-item { grid-template-columns: 1fr; } .q-num { display: none; } }

/* math content */
.math-content { font-family: var(--serif); font-size: 1.07rem; line-height: 1.75; overflow-wrap: break-word; }
.math-content .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.math-content table { border-collapse: collapse; margin: 12px 0; font-family: var(--font); font-size: .92rem; display: block; overflow-x: auto; }
.math-content th, .math-content td { border: 1px solid var(--border); padding: 6px 10px; }
.math-content pre { background: #0f1426; color: #e6e9f5; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .86rem; line-height: 1.55; }
.math-content pre code { background: none; padding: 0; color: inherit; }
.math-content code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.math-content blockquote { border-left: 3px solid var(--primary); margin: 0; padding-left: 14px; color: var(--muted); }
.math-content p:last-child { margin-bottom: 0; }

.solution-box { border: 1px solid var(--accent-soft); border-left: 4px solid var(--accent); }
.paywall { text-align: center; padding: 34px 24px; background: linear-gradient(180deg, var(--surface), var(--primary-soft)); }
.paywall .lock { font-size: 2rem; }
.blurred { filter: blur(6px); user-select: none; pointer-events: none; opacity: .6; margin-bottom: 16px; font-family: var(--serif); }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; text-align: left; }
.option { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.option.featured { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.option .price { font-size: 1.4rem; font-weight: 750; }
.option form { margin-top: auto; }
@media (max-width: 760px) { .options { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 2px solid var(--primary); position: relative; }
.plan .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.plan ul { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 8px; flex: 1; }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.ribbon { position: absolute; top: -12px; left: 20px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* landing */
.hero { text-align: center; padding: 56px 16px 40px; max-width: 860px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; line-height: 1.1; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #1247bc, #0f1f82); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; margin: 16px auto 26px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-formula { font-size: 1.2rem; color: var(--faint); margin-top: 30px; }
.feature .ico { font-size: 1.5rem; }
.section { padding: 34px 32px; max-width: 1180px; margin: 0 auto; }
@media (max-width: 900px) { .section { padding: 26px 16px; } }
.footer { text-align: center; color: var(--faint); font-size: .84rem; padding: 30px 16px; border-top: 1px solid var(--border); margin-top: 30px; }

/* auth */
.auth-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 20px 16px; }
.auth-card { width: 100%; max-width: 420px; }

/* AI tutor */
.tutor { display: grid; grid-template-columns: 260px 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 520px; }
.tutor-side { display: flex; flex-direction: column; gap: 10px; overflow: hidden; padding: 14px; }
.conv-list { overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.conv-list a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-list a:hover { background: var(--surface-2); text-decoration: none; }
.conv-list a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.assistant.streaming { white-space: pre-wrap; }
.msg.error { align-self: center; background: var(--danger-soft); color: var(--danger); font-size: .9rem; }
.chat-form { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { min-height: 48px; max-height: 200px; font-family: var(--font); font-size: .95rem; resize: none; }
.chat-empty { margin: auto; text-align: center; max-width: 440px; color: var(--muted); }
.suggestions { display: grid; gap: 8px; margin-top: 14px; }
.suggestions button { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; font-size: .88rem; }
.suggestions button:hover { border-color: var(--primary); }
@media (max-width: 900px) { .tutor { grid-template-columns: 1fr; height: auto; } .tutor-side { max-height: 220px; } .chat { height: 70vh; } }

/* calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { text-align: center; font-size: .74rem; color: var(--faint); font-weight: 600; text-transform: uppercase; padding-bottom: 4px; }
.cal .day { min-height: 78px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; background: var(--surface); font-size: .85rem; display: flex; flex-direction: column; gap: 4px; text-align: left; font-family: inherit; color: var(--text); }
.cal .day.blank { background: transparent; border-color: transparent; }
.cal .day.past { color: var(--faint); background: var(--surface-2); }
.cal .day.today .n { background: var(--primary); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal .day .n { font-weight: 600; align-self: flex-start; }
.cal button.day { cursor: pointer; }
.cal button.day.has { border-color: var(--accent); background: var(--accent-soft); }
.cal button.day.has:hover, .cal button.day.selected { box-shadow: 0 0 0 2px var(--accent); }
.cal .count { font-size: .72rem; color: var(--accent); font-weight: 600; }
.cal .slot-mini { font-size: .72rem; padding: 1px 5px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.cal .slot-mini.booked { background: var(--accent-soft); color: var(--accent); }
.cal .slot-mini.held { background: var(--warn-soft); color: var(--warn); }
.cal .slot-mini form button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: .8rem; }
@media (max-width: 620px) { .cal { gap: 3px; } .cal .day { min-height: 54px; padding: 4px; font-size: .78rem; } .cal .slot-mini { display: none; } .cal .count { font-size: .64rem; } }
.slot-list { display: grid; gap: 8px; }
.slot-btn { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); width: 100%; }
.slot-btn:hover, .slot-btn.selected { border-color: var(--primary); background: var(--primary-soft); }

/* admin review editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.preview-pane { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; min-height: 110px; overflow-x: auto; }
.preview-pane:empty::before { content: "Live preview appears here"; color: var(--faint); font-family: var(--font); font-size: .85rem; }
.source-preview { max-height: 520px; overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.source-preview iframe { width: 100%; height: 520px; border: 0; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 36px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input { display: none; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; text-align: left; }
.file-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: .88rem; display: flex; justify-content: space-between; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 32, .55); display: none; place-items: center; z-index: 100; color: #fff; text-align: center; }
.overlay.show { display: grid; }
.overlay .spinner { width: 42px; height: 42px; border-width: 3px; margin-bottom: 14px; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); cursor: pointer; padding: 5px 9px; font-size: .85rem; }

/* Dr. Sharon / Syvara additions */
.about-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.about-card .portrait { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #1247bc, #0f1f82); color: #ffc72c; border: 2px solid #ffc72c; display: grid; place-items: center; font: 700 1.15rem var(--serif); letter-spacing: .04em; }
.about-card p { margin: 0; }
.sidebar-about { margin: 10px 4px 0; padding: 12px; border-radius: var(--radius-sm); background: var(--primary-soft); font-size: .8rem; color: var(--muted); line-height: 1.45; }
.sidebar-about strong { color: var(--heading); display: block; margin-bottom: 2px; }
.info-banner { background: rgba(28, 131, 255, .1); color: #0054a3; border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 auto 8px; max-width: 760px; }
.back-link { font-size: .85rem; color: var(--muted); }
body.embedded .public-top .brand, body.embedded .footer { display: none; }
body.embedded .public-top { justify-content: flex-end; padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 620px) { .about-card { grid-template-columns: 1fr; text-align: center; } .about-card .portrait { margin: 0 auto; } }

.plans.plans-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .plans.plans-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .plans.plans-4 { grid-template-columns: 1fr; } }
.q-num { width: auto; min-width: 40px; padding: 0 6px; font-size: .85rem; }

/* Socratic tutor */
.socratic-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.socratic-steps > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.socratic-steps span { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; }
.socratic-steps strong { font-size: .9rem; color: var(--heading); }
.socratic-steps small { color: var(--muted); font-size: .8rem; }
.reveal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--primary-soft); font-size: .86rem; color: var(--text); }
.reveal-bar form { flex: none; }
@media (max-width: 620px) { .socratic-steps { grid-template-columns: 1fr; } .reveal-bar { flex-direction: column; align-items: stretch; } }
.how-it-works { margin: 8px 0 0; font-size: .86rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 7px 12px; display: inline-block; }
.how-it-works strong { color: var(--heading); font-weight: 600; }
.suggestions .small { display: block; margin-bottom: 2px; }

/* Tutor: current "new problem" marker, welcome text at the top, sidebar never scrolls sideways */
.conv-current { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-weight: 600; text-align: center; }
.conv-current span { font-weight: 400; font-size: .8rem; color: var(--muted); }
.chat-log > .chat-empty { margin: 28px auto auto; }
.sidebar { overflow-x: hidden; }
.brand { min-width: 0; }
.brand > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Tutor layout: columns start level; the blank page fits its content instead of filling the screen */
.tutor > .card + .card { margin-top: 0; }
.tutor.tutor-blank { height: auto; min-height: 0; }
.tutor.tutor-blank .chat-log { flex: none; overflow: visible; }
.tutor.tutor-blank .chat-log > .chat-empty { margin: 20px auto 8px; }
.chat-form > div { min-width: 0; }
.chat-form textarea { width: 100%; }
.chat-hint { font-size: .74rem; color: var(--faint); }

/* Question bank bulk show/hide */
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.table tr.row-hidden td { background: var(--surface-2); }
.table tr.row-hidden td a:not(.btn) { color: var(--muted); }

/* "View as student" */
.view-as-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 32px; background: #fff4d6; color: #5c4400; border-bottom: 1px solid #f0d58c; font-size: .9rem; }
.view-as-bar span { flex: 1 1 260px; }
.view-as-bar select { width: auto; padding: 5px 8px; font-size: .88rem; }
.nav-form { margin: 0; }
.nav-form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font: 500 1rem var(--font); cursor: pointer; text-align: left; }
.nav-form button:hover { background: var(--surface-2); color: var(--text); }
.nav-form svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) { .view-as-bar { padding: 10px 16px; } }

/* Tutor: free / locked notice for Question Bank problems */
.question-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px; background: var(--warn-soft); color: var(--text); border-bottom: 1px solid var(--border); font-size: .88rem; }
.question-note-free { background: var(--accent-soft); }
.question-note form { margin: 0; }
.admin-note { font-size: .8rem; color: var(--warn); margin-top: 3px; }
.admin-note a { color: inherit; text-decoration: underline; }

/* Undergraduate | Graduate tabs (green) */
.level-tabs { display: inline-flex; gap: 6px; padding: 5px; background: #e3f6ea; border: 1px solid #bfe6cc; border-radius: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.level-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 9px; font-weight: 600; color: #146c2e; text-decoration: none; }
.level-tab:hover { background: #cdeed8; text-decoration: none; }
.level-tab.active { background: #158237; color: #fff; box-shadow: 0 1px 3px rgba(21, 130, 55, .35); }
.level-count { font-size: .76rem; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: rgba(21, 130, 55, .12); }
.level-tab.active .level-count { background: rgba(255, 255, 255, .22); }
.level-hint { font-size: .88rem; color: #146c2e; background: #f0faf3; border-left: 3px solid #158237; padding: 8px 12px; border-radius: 6px; margin: -4px 0 16px; }
.level-tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 99px; font-size: .8rem; font-weight: 600; text-decoration: none; }
.level-tag-grad { background: #158237; color: #fff; }
.level-tag-ug { background: #e3f6ea; color: #146c2e; }
.level-tag:hover { text-decoration: none; filter: brightness(.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .level-tabs { background: #15342c; border-color: #1f4d3c; } :root:not([data-theme="light"]) .level-tab { color: #7fdca3; } :root:not([data-theme="light"]) .level-hint { background: #15342c; color: #9de3b8; } }
:root[data-theme="dark"] .level-tabs { background: #15342c; border-color: #1f4d3c; }
:root[data-theme="dark"] .level-tab { color: #7fdca3; }
:root[data-theme="dark"] .level-hint { background: #15342c; color: #9de3b8; }
.badge-purchased { background: #efe6fb; color: #6a1fa8; }
.plan li.not-included { color: var(--faint); }
.plan li.not-included::before { content: "–"; color: var(--faint); }
.contact-tutor { margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2, #f5f8ff); }
.contact-tutor h3 { margin: 0 0 4px; font-size: 1.05rem; }
.contact-tutor textarea { width: 100%; margin: 8px 0 10px; }

.legal { max-width: 820px; margin: 0 auto; line-height: 1.65; }
.legal h2 { font-size: 1.15rem; margin: 22px 0 6px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 4px 0; }
.legal-nav a.active { font-weight: 700; color: var(--text); }
.consent { margin-top: 12px; text-align: center; }

/* Lessons */
.module-title { margin: 26px 0 10px; font-size: 1.05rem; }
.lesson-item .q-num { font-size: 1rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 16px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-soon { opacity: .6; }
.lesson-soon:hover { border-color: var(--border); }

/* Training app brand: royal blue + gold mark, app name in a box (differs from the math app) */
.brand-name { border: 2px solid var(--primary); border-radius: 6px; padding: 4px 9px; }
.hero-code { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 30px; font-family: "JetBrains Mono", monospace; font-size: .92rem; color: var(--faint); }
.course-cover pre, .course-cover code, .course-cover code.hljs { overflow: hidden !important; }
.course-cover pre { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }

/* Dashboard shortcut boxes: light blue */
.quick-card { color: inherit; background: linear-gradient(160deg, #eef5ff 0%, #dceaff 100%); border-color: #a9cbff; transition: transform .15s, box-shadow .15s; }
.quick-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(18, 71, 188, .18); }
.quick-card p { color: #3d4a6b; }
:root[data-theme="dark"] .quick-card { background: linear-gradient(160deg, #1b2a55 0%, #15214a 100%); border-color: #35508f; }
:root[data-theme="dark"] .quick-card p { color: #b9c6e6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quick-card { background: linear-gradient(160deg, #1b2a55 0%, #15214a 100%); border-color: #35508f; } :root:not([data-theme="light"]) .quick-card p { color: #b9c6e6; } }

/* Course cards, softer (matches syvaralearning.com): light blue card, deep-navy code window, mint track label */
.course-card { color: var(--text); background: linear-gradient(160deg, #f3f8ff 0%, #e3eeff 60%, #d6e6ff 100%);
  border: 1.5px solid #a9cbff; box-shadow: 0 6px 18px rgba(15, 31, 130, .10); }
.course-card:hover { box-shadow: 0 12px 28px rgba(18, 71, 188, .20), 0 0 0 3px rgba(169, 203, 255, .45); }
.course-cover { background: linear-gradient(160deg, #141f8c 0%, #0f1a6e 55%, #0a1352 100%); border-color: rgba(154, 232, 193, .35); }
.course-card h3 { color: #0f1f82; }
.course-card .desc { color: #3d4a6b; }
.course-meta { color: #1247bc; }
.track-pill { background: #9ae8c1; border-color: #9ae8c1; color: #0b3d2a; }
.course-card .course-icon { background: linear-gradient(135deg, #1247bc, #0f1f82); }
.course-card .progress { background: rgba(15, 31, 130, .12); }
.course-card .progress > div { background: #1247bc; }
:root[data-theme="dark"] .course-card { background: linear-gradient(160deg, #1b2a55 0%, #15214a 100%); border-color: #35508f; color: #e6e9f5; }
:root[data-theme="dark"] .course-card h3 { color: #fff; }
:root[data-theme="dark"] .course-card .desc { color: #b9c6e6; }
:root[data-theme="dark"] .course-meta { color: #9fc4ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .course-card { background: linear-gradient(160deg, #1b2a55 0%, #15214a 100%); border-color: #35508f; color: #e6e9f5; }
  :root:not([data-theme="light"]) .course-card h3 { color: #fff; }
  :root:not([data-theme="light"]) .course-card .desc { color: #b9c6e6; }
  :root:not([data-theme="light"]) .course-meta { color: #9fc4ff; }
}

/* Syvara Code */
.code-logo { display: inline-grid; place-items: center; width: 44px; height: 40px; border-radius: 10px; margin-right: 6px; vertical-align: -4px;
  background: linear-gradient(135deg, #1247bc, #0f1f82); color: #ffc72c; border: 2px solid #ffc72c; font: 700 1rem "JetBrains Mono", monospace; }
.code-app { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .code-app { grid-template-columns: 1fr; } }
.code-main { border: 1.5px solid #a9cbff; border-radius: 16px; overflow: hidden; background: #0b1230; box-shadow: 0 8px 22px rgba(15, 31, 130, .14); }
.code-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(160deg, #eef5ff, #dceaff); border-bottom: 1px solid #a9cbff; }
.code-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid #a9cbff; border-radius: 10px; padding: 3px; }
.code-tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; cursor: pointer; color: #3d4a6b; }
.code-tabs button[aria-selected="true"] { background: #0f1f82; color: #fff; }
.code-title { font-weight: 600; color: #0f1f82; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.code-editor .CodeMirror { height: 340px; font: .9rem/1.55 "JetBrains Mono", monospace; background: #0b1230; }
.code-editor .CodeMirror-gutters { background: #0b1230; border-right: 1px solid #1d2a66; }
.code-output-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; background: #eef5ff; border-top: 1px solid #a9cbff; }
.code-output-head kbd { font: .75rem "JetBrains Mono", monospace; border: 1px solid #a9cbff; border-radius: 4px; padding: 0 4px; background: #fff; }
.code-output { background: var(--surface); padding: 12px 14px; min-height: 140px; max-height: 520px; overflow: auto; }
.code-output pre.py-out { margin: 0; white-space: pre-wrap; font: .85rem/1.5 "JetBrains Mono", monospace; color: var(--text); background: transparent; }
.py-err { color: var(--danger); }
.py-figure { display: block; max-width: 100%; margin-top: 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.result-meta { color: var(--muted); margin: 6px 0; }
.result-table { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.result-table .table th { position: sticky; top: 0; background: var(--surface-2); }
.result-table td { font: .82rem "JetBrains Mono", monospace; white-space: nowrap; }
.result-table td.null { color: var(--faint); font-style: italic; }
.run-ok { color: var(--accent); font-weight: 600; }
.run-error { border: 1px solid var(--danger-soft); background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.run-error pre { white-space: pre-wrap; margin: 6px 0 8px; font: .82rem "JetBrains Mono", monospace; background: transparent; color: inherit; }
.translated { margin-top: 10px; color: var(--muted); }
.translated pre { white-space: pre-wrap; font: .8rem "JetBrains Mono", monospace; background: var(--surface-2); padding: 8px; border-radius: 6px; }
.code-side { display: grid; gap: 16px; }
.schema details { padding: 4px 0; border-bottom: 1px solid var(--border); }
.schema summary { cursor: pointer; }
.schema ul { margin: 4px 0 4px 16px; padding: 0; font-family: "JetBrains Mono", monospace; font-size: .78rem; }
.snippet-list .snippet { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); }
.snippet-list .snippet.active .snippet-open { color: var(--primary); font-weight: 700; }
.snippet-open { flex: 1; text-align: left; background: none; border: 0; padding: 7px 2px; cursor: pointer; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.snippet-del { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; }
.snippet-del:hover { color: var(--danger); }
pre.has-try-it { position: relative; padding-bottom: 38px; }
.try-it { position: absolute; right: 10px; bottom: 8px; border: 1px solid #ffc72c; background: #0f1f82; color: #ffc72c; border-radius: 8px; padding: 3px 10px; font-size: .78rem; font-weight: 600; cursor: pointer; }
.try-it:hover { background: #1247bc; }
.code-promo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 8px; }
.code-editor .cm-s-material-darker.CodeMirror, .code-editor .cm-s-material-darker .CodeMirror-gutters { background: #0b1230; }
.code-editor .cm-s-material-darker .CodeMirror-activeline-background { background: #141f5c; }
.code-app [hidden] { display: none !important; }
.tips-card { background: linear-gradient(160deg, #f3fbf7 0%, #e3f6ec 100%); border-color: #9ae8c1; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips li { display: grid; gap: 2px; font-size: .88rem; }
.tips a { font-weight: 700; }
.tips a::after { content: " ↗"; font-weight: 400; }
.tips span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
:root[data-theme="dark"] .tips-card { background: linear-gradient(160deg, #15302a, #11261f); border-color: #2d6b52; }

/* Quizzes */
.quiz { margin-top: 16px; }
.quiz-q { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px 14px; margin: 0 0 14px; }
.quiz-q legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.quiz-q.right { border-color: #9ae8c1; background: rgba(154, 232, 193, .12); }
.quiz-q.wrong { border-color: var(--danger-soft); background: rgba(220, 53, 69, .05); }
.quiz-mark { font-weight: 800; }
.quiz-q.right .quiz-mark { color: var(--accent); }
.quiz-q.wrong .quiz-mark { color: var(--danger); }
.quiz-choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; margin: 6px 0; cursor: pointer; font-weight: 500; }
.quiz-choice:hover { border-color: var(--primary); }
.quiz-choice input { margin-top: 4px; accent-color: var(--primary); }
.quiz-choice.is-correct { border-color: var(--accent); background: rgba(154, 232, 193, .25); }
.quiz-choice.is-correct span::after { content: "  ✓ correct"; color: var(--accent); font-weight: 700; font-size: .85em; }
.quiz-choice.is-picked-wrong { border-color: var(--danger); }
.quiz-choice.is-picked-wrong span::after { content: "  ✗ your answer"; color: var(--danger); font-weight: 700; font-size: .85em; }
.quiz-explain { margin: 10px 0 0 !important; max-width: none !important; }
.quiz-score { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.quiz-pass { background: rgba(154, 232, 193, .35); border: 1px solid #9ae8c1; }
.quiz-fail { background: var(--warn-soft); border: 1px solid var(--warn); }
.quiz-editor .quiz-q textarea { font-family: var(--font); }
.quiz-code { font: .86rem/1.5 "JetBrains Mono", monospace; }
.quiz-num { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 6px; border-radius: 8px; background: #0f1f82; color: #ffc72c; font-weight: 700; font-size: .85rem; }

/* Course page: certificate box */
.cert-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 16px 18px; border-left: 4px solid #c9a227; }
.cert-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: #f3e7bd; flex: none; }
.tab-code { font: 700 .82em var(--mono, "JetBrains Mono", monospace); letter-spacing: -.04em; }

/* Trainings: the banner on Book a Session, and the Trainings page (live programs, courses, free previews) */
.tr-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; padding: 18px 22px; border-radius: var(--radius);
  color: #fff; text-decoration: none; background-color: #0b1f5c;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(115deg, #0b1f5c 0%, #1b3a9e 60%, #2456c8 100%);
  background-size: 34px 34px, 34px 34px, auto; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.tr-banner:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(11, 31, 92, .28); }
.tr-banner-pill { background: var(--mint); color: #0b1f5c; font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tr-banner-text { flex: 1 1 260px; display: flex; flex-direction: column; line-height: 1.35; }
.tr-banner-text strong { font-family: Montserrat, var(--font); font-size: 1.1rem; }
.tr-banner-text span { color: #d6e2ff; font-size: .95rem; }
.tr-banner-go { font-weight: 700; color: #ffc72c; white-space: nowrap; }

.tr-hero { border-radius: var(--radius); color: #fff; margin-bottom: 18px; background-color: #0b1f5c;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(120deg, #0b1f5c, #1b3a9e 70%, #2456c8);
  background-size: 48px 48px, 48px 48px, auto; }
.tr-hero-in { padding: 34px 32px; max-width: 760px; }
.tr-kicker { display: inline-block; background: var(--mint); color: #0b1f5c; font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tr-hero h1 { color: #fff; font-size: 2.4rem; margin: 12px 0 8px; }
.tr-hero p { color: #d6e2ff; margin: 0 0 18px; font-size: 1.05rem; }
.tr-btn-light { background: #fff; color: #0b1f5c; }
.tr-btn-light:hover { background: #eaf0ff; color: #0b1f5c; }
.tr-btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.tr-btn-outline:hover { background: rgba(255,255,255,.1); }
.tr-tabs { display: flex; gap: 6px 22px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 8px; position: sticky; top: 0; background: var(--bg); z-index: 2; padding-top: 6px; }
.tr-tabs a { padding: 8px 2px 10px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.tr-tabs a:hover { color: var(--primary); border-bottom-color: var(--primary); text-decoration: none; }
.tr-tabs a span { font-size: .8rem; color: var(--faint); margin-left: 2px; }
.tr-section { padding-top: 22px; scroll-margin-top: 50px; }
.tr-section h2 { margin: 0; }
.tr-section > .muted { margin: 2px 0 14px; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, transform .15s; }
.tr-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.tr-tag { padding: 3px 10px; border-radius: 6px; font-weight: 600; font-size: .82rem; background: var(--primary-soft); color: var(--primary); }
.tr-tag-preview { background: var(--accent-soft); color: var(--accent); }
.tr-tag-course { background: #fff4d6; color: #8a6200; }
.tr-price { margin-left: auto; font-weight: 700; }
.tr-card h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.22rem; line-height: 1.3; }
.tr-summary { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .92rem; }
.tr-go { font-weight: 700; color: var(--text); white-space: nowrap; }
.tr-live { color: var(--accent); font-weight: 600; }
.tr-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
@media (max-width: 600px) { .tr-hero-in { padding: 26px 18px; } .tr-hero h1 { font-size: 1.9rem; } }
.tr-banner-stack { margin-top: 16px; }
.tr-banner-stack .tr-banner { margin: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.tr-banner-stack .tr-banner-text { flex: none; }
/* Trainings: type filter, price, promo code, past offerings, editor boxes */
.tr-filter button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 2px 10px; font: 600 1rem var(--font); color: var(--muted); cursor: pointer; }
.tr-filter button.active, .tr-filter button:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tr-card[hidden] { display: none; }
.tr-price-free { color: var(--accent); }
.tr-promo-strip { background: #fff7e0; border: 1px dashed #e0b84a; color: #6b4e00; border-radius: 10px; padding: 7px 10px; font-size: .9rem; }
.tr-promo-strip strong { letter-spacing: .05em; }
.tr-when-set { color: var(--text); font-weight: 600; }
.tr-card-past { opacity: .78; padding: 16px 18px; }
.tr-card-past h3 { font-size: 1.05rem; }
.tr-card-past .tr-summary { -webkit-line-clamp: 1; }
.tr-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 14px; margin: 0 0 16px; }
.tr-box legend { font-weight: 700; padding: 0 6px; }
.tr-choice { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 2px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 600; }
.tr-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.tr-money { display: flex; align-items: center; gap: 6px; } .tr-money span { font-weight: 700; color: var(--muted); }
.tr-promo { background: var(--surface-2, #f7f8fb); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 4px; }
/* Training editor: the blue "Create a Zoom meeting" box; public "Live on Zoom" label */
.zoom-box { background: #e8f0ff; border: 1px solid #b9cdf7; border-radius: var(--radius); padding: 14px 16px; color: #0b1f5c; }
.zoom-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.zoom-head > div { flex: 1 1 280px; }
.zoom-box .small { color: #33427a; margin-top: 3px; }
.zoom-box label { color: #0b1f5c; }
.zoom-btn { background: #0b5cff; }
.zoom-btn:hover { background: #0a4fd6; }
.tr-zoom { color: #0b5cff; font-weight: 600; font-size: .82rem; }
