:root {
  --bg: #0d0d0d;
  --side: #171717;
  --surface: #1f1f1f;
  --surface-2: #2a2a2a;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ececec;
  --muted: #a3a3a3;
  --faint: #6b6b6b;
  --accent: #ffffff;
  --swarm: #8ab4ff;
  --swarm-soft: rgba(138, 180, 255, 0.1);
  --ok: #6ee7a8;
  --warn: #fbbf77;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--swarm); }

.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100dvh; }

/* Sidebar */
.side { background: var(--side); display: flex; flex-direction: column; padding: 12px 10px; gap: 10px; min-height: 0; }
.side-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; }
.brand { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: 0.06em; font-family: var(--mono); }
.brand img { border-radius: 8px; }
.new-chat { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: left; transition: background 0.15s; }
.new-chat:hover { background: var(--surface); }
.history { flex: 1; overflow-y: auto; overflow-x: hidden; display: grid; align-content: start; gap: 2px; margin-top: 6px; }
.history-label { font-size: 12px; color: var(--faint); padding: 10px 10px 4px; }
.conv { min-width: 0; display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 0 4px 0 10px; color: var(--muted); }
.conv:hover, .conv.on { background: var(--surface); color: var(--text); }
.conv button.open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.conv button.del { opacity: 0; background: none; border: 0; color: var(--faint); padding: 4px; border-radius: 6px; }
.conv:hover button.del { opacity: 1; }
.conv button.del:hover { color: var(--text); background: var(--surface-2); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 6px 4px; display: grid; gap: 8px; }
.runs { display: grid; gap: 6px; }
.runs-dots { display: flex; gap: 6px; }
.runs-dots span { width: 22px; height: 6px; border-radius: 3px; background: var(--swarm); }
.runs-dots span.used { background: var(--surface-2); }
.runs-text { font-size: 13px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--faint); font-size: 13px; text-align: left; }
.linkish:hover { color: var(--text); }

/* Main */
.main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; }
.bar-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beta { margin-left: auto; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); display: inline-flex; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.only-mobile { display: none; }

.thread { overflow-y: auto; padding: 8px 20px 24px; }
.col { max-width: 760px; margin: 0 auto; display: grid; gap: 28px; }

/* Empty state */
.empty { min-height: 100%; display: grid; place-content: center; text-align: center; gap: 28px; padding: 24px 0 40px; }
.empty-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; }
.empty h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.empty p { margin: 8px 0 0; color: var(--muted); }
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 0 auto; text-align: left; }
.idea { text-align: left; align-content: start; background: transparent; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; transition: background 0.15s, border-color 0.15s; }
.idea:hover { background: var(--surface); border-color: rgba(255, 255, 255, 0.16); }
.idea b { font-weight: 500; font-size: 14px; }
.idea span { color: var(--faint); font-size: 13px; }
.idea .chip { justify-self: start; margin-bottom: 4px; }

/* Messages */
.msg-user { justify-self: end; max-width: 80%; background: var(--surface-2); border-radius: 20px; padding: 10px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-ai { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.swarm { background: var(--swarm-soft); border-color: rgba(138, 180, 255, 0.35); color: var(--swarm); }
.ai-body { min-width: 0; display: grid; gap: 14px; padding-top: 3px; }
.who { font-size: 13px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.chip { font-size: 11px; font-weight: 500; letter-spacing: 0.02em; border-radius: 999px; padding: 2px 9px; background: var(--surface-2); color: var(--muted); }
.chip.swarm { background: var(--swarm-soft); color: var(--swarm); }
.error { color: var(--warn); }

.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 12px; }
.md h1, .md h2, .md h3, .md h4 { margin: 20px 0 8px; font-weight: 600; line-height: 1.3; }
.md h1 { font-size: 20px; } .md h2 { font-size: 18px; } .md h3, .md h4 { font-size: 16px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md pre { font-family: var(--mono); font-size: 13px; background: var(--side); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 0 0 12px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.typing { display: inline-flex; gap: 5px; padding: 10px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Swarm cards */
.card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 12px; background: linear-gradient(180deg, rgba(138, 180, 255, 0.05), transparent 70%); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .title { font-weight: 500; }
.card-sub { color: var(--muted); font-size: 14px; margin: 0; }
.brief { color: var(--muted); font-size: 14px; background: rgba(0, 0, 0, 0.25); border-radius: 10px; padding: 10px 12px; margin: 0; max-height: 7.5em; overflow: hidden; position: relative; white-space: pre-wrap; }
.brief.open { max-height: none; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 500; font-size: 14px; background: var(--surface-2); }
.btn.primary { background: var(--accent); color: #000; }
.btn.primary:hover { background: #dcdcdc; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.meta { color: var(--faint); font-size: 13px; }
.notice { font-size: 13px; color: var(--warn); margin: 0; }

.progress { display: grid; gap: 10px; }
.status-line { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--swarm-soft); border-top-color: var(--swarm); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar-track { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; background: var(--swarm); border-radius: 2px; transition: width 0.6s ease; }
.bar-fill.indeterminate { width: 30% !important; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.done-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #000; display: grid; place-items: center; font-size: 11px; flex: none; }

details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "›"; display: inline-block; transition: transform 0.15s; font-size: 16px; line-height: 1; }
details.more[open] summary::before { transform: rotate(90deg); }
.agents { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.agent { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.agent .avatar { width: 28px; height: 28px; font-size: 11px; font-family: var(--mono); }
.agent b { font-weight: 500; }
.agent p { margin: 2px 0 0; color: var(--faint); }
.state { font-size: 12px; border-radius: 999px; padding: 1px 8px; background: var(--surface-2); color: var(--muted); margin-left: 6px; }
.state.ok { color: var(--ok); background: rgba(110, 231, 168, 0.1); }
.state.bad { color: var(--warn); background: rgba(251, 191, 119, 0.1); }
.links { font-size: 12px; color: var(--faint); margin: 10px 0 0; }
.links a { color: var(--muted); }

.result { display: grid; gap: 12px; }
.result img, .result video { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.result audio { width: 100%; }

/* Composer */
.composer-wrap { padding: 0 20px 14px; }
.composer { position: relative; max-width: 760px; margin: 0 auto; display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 10px 10px 10px 18px; transition: border-color 0.15s; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mode-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.mode-btn:hover, .mode-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.mode-btn.swarm { color: var(--swarm); border-color: rgba(138, 180, 255, 0.35); background: var(--swarm-soft); }
.mode-pop { position: absolute; left: 8px; bottom: calc(100% + 10px); width: min(300px, calc(100vw - 40px)); background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: 14px 16px 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); z-index: 5; display: grid; gap: 10px; }
.mode-pop[hidden] { display: none; }
.mode-title { justify-self: center; font-weight: 600; font-size: 14px; background: var(--surface-2); border-radius: 8px; padding: 3px 10px; }
.mode-track { position: relative; height: 30px; border-radius: 15px; background: var(--surface-2); cursor: pointer; outline: none; touch-action: none; }
.mode-track:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.mode-stop { position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); transform: translate(-50%, -50%); }
.mode-stop[data-stop="0"] { left: 15px; } .mode-stop[data-stop="1"] { left: 50%; } .mode-stop[data-stop="2"] { left: calc(100% - 15px); }
.mode-knob { position: absolute; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transform: translateX(-50%); transition: left 0.18s ease, background 0.18s; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.mode-knob.swarm { background: var(--swarm); }
.mode-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.mode-labels span { cursor: pointer; }
.mode-labels span.on { color: var(--text); }
.mode-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.composer:focus-within { border-color: rgba(255, 255, 255, 0.22); }
.composer textarea { width: 100%; background: transparent; border: 0; outline: 0; resize: none; padding: 6px 0; max-height: 200px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--faint); }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #000; display: grid; place-items: center; flex: none; transition: opacity 0.15s; }
.send:disabled { opacity: 0.25; cursor: default; }
.foot { position: relative; display: flex; justify-content: center; }
.fineprint { text-align: center; font-size: 12px; color: var(--faint); margin: 10px auto 0; max-width: 560px; }
.explore { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; transition: color 0.15s, background 0.15s; }
.explore:hover { color: var(--text); background: var(--surface); }
@media (max-width: 1100px) {
  .foot { flex-direction: column; align-items: center; gap: 8px; }
  .explore { position: static; }
}

/* Modal */
.modal { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 460px; width: calc(100% - 32px); }
.modal::backdrop { background: rgba(0, 0, 0, 0.6); }
.modal h3 { margin: 0 0 12px; font-weight: 600; }
.modal ol { margin: 0 0 20px; padding-left: 20px; color: var(--muted); display: grid; gap: 10px; }
.modal b { color: var(--text); font-weight: 500; }

.scrim { display: none; }

/* Info tooltip */
.runs-line { display: flex; align-items: center; gap: 6px; }
.info { position: relative; display: inline-flex; }
.info-btn { background: none; border: 0; padding: 2px; color: var(--faint); display: inline-flex; border-radius: 50%; }
.info-btn:hover, .info-btn:focus-visible { color: var(--text); }
.info-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-30%); width: 250px; background: var(--surface-2); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; color: var(--muted); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); display: grid; gap: 8px; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; z-index: 30; }
.info-tip::after { content: ""; position: absolute; top: 100%; left: 30%; border: 7px solid transparent; border-top-color: var(--surface-2); }
.info-tip b { color: var(--text); font-weight: 500; }
.info:hover .info-tip, .info:focus-within .info-tip { opacity: 1; visibility: visible; }
.tip-link { justify-self: start; background: none; border: 0; padding: 0; color: var(--swarm); font-size: 13px; font-weight: 500; }
.tip-link:hover { text-decoration: underline; }

/* Pay drawer */
.app.pay { grid-template-columns: 260px minmax(0, 1fr) 420px; }
.drawer { display: none; background: var(--side); border-left: 1px solid var(--line); min-height: 0; flex-direction: column; }
.app.pay .drawer { display: flex; animation: drawer-in 0.2s ease; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 22px; }
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.drawer-body { overflow-y: auto; padding: 4px 22px 28px; display: grid; gap: 18px; align-content: start; }
.lead { margin: 0; color: var(--muted); }
.lead b { color: var(--text); font-weight: 500; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.steps b { font-weight: 500; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--swarm-soft); color: var(--swarm); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.soon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.newbie { border: 1px solid rgba(138, 180, 255, 0.25); border-radius: 16px; background: linear-gradient(180deg, var(--swarm-soft), transparent 60%); }
.newbie summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.newbie summary::-webkit-details-marker { display: none; }
.newbie summary b { color: var(--swarm); font-weight: 500; }
.newbie[open] summary b { display: none; }
.newbie > section, .newbie > .einstein { padding: 0 16px; }
.newbie > section:last-child { padding-bottom: 16px; }
.newbie h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
.newbie p, .newbie li { font-size: 14px; color: var(--muted); }
.newbie p { margin: 0 0 8px; }
.newbie ol, .newbie ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.newbie b { color: var(--text); font-weight: 500; }
.newbie code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.newbie a { font-size: 13px; }
.einstein { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; }
.einstein img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; }
.bubble { margin: 0 !important; background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 10px 12px; color: var(--text) !important; font-style: italic; }
.copy { display: inline-flex; align-items: center; gap: 8px; margin: 6px 8px 4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.copy:hover { color: var(--text); }
.copy code { background: none; padding: 0; }
.warn { margin-top: 8px; }
.warn h3 { color: var(--warn); }
.quote { margin-top: 12px !important; padding: 12px 14px; border-left: 2px solid var(--swarm); background: rgba(0, 0, 0, 0.2); border-radius: 0 10px 10px 0; color: var(--text) !important; font-style: italic; }
.quote span { display: block; margin-top: 4px; font-style: normal; color: var(--faint); font-size: 12px; }

@media (max-width: 820px) {
  .app.pay { grid-template-columns: minmax(0, 1fr); }
  .app.pay .drawer { position: fixed; inset: 0; z-index: 40; border-left: 0; }
  .info-tip { transform: translateX(-20%); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 20; transform: translateX(-100%); transition: transform 0.2s ease; }
  .app.menu .side { transform: none; }
  .app.menu .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 10; }
  .only-mobile { display: inline-flex; }
  .bar { padding: 10px 12px; }
  .thread { padding: 8px 16px 20px; }
  .composer-wrap { padding: 0 12px 12px; }
  .ideas { grid-template-columns: minmax(0, 1fr); }
  .idea:nth-child(n + 3) { display: none; }
  .msg-user { max-width: 88%; }
  .msg-ai { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .msg-ai > .avatar { display: none; }
  .empty h1 { font-size: 24px; }
}

/* Follow-up suggestions */
.followups { display: flex; flex-wrap: wrap; gap: 8px; }
.followup { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.followup:hover { background: var(--surface); color: var(--text); border-color: rgba(255, 255, 255, 0.18); }

/* Website result */
.site-card { display: grid; gap: 12px; }
.site-hero { display: flex; align-items: center; gap: 14px; border: 1px solid rgba(138, 180, 255, 0.3); background: var(--swarm-soft); border-radius: 14px; padding: 16px; }
.site-hero b { font-weight: 500; }
.site-hero p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.site-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); color: var(--swarm); display: grid; place-items: center; flex: none; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
a.btn.primary { color: #000; }

/* Language selector */
.side-links { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lang { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); border-radius: 8px; padding: 2px 4px 2px 6px; }
.lang:hover, .lang:focus-within { color: var(--text); background: var(--surface); }
.lang select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font-size: 13px; padding: 2px 2px; cursor: pointer; outline: none; max-width: 150px; }
.lang select option { background: var(--surface); color: var(--text); }

/* Free-model notice in the header */
.info-down { margin-left: auto; }
.info-down .beta { margin-left: 0; display: inline-flex; align-items: center; gap: 6px; background: transparent; font: inherit; font-size: 12px; color: var(--muted); cursor: default; }
.info-down .beta:hover, .info-down .beta:focus-visible { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }
.info-down .info-tip { display: block; top: calc(100% + 10px); bottom: auto; left: auto; right: 0; transform: none; width: 280px; }
.info-down .info-tip::after { top: auto; bottom: 100%; left: auto; right: 18px; border-top-color: transparent; border-bottom-color: var(--surface-2); }

/* Swarm shortcut in the sidebar */
.runs-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; width: 100%; background: transparent; border: 1px solid rgba(138, 180, 255, 0.35); color: var(--swarm); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 500; transition: background 0.15s, color 0.15s; }
.runs-toggle:hover { background: var(--swarm-soft); }
.runs-toggle.on { background: var(--swarm); color: #0b1220; border-color: var(--swarm); }

/* Warning above the composer while Swarm mode is on */
.swarm-alert { max-width: 760px; margin: 0 auto 10px; display: block; background: var(--swarm-soft); border: 1px solid rgba(138, 180, 255, 0.35); border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.swarm-alert[hidden] { display: none; }
.swarm-alert b { color: var(--text); font-weight: 500; }
.swarm-alert.empty { background: rgba(251, 191, 119, 0.08); border-color: rgba(251, 191, 119, 0.35); }
.swarm-alert .tip-link { display: inline; margin-left: 4px; }
/* Long conversation titles must shrink, not push the header wider than the screen. */
.bar-title { flex: 1; min-width: 0; }
.info-down { flex: none; margin-left: 0; }
.main { grid-template-columns: minmax(0, 1fr); }

/* Hackathon banner: one thin, dismissible terminal-style line above the header */
.top { display: grid; min-width: 0; }
.promo { position: relative; display: flex; align-items: center; justify-content: center; padding: 7px 40px 7px 16px; background: #050505; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.promo[hidden] { display: none; }
.promo-link { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; color: inherit; text-decoration: none; }
.promo-link b { font-weight: 500; color: var(--text); }
.promo-link b:first-child { color: var(--text); }
.promo-link b:first-child::before { content: "[ "; color: var(--faint); }
.promo-link b:first-child::after { content: " ]"; color: var(--faint); }
.promo-link b:last-child { color: #6ee7a8; }
.promo-live { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a8; box-shadow: 0 0 8px rgba(110, 231, 168, 0.8); animation: promo-blink 1.6s ease-in-out infinite; flex: none; }
@keyframes promo-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.promo-cta { color: var(--swarm); text-transform: none; letter-spacing: 0.02em; font-family: var(--sans); font-size: 12px; white-space: nowrap; }
.promo-link:hover .promo-cta { text-decoration: underline; }
.promo-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); padding: 4px; border-radius: 6px; display: inline-flex; }
.promo-x:hover { color: var(--text); background: var(--surface); }
@media (max-width: 820px) { .promo { font-size: 10.5px; letter-spacing: 0.05em; } }

/* Sign in with X */
.x-account { display: grid; gap: 6px; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.x-account[hidden] { display: none; }
.x-signin { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #fff; color: #000; border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 600; text-decoration: none; }
.x-signin:hover { background: #e6e6e6; }
.x-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.x-hint.ok { color: #6ee7a8; }
.x-hint.err { color: #ff8a8a; }
.x-who { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); min-width: 0; }
.x-who img { width: 22px; height: 22px; border-radius: 50%; }
.x-who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-account:has(.x-who) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.x-account:has(.x-who) .x-hint { grid-column: 1 / -1; }
a.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

/* Identity Units showcase */
.nft-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 2px 0 6px; }
.nft-gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: #111; }
.nft-gallery img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; transition: transform 0.2s; }
.nft-gallery a:hover img { transform: scale(1.06); }
.nft-link { display: inline-block; font-size: 13px; color: var(--swarm); margin-bottom: 10px; text-decoration: none; }
.nft-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .nft-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Beta tag + report issue */
.beta-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #f5c46b; background: rgba(245, 196, 107, 0.1); border: 1px solid rgba(245, 196, 107, 0.35); border-radius: 999px; padding: 2px 9px; cursor: help; }
.report-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 12px; white-space: nowrap; }
.report-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.beta-line { margin-top: 2px; }
.beta-line .linkish { font-size: inherit; color: var(--swarm); padding: 0; }
.report-modal form { display: grid; gap: 12px; }
.report-modal h3 { margin: 0; }
.report-lead { margin: 0; color: var(--muted); font-size: 14px; }
.report-modal label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.report-modal select, .report-modal textarea, .report-modal input[type=text] { width: 100%; background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 14px; }
.report-modal textarea { min-height: 110px; resize: vertical; }
.report-modal .report-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
.report-check input { margin-top: 2px; }
.report-status { margin: 0; font-size: 13px; min-height: 1em; }
.report-status.ok { color: #6ee7a8; }
.report-status.err { color: #ff8a8a; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) { .report-btn span { display: none; } .report-btn { padding: 6px 8px; } }
