/* DomainRiff.app v2 — minimalist dark + lime. */
:root {
  --bg: #0f0f0f;
  --bg-2: #161616;
  --bg-3: #1d1d1f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --lime: #a3e635;
  --lime-dim: rgba(163, 230, 53, 0.14);
  --red: #f87171;
  --amber: #fbbf24;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: page content shorter than the viewport still pins the
     footer to the bottom, so the fixed feed bubble always sits above it. */
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); background: rgba(15, 15, 15, 0.8); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 1.25rem; }
.wordmark img { height: 22px; width: auto; display: block; }
.header-user { display: flex; align-items: center; gap: 0.9rem; font-size: 0.9rem; }
.nav-link { color: var(--muted); }
.nav-link:hover { color: var(--text); text-decoration: none; }
.whoami { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); }
.avatar { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); }
.whoami-name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: inline; margin: 0; }
.main { padding-top: 2rem; padding-bottom: 3rem; flex: 1 0 auto; display: flex; flex-direction: column; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 1.25rem 0.3rem; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 0.5rem; align-items: center; }
.footer-inner .sep { color: var(--line); }
.footer-support { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.2rem 1.25rem 0.9rem; font-size: 0.75rem; }
.footer-support a { color: var(--muted); }
.footer-support a:hover { color: var(--lime); text-decoration: none; }
.footer-support .sep { color: var(--line); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1px solid transparent; border-radius: 10px;
  padding: 0.55rem 1.1rem; font-size: 0.95rem; font-family: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.2; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-lime { background: var(--lime); color: #0d0d0d; }
.btn-lime:hover { background: #b6ea55; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--lime); color: var(--lime); }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.input {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0.8rem 1rem; font-size: 1.05rem; font-family: var(--mono);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-dim); }
.input:disabled { color: var(--muted); opacity: 0.55; cursor: not-allowed; }

/* ---------- home ---------- */
.home-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; gap: 0.2rem; }
.home-logo { height: 44px; width: auto; margin-bottom: 0.4rem; }
.home-tagline { color: var(--muted); font-size: 1.15rem; margin: 0 0 1.6rem; letter-spacing: 0.01em; white-space: nowrap; }
.riff-form { width: 100%; max-width: 34rem; }
.input-row { display: flex; gap: 0.6rem; width: 100%; max-width: 34rem; }
.input-row .input { flex: 1; min-width: 0; }
/* Marketing copy: one line on desktop (no mid-sentence wrapping anywhere);
   .sentence spans break only at full stops on narrow screens. */
.home-note { margin: 1.1rem auto 0; max-width: 40rem; color: var(--muted); font-size: 0.88rem; }
/* Activity feed: fixed bottom-right chat bubble with a tail, one rotating
   'found a new use' line at a time. */
.live-feed {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;  /* just above the footer (measured 76px) with a little air */
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(24rem, calc(100vw - 2.5rem));
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px;
  padding: 0.7rem 0.95rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s, width 0.35s ease;
}
.live-feed.is-link { cursor: pointer; }
.live-feed.is-link:hover {
  border-color: var(--lime);
  box-shadow: 0 0 22px rgba(163, 230, 53, 0.18), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--lime);
  flex-shrink: 0; animation: pulse 2.2s infinite;
}
.live-text {
  transition: opacity 0.6s ease;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-msg { color: var(--muted); }
.live-domain { color: var(--lime); font-weight: 600; }
@media (max-width: 640px) {
  .live-feed { right: 0.75rem; bottom: 7.4rem; max-width: 78vw; font-size: 0.8rem; padding: 0.6rem 0.8rem; }
}
.sentence { white-space: nowrap; }
@media (min-width: 641px) {
  .home-note { white-space: nowrap; }
}
@media (max-width: 400px) {
  /* Narrow phones: let the longest sentence wrap rather than overflow. */
  .sentence { white-space: normal; }
  .home-note { font-size: 0.82rem; }
}
.input-row.is-locked { opacity: 1; }
.input-row.is-locked .input { background: var(--bg-3); }

/* ---------- flashes ---------- */
.flash { border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 1rem; font-size: 0.92rem; border: 1px solid; }
.flash-ok { background: var(--lime-dim); border-color: rgba(163, 230, 53, 0.35); color: var(--lime); }
.flash-err { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); color: var(--red); }

/* ---------- auth / state cards ---------- */
.auth-wrap, .state-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 62svh; }
.auth-card { width: 100%; max-width: 24rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 2.2rem 2rem; }
.auth-logo { height: 30px; width: auto; margin-bottom: 1.1rem; }
.auth-card h1 { margin: 0 0 0.2rem; font-size: 1.4rem; }
.auth-sub { color: var(--muted); margin: 0 0 1.4rem; font-size: 0.92rem; }
.provider-list { display: flex; flex-direction: column; gap: 0.7rem; }
.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 0.7rem 1rem; font-weight: 600; font-size: 0.95rem;
}
.provider-btn:hover { border-color: var(--lime); color: var(--lime); text-decoration: none; }
.auth-why { margin-top: 1.3rem; text-align: left; color: var(--muted); font-size: 0.85rem; }
.auth-why summary { cursor: pointer; color: var(--muted); }
.auth-foot { margin-top: 1.2rem; font-size: 0.78rem; color: var(--muted); }
.state-card { padding: 3rem 1rem; }
.state-card h1 { font-size: 1.5rem; margin: 0.6rem 0 0.4rem; }
.state-msg { color: var(--muted); max-width: 26rem; margin: 0 0 1.3rem; }
.state-icon { font-family: var(--mono); color: var(--muted); font-size: 1.1rem; letter-spacing: 0.2em; }
.lock-glyph { color: var(--lime); display: flex; align-items: center; justify-content: center; }

/* ---------- prose (privacy / terms) ---------- */
.prose { max-width: 40rem; margin: 0 auto; }
.prose h1 { font-size: 1.9rem; margin-bottom: 0.2rem; }
.prose h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--lime); }
.prose h3, .prose-sub { font-size: 1rem; margin: 1.4rem 0 0.3rem; color: var(--text); font-weight: 650; }
.prose p, .prose li { color: #c9c9c9; }
.prose ul { padding-left: 1.2rem; }
.prose .muted { color: var(--muted); font-size: 0.85rem; }

/* ---------- picker ---------- */
.picker-wrap { padding-top: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; color: var(--muted); font-family: var(--mono); margin: 0 0 0.4rem; }
.riff-domain { color: var(--lime); }
.picker-head { font-size: 2.1rem; margin: 0 0 0.4rem; }
/* The warning line spans the same width as the idea rows below it. On a
   typical desktop the widened column (52rem) holds it on ONE line; when space
   runs out the .sentence spans break only after a full stop. */
.picker-sub { color: var(--muted); margin: 0 0 2rem; max-width: none; font-size: 0.95rem; }
/* Ideas as full-width rows (line, not box) with the site's soft card chrome:
   rounded edges, gentle gap, lime hover border. */
.idea-grid { display: flex; flex-direction: column; gap: 0.7rem; }
.idea-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.05rem 1.25rem; margin: 0; text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.idea-card:hover { border-color: var(--lime); background: rgba(163, 230, 53, 0.04); }
.idea-idx { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; margin: 0; width: 2.2rem; flex-shrink: 0; }
.idea-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.idea-title { font-size: 1.2rem; margin: 0; }
.idea-tag { color: #c9c9c9; margin: 0; font-size: 0.95rem; }
.idea-aud { color: var(--muted); font-size: 0.8rem; margin: 0.2rem 0 0; }
.idea-aud span { color: var(--lime); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.08em; margin-right: 0.3rem; }
.choose-btn { flex-shrink: 0; }

/* modal */
.modal { border: 0; background: transparent; padding: 0; max-width: 26rem; width: calc(100% - 2rem); color: var(--text); }
.modal::backdrop { background: rgba(5, 5, 5, 0.7); backdrop-filter: blur(3px); }
.modal-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; color: var(--text); }
.modal-card h2 { margin: 0 0 0.5rem; }
.modal-card p { margin: 0.3rem 0; color: #c9c9c9; }
.modal-warn { color: var(--amber) !important; }
.modal .actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.2rem; }

/* ---------- inline generation output (home) ---------- */
.gen-wrap {
  width: 100%; max-width: 34rem; margin: 1.15rem auto 0; text-align: left;
  background: #070907; border: 1px solid rgba(163, 230, 53, 0.22);
  border-radius: 10px; padding: 0.55rem 0.8rem 0.7rem;
  font-family: var(--mono);
}
.gen-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: 0.72rem; color: var(--lime); border-bottom: 1px solid rgba(163, 230, 53, 0.16); padding-bottom: 0.4rem; margin-bottom: 0.5rem; }
.gen-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-status { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; animation: pulse 1.6s infinite; white-space: nowrap; }
.gen-output { font-size: 0.86rem; line-height: 1.8; min-height: 2em; color: var(--lime); }
.gen-output .term-line { margin: 0; word-break: break-word; opacity: 0; animation: fadeIn 0.2s forwards; }
.gen-output .term-line.dim { color: #7aa03c; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fadeIn { to { opacity: 1; } }
.term-cursor { display: inline-block; animation: blink 1s steps(1) infinite; color: var(--lime); }
@keyframes blink { 50% { opacity: 0; } }
.term-progress { height: 2px; background: rgba(163, 230, 53, 0.12); border-radius: 3px; margin-top: 0.6rem; overflow: hidden; }
#term-bar { display: block; height: 100%; width: 40%; background: var(--lime); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.gen-failed { border-color: rgba(248, 113, 113, 0.35); font-family: var(--sans); }
.gen-error { color: var(--red); margin: 0 0 0.2rem; font-size: 0.95rem; }
.gen-error-detail { color: var(--muted); margin: 0 0 0.4rem; font-size: 0.8rem; font-family: var(--mono); word-break: break-word; }
.actions { display: flex; gap: 0.7rem; margin-top: 1.4rem; flex-wrap: wrap; }
.gen-actions { justify-content: center; margin-top: 0.6rem; }
.gen-actions .btn { font-family: var(--mono); }

/* ---------- riff page ---------- */
.riff-wrap, .riff-main { padding-top: 2rem; }
.riff-doc { display: flex; flex-direction: column; gap: 2.6rem; }
.riff-hero { text-align: center; padding-top: 1rem; }
.riff-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0.2rem 0 0.5rem; letter-spacing: -0.02em; }
.riff-tagline {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw + 0.5rem, 1.15rem);
  margin: 0 auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.riff-block h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime); margin: 0 0 0.7rem; }
.riff-copy { font-size: 1.08rem; color: #d6d6d6; margin: 0; }
.riff-audience { color: var(--muted); font-size: 0.9rem; margin: 0.9rem 0 0; }
.riff-audience span { color: var(--lime); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; margin-right: 0.35rem; }
.riff-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.9rem; max-width: none; }
.riff-logo-label { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; color: var(--text); }
.copy-block { display: flex; flex-direction: column; gap: 0.5rem; }
.copy-block .btn { align-self: flex-end; }
.prompt-text {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; margin: 0; font-size: 0.85rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; color: #c9c9c9; width: 100%;
}
.share-row { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.riff-static { background: var(--bg); }
.riff-static .riff-main { padding-top: 3rem; }
.riff-foot { border-top: 1px solid var(--line); margin-top: 3.5rem; padding: 1.1rem 1.25rem; text-align: center; color: var(--muted); font-size: 0.82rem; }
.riff-foot a { color: var(--lime); }
.riff-support { display: block; margin-top: 0.35rem; font-size: 0.78rem; }
.riff-support a { margin: 0 0.15rem; }

/* ---------- locked (proof) ---------- */
.riff-stage { position: relative; }
.riff-content.lock-blur { filter: blur(7px); opacity: 0.35; user-select: none; pointer-events: none; }
/* Fixed, covers the viewport on load (no scrolling to reach it). Transparent
   backdrop: the blurred page shows through around the panel. */
.proof-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 7vh 1rem 2.5rem;
  background: transparent;
}
.proof-panel { max-width: 33rem; width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 1.8rem 1.8rem 1.6rem; }
.lock-glyph { margin-bottom: 0.8rem; }
.proof-panel h1 { font-size: 1.45rem; margin: 0 0 0.6rem; }
.proof-sub { color: #c9c9c9; margin: 0 0 1rem; font-size: 0.95rem; }
.proof-deadline { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: #fcd34d; border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.88rem; margin: 0 0 1.2rem; }
.proof-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-label {
  grid-row: 1; text-align: center; padding: 0.55rem; cursor: pointer;
  border-bottom: 2px solid var(--line); color: var(--muted); font-size: 0.9rem; font-weight: 600;
}
#tab-html:checked ~ .tab-label[for="tab-html"], #tab-dns:checked ~ .tab-label[for="tab-dns"] { color: var(--lime); border-color: var(--lime); }
.tab-panel { display: none; grid-column: 1 / -1; padding-top: 1rem; }
#tab-html:checked ~ .panel-html, #tab-dns:checked ~ .panel-dns { display: block; }
.proof-steps { margin: 0 0 0.8rem; padding-left: 1.2rem; color: #c9c9c9; font-size: 0.92rem; }
.proof-steps li { margin-bottom: 0.45rem; }
.code-file { font-family: var(--mono); font-size: 0.82rem; background: var(--bg-3); padding: 0.15rem 0.4rem; border-radius: 5px; color: var(--lime); word-break: break-all; }
.code { font-size: 0.84rem; background: var(--bg-3); border-radius: 6px; padding: 0.3rem 0.55rem; color: var(--lime); word-break: break-all; user-select: all; }
.token-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.token-row .code { flex: 1; min-width: 0; }
.token-key { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.proof-note { color: var(--muted); font-size: 0.82rem; margin: 0.4rem 0 0.9rem; }
.check-row { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 1.1rem; }
.proof-help { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; margin: 0.9rem 0 0; text-align: center; }
.proof-help .code { color: var(--muted); }
/* Inline notice under the check button; auto-fades via riff.js after 10s. */
.verify-msg {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0.9rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid;
  font-size: 0.9rem;
  transition: opacity 0.6s ease;
}
.verify-msg-err { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); color: var(--red); }
.verify-msg-ok { background: var(--lime-dim); border-color: rgba(163, 230, 53, 0.35); color: var(--lime); }
.verify-msg.hide { opacity: 0; }
.picker-notice { max-width: 36rem; }

/* ---------- my riffs list ---------- */
.list-wrap { padding-top: 1rem; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.list-head h1 { font-size: 1.7rem; margin: 0; }
.riff-table { display: flex; flex-direction: column; }
.riff-table .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; margin-bottom: 0.6rem; flex-wrap: wrap; }
.riff-table .row:hover { border-color: var(--lime); }
.row-main { display: flex; align-items: center; gap: 0.7rem; color: var(--text); min-width: 0; }
.row-main:hover { text-decoration: none; }
.row-domain { font-family: var(--mono); font-weight: 600; }
.row-meta { color: var(--muted); font-size: 0.8rem; display: flex; gap: 0.9rem; align-items: center; }
.row-created { color: #5f5f5f; }
.chip { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.chip-verified, .chip-live { color: var(--lime); border-color: rgba(163, 230, 53, 0.4); background: var(--lime-dim); }
.chip-running { color: var(--lime); border-color: rgba(163, 230, 53, 0.4); animation: pulse 1.6s infinite; }
.chip-pending, .chip-awaiting_proof { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); }
.chip-failed { color: var(--red); border-color: rgba(248, 113, 113, 0.4); }
.chip-review { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); }
.chip-rejected { color: var(--red); border-color: rgba(248, 113, 113, 0.4); }
.chip-archived, .chip-expired { color: #5f5f5f; }

/* ---------- admin / verdict ---------- */
.admin-row { align-items: flex-start !important; }
.admin-meta { flex: 1; min-width: 14rem; }
.admin-user { margin: 0 0 0.2rem; font-size: 0.85rem; color: var(--muted); }
.admin-reason { margin: 0.1rem 0 0.4rem; font-size: 0.85rem; color: var(--text); }
.admin-actions { margin-top: 0.2rem; }
.muted { color: var(--muted); }
.verdict-reason { background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.75rem; font-size: 0.88rem; }

/* ---------- small screens ---------- */
html { -webkit-text-size-adjust: 100%; }
@media (max-width: 640px) {
  .whoami-name { display: none; }
  .home-hero { min-height: 0; padding: 1.5rem 0; }
  .home-logo { height: 34px; }
  .input-row { flex-direction: column; }
  .picker-sub { font-size: 0.92rem; white-space: normal; }
  .idea-card { flex-wrap: wrap; row-gap: 0.55rem; padding: 1rem 1.1rem; }
  .idea-main { flex: 1 1 calc(100% - 3.2rem); }
  .choose-btn { width: 100%; }
  .proof-overlay { padding: 4.5vh 0.75rem 2rem; }
  .tab-panel { padding-top: 0.8rem; }
  .token-row { flex-wrap: wrap; }
  .gen-output { font-size: 0.8rem; }
  .site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
  .header-inner { gap: 0.5rem; }
  .wordmark img { height: 19px; }
  .riff-hero { padding-top: 0.5rem; }
  /* Phones: let long AI taglines wrap rather than truncate. */
  .riff-tagline { white-space: normal; overflow: visible; text-overflow: clip; max-width: 34rem; }
  .riff-tagline { max-width: none; }
  .riff-static .riff-main { padding-top: 2rem; }
}
@media (max-width: 420px) {
  .header-user { gap: 0.55rem; }
  .nav-link { font-size: 0.85rem; }
  .btn-sm { padding: 0.3rem 0.6rem; }
  .proof-panel { padding: 1.3rem 1.1rem 1.2rem; }
  .riff-table .row { flex-direction: column; align-items: flex-start; }
  .auth-card { padding: 1.8rem 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .term-line, .term-cursor, #term-bar, .gen-status, .chip-running { animation: none !important; }
}
