/* ============================================================
   Tutorial — My computer is overheating (local styles)
   All classes are prefixed thm-. Shared design tokens, the
   header/nav, buttons, breadcrumbs, callouts, tables, toast,
   back-to-top and the cookie consent come from the site-wide
   stylesheets — only this page's layout and components live
   here, in the same visual language.
   ============================================================ */

/* ---------- Reading progress ---------- */
.thm-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.thm-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* ---------- Breadcrumb (tutorials) ---------- */
.breadcrumbs {
  font: 500 0.72rem/1.6 var(--font-mono);
  color: var(--ink-3);
  margin: 22px 0 6px;
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current="page"] { color: var(--blue); }

/* ---------- Layout: TOC + article ---------- */
.thm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.thm-toc { display: none; }
.thm-article { min-width: 0; }

/* ---------- TOC (desktop) ---------- */
@media (min-width: 1000px) {
  .thm-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
  .thm-toc {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
    border-right: 1px solid var(--line);
    padding-right: 24px;
  }
  .thm-toc-title {
    font: 500 0.7rem var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-3);
    margin: 0 0 12px;
  }
  .thm-toc li { margin: 0; }
  .thm-toc a {
    display: block;
    padding: 6px 0 6px 12px;
    border-left: 2px solid var(--line);
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.4;
    transition: color 0.2s, border-color 0.2s;
  }
  .thm-toc a:hover { color: var(--ink); }
  .thm-toc a.is-active {
    color: var(--blue);
    border-left-color: var(--blue);
    font-weight: 600;
  }
}

/* ---------- Article header ---------- */
.thm-head { margin-bottom: 10px; }
.thm-head h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.thm-intro {
  font-size: 1.02rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 70ch;
  margin: 0 0 16px;
}

/* ---------- Image placeholder (auto-hides when empty) ---------- */
.thm-figure { margin: 22px 0 8px; }
.thm-figure[hidden] { display: none; }
.thm-figure img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tint);
}
.thm-figure figcaption {
  font: 400 0.74rem/1.6 var(--font-mono);
  color: var(--ink-3);
  margin-top: 8px;
}

/* ---------- Symptom selector ---------- */
.thm-diag {
  margin: 26px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.thm-diag-label {
  font: 600 1.05rem var(--font-display);
  margin: 0 0 14px;
}
.thm-diag-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.thm-diag-opt {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 0.85rem var(--font-body);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}
.thm-diag-opt:hover,
.thm-diag-opt:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--tint);
  transform: translateY(-1px);
}
.thm-diag-msg {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  border-left: 3px solid var(--cyan);
  padding-left: 10px;
}
.thm-diag-msg:empty { border-left-color: transparent; }

/* ---------- Most common causes ---------- */
.thm-most { margin: 0 0 8px; }
.thm-most-label {
  font: 500 0.7rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.thm-most-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.thm-most-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.thm-most-card:hover,
.thm-most-card:focus-visible {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.thm-most-rank {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tint);
  color: var(--blue-deep);
  font: 600 0.8rem var(--font-mono);
}
.thm-most-card:hover .thm-most-rank,
.thm-most-card:focus-visible .thm-most-rank {
  background: var(--blue);
  color: #fff;
}
.thm-most-body { display: grid; gap: 3px; }
.thm-most-body strong { font-size: 0.95rem; font-weight: 600; }
.thm-most-body span { font-size: 0.82rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- Sections ---------- */
.thm-sec { margin-top: 44px; }
.thm-sec-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 10px;
}
.thm-sec-index {
  font: 600 1rem var(--font-mono);
  color: var(--line-2);
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  flex: none;
}
.thm-sec-kicker {
  font: 500 0.72rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--blue);
  margin: 0 0 4px;
}
.thm-sec-head h2 {
  font-size: clamp(1.4rem, 1rem + 1.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.thm-sec-lede {
  color: var(--ink-2);
  font-size: 0.98rem;
  max-width: 70ch;
  margin: 0 0 20px;
}

/* ---------- Diagnostic tree ---------- */
.thm-tree { list-style: none; margin: 0; padding: 0; }
.thm-tree-node {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
}
.thm-tree-conn { height: 22px; }
.thm-tree-conn span {
  position: absolute;
  left: 20px;
  top: -14px;
  width: 2px;
  height: 36px;
  background: var(--line-2);
}
.thm-tree-num {
  display: inline-block;
  font: 600 0.68rem var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--blue);
  background: var(--tint);
  border: 1px solid var(--blue-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.thm-tree-q {
  font: 600 1.05rem var(--font-display);
  margin: 0 0 6px;
}
.thm-tree-q em { color: var(--blue); font-style: normal; }
.thm-tree-p {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 0 0 12px;
  max-width: 70ch;
}
.thm-tree-branch { display: grid; gap: 8px; }
.thm-tree-branch a {
  display: block;
  width: fit-content;
  max-width: 100%;
  font: 500 0.86rem var(--font-body);
  padding: 8px 14px;
  border-radius: 9px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  overflow-wrap: anywhere;
}
.thm-tree-no {
  color: var(--blue-deep);
  border: 1px solid var(--blue-soft);
  background: var(--tint);
}
.thm-tree-no:hover,
.thm-tree-no:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}
.thm-tree-yes {
  color: var(--ink);
  border: 1px dashed var(--line-2);
  background: none;
}
.thm-tree-yes:hover,
.thm-tree-yes:focus-visible {
  border-color: var(--blue);
  border-style: solid;
  color: var(--blue);
  background: var(--tint);
}
.thm-tree-final { border-left-color: var(--cyan); }
.thm-tree-final .thm-tree-num {
  color: #0b7c8c;
  background: rgba(15, 181, 201, 0.12);
  border-color: rgba(15, 181, 201, 0.4);
}
.thm-tree-adv { margin-top: 14px; }
.thm-tree-adv summary {
  font: 500 0.82rem var(--font-mono);
  color: var(--blue);
  cursor: pointer;
  padding: 6px 0;
}
.thm-tree-adv-in {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 16px;
  margin-top: 4px;
}
.thm-tree-adv-in p { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 8px; }
.thm-tree-adv-in p:last-child { margin-bottom: 0; }

/* ---------- Cooling chain diagram ---------- */
.thm-diagram {
  margin: 26px 0;
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: 14px;
  padding: 18px;
}
.thm-diagram svg { width: 100%; height: auto; display: block; }
.thm-diagram figcaption {
  color: var(--dark-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  margin-top: 12px;
  max-width: 75ch;
}
.thm-diagram figcaption em { color: var(--dark-ink); font-style: normal; }

.thm-glow {
  animation: thm-glow-pulse 4s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes thm-glow-pulse {
  from { opacity: 0.65; }
  to { opacity: 1; transform: scale(1.04); }
}
.thm-box { fill: #0e2038; stroke: #2e5f93; stroke-width: 2; }
.thm-cpu-die { fill: #122a48; stroke: #1e3a5f; stroke-width: 1.5; }
.thm-fin { fill: #122a48; stroke: #1e3a5f; stroke-width: 1; }
.thm-sensor { fill: #0e2038; stroke: #1e3a5f; stroke-width: 1.5; }

.thm-heat { fill: #f5a05a; opacity: 0; animation: thm-heat-rise 2.8s ease-out infinite; }
.thm-heat-b { animation-delay: 0.9s; }
.thm-heat-c { animation-delay: 1.8s; }
@keyframes thm-heat-rise {
  0% { opacity: 0; transform: translateY(0); }
  15% { opacity: 0.85; }
  100% { opacity: 0; transform: translateY(-36px); }
}
.thm-heat-arrow { stroke: #f5a05a; stroke-width: 2.4; marker-end: none; }
.thm-heat-arrow { stroke-dasharray: 4 4; animation: thm-arrow-flow 1.2s linear infinite; }
@keyframes thm-arrow-flow { to { stroke-dashoffset: -8; } }

.thm-fan-ring { fill: none; stroke: #2e5f93; stroke-width: 2; }
.thm-fan-blade { fill: #1d3a5f; stroke: #2e5f93; stroke-width: 1; }
.thm-fan-hub { fill: #2e5f93; }
.thm-fan-rot {
  transform-box: fill-box;
  transform-origin: center;
  animation: thm-fan-spin 6s linear infinite;
}
@keyframes thm-fan-spin { to { transform: rotate(360deg); } }

.thm-trace { stroke: #24466f; stroke-width: 2; }
.thm-flow {
  stroke: var(--cyan-bright);
  stroke-width: 2.4;
  stroke-dasharray: 12 200;
  opacity: 0.85;
  animation: thm-airflow 2.4s linear infinite;
}
.thm-flow-b { animation-delay: 0.8s; }
.thm-flow-c { animation-delay: 1.6s; }
@keyframes thm-airflow { to { stroke-dashoffset: -212; } }
.thm-out-arrow { fill: var(--cyan-bright); opacity: 0.9; }

.thm-svg-label { fill: #8aa3c4; font: 500 11px var(--font-mono); letter-spacing: 2px; }
.thm-svg-sub { fill: #5b7396; font: 400 10px var(--font-mono); letter-spacing: 1px; }
.thm-svg-accent { fill: var(--cyan-bright); font: 500 10px var(--font-mono); letter-spacing: 1.5px; }
.thm-svg-status { fill: #7f95b5; font: 400 12px var(--font-mono); letter-spacing: 0.5px; }

/* ---------- Accordion articles ---------- */
.thm-art {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.thm-art[open] { border-color: var(--blue-soft); }
.thm-art-sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
}
.thm-art-sum::-webkit-details-marker { display: none; }
.thm-art-num {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.thm-art[open] .thm-art-num {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.thm-art-body { display: grid; gap: 2px; min-width: 0; }
.thm-art-title {
  font: 600 1.02rem/1.35 var(--font-display);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.thm-art-meta { display: flex; align-items: center; gap: 10px; }
.thm-art-time { font-size: 0.7rem; color: var(--ink-3); }
.thm-art-ico { position: relative; width: 16px; height: 16px; }
.thm-art-ico::before,
.thm-art-ico::after {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 16px; height: 2px;
  background: var(--ink-3);
  transition: transform 0.25s, background 0.25s;
}
.thm-art-ico::after { transform: rotate(90deg); }
.thm-art[open] .thm-art-ico::after { transform: rotate(0deg); }
.thm-art[open] .thm-art-ico::before,
.thm-art[open] .thm-art-ico::after { background: var(--blue); }

.thm-art-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.thm-art[open] .thm-art-panel { grid-template-rows: 1fr; }
.thm-art-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s 0.35s;
  padding: 0 20px;
}
.thm-art[open] .thm-art-inner { visibility: visible; transition-delay: 0s; }
.thm-art-inner { padding-bottom: 20px; }
.thm-art-inner > p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 75ch;
}
.thm-art-inner > p:last-child { margin-bottom: 0; }
.thm-art-inner strong { color: var(--ink); }
.thm-art-inner .table-wrap { margin: 0 0 16px; }

/* ---------- Risk badges ---------- */
.thm-risk {
  display: inline-block;
  font: 500 0.72rem var(--font-mono);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.thm-risk-safe { color: var(--blue-deep); background: var(--tint); border: 1px solid var(--blue-soft); }
.thm-risk-low { color: #9a6b00; background: #fdf3d7; border: 1px solid #eed9a0; }
.thm-risk-moderate { color: #8a3b12; background: #fbe9dd; border: 1px solid #f0c3a8; }
.thm-risk-pro { color: #6d249c; background: #f3e8fb; border: 1px solid #d9b8f0; }
.thm-risk-never { color: #b3261e; background: #fde8e6; border: 1px solid #f5b5b0; }

/* ---------- Mistakes ---------- */
.thm-mistakes { list-style: none; margin: 0; padding: 0; counter-reset: thm-mistake; }
.thm-mistakes li {
  position: relative;
  padding: 0 0 16px 44px;
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 14px 58px;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.6;
  counter-increment: thm-mistake;
}
.thm-mistakes li::before {
  content: counter(thm-mistake, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 14px;
  font: 600 0.78rem var(--font-mono);
  color: #b3261e;
  background: #fde8e6;
  border: 1px solid #f5b5b0;
  border-radius: 8px;
  padding: 4px 8px;
}
.thm-mistakes li strong { color: var(--ink); }

/* ---------- Checklist ---------- */
.thm-check {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 720px;
}
.thm-check-file {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ink-3);
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 10px;
  margin: 0 0 8px;
}
.thm-check-list { list-style: none; margin: 0; padding: 0; }
.thm-check-list label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: background 0.15s;
}
.thm-check-list label:hover { background: #f2f7ff; }
.thm-check-box {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
  flex: none;
  cursor: pointer;
}
.thm-check-box:checked + span { color: var(--ink); }
.thm-check-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.thm-check-hint { font-size: 0.7rem; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.thm-faq { display: grid; gap: 10px; }
.thm-faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.thm-faq-item[open] { border-color: var(--blue-soft); }
.thm-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font: 600 0.98rem var(--font-body);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  overflow-wrap: anywhere;
}
.thm-faq-item summary::-webkit-details-marker { display: none; }
.thm-faq-item summary::after {
  content: "+";
  font: 500 1.1rem var(--font-mono);
  color: var(--blue);
  flex: none;
  transition: transform 0.2s;
}
.thm-faq-item[open] summary::after { transform: rotate(45deg); }
.thm-faq-in { padding: 0 18px 16px; }
.thm-faq-in p { font-size: 0.92rem; color: var(--ink-2); margin: 0; line-height: 1.65; }

/* ---------- Related ---------- */
.thm-related { display: grid; grid-template-columns: 1fr; gap: 12px; }
.thm-rel-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.thm-rel-card:hover,
.thm-rel-card:focus-visible {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.thm-rel-card h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.thm-rel-card p { font-size: 0.84rem; color: var(--ink-2); margin: 0; }
.thm-rel-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-deep);
  background: var(--tint);
  border: 1px solid var(--blue-soft);
  border-radius: 999px;
  padding: 3px 9px;
  align-self: flex-start;
  margin-top: 4px;
}

/* ---------- Tutorial footer ---------- */
.thm-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0 32px;
  margin-top: 20px;
}
.thm-foot p { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 12px; }
.thm-foot-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 14px; }
.thm-foot-link {
  font: 500 0.88rem var(--font-body);
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}
.thm-foot-link:hover { border-bottom-color: var(--blue); }
.thm-foot-fine { font-size: 0.76rem !important; color: var(--ink-3) !important; }

/* ---------- Toast + to-top (page instances) ---------- */
.toast {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 90;
  max-width: min(340px, calc(100vw - 32px));
  background: var(--ink);
  color: #fff;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-on { opacity: 1; transform: none; }

.to-top {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 80;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Responsive ---------- */
@media (min-width: 620px) {
  .thm-most-grid { grid-template-columns: repeat(2, 1fr); }
  .thm-related { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .thm-related { grid-template-columns: repeat(3, 1fr); }
  .thm-art-inner > p { font-size: 1rem; }
}

/* ---------- Dark theme (in-file override, loaded before the shared theme file) ---------- */
[data-theme="dark"] .thm-diag,
[data-theme="dark"] .thm-most-card,
[data-theme="dark"] .thm-tree-node,
[data-theme="dark"] .thm-art,
[data-theme="dark"] .thm-mistakes li,
[data-theme="dark"] .thm-check,
[data-theme="dark"] .thm-faq-item,
[data-theme="dark"] .thm-rel-card,
[data-theme="dark"] .thm-foot { background: var(--surface); }
[data-theme="dark"] .thm-check-list label:hover { background: #14233a; }
[data-theme="dark"] .thm-risk-low { color: #f5c97a; background: #2a2110; border-color: #6b5426; }
[data-theme="dark"] .thm-risk-moderate { color: #f0a583; background: #2a1a10; border-color: #7a4a2a; }
[data-theme="dark"] .thm-risk-pro { color: #d0a5f0; background: #221430; border-color: #5a3a7a; }
[data-theme="dark"] .thm-risk-never { color: #f5a09a; background: #2a1210; border-color: #7a3530; }
[data-theme="dark"] .thm-mistakes li::before { color: #f5a09a; background: #2a1210; border-color: #7a3530; }
[data-theme="dark"] .thm-diagram figcaption em { color: var(--dark-ink); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .thm-progress { display: none; }
  .thm-glow,
  .thm-fan-rot,
  .thm-flow,
  .thm-heat,
  .thm-heat-arrow { animation: none; }
  .thm-heat { opacity: 0.4; }
  .thm-flow { opacity: 0.3; stroke-dasharray: none; }
  .thm-art-panel,
  .thm-art-inner,
  .thm-diag-opt,
  .thm-most-card,
  .thm-rel-card,
  .to-top,
  .toast { transition: none; }
  html { scroll-behavior: auto; }
}
