/* SITE2 11-17 cliffnotes: lead.v1 answer and the source viewer. The dialog itself is the site's record dialog (.rdlg in
   /site.css: glass panel, blurred backdrop, html.rdlg-open scroll lock); this file adds only what the lead and the section need. */
.lead-answer{margin:0}
.lead{margin:0;max-width:62ch;font:400 clamp(1.1875rem,.6vw + 1rem,1.375rem)/1.6 var(--sans);color:var(--ink);text-wrap:pretty}
.lead-refs{white-space:nowrap}
.lead-ref{font-size:.62em;line-height:0;vertical-align:super;margin-left:.15em}
.lead-ref+.lead-ref{margin-left:.3em}
.lead-ref .source-link{display:inline-block;min-width:1.5em;padding:.15em .3em;border:1px solid var(--sig-line);border-radius:999px;background:var(--sig-soft);color:var(--sig);font:600 1em/1 var(--mono);text-align:center;text-decoration:none;cursor:pointer}
.lead-ref .source-link:hover{background:rgba(6,229,139,.2)}
.lead-gap{margin:var(--s4) 0 0;max-width:62ch;padding:var(--s2) var(--s3);border-left:2px solid var(--flag);font:400 .9375rem/1.5 var(--sans);color:var(--ink-2)}
.lead-sources-title{margin:var(--s5) 0 var(--s2);font:500 .75rem/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}
.lead-sources{margin:0;padding:0 0 0 1.6em;display:grid;gap:var(--s2);font:400 .9375rem/1.45 var(--sans);color:var(--ink-3)}
.lead-sources li::marker{font:500 .8125rem/1 var(--mono);color:var(--sig)}
.lead-sources .source-link{padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;text-decoration:underline;text-decoration-color:var(--sig-line);text-underline-offset:3px;overflow-wrap:anywhere;cursor:pointer}
.lead-sources .source-link:hover{text-decoration-color:var(--sig)}
.source-link:focus-visible{outline:2px solid var(--sig);outline-offset:2px}
.rdlg.source-viewer,.rdlg.purpose-anchor{
 width:min(720px,calc(100vw - 32px));
 height:min(640px,calc(100vh - 64px));
 height:min(640px,calc(100dvh - 64px));
 max-height:none;
}
.rdlg.source-viewer[open],.rdlg.purpose-anchor[open]{grid-template-rows:auto minmax(0,1fr)}
.rdlg.source-viewer .rdlg-body,.rdlg.purpose-anchor .rdlg-body{overflow-y:auto;overscroll-behavior:contain}
.ask-tes-app button.pa-link{
 min-height:0;padding:0;border:0;border-radius:0;background:none;
 color:var(--ink);font:inherit;text-decoration:underline;
 text-decoration-color:var(--sig-line);text-underline-offset:3px;
}
.ask-tes-app button.pa-link:hover{background:none!important;text-decoration-color:var(--sig)}
.ask-tes-app button.pa-link:focus-visible{outline:2px solid var(--sig);outline-offset:2px}
.purpose-anchor .rdlg-body{max-width:none}
.purpose-anchor section h3{margin-bottom:var(--s2);color:var(--ink)}
.purpose-anchor footer{padding-top:var(--s3);border-top:1px solid var(--line)}
.source-viewer .rdlg-state{border-color:rgba(230,180,80,.45);color:var(--flag)}
.source-viewer-body{scroll-padding:var(--s6)}
.source-section{max-width:68ch;font:400 1rem/1.7 var(--sans);color:var(--ink-2);overflow-wrap:anywhere}
.source-section>*+*,.source-section div>*+*{margin-top:var(--s3)}
.source-section h4,.source-section h5,.source-section h6{color:var(--ink);font:500 1rem/1.4 var(--sans)}
.source-section ul,.source-section ol{padding-left:1.4em}
.source-section table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:.875rem}
.source-section th,.source-section td{padding:6px 10px;border:1px solid var(--line);text-align:left;vertical-align:top}
.source-section pre{white-space:pre-wrap}
.source-section mark{background:rgba(6,229,139,.18);color:var(--ink);border-radius:3px;box-shadow:0 0 0 2px rgba(6,229,139,.18);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.source-viewer-note{margin:0 0 var(--s4);padding:var(--s2) var(--s3);border-left:2px solid var(--flag);color:var(--ink-2)}
.source-quote{margin:0}
.source-quote+.source-quote{margin-top:var(--s4)}
.source-quote figcaption{margin-bottom:var(--s2);font:500 .75rem/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}
.source-quote blockquote{margin:0;padding:var(--s3) var(--s4);border-left:2px solid var(--sig-line);background:rgba(255,255,255,.03);font:400 1.0625rem/1.6 var(--sans);color:var(--ink)}
@media (prefers-reduced-motion:reduce){.source-viewer[open]{animation:none}}

/* U23 r5: two TELOScope tabs (Verify moved out); the local-only mode switch and Tools stub */
#telescope-tabs,#mode-tabs{grid-template-columns:repeat(2,1fr)}
#mode-tabs{max-width:28rem}
/* Frame continuity (2026-11-21): the Ask TES / Tools switch sits on the title row, right-aligned to the question window,
   so the question window (or the Tools window) is the first window and lands at the shared frame spot. Markup is unchanged; app.js builds it. */
.ask-tes-app{position:relative}
#mode-tabs{position:absolute;z-index:2;margin:0;width:20rem;top:calc(var(--frame-title-top) - var(--frame-first) + var(--frame-h1) / 2);left:calc(var(--gutter) + min(76ch, 100% - 2 * var(--gutter)));transform:translate(-100%,-50%)}
/* em media queries follow the reader's default font size: with larger text the switch narrows, and when the title row
   has no room for it (about 21.5em of viewport) it drops into the page above the question window instead of covering the title. */
@media (max-width:60em){#mode-tabs{width:11rem}#mode-tabs button{padding:0 8px}}
@media (max-width:21.5em){#mode-tabs{position:static;transform:none;width:auto;margin:0 0 var(--s5)}}
.disclosure-content a{overflow-wrap:anywhere}
#ask-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s5) var(--s6);align-items:start}
#ask-panel[hidden],#tools-panel[hidden]{display:none}
.tools-panel{background:var(--bg-1);border:1px solid var(--line);border-radius:var(--r3);padding:clamp(20px,3vw,32px)}
.tools-panel h2{font:400 1.75rem/1.15 var(--serif);margin:0}
.tools-panel>p{margin:var(--s3) 0 0;color:var(--ink-2)}
.tool-requests{list-style:none;margin:var(--s4) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--s2);align-items:flex-start}
.tool-requests button{text-align:left;height:auto;line-height:1.3;padding:10px 14px}
.tool-results{margin-top:var(--s5);display:grid;gap:var(--s3)}
.tool-slot{border:1px dashed var(--line-2);border-radius:var(--r1);padding:var(--s3) var(--s4);min-height:4.5rem}
.tool-slot h3{font:500 .75rem/1 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);margin:0}
.ask-tes-app .scope-toggle{align-self:center}
