/* Domi, in the Dominares "Aurora" look. No inline styles anywhere (CSP style-src 'self'). */
@font-face{font-family:"Inter";src:url(/fonts/inter-latin.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Inter Tight";src:url(/fonts/inter-tight-latin.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  --bg:#05070a;--ink:#f2f5f7;--ink-2:#b4bec8;--ink-3:#8b96a3;
  --line:rgba(255,255,255,.09);--line-2:rgba(255,255,255,.16);--glass:rgba(255,255,255,.035);
  --emerald:#00B070;--mint:#2FD394;--teal:#19c6c0;
  --display:"Inter Tight",ui-sans-serif,system-ui,sans-serif;
  --body:"Inter",ui-sans-serif,system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --dock-h:150px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;overflow-x:hidden;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
a{color:inherit}
button{font:inherit;color:inherit}
.defs{position:absolute;width:0;height:0;overflow:hidden}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.wrap{width:min(1200px,100% - 48px);margin-inline:auto}
:focus-visible{outline:2px solid var(--mint);outline-offset:3px}

/* ---------- safe areas ----------
   Every page is drawn edge to edge (viewport-fit=cover): as a Home Screen app, or in any web view that fills the
   screen, the dark sky reaches under the status bar and the home indicator. What can be read or tapped keeps
   clear of them, of the Dynamic Island and the round corners, and of the notch side when a phone lies on its
   side. The body gives the two sides away; the top bar and the footer reach back out to the screen's edges with
   their backgrounds and keep their words inside. What is fixed to the screen instead of the page (the toast, the
   share card, voice mode) says so itself, further down. Where a browser shows its own bars every inset is 0 and
   none of this changes a pixel.
   Domi's iPhone app pads header.top (padding-top) and footer.foot (padding-bottom) with a stylesheet of its own,
   and takes that away once it finds "safe-area-inset-top" in these rules. So the top and bottom insets stay on
   exactly those two properties of those two elements: while both stylesheets are there they say the same thing
   (never one padding on top of the other), and nothing moves when the app's is gone. */
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.top,.foot{margin-left:calc(0px - env(safe-area-inset-left));margin-right:calc(0px - env(safe-area-inset-right));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.top{padding-top:env(safe-area-inset-top)}
.foot{padding-bottom:env(safe-area-inset-bottom)}
/* Inside the iPhone app a tap shows no grey flash: the app's own stylesheet said so, and that one goes away
   (js/inapp.js names the app). */
.in-app{-webkit-tap-highlight-color:rgba(0,0,0,0)}

/* ---------- aurora ---------- */
.sky{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.sky .blob{position:absolute;border-radius:50%;filter:blur(90px);opacity:.55;will-change:transform}
.b1{width:820px;height:520px;left:calc(50% - 640px);top:-120px;background:radial-gradient(closest-side,#00b070,transparent);animation:drift1 22s ease-in-out infinite alternate}
.b2{width:760px;height:560px;left:calc(50% - 80px);top:-60px;background:radial-gradient(closest-side,#0fa7a8,transparent);opacity:.42;animation:drift2 26s ease-in-out infinite alternate}
.b3{width:600px;height:380px;left:calc(50% - 300px);top:180px;background:radial-gradient(closest-side,#1de9a0,transparent);opacity:.22;animation:drift3 30s ease-in-out infinite alternate}
@keyframes drift1{to{transform:translate(120px,60px) scale(1.12)}}
@keyframes drift2{to{transform:translate(-140px,40px) scale(.92)}}
@keyframes drift3{to{transform:translate(60px,-50px) scale(1.2)}}
.sky::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(5,7,10,.15) 0%,rgba(5,7,10,.35) 45%,var(--bg) 92%)}
.stars{position:absolute;inset:0;opacity:.8;background-image:
  radial-gradient(1px 1px at 12% 22%,rgba(255,255,255,.5),transparent 60%),
  radial-gradient(1px 1px at 82% 14%,rgba(255,255,255,.45),transparent 60%),
  radial-gradient(1px 1px at 68% 38%,rgba(255,255,255,.3),transparent 60%),
  radial-gradient(1px 1px at 24% 58%,rgba(255,255,255,.3),transparent 60%),
  radial-gradient(1px 1px at 91% 52%,rgba(255,255,255,.35),transparent 60%),
  radial-gradient(1px 1px at 6% 76%,rgba(255,255,255,.25),transparent 60%),
  radial-gradient(1px 1px at 44% 8%,rgba(255,255,255,.4),transparent 60%)}
body.chatting .sky .blob{opacity:.28}

/* ---------- header ---------- */
.top{position:sticky;top:0;z-index:20;background:linear-gradient(to bottom,rgba(5,7,10,.82),rgba(5,7,10,.55) 70%,rgba(5,7,10,0));backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.bar{display:flex;align-items:center;justify-content:space-between;height:72px;gap:12px}
.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}
.brand svg{width:30px;height:auto;color:var(--emerald);filter:drop-shadow(0 0 10px rgba(47,211,148,.35))}
.word{font-family:var(--display);font-weight:700;font-size:16px;letter-spacing:.24em}
.actions{display:flex;align-items:center;gap:10px}
.btn{display:inline-flex;align-items:center;gap:8px;font-family:var(--body);font-weight:600;font-size:14px;border-radius:999px;padding:9px 16px;border:0;cursor:pointer;transition:.2s;text-decoration:none}
.btn svg{width:16px;height:16px}
.btn-ghost{color:var(--ink);border:1px solid var(--line-2);background:rgba(255,255,255,.03)}
.btn-ghost:hover{border-color:rgba(47,211,148,.5)}
.switch{display:inline-flex;align-items:center;gap:9px;font-size:14px;font-weight:500;color:var(--ink-2);cursor:pointer;padding:7px 12px 7px 8px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.02);user-select:none}
.switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch .track{width:34px;height:20px;border-radius:999px;background:rgba(255,255,255,.12);position:relative;transition:.2s;flex:none}
.switch .track::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:var(--ink-2);transition:.2s}
.switch input:checked + .track{background:var(--emerald)}
.switch input:checked + .track::after{left:17px;background:#fff}
.switch input:checked ~ .lbl{color:var(--ink)}
.switch input:focus-visible + .track{outline:2px solid var(--mint);outline-offset:3px}

/* ---------- stage ---------- */
.stage{position:relative;z-index:3;flex:1;display:flex;flex-direction:column}
body.empty .stage{justify-content:center;padding:8px 0 40px}

/* hero (empty state) */
.hero{text-align:center;padding:12px 0 30px}
body.chatting .hero{display:none}
.orb{position:relative;width:96px;height:86px;margin:0 auto 24px;display:grid;place-items:center}
.orb::before{content:"";position:absolute;inset:-46px;border-radius:50%;background:radial-gradient(closest-side,rgba(0,176,112,.55),rgba(0,176,112,.12) 55%,transparent);filter:blur(6px);animation:pulse 5s ease-in-out infinite}
.orb svg{position:relative;width:96px;height:auto;color:var(--emerald);filter:drop-shadow(0 0 18px rgba(47,211,148,.55)) drop-shadow(0 0 2px rgba(180,255,220,.6))}
@keyframes pulse{50%{opacity:.65;transform:scale(.93)}}
.eyebrow{display:inline-flex;align-items:center;gap:10px;font-size:13px;font-weight:500;color:var(--ink-2);padding:6px 14px 6px 8px;border:1px solid var(--line-2);border-radius:999px;background:rgba(5,7,10,.45);backdrop-filter:blur(10px);margin-bottom:24px}
.eyebrow b{font-weight:600;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#04140d;background:var(--mint);padding:3px 9px;border-radius:999px}
h1{font-family:var(--display);font-weight:600;font-size:clamp(44px,6.2vw,86px);line-height:.98;letter-spacing:-.045em;max-width:980px;margin:0 auto}
h1 .glow{background:linear-gradient(100deg,#e9fff5 0%,#6ff0bd 40%,#2FD394 60%,#5fe3df 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.lede{font-size:clamp(16px,1.45vw,19px);color:var(--ink-2);max-width:600px;margin:20px auto 0}

/* ask box */
.dock{position:relative;z-index:5}
body.chatting .dock{position:sticky;bottom:0;padding:14px 0 calc(10px + env(safe-area-inset-bottom));background:linear-gradient(to top,var(--bg) 62%,rgba(5,7,10,0))}
.ask{position:relative;max-width:780px;margin:0 auto}
.ask::before{content:"";position:absolute;inset:-1px;border-radius:30px;padding:1px;background:linear-gradient(120deg,rgba(47,211,148,.8),rgba(255,255,255,.12) 35%,rgba(255,255,255,.08) 65%,rgba(25,198,192,.7));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.askbox{display:flex;align-items:flex-end;gap:10px;min-height:66px;padding:9px 9px 9px 22px;border-radius:30px;background:rgba(10,14,18,.78);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 30px 80px -20px rgba(0,0,0,.8),0 0 60px -10px rgba(0,176,112,.35)}
.askbox .spark{flex:none;width:20px;height:20px;color:var(--mint);margin-bottom:15px}
.askbox textarea{flex:1;min-width:0;background:none;border:0;outline:0;resize:none;color:var(--ink);font:500 18px/1.4 var(--body);padding:12px 0;max-height:200px;overflow-y:auto}
.askbox textarea::placeholder{color:#97a3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The hint in a box is fitted to it (setHint in ui.js): full wording where there is room, short on a phone. What
   the short one leaves out goes on this line under the box. .ruler is the off-screen span the words are measured in. */
.hint{max-width:780px;margin:10px auto 0;padding:0 14px;font-size:13.5px;line-height:1.45;color:#97a3af;text-align:center;text-wrap:balance;overflow-wrap:anywhere}
.hint[hidden]{display:none}
.ruler{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}
.send{flex:none;width:48px;height:48px;border-radius:50%;border:0;background:var(--ink);color:#05070a;display:grid;place-items:center;cursor:pointer;transition:.2s}
.send:hover{background:var(--mint)}
.send svg{width:20px;height:20px}
.send[disabled]{opacity:.45;cursor:default}
body.busy .send{background:var(--ink-3)}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px auto 0;max-width:820px}
body.chatting .chips{display:none}
.chip{font:500 14px var(--body);color:var(--ink-2);padding:9px 16px;border-radius:999px;border:1px solid var(--line-2);background:rgba(255,255,255,.035);backdrop-filter:blur(10px);cursor:pointer;transition:.2s;text-decoration:none}
.chip:hover{color:var(--ink);border-color:rgba(47,211,148,.55);background:rgba(47,211,148,.08)}
.chip span{color:var(--mint);margin-right:7px}
.note{margin:16px auto 0;font-size:13px;color:var(--ink-3);text-align:center}
.note a{color:var(--ink-2)}
body.chatting .note{margin-top:8px;font-size:12px}
.note.warn{color:#ffd27a}

/* ---------- conversation ---------- */
.thread{width:min(780px,100%);margin:0 auto;display:none;flex-direction:column;gap:22px;padding:18px 0 8px}
body.chatting .thread{display:flex;flex:1 0 auto;justify-content:flex-start}
.me{max-width:100%;background:#e9eef2;color:#0b1015;padding:12px 17px;border-radius:20px;border-bottom-right-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px}
.turn{display:grid;grid-template-columns:34px 1fr;gap:14px;align-items:start}
.av{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#103b2a,#06120d);border:1px solid rgba(47,211,148,.45);box-shadow:0 0 18px rgba(0,176,112,.4)}
.av svg{width:17px;height:auto;color:var(--mint)}
.body{min-width:0;padding-top:4px}
.who{font-family:var(--display);font-weight:600;font-size:14px;color:var(--ink-2);margin-bottom:4px;letter-spacing:.01em}
.status{display:flex;align-items:center;gap:8px;color:var(--ink-3);font-size:14px;margin:2px 0 8px}
.status[hidden]{display:none}
.dots{display:inline-flex;gap:4px}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--mint);opacity:.35;animation:blink 1.2s infinite}
.dots i:nth-child(2){animation-delay:.2s}
.dots i:nth-child(3){animation-delay:.4s}
@keyframes blink{40%{opacity:1}}

.md{font-size:16px;line-height:1.62;color:var(--ink);overflow-wrap:anywhere}
.md > * + *{margin-top:.75em}
.md h3,.md h4{font-family:var(--display);font-weight:600;letter-spacing:-.015em;line-height:1.25;margin-top:1.1em}
.md h3{font-size:19px}
.md h4{font-size:17px}
.md ul,.md ol{padding-left:1.3em}
.md li + li{margin-top:.3em}
.md li::marker{color:var(--mint)}
.md a{color:var(--mint);text-decoration:underline;text-decoration-color:rgba(47,211,148,.4);text-underline-offset:3px}
.md strong{font-weight:600;color:#fff}
.md code{font-family:var(--mono);font-size:.88em;background:rgba(255,255,255,.07);border:1px solid var(--line);padding:1px 6px;border-radius:6px}
.md pre{background:rgba(0,0,0,.45);border:1px solid var(--line);border-radius:14px;padding:14px 16px;overflow-x:auto}
.md pre code{background:none;border:0;padding:0;font-size:13.5px;line-height:1.55}
.md blockquote{border-left:3px solid rgba(47,211,148,.5);padding-left:14px;color:var(--ink-2)}
.md hr{border:0;border-top:1px solid var(--line)}
.md.err{color:#ffd27a}
.cursor::after{content:"";display:inline-block;width:8px;height:1.05em;vertical-align:-2px;margin-left:2px;background:var(--mint);border-radius:2px;animation:blink 1s infinite}

.sources{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.sources[hidden]{display:none}
.src{display:inline-flex;align-items:center;gap:8px;max-width:100%;font-size:12.5px;color:var(--ink-2);padding:6px 12px 6px 6px;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid var(--line);text-decoration:none;transition:.2s}
.src:hover{border-color:rgba(47,211,148,.5);color:var(--ink)}
.src b{flex:none;font-weight:600;font-size:11px;letter-spacing:.02em;color:#04140d;background:var(--mint);padding:2px 8px;border-radius:999px}
.src span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.acts{display:flex;gap:6px;margin-top:10px}
.acts[hidden]{display:none}
.act{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--ink-3);background:none;border:1px solid transparent;border-radius:999px;padding:5px 10px;cursor:pointer;transition:.2s}
.act:hover{color:var(--ink);border-color:var(--line-2)}
.act svg{width:14px;height:14px}

/* ---------- footer ---------- */
.foot{position:relative;z-index:2;border-top:1px solid var(--line)}
body.empty .foot{border-top-color:transparent}
body.chatting .foot{display:none}
.fbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:20px 0 26px;flex-wrap:wrap}
.made{display:inline-flex;align-items:center;gap:10px;font-size:14px;font-weight:500;color:var(--ink-2);text-decoration:none}
.made:hover{color:var(--ink)}
.made svg{width:22px;height:auto;color:var(--emerald)}
.flinks{display:flex;gap:20px;flex-wrap:wrap;font-size:14px;color:var(--ink-2)}
.flinks a{text-decoration:none}
.flinks a:hover{color:var(--ink)}

/* ---------- the planet (the chat page before the first message) ----------
   The glowing rim is the top edge of the footer, and the footer stands on the planet. The rim belongs to the page,
   not to the screen: fixed to the screen it ran through whatever words were 96 px from the bottom (a footer link,
   the note, a chip on a short phone), like a strike-through. Here everything above the footer is above the rim,
   and the footer's own words keep clear of the curve: on a circle of 1300 px radius the rim is 36 px below its
   top 300 px from the middle and 18 px below it 210 px out, so the words stay that near the middle (max-width)
   and start lower than that (padding-top). .limb cuts the disc off at the page's end and lets the glow rise 260 px.
   The disc's middle is the middle of the words: of the screen without its safe-area sides, should they differ. */
.limb{position:absolute;left:0;right:0;top:-260px;bottom:0;overflow:hidden;pointer-events:none;z-index:-1}
.horizon{position:absolute;left:calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right))/2);top:260px;width:2600px;height:2600px;transform:translateX(-50%);border-radius:50%;
  background:radial-gradient(closest-side,#05070a 97%,transparent 100%);
  box-shadow:0 -2px 0 rgba(47,211,148,.55),0 -18px 60px rgba(0,176,112,.45),0 -60px 180px rgba(25,198,192,.25),inset 0 30px 80px rgba(0,176,112,.12)}
/* The page of an earlier build had the disc inside the fixed sky: with this stylesheet it would lie across that
   page, so there it is not drawn. */
.sky .horizon{display:none}
.planet .fbar{justify-content:center;gap:12px 36px;max-width:600px;padding-top:46px}
.planet .flinks{justify-content:center}

/* ---------- plain pages (privacy, 404) ---------- */
.page{position:relative;z-index:2;flex:1;padding:30px 0 80px}
.doc{max-width:720px;margin:0 auto}
.doc .kicker{font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--mint);margin-bottom:12px}
.doc h1{font-size:clamp(36px,5vw,56px);text-align:left;margin:0 0 18px}
.doc h2{font-family:var(--display);font-weight:600;font-size:22px;letter-spacing:-.02em;margin:34px 0 10px}
.doc p,.doc li{color:var(--ink-2);font-size:16.5px}
.doc p + p{margin-top:12px}
.doc ul{padding-left:1.2em;margin-top:8px}
.doc li + li{margin-top:6px}
.doc a{color:var(--mint)}
.doc .card{margin-top:28px;padding:22px 24px;border-radius:20px;border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.02))}
.doc .btn-light{background:var(--ink);color:#05070a;margin-top:24px}

/* ---------- responsive ---------- */
@media (max-width:760px){
  .wrap{width:calc(100% - 32px)}
  .bar{height:62px}
  .brand svg{width:26px}
  .word{font-size:14px;letter-spacing:.2em}
  .switch{padding:6px 10px 6px 6px;font-size:13px;gap:7px}
  .switch .track{width:30px;height:18px}
  .switch .track::after{width:12px;height:12px}
  .switch input:checked + .track::after{left:15px}
  .btn{padding:8px 12px}
  #newchat span{display:none}
  body.empty .stage{justify-content:flex-start;padding:22px 0 28px}
  .orb{width:70px;height:63px;margin-bottom:18px}
  .orb svg{width:70px}
  .eyebrow{margin-bottom:18px;font-size:12.5px}
  h1{font-size:39px;letter-spacing:-.04em}
  .lede{font-size:16px;margin-top:16px}
  .hero{padding-bottom:24px}
  .askbox{min-height:58px;padding:6px 6px 6px 16px;border-radius:26px;gap:8px}
  .ask::before{border-radius:26px}
  .askbox .spark{margin-bottom:13px;width:18px;height:18px}
  .askbox textarea{font-size:16px;padding:11px 0}
  .send{width:44px;height:44px}
  .chips{gap:8px;margin-top:16px}
  .chip{font-size:13.5px;padding:8px 13px}
  .thread{gap:18px;padding-top:10px}
  .turn{grid-template-columns:28px 1fr;gap:10px}
  .av{width:28px;height:28px}
  .av svg{width:14px}
  .me{max-width:92%;font-size:15.5px}
  .md{font-size:15.5px}
  .src span{max-width:200px}
  .fbar{padding:16px 0 22px}
  .planet .fbar{max-width:420px;padding-top:30px;gap:8px 18px}
  /* On a phone the footer's links stand in the same rows as "Made by Dominares" (two rows, not three). */
  .planet .flinks{display:contents}
}
/* ---------- the planet on the first screen ----------
   On a laptop (1366x768, 1280x720) and in a phone's browser with its bars showing (390x664) the first screen
   ended above the footer: no rim, no glow, only dark sky under the chips. Where the screen is short the hero
   stands closer together, so that the rim and its glow are part of the first screen. Nothing changes on a
   taller screen. */
@media (min-width:761px) and (max-height:840px){
  body.empty .stage{padding:0 0 18px}
  body.empty .hero{padding:4px 0 22px}
  body.empty .orb{width:76px;height:68px;margin-bottom:16px}
  body.empty .orb::before{inset:-36px}
  body.empty .orb svg{width:76px}
  body.empty .eyebrow{margin-bottom:16px}
  body.empty h1{font-size:clamp(44px,min(6.2vw,9.4vh),86px)}
  body.empty .lede{margin-top:14px}
  body.empty .chips{margin-top:16px}
  body.empty .note{margin-top:12px}
}
@media (max-width:760px) and (max-height:740px){
  body.empty .stage{padding:8px 0 14px}
  body.empty .hero{padding:4px 0 16px}
  body.empty .orb{width:56px;height:50px;margin-bottom:12px}
  body.empty .orb::before{inset:-30px}
  body.empty .orb svg{width:56px}
  body.empty .eyebrow{margin-bottom:12px;padding:4px 12px 4px 6px}
  body.empty h1{font-size:35px}
  body.empty .lede{font-size:15px;margin-top:10px}
  body.empty .chips{gap:6px;margin-top:12px}
  body.empty .chip{font-size:13px;padding:6px 11px}
  body.empty .note{margin-top:10px}
}
/* ---------- D2: composer tools, attachments, menu ---------- */
.me-wrap{align-self:flex-end;max-width:86%;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.me-photo{max-width:min(260px,100%);max-height:260px;border-radius:16px;border:1px solid var(--line-2);object-fit:cover}
.me-tag{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-2);padding:4px 10px;border-radius:999px;border:1px solid var(--line-2);background:rgba(255,255,255,.04)}
.me-tag svg{width:14px;height:14px;color:var(--mint)}
.tool-btn{flex:none;width:42px;height:42px;margin-bottom:3px;border-radius:50%;border:1px solid transparent;background:none;color:var(--ink-2);display:grid;place-items:center;cursor:pointer;transition:.2s}
.tool-btn svg{width:20px;height:20px}
.tool-btn:hover,.tool-btn.on{color:var(--ink);background:rgba(255,255,255,.06);border-color:var(--line)}
.tool-btn.on svg{transform:rotate(45deg)}
.tool-btn svg{transition:transform .2s}
#plus{margin-left:-12px;color:var(--mint)}
.tool-btn.rec{color:#05070a;background:var(--mint);animation:recpulse 1.2s ease-in-out infinite}
.tool-btn.busy{opacity:.5;pointer-events:none}
@keyframes recpulse{50%{box-shadow:0 0 0 8px rgba(47,211,148,.18)}}
.voice-btn{color:var(--mint)}
.tool-btn[hidden]{display:none}
.send.stop{background:var(--ink)}
.send.stop svg{display:none}
.send.stop::after{content:"";width:14px;height:14px;border-radius:3px;background:#05070a}
.attach{display:flex;flex-wrap:wrap;gap:8px;max-width:780px;margin:0 auto 10px}
.attach[hidden]{display:none}
.pill{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:500;color:var(--ink);padding:5px 6px 5px 10px;border-radius:999px;border:1px solid rgba(47,211,148,.45);background:rgba(10,30,22,.75);backdrop-filter:blur(10px)}
.pill svg{width:15px;height:15px;color:var(--mint)}
.pill.photo{padding-left:5px}
.pill img{width:30px;height:30px;border-radius:50%;object-fit:cover}
.pill span{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pill-x{width:24px;height:24px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:var(--ink-2);display:grid;place-items:center;cursor:pointer}
.pill-x svg{width:12px;height:12px;color:inherit}
.pill-x:hover{background:rgba(255,255,255,.16);color:#fff}
.menu{position:absolute;left:0;bottom:calc(100% + 10px);z-index:30;width:min(340px,100%);padding:8px;border-radius:22px;border:1px solid var(--line-2);background:rgba(12,17,22,.96);backdrop-filter:blur(18px);box-shadow:0 30px 80px -20px rgba(0,0,0,.9),0 0 40px -10px rgba(0,176,112,.3);display:grid;gap:2px}
body.empty .menu{bottom:auto;top:calc(100% + 10px)}
/* There the menu hangs below the ask box and can be the last thing on the page. This empty box under it is as
   tall as the home indicator's inset (nothing at all where there is none), so the page scrolls that much further
   and the last line of the menu comes clear of the indicator. */
body.empty .menu::after{content:"";position:absolute;left:0;top:100%;width:1px;height:env(safe-area-inset-bottom);pointer-events:none}
.menu[hidden]{display:none}
.menu button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:9px 10px;border:0;border-radius:14px;background:none;cursor:pointer;color:var(--ink)}
.menu button:hover,.menu button:focus-visible{background:rgba(47,211,148,.09);outline:none}
.menu i{flex:none;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-style:normal;font-weight:700;color:var(--mint);background:rgba(47,211,148,.09);border:1px solid rgba(47,211,148,.22)}
.menu b{display:block;font-weight:600;font-size:14.5px}
.menu small{display:block;font-size:12.5px;color:var(--ink-3)}
.study-link{padding:8px 14px}
.chip{font-family:var(--body)}
button.chip{font:500 14px var(--body)}

/* answers: pictures, brief card, actions */
.media:empty{display:none}
.media{margin:4px 0 12px}
.art{margin:0;max-width:520px}
.art img{display:block;width:100%;height:auto;border-radius:18px;border:1px solid var(--line-2);box-shadow:0 24px 60px -24px rgba(0,0,0,.9),0 0 40px -16px rgba(0,176,112,.45);background:#0b1015}
.art figcaption{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;font-size:13px;color:var(--ink-3)}
.art figcaption span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.art .act{text-decoration:none;flex:none}
.act.on{color:var(--mint);border-color:rgba(47,211,148,.45)}
.acts{flex-wrap:wrap}
.brief{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.brief section{padding:16px 16px 14px;border-radius:18px;border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.02))}
.brief h4{font-family:var(--display);font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mint);margin-bottom:8px}
.brief p{font-size:14px;color:var(--ink-2)}
.brief p + p{margin-top:6px}
.b-big{font-family:var(--display);font-size:22px!important;line-height:1.2;color:var(--ink)!important;font-weight:600}
.b-alert{color:#ffd27a!important}
.brief ul{list-style:none;display:grid;gap:9px}
.brief li a{font-size:14px;line-height:1.35;color:var(--ink);text-decoration:none;display:block}
.brief li a:hover{color:var(--mint)}
.brief li small{font-size:11.5px;color:var(--ink-3)}
.b-road{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;text-decoration:none;padding:8px 0;border-top:1px solid var(--line)}
.b-road:first-of-type{border-top:0;padding-top:0}
.b-road b{grid-row:span 2;align-self:start;margin-top:2px;font-family:var(--display);font-size:13px;color:#04140d;background:var(--mint);padding:4px 9px;border-radius:999px}
.b-road span{font-size:15px;font-weight:600;color:var(--ink)}
.b-road small{font-size:12px;color:var(--ink-3)}
.b-road:hover small{color:var(--mint)}

/* toast + share sheet */
.toast{position:fixed;left:calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right))/2);bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);opacity:0;z-index:60;max-width:min(520px,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));padding:11px 18px;border-radius:999px;background:rgba(242,245,247,.96);color:#05070a;font-size:14px;font-weight:500;box-shadow:0 20px 50px -10px rgba(0,0,0,.7);transition:.25s;pointer-events:none;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
/* A dialog is placed by the screen, not by the page: it gets the safe part of the screen to stand in. With no
   insets these are the browser's own numbers for a dialog (inset 0, max-height 100% - 6px - 2em). */
.sheet{margin:auto;border:0;padding:0;background:none;color:var(--ink);inset:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);max-width:min(460px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(100% - 6px - 2em - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.sheet::backdrop{background:rgba(2,4,6,.72);backdrop-filter:blur(6px)}
.sheet-in{padding:18px;border-radius:24px;border:1px solid var(--line-2);background:#0b1015;box-shadow:0 40px 100px -20px #000}
.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-family:var(--display);font-size:17px}
.sheet img{display:block;width:100%;height:auto;border-radius:14px;border:1px solid var(--line)}
.sheet-acts{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.btn-light{background:var(--ink);color:#05070a}
.btn-light:hover{background:var(--mint)}
.icon-btn{width:34px;height:34px;border-radius:50%;border:1px solid var(--line-2);background:none;color:var(--ink-2);display:grid;place-items:center;cursor:pointer}
.icon-btn svg{width:16px;height:16px}
.fine{font-size:12.5px;color:var(--ink-3);margin-top:12px}

/* report this answer: the form in a sheet, then its thank-you (openReport in ui.js) */
.report{display:block}
.rp-reasons{border:0;display:grid;gap:8px;margin:2px 0 14px;min-width:0}
.rp-reasons legend{font-size:14px;color:var(--ink-2);margin-bottom:10px;padding:0}
.rp-reason{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1px solid var(--line-2);background:rgba(255,255,255,.03);cursor:pointer;font-size:15px;line-height:1.3}
.rp-reason:hover{border-color:rgba(47,211,148,.45)}
.rp-reason input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--emerald)}
.rp-reason:has(input:checked){border-color:rgba(47,211,148,.65);background:rgba(47,211,148,.09)}
.rp-note{display:block}
.rp-note span{display:block;font-size:14px;color:var(--ink-2);margin-bottom:6px}
.rp-note textarea{display:block;width:100%;min-height:76px;max-height:160px;resize:vertical;padding:10px 12px;border-radius:14px;border:1px solid var(--line-2);background:rgba(0,0,0,.35);color:var(--ink);font:500 16px/1.4 var(--body)}
.rp-note textarea:focus-visible{outline:2px solid var(--mint);outline-offset:1px}
.rp-count{font-size:12px;color:var(--ink-3);text-align:right;margin-top:4px}
.rp-what{margin-top:6px}
.rp-what a,.rp-err a{color:var(--mint)}
.rp-err{margin-top:10px;font-size:14px;color:#ffd27a}
.rp-err[hidden]{display:none}
.rp-thanks{font-size:15.5px;color:var(--ink-2)}
.btn[disabled]{opacity:.45;cursor:default}
.act[disabled]{opacity:.7;cursor:default}
.act[disabled]:hover{color:var(--ink-3);border-color:transparent}
.set-report{justify-content:flex-end}

/* voice mode. It covers the screen and keeps its words and buttons in the safe part of it. On a screen shorter
   than it is tall (a phone on its side) it scrolls: its buttons used to end up below the screen there. */
.voice{position:fixed;inset:0;z-index:50;display:grid;place-items:center;overflow-y:auto;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:radial-gradient(ellipse at 50% 30%,rgba(0,120,80,.35),rgba(5,7,10,.96) 60%);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.voice[hidden]{display:none}
.vin{text-align:center;padding:24px;max-width:560px;width:100%}
.vkick{font-size:12.5px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--mint);margin-bottom:34px}
.vorb{--lvl:0;position:relative;width:180px;height:180px;margin:0 auto 34px;border-radius:50%;border:1px solid rgba(47,211,148,.5);background:radial-gradient(circle at 35% 30%,#123f2e,#04110c 70%);display:grid;place-items:center;cursor:pointer;color:var(--emerald);
  box-shadow:0 0 calc(40px + var(--lvl) * 120px) calc(var(--lvl) * 30px) rgba(0,176,112,.55),inset 0 0 40px rgba(47,211,148,.25);transform:scale(calc(1 + var(--lvl) * .12));transition:transform .08s,box-shadow .08s}
.vorb svg{width:84px;height:auto;filter:drop-shadow(0 0 18px rgba(47,211,148,.6))}
.vorb::after{content:"";position:absolute;inset:-14px;border-radius:50%;border:1px solid rgba(47,211,148,.25);animation:ring 2.4s ease-out infinite}
.voice[data-state="thinking"] .vorb::after{animation-duration:1s}
.voice[data-state="speaking"] .vorb{animation:speakpulse 1.1s ease-in-out infinite}
.voice[data-state="idle"] .vorb::after{animation:none;opacity:0}
@keyframes ring{from{transform:scale(.92);opacity:.9}to{transform:scale(1.35);opacity:0}}
@keyframes speakpulse{50%{box-shadow:0 0 90px 18px rgba(25,198,192,.5),inset 0 0 40px rgba(47,211,148,.3)}}
.vstate{font-family:var(--display);font-size:30px;font-weight:600;letter-spacing:-.02em}
.vsaid{min-height:48px;margin-top:10px;color:var(--ink-2);font-size:16px}
.vacts{display:flex;gap:10px;justify-content:center;margin-top:22px;flex-wrap:wrap}
body.voicing{overflow:hidden}

@media (max-width:760px){
  .study-link{display:none}
  .actions{gap:6px}
  .switch .lbl{font-size:12.5px}
  .tool-btn{width:38px;height:38px;margin-bottom:3px}
  .tool-btn svg{width:19px;height:19px}
  #plus{margin-left:-8px}
  .brief{grid-template-columns:1fr}
  .art{max-width:100%}
  .menu{width:100%}
  .pill span{max-width:150px}
  .vorb{width:150px;height:150px}
  .vstate{font-size:26px}
}
@media (max-width:400px){
  .word{display:none}
  .askbox{gap:4px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
