/* Clove Circle — step-by-step LCA/TEA teaching layer.
   Light surface deliberately: this is a worksheet you read and edit, not a
   dashboard you watch. */

.cc-sbs {
  --sbs-ink: #1a3d2e;
  --sbs-text: #344a3c;
  --sbs-muted: #5e7a6a;
  --sbs-line: #d3ddd6;
  --sbs-paper: #ffffff;
  --sbs-wash: #f4f8f5;
  --sbs-green: #3d8b68;
  --sbs-green-pale: #d4eddf;
  --sbs-amber: #b57a17;
  --sbs-amber-pale: #fbeed3;
  --sbs-red: #a32d2d;
  --sbs-blue: #185fa5;

  color: var(--sbs-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.cc-sbs *, .cc-sbs *::before, .cc-sbs *::after { box-sizing: border-box; }

/* ── page header ─────────────────────────────────────────────────────── */
.cc-sbs-header {
  border-bottom: 1px solid var(--sbs-line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.cc-sbs-eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; color: var(--sbs-green);
}
.cc-sbs-header h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 26px; line-height: 1.2; margin: 4px 0 5px; color: var(--sbs-ink);
}
.cc-sbs-header p { margin: 0; color: var(--sbs-muted); max-width: 78ch; font-size: 13.5px; }
.cc-sbs-headrow {
  display: flex; gap: 20px; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
}
.cc-sbs-chrome { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.cc-sbs-chrome button, .cc-sbs-chrome a {
  font: 600 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  padding: 10px 15px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--sbs-line); background: var(--sbs-paper);
  color: var(--sbs-text); transition: all .15s;
}
.cc-sbs-chrome button:hover, .cc-sbs-chrome a:hover {
  border-color: var(--sbs-green); color: var(--sbs-green);
}

/* ── layout ──────────────────────────────────────────────────────────── */
.cc-sbs-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
}
@media (max-width: 1100px) { .cc-sbs-grid { grid-template-columns: minmax(0, 1fr); } }

.cc-sbs-panel {
  background: var(--sbs-paper); border: 1px solid var(--sbs-line);
  border-radius: 12px; padding: 16px;
}

/* The flowsheet sits beside the teaching card rather than above it, so the
   opening step fits on one screen. */
.cc-main-split {
  display: grid; gap: 18px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 1250px) { .cc-main-split { grid-template-columns: minmax(0, 1fr); } }
.cc-diagram-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
/* The inspector lives under the flowsheet it describes, which also uses the
   space the diagram alone would leave empty. */
.cc-inspector-panel { flex: 1 1 auto; }

/* Embedded in resources.html the surrounding shell already prints the title and
   strapline, so the page drops its own and keeps just the action buttons. */
body.is-embedded .cc-sbs-header {
  border-bottom: 0; padding-bottom: 0; margin-bottom: 10px;
}
body.is-embedded .cc-sbs-header h2,
body.is-embedded .cc-sbs-header p,
body.is-embedded .cc-sbs-eyebrow { display: none; }
body.is-embedded .cc-sbs-headrow { justify-content: flex-end; }

/* ── step rail: horizontal breadcrumbs ──────────────────────────────── */
.cc-rail {
  display: flex; align-items: stretch; gap: 0;
  background: var(--sbs-paper); border: 1px solid var(--sbs-line);
  border-radius: 11px; padding: 4px; margin-bottom: 12px;
  overflow-x: auto; scrollbar-width: thin;
}
.cc-step {
  display: flex; gap: 8px; align-items: center;
  flex: 1 1 0; min-width: 128px;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  font: inherit; color: var(--sbs-text); text-align: left;
  transition: background .15s, border-color .15s;
}
.cc-step:hover { background: var(--sbs-wash); }
.cc-step.is-active { background: var(--sbs-green-pale); border-color: var(--sbs-green); }
.cc-step.is-locked { opacity: .45; }

/* the chevron between steps */
.cc-step + .cc-step { position: relative; }
.cc-step + .cc-step::before {
  content: ''; position: absolute; left: -1px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid var(--sbs-line); border-top: 1.5px solid var(--sbs-line);
  transform: rotate(45deg); pointer-events: none;
}

.cc-step-n {
  flex-shrink: 0; width: 23px; height: 23px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
  background: var(--sbs-wash); border: 1px solid var(--sbs-line);
}
.cc-step.is-solved .cc-step-n {
  background: var(--sbs-green); border-color: var(--sbs-green); color: #fff;
}
.cc-step.is-stale .cc-step-n {
  background: var(--sbs-amber-pale); border-color: var(--sbs-amber); color: var(--sbs-amber);
}
.cc-step-body { display: flex; flex-direction: column; min-width: 0; }
.cc-step-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-step-state {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sbs-muted); font-weight: 700;
}
.cc-step.is-stale .cc-step-state { color: var(--sbs-amber); }
.cc-step.is-solved .cc-step-state { color: var(--sbs-green); }

@media (max-width: 900px) {
  .cc-rail { padding: 4px; }
  .cc-step { min-width: 112px; }
  .cc-step-title { font-size: 11.5px; }
}

/* ── teaching card ───────────────────────────────────────────────────── */
.cc-card-phase {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--sbs-green);
}
.cc-card-head h2, .cc-card-head h3 {
  font-family: Fraunces, Georgia, serif; color: var(--sbs-ink);
  font-size: 23px; margin: 4px 0 12px;
}
.cc-card-question {
  font-size: 17px; font-weight: 600; color: var(--sbs-ink);
  margin: 0 0 10px; line-height: 1.45;
}
.cc-card-concept { margin: 0 0 14px; max-width: 68ch; }
.cc-card-why { margin: 8px 0 0; font-size: 13px; color: var(--sbs-muted); }

.cc-slot-label {
  display: block; font-size: 10.5px; letter-spacing: .13em;
  text-transform: uppercase; font-weight: 700;
  color: var(--sbs-muted); margin-bottom: 7px;
}
.cc-card-formula {
  background: var(--sbs-wash); border: 1px solid var(--sbs-line);
  border-left: 3px solid var(--sbs-green);
  border-radius: 8px; padding: 13px 15px; margin-bottom: 16px;
}
.cc-card-formula code {
  display: block; font-size: 14px; color: var(--sbs-ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap; word-break: break-word;
}

.cc-card-scope { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .cc-card-scope { grid-template-columns: 1fr 1fr; } }
.cc-scope-item {
  background: var(--sbs-green-pale); border-radius: 8px; padding: 13px 15px;
}
.cc-scope-item p { margin: 0; font-weight: 500; color: var(--sbs-ink); }

/* ── worked numbers ──────────────────────────────────────────────────── */
.cc-card-thiscase { margin-bottom: 16px; }
.cc-thiscase-empty { margin: 0; color: var(--sbs-muted); font-style: italic; }
.cc-thiscase-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cc-thiscase-table td {
  padding: 7px 9px; border-bottom: 1px solid var(--sbs-line); vertical-align: top;
}
.cc-tc-label { font-weight: 600; color: var(--sbs-ink); width: 26%; }
.cc-thiscase-table tr.is-linked { cursor: pointer; }
.cc-thiscase-table tr.is-linked:hover td { background: var(--sbs-wash); }
.cc-thiscase-table tr.is-linked .cc-tc-label::after {
  content: ' ◈'; color: var(--sbs-green); font-size: 10px;
}
.cc-thiscase-table tr.is-picked td {
  background: var(--sbs-green-pale);
  border-bottom-color: var(--sbs-green);
}
.cc-thiscase-table tr.is-linked:focus-visible td {
  outline: 2px solid var(--sbs-green); outline-offset: -2px;
}
.cc-tc-expr code {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px;
  color: var(--sbs-muted); word-break: break-word;
}
.cc-tc-val {
  text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 700; color: var(--sbs-ink); white-space: nowrap;
}
.cc-tc-delta {
  text-align: right; font-size: 11.5px; font-weight: 700;
  white-space: nowrap; width: 62px;
}
.cc-tc-delta.is-up { color: var(--sbs-green); }
.cc-tc-delta.is-down { color: var(--sbs-red); }

/* ── closure check ───────────────────────────────────────────────────── */
.cc-closure {
  border-radius: 8px; padding: 12px 15px; margin-bottom: 16px;
  border: 1px solid var(--sbs-line);
}
.cc-closure.is-ok { background: var(--sbs-green-pale); border-color: var(--sbs-green); }
.cc-closure.is-bad { background: #fbe9e9; border-color: var(--sbs-red); }
.cc-closure-row {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.cc-closure-err { font-weight: 700; }
.cc-closure-verdict { font-weight: 700; }
.cc-closure.is-ok .cc-closure-verdict { color: #1d6b4c; }
.cc-closure.is-bad .cc-closure-verdict { color: var(--sbs-red); }

/* ── solve button ────────────────────────────────────────────────────── */
.cc-card-actions {
  display: flex; align-items: center; gap: 13px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.cc-solve-btn {
  background: var(--sbs-green); color: #fff; border: none;
  border-radius: 8px; padding: 12px 22px; cursor: pointer;
  font: 700 13px/1 Inter, system-ui, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; transition: all .15s;
}
.cc-solve-btn:hover:not(:disabled) { background: #2f6f52; }
.cc-solve-btn:disabled { opacity: .4; cursor: not-allowed; }
.cc-solve-btn.is-done { background: var(--sbs-paper); color: var(--sbs-green); border: 1px solid var(--sbs-green); }
.cc-card-lock { font-size: 12.5px; color: var(--sbs-amber); font-weight: 600; }

.cc-card-try {
  background: var(--sbs-amber-pale); border-left: 3px solid var(--sbs-amber);
  border-radius: 8px; padding: 13px 15px;
}
.cc-card-try p { font-size: 13.5px; }
.cc-card-try p { margin: 0; }

.cc-card-summary { margin-top: 18px; }
.cc-summary-list { list-style: none; margin: 0; padding: 0; }
.cc-summary-list li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--sbs-line); font-size: 14px;
}
.cc-sum-label { color: var(--sbs-muted); }
.cc-sum-val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sbs-ink); }

/* ── flowsheet ───────────────────────────────────────────────────────── */
.cc-diagram-wrap {
  background: var(--sbs-wash); border: 1px solid var(--sbs-line);
  border-radius: 12px; padding: 10px; margin-bottom: 0; overflow-x: auto;
}
.cc-diagram-wrap svg { display: block; width: 100%; min-width: 0; height: auto; }
.cc-diagram-hint {
  font-size: 12px; color: var(--sbs-muted);
  margin: 0 0 7px; display: flex; gap: 12px; flex-wrap: wrap;
}
.cc-diagram-hint b { font-weight: 700; }
.cc-legend-swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 5px; vertical-align: baseline;
}

.cc-blk { fill: #fff; stroke: var(--sbs-green); stroke-width: 1.5; }
/* Sized in viewBox units. The sheet renders at about half scale, so these are
   roughly 1.8x what they would be at 1:1 to keep the text legible. */
.cc-blk-label { font: 600 23px Inter, system-ui, sans-serif; fill: var(--sbs-ink); }
.cc-blk-sub { font: 400 19px Inter, system-ui, sans-serif; fill: var(--sbs-muted); }
.cc-flow { fill: none; stroke: #8aa398; stroke-width: 2; stroke-linejoin: round; }
.cc-flow.is-stale { stroke-dasharray: 5 4; opacity: .45; }
/* Flow arrows are drawn thick in proportion to their mass flow, so labels get a
   halo in the sheet's own background colour to stay readable over them. */
.cc-stream-label, .cc-stream-name {
  paint-order: stroke fill;
  stroke: var(--sbs-wash); stroke-width: 5px; stroke-linejoin: round;
}
.cc-stream-label {
  font: 600 20px Inter, system-ui, sans-serif; fill: var(--sbs-ink);
}
.cc-stream-name { font: 400 18px Inter, system-ui, sans-serif; fill: var(--sbs-muted); }
.cc-stream-label.is-stale { fill: #9aa8a0; }
.cc-stream-label.is-changed { fill: var(--sbs-amber); }

.cc-hit { cursor: pointer; outline: none; }
.cc-hit .cc-hit-pad { fill: transparent; }
.cc-hit-input .cc-blk { stroke: var(--sbs-amber); stroke-width: 2; }
.cc-hit-input .cc-stream-label { fill: var(--sbs-amber); }
.cc-hit:hover .cc-hit-pad { fill: rgba(61, 139, 104, .1); }
.cc-hit:focus-visible .cc-hit-pad { fill: rgba(61, 139, 104, .16); stroke: var(--sbs-green); stroke-width: 1.5; }
.cc-hit.is-selected .cc-hit-pad { fill: rgba(61, 139, 104, .18); stroke: var(--sbs-green); stroke-width: 1.5; }
.cc-hit.is-stale .cc-blk { stroke-dasharray: 5 4; opacity: .55; }

/* Highlight driven from the tables: dim everything else so the path stands out. */
.cc-diagram-wrap.is-focusing .cc-hit:not(.is-highlit) { opacity: .28; }
.cc-diagram-wrap.is-focusing .cc-flow:not([data-highlit]) { opacity: .28; }
.cc-hit.is-highlit .cc-blk { stroke: var(--sbs-green); stroke-width: 3; }
.cc-hit.is-highlit .cc-hit-pad { fill: rgba(61, 139, 104, .16); }
.cc-hit.is-highlit .cc-stream-label,
.cc-hit.is-highlit .cc-stream-name { fill: var(--sbs-green); font-weight: 700; }
.cc-flow[data-highlit] { stroke: var(--sbs-green); }
@media (prefers-reduced-motion: no-preference) {
  .cc-hit.is-highlit .cc-hit-pad { animation: cc-pulse 1.1s ease-out 2; }
  @keyframes cc-pulse {
    0%   { fill: rgba(61, 139, 104, .34); }
    100% { fill: rgba(61, 139, 104, .16); }
  }
}
.cc-hit-nodiagram { font-size: 11px; color: var(--sbs-muted); font-style: italic; }

/* ── inspector ───────────────────────────────────────────────────────── */
.cc-insp-empty { text-align: center; color: var(--sbs-muted); padding: 18px 6px; }
.cc-insp-empty-icon { font-size: 26px; color: var(--sbs-line); margin-bottom: 8px; }
.cc-insp-empty p { font-size: 13px; margin: 0 0 8px; }
.cc-insp-empty-hint { font-size: 12px; opacity: .85; }
.cc-insp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; border-bottom: 1px solid var(--sbs-line);
  padding-bottom: 9px; margin-bottom: 13px;
}
.cc-insp-head h4 {
  margin: 0; font-size: 15px; font-weight: 700; color: var(--sbs-ink);
}
.cc-insp-tag {
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; padding: 3px 7px; border-radius: 4px;
  background: var(--sbs-wash); color: var(--sbs-muted); white-space: nowrap;
}

.cc-field { margin-bottom: 15px; }
.cc-field-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--sbs-ink); margin-bottom: 5px;
}
.cc-field-row { display: flex; gap: 6px; }
.cc-field-value {
  flex: 1; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--sbs-amber); border-radius: 6px;
  background: var(--sbs-amber-pale); color: var(--sbs-ink);
  font: 700 14px/1.2 ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; text-align: right;
}
.cc-field-value:focus { outline: 2px solid var(--sbs-amber); outline-offset: 1px; }
.cc-field-unit {
  padding: 8px 6px; border: 1px solid var(--sbs-line); border-radius: 6px;
  background: #fff; font-size: 12px; color: var(--sbs-text); max-width: 108px;
}
.cc-field.has-error .cc-field-value { border-color: var(--sbs-red); background: #fbe9e9; }
.cc-field-note { font-size: 11.5px; margin: 5px 0 0; color: var(--sbs-amber); }
.cc-field.has-error .cc-field-note { color: var(--sbs-red); }
.cc-field-source { font-size: 11.5px; color: var(--sbs-muted); margin: 6px 0 0; }
.cc-field-range { font-size: 11px; color: var(--sbs-muted); margin: 3px 0 0; font-style: italic; }

.cc-field-readout {
  padding: 8px 10px; border: 1px solid var(--sbs-line); border-radius: 6px;
  background: var(--sbs-wash); font: 700 15px ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; text-align: right; color: var(--sbs-ink);
}
.cc-field-readout.is-stale { color: #9aa8a0; font-style: italic; }
.cc-field-formula { margin-top: 10px; }
.cc-field-formula code {
  display: block; font-size: 11.5px; padding: 8px 10px;
  background: var(--sbs-wash); border-radius: 6px;
  border-left: 3px solid var(--sbs-blue); color: var(--sbs-ink);
  font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}
.cc-formula-label {
  display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--sbs-muted); margin-bottom: 5px;
}
.cc-field-deps { margin-top: 11px; }
.cc-field-deps ul { list-style: none; margin: 0; padding: 0; }
.cc-field-deps li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11.5px; padding: 4px 0; border-bottom: 1px dotted var(--sbs-line);
}
.cc-dep-name { color: var(--sbs-muted); }
.cc-dep-val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cc-field-deps li.is-input .cc-dep-name { color: var(--sbs-amber); font-weight: 600; }

/* ── field list ──────────────────────────────────────────────────────── */
.cc-fields-empty { font-size: 12.5px; color: var(--sbs-muted); font-style: italic; margin: 0; }
.cc-mini-field {
  display: grid; grid-template-columns: 1fr 92px 56px;
  gap: 7px; align-items: center; margin-bottom: 7px;
}
.cc-mini-label {
  font-size: 12.5px; color: var(--sbs-text);
  background: none; border: 0; padding: 0; text-align: left; font-family: inherit;
}
.cc-mini-field.is-on-diagram .cc-mini-label {
  font-weight: 600; cursor: pointer; border-radius: 4px;
}
.cc-mini-field.is-on-diagram .cc-mini-label:hover { color: var(--sbs-amber); }
.cc-mini-field.is-on-diagram .cc-mini-label:focus-visible {
  outline: 2px solid var(--sbs-amber); outline-offset: 2px;
}
.cc-mini-field.is-on-diagram .cc-mini-label::after {
  content: ' ◈'; color: var(--sbs-amber); font-size: 10px;
}
.cc-mini-field.is-picked .cc-mini-label { color: var(--sbs-amber); }
.cc-mini-value {
  padding: 6px 8px; border: 1px solid var(--sbs-amber); border-radius: 5px;
  background: var(--sbs-amber-pale);
  font: 700 12.5px ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; text-align: right; min-width: 0;
}
.cc-mini-value.has-error { border-color: var(--sbs-red); background: #fbe9e9; }
.cc-mini-unit { font-size: 11px; color: var(--sbs-muted); }

/* ── KPI strip ───────────────────────────────────────────────────────── */
.cc-kpis {
  display: grid; gap: 8px; margin-bottom: 12px;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
}
.cc-kpi {
  background: var(--sbs-paper); border: 1px solid var(--sbs-line);
  border-radius: 9px; padding: 8px 11px;
  display: flex; flex-direction: column; gap: 1px;
}
.cc-kpi.is-stale { background: repeating-linear-gradient(45deg, #fafcfb, #fafcfb 6px, #f2f5f3 6px, #f2f5f3 12px); }
.cc-kpi-label {
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 700; color: var(--sbs-muted);
}
.cc-kpi-val {
  font: 700 16px/1.15 ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; color: var(--sbs-ink);
}
.cc-kpi.is-stale .cc-kpi-val { color: #9aa8a0; }
.cc-kpi-note { font-size: 10px; font-style: italic; color: var(--sbs-muted); }

@media (prefers-reduced-motion: no-preference) {
  .cc-stream-label.is-changed { animation: cc-flash 1.6s ease-out; }
  @keyframes cc-flash { 0%, 30% { fill: var(--sbs-amber); } 100% { fill: var(--sbs-ink); } }
}

/* ── Guided / Expert mode ─────────────────────────────────────────────────
   Guided mode removes choices rather than adding explanation: the sandbox
   affordances are hidden, the flowsheet dims everything the current task is
   not about, and the rail becomes progress rather than free navigation. */
.cc-mode {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 0 0 14px;
}
.cc-mode-toggle {
  display: inline-flex; background: var(--sbs-wash);
  border: 1px solid var(--sbs-line); border-radius: 999px; padding: 3px;
}
.cc-mode-btn {
  border: none; background: none; cursor: pointer;
  padding: 8px 18px; border-radius: 999px; color: var(--sbs-muted);
  font: 700 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; transition: all .15s;
}
.cc-mode-btn:hover { color: var(--sbs-ink); }
.cc-mode-btn.is-on {
  background: var(--sbs-green); color: #fff;
  box-shadow: 0 1px 3px rgba(26, 61, 46, .25);
}
.cc-mode-hint { margin: 0; font-size: 12.5px; color: var(--sbs-muted); }

/* What guided mode takes away. */
.cc-sbs[data-mode="guided"] [data-cc-solve-all],
.cc-sbs[data-mode="guided"] .cc-diagram-hint,
.cc-sbs[data-mode="guided"] .cc-tc-delta { display: none; }

/* Out-of-scope flowsheet parts: visible for context, not clickable. */
.cc-sbs[data-mode="guided"] .cc-hit.is-out-of-scope {
  opacity: .28;
  pointer-events: none;
}

.cc-sbs[data-mode="guided"] .cc-step.is-locked { opacity: .35; cursor: default; }
.cc-sbs[data-mode="guided"] .cc-step.is-locked:hover { background: none; }

/* ── the one task ───────────────────────────────────────────────────────── */
.cc-task {
  background: var(--sbs-wash); border: 1px solid var(--sbs-line);
  border-left: 3px solid var(--sbs-green);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
}
.cc-task.is-done { border-left-color: var(--sbs-green); background: var(--sbs-green-pale); }
.cc-task-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.cc-task-tick {
  font: 700 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: var(--sbs-amber);
}
.cc-task.is-done .cc-task-tick { color: var(--sbs-green); }
.cc-task-text {
  margin: 6px 0 0; font-size: 15px; font-weight: 500; color: var(--sbs-ink);
  max-width: 68ch;
}
.cc-task-expect {
  margin: 10px 0 0; font-size: 13.5px; color: var(--sbs-muted); max-width: 68ch;
}
.cc-task-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cc-task-back, .cc-task-ack, .cc-task-next {
  border-radius: 8px; padding: 10px 18px; cursor: pointer;
  font: 700 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; transition: all .15s;
}
.cc-task-back {
  background: none; border: 1px solid var(--sbs-line); color: var(--sbs-muted);
}
.cc-task-back:hover { border-color: var(--sbs-green); color: var(--sbs-green); }
.cc-task-ack, .cc-task-next {
  background: var(--sbs-green); color: #fff; border: 1px solid var(--sbs-green);
}
.cc-task-ack:hover, .cc-task-next:hover:not(:disabled) { background: #2f6f52; }
.cc-task-next:disabled {
  background: var(--sbs-paper); color: var(--sbs-muted);
  border-color: var(--sbs-line); cursor: not-allowed;
}
.cc-task-fin { font-size: 13px; font-weight: 600; color: var(--sbs-green); }

/* ── practice questions (expert mode, under Goal & scope) ───────────────── */
.cc-questions {
  background: var(--sbs-wash); border: 1px solid var(--sbs-line);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
}
.cc-questions-lead { margin: 4px 0 10px; font-size: 13px; color: var(--sbs-muted); }
.cc-question-list { margin: 0; padding-left: 20px; }
.cc-question-list li { margin-bottom: 8px; }
.cc-question summary {
  cursor: pointer; font-weight: 600; color: var(--sbs-ink);
  font-size: 14px; list-style: revert;
}
.cc-question summary:hover { color: var(--sbs-green); }
.cc-question[open] summary { color: var(--sbs-green); }
.cc-question-how {
  margin: 8px 0 4px; padding-left: 2px;
  font-size: 13.5px; color: var(--sbs-text); max-width: 68ch;
}
.cc-question-how p { margin: 0 0 6px; }
.cc-question-watch { color: var(--sbs-muted); }

/* Guided mode: two panels that are pure noise when there is one prescribed
   task. The inspector reappears the moment the learner clicks the flowsheet. */
.cc-sbs[data-mode="guided"] .cc-sbs-header p,
.cc-sbs[data-mode="guided"] .cc-inspector-panel:has(.cc-insp-empty) { display: none; }

/* The solve button lives inside the task block, so it needs no margin of its own. */
.cc-task .cc-card-actions { margin: 12px 0 0; }

/* The task text already says what to do; the stale/locked note beside the
   button just contradicts it on a step that has simply never been run. */
.cc-sbs[data-mode="guided"] .cc-card-lock { display: none; }

/* The questions block is collapsed as a whole: the opening step has to fit one
   screen, and its job is the scope, not the exercise list. */
.cc-questions-summary {
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  list-style: revert;
}
.cc-questions-summary .cc-slot-label { margin: 0; }
.cc-questions-count {
  background: var(--sbs-green-pale); color: var(--sbs-green);
  border-radius: 999px; padding: 1px 8px;
  font: 700 11px/1.6 Inter, system-ui, sans-serif;
}
.cc-questions:not([open]) .cc-questions-lead { display: none; }
