/* =============================================================================
   TTD CONTENT ATOMS — shared across every storybook (DS, social, slides, deck).
   Reusable content building blocks: lists, quotes, callouts, dividers, summary,
   FAQ, links, copy box, actionable prompt, table of contents.
   Depends on colors_and_type.css tokens. Import BOTH:
     <link rel="stylesheet" href="colors_and_type.css">
     <link rel="stylesheet" href="atoms.css">
   Build the atom once, recombine forever — these live in one place, not inline.
   ========================================================================= */

/* ---- Lists & quotes ---- */
.lq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 720px) { .lq-grid { grid-template-columns: 1fr; } }
/* Bulleted list — teal marker, no native disc */
.ttd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ttd-list > li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.6; color: var(--ttd-body); }
.ttd-list > li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ttd-teal); }
/* Numbered list — teal index */
.ttd-list-num { list-style: none; margin: 0; padding: 0; counter-reset: ttd-num; display: flex; flex-direction: column; gap: 14px; }
.ttd-list-num > li { position: relative; padding-left: 40px; font-size: 16px; line-height: 1.6; color: var(--ttd-body); counter-increment: ttd-num; }
.ttd-list-num > li::before { content: counter(ttd-num); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%; background: var(--ttd-bg-tint); color: var(--ttd-teal-active);
  font-family: var(--ttd-font-mono); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
/* Checklist — teal check glyph */
.ttd-list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ttd-list-check > li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.6; color: var(--ttd-body); }
.ttd-list-check > li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 16px; height: 9px;
  border-left: 2.5px solid var(--ttd-teal); border-bottom: 2.5px solid var(--ttd-teal); transform: rotate(-45deg); }
/* Blockquote — teal rule */
.ttd-quote { margin: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--ttd-teal); }
.ttd-quote p { font-size: 18px; line-height: 1.6; color: var(--ttd-heading); font-weight: 400; margin: 0; }
/* Pull quote — large display, media/cover use */
.ttd-pullquote { margin: 0; text-align: left; }
.ttd-pullquote .mark { font-size: 40px; line-height: 1; color: var(--ttd-teal); font-weight: 800; }
.ttd-pullquote p { font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; color: var(--ttd-heading); margin: 4px 0 14px; }
.ttd-pullquote .src { font-family: var(--ttd-font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ttd-muted); }

/* ---- Callout (editorial highlight — distinct from app .alert) ---- */
.callout { border-left: 4px solid var(--ttd-teal); background: var(--ttd-bg-tint);
  border-radius: var(--ttd-radius-md); padding: 16px 20px; }
.callout.warn { border-left-color: var(--ttd-warning); background: var(--ttd-warning-bg); }
.callout.good { border-left-color: var(--ttd-success); background: var(--ttd-success-bg); }
.callout.dark { border-left-color: var(--ttd-teal-on-dark); background: var(--ttd-dark); }
.callout__t { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ttd-teal-active); margin-bottom: 6px; }
.callout.warn .callout__t { color: var(--ttd-warning-fg); }
.callout.good .callout__t { color: var(--ttd-success-fg); }
.callout.dark .callout__t { color: var(--ttd-teal-on-dark); }
.callout p { font-size: 15px; line-height: 1.6; color: var(--ttd-body); margin: 0; }
.callout.dark p { color: var(--ttd-on-dark); }

/* ---- Dividers ---- */
.ttd-divider { border: 0; height: 1px; background: var(--ttd-border); margin: 0; }
.ttd-divider-label { display: flex; align-items: center; gap: 16px; color: var(--ttd-muted);
  font-family: var(--ttd-font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.ttd-divider-label::before, .ttd-divider-label::after { content: ""; flex: 1; height: 1px; background: var(--ttd-border); }
.ttd-divider-dot { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ttd-divider-dot::before, .ttd-divider-dot::after { content: ""; width: 60px; height: 1px; background: var(--ttd-border); }
.ttd-divider-dot span { width: 7px; height: 7px; border-radius: 50%; background: var(--ttd-teal);
  box-shadow: 0 0 0 4px var(--ttd-bg-tint); }

/* ---- Summary / TL;DR ---- */
.ttd-summary { background: var(--ttd-bg-tint); border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md);
  padding: 18px 22px; }
.ttd-summary .sm-t { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ttd-teal-active); margin-bottom: 10px; }
.ttd-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ttd-summary li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.55; color: var(--ttd-body); }
.ttd-summary li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--ttd-teal); }

/* ---- FAQ (static pairs) ---- */
.ttd-faq { display: flex; flex-direction: column; gap: 0; }
.ttd-faq .qa { padding: 16px 0; border-bottom: 1px solid var(--ttd-border-soft); }
.ttd-faq .qa:last-child { border-bottom: none; }
.ttd-faq .q { display: flex; gap: 10px; font-size: 16px; font-weight: 700; color: var(--ttd-heading); line-height: 1.45; }
.ttd-faq .q::before { content: "Q"; flex: 0 0 auto; color: var(--ttd-teal-active); font-weight: 800; }
.ttd-faq .a { margin: 8px 0 0 22px; font-size: 15px; line-height: 1.6; color: var(--ttd-body); }

/* ---- Useful links ---- */
.ttd-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ttd-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--ttd-radius-sm); text-decoration: none; color: var(--ttd-heading);
  font-size: 15px; font-weight: 600; transition: background var(--ttd-motion-micro); }
.ttd-links a:hover { background: var(--ttd-bg-tint); }
.ttd-links a .meta-s { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 600; color: var(--ttd-muted);
  text-transform: uppercase; letter-spacing: 0.04em; }
.ttd-links a .arrow { color: var(--ttd-teal); font-weight: 700; }

/* ---- Copy box (prompt / snippet, click to copy) ---- */
.ttd-copybox { border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md); overflow: hidden; background: var(--ttd-bg); }
.ttd-copybox .cb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--ttd-bg-secondary); border-bottom: 1px solid var(--ttd-border); }
.ttd-copybox .cb-lbl { display: flex; align-items: center; gap: 8px; font-family: var(--ttd-font-mono); font-size: 11px;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ttd-teal-active); }
.ttd-copybox .cb-lbl::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ttd-teal); }
.ttd-copybox .cb-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--ttd-border-strong);
  background: var(--ttd-bg); color: var(--ttd-teal-active); font-family: var(--ttd-font); font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--ttd-radius-full); transition: all var(--ttd-motion-micro); }
.ttd-copybox .cb-btn:hover { background: var(--ttd-bg-tint); border-color: var(--ttd-teal); }
.ttd-copybox .cb-btn.copied { background: var(--ttd-success-bg); color: var(--ttd-success-fg); border-color: var(--ttd-success); }
.ttd-copybox .cb-body { margin: 0; padding: 16px; font-family: var(--ttd-font-mono); font-size: 13px; line-height: 1.65;
  color: var(--ttd-heading); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.ttd-copybox.dark { border-color: var(--ttd-border-strong); }
.ttd-copybox.dark .cb-head { background: var(--ttd-dark-raised); border-bottom-color: rgba(240,240,240,0.12); }
.ttd-copybox.dark .cb-body { background: var(--ttd-dark); color: var(--ttd-on-dark); }

/* ---- Actionable prompt (the live-site "Make This Actionable" pattern) ---- */
.ttd-prompt { background: var(--ttd-prompt-bg); border: 1px solid var(--ttd-teal);
  border-radius: var(--ttd-radius-lg); padding: 26px 24px; }
.ttd-prompt h3 { margin: 0 0 10px; color: var(--ttd-teal-active); font-size: 20px; font-weight: 700; }
.ttd-prompt > p { font-size: 15px; line-height: 1.7; color: var(--ttd-body); margin: 0 0 16px; }
.ttd-prompt .pr-wrap { position: relative; }
.ttd-prompt pre { background: var(--ttd-code-bg); color: var(--ttd-code-fg); padding: 20px; padding-right: 110px; border-radius: var(--ttd-radius-md);
  font-family: var(--ttd-font-mono); font-size: 13px; line-height: 1.7; margin: 0; white-space: pre-wrap; word-break: break-word; }
.ttd-prompt .pr-btn { position: absolute; top: 12px; right: 12px; background: var(--ttd-teal); color: #fff; border: none;
  padding: 8px 16px; border-radius: var(--ttd-radius-sm); cursor: pointer; font-family: var(--ttd-font); font-size: 13px; font-weight: 600;
  transition: background var(--ttd-motion-micro); }
.ttd-prompt .pr-btn:hover { background: var(--ttd-teal-hover); }
.ttd-prompt .pr-btn.copied { background: var(--ttd-success-fg); }
.ttd-prompt .pr-note { font-size: 13px; color: var(--ttd-muted); margin: 16px 0 0; font-style: italic; }

/* ---- Table of contents ---- */
.ttd-toc { border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md); padding: 20px 24px; background: var(--ttd-bg); }
.ttd-toc .toc-t { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ttd-teal-active); margin-bottom: 14px; }
.ttd-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 10px; }
.ttd-toc li { counter-increment: toc; }
.ttd-toc a { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ttd-heading);
  font-size: 15px; font-weight: 600; transition: color var(--ttd-motion-micro); }
.ttd-toc a:hover { color: var(--ttd-teal-active); }
.ttd-toc a::before { content: counter(toc, decimal-leading-zero); flex: 0 0 auto; font-family: var(--ttd-font-mono);
  font-size: 12px; font-weight: 700; color: var(--ttd-teal); }

/* ---- Columns (2 / 3 / 4) — multi-point layout, comparison, deck/body ---- */
.ttd-cols { display: grid; gap: 16px; }
.ttd-cols.c2 { grid-template-columns: repeat(2, 1fr); }
.ttd-cols.c3 { grid-template-columns: repeat(3, 1fr); }
.ttd-cols.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .ttd-cols.c3, .ttd-cols.c4 { grid-template-columns: repeat(2, 1fr); } }
.ttd-col { border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md); padding: 20px 22px; background: var(--ttd-bg); }
.ttd-col .col-k { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ttd-teal-active); margin-bottom: 10px; }
.ttd-col h4 { font-size: 18px; font-weight: 700; color: var(--ttd-heading); line-height: 1.2; margin-bottom: 8px; }
.ttd-col p { font-size: 14px; line-height: 1.55; color: var(--ttd-body); margin: 0; }

/* ---- Accordion — expand/collapse box (interactive FAQ), CSS-only via details ---- */
.ttd-accordion { display: flex; flex-direction: column; gap: 10px; }
.ttd-accordion details { border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md);
  background: var(--ttd-bg); overflow: hidden; }
.ttd-accordion details[open] { border-color: var(--ttd-teal); }
.ttd-accordion summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none;
  padding: 16px 20px; font-size: 16px; font-weight: 700; color: var(--ttd-heading); }
.ttd-accordion summary::-webkit-details-marker { display: none; }
.ttd-accordion summary::after { content: ""; margin-left: auto; flex: 0 0 auto; width: 11px; height: 11px;
  border-right: 2.5px solid var(--ttd-teal); border-bottom: 2.5px solid var(--ttd-teal);
  transform: rotate(45deg); transition: transform var(--ttd-motion-standard); }
.ttd-accordion details[open] summary::after { transform: rotate(-135deg); }
.ttd-accordion summary .q-i { flex: 0 0 auto; color: var(--ttd-teal-active); font-weight: 800; }
.ttd-accordion .a { padding: 0 20px 18px; font-size: 15px; line-height: 1.6; color: var(--ttd-body); }

/* ---- Toggle / switch — on-off, live in HTML presentations ---- */
.ttd-toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.ttd-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ttd-toggle .track { width: 52px; height: 30px; border-radius: 999px; background: var(--ttd-border-strong);
  position: relative; transition: background var(--ttd-motion-standard); flex: 0 0 auto; }
.ttd-toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform var(--ttd-motion-standard); }
.ttd-toggle input:checked + .track { background: var(--ttd-teal); }
.ttd-toggle input:checked + .track::after { transform: translateX(22px); }
.ttd-toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--ttd-bg-tint); }
.ttd-toggle .lbl { font-size: 15px; font-weight: 600; color: var(--ttd-heading); }
/* segmented toggle (2-3 options) */
.ttd-segment { display: inline-flex; background: var(--ttd-bg-secondary); border: 1px solid var(--ttd-border);
  border-radius: var(--ttd-radius-full); padding: 3px; }
.ttd-segment label { font-size: 14px; font-weight: 600; color: var(--ttd-muted); padding: 7px 18px;
  border-radius: var(--ttd-radius-full); cursor: pointer; transition: all var(--ttd-motion-micro); }
.ttd-segment input { position: absolute; opacity: 0; width: 0; height: 0; }
.ttd-segment input:checked + label { background: var(--ttd-teal); color: #fff; }

/* ---- Dialog / speech bubble — testimonial, conversation ---- */
.ttd-dialog { position: relative; background: var(--ttd-bg-tint); border-radius: var(--ttd-radius-md);
  padding: 18px 22px; max-width: 460px; }
.ttd-dialog::after { content: ""; position: absolute; left: 30px; bottom: -10px; width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 11px solid var(--ttd-bg-tint); }
.ttd-dialog p { font-size: 16px; line-height: 1.55; color: var(--ttd-heading); margin: 0; }
.ttd-dialog.teal { background: var(--ttd-teal); } .ttd-dialog.teal::after { border-top-color: var(--ttd-teal); } .ttd-dialog.teal p { color: #fff; }
.ttd-dialog-row { display: flex; align-items: flex-end; gap: 14px; margin-top: 16px; }
.ttd-dialog-row .who { display: flex; align-items: center; gap: 10px; }
.ttd-dialog-row .av { width: 40px; height: 40px; border-radius: 50%; background: var(--ttd-teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.ttd-dialog-row .nm { font-size: 14px; font-weight: 600; color: var(--ttd-heading); }
.ttd-dialog-row .nm span { display: block; font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 400; color: var(--ttd-muted); }

/* ---- Copy box / prompt clipboard behaviour (attach once per page) ----
   Pages that use .ttd-copybox / .ttd-prompt should include this script:
   document.querySelectorAll('[data-copy]').forEach(btn=>btn.addEventListener('click',async()=>{
     const scope=btn.closest('.ttd-copybox')||btn.closest('.ttd-prompt');
     const pre=scope&&scope.querySelector('pre'); const text=pre?pre.textContent:'';
     try{await navigator.clipboard.writeText(text);}catch{ const ta=document.createElement('textarea');
       ta.value=text;ta.style.position='fixed';ta.style.opacity='0';document.body.appendChild(ta);ta.select();
       try{document.execCommand('copy');}catch{} document.body.removeChild(ta); }
     const o=btn.textContent;btn.textContent='Copied';btn.classList.add('copied');
     setTimeout(()=>{btn.textContent=o;btn.classList.remove('copied');},1600); }));
*/

/* =============================================================================
   EDITORIAL ATOMS v2 (lesson-inspired, TTD-tokenised)
   Fact vs note, caveat, source line, case study, concept equation, takeaways.
   Single-font Open Sans: italic = interpretive gloss, mono = technical label.
   ========================================================================= */

/* ---- Fact vs note (semantic split of the callout) ----
   .ttd-fact = a verified, sourced claim (success tone).
   .ttd-note = an editorial aside / caveat in the author's voice (teal tone). */
.ttd-fact, .ttd-note { border-left: 4px solid; border-radius: var(--ttd-radius-md);
  padding: 14px 18px; margin: 0; font-size: 15px; line-height: 1.6; color: var(--ttd-body); }
.ttd-fact { border-left-color: var(--ttd-success); background: var(--ttd-success-bg); }
.ttd-note { border-left-color: var(--ttd-teal); background: var(--ttd-bg-tint); }
.ttd-fact__t, .ttd-note__t { display: block; font-family: var(--ttd-font-mono); font-size: 11px;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 5px; }
.ttd-fact__t { color: var(--ttd-success-fg); }
.ttd-note__t { color: var(--ttd-teal-active); }
.ttd-fact p, .ttd-note p { margin: 0; }

/* ---- Caveat (an honest qualifier in italic muted; pairs with Zero Invention) ---- */
.ttd-caveat { font-family: var(--ttd-font); font-style: italic; font-size: 14px;
  line-height: 1.55; color: var(--ttd-muted); margin: 6px 0 0; }

/* ---- Source line (a small, mono-ish citation under a claim) ---- */
.ttd-cite { font-family: var(--ttd-font-mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--ttd-muted); margin: 4px 0 0; }
.ttd-cite a { color: var(--ttd-teal-active); text-decoration: none; border-bottom: 1px dotted var(--ttd-teal); }

/* ---- Case study (a concrete worked example in a card) ---- */
.ttd-case { background: var(--ttd-bg-elevated); border: 1px solid var(--ttd-border);
  border-radius: var(--ttd-radius-lg); padding: 18px 22px; box-shadow: var(--ttd-shadow-sm); }
.ttd-case__h { font-size: 16px; font-weight: 700; color: var(--ttd-heading); margin: 0 0 4px; }
.ttd-case__lead { font-style: italic; color: var(--ttd-body); margin: 0 0 12px; font-size: 15px; }
.ttd-case ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ttd-case li { font-size: 15px; line-height: 1.55; color: var(--ttd-body); }
.ttd-case li strong { color: var(--ttd-heading); }
.ttd-case code { font-family: var(--ttd-font-mono); font-size: 0.9em; background: var(--ttd-bg-tint);
  padding: 1px 5px; border-radius: 4px; color: var(--ttd-teal-active); }

/* ---- Concept equation (idea as A + B = C, in pills) ---- */
.ttd-eq { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 12px; margin: 0; }
.ttd-eq .pill { border: 1.5px solid var(--ttd-border-strong); background: var(--ttd-bg-elevated);
  border-radius: var(--ttd-radius-lg); padding: 12px 18px; text-align: center; min-width: 120px; }
.ttd-eq .pill b { display: block; font-family: var(--ttd-font-mono); font-size: 15px; color: var(--ttd-heading); }
.ttd-eq .pill small { display: block; font-style: italic; font-size: 12px; color: var(--ttd-muted); margin-top: 3px; }
.ttd-eq .pill.sum { border-color: var(--ttd-teal); }
.ttd-eq .pill.sum b { color: var(--ttd-teal-active); }
.ttd-eq .op { align-self: center; font-family: var(--ttd-font-mono); font-size: 22px; color: var(--ttd-muted); }

/* ---- Takeaways ("for the board": 2-3 closing anchors) ---- */
.ttd-board { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ttd-board blockquote { margin: 0; border: 1px solid var(--ttd-border); border-left: 4px solid var(--ttd-teal);
  background: var(--ttd-bg-elevated); border-radius: var(--ttd-radius-md); padding: 14px 18px;
  font-size: 16px; line-height: 1.55; color: var(--ttd-heading); }
.ttd-board .bn { display: block; font-family: var(--ttd-font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ttd-muted); margin-bottom: 6px; }

/* =============================================================================
   INTERACTIVE ATOMS (lesson-inspired, TTD-tokenised, vanilla JS)
   Quiz with per-answer feedback, and a step-through process simulator.
   Behaviour is attached by the small init script documented at the bottom.
   ========================================================================= */

/* ---- Quiz (diagnostic, per-answer feedback, locks after answering) ---- */
.ttd-quiz { display: flex; flex-direction: column; gap: 16px; }
.ttd-quiz-q { background: var(--ttd-bg-elevated); border: 1px solid var(--ttd-border);
  border-radius: var(--ttd-radius-lg); padding: 18px 20px; }
.ttd-quiz-q .scenario { font-weight: 700; color: var(--ttd-heading); margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.ttd-quiz-q label { display: block; padding: 11px 14px; margin: 8px 0; border: 1px solid var(--ttd-border);
  border-radius: var(--ttd-radius-md); cursor: pointer; font-size: 15px; color: var(--ttd-body);
  background: var(--ttd-bg); transition: border-color .15s, background .15s; }
.ttd-quiz-q label:hover { border-color: var(--ttd-teal); }
.ttd-quiz-q label input { margin-right: 9px; accent-color: var(--ttd-teal); }
.ttd-quiz-q label.correct { background: var(--ttd-success-bg); border-color: var(--ttd-success); }
.ttd-quiz-q label.wrong { background: var(--ttd-warning-bg); border-color: var(--ttd-warning); }
.ttd-quiz-q label code { font-family: var(--ttd-font-mono); font-size: 0.9em; color: var(--ttd-teal-active); }
.ttd-quiz-q .fb { display: none; margin-top: 12px; padding: 12px 15px; border-radius: var(--ttd-radius-md); font-size: 14px; line-height: 1.55; }
.ttd-quiz-q .fb.show { display: block; }
.ttd-quiz-q .fb.good { background: var(--ttd-success-bg); border-left: 4px solid var(--ttd-success); color: var(--ttd-body); }
.ttd-quiz-q .fb.poor { background: var(--ttd-warning-bg); border-left: 4px solid var(--ttd-warning); color: var(--ttd-body); }
.ttd-quiz-score { display: none; margin-top: 4px; background: var(--ttd-bg-tint); border: 1.5px solid var(--ttd-teal);
  border-radius: var(--ttd-radius-md); padding: 14px 18px; font-size: 15px; color: var(--ttd-heading); }
.ttd-quiz-score.show { display: block; }
.ttd-quiz-score strong { color: var(--ttd-teal-active); }

/* ---- Process simulator (step-through: tick / run / reset) ---- */
.ttd-sim { border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-lg); overflow: hidden;
  background: var(--ttd-bg-elevated); box-shadow: var(--ttd-shadow-sm); }
.ttd-sim-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  background: var(--ttd-bg-secondary); border-bottom: 1px solid var(--ttd-border); }
.ttd-sim-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ttd-border-strong); }
.ttd-sim-bar .dot.t { background: var(--ttd-teal); }
.ttd-sim-bar .ttl { font-family: var(--ttd-font-mono); font-size: 12px; color: var(--ttd-muted); margin-left: 6px; }
.ttd-sim-goal { font-family: var(--ttd-font-mono); font-size: 12.5px; color: var(--ttd-body); line-height: 1.7;
  padding: 12px 16px; border-bottom: 1px dashed var(--ttd-border); background: var(--ttd-bg); }
.ttd-sim-goal .a { color: var(--ttd-teal-active); font-weight: 700; }
.ttd-sim-log { font-family: var(--ttd-font-mono); font-size: 13px; line-height: 1.85; padding: 14px 16px;
  min-height: 12rem; max-height: 20rem; overflow-y: auto; background: var(--ttd-bg); }
.ttd-sim-log .l-sys { color: var(--ttd-muted); }
.ttd-sim-log .l-act { color: var(--ttd-heading); }
.ttd-sim-log .l-fail { color: var(--ttd-warning-fg); }
.ttd-sim-log .l-pass { color: var(--ttd-success-fg); }
.ttd-sim-log .l-warn { color: var(--ttd-warning-fg); }
.ttd-sim-log .l-tick { color: var(--ttd-teal-active); margin-top: 8px; display: block; font-weight: 700; }
.ttd-sim-status { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 11px 16px; border-top: 1px solid var(--ttd-border);
  background: var(--ttd-bg-secondary); font-family: var(--ttd-font-mono); font-size: 12px; color: var(--ttd-muted); }
.ttd-sim-status b { color: var(--ttd-heading); font-weight: 700; }
.ttd-sim-status .ok b { color: var(--ttd-success-fg); }
.ttd-sim-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ttd-sim-actions button { font-family: var(--ttd-font-mono); font-size: 13px; background: var(--ttd-bg);
  border: 1px solid var(--ttd-border-strong); color: var(--ttd-heading); padding: 9px 16px;
  border-radius: var(--ttd-radius-md); cursor: pointer; transition: border-color .15s, background .15s; }
.ttd-sim-actions button:hover { border-color: var(--ttd-teal); color: var(--ttd-teal-active); }
.ttd-sim-actions button.primary { background: var(--ttd-teal); border-color: var(--ttd-teal); color: #fff; }
.ttd-sim-actions button.primary:hover { background: var(--ttd-teal-hover); color: #fff; }
.ttd-sim-actions button:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Quiz + simulator init (attach once per page; both are optional) ----
   QUIZ: each .ttd-quiz-q has data-answer="b"; each option label wraps a radio;
   a .fb element carries data-good / data-poor. Score reads .ttd-quiz[data-total].
   SIM: a .ttd-sim with a <script type="application/json" class="sim-script"> array
   of steps {decide, act:[], verdict:'pass'|'fail', tests, detail, cost}, and
   data-maxturns / data-budget. Buttons: [data-sim-tick] [data-sim-run] [data-sim-reset].
   Reference init lives in the DS <script> (search "INTERACTIVE ATOMS init").
*/

/* ---- Compare (Do / Don't, two-column contrast) ----
   A reusable atom for any side-by-side contrast: good vs bad, do vs don't,
   before vs after. Content-agnostic (tone, design, process, code). The voice
   say/don't boxes are one application of this; so is any teaching contrast. */
.ttd-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .ttd-compare { grid-template-columns: 1fr; } }
.ttd-compare > .col { border-radius: var(--ttd-radius-md); padding: 22px 26px; border: 1px solid var(--ttd-border); }
.ttd-compare .col h4 { font-family: var(--ttd-font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 14px; }
.ttd-compare .col.do { background: var(--ttd-success-bg); } .ttd-compare .col.do h4 { color: var(--ttd-success-fg); }
.ttd-compare .col.dont { background: var(--ttd-error-bg); } .ttd-compare .col.dont h4 { color: var(--ttd-error-fg); }
.ttd-compare .col p { font-size: 16px; color: var(--ttd-heading); line-height: 1.5; margin: 0 0 10px; display: flex; gap: 10px; }
.ttd-compare .col p:last-child { margin-bottom: 0; }
.ttd-compare .col.do p::before { content: "\2713"; color: var(--ttd-success-fg); font-weight: 700; flex: 0 0 auto; }
.ttd-compare .col.dont p::before { content: "\2715"; color: var(--ttd-error-fg); font-weight: 700; flex: 0 0 auto; }

/* ---- Expressive type & combinations (universal: posts, slides, lessons, any media) ----
   One font (Open Sans) used expressively. Range comes from weight, italic,
   underline, caps, colour and size, never a second face. Shared so the general
   DS and the social storybook draw from one source. */
.sub-eyebrow { font-family: var(--ttd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ttd-amber); margin: 28px 0 14px; }
.ty-cell { background: var(--ttd-bg); border: 1px solid var(--ttd-border); border-radius: var(--ttd-radius-md);
  padding: 24px 28px; margin-bottom: 12px; box-shadow: var(--ttd-shadow-sm); }
.ty-cell .tk { font-family: var(--ttd-font-mono); font-size: 11px; color: var(--ttd-teal-active);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; display: flex; gap: 14px; }
.ty-cell .tk .dim { color: var(--ttd-muted); }
.ty-row { display: flex; align-items: baseline; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--ttd-border-soft); }
.ty-row:last-child { border-bottom: none; }
.ty-row .w { font-family: var(--ttd-font-mono); font-size: 11px; color: var(--ttd-muted); min-width: 120px; }
.ty-row .sample { font-size: 34px; color: var(--ttd-heading); line-height: 1.1; }
.ty-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { .ty-grid { grid-template-columns: 1fr; } }
.ty-demo { font-size: 38px; line-height: 1.15; color: var(--ttd-heading); font-weight: 700; }
.ty-demo.dark { background: var(--ttd-dark); color: #fff; border-radius: var(--ttd-radius-md); padding: 28px 30px; }
/* expressive utilities (shared with the cover/hook system) */
.x-w3 { font-weight: 300; } .x-w8 { font-weight: 800; } .x-it { font-style: italic; }
.x-caps { text-transform: uppercase; letter-spacing: .01em; }
.x-teal { color: var(--ttd-teal-active); } .x-teal-d .x-teal, .dark .x-teal { color: var(--ttd-teal-on-dark); } .x-amber { color: var(--ttd-amber); }
.x-ul { text-decoration: underline; text-decoration-color: var(--ttd-teal); text-underline-offset: 6px; text-decoration-thickness: 4px; }
.dark .x-ul { text-decoration-color: var(--ttd-teal-on-dark); }
.x-num { font-weight: 800; font-size: 72px; line-height: .9; color: var(--ttd-teal-active); letter-spacing: -.02em; }
.dark .x-num { color: var(--ttd-teal-on-dark); }
