/* Berri Clean Editorial Shell: Zero aurora clutter, crisp hairlines, warm ivory & terracotta */
* { 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 .97rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
a { color: var(--accent-cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[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, 68rem); margin-inline: auto; min-width: 0; }
.b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.b-card {
  background: var(--bg-surface-2); border: 1px solid var(--border); border-radius: var(--b-radius);
  padding: clamp(1rem, 2.4vw, 1.4rem); min-width: 0;
  box-shadow: 0 1px 2px rgb(26 25 23 / .04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.b-card:hover { border-color: color-mix(in srgb, var(--brand-berry) 38%, var(--border)); box-shadow: 0 6px 20px -12px rgb(26 25 23 / .14); }
.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; gap: .45rem;
  min-height: 40px; padding: .45rem 1.05rem; border: 1px solid var(--b-action); border-radius: 999px;
  background: var(--b-action); color: var(--b-on-action); text-decoration: none;
  font: 500 .88rem/1 var(--font-body); transition: background-color .16s ease, opacity .16s ease;
}
.b-button:hover { opacity: .92; }
.b-button:disabled { opacity: .55; cursor: default; }
.b-button-quiet { border-color: var(--border); background: var(--bg-surface-2); color: var(--ink-primary); }
.b-button-quiet:hover { background: var(--bg-surface-1); }
.b-top { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); background: var(--bg-glass); backdrop-filter: blur(10px); }
.b-top .b-wrap { min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding-block: .4rem; }
.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(--brand-berry), var(--accent-cyan), var(--brand-berry)); 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-1); }
.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: var(--bg-surface-2); padding: .45rem .65rem; max-width: 100%; width: 15ch; font: 600 clamp(1.15rem, 5vw, 1.5rem)/1.5 var(--font-mono); letter-spacing: .35ch; }
.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) {
  .b-stream::before { animation: none; }
  .b-button, .b-card { transition: none; }
}
