/* Grey House · Ego. Night, silver and gold. */
:root {
  --bg: #07090F; --panel: #0E121C; --panel2: #131826; --line: #222A3B; --line2: #313B52; --text: #ECEFF5; --soft: #C6CCD8; --muted: #8E97AA;
  --gold: #D9B26A; --gold2: #F1D9A6; --silver: #C9D2E3; --ok: #6FD3A2; --okbg: #11261D; --warn: #E8B45A; --bad: #F08A7E; --badbg: #2E1618;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; }
h1, h2, h3, .serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; margin: 0; letter-spacing: .01em; }
h1 { font-size: 34px; } h2 { font-size: 24px; } h3 { font-size: 19px; }
a { color: var(--gold2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; cursor: pointer; }
button:hover { border-color: var(--gold); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1A1407; border: 0; font-weight: 600; }
button.ok { background: var(--ok); color: #06140D; border: 0; font-weight: 600; }
button.quiet { border-color: transparent; color: var(--muted); }
button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold2); }
input, select, textarea { background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: .02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { text-align: center; padding-top: 40vh; font-family: "Cormorant Garamond", serif; letter-spacing: .4em; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13px; }

/* sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 30%, #141a2a 0%, var(--bg) 70%); }
.login form, .login .box { width: min(400px, 100%); display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.mark { text-align: center; } .mark b { display: block; font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 15px; letter-spacing: .5em; color: var(--silver); }
.mark span { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--gold); font-size: 17px; }
.err { color: var(--bad); min-height: 20px; font-size: 14px; }
#qr { background: #fff; padding: 12px; border-radius: 12px; width: max-content; margin: 0 auto; }

/* shell */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 22px; background: rgba(7,9,15,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .mark { text-align: left; margin-right: auto; } .top .mark b { font-size: 13px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { text-decoration: none; color: var(--soft); padding: 8px 14px; border-radius: 999px; font-size: 14px; }
nav.tabs a.on { background: var(--panel2); color: var(--gold2); box-shadow: inset 0 0 0 1px var(--line2); }
nav.tabs a .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #1A1407; font-size: 12px; text-align: center; }
.page { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }
.page > header { margin-bottom: 20px; } .page > header p { margin: 6px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; border: 1px solid var(--line2); color: var(--soft); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: #2c5b45; background: var(--okbg); } .pill.gold { color: var(--gold2); border-color: #5b4a2b; }
.list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.list > li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; }
.list > li .grow { flex: 1; min-width: 0; }
.empty { color: var(--muted); font-style: italic; }
dl.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; } dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; text-align: right; }
.bots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bots button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.bots button.on { border-color: #2c5b45; color: var(--ok); background: var(--okbg); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--gold); color: var(--text); padding: 12px 18px; border-radius: 14px; z-index: 20; max-width: min(560px, 92vw); }

/* Ego: one calm full-screen scene. The pyramid fills the space between the top bar and the question bar. */
.page.full { max-width: none; padding: 0; }
.ego { display: flex; flex-direction: column; align-items: center; height: calc(100svh - 74px); min-height: 520px; }
.stage { position: relative; width: 100%; flex: 1 1 auto; min-height: 260px;
  background: radial-gradient(42% 52% at 50% 46%, #141c30 0%, rgba(9,12,20,0) 72%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ego .below { width: 100%; display: grid; justify-items: center; gap: 12px; padding: 4px 18px 22px; }
.cap { width: min(760px, 100%); height: 108px; overflow-y: auto; scrollbar-width: none; text-align: center; font-family: "Cormorant Garamond", serif; font-size: 23px; line-height: 1.35; color: var(--text); }
.cap::-webkit-scrollbar { display: none; }
.cap .you { display: block; font-family: Inter, sans-serif; font-size: 13px; color: var(--muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chips button { min-height: 36px; font-size: 14px; color: var(--soft); }
.ask { width: min(760px, 100%); display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; padding: 6px; }
.ask input { border: 0; background: transparent; min-height: 44px; }
.ask input:focus-visible { outline: none; }
.ask:focus-within { border-color: var(--gold); }
.round { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; flex: none; }
.state { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.state[data-s="Listening"] { color: var(--ok); } .state[data-s="Thinking"], .state[data-s="Speaking"] { color: var(--gold2); }

@media (max-width: 640px) {
  .top { padding: 10px 14px 8px; gap: 8px 12px; }
  .top #out { min-height: 34px; padding: 0 10px; font-size: 13px; }
  nav.tabs { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs a { white-space: nowrap; padding: 7px 12px; font-size: 13px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: 100%; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { white-space: nowrap; }
 .page { padding: 18px 14px 70px; } .page.full { padding: 0; } h1 { font-size: 28px; } .ego { height: calc(100svh - 112px); } .cap { font-size: 19px; height: 92px; } .chips button { min-height: 34px; font-size: 13px; } }
/* ===== Ego Command Center ===== Ego in the core, instruments around her. */
.bridge { --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; --cy: #8FD3F0;
  position: relative; display: grid; grid-template-columns: minmax(280px, 320px) 1fr minmax(300px, 350px); grid-template-rows: 40px 1fr; height: var(--h, calc(100svh - 74px)); overflow: hidden;
  background: radial-gradient(60% 55% at 50% 48%, #101830 0%, #090c16 55%, #05070c 100%); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bridge::before { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0,0,0,.55) 100%); }
.bridge::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: .3; background: repeating-linear-gradient(180deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px); }
.bridge > * { position: relative; z-index: 1; }
/* command strip */
.strip { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 16px; border-bottom: 1px solid rgba(201,210,227,.09); background: linear-gradient(180deg, rgba(14,19,32,.85), rgba(9,12,22,.6));
  font: 500 10.5px/1 var(--mono); letter-spacing: .14em; color: var(--muted); white-space: nowrap; overflow: hidden; }
.strip em { font-style: normal; color: var(--muted); } .strip b { color: var(--silver); font-weight: 600; font-variant-numeric: tabular-nums; }
.strip .sys, .strip .clocks, .strip .meta { display: flex; align-items: center; gap: 14px; } .strip .clocks { margin: 0 auto; gap: 22px; } .strip span { display: inline-flex; gap: 7px; align-items: center; }
.strip .brand { color: var(--text); letter-spacing: .3em; font-size: 11px; } .strip .brand span { color: var(--gold); margin: 0 4px; }
.kbd { min-height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(217,178,106,.45); color: var(--gold2); font: 600 10.5px var(--mono); letter-spacing: .12em; display: inline-flex; gap: 8px; align-items: center; background: rgba(217,178,106,.06); }
.kbd span { color: var(--soft); }
.led { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: #4a5266; }
.led.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 3.2s infinite; } .led.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); } .led.idle { background: #5b6478; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .35; } }
/* columns */
.bridge .ego { height: 100%; min-height: 0; grid-row: 2; }
.bridge .ego::before { content: ""; position: absolute; inset: 12px; pointer-events: none; z-index: 2;
  background: linear-gradient(var(--gold), var(--gold)) 0 0 / 18px 1px, linear-gradient(var(--gold), var(--gold)) 0 0 / 1px 18px, linear-gradient(var(--gold), var(--gold)) 100% 0 / 18px 1px, linear-gradient(var(--gold), var(--gold)) 100% 0 / 1px 18px,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 18px 1px, linear-gradient(var(--gold), var(--gold)) 0 100% / 1px 18px, linear-gradient(var(--gold), var(--gold)) 100% 100% / 18px 1px, linear-gradient(var(--gold), var(--gold)) 100% 100% / 1px 18px; background-repeat: no-repeat; opacity: .5; }
.bridge .stage { background: none; }
.col { grid-row: 2; overflow-y: auto; scrollbar-width: none; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(13,17,29,.72), rgba(8,11,19,.55)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.col::-webkit-scrollbar { display: none; }
.col.left { border-right: 1px solid rgba(201,210,227,.08); } .col.right { border-left: 1px solid rgba(201,210,227,.08); }
.lbl { display: flex; align-items: center; gap: 8px; font: 600 10px/1 var(--mono); letter-spacing: .2em; color: var(--muted); margin: 8px 2px 0; text-transform: uppercase; }
.lbl span { color: var(--gold); } .lbl small { margin-left: auto; color: var(--silver); font-size: 10px; letter-spacing: .12em; }
.lbl.gold { color: var(--gold); margin-top: 0; }
.lbl .live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: blink 1.6s infinite; }
/* modules: glass, corner brackets, slow light sweep */
.mod, .yes { position: relative; overflow: hidden; background: rgba(18,23,37,.62); border: 1px solid rgba(201,210,227,.09); border-radius: 10px; padding: 11px 12px; }
.mod::before, .yes::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--gold), var(--gold)) 0 0 / 9px 1px, linear-gradient(var(--gold), var(--gold)) 0 0 / 1px 9px, linear-gradient(var(--gold), var(--gold)) 100% 100% / 9px 1px, linear-gradient(var(--gold), var(--gold)) 100% 100% / 1px 9px; background-repeat: no-repeat; opacity: .6; }
.mod::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(241,217,166,.06), transparent); animation: sweep 10s ease-in-out infinite; }
.stack { display: grid; gap: 8px; } .stack .mod:nth-child(2)::after { animation-delay: 2.5s; } .stack .mod:nth-child(3)::after { animation-delay: 5s; } .stack .mod:nth-child(4)::after { animation-delay: 7.5s; }
@keyframes sweep { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.fleet { border-left: 2px solid var(--c); }
.fleet header { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.fleet header i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.fleet header b { font-weight: 600; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font: 500 9px var(--mono); letter-spacing: .14em; color: var(--muted); margin-left: auto; }
.pill { font: 600 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(111,211,162,.4); }
.tri { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
.tri em, .sig em { display: block; font: normal 500 8.5px/1.2 var(--mono); letter-spacing: .12em; color: var(--muted); }
.tri b { display: block; margin-top: 4px; font: 600 16px/1 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; } .tri small { color: var(--muted); font-size: 11px; }
.tri b.sealed { color: var(--silver); font-size: 12px; letter-spacing: .14em; margin-top: 7px; } .tri b.hot { color: var(--gold2); text-shadow: 0 0 10px rgba(217,178,106,.6); }
.sig { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; margin-top: 9px; padding-top: 8px; border-top: 1px dashed rgba(201,210,227,.1); }
.sig .spark { width: 100%; height: 18px; } .sig > span { font: 600 11px var(--mono); color: var(--soft); }
.fleet.ping { animation: ping 1.4s ease-out; } @keyframes ping { 0% { box-shadow: 0 0 0 0 var(--c), inset 0 0 30px var(--c); } 100% { box-shadow: 0 0 0 12px transparent, inset 0 0 0 transparent; } }
.globe { padding: 0; height: 168px; } #globe { width: 100%; height: 100%; display: block; }
.sys-list { list-style: none; margin: 0; display: grid; gap: 7px; }
.sys-list li { display: grid; grid-template-columns: 10px 92px 1fr; align-items: center; gap: 6px; font: 500 10px/1.2 var(--mono); letter-spacing: .1em; }
.sys-list em { font-style: normal; color: var(--muted); } .sys-list b { color: var(--silver); font-weight: 600; text-align: right; }
/* right column */
.list, .comms { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li.yes { display: block; border-left: 2px solid var(--gold); }
.yes .code { display: block; font: 600 9px var(--mono); letter-spacing: .16em; color: var(--gold); margin-bottom: 4px; }
.yes b { display: block; font-weight: 600; font-size: 13.5px; } .yes > span.small { display: block; margin-top: 2px; }
.yes .row { display: flex; gap: 8px; margin-top: 9px; } .yes button { min-height: 32px; font-size: 12.5px; padding: 0 14px; }
.empty { color: var(--muted); font-size: 12.5px; padding: 8px 2px; list-style: none; }
.comms { gap: 0; padding: 8px 10px; max-height: 210px; overflow-y: auto; scrollbar-width: none; font: 500 10.5px/1.45 var(--mono); }
.comms li { display: grid; grid-template-columns: 38px auto 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(201,210,227,.07); color: var(--soft); }
.comms li:last-child { border-bottom: 0; } .comms li.empty { display: block; font-family: Inter, sans-serif; }
.comms time { color: var(--muted); } .comms b { color: var(--cy); font-weight: 600; letter-spacing: .08em; } .comms li.les b { color: var(--ok); } .comms li.dec b { color: var(--gold2); }
.comms span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gauge { margin: 0; display: grid; justify-items: center; gap: 2px; } .gauge svg { width: 86px; height: 76px; }
.gauge .g-bg, .gauge .g-fg { fill: none; stroke-width: 5; stroke-linecap: round; } .gauge .g-bg { stroke: rgba(201,210,227,.1); } .gauge .g-fg { stroke: var(--gold); filter: drop-shadow(0 0 4px rgba(217,178,106,.6)); } .gauge .g-fg.hot { stroke: var(--bad); }
.gauge text { fill: var(--text); font: 600 13px var(--mono); }
.gauge figcaption { text-align: center; font: 500 9.5px/1.3 var(--mono); letter-spacing: .1em; } .gauge figcaption em { display: block; font-style: normal; color: var(--muted); } .gauge figcaption b { color: var(--silver); } .gauge small { color: var(--muted); }
.lesson { margin-top: auto; } .lesson p.serif { font-size: 17px; line-height: 1.35; margin: 8px 0 6px; }
/* HUD around Ego, kept to the corners so her circle stays clear */
.hud { position: absolute; z-index: 3; display: grid; gap: 5px; font: 500 10px/1.3 var(--mono); letter-spacing: .16em; color: var(--muted); pointer-events: none; }
.hud b { color: var(--silver); font-weight: 600; margin-left: 6px; } .hud.tl { top: 24px; left: 28px; } .hud.tr { top: 24px; right: 28px; text-align: right; }
#wave { width: 300px; height: 30px; display: block; }
/* command bar */
.palette { position: absolute; inset: 0; z-index: 10; display: grid; place-items: start center; padding-top: 12vh; background: rgba(4,6,11,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette[hidden] { display: none; }
.pbox { width: min(620px, 92vw); background: rgba(16,21,35,.96); border: 1px solid rgba(217,178,106,.4); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(217,178,106,.08); overflow: hidden; }
.pbox input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; min-height: 56px; padding: 0 18px; font-size: 16px; }
.pbox input:focus-visible { outline: none; }
#plist { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; }
#plist li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--soft); }
#plist li[aria-selected="true"] { background: rgba(217,178,106,.12); color: var(--gold2); }
.phint { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); font: 500 10px var(--mono); letter-spacing: .12em; color: var(--muted); }
/* power-on sequence */
.boot-in .strip { animation: power .7s both; } .boot-in .col.left { animation: rise .7s .15s both cubic-bezier(.2,.7,.2,1); } .boot-in .col.right { animation: rise .7s .3s both cubic-bezier(.2,.7,.2,1); }
.boot-in .mod, .boot-in .yes { animation: power .6s both; }
.boot-in .stack .mod:nth-child(1) { animation-delay: .45s; } .boot-in .stack .mod:nth-child(2) { animation-delay: .55s; } .boot-in .stack .mod:nth-child(3) { animation-delay: .65s; } .boot-in .stack .mod:nth-child(4) { animation-delay: .75s; }
.boot-in .globe { animation-delay: .9s; } .boot-in .sys-list { animation-delay: 1.05s; } .boot-in .yes { animation-delay: .6s; } .boot-in .comms { animation-delay: .8s; } .boot-in .budget { animation-delay: 1s; } .boot-in .lesson { animation-delay: 1.15s; }
.boot-in .hud, .boot-in .below { animation: power .8s .9s both; }
.boot-in .comms li span { animation: type 1s 1.1s both steps(30); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes power { 0% { opacity: 0; filter: brightness(2.2); } 40% { opacity: .9; } 55% { opacity: .35; } 100% { opacity: 1; filter: none; } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (max-width: 1280px) { .strip .clocks span:nth-child(3), .strip .meta span:nth-child(2) { display: none; } }
@media (max-width: 1100px) { .bridge { grid-template-columns: 280px 1fr; } .col.right { display: none; } .strip .clocks { display: none; } }
@media (max-width: 900px) {
  .bridge { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .strip { order: 0; min-height: 38px; } .strip .kbd { display: none; } .strip .meta span, .strip .sys em { display: none; }
  .bridge .ego { order: 1; height: calc(var(--h, 100svh) - 38px); min-height: 540px; }
  .col.left { order: 2; } .col.right { order: 3; display: flex; } .col { border: 0 !important; border-top: 1px solid rgba(201,210,227,.08) !important; overflow: visible; }
  .lesson { margin-top: 0; } .hud.tl { top: 18px; left: 18px; } .hud.tr { top: 18px; right: 18px; } .hud.tr span:nth-child(n+3) { display: none; } #wave { width: 240px; }
}
@media (prefers-reduced-motion: reduce) { .boot-in * { animation: none !important; } .mod::after { display: none; } .led { animation: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Composer: proportioned like a modern chat box. Text on top, tools underneath, grows with what you type. */
.ask.composer { width: min(680px, calc(100% - 48px)); display: block; padding: 12px 12px 10px 18px; border-radius: 22px; border: 1px solid rgba(201,210,227,.16);
  background: linear-gradient(180deg, rgba(22,28,44,.92), rgba(15,19,31,.92)); box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ask.composer:focus-within { border-color: rgba(217,178,106,.55); box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 4px rgba(217,178,106,.08); }
.composer .field { position: relative; }
.composer textarea { display: block; width: 100%; min-height: 26px; max-height: 168px; padding: 4px 4px 2px 0; border: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.5; color: var(--text); overflow-y: auto; scrollbar-width: thin; }
.composer textarea:focus-visible { outline: none; } .composer textarea::placeholder { color: var(--muted); }
.composer #micwave { display: none; width: 100%; height: 34px; margin-top: 6px; }
.composer.listening #micwave { display: block; }
.composer.listening textarea::placeholder { color: var(--gold2); }
.composer .tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.composer .ic { min-height: 34px; height: 34px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--soft); border-color: rgba(201,210,227,.16); }
.composer .ic[aria-pressed="true"] { color: var(--gold2); border-color: rgba(217,178,106,.5); background: rgba(217,178,106,.08); }
.composer.listening #mic { color: #1A1407; background: var(--gold); border-color: var(--gold); animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,178,106,.45); } 50% { box-shadow: 0 0 0 7px rgba(217,178,106,0); } }
.composer .hint { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.composer .send { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; margin-left: 4px; }
.bridge .below { gap: 10px; padding-bottom: 18px; } .bridge .chips button { min-height: 32px; font-size: 13px; }
@media (max-width: 640px) { .ask.composer { width: calc(100% - 24px); padding: 10px 10px 8px 14px; border-radius: 20px; } .composer .lab, .composer .hint { display: none; } .composer .send { margin-left: auto; } .composer.listening .hint { display: block; } }

/* Half-size answer text and a much smaller, single-row question bar. */
.bridge .cap { font-size: 13px; line-height: 1.45; height: 62px; width: min(560px, 100%); }
.bridge .cap .you { font-size: 10.5px; margin-bottom: 3px; }
.ask.composer { width: min(440px, calc(100% - 32px)); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.composer .tools { display: contents; } .composer .lab, .composer .hint { display: none !important; }
.composer #mic { order: 0; } .composer .field { order: 1; flex: 1; min-width: 0; } .composer #voice { order: 2; } .composer .send { order: 3; margin-left: 0; }
.composer textarea { font-size: 13px; line-height: 1.4; min-height: 20px; max-height: 110px; padding: 5px 6px; }
.composer .ic { width: 28px; height: 28px; min-height: 28px; padding: 0; justify-content: center; border-radius: 50%; }
.composer .ic svg { width: 14px; height: 14px; } .composer .send { width: 28px; height: 28px; min-height: 28px; } .composer .send svg { width: 14px; height: 14px; }
.composer #micwave { height: 18px; margin-top: 2px; }
.bridge .below { gap: 8px; } .bridge .chips button { min-height: 26px; font-size: 11.5px; padding: 0 10px; }
#wave { width: 200px; height: 20px; }
