/* Scoped, optional public ASK SHAI tools. No global page or navigation styles. */
.tt-tools{--tt-ink:#283449;--tt-muted:#536077;--tt-border:#a9b2c4;--tt-purple:#58408b;--tt-focus:#185d93;color:var(--tt-ink);background:#f8f9fd;border:1px solid #bac1d0;border-radius:14px;padding:clamp(14px,3vw,25px);font:400 15px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-width:0;overflow-wrap:anywhere;color-scheme:light}
.tt-tools *{box-sizing:border-box}.tt-tools [hidden]{display:none!important}.tt-tools h3,.tt-tools h4{color:var(--tt-ink);font-family:inherit;letter-spacing:-.015em;font-weight:650;line-height:1.3}.tt-tools h3{font-size:22px;margin:0 0 10px}.tt-tools h4{font-size:21px;margin:0 0 12px}.tt-tools p{margin:0 0 16px;line-height:1.65}.tt-tools .tt-intro{max-width:68ch;color:var(--tt-muted)}
.tt-tools .tt-choices,.tt-tools .tt-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0}.tt-tools button{font-family:inherit;font-size:14px;font-weight:600;line-height:1.45;letter-spacing:0;cursor:pointer;min-height:44px;max-width:100%;border-radius:8px;padding:11px 15px;white-space:normal;text-align:left;touch-action:manipulation;color:#354361;background:#fff;border:1px solid #8a98b1}.tt-tools button:hover{background:#e9edf7;border-color:#62769b}.tt-tools button[aria-expanded=true]{background:#e7e2f6;border-color:#655184;color:#3a275e}.tt-tools button.tt-primary{background:var(--tt-purple);border-color:var(--tt-purple);color:#fff}.tt-tools button.tt-primary:hover{background:#473270}.tt-tools button:disabled{opacity:.65;cursor:default}.tt-tools :is(button,input,textarea,select,math-field):focus-visible,.tt-tools math-field:focus-within{outline:3px solid var(--tt-focus);outline-offset:3px}.tt-tools h4:focus{outline:none}.tt-tools .tt-panel{border-top:1px solid #c5ccda;padding-top:21px;margin-top:20px;min-width:0}
.tt-tools .tt-field{display:flex;flex-direction:column;gap:7px;min-width:0;margin-block:14px}.tt-tools label{font-size:14px;font-weight:650;color:var(--tt-ink)}.tt-tools input,.tt-tools textarea,.tt-tools select{display:block;width:100%;min-width:0;max-width:100%;min-height:44px;padding:10px 12px;color:#233147;border:1px solid #8997b0;border-radius:7px;background:white;font:400 16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.tt-tools textarea{resize:vertical}.tt-tools input[type=number]{max-width:190px}.tt-tools .tt-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:8px 17px}.tt-tools .tt-controls .tt-field{margin-block:7px}.tt-tools .tt-note{font-size:13px;color:var(--tt-muted);line-height:1.6;margin:5px 0 13px}.tt-tools .tt-status{font-size:14px;color:#384e71;font-weight:550;margin:18px 0 0}.tt-tools .tt-status:empty{display:none}.tt-tools .tt-result{padding:15px 17px;background:#eaf0f8;border-left:4px solid #657b9d;border-radius:6px;font-size:15px;color:#293d59;margin:18px 0}.tt-tools .tt-expression{padding:12px 15px;background:#edf0f7;border-radius:6px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:14px;margin:12px 0}.tt-tools .tt-visual-math{margin-top:18px}.tt-tools math-field{display:block;background:#fff;color:#233147;width:100%;max-width:100%;min-width:0;min-height:60px;padding:10px;border:1px solid #8997b0;border-radius:8px;font-size:24px;--caret-color:#58408b;--selection-background-color:#d8cced;--selection-color:#1a273b;--contains-highlight-background-color:#e4d9f3}.tt-tools math-field::part(menu-toggle),.tt-tools math-field::part(virtual-keyboard-toggle){display:none}
.tt-tools .tt-figure{margin:22px 0 16px;min-width:0}.tt-tools .tt-plot{position:relative;width:100%;height:260px;min-width:0;overflow:hidden;border:1px solid #b8c2d4;border-radius:8px;background:#fff;touch-action:auto}.tt-tools .tt-plot svg{max-width:100%}.tt-tools .tt-figure figcaption{margin-top:10px}.tt-tools .tt-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:14px;line-height:1.5;color:var(--tt-ink);margin-block:16px}.tt-tools .tt-table caption{caption-side:top;text-align:left;font-size:15px;font-weight:650;padding-bottom:10px;color:var(--tt-ink)}.tt-tools .tt-table th,.tt-tools .tt-table td{padding:10px 8px;border-bottom:1px solid #c8d0df;text-align:left;overflow-wrap:anywhere;vertical-align:top}.tt-tools .tt-table thead th{background:#e9edf5;font-weight:650}.tt-tools .tt-table tbody th{font-weight:550}
/* MathLive mounts its shared keyboard under body. The temporary class is restored on cleanup. */
body.tt-math-keyboard-host .ML__keyboard{--keycap-width:min(56px,18vw);--keycap-height:48px;--keycap-gap:4px;--keycap-font-size:21px;--keyboard-zindex:1200}
@media(max-width:420px){.tt-tools{padding:13px;font-size:14px;border-radius:10px}.tt-tools .tt-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tt-tools .tt-choice{padding:10px;font-size:13px}.tt-tools .tt-actions{align-items:stretch;gap:8px}.tt-tools .tt-actions button{width:100%}.tt-tools .tt-plot{height:230px}.tt-tools .tt-table{font-size:12px}.tt-tools .tt-table th,.tt-tools .tt-table td{padding:8px 5px}.tt-tools .tt-result{padding:12px}.tt-tools .tt-controls{grid-template-columns:1fr}.tt-tools input[type=number]{max-width:none}}
@media(prefers-reduced-motion:reduce){.tt-tools *,.tt-tools *::before,.tt-tools *::after,body.tt-math-keyboard-host .ML__keyboard,body.tt-math-keyboard-host .ML__keyboard *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){.tt-tools button,.tt-tools input,.tt-tools textarea,.tt-tools select,.tt-tools math-field{border:1px solid ButtonText}.tt-tools button[aria-expanded=true]{outline:2px solid Highlight}.tt-tools .tt-result{border:1px solid CanvasText}.tt-tools .tt-plot{forced-color-adjust:none}}
