/* RealPrep Desmos Lab: same tokens and look as the Vocabulary Lab (.rpv) */
.rpd {
	--rpd-teal: #13606C; --rpd-teal-dark: #0B4049; --rpd-teal-soft: #E6F2F3; --rpd-ink: #1F2A2C; --rpd-muted: #4D5F62;
	--rpd-line: #D7DFE0; --rpd-bg: #F5F8F8; --rpd-card: #FFFFFF; --rpd-gold: #E0A100;
	--rpd-e-bg: #E3F4E8; --rpd-e: #1D6B36; --rpd-m-bg: #FDF0D5; --rpd-m: #7A4E00; --rpd-h-bg: #FBE4E2; --rpd-h: #9B2C22;
	--rpd-blue: #2D70B3;
	font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--rpd-ink);
	box-sizing: border-box;
	container-type: inline-size;
}
.rpd *, .rpd *::before, .rpd *::after { box-sizing: border-box; }
.rpd [hidden] { display: none !important; }
/* The Lab breaks out of narrow theme columns so the split screen has room. */
.rpd.rpd-app { width: min(1240px, calc(100vw - 32px)); max-width: none; position: relative; left: 50%; transform: translateX(-50%); }

/* ---------- Theme-proofing ---------- */
.rpd button { font: inherit; margin: 0; text-transform: none; letter-spacing: normal; text-shadow: none; box-shadow: none; line-height: 1.25; width: auto; min-width: 0; text-decoration: none; -webkit-appearance: none; appearance: none; }
.rpd select { -webkit-appearance: auto; appearance: auto; box-shadow: none; margin: 0; line-height: normal; }
.rpd input[type="text"] { box-shadow: none; margin: 0; }
body .rpd p { margin-bottom: 0; }
.rpd h2, .rpd h3 { letter-spacing: normal; text-transform: none; padding: 0; border: 0; }
.rpd a { text-decoration: none; box-shadow: none; }
.rpd svg { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.rpd .rpd-muted { color: var(--rpd-muted); margin: 0; }
.rpd .rpd-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rpd-muted); }
.rpd .rpd-loading, .rpd .rpd-ph { color: var(--rpd-muted); font-size: 14px; }
.rpd .rpd-ph { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; padding: 24px; text-align: center; background: var(--rpd-bg); }

/* ---------- App frame ---------- */
.rpd.rpd-app { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 40px; }
.rpd.rpd-app > [data-view], .rpd.rpd-app > [data-solve] { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rpd .rpd-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.rpd .rpd-top > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.rpd .rpd-h1 { margin: 0; font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 36px; color: #13404A; }
.rpd .rpd-h3 { margin: 0 0 10px; font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 20px; color: #13404A; }

.rpd .rpd-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rpd .rpd-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 72px; padding: 12px 14px; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); color: #13404A; text-align: left; cursor: pointer; }
.rpd .rpd-mode b { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 18px; }
.rpd .rpd-mode span { font-size: 13px; opacity: .85; }
.rpd .rpd-mode.is-on { border: 2px solid var(--rpd-teal); background: var(--rpd-teal); color: #FFFFFF; }

.rpd .rpd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px; background: var(--rpd-card); border: 1px solid var(--rpd-line); border-radius: 14px; }
.rpd .rpd-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--rpd-muted); }
.rpd .rpd-field select { height: 44px; padding: 0 12px; border: 1px solid #C9D3D5; border-radius: 10px; background: #FFFFFF; color: var(--rpd-ink); font: inherit; font-size: 15px; font-weight: 400; max-width: 100%; }
.rpd .rpd-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rpd .rpd-pill { height: 44px; padding: 0 14px; border: 1px solid #C9D3D5; border-radius: 10px; background: #FFFFFF; color: #2E3D40; font-weight: 700; font-size: 14px; cursor: pointer; }
.rpd .rpd-pill.is-on { border: 2px solid var(--rpd-teal); background: var(--rpd-teal-soft); color: var(--rpd-teal-dark); }
.rpd .rpd-count { margin: 0 0 10px; font-weight: 700; color: var(--rpd-muted); font-variant-numeric: tabular-nums; }
.rpd .rpd-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.rpd .rpd-empty { padding: 28px; text-align: center; color: var(--rpd-muted); background: var(--rpd-card); border: 1px dashed #C9D3D5; border-radius: 14px; }

.rpd .rpd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--rpd-teal); color: #FFFFFF; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.rpd .rpd-btn-soft { background: #FFFFFF; color: var(--rpd-teal); border: 1px solid var(--rpd-teal); }
.rpd .rpd-btn:disabled { opacity: .45; cursor: default; }
.rpd .rpd-link { padding: 0; border: 0; background: none; color: var(--rpd-teal); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- Chips ---------- */
.rpd .rpd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rpd .rpd-chip.rpd-round { background: #EAF0FB; color: #2B4C8C; font-weight: 600; }
.rpd .rpd-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; background: #EEF2F3; color: #2E3D40; }
.rpd .rpd-d-E { background: var(--rpd-e-bg); color: var(--rpd-e); }
.rpd .rpd-d-M { background: var(--rpd-m-bg); color: var(--rpd-m); }
.rpd .rpd-d-H { background: var(--rpd-h-bg); color: var(--rpd-h); }
.rpd .rpd-meth { background: #E6EEF8; color: #1F4F80; }

/* ---------- Question cards (no test, round or number on them) ---------- */
.rpd .rpd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.rpd .rpd-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 132px; padding: 14px 16px; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); color: var(--rpd-ink); text-align: left; cursor: pointer; }
.rpd .rpd-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.rpd .rpd-card-head .rpd-chip { white-space: nowrap; }
/* Counter inside a skill ("#3"): tells apart cards with the same skill; numbered in random order, never by test. */
.rpd .rpd-card-no { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 14px; color: var(--rpd-muted); white-space: nowrap; }
.rpd .rpd-card-skill { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 18px; line-height: 1.25; color: #13404A; }
.rpd .rpd-card-meta { font-size: 13px; color: var(--rpd-muted); }
.rpd .rpd-card-method { font-size: 13px; font-weight: 700; color: #1F4F80; }
.rpd .rpd-card-video { font-size: 12px; font-weight: 700; color: var(--rpd-teal); }
.rpd .rpd-status, .rpd .rpd-lock { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; font-weight: 800; color: var(--rpd-muted); }
.rpd .rpd-status.is-new { color: var(--rpd-teal); }
.rpd .rpd-status.is-solved { color: var(--rpd-e); }
.rpd .rpd-status.is-retry { color: var(--rpd-h); }
.rpd .rpd-fav-dot { color: var(--rpd-gold); --rpd-star-fill: 1; display: inline-flex; }
.rpd .rpd-card.is-solved { border-color: #A9D8B7; box-shadow: inset 4px 0 0 var(--rpd-e); }
.rpd .rpd-card.is-locked { background: #F7F9F9; border-style: dashed; }
.rpd .rpd-card.is-locked .rpd-card-skill { color: #5B6B6E; }

/* ---------- Skills / methods ---------- */
.rpd .rpd-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 4px; }
.rpd .rpd-topic-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 130px; padding: 18px; text-align: left; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); color: var(--rpd-ink); cursor: pointer; }
.rpd .rpd-topic-card b { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 19px; color: #13404A; }
.rpd .rpd-topic-card span { font-size: 13px; color: var(--rpd-muted); font-weight: 700; }
.rpd .rpd-topic-card em { font-style: normal; font-size: 15px; color: #2E3D40; }
.rpd .rpd-topic-card .rpd-bar { margin-top: auto; }

/* ---------- Progress strip ---------- */
.rpd .rpd-progress-strip { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(135deg, #0B4049 0%, #13606C 100%); color: #FFFFFF; }
.rpd .rpd-progress-strip:empty { display: none; }
.rpd .rpd-ps-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.rpd .rpd-ps-known { display: flex; flex-direction: column; }
.rpd .rpd-ps-known .rpd-label { margin: 0 0 2px; color: #CDE6E9; }
.rpd .rpd-ps-known b { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.rpd .rpd-ps-known small, .rpd .rpd-ps-rank small { color: #CDE6E9; font-size: 13px; font-weight: 700; }
.rpd .rpd-ps-rank { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.rpd .rpd-rank-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #FCEBC0; color: #5A3B00; font-weight: 800; font-size: 14px; }
.rpd .rpd-ps-nums { display: flex; gap: 10px; }
.rpd .rpd-num { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 82px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.rpd .rpd-num b { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rpd .rpd-num span { font-size: 12px; color: #CDE6E9; font-weight: 700; }
.rpd .rpd-num-streak svg { color: #9FB7BA; }
.rpd .rpd-num-streak.is-live svg { color: #FFB547; }
.rpd .rpd-ps-diffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rpd .rpd-pd-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.rpd .rpd-pd-top small { color: #CDE6E9; font-weight: 600; }
.rpd .rpd-bar { display: block; width: 100%; height: 8px; border-radius: 99px; background: #E3E9EA; overflow: hidden; }
.rpd .rpd-bar i { display: block; height: 100%; border-radius: inherit; background: var(--rpd-teal); transition: width .45s ease; }
.rpd .rpd-progress-strip .rpd-bar { background: rgba(255, 255, 255, .2); }
.rpd .rpd-progress-strip .rpd-bar i { background: #FCD56B; }
.rpd .rpd-progress-strip .rpd-pd-E .rpd-bar i { background: #7DDB9A; }
.rpd .rpd-progress-strip .rpd-pd-H .rpd-bar i { background: #FF9C8F; }
.rpd .rpd-badges summary { cursor: pointer; font-weight: 700; font-size: 14px; color: #FFFFFF; }
.rpd .rpd-badge-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; margin-top: 10px; }
.rpd .rpd-badge { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #CDE6E9; }
.rpd .rpd-badge b { font-size: 14px; color: #FFFFFF; opacity: .6; }
.rpd .rpd-badge span { font-size: 12px; }
.rpd .rpd-badge.is-on { background: #FCEBC0; color: #6B4300; }
.rpd .rpd-badge.is-on b { color: #5A3B00; opacity: 1; }

/* ---------- Levels ---------- */
.rpd .rpd-level-help { margin-bottom: 4px; }
.rpd .rpd-level-row { margin-bottom: 8px; }
.rpd .rpd-level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rpd .rpd-level { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 124px; padding: 14px; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); color: var(--rpd-ink); text-align: left; cursor: pointer; }
.rpd .rpd-level-n { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rpd-muted); }
.rpd .rpd-level b { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 28px; line-height: 1.1; color: #13404A; font-variant-numeric: tabular-nums; }
.rpd .rpd-level b small { font-size: 15px; color: var(--rpd-muted); }
.rpd .rpd-level-sub { font-size: 12px; font-weight: 700; color: var(--rpd-muted); }
.rpd .rpd-level-E .rpd-bar i { background: var(--rpd-e); }
.rpd .rpd-level-M .rpd-bar i { background: #C98A00; }
.rpd .rpd-level-H .rpd-bar i { background: var(--rpd-h); }
.rpd .rpd-level.is-done { border: 2px solid var(--rpd-e); background: #F2FBF5; }
.rpd .rpd-level.is-done .rpd-level-n { color: var(--rpd-e); }
.rpd .rpd-level.is-locked { border-style: dashed; background: #F3F6F6; cursor: not-allowed; }
.rpd .rpd-level.is-locked b { color: #8A9A9D; }
.rpd .rpd-level-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); }
.rpd .rpd-level-title { display: flex; align-items: center; gap: 8px; }
.rpd .rpd-level-title .rpd-h3 { margin: 0; }
.rpd .rpd-level-meter { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--rpd-muted); }
.rpd .rpd-level-meter b { color: #13404A; }

/* ---------- Solve view: question | Desmos ---------- */
.rpd .rpd-solve-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rpd .rpd-solve { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; border: 1px solid var(--rpd-line); border-radius: 16px; overflow: hidden; background: var(--rpd-card); min-height: 560px; }
.rpd .rpd-qpane { padding: 18px 20px; overflow: auto; max-height: 82vh; border-right: 1px solid var(--rpd-line); display: flex; flex-direction: column; gap: 12px; }
.rpd .rpd-calcpane { display: flex; flex-direction: column; min-width: 0; min-height: 560px; }
.rpd .rpd-solve-admin { grid-template-columns: 1fr; min-height: 0; }
.rpd .rpd-qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rpd .rpd-qhead .rpd-star { margin-left: auto; }
.rpd .rpd-hint { margin: 0; padding: 8px 12px; border-radius: 10px; background: #FDF6E3; color: #5A3B00; font-size: 14px; }
.rpd .rpd-done-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--rpd-e); font-weight: 700; font-size: 14px; }
.rpd .rpd-qtext { font-size: 16px; line-height: 1.6; }
.rpd .rpd-qtext img { max-width: 100%; height: auto; }
.rpd .rpd-qtext table { border-collapse: collapse; margin: 8px 0; }
.rpd .rpd-qtext td, .rpd .rpd-qtext th { border: 1px solid var(--rpd-line); padding: 4px 10px; }
.rpd .rpd-choices { display: flex; flex-direction: column; gap: 8px; }
.rpd .rpd-choice { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 14px; border: 2px solid var(--rpd-line); border-radius: 12px; background: var(--rpd-card); color: var(--rpd-ink); text-align: left; font-size: 16px; cursor: pointer; }
.rpd .rpd-choice b { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid currentColor; font-size: 14px; }
.rpd .rpd-choice.is-right { border-color: var(--rpd-e); background: var(--rpd-e-bg); color: var(--rpd-e); }
.rpd .rpd-choice.is-wrong { border-color: var(--rpd-h); background: var(--rpd-h-bg); color: var(--rpd-h); animation: rpd-shake .4s ease; }
.rpd .rpd-spr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.rpd .rpd-spr label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; color: var(--rpd-muted); }
.rpd .rpd-sprin { height: 46px; width: 180px; padding: 0 12px; border: 2px solid #C9D3D5; border-radius: 10px; font: inherit; font-size: 17px; color: var(--rpd-ink); background: #FFFFFF; }
.rpd .rpd-fb { min-height: 24px; font-size: 15px; }
.rpd .rpd-fb.is-right { color: var(--rpd-e); }
.rpd .rpd-fb.is-wrong { color: var(--rpd-h); }
.rpd .rpd-fb .rpd-next-q { margin-top: 10px; display: flex; }
.rpd .rpd-star { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid #C9D3D5; border-radius: 10px; background: #FFFFFF; color: var(--rpd-muted); font-weight: 700; font-size: 14px; cursor: pointer; --rpd-star-fill: 0; }
.rpd .rpd-star.is-on { border: 2px solid #A16207; background: #FDF6E3; color: #6B4300; --rpd-star-fill: 1; }
.rpd .rpd-star.is-on svg { color: var(--rpd-gold); }
.rpd .rpd-dollar { font-style: normal; }

.rpd .rpd-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--rpd-line); background: var(--rpd-bg); }
.rpd .rpd-tab { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--rpd-muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.rpd .rpd-tab[aria-selected="true"] { background: var(--rpd-card); border-color: var(--rpd-line); color: var(--rpd-teal-dark); margin-bottom: -1px; }
.rpd .rpd-soon { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #FCEBC0; color: #5A3B00; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.rpd .rpd-calcwrap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.rpd .rpd-calc { flex: 1 1 auto; min-height: 440px; }
.rpd .rpd-guide { border-top: 1px solid var(--rpd-line); padding: 12px 16px; background: #FBFCFC; }
.rpd .rpd-say { min-height: 48px; font-size: 15.5px; line-height: 1.55; }
.rpd .rpd-nav { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rpd .rpd-stepn { margin-right: auto; font-size: 13px; font-weight: 700; color: var(--rpd-muted); font-variant-numeric: tabular-nums; }
.rpd .rpd-nav .rpd-btn { min-height: 40px; padding: 0 16px; }
.rpd .rpd-video { flex: 1 1 auto; padding: 16px; display: flex; align-items: center; justify-content: center; }
.rpd .rpd-video video { width: 100%; border-radius: 12px; }
.rpd .rpd-frame { position: relative; width: 100%; padding-top: 56.25%; }
.rpd .rpd-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.rpd .rpd-soon-box { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 360px; padding: 28px; text-align: center; border: 1px dashed #C9D3D5; border-radius: 16px; color: var(--rpd-muted); }
.rpd .rpd-soon-box b { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 19px; color: #13404A; }
.rpd .rpd-err { margin: 8px 0 0; color: var(--rpd-h); font-weight: 700; }

/* ---------- Access ---------- */
.rpd .rpd-preview-bar, .rpd.rpd-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid #CFE6E9; border-radius: 14px; background: var(--rpd-teal-soft); color: #13404A; transition: box-shadow .3s ease; }
.rpd .rpd-preview-bar p, .rpd.rpd-login p { margin: 0; flex: 1 1 260px; font-weight: 700; }
.rpd .rpd-preview-bar.is-flash { box-shadow: 0 0 0 4px #FCD56B; }
.rpd .rpd-cta-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hover (re-stated so theme button:hover rules cannot repaint them) ---------- */
.rpd .rpd-pill:hover, .rpd .rpd-star:hover { background: #F1F7F7; color: var(--rpd-teal-dark); border-color: var(--rpd-teal); }
.rpd .rpd-pill.is-on:hover { background: var(--rpd-teal-soft); color: var(--rpd-teal-dark); }
.rpd .rpd-star.is-on:hover { background: #FBEFCB; color: #6B4300; border-color: #A16207; }
.rpd .rpd-mode:hover, .rpd .rpd-topic-card:hover, .rpd .rpd-level:hover, .rpd .rpd-card:hover, .rpd .rpd-choice:hover { background: #F7FBFB; color: #13404A; border-color: var(--rpd-teal); }
.rpd .rpd-mode.is-on:hover { background: var(--rpd-teal); color: #FFFFFF; }
.rpd .rpd-level.is-locked:hover { background: #F3F6F6; border-color: var(--rpd-line); }
.rpd .rpd-choice.is-right:hover { background: var(--rpd-e-bg); color: var(--rpd-e); border-color: var(--rpd-e); }
.rpd .rpd-choice.is-wrong:hover { background: var(--rpd-h-bg); color: var(--rpd-h); border-color: var(--rpd-h); }
.rpd .rpd-tab:hover { background: #EEF4F4; color: var(--rpd-teal-dark); }
.rpd .rpd-tab[aria-selected="true"]:hover { background: var(--rpd-card); }
.rpd .rpd-btn:hover { background: var(--rpd-teal-dark); color: #FFFFFF; text-decoration: none; }
.rpd .rpd-btn-soft:hover { background: var(--rpd-teal-soft); color: var(--rpd-teal-dark); }
.rpd .rpd-link:hover { background: none; color: var(--rpd-teal-dark); }
.rpd button:focus-visible, .rpd a:focus-visible, .rpd select:focus-visible, .rpd input:focus-visible { outline: 3px solid #7FB8C0; outline-offset: 2px; }
@keyframes rpd-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Toasts ---------- */
.rpd-toast { position: fixed; z-index: 2147483001; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: #13404A; color: #FFFFFF; font: 600 14px 'Nunito Sans', system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); text-align: center; }
.rpd-toast-xp { background: #1D6B36; }
.rpd-toast-win { background: linear-gradient(135deg, #7A4E00, #C98A00); font-size: 15px; font-weight: 800; }

/* ---------- Quiz review link ---------- */
.rpd-review-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; border: 2px solid #13606C; border-radius: 18px; color: #13606C; font: 700 14px 'Nunito Sans', system-ui, sans-serif; text-decoration: none; background: #FFFFFF; }
.rpd-review-link:hover { background: #E6F2F3; color: #0B4049; text-decoration: none; }

/* ---------- Narrow screens ---------- */
@container (max-width: 900px) {
	.rpd .rpd-solve { grid-template-columns: 1fr; }
	.rpd .rpd-qpane { max-height: none; border-right: 0; border-bottom: 1px solid var(--rpd-line); }
	.rpd .rpd-calcpane { min-height: 520px; }
	.rpd .rpd-ps-main { grid-template-columns: auto minmax(0, 1fr); }
	.rpd .rpd-ps-nums { grid-column: 1 / -1; }
	.rpd .rpd-num { flex: 1 1 0; }
	.rpd .rpd-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 600px) {
	.rpd .rpd-h1 { font-size: 28px; }
	.rpd .rpd-ps-main { grid-template-columns: 1fr; gap: 14px; }
	.rpd .rpd-ps-diffs { grid-template-columns: 1fr; gap: 10px; }
	.rpd .rpd-ps-known b { font-size: 40px; }
	.rpd .rpd-filters > .rpd-field { flex: 1 1 100%; }
	.rpd .rpd-cta-btns, .rpd .rpd-cta-btns .rpd-btn { width: 100%; }
	.rpd .rpd-tab { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .rpd * { transition: none !important; animation: none !important; } }

/* Desmos methods in learning order */
.rpd .rpd-tier-row { margin-top: 18px; }
.rpd .rpd-tier-row .rpd-h3 { margin: 0; }
.rpd .rpd-tier-sub { margin: 4px 0 10px; }
.rpd .rpd-tier { font-weight: 700; }
.rpd .rpd-tier-F { background: #E3F4E8; color: #1E6B3A; }
.rpd .rpd-tier-C { background: #E4EEF9; color: #1F4E86; }
.rpd .rpd-tier-A { background: #F3E8FA; color: #6A2C91; }
.rpd .rpd-method-card .rpd-step-n { display: inline-flex; align-items: center; gap: 4px; }
.rpd .rpd-method-card .rpd-method-desc { font-size: 14px; color: var(--rpd-muted); }
.rpd .rpd-method-card.is-next { border-color: var(--rpd-teal); box-shadow: 0 0 0 2px rgba(19, 100, 110, .15); }
.rpd .rpd-method-card.is-next .rpd-step-n { color: var(--rpd-teal); }
.rpd .rpd-method-card.is-done .rpd-step-n { color: #2E7D46; }
.rpd .rpd-method-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--rpd-line); border-radius: 14px; background: var(--rpd-card); }
.rpd .rpd-method-head .rpd-h3 { margin: 6px 0 2px; }
.rpd .rpd-method-head p { margin: 0; }
.rpd .rpd-method-nav { display: flex; flex-wrap: wrap; gap: 8px; }

/* Sort and group */
.rpd .rpd-listbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 10px; }
.rpd .rpd-listbar > p { flex: 1 1 260px; margin: 0; }
.rpd .rpd-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--rpd-muted); }
.rpd .rpd-mini select { height: 36px; padding: 0 10px; border: 1px solid #C9D3D5; border-radius: 9px; background: #FFFFFF; color: var(--rpd-ink); font: inherit; font-size: 14px; font-weight: 400; }
.rpd .rpd-group { margin: 6px 0 18px; }
.rpd .rpd-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rpd-line); font-size: 17px; color: #13404A; }
.rpd .rpd-group-head small { font-size: 13px; font-weight: 700; color: var(--rpd-muted); }
.rpd .rpd-group-head .rpd-bar { flex: 0 0 120px; height: 6px; }
@media (max-width: 600px) { .rpd .rpd-mini { flex: 1 1 100%; } .rpd .rpd-mini select { flex: 1; } }

/* My questions: sub-sections */
.rpd .rpd-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rpd .rpd-subtab { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--rpd-line); border-radius: 99px; background: var(--rpd-card); color: var(--rpd-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.rpd .rpd-subtab small { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: #E3E9EA; color: var(--rpd-muted); font-size: 12px; text-align: center; }
.rpd .rpd-subtab.is-on { border: 2px solid var(--rpd-teal); background: var(--rpd-teal-soft); color: var(--rpd-teal-dark); }
.rpd .rpd-subtab.is-on small { background: var(--rpd-teal); color: #FFFFFF; }

/* 2.5.1: charts ([dt_chart]) inside questions */
.rpd .rpd-qtext .dt-chart-container { margin: 12px auto; }
.rpd .rpd-qtext canvas { max-width: 100%; }
