/* ================================================================
   BASIC MODE — the practice question, stripped to what you answer

   Seth, 2026-08-23: the practice tab "shows way too much information.
   For now it just needs to show the title of the problem area, the
   question, and the examples if it's a faded or worked example problem
   ... keep the feedback and all the other extra information for
   Advanced mode from the settings."

   So this file is the OFF half of a toggle that already existed. app.js
   `applyModeVisibility` writes `body.dd-basic-mode` whenever the Account
   tab's Advanced mode checkbox is off (it is off by default), and the
   progress ladder was already gated on exactly this class
   (stage-ladder.css). Everything below rides with it.

   🔴 DISPLAY ONLY, and that is deliberate. Every element here keeps its
   id, stays in the DOM, and is still written to by the same code that
   always wrote to it — the AI explanation still loads, the tutor still
   opens, `solutionCode.textContent` is still set on every grade. Ticking
   Advanced mode reveals content that is already there rather than
   starting a fetch. Nothing in practice/*.js may start reading this
   class to decide whether to RENDER something; the one behavioural
   consequence of hiding the difficulty rating is handled in exactly one
   place, practice/basic-mode.js, and is documented there.

   🔴 NOT ON THE COLAB EDITION, and that is why every selector here is
   prefixed `html:not(.dd-colab-edition)`. That deploy has already cut
   this rail down, differently and on purpose (colab-edition.css): the
   question text, the imports, the target image, the whole right-hand
   editor panel, the AI explanation and the tutor are gone there, and the
   two things it deliberately KEEPS are the two this file would have
   taken. The reference solution — "after pressing submit… it should
   display the solution to the problem at the bottom", which is the
   review step that deploy is built around — and the felt-difficulty
   rating with its help line, which colab-edition.css restyles into a
   stacked column because "nothing advances until one is pressed".
   `body.dd-basic-mode` is written there too (app.js runs on both
   deploys and Advanced is off by default), and these rules out-specified
   colab-edition.css's, which only touches border and padding on
   `.solution-section` — so unguarded, Basic mode silently deleted the
   solution that edition exists to show.

   ⚠️ The guard is the whole edition, not `:not(.dd-no-notebook)` as
   colab-edition.css scopes itself. So on the ~75 Colab questions with no
   published notebook — where that sheet turns itself off and the rail is
   the whole screen — Basic mode stays off as well and the learner gets
   the full panel. One predicate that both this file and
   practice/basic-mode.js can state identically is worth more than
   covering that corner with a second, subtly different one.

   WHAT SURVIVES, in DOM order:
     .question-number-row   the concept this problem is about
     #question-text         the problem. 🪦 ladder.js used to append the
                            KP's worked example INSIDE it
                            (`.ladder-example`); examples live in lessons
                            only as of 2026-09-10, so all this holds now
                            is the prompt and its callouts
     #question-visual       a target image is part of the question — a
                            question that asks you to reproduce a picture
                            is unanswerable without it
     #torch-colab-notice    the only route to actually doing a PyTorch
                            drill, not decoration
     #practice-submit-area  Submit / Skip
     .result-row            Correct / Incorrect
     #next-problem-btn      the way on
   ================================================================ */

/* ---------- before the answer ---------- */

/* The starter's imports, expanded into pills with array previews behind
   them. Reference material about code the learner can already read in
   the editor. */
html:not(.dd-colab-edition) body.dd-basic-mode #question-imports {
  display: none;
}

/* Show hint + the revealed hint. */
html:not(.dd-colab-edition) body.dd-basic-mode .practice-aids {
  display: none;
}

/* ---------- after the answer ---------- */

/* "Is this a mistake? Correct it with [I got it right]" — a grading
   appeal, and appeals are an advanced concern. */
html:not(.dd-colab-edition) body.dd-basic-mode #override-row {
  display: none;
}

/* ---------- the difficulty question is NOT hidden any more ----------

   🔴 2026-08-28 REVERSAL, and the reason this block is a comment instead of
   a rule. Basic mode used to hide the felt-difficulty rating — its prompt,
   its explainer and its three buttons — and practice/basic-mode.js clicked
   the neutral default on the learner's behalf so that the attempt still
   committed and Next problem still appeared. The cost was stated plainly at
   the time: in basic mode, which is what everyone who has not ticked
   Advanced is in, the difficulty signal was `not_much` every time and never
   the learner's.

   Seth, 2026-08-28, live-testing, asked for the opposite: after Submit the
   button is replaced by three DIRECTIONAL choices — "how much harder do you
   want the next problem to be?" after a correct answer, "how much easier?"
   after a miss — frozen to the bottom of the viewport "so that it's
   extremely obvious", and clicking one both rates and advances. That is the
   whole of the post-submit interface now, so the default mode is precisely
   the mode that must show it. practice/difficulty-dock.js moves the prompt
   and the button row into `#difficulty-dock`; styles/practice/difficulty-dock.css
   dresses it.

   The auto-click went with the hiding — a stand-in that answered a visible
   question would answer it before the learner could, and it would now
   advance the question too. `#feedback-help` is still hidden, by
   difficulty-dock.css rather than here, because its copy described the old
   "About right is the safe default" answer that no longer exists.

   The ⓘ for `feedback-rating` is likewise no longer hidden: its host is on
   screen for everyone, so the dot has something to be about again. */

/* WHICH TEST CASES FAILED, expected vs got — NO LONGER HIDDEN.

   Seth, 2026-08-24, asked for this back alongside the solution: "why it was
   wrong (failed cases)". It was cut here as detail, and that was defensible
   while it rendered in the left rail under the Next problem button, where it
   was detail nobody reached. It now renders inside `#notebook-cells`, directly
   beneath the code that failed those cases (ui.js::renderFailedTests), which
   is the only place the comparison means anything.

   No rule is needed to scope it to a miss: renderFailedTests already returns
   early and re-hides the block on a correct answer, so visibility follows the
   verdict without CSS. */

/* "I missed one specific thing — it wasn't too hard": a second difficulty
   signal, and a second dial next to the rating is the thing basic mode exists
   to remove.

   🔴 #problem-feedback-row LEFT THIS LIST on 2026-08-27, and the row it named
   is gone with it. Hiding it here hid the ONLY way to report a broken problem
   from every learner in the default mode — the flags are not a difficulty dial
   and were never the noise this rule is about. Reporting a problem is now a
   button beside Submit that opens #problem-feedback-panel, which basic mode
   deliberately does not touch. */
html:not(.dd-colab-edition) body.dd-basic-mode #missed-fact-row {
  display: none;
}

/* Concept understanding — the BKT bar with its tier, coverage and
   target-difficulty markers. The same reading the stage ladder gives,
   and the ladder is already Advanced-only. */
html:not(.dd-colab-edition) body.dd-basic-mode #ewma-accuracy {
  display: none;
}

/* The reference solution, the generated explanation, and the tutor
   thread. The heaviest block on the screen by a wide margin. */
html:not(.dd-colab-edition) body.dd-basic-mode .solution-section,
html:not(.dd-colab-edition) body.dd-basic-mode .solution-section-einops,
html:not(.dd-colab-edition) body.dd-basic-mode #ai-explanation-section,
html:not(.dd-colab-edition) body.dd-basic-mode #tutor-section {
  display: none;
}

/* 🔴 EXCEPT THE SOLUTION, ON EITHER VERDICT.

   Seth, 2026-08-24: "after you submit a problem, it essentially does not
   display the actual correct answer ... make it such that it displays the
   correct answer to the problem you got wrong after submitting."

   Basic mode is the default, so the rule above was what every learner got:
   a red Incorrect badge and no way to find out what the answer was. The
   review step is the half of a wrong answer worth having, and it is not the
   "too much information" the mode was cut down to remove — the felt-difficulty
   rating, the BKT bar, the failing-case dump and the tutor still are, and all
   of them stay hidden here.

   This was scoped to the miss until 2026-09-21 ("a correct answer already
   told the learner what the answer was — theirs"). Seth: "it doesn't hide
   the freaking solution when you solve it correctly. it really shouldn't
   have done that in the first place." The reference answer is the review
   step of a CORRECT answer too — yours works, theirs is the idiom — so it
   shows on either verdict. Advanced mode is unchanged and always showed it.

   `.result-correct` / `.result-incorrect` are written on
   #practice-feedback-area by `ui.js::applyResult` and cleared on the next
   render, so they track the VERDICT rather than the phase. The id is what
   lets this out-specify the rule above without !important; keep both in
   this file so the pair is read together. */
html:not(.dd-colab-edition) body.dd-basic-mode #practice-feedback-area:is(.result-correct, .result-incorrect) .solution-section {
  display: block;
}
html:not(.dd-colab-edition) body.dd-basic-mode #practice-feedback-area:is(.result-correct, .result-incorrect) .solution-section-einops {
  display: block;
}

/* 🔴 UNLESS THE NOTEBOOK ALREADY HAS IT. The rule above was the whole fix on
   2026-08-24 and it was not enough: the rail puts the solution below the
   question, the worked example, the failed cases and the Next problem button,
   in a pane that scrolls on its own, so it rendered and nobody ever saw it
   ("the feedback is still not showing"). The answer now goes in as a runnable
   cell under the learner's own code instead — see
   notebook-editor.js::showSolution, which writes this class while that cell is
   on screen and clears it with the cell.

   So the rule above is now the FALLBACK, not the main path, and it still
   matters: a question with no notebook to append to (torch routed to Colab
   hides the right panel entirely) has nowhere else to put the answer. */
html:not(.dd-colab-edition) body.dd-basic-mode.dd-solution-in-notebook
  #practice-feedback-area:is(.result-correct, .result-incorrect) .solution-section,
html:not(.dd-colab-edition) body.dd-basic-mode.dd-solution-in-notebook
  #practice-feedback-area:is(.result-correct, .result-incorrect) .solution-section-einops {
  display: none;
}

.solution-section-einops.hidden {
  display: none;
}
