/* "Plain words" page: readable narrative, inline term tooltips, glossary. */

/* --- inline term with tooltip --- */
.term {
  border-bottom: 1.5px dotted var(--accent);
  cursor: help; position: relative; color: var(--ink); font-weight: 500;
  outline: none;
}
.term:focus-visible { background: var(--code-bg); border-radius: 3px; }
.term .tip {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%) translateY(-8px);
  width: min(320px, 78vw); background: #322a1b; color: #ece3ce;
  font-family: system-ui, sans-serif; font-size: 13.5px; line-height: 1.5; font-weight: 400;
  padding: 11px 14px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease;
  z-index: 40; text-align: left; pointer-events: none;
}
.term .tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #2b2117;
}
.term:hover .tip, .term:focus .tip, .term:focus-within .tip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-6px);
}
.term .tip b { color: #e6b877; font-weight: 600; }

/* --- narrative blocks --- */
.plain-lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink); }
.step {
  display: flex; gap: 18px; align-items: flex-start; margin: 1.5em 0;
  padding: 18px 20px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px;
}
.step-n {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--accent);
  color: var(--bg); font-family: system-ui, sans-serif; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.step-body h3 { margin: 2px 0 6px; font-size: 1.12rem; }
.step-body p { margin: 0 0 .6em; }
.step-body p:last-child { margin-bottom: 0; }

.analogy {
  border-left: 4px solid var(--accent-soft); background: var(--code-bg);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.2em 0;
  font-size: .97rem;
}
.analogy strong { color: var(--accent); }

.takeaway {
  background: #1e2416; border: 1px solid #3e4b2f; border-radius: 12px;
  padding: 18px 22px; margin: 1.6em 0;
}
.takeaway h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--ok); }

/* --- glossary --- */
.glossary { margin: 1.2em 0; }
.glossary dt { font-weight: 600; margin-top: 14px; color: var(--accent); font-family: system-ui, sans-serif; font-size: 15px; }
.glossary dd { margin: 3px 0 0; color: var(--ink-soft); font-size: .96rem; line-height: 1.5; }

.faq dt { font-weight: 600; margin-top: 1.2em; font-size: 1.05rem; }
.faq dd { margin: .4em 0 0; color: var(--ink-soft); }
