/* Exam Practice: Dynamic Electrochemistry (CHM2001)
   Layout only - the colours come from the model-shell palette at runtime, through the --exp-* custom properties
   that the script sets on the model container (so dark mode and high contrast work as in the other models).
   Same two-column layout, large type and pill buttons as the CHM2001 models. */

.exp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  font-size: 1.05rem;
  line-height: 1.45;
}

.exp-layout > * { min-width: 0; }
.exp-layout [hidden] { display: none !important; }
.exp-layout sup, .exp-layout sub { line-height: 0; }

/* ---------- headings, rows, buttons ---------- */
.exp-h2 { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.exp-h3 { margin: 0.8rem 0 0.35rem; font-size: 1.12rem; }
.exp-muted { color: var(--exp-muted, #555); font-weight: 700; font-size: 0.95rem; }
.exp-qhead { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.6rem; }
.exp-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0 0; }
.exp-row--end { justify-content: flex-end; margin-top: 0.7rem; }
.exp-lead { margin: 0 0 0.6rem; }
.exp-note { margin: 0.5rem 0 0; font-size: 0.98rem; }

.exp-btn, .exp-pill, .exp-tab, .exp-opt {
  font: inherit;
  font-weight: 700;
  color: var(--exp-fg, #000);
  background: var(--exp-bg, #fff);
  border: 2px solid var(--exp-fg, #000);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}
.exp-btn small { font-weight: 600; }
.exp-btn--main { background: var(--exp-accent, #c00); border-color: var(--exp-accent, #c00); color: var(--exp-bg, #fff); }
.exp-wide { width: 100%; margin: 0.6rem 0 0.2rem; font-size: 1.08rem; padding: 0.5rem 0.9rem; }
.exp-pill--on, .exp-tab--on { background: var(--exp-fg, #000); color: var(--exp-bg, #fff); }
.exp-mode { margin: 0.6rem 0 0; }
.exp-link { font: inherit; font-weight: 700; color: var(--exp-blue, #1565c0); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.exp-btn:focus-visible, .exp-pill:focus-visible, .exp-tab:focus-visible, .exp-opt:focus-visible, .exp-card:focus-visible,
.exp-part-h:focus-visible, .exp-nav-b:focus-visible, .exp-topic:focus-visible, .exp-frow:focus-visible, .exp-in:focus-visible, .exp-ta:focus-visible {
  outline: 3px solid var(--exp-blue, #1565c0);
  outline-offset: 2px;
}

/* ---------- the bank ---------- */
.exp-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.7rem; }
.exp-tab { border-radius: 10px; padding: 0.4rem 0.8rem; }
.exp-bank { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.exp-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  font: inherit;
  color: var(--exp-fg, #000);
  background: var(--exp-bg, #fff);
  border: 3px solid var(--exp-grid, #ccc);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}
.exp-card:hover { border-color: var(--exp-fg, #000); }
.exp-card--done { border-color: var(--exp-green, #388e3c); }
.exp-card--part { border-color: var(--exp-orange, #e65100); }
.exp-card--dim { opacity: 0.4; }
.exp-card--wide { width: 100%; border-color: var(--exp-purple, #6a1b9a); }
.exp-card-h { display: flex; justify-content: space-between; gap: 0.4rem; font-weight: 800; font-size: 1.1rem; }
.exp-card-s { font-weight: 700; font-size: 0.92rem; white-space: nowrap; color: var(--exp-muted, #555); }
.exp-card-p { line-height: 1.35; }
.exp-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.exp-chip { display: inline-block; border: 2px solid var(--exp-fg, #000); border-radius: 999px; padding: 0 0.5rem; font-weight: 800; font-size: 0.88rem; background: var(--exp-bg, #fff); }
.exp-chip--faraday { border-color: var(--exp-fg, #000); }
.exp-chip--ecell { border-color: var(--exp-purple, #6a1b9a); color: var(--exp-purple, #6a1b9a); }
.exp-chip--nernst { border-color: var(--exp-blue, #1565c0); color: var(--exp-blue, #1565c0); }
.exp-chip--bv { border-color: var(--exp-red, #c00); color: var(--exp-red, #c00); }
.exp-chip--tafel { border-color: var(--exp-green, #388e3c); color: var(--exp-green, #388e3c); }
.exp-chip--i0 { border-color: var(--exp-orange, #e65100); color: var(--exp-orange, #e65100); }
.exp-chip--concepts { border-color: var(--exp-fg, #000); border-style: dashed; }
.exp-topics { display: grid; gap: 0.45rem; }
.exp-topic, .exp-frow {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  font: inherit; color: var(--exp-fg, #000); background: var(--exp-bg, #fff);
  border: 2px solid var(--exp-grid, #ccc); border-radius: 10px; padding: 0.45rem 0.6rem; cursor: pointer; text-align: left;
}
.exp-topic .exp-chip { font-size: 1rem; padding: 0.1rem 0.65rem; }
.exp-topic-s { font-weight: 700; }
.exp-filter { display: grid; gap: 0.3rem; }
.exp-frow { padding: 0.25rem 0.45rem; }
.exp-frow--on { border-color: var(--exp-fg, #000); border-width: 3px; }
.exp-n { font-weight: 800; }

/* ---------- a question, set out as on the paper ---------- */
.exp-paper { border: 3px solid var(--exp-fg, #000); border-radius: 12px; background: var(--exp-bg, #fff); padding: 0.6rem 0.8rem; }
.exp-stem p { margin: 0 0 0.35rem; }
.exp-eq { text-align: center; }
.exp-from { margin: 0 0 0.3rem; font-weight: 700; color: var(--exp-muted, #555); }
.exp-lead-row { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.4rem; padding: 0.45rem 0.2rem 0.1rem; border-top: 1px solid var(--exp-grid, #ccc); }
.exp-lab { font-weight: 800; white-space: nowrap; }
.exp-part { border-top: 1px solid var(--exp-grid, #ccc); }
.exp-lead-row + .exp-part { border-top: 0; }
.exp-part--open { outline: 3px solid var(--exp-accent, #c00); border-radius: 8px; border-top-color: transparent; margin: 0.3rem 0; }
.exp-part-h {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 6.4rem; gap: 0.4rem; align-items: start;
  width: 100%; box-sizing: border-box; font: inherit; color: var(--exp-fg, #000); background: none; border: 0; text-align: left; padding: 0.45rem 0.4rem; cursor: pointer; line-height: 1.45;
}
.exp-part-h--static { cursor: default; }
.exp-q { font-weight: 600; }
.exp-mk { text-align: right; font-weight: 800; }
.exp-part-b { padding: 0 0.6rem 0.6rem 4.6rem; }
.exp-sketch { display: block; margin-top: 0.2rem; font-weight: 600; font-style: italic; color: var(--exp-muted, #555); }
.exp-st { font-weight: 800; font-size: 0.95rem; }
.exp-st--muted { color: var(--exp-muted, #555); }
.exp-st--ok { color: var(--exp-green, #388e3c); }
.exp-st--part { color: var(--exp-orange, #e65100); }
table.exp-data { border-collapse: collapse; margin: 0.4rem 0 0.2rem; }
table.exp-data th, table.exp-data td { border: 1.5px solid var(--exp-fg, #000); padding: 0.2rem 0.7rem; text-align: center; }
table.exp-data th { font-weight: 700; }

/* ---------- answering ---------- */
.exp-ans { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.45rem 0 0; font-size: 1.12rem; }
.exp-ans-lab { min-width: 3rem; }
.exp-in { font: inherit; width: 11rem; padding: 0.25rem 0.5rem; border: 2px solid var(--exp-fg, #000); border-radius: 8px; color: var(--exp-fg, #000); background: var(--exp-bg, #fff); }
.exp-in--ok { border-color: var(--exp-green, #388e3c); border-width: 3px; }
.exp-in--no { border-color: var(--exp-orange, #e65100); border-width: 3px; }
.exp-unit { font-weight: 600; }
.exp-tick { color: var(--exp-green, #388e3c); font-weight: 900; font-size: 1.3rem; }
.exp-ans-marks { margin-left: auto; font-size: 0.9rem; font-weight: 700; color: var(--exp-muted, #555); }
.exp-opt { border-radius: 10px; padding: 0.25rem 0.7rem; }
.exp-opt--on { background: var(--exp-fg, #000); color: var(--exp-bg, #fff); }
.exp-opt--ok { border-color: var(--exp-green, #388e3c); border-width: 3px; }
.exp-label { display: block; margin: 0.3rem 0 0.2rem; font-weight: 700; }
.exp-ta { width: 100%; box-sizing: border-box; font: inherit; padding: 0.45rem; border: 2px solid var(--exp-fg, #000); border-radius: 8px; color: var(--exp-fg, #000); background: var(--exp-bg, #fff); }
.exp-fb { border: 3px solid; border-radius: 10px; padding: 0.45rem 0.7rem; margin: 0.45rem 0 0; line-height: 1.45; }
.exp-fb--no { border-color: var(--exp-orange, #e65100); }
.exp-fb--ok { border-color: var(--exp-green, #388e3c); }
.exp-fb--show { border-color: var(--exp-grid, #ccc); }
.exp-hints { margin-top: 0.4rem; }
.exp-hint { border: 2px dashed var(--exp-blue, #1565c0); border-radius: 10px; padding: 0.4rem 0.65rem; margin: 0.35rem 0 0; }
.exp-plot { display: block; width: 100%; max-width: 440px; height: auto; margin: 0.35rem 0 0; color: var(--exp-fg, #000); }
.exp-given { border-left: 5px solid var(--exp-grid, #ccc); padding: 0.3rem 0.6rem; margin: 0 0 0.4rem; }
.exp-scheme { border: 2px solid var(--exp-grid, #ccc); border-radius: 10px; padding: 0.4rem 0.65rem; margin-top: 0.5rem; }
.exp-scheme-head { margin: 0 0 0.2rem; }
.exp-chk { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) 1.6rem; gap: 0.35rem; align-items: start; padding: 0.3rem 0; border-top: 1px dashed var(--exp-grid, #ccc); cursor: pointer; }
.exp-chk input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--exp-green, #388e3c); }
.exp-chk-m { font-weight: 800; color: var(--exp-green, #388e3c); text-align: right; }
.exp-tip { border-left: 5px solid var(--exp-purple, #6a1b9a); padding: 0.4rem 0.65rem; margin-top: 0.5rem; }
.exp-worked { margin-top: 0.5rem; border: 2px solid var(--exp-green, #388e3c); border-radius: 10px; padding: 0.35rem 0.65rem; }
.exp-worked summary { font-weight: 800; cursor: pointer; }
.exp-worked p { margin: 0.3rem 0 0; }
.exp-model { display: block; margin-top: 0.5rem; border: 2px solid var(--exp-blue, #1565c0); border-radius: 10px; padding: 0.4rem 0.65rem; color: var(--exp-fg, #000); text-decoration: none; }
.exp-model:hover { text-decoration: underline; }
.exp-model-k { font-weight: 800; color: var(--exp-blue, #1565c0); }
.exp-clock { font-weight: 800; border: 2px solid var(--exp-fg, #000); border-radius: 8px; padding: 0.15rem 0.5rem; }
.exp-clock--over { border-color: var(--exp-red, #c00); color: var(--exp-red, #c00); }

/* ---------- the side panel ---------- */
.exp-score { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 1.15rem; }
.exp-score-n { font-size: 1.45rem; }
.exp-nav { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.exp-nav-b {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 3.4rem; gap: 0.35rem; align-items: center; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 0.98rem; color: var(--exp-fg, #000); background: none; border: 0; border-radius: 8px; padding: 0.22rem 0.35rem; text-align: left; cursor: pointer;
}
.exp-nav-b .exp-st { text-align: right; }
.exp-nav-b--on { outline: 3px solid var(--exp-accent, #c00); }
.exp-more { border: 2px solid var(--exp-grid, #ccc); border-radius: 10px; padding: 0.35rem 0.65rem; margin: 0.6rem 0 0; }
.exp-more summary { font-weight: 800; cursor: pointer; }
.exp-more ul { margin: 0.35rem 0 0.2rem; padding-left: 1.15rem; }
.exp-more li { margin: 0.2rem 0; }

/* ---------- narrow screens: one column ---------- */
@media (max-width: 820px) {
  .exp-layout { grid-template-columns: minmax(0, 1fr); }
  .exp-bank { grid-template-columns: minmax(0, 1fr); }
  .exp-part-h { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .exp-part-h .exp-mk { grid-column: 2; text-align: left; }
  .exp-part-b { padding: 0 0.45rem 0.6rem 0.45rem; }
  .exp-in { width: 9rem; }
}
