* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body { position: relative; isolation: isolate; margin: 0; background: var(--bg-canvas); color: var(--ink-primary); font: 400 1rem/1.6 var(--font-body); }
body::before, body::after { content: ""; position: fixed; inset: -18%; z-index: 0; pointer-events: none; border-radius: 50%; }
body::before { background: radial-gradient(ellipse at 30% 35%, var(--aurora-berry), transparent 58%), radial-gradient(ellipse at 72% 58%, var(--aurora-indigo), transparent 62%); animation: b-aurora-drift 24s ease-in-out infinite alternate; }
body::after { background: radial-gradient(ellipse at 62% 35%, var(--aurora-cyan), transparent 55%), radial-gradient(ellipse at 35% 72%, var(--aurora-rose), transparent 60%), radial-gradient(ellipse at 78% 78%, var(--aurora-gold), transparent 58%); animation: b-aurora-drift-alt 20s ease-in-out infinite alternate; }
body > :where(:not(style):not(script):not(a)) { position: relative; z-index: 1; }
body > a { z-index: 1; }
@keyframes b-aurora-drift { from { transform: translate3d(-2%, -1%, 0) scale(.98); } to { transform: translate3d(2%, 1%, 0) scale(1.04); } }
@keyframes b-aurora-drift-alt { from { transform: translate3d(1.5%, 1%, 0) scale(1.02); } to { transform: translate3d(-1.5%, -1%, 0) scale(.98); } }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.65rem); }
a { color: var(--accent-cyan); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 0; box-shadow: 0 0 0 2px rgb(225 29 98 / .45), 0 0 18px rgb(99 102 241 / .24); }
:where(.b-card, form):focus-within { box-shadow: 0 0 0 2px rgb(225 29 98 / .3), 0 0 24px rgb(99 102 241 / .16); }
[hidden] { display: none !important; }
img { max-width: 100%; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
code, pre { font-family: var(--font-mono); }
.b-wrap { width: min(100% - 2rem, 73rem); margin-inline: auto; min-width: 0; }
.b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.b-card { background: var(--bg-card-glass); border: 1px solid var(--border); border-radius: var(--b-radius); padding: clamp(1rem, 3vw, 1.5rem); min-width: 0; backdrop-filter: blur(18px); transition: transform .25s ease; }
.b-card:hover, .b-source-rail a:hover { transform: translate3d(0, -1px, 0); border-color: color-mix(in srgb, var(--brand-berry) 55%, var(--accent-indigo)); box-shadow: 0 8px 28px rgb(99 102 241 / .12); }
.b-card > :first-child { margin-top: 0; }
.b-card > :last-child { margin-bottom: 0; }
.b-button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .45rem .9rem; border: 1px solid var(--b-action); border-radius: .65rem; background: var(--b-action); color: var(--b-on-action); text-decoration: none; font-weight: 650; transition: transform .22s ease; }
.b-button:hover { transform: translate3d(0, -2px, 0); box-shadow: 0 8px 24px rgb(225 29 98 / .2), 0 4px 18px rgb(99 102 241 / .2); }
.b-button:disabled { opacity: .65; cursor: default; }
.b-button-quiet { border-color: var(--border); background: var(--bg-surface-2); color: var(--ink-primary); }
.b-top { border-bottom: 1px solid var(--border); background: var(--bg-glass); backdrop-filter: blur(18px); }
.b-top .b-wrap { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; padding-block: .55rem; }
.b-muted { color: var(--ink-secondary); }
.b-stream { position: relative; display: block; block-size: 2px; overflow: hidden; background: transparent; }
.b-stream::before { content: ""; position: absolute; inset: 0; width: 200%; background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan), var(--accent-indigo)); animation: b-stream 1.3s linear infinite; }
@keyframes b-stream { to { transform: translate3d(-50%, 0, 0); } }
.b-citation { display: inline-block; padding: 0 .35em; border: 1px solid var(--border); border-radius: .4em; font: .85em/1.55 var(--font-mono); text-decoration: none; background: var(--bg-surface-2); }
.b-source-rail ol { display: flex; gap: .6rem; padding: .25rem .25rem .7rem; overflow-x: auto; list-style: none; }
.b-source-rail li { flex: 0 0 auto; max-width: 16rem; overflow-wrap: anywhere; }
.b-source-rail a { display: block; border: 1px solid var(--border); border-radius: .6rem; padding: .65rem; background: var(--bg-surface-2); }
.b-artifact-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 64rem) { .b-artifact-layout { grid-template-columns: minmax(0, 48fr) minmax(0, 52fr); } }
.b-otp { display: grid; gap: .5rem; max-width: 100%; }
.b-otp input { color: var(--ink-primary); border: 1px solid var(--border); border-radius: .65rem; background: repeating-linear-gradient(90deg, var(--bg-surface-2) 0 2.08ch, var(--bg-canvas) 2.08ch 2.33ch); padding: .45rem .5ch; max-width: 100%; width: 15ch; font: 600 clamp(1.15rem, 5vw, 1.6rem)/1.5 var(--font-mono); letter-spacing: 1.33ch; }
.b-cost { display: grid; gap: .35rem; font-variant-numeric: tabular-nums; }
.b-cost meter { width: 100%; accent-color: var(--status-emerald); }
.b-channel { --channel-bg: #101e1c; --channel-bubble: #20483d; padding: 1rem; border: 1px solid #33564a; border-radius: var(--b-radius); background: var(--channel-bg); color: #f3fff9; }
.b-channel[data-channel="ig"] { --channel-bg: #1c1426; --channel-bubble: #412b58; border-color: #5d4476; }
.b-channel header { display: flex; align-items: center; gap: .65rem; font-weight: 650; }
.b-channel header img { border-radius: 50%; }
.b-channel ol { display: grid; gap: .65rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.b-channel li { justify-self: start; display: grid; gap: .45rem; max-width: min(100%, 19rem); padding: .6rem .8rem; border-radius: .75rem; background: #30384a; }
.b-channel li[data-direction="out"] { justify-self: end; background: var(--channel-bubble); }
.b-channel audio { width: min(15rem, 100%); }
.b-channel img { border-radius: .5rem; }
.b-channel a { color: #d3f6fc; }
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .b-stream::before { animation: none; }
  .b-button, .b-card { transition: none; }
}
