/* Nested explanations: a quiet frame, readable text and a visible wait-to-lock cue.
   Everything is scoped; the same sheet is used by the dashboard and review page. */
.tt-term {
  display: inline; appearance: none; padding: 0; margin: 0; border: 0; border-radius: 1px;
  background: none; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; min-height: 0;
  text-align: inherit; text-transform: inherit; vertical-align: baseline; cursor: help;
  text-decoration: underline dotted rgba(144, 187, 214, .6); text-underline-offset: .23em;
  text-decoration-thickness: 1px; white-space: normal;
}
.tt-term:hover, .tt-term.tt-active { color: #b9dcf2; text-decoration-color: #b9dcf2; }
button.tt-term:hover { background: transparent; }
.tt-term:focus-visible, .tt-icon:focus-visible, .tt-help-toggle:focus-visible,
.tt-card a:focus-visible, .tt-card button:focus-visible, .tt-preferences :focus-visible {
  outline: 2px solid #bddcf1; outline-offset: 3px; border-radius: 2px;
}
.tt-layer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.tt-layer [hidden] { display: none !important; }
.tt-card {
  --tt-paper: #131b22; --tt-ink: #eee7d9; --tt-muted: #b1b7bc; --tt-gold: #b4a07a;
  position: fixed; box-sizing: border-box; display: flex; flex-direction: column; pointer-events: auto;
  width: 352px; max-width: calc(100vw - 24px); padding: 19px 21px 0; margin: 0; overflow: hidden;
  color: var(--tt-ink); background: linear-gradient(145deg, #20282c 0, var(--tt-paper) 43%, #111920 100%);
  border: 1px solid #73716a; border-radius: 4px;
  box-shadow: 0 15px 44px #0009, 0 3px 10px #0007, inset 0 0 0 3px #10161c;
  font: 400 13px/1.6 var(--font, 'Inter', system-ui, sans-serif); text-align: left;
  animation: tt-arrive 130ms ease-out;
}
.tt-card::before, .tt-card::after { content: ''; position: absolute; top: 7px; width: 12px; height: 12px; pointer-events: none; border-top: 1px solid #b4a07a88; }
.tt-card::before { left: 7px; border-left: 1px solid #b4a07a88; }
.tt-card::after { right: 7px; border-right: 1px solid #b4a07a88; }
.tt-frame { position: absolute; inset: 5px; border: 1px solid #73808b38; pointer-events: none; }
.tt-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 0 13px; flex-shrink: 0; }
.tt-category { color: #c4b392; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 5px; line-height: 1.5; }
.tt-card h2 { color: #f1e8d7; font: 400 23px/1.17 Georgia, 'Times New Roman', serif; letter-spacing: -.015em; margin: 0; overflow-wrap: anywhere; }
.tt-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; min-height: 0; padding: 5px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #aebbc6; cursor: pointer; vertical-align: middle; }
.tt-icon svg, .tt-help-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tt-icon:hover { background: #aec7dc12; color: #f1e8d7; border-color: #9fa6a93b; }
.tt-close { margin: -6px -9px 0 0; }
.tt-content { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #747568 #172029; padding: 1px 1px 4px; }
.tt-content p { margin: 0 0 12px; }
.tt-definition { color: #ece7de; font-size: 13.5px; }
.tt-content .tt-term { color: #b3d4e9; text-decoration-color: #99bfd277; cursor: help; }
.tt-content .tt-term:hover { color: #e3f3ff; }
.tt-example { background: #d4be8909; border-left: 2px solid #a9957066; padding: 9px 11px 1px; margin: 3px 0 14px; }
.tt-small-label { display: block; color: #c6b590; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; margin: 0 0 5px; }
.tt-example p { color: #d2d3cf; font-size: 12px; }
.tt-note { color: #b7c0c7; font-size: 12px; }
.tt-related { border-top: 1px solid #9dacb326; padding: 10px 0 6px; }
.tt-related .tt-term { display: inline-block; margin: 2px 12px 3px 0; font-size: 12px; }
.tt-depth-note { color: #c5b598; font-size: 11px; margin-top: 7px !important; }
.tt-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0 12px; flex-shrink: 0; }
.tt-read-more, .tt-back { color: #bcd4e3; font: 500 11px/1.5 var(--font, system-ui, sans-serif); text-decoration: none; padding: 0; border: 0; background: none; cursor: pointer; }
.tt-read-more:hover, .tt-back:hover { color: #eff6fa; text-decoration: underline; text-underline-offset: 3px; }
.tt-read-more { margin-left: auto; }
.tt-back { min-height: 0; }
.tt-footer { position: relative; display: flex; align-items: center; gap: 7px; border-top: 1px solid #9dacb330; padding: 7px 0 9px; flex-shrink: 0; }
.tt-pin { width: 25px; height: 25px; padding: 4px; }
.tt-pin svg { width: 15px; height: 15px; }
.tt-pin[aria-pressed="true"] { color: #d4bd8e; background: #ccb28010; }
.tt-status { color: #aab7c2; font-size: 10px; }
.tt-level { margin-left: auto; color: #b9aa8f; font: 10px var(--mono, ui-monospace, monospace); white-space: nowrap; }
.tt-progress { position: absolute; inset: -1px 0 auto; height: 1px; background: #d5c39b14; }
.tt-progress span { display: block; width: 100%; height: 100%; background: #cdb17d; transform-origin: left; animation: tt-unlock var(--tt-lock-ms, 900ms) linear both; }
.tt-card[data-ready="true"] .tt-progress span { animation: none; transform: scaleX(1); background: #82989d; }
.tt-card[data-ready="false"] .tt-footer-links { opacity: .45; }
.tt-trail { position: relative; display: flex; gap: 6px; align-items: center; margin: -4px 0 12px; min-height: 17px; flex-shrink: 0; overflow: hidden; color: #b8a788; }
.tt-trail button { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0; border: 0; background: none; color: #b9c8d0; font: 10px/1.6 var(--font, system-ui, sans-serif); cursor: pointer; }
.tt-trail button:hover { color: #f1e8d7; }
.tt-section-help { width: 24px; height: 24px; margin-left: 7px; vertical-align: text-bottom; }
.tt-section-help svg { width: 15px; height: 15px; }
.tt-control-help { width: 22px; height: 24px; padding: 3px; margin: 0 1px; }
.tt-control-help[hidden] { display: none !important; }
.tt-control-help svg { width: 14px; height: 14px; }
.tt-help-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 9px; border: 1px solid #84939848; border-radius: 5px; background: #acbcd608; color: #bed0db; font: 500 11px/1.5 var(--font, system-ui, sans-serif); white-space: nowrap; cursor: pointer; }
.tt-help-toggle:hover, .tt-help-toggle[aria-expanded="true"] { background: #b9cfdf10; border-color: #b9cfdf80; }
.tt-preferences { position: fixed; pointer-events: auto; width: 330px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box; padding: 19px; border: 1px solid #727e865e; border-radius: 7px; box-shadow: 0 16px 42px #0009; background: #141e29; color: #d2dce6; font: 13px/1.6 var(--font, system-ui, sans-serif); }
.tt-preferences header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tt-preferences h2 { font: 400 23px/1.2 Georgia, serif; color: #efe7d7; margin: 0; }
.tt-preferences p { margin: 0 0 15px; }
.tt-preferences label { display: block; margin: 12px 0 5px; font-size: 11px; color: #d0c1a3; }
.tt-preferences select { width: 100%; height: 37px; border: 1px solid #5c70844d; border-radius: 4px; background: #0e1722; color: #e1e7ed; padding: 5px 9px; font: inherit; }
.tt-preferences .tt-settings-note { margin: 14px 0; color: #b1bdc8; font-size: 11px; }
.tt-preferences a { color: #b6d9ee; font-size: 12px; }
.tutorial-primer { margin: 20px 0 26px; padding: 22px 24px; border: 1px solid #a4a99c45; border-radius: 6px; background: linear-gradient(110deg, #252b2e, #121e2b 78%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 32px; }
.tutorial-primer h3 { margin: 3px 0 10px; color: #f0e7d5; font: 400 25px/1.2 Georgia, serif; }
.tutorial-primer p { color: #becbd5; font-size: 13px; line-height: 1.65; }
.tutorial-primer .tt-small-label { margin-bottom: 8px; }
.tutorial-primer-demo { padding: 17px 19px; border: 1px solid #9ba6ad33; background: #080f1870; border-radius: 3px; align-self: center; }
.tutorial-primer-demo p { color: #e3e7e9; }
.tutorial-primer-demo .tt-term { color: #baddf1; }
.tutorial-primer .tutorial-primer-hint { margin-top: 9px; color: #aeb9c2; font-size: 11px; }
@keyframes tt-arrive { from { opacity: 0; translate: 0 3px; } to { opacity: 1; translate: 0 0; } }
@keyframes tt-unlock { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 779px) {
  .tt-card { padding: 18px 19px 0; max-height: calc(100dvh - 24px); }
  .tt-card h2 { font-size: 23px; }
  .tt-content { font-size: 14px; line-height: 1.7; }
  .tt-close, .tt-pin { width: 38px; height: 38px; }
  .tt-footer { padding: 4px 0 7px; }
  .tt-read-more, .tt-back { min-height: 28px; display: inline-flex; align-items: center; }
  .tt-trail { min-height: 26px; }
  .tt-trail button { font-size: 11px; min-height: 26px; }
  .tutorial-primer { grid-template-columns: minmax(0, 1fr); padding: 19px; gap: 17px; }
}
@media (max-width: 600px) {
  .header-meta .tt-help-toggle, .topbar .tt-help-toggle { width: 32px; padding: 5px; justify-content: center; }
  .header-meta .tt-help-toggle span, .topbar .tt-help-toggle span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tt-card, .tt-progress span { animation: none; }
  .tt-card[data-ready="false"] .tt-progress span { transform: scaleX(0); }
}
