/* Lantern — the Vigil guide. The platform's tokens (static/css/vigil.css), light and dark; nothing external. */
:root, [data-theme="light"] {
  --bg: #F4F7FB; --surface: #FFFFFF; --surface-2: #F1F5F9; --border: #E2E8F0; --border-2: #CBD5E1;
  --text: #0F172A; --text-2: #475569; --text-3: #64748B; --accent: #3B82F6; --accent-2: #2563EB; --accent-ink: #1D4ED8;
  --accent-soft: rgba(59, 130, 246, .10); --ok: #16A34A; --warn: #B45309; --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --grid: rgba(59, 130, 246, .05); --mark-plate: #3B82F6;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A1628; --surface: #0F1E38; --surface-2: #162847; --border: rgba(255, 255, 255, .08); --border-2: rgba(255, 255, 255, .16);
  --text: #E2E9F5; --text-2: #A3B3CC; --text-3: #7A8BA6; --accent: #60A5FA; --accent-2: #3B82F6; --accent-ink: #93C5FD;
  --accent-soft: rgba(96, 165, 250, .12); --ok: #4ADE80; --warn: #FBBF24; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --grid: rgba(59, 130, 246, .045);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }                   /* panels set display: flex; `hidden` must still win */
html { scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body.lt { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 40px 40px; background-attachment: fixed; }
a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
kbd, .lt-kbd { font: 600 11px/1 ui-monospace, 'SF Mono', Menlo, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.lt-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; }
.lt-skip:focus { left: 8px; }

/* ── top bar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
.lt-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--border); }
.lt-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.lt-plate { width: 34px; height: 34px; border-radius: 10px; background: var(--mark-plate, #3B82F6); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(59, 130, 246, .7); }
.lt-plate img { width: 24px; height: 24px; animation: lt-turn 28s linear infinite; }
@keyframes lt-turn { to { transform: rotate(360deg); } }
.lt-word b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.lt-word small { display: block; font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
.lt-search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; }
.lt-search > svg { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.lt-search input { width: 100%; height: 40px; padding: 0 44px 0 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; }
.lt-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.lt-search > kbd { position: absolute; right: 10px; pointer-events: none; }
.lt-results { position: absolute; top: 46px; left: 0; right: 0; max-height: min(70vh, 560px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.lt-results a { display: block; padding: 9px 11px; border-radius: 10px; color: var(--text); text-decoration: none; }
.lt-results a.on, .lt-results a:hover { background: var(--accent-soft); }
.lt-results a b { display: block; font-size: 14px; font-weight: 650; } .lt-results a small { display: block; font-size: 11.5px; color: var(--text-3); }
.lt-results a span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-results mark { background: rgba(250, 204, 21, .35); color: inherit; border-radius: 3px; padding: 0 1px; }
.lt-results .none { padding: 12px; font-size: 13px; color: var(--text-3); }
.lt-results .none button { border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 650; cursor: pointer; padding: 0; }
.lt-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lt-ask-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; font: 650 13.5px/1 inherit; box-shadow: 0 6px 18px -8px rgba(59, 130, 246, .8); }
.lt-ask-btn:hover { filter: brightness(1.06); }
.lt-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.lt-icon:hover { color: var(--text); border-color: var(--border-2); }
[data-theme="light"] #lt-theme .sun, [data-theme="dark"] #lt-theme .moon { display: none; }
.lt-open { height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border-2); color: var(--text); font-size: 13.5px; font-weight: 650; text-decoration: none !important; }
.lt-open:hover { background: var(--surface-2); }
.lt-link { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 0 6px; }
.lt-burger { display: none; width: 38px; height: 38px; border: 0; background: none; color: var(--text); border-radius: 10px; cursor: pointer; place-items: center; }

/* ── shell ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.lt-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.lt-nav { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 18px 14px 40px 18px; border-right: 1px solid var(--border); scrollbar-width: thin; }
.lt-nav-home { display: block; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--text); margin-bottom: 10px; }
.lt-part { margin-bottom: 16px; }
.lt-part h4 { margin: 0 0 4px; padding: 0 10px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lt-ch { display: block; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); line-height: 1.35; }
.lt-ch:hover, .lt-nav-home:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.lt-ch.on, .lt-nav-home.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.lt-secs { margin: 2px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--border); }
.lt-secs a { display: block; padding: 4px 8px; font-size: 12.5px; color: var(--text-3); border-radius: 7px; line-height: 1.35; }
.lt-secs a.on { color: var(--accent-ink); background: var(--accent-soft); }
.lt-nav-foot { margin-top: 18px; padding: 0 10px; font-size: 12px; color: var(--text-3); }
.lt-main { min-width: 0; padding: 34px 40px 80px; outline: none; }
.lt-scrim { position: fixed; inset: 64px 0 0; background: rgba(2, 6, 23, .45); z-index: 30; }

/* ── home ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
.lt-hero { max-width: 900px; padding: 30px 0 18px; }
.lt-eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.lt-hero h1 { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.04; letter-spacing: -.035em; font-weight: 820; }
.lt-lede { font-size: 17px; color: var(--text-2); max-width: 680px; margin: 14px 0 0; }
.lt-hero-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lt-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff !important; font: 650 14px/1 inherit; text-decoration: none !important; box-shadow: 0 8px 22px -10px rgba(59, 130, 246, .85); }
.lt-btn:hover { filter: brightness(1.06); }
.lt-btn kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; }
.lt-btn.ghost { background: var(--surface); color: var(--text) !important; border-color: var(--border-2); box-shadow: none; }
.lt-btn.small { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; margin-left: auto; box-shadow: none; }
.lt-btn.small svg { width: 14px; height: 14px; }
.lt-block { max-width: 1040px; margin-top: 42px; }
.lt-block > h2 { font-size: 20px; letter-spacing: -.015em; margin: 0 0 14px; }
.lt-goals { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-goal { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 8px 14px; font: 600 13.5px/1.2 inherit; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.lt-goal:hover { border-color: var(--border-2); color: var(--text); }
.lt-goal.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.lt-goal-card { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.lt-goal-card > div { flex: 1; } .lt-goal-card h3 { margin: 4px 0 2px; font-size: 18px; } .lt-goal-card p { margin: 0; color: var(--text-2); }
.lt-tag { display: inline-block; font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.lt-cards { display: grid; gap: 12px; } .lt-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lt-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.lt-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.lt-card b { font-size: 16px; } .lt-card span:last-child { font-size: 13.5px; color: var(--text-2); }
.lt-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); }
.lt-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lt-partcard { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.lt-partcard h3 { margin: 0 0 8px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lt-partcard ul { margin: 0; padding: 0; list-style: none; } .lt-partcard li { padding: 3px 0; font-size: 14px; }
.lt-tasklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.lt-tasklist a { display: block; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; }
.lt-tasklist a:hover { border-color: var(--accent); }
.lt-tasklist b { display: block; font-size: 14px; font-weight: 650; } .lt-tasklist span { display: block; font-size: 12px; color: var(--text-3); }
.lt-foot { max-width: 1040px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.lt-small { font-size: 12px; }

/* ── chapter ───────────────────────────────────────────────────────────────────────────────────────────────────── */
.lt-page { display: grid; grid-template-columns: minmax(0, 780px) 220px; gap: 48px; justify-content: start; }
.lt-head h1 { margin: 6px 0 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.lt-crumb { margin: 0; font-size: 12.5px; color: var(--text-3); } .lt-crumb span { margin: 0 6px; opacity: .6; }
.lt-sec { padding-top: 26px; margin-top: 18px; border-top: 1px solid var(--border); }
.lt-sec:first-of-type { border-top: 0; margin-top: 8px; }
.lt-sec h2 { position: relative; margin: 0 0 12px; font-size: 22px; letter-spacing: -.02em; line-height: 1.25; }
.lt-anchor { position: absolute; left: -22px; color: var(--text-3); opacity: 0; font-weight: 500; text-decoration: none !important; transition: opacity .15s; }
.lt-sec h2:hover .lt-anchor, .lt-anchor:focus { opacity: 1; }
.lt-prose { font-size: 15.5px; color: var(--text); }
.lt-prose p { margin: 0 0 12px; } .lt-prose ul, .lt-prose ol { margin: 0 0 12px; padding-left: 22px; } .lt-prose li { margin: 4px 0; }
.lt-prose strong { font-weight: 680; } .lt-prose em { color: var(--text-2); }
.lt-prose code { font: 13px ui-monospace, 'SF Mono', Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 6px; }
abbr.lt-term { text-decoration: underline dotted var(--text-3); text-underline-offset: 3px; cursor: help; position: relative; }
abbr.lt-term:hover::after, abbr.lt-term:focus::after { content: attr(data-def); position: absolute; left: 0; top: 1.7em; z-index: 20; width: min(320px, 80vw); padding: 9px 12px;
  border-radius: 11px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13px; line-height: 1.5; font-weight: 400; font-style: normal; white-space: normal; }
.lt-invigil { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.lt-invigil-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .lt-invigil-h b { font-size: 15px; }
.lt-invigil p { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }
.lt-invigil details { margin-top: 8px; font-size: 13.5px; } .lt-invigil summary { cursor: pointer; font-weight: 650; color: var(--accent-ink); }
.lt-invigil ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); }
.lt-fig { margin: 18px 0; }
.lt-zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; box-shadow: var(--shadow); }
.lt-zoom img { display: block; width: 100%; height: auto; }
.lt-fig.phone .lt-zoom { max-width: 320px; }
.lt-fig figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.lt-fig figcaption small { color: var(--text-3); white-space: nowrap; }
.lt-callouts { margin: 10px 0 0; padding-left: 0; list-style: none; counter-reset: none; display: grid; gap: 6px; }
.lt-callouts li { position: relative; padding-left: 32px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.lt-callouts li::before { content: attr(value); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: #3B82F6; color: #fff; font-size: 11.5px; font-weight: 750; display: grid; place-items: center; }
.lt-callouts li b { color: var(--text); font-weight: 650; }
.lt-gif { margin: 18px 0; }
.lt-play { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 130px; border-radius: 14px; border: 1px dashed var(--border-2); background: var(--surface); color: var(--text-2); font: 650 14px inherit; cursor: pointer; }
.lt-play:hover { border-color: var(--accent); color: var(--accent-ink); }
.lt-play svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.lt-gif img { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.lt-gif figcaption { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.lt-task { margin: 16px 0; padding: 14px 16px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.lt-task-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .lt-task-h b { font-size: 15px; }
.lt-progress { margin-left: auto; font-size: 12px; color: var(--text-3); }
.lt-progress.done { color: var(--ok); font-weight: 650; }
.lt-reset { border: 0; background: none; color: var(--accent-ink); font: 600 12px inherit; cursor: pointer; padding: 0; }
.lt-task ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.lt-task li { counter-increment: step; }
.lt-task label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--border); cursor: pointer; font-size: 14.5px; }
.lt-task li:first-child label { border-top: 0; }
.lt-task label::before { content: counter(step); flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-2); font-size: 11.5px; font-weight: 750; display: grid; place-items: center; margin-top: 1px; }
.lt-task input { position: absolute; opacity: 0; pointer-events: none; }
.lt-task input:checked + span { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.lt-task label:has(input:checked)::before { content: '✓'; background: var(--ok); border-color: var(--ok); color: #fff; }
.lt-task label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.lt-tip { margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.lt-tip b { color: var(--accent-ink); margin-right: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.lt-tw { overflow-x: auto; margin: 12px 0; }
.lt-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lt-table th, .lt-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.lt-table th { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.lt-table tr:last-child td { border-bottom: 0; } .lt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lt-keys td:first-child { width: 42%; white-space: nowrap; } .lt-keys tr.hit td { background: var(--accent-soft); } .lt-keys tr.hit .lt-kbd { border-color: var(--accent); color: var(--accent-ink); }
.lt-keytest { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--border-2); font-size: 13px; color: var(--text-3); }
.lt-keytest b { font: 700 14px ui-monospace, Menlo, monospace; color: var(--text); min-width: 40px; }
.lt-note { font-size: 13px; color: var(--text-3); }
.lt-filter { width: 100%; max-width: 420px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; margin: 6px 0 12px; }
.lt-gloss { margin: 0; display: grid; gap: 8px; }
.lt-gterm { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.lt-gterm dt { font-weight: 700; font-size: 14.5px; } .lt-gterm dd { margin: 3px 0 0; font-size: 14px; color: var(--text-2); }
.lt-gterm:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lt-faq details { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 0 14px; margin: 8px 0; }
.lt-faq summary { cursor: pointer; padding: 12px 0; font-weight: 650; font-size: 14.5px; list-style-position: outside; }
.lt-faq details[open] summary { border-bottom: 1px dashed var(--border); margin-bottom: 10px; }
.lt-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.lt-pn a { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; }
.lt-pn a:hover { border-color: var(--accent); } .lt-pn .next { text-align: right; grid-column: 2; }
.lt-pn small { display: block; font-size: 12px; color: var(--text-3); } .lt-pn b { font-size: 15px; }
.lt-asknudge { margin-top: 22px; font-size: 14px; color: var(--text-3); }
.lt-asknudge button, [data-open-ask]:not(.lt-btn) { border: 0; background: none; padding: 0; color: var(--accent-ink); font: inherit; font-weight: 650; cursor: pointer; }
.lt-toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-left: 14px; border-left: 1px solid var(--border); }
.lt-toc h4 { margin: 0 0 8px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lt-toc a { display: block; padding: 4px 0; font-size: 13px; color: var(--text-3); line-height: 1.35; }
.lt-toc a.on { color: var(--accent-ink); font-weight: 650; }
.lt-lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .86); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lt-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lt-lightbox button { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 30px; cursor: pointer; }

/* ── Ask Lantern ───────────────────────────────────────────────────────────────────────────────────────────────── */
.lt-chat { position: fixed; z-index: 60; top: 76px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(2, 6, 23, .45); overflow: hidden; }
.lt-chat:not([hidden]) { animation: lt-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes lt-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.lt-chat > header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); }
.lt-chat > header div { flex: 1; } .lt-chat > header b { display: block; font-size: 15px; } .lt-chat > header small { display: block; font-size: 12px; color: var(--text-3); }
.lt-chat > header .lt-icon { width: 34px; height: 34px; }
.lt-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.lt-chat-hello p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.lt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-chips button { text-align: left; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: 7px 11px; font: 13px/1.35 inherit; cursor: pointer; }
.lt-chips button:hover { border-color: var(--accent); }
.lt-msg { font-size: 14.5px; line-height: 1.55; }
.lt-msg.me { align-self: flex-end; max-width: 85%; background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; padding: 9px 13px; border-radius: 16px 16px 4px 16px; }
.lt-msg.ai { color: var(--text); }
.lt-msg.ai p { margin: 0 0 8px; } .lt-msg.ai ol, .lt-msg.ai ul { margin: 0 0 8px; padding-left: 20px; }
.lt-msg.ai.pending .lt-a:empty::after, .lt-msg.ai.pending .lt-a > :last-child::after { content: ''; display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: lt-blink 1s steps(2) infinite; }
@keyframes lt-blink { 50% { opacity: 0; } }
.lt-cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 750; text-decoration: none !important; vertical-align: 1px; }
.lt-srcs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.lt-srcs a { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--text-2); padding: 5px 8px; border-radius: 9px; background: var(--surface-2); text-decoration: none !important; }
.lt-srcs a:hover { color: var(--text); } .lt-srcs a i { font-style: normal; font-weight: 750; color: var(--accent-ink); }
.lt-srcs a small { color: var(--text-3); margin-left: auto; white-space: nowrap; }
.lt-msg .err { color: var(--warn); font-size: 13.5px; }
.lt-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); }
.lt-chat-form textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; line-height: 1.4; }
.lt-chat-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lt-chat-form button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lt-chat-form button:disabled { opacity: .5; cursor: default; }
.lt-chat-note { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: var(--text-3); }

/* ── narrower ──────────────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1180px) { .lt-page { grid-template-columns: minmax(0, 780px); } .lt-toc { display: none; } }
@media (max-width: 960px) {
  .lt-shell { grid-template-columns: minmax(0, 1fr); }
  .lt-burger { display: grid; }
  .lt-nav { position: fixed; z-index: 35; top: 64px; left: 0; bottom: 0; width: min(300px, 86vw); height: auto; background: var(--surface); transform: translateX(-102%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow); }
  body.nav-open .lt-nav { transform: none; }
  .lt-main { padding: 26px 20px 70px; }
  .lt-cards.three { grid-template-columns: minmax(0, 1fr); }
  .lt-word small, .lt-link { display: none; }
}
@media (max-width: 720px) {
  .lt-top { gap: 8px; padding: 0 10px; }
  .lt-search { position: static; max-width: none; }
  .lt-search input { padding-right: 12px; } .lt-search > kbd { display: none; } .lt-search > svg { left: auto; margin-left: 12px; position: relative; margin-right: -30px; }
  .lt-results { position: fixed; top: 64px; left: 8px; right: 8px; }
  .lt-word { display: none; }
  .lt-ask-btn span { display: none; } .lt-ask-btn { width: 38px; padding: 0; justify-content: center; }
  .lt-open { padding: 0 10px; font-size: 13px; }
  .lt-chat { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border: 0; }
  .lt-goal-card { flex-direction: column; align-items: flex-start; }
  .lt-pn { grid-template-columns: 1fr; } .lt-pn .next { grid-column: 1; }
  .lt-anchor { display: none; }
  .lt-fig figcaption { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .lt-plate img, .lt-chat, .lt-msg.ai.pending .lt-a::after { animation: none !important; } .lt-card, .lt-nav { transition: none; } }
