/* ============================================================
   SCIENTIFIC METHOD — unit page styles
   Hero loop · step spine · sorters · virtual lab · explainer ·
   CER · myth flips · flashcards · exit ticket · chapter dots
   ============================================================ */

/* the hidden attribute must always win over the display rules below
   (concl-form / concl-verdict / quiz-* set grid/flex, which would
   otherwise override the UA [hidden] rule and show locked UI) */
[hidden] { display: none !important; }

/* ---------- hero ---------- */
.sm-hero {
  position: relative;
  padding-top: clamp(150px, 20vh, 200px);
  overflow: hidden;
  background: linear-gradient(180deg, #F7F2E4 0%, var(--sand-50) 60%, var(--sand-100) 100%);
}
.sm-hero-grid {
  position: relative; z-index: 1; /* above .sun */
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  align-items: center; gap: clamp(30px, 5vw, 60px);
  padding-bottom: 70px;
}
.sm-hero-grid > * { min-width: 0; }
.sm-title { font-size: clamp(2.9rem, 6.5vw, 5.4rem); margin-bottom: 26px; }
.sm-title .char { display: inline-block; }
.sm-hero .lede em { font-style: italic; color: var(--iris-500); }
.sm-chips { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.loop-diagram { max-width: 400px; margin-left: auto; width: 100%; }
.loop-diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.loop-hint {
  margin-top: 8px; text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--ink-300);
}
.loop-node { cursor: pointer; outline: none; }
.loop-node circle { transition: fill 0.3s; }
.loop-node:hover circle, .loop-node:focus-visible circle { fill: var(--iris-500); }
.loop-traveler-ghost { animation: ghost-pulse 1.6s ease-in-out infinite; }
@keyframes ghost-pulse {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(2.1); opacity: 0; }
}

/* ---------- the loop steps (spine journey) ---------- */
.sm-loop { background: var(--sand-100); }
.steps { position: relative; display: flex; flex-direction: column; gap: 22px; padding-left: 74px; }
.steps-spine {
  position: absolute; left: 26px; top: 12px; bottom: 12px; width: 2px;
  background: var(--sand-300); border-radius: 2px; overflow: hidden;
}
.steps-spine-fill {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--iris-500), var(--amber-500));
  transform: scaleY(0); transform-origin: top;
}
.step-card {
  display: grid; grid-template-columns: 92px 1fr; gap: 22px; align-items: start;
}
.step-card::before {  /* dot on the spine */
  content: ""; position: absolute; left: -53px; top: 36px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sand-100); border: 2.5px solid var(--sand-300);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.step-card.active::before {
  border-color: var(--amber-500); background: var(--amber-500);
  box-shadow: 0 0 0 5px rgb(232 112 58 / 0.18);
}
.step-num {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  line-height: 1; color: var(--amber-500); display: block; padding-top: 4px;
}
.step-card h3 { margin-bottom: 12px; }
.step-card .step-body > p { color: var(--ink-700); font-size: 15.5px; }
.beetle-example {
  margin-top: 16px; padding: 14px 16px;
  border-left: 3px solid var(--amber-500);
  background: rgb(232 112 58 / 0.07);
  border-radius: 0 12px 12px 0;
  font-size: 14px !important; color: var(--ink-700) !important;
}
.sep-chips { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.sep-chip {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; color: var(--iris-500);
  border: 1px solid rgb(91 84 214 / 0.35);
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- sorters (shared manipulative) ---------- */
.sorter-status {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55;
  color: var(--ink-500); min-height: 1.55em; margin-bottom: 14px;
  transition: color 0.3s;
}
.sorter-status.ok { color: #2F9E5F; }
.sorter-status.hint { color: #C26A2B; }
.sorter-bank {
  display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
  min-height: 96px; padding: 14px;
  border: 1.5px dashed rgb(13 13 17 / 0.2); border-radius: 18px;
  background: rgb(255 253 246 / 0.55);
}
.sort-card {
  font: inherit; font-size: 14px; line-height: 1.4; text-align: left;
  padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid rgb(13 13 17 / 0.14);
  background: #FFFDF6; color: var(--ink-900);
  cursor: pointer;
  box-shadow: 0 2px 8px -4px rgb(13 13 17 / 0.18);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s, border-color 0.22s;
}
.sort-card:hover { transform: translateY(-2px); border-color: var(--iris-500); }
.sort-card:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 2px; }
.sort-card.selected {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgb(232 112 58 / 0.25), 0 10px 22px -8px rgb(13 13 17 / 0.3);
  transform: translateY(-3px) rotate(-1deg);
}
.sorter-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sorter-bins.bins-3 { grid-template-columns: repeat(3, 1fr); }
.sort-bin {
  border: 1.5px dashed rgb(13 13 17 / 0.22); border-radius: 18px;
  padding: 16px; min-height: 128px; cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.sort-bin:hover, .sort-bin:focus-visible { border-color: var(--iris-500); outline: none; }
.sorter.armed .sort-bin { border-style: solid; }
.sorter.armed .sort-bin:hover, .sorter.armed .sort-bin:focus-visible {
  border-color: var(--amber-500); background: rgb(232 112 58 / 0.05);
}
.bin-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }
.bin-sub { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-300); margin-top: 3px; }
.bin-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.bin-cards .sort-card {
  cursor: default; font-size: 13px;
  background: rgb(123 227 154 / 0.12);
  border-color: rgb(47 158 95 / 0.45);
  box-shadow: none;
}
.bin-cards .sort-card::before { content: "✓ "; color: #2F9E5F; font-weight: 700; }
.bin-cards .sort-card:hover { transform: none; }
.sort-card.just-placed { animation: pop-in 0.38s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
}
.sort-bin.done { border-color: rgb(47 158 95 / 0.55); background: rgb(123 227 154 / 0.07); border-style: solid; }
.sort-bin.shake { animation: shake 0.42s; }
@keyframes shake {
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
.sorter-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 15px;
}
.sorter-progress { font-family: var(--font-mono); font-size: 12px; color: var(--ink-500); }
.sorter-reset {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ink-500); background: none; border: 0; cursor: pointer;
  border-bottom: 1px dashed var(--ink-300); padding: 2px 0;
}
.sorter-reset:hover { color: var(--amber-500); border-color: var(--amber-500); }
.sorter-wide { max-width: 940px; margin-inline: auto; }
.sorter-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber-500); margin-bottom: 10px;
  text-align: center;
}
.sorter-wide .sorter-status { text-align: center; }

/* ---------- observation lab ---------- */
.sm-observe { background: var(--sand-50); }
.observe-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: 22px; align-items: start;
}
.field-scene { padding: 0; overflow: hidden; }
.field-scene svg { display: block; width: 100%; height: auto; }
.field-caption { padding: 13px 18px; border-top: 1px solid rgb(13 13 17 / 0.07); }
.scene-beetle .beetle-antenna { animation: ant-wig 2.3s ease-in-out infinite; }

/* antenna wiggle — applies to every <use> of the beetle symbol */
.beetle-antenna { transform-origin: 11px 54px; animation: ant-wig 2.6s ease-in-out infinite; }
@keyframes ant-wig {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-7deg); }
}

/* ---------- question sorter band ---------- */
.sm-ask { background: var(--sand-100); }

/* ---------- hypothesis builder (dark) ---------- */
.sm-builder {
  background: var(--ink-900); color: var(--sand-50);
  border-radius: clamp(24px, 4vw, 48px);
  margin: 0 clamp(10px, 2vw, 24px);
  padding: var(--section-pad) 0;
}
.eyebrow-light { color: var(--iris-300); }
.lede-light { color: rgb(250 246 235 / 0.72); }
.builder-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 5vw, 80px); align-items: start;
}
.builder-tips { list-style: none; margin-top: 34px; display: grid; gap: 0; }
.builder-tips li {
  padding: 13px 0 13px 20px; border-left: 2px solid rgb(232 112 58 / 0.6);
  color: rgb(250 246 235 / 0.75); font-size: 14.5px;
}
.builder-tips li + li { border-top: 1px solid rgb(250 246 235 / 0.08); }
.builder-tips strong { color: var(--amber-300); }
.builder-panel { display: flex; flex-direction: column; gap: 8px; }
.builder-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber-300); margin-top: 14px;
}
.builder-select {
  appearance: none; -webkit-appearance: none;
  background: rgb(250 246 235 / 0.07);
  border: 1px solid rgb(250 246 235 / 0.18);
  color: var(--sand-50);
  font-family: var(--font-body); font-size: 15.5px; font-weight: 500;
  padding: 14px 44px 14px 16px; border-radius: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F5A05C' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.3s;
}
.builder-select:hover, .builder-select:focus { border-color: var(--amber-500); outline: none; }
.builder-select option { background: var(--ink-900); color: var(--sand-50); }
.builder-out {
  margin-top: 26px; padding: 24px;
  border: 1px dashed rgb(245 160 92 / 0.4);
  border-radius: 18px;
}
.builder-sentence {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.35;
  letter-spacing: -0.01em;
}
.builder-sentence .fill { color: var(--amber-300); }
.builder-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bcheck {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgb(250 246 235 / 0.35);
  border: 1px solid rgb(250 246 235 / 0.14);
  padding: 6px 12px; border-radius: 999px;
  transition: all 0.35s;
}
.bcheck.met {
  color: #7BE39A; border-color: rgb(123 227 154 / 0.5);
  background: rgb(123 227 154 / 0.08);
}

/* ============================================================
   THE HEADSTAND LAB
   ============================================================ */
.sm-lab { background: var(--sand-100); }
.lab-grid {
  display: grid; grid-template-columns: 1.12fr 0.88fr;
  gap: 22px; align-items: start;
}
.arena-top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.arena-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--iris-500);
}
.arena {
  position: relative; height: 280px; border-radius: 16px;
  background: linear-gradient(180deg, #F7EFDC 0%, #F0E5C9 100%);
  border: 1px solid rgb(13 13 17 / 0.1);
  overflow: hidden;
}
.arena::after {  /* soft vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 46px rgb(13 13 17 / 0.08); border-radius: inherit;
}
.arena-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(180deg, #E8DFC7, #DCCFAE);
  border-top: 1px solid rgb(13 13 17 / 0.07);
}
.arena-flash {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 6; pointer-events: none;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--ink-700);
  background: rgb(255 253 246 / 0.9);
  border: 1px solid rgb(13 13 17 / 0.12);
  padding: 6px 14px; border-radius: 999px;
  opacity: 0; transition: opacity 0.3s;
  max-width: 92%; text-align: center;
}
.arena-flash.show { opacity: 1; }

/* beetles in the arena */
.arena-beetle { position: absolute; z-index: 2; animation: b-bob 3.4s ease-in-out infinite; }
.arena-beetle[data-beetle="0"] { left: 5%;  bottom: 9%;  width: 19%;   animation-delay: -0.6s; }
.arena-beetle[data-beetle="1"] { left: 26%; bottom: 30%; width: 16.5%; animation-delay: -1.9s; }
.arena-beetle[data-beetle="2"] { left: 45%; bottom: 7%;  width: 20%;   animation-delay: -2.7s; }
.arena-beetle[data-beetle="3"] { left: 66%; bottom: 29%; width: 17%;   animation-delay: -1.2s; }
.arena-beetle[data-beetle="4"] { left: 81%; bottom: 9%;  width: 17%;   animation-delay: -2.2s; }
@keyframes b-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.arena-beetle svg {
  width: 100%; height: auto; display: block; position: relative; z-index: 1;
  transform-origin: 12% 80%;
  transition: transform 0.55s cubic-bezier(0.34, 1.65, 0.5, 1);
}
.arena-beetle.headstand svg { transform: rotate(-73deg) translateY(-3%); }
.beetle-shadow {
  position: absolute; bottom: -3%; left: 6%; right: 6%; height: 9%;
  background: radial-gradient(ellipse at center, rgb(13 13 17 / 0.3), transparent 68%);
  border-radius: 50%;
  transition: transform 0.55s, opacity 0.55s;
}
.arena-beetle.headstand .beetle-shadow { transform: scaleX(0.45); opacity: 0.65; }

/* stimulus fx */
.fx { position: absolute; pointer-events: none; opacity: 0; z-index: 4; }
.fx-shadow {
  top: -28%; left: -12%; width: 62%; aspect-ratio: 1;
  background: radial-gradient(circle, rgb(13 13 17 / 0.5), transparent 62%);
  border-radius: 50%;
}
.fx-shadow.play { animation: fx-shadow 1.3s ease-in-out; }
@keyframes fx-shadow {
  0%   { opacity: 0; transform: translate(115%, -50%) scale(0.6); }
  28%  { opacity: 1; }
  55%  { opacity: 1; transform: translate(38%, 8%) scale(1.08); }
  100% { opacity: 0; transform: translate(-45%, 55%) scale(0.75); }
}
.fx-puff { top: 12%; left: 0; width: 100%; height: 46%; }
.fx-puff i {
  position: absolute; left: -46px; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.95), rgb(255 255 255 / 0) 70%);
}
.fx-puff i:nth-child(1) { top: 0; }
.fx-puff i:nth-child(2) { top: 26px; animation-delay: 0.12s !important; }
.fx-puff i:nth-child(3) { top: 10px; animation-delay: 0.24s !important; }
.fx-puff.play { opacity: 1; }
.fx-puff.play i { animation: puff 1.35s ease-out forwards; }
@keyframes puff {
  0%   { opacity: 0; transform: translateX(0) scale(0.5); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(660px) scale(1.35); }
}
.fx-brush { top: 4%; right: -14%; width: 112px; height: 62px; }
.brush-body {
  position: absolute; top: 0; left: 0; width: 104px; height: 26px;
  border-radius: 8px; background: linear-gradient(180deg, #F5A05C, #E8703A);
  box-shadow: 0 4px 10px -4px rgb(13 13 17 / 0.4);
}
.brush-bristles {
  position: absolute; top: 26px; left: 7px; width: 90px; height: 24px;
  background: repeating-linear-gradient(90deg, #8B8B93 0 3px, rgb(139 139 147 / 0.25) 3px 6px);
  border-radius: 0 0 7px 7px;
}
.fx-brush.play { animation: brush-sweep 1.5s ease-in-out; }
@keyframes brush-sweep {
  0%   { opacity: 0; transform: translate(10%, -20%) rotate(8deg); }
  14%  { opacity: 1; }
  45%  { opacity: 1; transform: translate(-190%, 60%) rotate(-4deg); }
  68%  { opacity: 1; transform: translate(-70%, 22%) rotate(3deg); }
  100% { opacity: 0; transform: translate(-330%, 85%) rotate(-6deg); }
}

/* lab controls */
.arena-controls { margin-top: 16px; }
.stim-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stim-btn {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 12px 14px; border-radius: 14px; font: inherit;
  border: 1.5px solid rgb(13 13 17 / 0.14);
  background: #FFFDF6; color: var(--ink-900); cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.stim-btn:hover { border-color: var(--iris-500); transform: translateY(-2px); }
.stim-btn:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 2px; }
.stim-btn.active {
  border-color: var(--amber-500); background: rgb(232 112 58 / 0.08);
  box-shadow: 0 0 0 3px rgb(232 112 58 / 0.18);
}
.stim-name { font-weight: 700; font-size: 14.5px; }
.stim-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-300); }
.run-row { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.run-btn:disabled { opacity: 0.45; pointer-events: none; }
.lab-reset {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ink-500); background: none; border: 0; cursor: pointer;
  border-bottom: 1px dashed var(--ink-300); padding: 2px 0; margin-left: auto;
}
.lab-reset:hover { color: var(--amber-500); border-color: var(--amber-500); }
.arena-note {
  margin-top: 12px; font-family: var(--font-mono); font-size: 11px;
  line-height: 1.6; color: var(--ink-300);
}

/* lab data: notebook + chart */
.lab-data { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.lab-table-wrap { max-height: 300px; overflow: auto; }
.lab-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12.5px; }
.lab-table thead th {
  position: sticky; top: 0; background: #FFFDF6; z-index: 1;
  text-align: left; color: var(--ink-300); font-weight: 500;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 8px; border-bottom: 1px solid rgb(13 13 17 / 0.12);
}
.lab-table td { padding: 7px 8px; border-bottom: 1px solid rgb(13 13 17 / 0.06); color: var(--ink-700); }
.lab-table tr.fresh td { animation: row-in 0.4s ease; }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }
.log-empty td { color: var(--ink-300); text-align: center; padding: 22px 8px; }

.chart-bars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  align-items: end; margin-top: 4px;
}
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.chart-pct { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink-700); }
.chart-bar {
  position: relative; width: 100%; height: 120px;
  background: var(--sand-200); border-radius: 10px; overflow: hidden;
}
.chart-fill {
  position: absolute; bottom: 0; left: 0; right: 0; height: 0%;
  background: linear-gradient(180deg, var(--amber-500), var(--iris-500));
  border-radius: 10px 10px 0 0;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.chart-name { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-500); text-transform: uppercase; }
.trust { width: 100%; height: 6px; background: var(--sand-200); border-radius: 3px; overflow: hidden; }
.trust-fill {
  display: block; height: 100%; width: 0%;
  background: var(--iris-500); border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.trust-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--ink-300); text-transform: uppercase; }
.chart-note {
  margin-top: 16px; font-size: 13px; line-height: 1.6; color: var(--ink-500);
  border-top: 1px dashed rgb(13 13 17 / 0.12); padding-top: 13px;
}

/* lab conclusion */
.lab-conclusion { margin-top: 22px; }
.concl-head h3 { margin: 6px 0 10px; }
.concl-head .step-num { font-size: 1rem; padding: 0; }
.concl-lock { color: var(--ink-500); font-size: 15px; max-width: 60ch; }
.concl-lock strong { color: var(--amber-500); }
.concl-form { display: grid; gap: 12px; margin-top: 20px; max-width: 780px; }
.concl-row { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.concl-row label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--iris-500);
}
.concl-select {
  background-color: var(--sand-50); color: var(--ink-900);
  border: 1.5px solid rgb(13 13 17 / 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A5A64' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.concl-select option { background: #FFFDF6; color: var(--ink-900); }
.concl-select:hover, .concl-select:focus { border-color: var(--iris-500); }
.concl-verdict { display: flex; gap: 28px; align-items: center; margin-top: 24px; }
.verdict-stamp {
  width: 112px; height: 112px; flex: none;
  border: 3px solid #2F9E5F; color: #2F9E5F; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5;
  transform: rotate(-9deg);
  animation: stamp-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.verdict-stamp.revise { border-color: var(--amber-500); color: var(--amber-500); }
@keyframes stamp-in {
  from { transform: rotate(-9deg) scale(2.3); opacity: 0; }
}
.verdict-cer { font-size: 15.5px; line-height: 1.65; color: var(--ink-700); }
.verdict-cer strong { color: var(--ink-900); }
.verdict-review {
  margin-top: 12px; font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.6; color: var(--iris-500);
}
.concl-republish { margin-top: 16px; }

/* ============================================================
   ANIMATED EXPLAINER (dark)
   ============================================================ */
.sm-watch {
  background: var(--ink-900); color: var(--sand-50);
  border-radius: clamp(24px, 4vw, 48px);
  margin: 0 clamp(10px, 2vw, 24px);
  padding: var(--section-pad) 0;
}
.xp { max-width: 940px; margin-inline: auto; }
.xp-stage {
  position: relative; aspect-ratio: 16 / 8.6;
  background: #08080C; border: 1px solid rgb(250 246 235 / 0.12);
  border-radius: var(--radius); overflow: hidden;
}
.xp-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.no-js .xp-scene[data-scene="1"], .xp-scene[data-scene="1"] { opacity: 1; visibility: visible; }
.xp-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20%;
  background: rgb(217 205 172 / 0.13);
  border-top: 1px solid rgb(217 205 172 / 0.35);
}
.xp-beetle { position: absolute; left: 10%; bottom: 16%; width: clamp(90px, 16%, 160px); }
.xp-beetle.small { width: clamp(70px, 12%, 120px); left: 14%; }
.xp-beetle svg { width: 100%; height: auto; display: block; }
.xp-note {
  position: absolute; left: 30%; bottom: 62%;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem); color: var(--amber-500);
}
.xp-bubble {
  position: absolute; left: 30%; bottom: 52%; max-width: 52%;
  background: var(--sand-50); color: var(--ink-900);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 2.4vw, 1.5rem); line-height: 1.25; letter-spacing: -0.01em;
  padding: 18px 22px; border-radius: 18px;
}
.xp-bubble::after {
  content: ""; position: absolute; left: 26px; bottom: -10px;
  border: 11px solid transparent; border-top-color: var(--sand-50); border-bottom: 0;
}
.xp-type {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 10%; text-align: center;
  font-family: var(--font-mono); font-size: clamp(0.95rem, 2.3vw, 1.5rem);
  line-height: 1.6; color: var(--sand-50);
}
.xp-type em { color: var(--amber-300); font-style: normal; font-weight: 700; }
.xp-type .caret { display: inline-block; width: 0.55em; height: 1.15em; background: var(--amber-500); vertical-align: -0.18em; animation: caret-blink 0.85s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.xp-minis {
  position: absolute; left: 0; right: 0; bottom: 13%;
  display: flex; justify-content: center; gap: clamp(8px, 3vw, 34px);
}
.xp-mini { width: clamp(46px, 9%, 86px); }
.xp-mini svg { width: 100%; height: auto; display: block; transform-origin: 12% 80%; transition: transform 0.5s cubic-bezier(0.34, 1.65, 0.5, 1); }
.xp-mini.headstand svg { transform: rotate(-73deg); }
.xp-stims {
  position: absolute; top: 12%; left: 0; right: 0;
  display: flex; justify-content: center; gap: 12px;
}
.xp-stim {
  font-family: var(--font-mono); font-size: clamp(0.6rem, 1.5vw, 0.78rem);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--iris-300); border: 1px solid rgb(139 133 240 / 0.5);
  background: rgb(91 84 214 / 0.18);
  padding: 7px 14px; border-radius: 999px; opacity: 0.5;
}
.xp-counts {
  position: absolute; right: 5%; top: 26%;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: clamp(0.62rem, 1.6vw, 0.85rem);
  color: rgb(250 246 235 / 0.8);
}
.xp-bars {
  position: absolute; left: 8%; right: 8%; bottom: 12%; top: 18%;
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(20px, 6vw, 70px);
}
.xp-bar { width: clamp(50px, 12%, 110px); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.xp-bar-fill {
  display: block; height: 100%;
  background: linear-gradient(180deg, var(--amber-500), var(--iris-500));
  border-radius: 8px 8px 0 0;
  transform: scaleY(0); transform-origin: bottom;
}
.xp-bar-label {
  font-family: var(--font-mono); font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  color: rgb(250 246 235 / 0.8); text-align: center; white-space: nowrap;
}
.xp-pattern {
  position: absolute; right: 6%; top: 12%;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 2.6vw, 1.6rem); color: var(--amber-300);
}
.xp-cer {
  position: absolute; left: 0; right: 0; top: 22%;
  display: flex; justify-content: center; gap: clamp(10px, 3vw, 26px);
}
.xp-cer-chip {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(0.85rem, 2.2vw, 1.35rem);
  border: 1.5px solid rgb(250 246 235 / 0.35);
  padding: 12px 22px; border-radius: 14px;
}
.xp-stamp {
  position: absolute; left: 50%; top: 46%; transform: translateX(-50%) rotate(-9deg);
  width: clamp(96px, 18%, 150px); aspect-ratio: 1;
  border: 3px solid var(--amber-500); color: var(--amber-500); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-mono); font-size: clamp(0.55rem, 1.4vw, 0.75rem);
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.6;
}
.xp-loop-arrow { position: absolute; right: 7%; bottom: 14%; width: clamp(44px, 9%, 80px); animation: xp-spin 7s linear infinite; }
@keyframes xp-spin { to { transform: rotate(360deg); } }
.xp-captionbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 18px;
  background: rgb(8 8 12 / 0.72); backdrop-filter: blur(6px);
  border-top: 1px solid rgb(250 246 235 / 0.1);
}
.xp-caption {
  font-family: var(--font-mono); font-size: clamp(0.62rem, 1.6vw, 0.8rem);
  letter-spacing: 0.08em; color: rgb(250 246 235 / 0.85);
}
.xp-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgb(250 246 235 / 0.08); }
.xp-progress-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--iris-500), var(--amber-500)); }
.xp-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.xp-btn {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em;
  color: var(--sand-50); background: none; cursor: pointer;
  border: 1px solid rgb(250 246 235 / 0.3); border-radius: 999px;
  padding: 9px 18px; transition: border-color 0.25s, color 0.25s;
}
.xp-btn:hover { border-color: var(--amber-500); color: var(--amber-300); }
.xp-dots { display: flex; gap: 8px; margin-left: auto; }
.xp-dot {
  width: 9px; height: 9px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(250 246 235 / 0.22); padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.xp-dot:hover { transform: scale(1.3); }
.xp-dot.active { background: var(--amber-500); }

/* ---------- CER (light) ---------- */
.sm-argue { background: var(--sand-50); }
.cer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 54px; }
.cer-letter {
  font-family: var(--font-display); font-weight: 700; font-size: 3rem;
  line-height: 1; display: block; margin-bottom: 18px;
}
.cer-c { color: var(--amber-500); }
.cer-e { color: var(--iris-500); }
.cer-r { color: var(--ink-900); }
.cer-card h3 { margin-bottom: 10px; }
.cer-card > p { color: var(--ink-700); font-size: 15px; }
.cer-example {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed rgb(13 13 17 / 0.18);
  font-family: var(--font-mono); font-size: 12.5px !important;
  color: var(--amber-500) !important;
}
.cer-sorter { margin-top: 10px; }

/* ---------- SEP grid ---------- */
.sm-sep { background: var(--sand-100); }
.sep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sep-card { padding: 24px; }
.sep-num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--iris-500); display: block; margin-bottom: 16px;
}
.sep-card h3 { font-size: 1.06rem; line-height: 1.15; margin-bottom: 10px; }
.sep-card .plain { color: var(--ink-700); font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.sep-card .done { color: var(--ink-500); font-size: 13.5px; }
.standards-note {
  margin-top: 34px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  color: var(--ink-300); max-width: 70ch;
}

/* ---------- myth flip cards ---------- */
.sm-myths { background: var(--sand-50); }
.myth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.myth-flip {
  position: relative; min-height: 210px; padding: 0; border: 0;
  background: none; cursor: pointer; font: inherit; text-align: left;
  perspective: 1100px; border-radius: var(--radius);
}
.myth-flip:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 3px; }
.myth-face {
  position: absolute; inset: 0; border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 0.65s cubic-bezier(0.3, 1.3, 0.4, 1);
  font-family: var(--font-display); font-weight: 600; font-size: 1.14rem;
  line-height: 1.3; letter-spacing: -0.01em;
}
.myth-front {
  background: #FFFDF6; border: 1px solid rgb(13 13 17 / 0.08);
  box-shadow: var(--shadow-card); color: var(--ink-900);
}
.myth-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber-500);
  border: 1px solid rgb(232 112 58 / 0.4); border-radius: 999px;
  padding: 4px 10px; align-self: flex-start;
}
.myth-back {
  background: var(--ink-900); color: var(--sand-50);
  font-family: var(--font-body); font-weight: 400; font-size: 0.98rem;
  line-height: 1.55; letter-spacing: 0;
  transform: rotateY(180deg);
}
.myth-back strong { color: var(--amber-300); font-family: var(--font-display); font-size: 1.15rem; display: block; margin-bottom: 4px; }
.myth-flip.flipped .myth-front { transform: rotateY(-180deg); }
.myth-flip.flipped .myth-back { transform: rotateY(0deg); }

/* ============================================================
   FLASHCARDS (spaced repetition)
   ============================================================ */
.sm-cards { background: var(--sand-100); }
.deck-wrap {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 22px; align-items: start; max-width: 980px; margin-inline: auto;
}
.deck-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.deck-stat { text-align: center; }
.deck-stat-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.9rem; line-height: 1.05; color: var(--ink-900);
}
.deck-stat-label {
  display: block; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-300);
  margin-top: 5px;
}
.deck-bar {
  grid-column: 1 / -1; height: 8px; border-radius: 4px;
  background: var(--sand-200); overflow: hidden; margin-top: 6px;
}
.deck-bar-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--iris-500), var(--amber-500));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.deck-next { grid-column: 1 / -1; margin-top: 4px; line-height: 1.6; }
.deck-stats .sorter-reset { grid-column: 1 / -1; justify-self: start; }
.deck-main { min-width: 0; }

/* ---------- Trail Mix QR pass ---------- */
.sm-vocab-pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  max-width: 980px;
  margin: 28px auto 0;
  padding: 22px 24px;
  border: 1px solid rgb(13 13 17 / .14);
  border-radius: 20px;
  background: var(--ink-900);
  color: var(--sand-50);
  box-shadow: var(--shadow-card);
}
.sm-vocab-pass-copy { min-width: 0; }
.sm-vocab-pass-kicker {
  margin: 0;
  color: var(--amber-300);
  font: 500 10px/1.2 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.sm-vocab-pass h3 {
  margin: 8px 0 7px;
  color: var(--sand-50);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -.02em;
}
.sm-vocab-pass-copy > p:not(.sm-vocab-pass-kicker):not(.sm-vocab-pass-fallback) {
  max-width: 48ch;
  margin: 0;
  color: rgb(250 246 235 / .72);
  font-size: 13px;
  line-height: 1.55;
}
.sm-vocab-pass-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--amber-500);
  border-radius: 999px;
  color: var(--sand-50);
  font-weight: 700;
  text-decoration: none;
}
.sm-vocab-pass-link:hover,
.sm-vocab-pass-link:focus-visible {
  background: var(--amber-500);
  color: var(--ink-900);
}
.sm-vocab-pass-link:focus-visible { outline: 2px solid var(--sand-50); outline-offset: 3px; }
.sm-vocab-pass-fallback {
  margin: 12px 0 0;
  color: rgb(250 246 235 / .48);
  font: 10px/1.5 var(--font-mono);
  letter-spacing: .03em;
}
.sm-vocab-pass-code { display: grid; justify-items: center; gap: 9px; }
.sm-vocab-pass-qr {
  display: grid;
  width: 170px;
  height: 170px;
  box-sizing: border-box;
  place-items: center;
  padding: 15px;
  border: 2px solid var(--amber-300);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-900);
  font: 10px/1.3 var(--font-mono);
  text-align: center;
  box-shadow: 0 0 0 7px rgb(245 160 92 / .12);
}
.sm-vocab-pass-qr canvas,
.sm-vocab-pass-qr svg { display: block; width: 138px !important; height: 138px !important; max-width: 100%; }
.sm-vocab-pass-qr.is-fallback { padding: 20px; }
.sm-vocab-pass-caption {
  color: var(--amber-300);
  font: 500 9px/1.2 var(--font-mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .sm-vocab-pass { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .sm-vocab-pass-code { justify-self: center; }
}

@media print {
  .sm-vocab-pass { break-inside: avoid; color: #000; background: #fff; box-shadow: none; }
  .sm-vocab-pass h3, .sm-vocab-pass-link { color: #000; }
  .sm-vocab-pass-kicker, .sm-vocab-pass-caption { color: #000; }
  .sm-vocab-pass-copy > p:not(.sm-vocab-pass-kicker):not(.sm-vocab-pass-fallback),
  .sm-vocab-pass-fallback { color: #333; }
  .sm-vocab-pass-link { border-color: #000; }
  .sm-vocab-pass-qr { border-color: #000; box-shadow: none; }
}

.flashcard {
  position: relative; display: block; width: 100%; height: 270px;
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
  perspective: 1300px; border-radius: var(--radius);
}
.flashcard:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 3px; }
.fc-face {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 30px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 0.62s cubic-bezier(0.3, 1.25, 0.4, 1);
}
.fc-front {
  background: #FFFDF6; border: 1px solid rgb(13 13 17 / 0.08);
  box-shadow: var(--shadow-card);
}
.fc-back {
  background: var(--ink-900); color: var(--sand-50);
  transform: rotateY(180deg);
}
.flashcard.flipped .fc-front { transform: rotateY(-180deg); }
.flashcard.flipped .fc-back { transform: rotateY(0deg); }
.fc-kicker {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--iris-500);
}
.fc-back .fc-kicker { color: var(--amber-300); }
.fc-term {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.02em;
  color: var(--ink-900); text-align: center;
}
.fc-def {
  font-size: clamp(0.98rem, 2vw, 1.2rem); line-height: 1.55;
  color: rgb(250 246 235 / 0.88); text-align: center; max-width: 46ch;
}
.fc-hint {
  position: absolute; bottom: 18px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--ink-300);
}
.deck-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.grade-btn {
  font: inherit; font-weight: 700; font-size: 15px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 10px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid; background: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.grade-btn small { font-family: var(--font-mono); font-weight: 400; font-size: 10px; opacity: 0.75; }
.grade-btn:hover { transform: translateY(-2px); }
.grade-btn:disabled { opacity: 0.35; pointer-events: none; }
.grade-again { border-color: var(--amber-500); color: var(--amber-500); }
.grade-again:hover { box-shadow: 0 8px 20px -8px rgb(232 112 58 / 0.5); }
.grade-good { border-color: var(--iris-500); background: var(--iris-500); color: #fff; }
.grade-good:hover { box-shadow: 0 8px 20px -8px rgb(91 84 214 / 0.6); }
.grade-easy { border-color: var(--ink-900); color: var(--ink-900); }
.grade-easy:hover { box-shadow: 0 8px 20px -8px rgb(13 13 17 / 0.4); }
.deck-status { margin-top: 14px; text-align: center; }

/* ============================================================
   EXIT TICKET
   ============================================================ */
.sm-quiz { background: var(--sand-50); }
.quiz { max-width: 780px; margin-inline: auto; }
.quiz-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.quiz-dots { display: flex; gap: 7px; }
.quiz-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--sand-300); transition: background 0.3s;
}
.quiz-dots i.current { background: var(--amber-500); }
.quiz-dots i.answered { background: var(--iris-500); }
.quiz-q {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem); line-height: 1.25;
  letter-spacing: -0.01em; margin-bottom: 20px;
}
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  font: inherit; font-size: 15px; text-align: left;
  padding: 13px 16px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid rgb(13 13 17 / 0.14);
  background: var(--sand-50); color: var(--ink-900);
  transition: border-color 0.25s, background 0.25s, transform 0.2s, opacity 0.25s;
}
.quiz-opt:hover { border-color: var(--iris-500); transform: translateY(-1px); }
.quiz-opt:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 2px; }
.quiz-opt.correct { border-color: #2F9E5F; background: rgb(123 227 154 / 0.14); }
.quiz-opt.wrong { border-color: #D64545; background: rgb(214 69 69 / 0.08); animation: shake 0.42s; }
.quiz-opt.dim { opacity: 0.45; pointer-events: none; }
.quiz-opt.locked { pointer-events: none; }
.quiz-feedback {
  min-height: 1.7em; margin-top: 14px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  color: var(--ink-500);
}
.quiz-feedback.ok { color: #2F9E5F; }
.quiz-feedback.no { color: #C26A2B; }
.quiz-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.quiz-result { text-align: center; padding-top: 10px; }
.quiz-stamp { width: 150px; margin: 0 auto 20px; color: var(--iris-500); animation: stamp-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); }
.quiz-stamp svg { width: 100%; height: auto; display: block; }
.quiz-score {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.02em;
}
.quiz-note { color: var(--ink-500); font-size: 15px; margin-top: 8px; }
.quiz-result .sorter-reset { margin-top: 18px; }

/* ---------- closer ---------- */
.sm-closer { padding: clamp(80px, 10vw, 130px) 0; text-align: center; background: var(--sand-50); }
.sm-closer .btn { margin: 6px; }
.sm-closer .cm-closer-big { margin-bottom: 34px; }

/* ---------- chapter dots ---------- */
.chapters {
  position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 13px;
}
.chapters a {
  position: relative; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--ink-500);
  box-shadow: 0 0 0 3px rgb(250 246 235 / 0.5);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.chapters a:hover { transform: scale(1.35); }
.chapters a.active { background: var(--amber-500); border-color: var(--amber-500); }
.chapters a span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; white-space: nowrap;
  background: var(--ink-900); color: var(--sand-50);
  padding: 4px 9px; border-radius: 7px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.chapters a:hover span, .chapters a:focus-visible span { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .chapters { display: none; }
}
@media (max-width: 1020px) {
  .sm-hero-grid { grid-template-columns: 1fr; }
  .loop-diagram { margin: 10px auto 0; max-width: 340px; }
  .observe-grid { grid-template-columns: 1fr; }
  .field-scene { max-width: 520px; }
  .builder-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .cer-grid { grid-template-columns: 1fr; }
  .sep-grid { grid-template-columns: repeat(2, 1fr); }
  .myth-grid { grid-template-columns: 1fr; }
  .myth-flip { min-height: 170px; }
  .deck-wrap { grid-template-columns: 1fr; }
  .deck-stats { max-width: 460px; }
}
@media (max-width: 640px) {
  .steps { padding-left: 0; }
  .steps-spine { display: none; }
  .step-card { grid-template-columns: 1fr; gap: 10px; }
  .step-card::before { display: none; }
  .sep-grid { grid-template-columns: 1fr; }
  .sorter-bins, .sorter-bins.bins-3 { grid-template-columns: 1fr; }
  .sort-bin { min-height: 0; }
  .stim-row { grid-template-columns: repeat(2, 1fr); }
  .arena { height: 230px; }
  .concl-row { grid-template-columns: 1fr; gap: 6px; }
  .concl-verdict { flex-direction: column; align-items: flex-start; }
  .xp-stage { aspect-ratio: 16 / 11; }
  .flashcard { height: 300px; }
  .lab-table-wrap { max-height: 240px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .loop-traveler, .loop-traveler-ghost { display: none; }
  .beetle-antenna, .arena-beetle, .xp-loop-arrow { animation: none !important; }
}

/* vocab ticker: full deck scrolls slow (megaloop stage 3) */
.marquee-track { animation-duration: 48s; }

/* ============================================================
   INQUIRY STUDIO ADDITIONS
   Print-first investigation tools with optional local calculators.
   ============================================================ */
.sm-dice { background: var(--sand-100); }
.dice-method-grid { display: grid; grid-template-columns: .76fr 1.24fr; gap: 22px; align-items: start; }
.dice-method { background: var(--ink-900); color: var(--sand-50); overflow: hidden; }
.dice-method h3 { color: var(--sand-50); margin: 9px 0 18px; }
.dice-method .inquiry-kicker, .dice-next .inquiry-kicker { color: var(--amber-300); }
.dice-method-list { list-style: none; display: grid; gap: 0; counter-reset: dice-method; }
.dice-method-list li {
  display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 11px 0;
  border-top: 1px solid rgb(250 246 235 / .12); counter-increment: dice-method;
}
.dice-method-list li::before { content: counter(dice-method, decimal-leading-zero); color: var(--amber-300); font-family: var(--font-mono); font-size: 10px; padding-top: 3px; }
.dice-method-list strong { display: block; color: var(--sand-50); font-size: 14px; }
.dice-method-list span { display: block; margin-top: 2px; color: rgb(250 246 235 / .65); font-size: 12px; line-height: 1.45; }
.dice-method-list em { color: var(--amber-300); font-style: normal; font-family: var(--font-mono); font-size: 11px; }
.dice-rule { margin-top: 17px; padding: 12px 13px; border-left: 2px solid var(--amber-500); background: rgb(232 112 58 / .09); color: rgb(250 246 235 / .72); font-size: 12px; line-height: 1.55; }
.dice-rule strong { color: var(--amber-300); }
.dice-workbench { min-width: 0; }
.dice-bench-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.dice-bench-head h3 { margin: 8px 0 0; }
.dice-progress, .dice-lock { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; color: var(--iris-500); }
.dice-lock { color: var(--amber-500); }
.dice-prediction { margin-top: 21px; padding: 18px; border: 1px solid rgb(91 84 214 / .22); border-radius: 16px; background: rgb(91 84 214 / .06); }
.dice-prediction p { margin-top: 8px; color: var(--ink-700); font-size: 14px; line-height: 1.55; }
.dice-prediction-row { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 9px; align-items: end; margin-top: 15px; }
.dice-prediction-row label, .dice-entry-row label {
  display: grid; gap: 5px; color: var(--ink-500); font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.dice-prediction-row input, .dice-prediction-row select, .dice-entry-row input {
  min-width: 0; border: 1px solid rgb(13 13 17 / .18); border-radius: 9px; background: #FFFDF6; color: var(--ink-900); padding: 9px 10px; font: inherit; font-size: 13px; letter-spacing: normal; text-transform: none;
}
.dice-prediction-row input:focus-visible, .dice-prediction-row select:focus-visible, .dice-entry-row input:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 2px; }
.dice-status { min-height: 1.4em; margin-top: 12px !important; font-family: var(--font-mono); font-size: 11px !important; color: var(--iris-500) !important; }
.dice-roll-panel { margin-top: 21px; padding-top: 21px; border-top: 1px dashed rgb(13 13 17 / .16); transition: opacity .25s; }
.dice-roll-panel.is-locked { opacity: .55; }
.dice-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.dice-panel-head h4 { margin: 7px 0 0; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; }
.dice-roll-panel > p { margin-top: 8px; color: var(--ink-500); font-size: 13px; line-height: 1.5; }
.dice-entry-row { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.dice-entry-row label { width: 130px; }
.dice-reset { margin-left: auto; border: 0; border-bottom: 1px dashed var(--ink-300); padding: 2px 0; background: none; color: var(--ink-500); cursor: pointer; font-family: var(--font-mono); font-size: 11px; }
.dice-reset:hover { color: var(--amber-500); border-color: var(--amber-500); }
.dice-face-picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 17px; }
.dice-face-picker-head .mono-dim { font-size: 10px; }
.dice-face-buttons { display: grid; grid-template-columns: repeat(10, minmax(28px, 1fr)); gap: 6px; margin-top: 8px; }
.dice-face-btn { min-height: 34px; border: 1px solid rgb(13 13 17 / .18); border-radius: 9px; background: #FFFDF6; color: var(--ink-900); cursor: pointer; font: 700 13px var(--font-mono); transition: transform .2s, border-color .2s, background .2s; }
.dice-face-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--amber-500); background: rgb(232 112 58 / .08); }
.dice-face-btn:focus-visible { outline: 2px solid var(--iris-500); outline-offset: 2px; }
.dice-face-btn:disabled { cursor: not-allowed; opacity: .45; }
.dice-log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 20px; }
.dice-roll-log { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; max-height: 156px; overflow: auto; margin-top: 9px; padding: 11px; border: 1px dashed rgb(13 13 17 / .18); border-radius: 12px; background: rgb(255 253 246 / .7); list-style: none; }
.dice-roll-chip { display: inline-flex; align-items: center; gap: 4px; min-width: 39px; justify-content: center; padding: 5px 6px; border: 1px solid rgb(91 84 214 / .18); border-radius: 8px; background: rgb(91 84 214 / .06); font-family: var(--font-mono); font-size: 12px; }
.dice-roll-chip span { color: var(--ink-300); font-size: 8px; }
.dice-roll-chip strong { color: var(--iris-500); }
.dice-log-empty { width: 100%; color: var(--ink-300); font-family: var(--font-mono); font-size: 11px; }
.dice-export { min-width: 0; margin-top: 22px; }
.dice-export-intro { max-width: 78ch; margin-top: 9px; color: var(--ink-500); font-size: 13px; line-height: 1.55; }
.dice-export-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; margin-top: 19px; }
.dice-export-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: dice-export; }
.dice-export-steps li { display: grid; grid-template-columns: 29px 1fr; gap: 9px; align-items: start; counter-increment: dice-export; }
.dice-export-steps li::before { content: counter(dice-export, decimal-leading-zero); color: var(--iris-500); font: 700 10px var(--font-mono); }
.dice-export-steps strong { display: block; color: var(--ink-900); font-size: 13px; }
.dice-export-steps span { display: block; margin-top: 2px; color: var(--ink-500); font-size: 12px; line-height: 1.45; }
.dice-export-steps code { color: var(--iris-500); font: 11px var(--font-mono); }
.dice-export-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.dice-export-actions .btn { flex: 1 1 100%; }
.dice-tool { border: 1px solid rgb(13 13 17 / .2); border-radius: 999px; padding: 8px 12px; background: transparent; color: var(--ink-700); cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; }
.dice-tool:hover, .dice-tool:focus-visible { border-color: var(--iris-500); color: var(--iris-500); outline: none; }
.dice-tool:disabled { cursor: not-allowed; opacity: .45; }
.dice-export-actions a.dice-tool { text-decoration: none; }
.dice-export-output { min-height: 1.5em; margin-top: 17px; padding: 11px 12px; border-left: 2px solid var(--iris-500); background: rgb(91 84 214 / .06); color: var(--ink-700); font: 11px/1.6 var(--font-mono); }
.dice-copy-fallback { margin-top: 12px; padding: 11px 12px; border: 1px dashed rgb(13 13 17 / .25); border-radius: 10px; background: rgb(255 253 246 / .72); }
.dice-copy-fallback summary { cursor: pointer; color: var(--iris-500); font: 11px var(--font-mono); }
.dice-copy-fallback p { margin: 9px 0; color: var(--ink-500); font-size: 12px; line-height: 1.45; }
.dice-copy-fallback textarea { width: 100%; min-height: 154px; resize: vertical; border: 1px solid rgb(13 13 17 / .18); border-radius: 8px; padding: 8px; background: #fffdf6; color: var(--ink-700); font: 10px/1.45 var(--font-mono); }
.dice-export-status { color: var(--iris-500); font: 11px var(--font-mono); letter-spacing: .05em; }
.dice-next { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--ink-900); color: var(--sand-50); }
.dice-next p { flex: 1 1 580px; color: rgb(250 246 235 / .74); font-size: 14px; line-height: 1.6; }
.dice-next p strong { color: var(--amber-300); }
.dice-next .text-link { color: var(--amber-300); }
.sm-dice .btn { white-space: nowrap; }

.iv-link, .text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--iris-500); font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .04em; text-decoration: none; border-bottom: 1px dashed currentColor;
  width: fit-content; padding-bottom: 3px;
}
.iv-link:hover, .text-link:hover { color: var(--amber-500); }
.lab-tools {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px;
  padding-top: 12px; border-top: 1px dashed rgb(13 13 17 / .14);
}
.lab-tool {
  border: 1px solid rgb(13 13 17 / .2); border-radius: 999px; padding: 7px 11px;
  background: transparent; color: var(--ink-700); cursor: pointer;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
}
.lab-tool:hover, .lab-tool:focus-visible { border-color: var(--iris-500); color: var(--iris-500); outline: none; }
.lab-pool { margin-top: 18px; }
.pool-note { color: var(--ink-500); font-size: 13px; line-height: 1.5; margin: 8px 0 12px; }
.pool-grid {
  display: grid; grid-template-columns: 1fr .8fr .9fr auto; gap: 8px; align-items: end;
}
.pool-grid label, .heli-design label, .heli-claim {
  display: grid; gap: 5px; color: var(--ink-500);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.pool-grid input, .pool-grid select, .heli-design input, .heli-claim textarea {
  min-width: 0; border: 1px solid rgb(13 13 17 / .18); border-radius: 9px;
  background: #FFFDF6; color: var(--ink-900); padding: 8px 9px; font: inherit; font-size: 13px;
  letter-spacing: normal; text-transform: none;
}
.pool-grid input:focus-visible, .pool-grid select:focus-visible,
.heli-design input:focus-visible, .heli-claim textarea:focus-visible {
  outline: 2px solid var(--iris-500); outline-offset: 2px;
}
.pool-output {
  margin-top: 12px; min-height: 1.5em; padding-top: 10px;
  border-top: 1px dashed rgb(13 13 17 / .14); color: var(--ink-700);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.6;
}
.sm-inquiry { background: var(--sand-50); }
.helicopter-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; align-items: start; }
.helicopter-build { background: var(--ink-900); color: var(--sand-50); }
.helicopter-build h3 { color: var(--sand-50); margin: 10px 0 12px; }
.helicopter-build p { color: rgb(250 246 235 / .72); font-size: 14px; line-height: 1.6; }
.inquiry-kicker {
  display: inline-block; color: var(--amber-300); font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
}
.bench-note {
  margin: 18px 0; padding: 12px 14px; border-left: 2px solid var(--amber-500);
  color: rgb(250 246 235 / .76); font-size: 13px; line-height: 1.6;
  background: rgb(232 112 58 / .08);
}
.bench-note strong { color: var(--amber-300); }
.helicopter-build .text-link { color: var(--amber-300); }
.helicopter-data { min-width: 0; }
.bench-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.heli-design {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 8px;
  padding: 14px 0; border-bottom: 1px dashed rgb(13 13 17 / .14);
}
.heli-design-b { border-bottom: 0; padding-bottom: 8px; }
.heli-results {
  margin-top: 10px; padding: 12px; border-radius: 12px;
  background: rgb(91 84 214 / .07); border: 1px solid rgb(91 84 214 / .18);
  color: var(--ink-700); font-size: 13px; line-height: 1.55;
}
.heli-results p { margin: 0; }
.heli-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.heli-summary strong { color: var(--ink-900); }
.heli-bars { display: flex; gap: 8px; align-items: end; height: 76px; margin: 12px 0 4px; }
.heli-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: end; }
.heli-bar { width: min(52px, 70%); min-height: 4px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--amber-500), var(--iris-500)); }
.heli-bar-label { font-family: var(--font-mono); font-size: 9px; color: var(--ink-500); }
.heli-claim { margin-top: 14px; }
.heli-claim textarea { resize: vertical; font-family: inherit; line-height: 1.45; }

/* ---------- graphing studio ---------- */
.graph-studio {
  margin-top: 24px; padding: clamp(20px, 4vw, 34px); border-radius: 22px;
  background: var(--ink-900); color: var(--sand-50); overflow: hidden;
}
.graph-studio h3 { margin: 8px 0 10px; color: var(--sand-50); }
.graph-studio p { color: rgb(250 246 235 / .74); }
.graph-studio-head { max-width: 680px; }
.graph-studio-kicker, .graph-coach-label, .graph-checklist-label, .graph-preview-label {
  display: block; color: var(--amber-300); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.graph-type-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0 14px;
}
.graph-type-button {
  display: grid; gap: 5px; min-width: 0; padding: 13px 14px; text-align: left;
  border: 1px solid rgb(250 246 235 / .2); border-radius: 12px;
  background: rgb(250 246 235 / .06); color: var(--sand-50); cursor: pointer;
  font: inherit; transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.graph-type-button:hover { border-color: var(--amber-300); transform: translateY(-2px); }
.graph-type-button:focus-visible { outline: 2px solid var(--amber-300); outline-offset: 3px; }
.graph-type-button.is-active {
  border-color: var(--amber-300); background: rgb(232 112 58 / .2);
  box-shadow: inset 0 -2px 0 var(--amber-300);
}
.graph-type-name { font-size: 15px; font-weight: 700; }
.graph-type-use { color: rgb(250 246 235 / .6); font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; }
.graph-studio-workspace {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 14px; align-items: stretch;
}
.graph-preview-card {
  min-width: 0; padding: 16px; border-radius: 14px; background: #fffdf6; color: var(--ink-900);
}
.graph-preview-label { margin: 0 0 8px; color: var(--iris-500); font-size: 9px; }
.graph-preview { width: 100%; min-height: 220px; }
.graph-svg { display: block; width: 100%; height: auto; overflow: visible; }
.graph-svg-grid { stroke: rgb(13 13 17 / .12); stroke-width: 1; stroke-dasharray: 3 5; }
.graph-svg-axis { stroke: var(--ink-900); stroke-width: 2; }
.graph-svg-title { fill: var(--ink-900); font: 700 15px var(--font-mono); }
.graph-svg-axis-label { fill: var(--ink-700); font: 10px var(--font-mono); letter-spacing: .04em; }
.graph-svg-tick { fill: var(--ink-500); font: 10px var(--font-mono); }
.graph-svg-value { fill: var(--ink-900); font: 700 11px var(--font-mono); }
.graph-svg-bar { fill: var(--iris-500); }
.graph-svg-bar-two { fill: var(--amber-500); }
.graph-svg-bar-three { fill: var(--ink-500); }
.graph-svg-line { fill: none; stroke: var(--iris-500); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.graph-svg-point { fill: var(--amber-500); stroke: var(--ink-900); stroke-width: 2; }
.graph-coach { align-self: center; padding: 18px 8px 18px 10px; }
.graph-coach-label { margin: 0 0 9px; }
.graph-coach h4 { margin: 0 0 10px; color: var(--sand-50); font-size: clamp(20px, 2.5vw, 28px); line-height: 1.1; }
.graph-coach-copy { margin: 0; font-size: 14px; line-height: 1.6; }
.graph-coach-note {
  margin: 16px 0 0; padding: 11px 12px; border-left: 2px solid var(--amber-500);
  background: rgb(232 112 58 / .08); font-size: 12px; line-height: 1.5;
}
.graph-status { margin: 16px 0 0; color: var(--amber-300) !important; font-family: var(--font-mono); font-size: 10px !important; letter-spacing: .04em; }
.graph-checklist {
  margin-top: 14px; padding-top: 16px; border-top: 1px solid rgb(250 246 235 / .16);
}
.graph-checklist-label { margin: 0 0 10px; }
.graph-checklist ol {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: graph-check;
}
.graph-checklist li {
  display: grid; gap: 4px; padding: 11px 10px; border-radius: 10px;
  background: rgb(250 246 235 / .07); counter-increment: graph-check;
}
.graph-checklist li::before { content: counter(graph-check, decimal-leading-zero); color: var(--amber-300); font-family: var(--font-mono); font-size: 10px; }
.graph-checklist strong { color: var(--sand-50); font-size: 13px; }
.graph-checklist li span { color: rgb(250 246 235 / .62); font-size: 11px; line-height: 1.35; }
.graph-studio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.graph-studio-actions .btn { color: var(--sand-50); }
.graph-sheet-link { color: var(--amber-300); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-decoration: none; border-bottom: 1px dashed currentColor; padding-bottom: 3px; }
.graph-sheet-link:hover { color: var(--sand-50); }
.graph-sheet-link:focus-visible { outline: 2px solid var(--amber-300); outline-offset: 3px; }

@media (max-width: 1020px) {
  .helicopter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .pool-grid { grid-template-columns: 1fr 1fr; }
  .pool-grid .btn { grid-column: 1 / -1; justify-self: start; }
  .heli-design { grid-template-columns: 1fr 1fr; }
  .heli-design label:first-child { grid-column: 1 / -1; }
  .heli-summary { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .graph-studio-workspace { grid-template-columns: 1fr; }
  .graph-coach { padding: 10px 4px 4px; }
  .graph-checklist ol { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .graph-type-grid { grid-template-columns: 1fr; }
  .graph-type-button { padding: 11px 12px; }
  .graph-preview-card { padding: 10px 8px; }
  .graph-preview { min-height: 0; }
  .graph-checklist ol { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .graph-type-button { transition: none; }
  .graph-type-button:hover { transform: none; }
}
@media print {
  .graph-studio { padding: 18px; background: #fff; color: #111; border: 1px solid #111; }
  .graph-studio h3, .graph-coach h4, .graph-checklist strong { color: #111; }
  .graph-studio p, .graph-type-use, .graph-checklist li span { color: #333; }
  .graph-type-grid { grid-template-columns: repeat(3, 1fr); }
  .graph-type-button { border-color: #999; background: #fff; color: #111; }
  .graph-type-button.is-active { border-color: #111; box-shadow: none; }
  .graph-type-button:focus-visible { outline: none; }
  .graph-coach-label, .graph-checklist-label, .graph-preview-label, .graph-studio-kicker, .graph-status { color: #111 !important; }
  .graph-checklist { border-top-color: #999; }
  .graph-checklist li { background: #f4f4f4; }
  .graph-checklist li::before { color: #111; }
  .graph-coach-note { border-left-color: #111; background: #f4f4f4; }
  .graph-studio-actions .btn { color: #111; }
  .graph-sheet-link { color: #111; }
}
@media print {
  body.print-lab > *:not(#main-content) { display: none !important; }
  body.print-lab #main-content > *:not(.sm-lab) { display: none !important; }
  body.print-lab .sm-lab { display: block !important; padding: 24px 0; background: #fff; }
  body.print-lab .sm-lab .section-head { margin-bottom: 16px; }
  body.print-lab .sm-lab .lab-arena, body.print-lab .sm-lab .arena-controls,
  body.print-lab .sm-lab .lab-pool, body.print-lab .sm-lab .lab-chart { display: none !important; }
  body.print-lab .sm-lab .lab-grid { display: block; }
  body.print-lab .sm-lab .lab-table-wrap { box-shadow: none; border: 1px solid #111; }
  body.print-lab .sm-lab .lab-conclusion { margin-top: 16px; box-shadow: none; border: 1px solid #111; }
  body.print-lab .sm-lab .concl-form { display: block !important; }
}

@media (max-width: 1020px) {
  .dice-method-grid, .dice-export-grid { grid-template-columns: 1fr; }
  .dice-method { max-width: 720px; }
}
@media (max-width: 700px) {
  .dice-prediction-row { grid-template-columns: 1fr 1fr; }
  .dice-prediction-row .btn { grid-column: 1 / -1; justify-self: start; }
  .dice-face-buttons { grid-template-columns: repeat(8, minmax(28px, 1fr)); }
}
@media (max-width: 560px) {
  .dice-prediction-row { grid-template-columns: 1fr; }
  .dice-entry-row label { width: 100%; }
  .dice-entry-row .dice-reset { margin-left: 0; }
  .dice-face-buttons { grid-template-columns: repeat(5, minmax(28px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .dice-roll-chip, .dice-face-btn { transition: none; }
  .dice-face-btn:hover:not(:disabled) { transform: none; }
}
@media print {
  body.print-dice > *:not(#top) { display: none !important; }
  body.print-dice #top > *:not(.sm-dice) { display: none !important; }
  body.print-dice .sm-dice { display: block !important; padding: 24px 0; background: #fff; }
  body.print-dice .sm-dice .section-head { margin-bottom: 16px; }
  body.print-dice .sm-dice .dice-method, body.print-dice .sm-dice .dice-export,
  body.print-dice .sm-dice .dice-next { display: none !important; }
  body.print-dice .sm-dice .dice-workbench { box-shadow: none; border: 1px solid #111; }
  body.print-dice .sm-dice .dice-roll-panel { opacity: 1; }
  body.print-dice .sm-dice .dice-roll-log { max-height: none; overflow: visible; }
}
