:root { color-scheme: dark; --ink: #dbe9ff; --dim: #7f93bd; --line: rgba(150, 200, 255, .22); }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050d24; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#vignette { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 45%, rgba(1,4,14,.55) 100%); }
#callouts { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; overflow: visible; }
#callouts text { font-family: inherit; }
#callouts .cl-name { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
#callouts .cl-job { font-size: 10.5px; fill: #9fb3da; }

#hud { position: fixed; top: 14px; left: 18px; z-index: 10; text-shadow: 0 1px 8px #000; }
#hud .title { font-size: 16px; font-weight: 600; letter-spacing: .04em; color: #fff; }
#hud .sub { font-size: 11px; color: var(--dim); margin-top: 3px; }
#hud .ctrl { margin-top: 10px; display: flex; gap: 6px; }
#hud button { font: 600 11px/1 inherit; font-family: inherit; color: #b9cdf3; background: rgba(12, 26, 60, .55);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
#hud button.on { color: #04122e; background: #7fd8ff; border-color: #7fd8ff; }

#askBar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  width: min(680px, calc(100vw - 24px)); }
#askForm { display: flex; gap: 6px; background: rgba(6, 16, 44, .78); border: 1px solid rgba(127, 216, 255, .28);
  border-radius: 12px; padding: 5px; backdrop-filter: blur(8px); box-shadow: 0 0 28px rgba(60, 150, 255, .12); }
#askInput { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 15px; padding: 9px 10px; }
#askInput::placeholder { color: #6f82ad; }
#askForm button { background: #7fd8ff; color: #04122e; border: 0; border-radius: 9px; font-weight: 600; font-size: 14px; padding: 0 16px; cursor: pointer; }
#askChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
#askChips button { background: rgba(127, 216, 255, .07); color: #a9c6f5; border: 1px solid rgba(127, 216, 255, .22);
  border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
#askChips button:hover { background: rgba(127, 216, 255, .18); color: #fff; }
.credit { text-align: center; color: #4f6290; font-size: 10px; margin-top: 7px; }

#answer { position: fixed; z-index: 15; right: 18px; top: 16px; width: 280px; max-height: calc(100vh - 190px);
  overflow-y: auto; display: none; flex-direction: column; gap: 6px; }
#answer.show { display: flex; }
#answer .lead { font-size: 12px; color: var(--dim); padding: 0 2px; }
#answer .hit { background: rgba(6, 14, 38, .72); border: 1px solid rgba(127, 216, 255, .14);
  border-radius: 8px; padding: 7px 9px; font-size: 12px; line-height: 1.4; color: #cfdcf5; cursor: pointer; backdrop-filter: blur(6px); }
#answer .hit b { display: block; color: #fff; font-size: 12.5px; font-weight: 600; margin-bottom: 1px; }
#answer .hit i { display: block; font-style: normal; font-size: 10.5px; color: var(--c, #7fd8ff); margin-bottom: 3px; }
#answer .hit span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #9fb0d2; }

#answer .logbk-block { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
#answer .logbk-status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); padding: 2px; }
#answer .logbk-spin { width: 11px; height: 11px; border-radius: 50%; flex: none;
  border: 2px solid rgba(127, 216, 255, .25); border-top-color: #7fd8ff; animation: logbk-spin .8s linear infinite; }
@keyframes logbk-spin { to { transform: rotate(360deg); } }
#answer .logbk-error { font-size: 12px; color: #f2a93b; background: rgba(242, 169, 59, .08);
  border: 1px solid rgba(242, 169, 59, .25); border-radius: 8px; padding: 7px 9px; }
#answer .logbk-answer { background: rgba(6, 14, 38, .78); border: 1px solid rgba(127, 216, 255, .22);
  border-radius: 10px; padding: 9px 11px; backdrop-filter: blur(6px); }
#answer .logbk-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7fd8ff; margin-bottom: 5px; }
#answer .logbk-text { font-size: 12.5px; line-height: 1.55; color: #e3ecfb; }
#answer .logbk-text p { margin: 0 0 8px; }
#answer .logbk-text p:last-child, #answer .logbk-text ul:last-child { margin-bottom: 0; }
#answer .logbk-text b { color: #fff; }
#answer .logbk-text .logbk-h { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #9fb3da; margin: 10px 0 6px; }
#answer .logbk-text .logbk-h:first-child { margin-top: 0; }
#answer .logbk-text ul { margin: 0 0 8px; padding-left: 16px; }
#answer .logbk-text li { margin-bottom: 4px; }
#answer .logbk-meta { font-size: 10.5px; color: var(--dim); margin-top: 7px; }
#answer .logbk-cites-h { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 2px 0 1px; }
#answer .logbk-cite { background: rgba(6, 14, 38, .6); border: 1px solid rgba(127, 216, 255, .12);
  border-radius: 8px; padding: 6px 9px; font-size: 11.5px; line-height: 1.4; color: #cfdcf5; margin-top: 5px; cursor: default; }
#answer .logbk-cite.used { }
#answer .logbk-cite.nomatch { cursor: default; opacity: .72; }
#answer .logbk-cite:not(.nomatch) { cursor: pointer; }
#answer .logbk-cite b { display: block; color: #fff; font-size: 12px; font-weight: 600; }
#answer .logbk-cite-meta { display: block; color: #9fb0d2; font-size: 10px; margin-top: 1px; }

#card { position: fixed; z-index: 25; right: 18px; top: 16px; width: 320px; max-height: calc(100vh - 200px); overflow-y: auto;
  display: none; background: rgba(6, 14, 40, .9); border: 1px solid rgba(127, 216, 255, .25);
  border-radius: 10px; padding: 14px 16px; backdrop-filter: blur(10px); box-sizing: border-box; }
#card.show { display: block; }
#card h2 { margin: 4px 26px 4px 0; font-size: 16px; color: #fff; word-break: break-word; }
#card .c-region { font-size: 11px; color: var(--c, #7fd8ff); letter-spacing: .03em; }
#card .c-folder { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
#card p { font-size: 13px; line-height: 1.5; color: #cad6ee; white-space: pre-wrap; word-break: break-word; }
#cardClose { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #9fb3da; font-size: 20px; cursor: pointer; }

#loading { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: #050d24; color: var(--dim); font-size: 14px; transition: opacity .6s; }
#loading.hide { opacity: 0; pointer-events: none; }

@media (max-width: 699px) {
  #hud { top: 10px; left: 12px; }
  #hud .title { font-size: 15px; }
  #askBar { bottom: 10px; }
  #askChips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; }
  #askChips::-webkit-scrollbar { display: none; }
  #answer { left: 12px; right: 12px; width: auto; top: auto; bottom: 132px; max-height: 27vh; }
  #card { left: 12px; right: 12px; width: auto; top: auto; bottom: 140px; max-height: 40vh; }
  #callouts .cl-name { font-size: 10.5px; }
  #callouts .cl-job { font-size: 9px; }
}


html, body { background: #000; }
#tuneLink { font: 600 11px/1 system-ui, sans-serif; color: #9fb3da; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; background: rgba(12,26,60,.55); }
#tuneLink:hover { color: #fff; }
#loading { background: #000; }
body.clean #hud, body.clean #askBar, body.clean #answer, body.clean #card, body.clean #callouts { display: none !important; }
.logbk-retry { margin-top: 8px; font: 600 12px system-ui, sans-serif; color: #04122e; background: #7fd8ff; border: 0; border-radius: 8px; padding: 6px 14px; cursor: pointer; }


#dev { margin-top: 8px; }
#dev summary { list-style: none; cursor: pointer; width: 26px; height: 20px; line-height: 16px; text-align: center; color: #7f93bd;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: rgba(12,26,60,.45); }
#dev summary::-webkit-details-marker { display: none; }
#dev .devmenu { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; align-items: flex-start; }
#dev .devmenu button, #dev .devmenu a { font: 600 11px/1 system-ui, sans-serif; color: #b9cdf3; background: rgba(12,26,60,.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 11px; cursor: pointer; text-decoration: none; }
#answer { width: 380px; right: 20px; top: 18px; max-height: calc(100vh - 170px); gap: 10px; padding-right: 4px; }
#answer .qhead { background: rgba(6,14,38,.78); border: 1px solid rgba(127,216,255,.25); border-radius: 12px; padding: 10px 13px; }
#answer .qlabel { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7f93bd; }
#answer .qtext { font-size: 16px; font-weight: 600; color: #fff; margin-top: 3px; line-height: 1.35; }
#answer .sec-h { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7f93bd; margin: 4px 2px 6px; }
#answer .hits, #answer .src-list { display: flex; flex-direction: column; gap: 8px; }
#answer .src { background: rgba(6,14,38,.74); border: 1px solid rgba(127,216,255,.14);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; backdrop-filter: blur(6px); transition: opacity .3s, border-color .2s; }
#answer .src:hover { border-color: rgba(255,255,255,.45); }
#answer .src.dimmed { opacity: .55; }
#answer .src.cited, #answer .src.used { box-shadow: 0 0 0 1px rgba(255,217,111,.45) inset; }
#answer .src.flash { animation: srcflash 1.2s ease-out; }
@keyframes srcflash { 0% { box-shadow: 0 0 0 2px #fff inset; } 100% { box-shadow: 0 0 0 0 transparent inset; } }
#answer .src-title { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.3; }
#answer .src-pass { font-size: 12.5px; line-height: 1.5; color: #c7d4ee; margin-top: 5px; }
#answer .src-why { font-size: 11px; color: var(--c, #7fd8ff); margin-top: 6px; }
#answer .src-meta { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: #7f93bd; margin-top: 6px; }
#answer .src-type { border: 1px solid rgba(127,216,255,.3); border-radius: 999px; padding: 1px 7px; color: #a9c6f5; }
#answer .src-type.ai { border-color: rgba(233,98,216,.45); color: #f0a6e6; }
#answer .src-open { margin-left: auto; font: 600 11px system-ui, sans-serif; color: #04122e; background: #7fd8ff; border: 0; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
#answer .src.nomatch { cursor: default; opacity: .6; }
#answer .logbk-text .cite-ref { color: #ffd96f; cursor: pointer; font-weight: 600; font-size: 11px; margin-left: 1px; }
#answer .logbk-text .cite-ref:hover { text-decoration: underline; }
#answer .logbk-text { font-size: 13px; }
#callouts .cl-head { font-size: 10px; font-weight: 600; letter-spacing: .1em; fill: #7f93bd; }
#callouts .cl-name { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
#callouts .cl-name.hl { font-size: 15px; }
#card { right: 412px; width: 360px; top: 18px; }
@media (max-width: 699px) {
  #answer { width: auto; left: 10px; right: 10px; top: auto; bottom: 128px; max-height: 34vh; }
  #answer .qtext { font-size: 14px; }
  #card { left: 10px; right: 10px; width: auto; }
  #callouts .cl-name { font-size: 11.5px; } #callouts .cl-job { font-size: 9.5px; } #callouts .cl-head { font-size: 9px; }
}
#answer .logbk-text code { font: 11.5px ui-monospace, monospace; background: rgba(127,216,255,.1); border-radius: 4px; padding: 0 3px; color: #cfe9ff; }


#hud { top: calc(14px + env(safe-area-inset-top)); left: calc(18px + env(safe-area-inset-left)); }
#regionChips { display: none; position: fixed; z-index: 12; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 92px);
  padding: 0 calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left)); gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
#regionChips::-webkit-scrollbar { display: none; }
#regionChips.show { display: flex; }
#regionChips .rc-head { align-self: center; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7f93bd; padding-right: 2px; }
#regionChips .rc { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12.5px;
  color: #dfe8ff; background: rgba(6,14,38,.8); border: 1px solid rgba(127,216,255,.25); backdrop-filter: blur(6px); flex: none; }
#regionChips .rc i { width: 8px; height: 8px; border-radius: 50%; background: #7fd8ff; flex: none; }
#regionChips .rc span { color: #9fb3da; }
.sheet-handle { display: none; }
body.compact #askChips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; }
body.compact #askChips::-webkit-scrollbar { display: none; }
body.compact #askChips button { min-height: 40px; flex: none; }
body.compact #askForm button { min-height: 44px; }
body.compact #askInput { min-height: 34px; }
body.compact #dev summary { width: 44px; height: 32px; line-height: 28px; }
body.compact #dev .devmenu button, body.compact #dev .devmenu a { min-height: 40px; display: inline-flex; align-items: center; }
body.compact .src-open { min-height: 36px; padding: 0 14px !important; }
body.compact #hud .sub { display: none; }
body.compact #regionChips { top: calc(env(safe-area-inset-top) + 64px); }

body.sheet #askBar { left: 0; right: 0; transform: none; width: auto; bottom: 0; padding: 8px calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(0,0,0,.92) 70%, rgba(0,0,0,0)); }
body.sheet #answer { left: 0; right: 0; width: auto; top: 45vh; bottom: calc(var(--askh, 116px)); max-height: none; padding: 0 12px 12px;
  background: rgba(4,9,24,.94); border-top: 1px solid rgba(127,216,255,.25); border-radius: 18px 18px 0 0; backdrop-filter: blur(10px);
  transition: top .25s ease; box-sizing: border-box; }
body.sheet #answer.collapsed { top: calc(100vh - var(--askh, 116px) - 92px); overflow: hidden; }
body.sheet .sheet-handle { display: flex; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 2; width: 100%; min-height: 44px;
  background: rgba(4,9,24,.97); border: 0; cursor: grab; margin: 0 0 4px; touch-action: none; }
body.sheet .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: rgba(200,220,255,.45); }
body.sheet #answer .qtext { font-size: 15px; }

body.compact #card { inset: 0; width: auto; max-height: none; border-radius: 0; border: 0; z-index: 60;
  padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left)); }
body.compact #cardClose { width: 48px; height: 48px; font-size: 28px; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right));
  background: rgba(127,216,255,.12); border-radius: 50%; }
body.compact #card h2 { margin-right: 60px; font-size: 18px; }
body.compact #card p { font-size: 15px; }

body.compact:not(.sheet) #answer { top: calc(8px + env(safe-area-inset-top)); bottom: calc(8px + env(safe-area-inset-bottom)); max-height: none; right: calc(10px + env(safe-area-inset-right)); width: 360px; left: auto; }
body.compact:not(.sheet) #askBar { left: calc(10px + env(safe-area-inset-left)); transform: none; width: calc(100vw - 400px); bottom: calc(6px + env(safe-area-inset-bottom)); }
body.compact:not(.sheet) .credit { display: none; }
body.compact:not(.sheet) #regionChips { right: calc(var(--a32-rightw) + 16px); }

body.compact:not(.sheet) #askInput { padding: 6px 10px; font-size: 14px; }
body.compact:not(.sheet) #askChips { margin-top: 5px; }
body.compact:not(.sheet) #askChips button { min-height: 36px; }
body.compact:not(.sheet) #hud .title { font-size: 13px; }
body.compact:not(.sheet) #regionChips { left: 16px; }
body.compact:not(.sheet) #regionChips .rc { min-height: 30px; }


#bloomCtl{position:fixed;left:18px;bottom:calc(var(--askh, 116px) + 14px);z-index:18;
  display:inline-flex;align-items:center;gap:7px;padding:4px 10px 4px 8px;
  border:1px solid rgba(160,205,255,.22);border-radius:999px;background:rgba(8,18,42,.5);
  backdrop-filter:blur(6px);cursor:pointer;user-select:none;text-shadow:0 1px 8px #000}
#bloomCtl .bl-ico{font-size:12px;line-height:1;opacity:.85;filter:saturate(1.4)}
#bloomVal{font-size:10px;letter-spacing:.04em;opacity:.72;min-width:26px;text-align:right;
  color:#b9cdf3;font-variant-numeric:tabular-nums}
#bloomRange{-webkit-appearance:none;appearance:none;width:84px;height:3px;border-radius:2px;
  background:linear-gradient(90deg,rgba(85,202,219,.25),rgba(168,207,236,.85));outline:none}
#bloomRange::-webkit-slider-thumb{-webkit-appearance:none;width:11px;height:11px;border-radius:50%;
  background:#dff1ff;box-shadow:0 0 7px rgba(130,210,255,.85);cursor:pointer}
#bloomRange::-moz-range-thumb{width:11px;height:11px;border:0;border-radius:50%;
  background:#dff1ff;box-shadow:0 0 7px rgba(130,210,255,.85);cursor:pointer}
@media (max-width:680px){
  #bloomCtl{left:12px;padding:4px 8px}
  #bloomRange{width:58px}
  #bloomVal{display:none}
}


@font-face{font-family:"Geist";src:url("./fonts/Geist-300.woff2") format("woff2");font-weight:300;font-display:swap}@font-face{font-family:"Geist";src:url("./fonts/Geist-400.woff2") format("woff2");font-weight:400;font-display:swap}@font-face{font-family:"Geist";src:url("./fonts/Geist-500.woff2") format("woff2");font-weight:500;font-display:swap}@font-face{font-family:"Geist";src:url("./fonts/Geist-600.woff2") format("woff2");font-weight:600;font-display:swap}@font-face{font-family:"Geist";src:url("./fonts/Geist-700.woff2") format("woff2");font-weight:700;font-display:swap}

:root{
  --a32-surface: #2e2f33; --a32-surface-2: #47484a; --a32-surface-3: #252527;
  --a32-border: rgba(255,255,255,.09); --a32-border-soft: rgba(255,255,255,.07);
  --a32-text: #ececed; --a32-text-2: #b0b2b5; --a32-text-3: #85878b;
  --a32-accent: #3b8cf0; --a32-accent-hover: #5aa0f5;
  --a32-font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --a32-rightw: clamp(380px, 44vw, 900px);
}

body.a32 { font-family: var(--a32-font); }
body.a32, html.a32-html { overflow: hidden; }


body.a32 #hud, body.a32 #bloomCtl, body.a32 #densCtl { display: none !important; }

body.a32 #gl { touch-action: none; }



#topBar { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 76px; display: flex; align-items: center;
  justify-content: flex-start; padding: 0 28px; box-sizing: border-box; pointer-events: none; }
#topBar * { pointer-events: auto; }
#topBar .wordmark { font-family: var(--a32-font); font-size: 22px; font-weight: 400; color: #fff; letter-spacing: -0.01em; }
#topBar .wordmark b { font-weight: 600; }


#rightCol { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: var(--a32-rightw);
  overflow-y: auto; box-sizing: border-box; padding: 7vh 40px 24px; display: flex; flex-direction: column;
  margin-top: 40px;  }
#rightCol::-webkit-scrollbar { width: 0; height: 0; }

.a32-hero { margin-top: 0; }
.a32-hero .eyebrow { font-size: 12.5px; font-weight: 500; letter-spacing: .03em; color: var(--a32-text-3); margin-bottom: 14px; }
.a32-hero .headline { font-family: var(--a32-font); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12;
  letter-spacing: -0.01em; color: var(--a32-text); margin: 0 0 18px; }
.a32-hero .headline .grad { display: inline-block; background: linear-gradient(90deg, #5aa0f5, #c9c3f5);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.a32-hero .subtitle { font-size: 16px; line-height: 1.5; color: var(--a32-text-2); max-width: 46ch; margin: 0 0 24px; }


body.a32 #askBar { position: static; left: auto; right: auto; bottom: auto; transform: none; width: auto; z-index: auto; margin-bottom: 18px; }
body.a32 #askForm { display: flex; align-items: center; gap: 8px; background: rgba(37,37,39,.62); backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  padding: 7px 7px 7px 20px; box-shadow: 0 6px 6px rgba(0,0,0,.12), 0 0 20px rgba(0,0,0,.06); }
body.a32 #askInput { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--a32-text);
  font-family: var(--a32-font); font-size: 15px; padding: 10px 0; }
body.a32 #askInput::placeholder { color: var(--a32-text-3); }

body.a32 #askForm .mic-btn { display: none; }
body.a32 #askForm button[type="submit"] { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--a32-accent);
  border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
body.a32 #askForm button[type="submit"]:hover { background: var(--a32-accent-hover); }
body.a32 #askChips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 2px 0; justify-content: flex-start; }
body.a32 #askChips button { background: var(--a32-surface-2); color: var(--a32-text-2); border: 1px solid var(--a32-border);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: var(--a32-font); cursor: pointer; white-space: nowrap; }
body.a32 #askChips button:hover { background: var(--a32-surface-3); color: #fff; }


.a32-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.a32-card { background: color-mix(in srgb, var(--a32-surface) 72%, transparent); border: 1px solid var(--a32-border-soft);
  border-radius: 24px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.25); }
.a32-card-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.a32-card-icon.ic-idea { background: rgba(59,140,240,.16); color: #7fb6ff; }
.a32-card-icon.ic-chart { background: rgba(224,143,216,.14); color: #e08fd8; }
.a32-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--a32-text); }
.a32-card p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--a32-text-2); }
.a32-card .view-source { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--a32-accent); text-decoration: none;
  background: transparent; border: 0; padding: 0; font-family: var(--a32-font); cursor: pointer; }
.a32-card .view-source:hover { color: var(--a32-accent-hover); }

body.a32 .credit { text-align: left; color: var(--a32-text-3); font-size: 11px; margin-top: auto; padding-top: 12px; }


body.a32 #answer { position: static; z-index: auto; right: auto; top: auto; width: auto; max-height: none;
  overflow-y: visible; display: none; flex-direction: column; gap: 10px; }
body.a32 #answer.show { display: flex; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-bottom: 20px;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%); }
body.a32 .a32-cards, body.a32 .credit { flex: none; }
body.a32 #answer .logbk-answer, body.a32 #answer .hit, body.a32 #answer .src, body.a32 #answer .logbk-cite {
  background: var(--a32-surface-2); border: 1px solid var(--a32-border-soft); border-radius: 20px; padding: 10px 15px;
  backdrop-filter: none; max-width: 600px; }

body.a32 #answer .qhead { align-self: flex-end; background: var(--a32-user-bubble, #00306d); border: 0; border-radius: 20px;
  padding: 9px 15px; max-width: 520px; }
body.a32 #answer .qlabel { display: none; }
body.a32 #answer .qtext { font-size: 14.5px; font-weight: 500; color: #fff; margin-top: 0; }
body.a32 #answer .logbk-error { background: rgba(250,204,21,.1); border: 1px solid rgba(250,204,21,.3); border-radius: 16px; padding: 10px 15px; color: #facc15; }
body.a32 #answer .qlabel, body.a32 #answer .sec-h, body.a32 #answer .logbk-label, body.a32 #answer .logbk-cites-h { color: var(--a32-text-3); }
body.a32 #answer .qtext { color: var(--a32-text); }
body.a32 #answer .logbk-text, body.a32 #answer .src-pass { color: var(--a32-text); font-family: var(--a32-font); }
body.a32 #answer .logbk-text b, body.a32 #answer .src-title { color: #fff; }
body.a32 #answer .src-why { color: var(--a32-accent); }
body.a32 #answer .src-open { background: var(--a32-accent); color: #fff; }
body.a32 #answer .src.cited, body.a32 #answer .src.used { box-shadow: 0 0 0 1px rgba(59,140,240,.5) inset; }


body.a32 #answer .hits, body.a32 #answer .src-list { display: none; }
body.a32 .a32-compact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
body.a32 .a32-see-records, body.a32 .a32-topic-pill { font-family: var(--a32-font); font-size: 12.5px; border-radius: 999px; padding: 6px 13px; white-space: nowrap; }
body.a32 .a32-see-records { background: var(--a32-surface-2); color: var(--a32-text); border: 1px solid var(--a32-border); cursor: pointer; font-weight: 500; }
body.a32 .a32-see-records:hover { background: var(--a32-surface-3); }
body.a32 .a32-topic-pill { background: transparent; color: var(--a32-text-2); border: 1px solid var(--a32-border-soft); }


body.a32 #card { position: fixed; inset: auto; z-index: 45; left: 28px; right: auto; top: auto; bottom: 28px; width: 380px; height: auto; max-height: 46vh;
  background: var(--a32-surface); border: 1px solid var(--a32-border); border-radius: 24px; backdrop-filter: blur(10px); padding: 20px 22px; }
body.a32 #card h2 { color: #fff; }
body.a32 #card p { color: var(--a32-text-2); }
body.a32 #card .c-region { color: var(--a32-accent); }


body.a32 #regionChips { right: calc(var(--a32-rightw) + 24px); top: calc(76px + 16px); }
body.a32 #regionChips .rc { background: var(--a32-surface-2); border: 1px solid var(--a32-border-soft); }


body.a32 #loading { background: #0a0a0c; color: var(--a32-text-2); font-family: var(--a32-font); }


@media (max-height: 820px) {
  .a32-hero .subtitle { margin-bottom: 16px; }
  body.a32 #askBar { margin-bottom: 12px; }
  body.a32 #askChips { margin-top: 8px; }
  body.a32 #askChips button:nth-child(n+5) { display: none; }   
  .a32-cards { margin-bottom: 14px; }
  .a32-card { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; min-height: 84px; box-sizing: border-box; }
  .a32-card-icon { width: 30px; height: 30px; margin-bottom: 0; flex: none; }
  .a32-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .a32-card h3 { margin: 0; font-size: 14.5px; }
  .a32-card p { display: none; }
  .a32-card .view-source { font-size: 12px; }
}


@media (max-width: 760px) {
  #topBar { height: 60px; padding: 0 16px; }
  #topBar .wordmark { font-size: 17px; }
  #rightCol { top: 45vh; left: 0; right: 0; width: auto; padding: 20px 18px 28px; }
  #rightCol { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
  .a32-hero { margin-top: 6px; }
  .a32-hero .headline { font-size: 28px; }
  .a32-hero .subtitle { max-width: none; }
  .a32-cards { grid-template-columns: 1fr; }
  body.a32 #regionChips { left: 12px; right: 12px; top: calc(60px + 10px); }

  
  body.a32 #card { left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-height: 60vh; }

  
  body.a32 .sheet-handle { display: flex; }
  /* the whole right column scrolls on phones, so a sticky handle sat over the answer text (Adam TG 20877) */
  body.a32.sheet .sheet-handle { position: static; background: transparent; }
  body.a32 #answer.collapsed { max-height: 72px; overflow: hidden; }
}


body.a32 #answer.show { flex: none; min-height: auto; overflow: visible; margin-bottom: 28px;
  mask-image: none; -webkit-mask-image: none; }
body.a32 #answer .logbk-answer { background: transparent; border: 0; padding: 4px 2px 0; max-width: none; }
body.a32 #answer .logbk-text { font-size: 15px; line-height: 1.7; }
body.a32 #answer .logbk-text p { margin: 0 0 14px; }
body.a32 #answer .logbk-text li { margin-bottom: 6px; }
body.a32 #answer .logbk-label { margin-bottom: 8px; }

#howBtn { margin-left: 16px; font: 500 12.5px/1 var(--a32-font); color: var(--a32-text); background: rgba(37,37,39,.62);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 14px; cursor: pointer; backdrop-filter: blur(12px); }
#howBtn:hover, #howBtn:focus-visible { background: var(--a32-surface-2); border-color: var(--a32-accent); outline: none; }
#howModal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.62); backdrop-filter: blur(4px); }
#howModal[hidden] { display: none; }
#howModal .how-card { position: relative; width: min(640px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; box-sizing: border-box;
  background: color-mix(in srgb, var(--a32-surface-3) 94%, transparent); border: 1px solid var(--a32-border); border-radius: 24px;
  padding: 28px; color: var(--a32-text-2); font-family: var(--a32-font); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#howModal .how-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--a32-border);
  background: transparent; color: var(--a32-text-2); font-size: 18px; line-height: 1; cursor: pointer; }
#howModal .how-x:hover { color: #fff; background: var(--a32-surface-2); }
#howModal .how-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .03em; color: var(--a32-text-3); margin-bottom: 8px; }
#howModal h2 { margin: 0 36px 12px 0; font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--a32-text); }
#howModal .how-lead { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; }
#howModal .how-lead b { color: #fff; }
#howModal .how-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
#howModal .how-col { background: color-mix(in srgb, var(--a32-surface) 72%, transparent); border: 1px solid var(--a32-border-soft); border-radius: 16px; padding: 14px 16px; }
#howModal .how-col h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--a32-text); display: flex; align-items: center; gap: 8px; }
#howModal .how-col ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.5; }
#howModal .how-col li { margin-bottom: 5px; }
#howModal .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#howModal .dot.live { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
#howModal .dot.demo { background: var(--a32-accent); box-shadow: 0 0 8px var(--a32-accent); }
#howModal .how-built { font-size: 13px; color: var(--a32-text-3); margin-bottom: 8px; }
#howModal .how-built b { color: var(--a32-text); }
#howModal .how-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
#howModal .how-tech span { font-size: 12px; color: var(--a32-text-2); background: var(--a32-surface-2); border: 1px solid var(--a32-border); border-radius: 999px; padding: 5px 11px; }
#howModal .how-ok { font: 600 14px/1 var(--a32-font); color: #fff; background: var(--a32-accent); border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer; }
#howModal .how-ok:hover { background: var(--a32-accent-hover); }
#glPoster { display: none; }
body.nogl #gl { display: none; }
body.nogl #glPoster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; position: fixed; z-index: 1;
  top: 76px; left: 0; bottom: 0; right: var(--a32-rightw); padding: 20px; box-sizing: border-box; }
body.nogl #glPoster img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; }
body.nogl #glPoster p { margin: 0; font: 400 12.5px/1.4 var(--a32-font); color: var(--a32-text-3); text-align: center; }
@media (max-width: 640px) { body.nogl #glPoster { right: 0; bottom: auto; height: 42vh; } }
@media (max-width: 640px) {
  #howBtn { margin-left: 10px; padding: 7px 11px; font-size: 12px; }
  #howModal { padding: 12px; align-items: flex-end; }
  #howModal .how-card { padding: 22px 18px; border-radius: 20px; max-height: calc(100vh - 24px); }
  #howModal h2 { font-size: 20px; }
  #howModal .how-cols { grid-template-columns: 1fr; }
}

body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}


#topBar { gap: 16px; }
#topBar #howBtn { margin-left: 0; align-self: center; }
body.a32 #askChips:not(.expanded) .qchip:nth-of-type(n+9) { display: none; }
body.a32 #askChips .more-toggle { background: transparent; color: var(--a32-accent-hover); border: 1px dashed rgba(90,160,245,.55);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: var(--a32-font); cursor: pointer; white-space: nowrap; }
body.a32 #askChips .more-toggle:hover { color: #fff; border-style: solid; }
#nodeHint { position: fixed; z-index: 15; left: 28px; bottom: 22px; font: 400 12.5px/1.3 var(--a32-font); color: var(--a32-text-2);
  background: rgba(37,37,39,.62); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 7px 13px;
  backdrop-filter: blur(10px); pointer-events: none; transition: opacity .5s ease; }
#nodeHint.gone { opacity: 0; }
#nodeTip { position: fixed; z-index: 26; pointer-events: none; transform: translate(-50%, calc(-100% - 16px)); max-width: 260px;
  font: 500 12px/1.3 var(--a32-font); color: #fff; background: rgba(20,22,30,.88); border: 1px solid rgba(127,216,255,.35);
  border-radius: 8px; padding: 5px 9px; opacity: 0; transition: opacity .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nodeRing { position: fixed; z-index: 25; pointer-events: none; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 1.5px solid #7fd8ff; box-shadow: 0 0 12px rgba(127,216,255,.75); opacity: 0; transition: opacity .12s; }
#nodeTip.show, #nodeRing.show { opacity: 1; }
#brainPause { position: fixed; z-index: 15; right: calc(var(--a32-rightw) + 18px); bottom: 18px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--a32-text); cursor: pointer;
  background: rgba(37,37,39,.62); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); }
#brainPause:hover, #brainPause:focus-visible { border-color: var(--a32-accent); outline: none; }
#brainPause .i-play { display: none; } #brainPause.paused .i-play { display: block; } #brainPause.paused .i-pause { display: none; }
body.nogl #brainPause, body.nogl #nodeHint, body.nogl #nodeTip, body.nogl #nodeRing { display: none; }
@media (max-width: 640px) {
  body.a32 #askChips:not(.expanded) .qchip:nth-of-type(n+5) { display: none; }
  #nodeHint { left: 12px; bottom: auto; top: calc(42vh - 44px); font-size: 11.5px; padding: 6px 11px; }
  #brainPause { right: 12px; bottom: auto; top: calc(42vh - 48px); width: 36px; height: 36px; }
}

#topBar .wordmark { display: flex; align-items: center; gap: 9px; }
#topBar .wordmark .brand-brain { color: #fff; flex: none; display: block; }
#howModal .how-ok { display: block; margin-left: auto; }

/* super-ultrawide (49" 32:9): keep brain + panel together in a centred 2:1 stage; the extra width is dark margin (Adam TG 20936) */
@media (min-aspect-ratio: 2/1) and (min-width: 761px) {
  :root { --a32-side: calc((100vw - 200vh) / 2); }
  #topBar { padding-left: calc(28px + var(--a32-side)); }
  #rightCol { right: var(--a32-side); }
  body.a32 #regionChips { left: var(--a32-side); right: calc(var(--a32-rightw) + 24px + var(--a32-side)); }
  #brainPause { right: calc(var(--a32-rightw) + 18px + var(--a32-side)); }
  body.a32 #card, #nodeHint { left: calc(28px + var(--a32-side)); }
  body.nogl #glPoster { left: var(--a32-side); right: calc(var(--a32-rightw) + var(--a32-side)); }
}
