/* styles.css
   Loopi on the web. One palette, dark only: the brief's near-black surfaces,
   apricot as the one accent, ink on apricot fills, off-white text. The film
   is in film.css; this file is the product and everything they share.
   No gradients on text, no glows on buttons, no tinted washes behind accent
   text. Numbers in tabular figures. Body text at 4.5:1 or better. */

:root {
  color-scheme: dark;
  --bg: #0B0A09;
  --surface: #141210;
  --surface-2: #1C1916;
  --surface-3: #24201C;
  --ink: #F3EDE7;
  --ink-2: #A39D97;       /* muted, about 60 percent: 6.5:1 on surface-2 */
  --ink-3: #8F8983;       /* fine print: 4.7:1 on surface-3 */
  --line: #2A2622;
  --line-strong: #3B3530;
  --accent: #F2B38F;      /* apricot, the one accent */
  --accent-hover: #F6C4A6;
  --on-accent: #2A160B;   /* ink on apricot, 9.5:1 */
  --focus: #F2B38F;
  --good: #34D399;        /* tickerUp, as in the app */
  --bad: #F87171;         /* tickerDown, as in the app */
  --warn: #E9C46A;
  /* Series on the dark surface: validated with the dataviz validator
     (dark mode, surface #141210 and #1C1916, all pairs): lightness band,
     chroma floor, color-vision separation, contrast all pass. */
  --series-core: #CC7840;
  --series-picks: #4A8BDD;
  --series-cash: #2E9E8C;
  --series-other: #8A847E;
  --label-on-series: #0B0A09;

  --font-display: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --gutter: 20px;
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 8px; top: -48px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); z-index: 60; }
.skip:focus { top: 8px; }

.wordmark { font-family: 'Pacifico', cursive; color: var(--accent); font-weight: 400; letter-spacing: 0; line-height: 1; }

/* ── Type ─────────────────────────────────────────────────────────────── */
.eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.lede { font-size: 17px; color: var(--ink-2); line-height: 1.6; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.subhead { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.caption { font-size: 14px; color: var(--ink-2); }
.hint { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.fine { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.note { font-size: 15px; color: var(--ink); line-height: 1.5; }
.note:empty { display: none; }
.error { font-size: 15px; color: var(--bad); line-height: 1.5; font-weight: 500; }
.is-problem { color: var(--bad); font-weight: 500; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--header-h);
  background: rgba(11, 10, 9, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(243, 237, 231, 0.06);
}
.site-header-inner { max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: block; view-transition-name: loopi-mark; }
.brand .wordmark { font-size: 22px; padding-bottom: 4px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-email { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 38vw; }
.preview-tag { font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; }
@media (max-width: 520px) { .who-email { display: none; } }

/* ── Buttons and inputs ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: -0.005em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover:not(:disabled) { border-color: var(--ink-3); background: var(--surface); }
.btn-ghost { background: rgba(11, 10, 9, 0.35); color: var(--ink); border-color: rgba(243, 237, 231, 0.32); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-small { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 16px; }
.btn-xl { min-height: 60px; padding: 16px 32px; font-size: 18px; }
.btn-wide { width: 100%; }
.btn-inline { margin-top: 10px; min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.link-btn { background: none; border: 0; padding: 8px 2px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); cursor: pointer; min-height: 40px; }
.link-btn:hover { text-decoration-color: var(--ink); }
.link-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; cursor: pointer; color: var(--ink); flex: none; }
.close-x { position: relative; width: 14px; height: 14px; display: inline-block; }
.close-x::before, .close-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; }
.close-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.close-x.small { width: 10px; height: 10px; }
.close-x.small::before, .close-x.small::after { width: 10px; }

.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font-size: 16px;
}
.input::placeholder { color: var(--ink-3); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input:disabled { opacity: 0.6; }
.label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field-errors { margin-top: 6px; }
.money-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); padding-left: 14px; }
.money-input:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.money-input > span { color: var(--ink-2); font-weight: 500; }
.money-input .input { border: 0; padding-left: 0; background: transparent; font-variant-numeric: tabular-nums; }
.money-input .input:focus-visible { outline: none; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); display: inline-block; flex: none; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Shared layout ────────────────────────────────────────────────────── */
.main { min-height: 100svh; }
.center-page { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--header-h) + 24px) var(--gutter) 24px; gap: 12px; }
.center-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 100svh; padding: var(--header-h) var(--gutter) 24px; }
.center-block .muted { max-width: 420px; }
.narrow-card { max-width: 440px; display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.stale { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 35; width: min(560px, calc(100% - 32px)); }
.stale-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 14px; color: var(--ink-2); padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }

/* ── Sign-in panel (film, chapter 6) ──────────────────────────────────── */
.signin-card { display: grid; gap: 0; padding: 26px; background: rgba(20, 18, 16, 0.92); border-color: var(--line-strong); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); }
.signin-wait { display: flex; align-items: center; gap: 12px; color: var(--ink-2); min-height: 120px; }
.signin-slot { margin-top: 26px; }
.form-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.015em; margin-bottom: 16px; }
.auth-form { display: grid; gap: 2px; }
.auth-form .btn { margin-top: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.g-mark { font-family: var(--font-display); font-weight: 700; width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 12px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; margin-top: 10px; }
.auth-links .link-btn { font-size: 14px; }
@media (orientation: portrait) {
  .signin-card { padding: 20px; }
  .signin-card .field { margin-bottom: 12px; }
  .signin-slot { margin-top: 18px; }
}

/* ── The shared-element transition ────────────────────────────────────── */
.loop-ghost { position: fixed; z-index: 100; pointer-events: none; view-transition-name: loopi-mark; }
::view-transition-group(loopi-mark) { animation-duration: 1300ms; animation-timing-function: cubic-bezier(.65, 0, .2, 1); }
::view-transition-old(loopi-mark), ::view-transition-new(loopi-mark) { animation-duration: 1300ms; height: 100%; object-fit: contain; }
::view-transition-old(root) { animation: vt-out 700ms ease both; }
::view-transition-new(root) { animation: vt-in 900ms cubic-bezier(.2, .7, .2, 1) 550ms both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
html.vt-fade-only::view-transition-group(loopi-mark) { animation-duration: 0s; }
html.vt-fade-only::view-transition-new(root) { animation: vt-fade 700ms ease both; }
@keyframes vt-fade { from { opacity: 0; } }

/* ── Dashboard: scenes ────────────────────────────────────────────────── */
html.snap { scroll-snap-type: y proximity; }
@media (max-width: 700px) { html.snap { scroll-snap-type: y mandatory; } }
html.sheet-open { overflow: hidden; }
.dash { position: relative; }
.scene {
  position: relative; min-height: 100vh; min-height: 100svh; scroll-snap-align: start;
  display: grid; place-items: center; padding: calc(var(--header-h) + 24px) calc(var(--gutter) + 28px) 56px var(--gutter);
  overflow: hidden; isolation: isolate;
}
@media (min-width: 700px) { .scene { padding-left: 64px; padding-right: 88px; } }
.scene + .scene { border-top: 1px solid rgba(243, 237, 231, 0.05); }
.scene-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; width: 100%; max-width: 620px; }
.scene-wide { max-width: 980px; }
.scene-label { font-size: 17px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.scene-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 6vw, 56px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.scene-title-xl { font-size: clamp(40px, 8vw, 84px); letter-spacing: -0.042em; line-height: 0.98; }
.scene-line { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-2); text-wrap: balance; }
.scene-msg { font-size: 16px; color: var(--ink); max-width: 30em; }
.scene-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.scene-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: var(--ink-3); }
.big-icon { color: var(--ink-2); line-height: 0; }
.big-icon.tone-good { color: var(--accent); }
.big-icon.tone-bad { color: var(--bad); }
.big-spin .spinner { width: 64px; height: 64px; border-width: 3px; }

/* The rail of dots. */
.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 30; display: grid; gap: 4px; }
.rail-dot { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.rail-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(243, 237, 231, 0.26); transition: background-color 400ms ease, transform 400ms ease; }
.rail-dot[aria-current="true"]::before { background: var(--accent); transform: scale(1.35); }
@media (max-width: 700px) { .rail { right: 4px; } .rail-dot { width: 24px; height: 26px; } .rail-dot::before { width: 7px; height: 7px; } }

/* 1. Your money. */
.money-mark { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; pointer-events: none; }
.money-mark img { width: min(88vw, 820px, 92vh); opacity: 0.34; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.985); opacity: 0.3; } 50% { transform: scale(1.015); opacity: 0.4; } }
.money-value {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(76px, 19vw, 232px); line-height: 0.92; letter-spacing: -0.055em;
  display: inline-flex; align-items: baseline; white-space: nowrap;
}
.money-value.is-empty { font-size: clamp(56px, 12vw, 120px); color: var(--ink-2); }
.money-cur { font-size: 0.48em; margin-right: 0.04em; color: var(--ink-2); align-self: flex-start; margin-top: 0.12em; letter-spacing: 0; }
.money-cents { font-size: 0.34em; color: var(--ink-2); letter-spacing: -0.02em; margin-left: 0.04em; }
.money-delta { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -0.015em; }
.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }
.delta-flat { color: var(--ink-2); }
.scene-money .scene-center { max-width: none; gap: 22px; }

/* 2. The one thing to do. */
.proposal-hero { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.hero-q { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; max-width: 13em; }
.buy-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 640px; }
.buy-chip { display: inline-flex; align-items: baseline; gap: 10px; padding: 14px 20px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); }
.buy-chip.more { color: var(--ink-2); font-size: 18px; }
.chip-sym { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -0.02em; }
.chip-usd { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); }
.chip-side { font-size: 14px; color: var(--bad); font-weight: 600; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-note { font-size: 18px; color: var(--ink-2); max-width: 26em; }
.hero-icon { line-height: 0; color: var(--accent); }
.hero-icon.tone-bad { color: var(--bad); }
.disclose { width: 100%; max-width: 560px; text-align: left; }
.disclose summary { cursor: pointer; list-style: none; text-align: center; font-weight: 500; color: var(--ink-2); padding: 10px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.disclose summary::-webkit-details-marker { display: none; }
.disclose[open] summary { color: var(--ink); }
.disclose-body { display: grid; gap: 12px; margin-top: 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.amount-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.amount-cur { font-size: 26px; color: var(--ink-2); font-weight: 600; }
.amount-input { width: 160px; font-size: 26px; font-weight: 600; min-height: 60px; text-align: center; border-radius: 999px; }

/* Hold to approve. */
.hold {
  position: relative; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform 160ms ease;
}
.hold-lg { width: clamp(180px, 42vw, 212px); height: clamp(180px, 42vw, 212px); }
.hold-sm { width: 128px; height: 128px; }
.hold:disabled { opacity: 0.45; cursor: not-allowed; }
.hold.is-holding { transform: scale(0.97); }
.hold-ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); pointer-events: none; }
.hold-track { fill: none; stroke: var(--line-strong); stroke-width: 2.4; }
.hold-progress { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; }
.hold-fill { position: absolute; inset: 10%; border-radius: 50%; background: var(--on-accent); opacity: 0; transform: scale(0.6); pointer-events: none; }
.hold-face { position: relative; display: grid; gap: 2px; justify-items: center; }
.hold-amount { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 8vw, 44px); letter-spacing: -0.04em; line-height: 1; }
.hold-sm .hold-amount { font-size: 26px; }
.hold-hint { font-size: 15px; font-weight: 600; }
.hold-sm .hold-hint { font-size: 12px; }
.hold.is-holding .hold-face, .hold.is-done .hold-face { color: var(--accent); }
.hold.is-done .hold-fill { opacity: 1; transform: none; }
.not-now { color: var(--ink-2); font-size: 15px; }

/* 3. Loopi at work. */
.scene-work-inner { gap: 26px; }
.work-head { display: grid; justify-items: center; gap: 18px; }
.work-mark { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.work-mark img { position: relative; width: 84px; height: 84px; }
.work-pulse { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: pulse 2.8s cubic-bezier(.2, .6, .3, 1) infinite; }
@keyframes pulse { 0% { transform: scale(0.75); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }
.scene-work.is-paused .work-pulse { animation: none; opacity: 0; }
.scene-work.is-paused .work-mark img { opacity: 0.55; }
.work-title { font-size: clamp(28px, 4.6vw, 44px); }
.work-steps { display: grid; gap: 10px; width: 100%; max-width: 520px; text-align: left; }
.work-step {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 18px 14px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  opacity: 0; transform: translateY(12px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1);
}
.work-step.is-shown { opacity: 1; transform: none; }
.work-step.is-new { animation: slide-in 800ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-18px); } }
.step-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.tone-wait .step-ico { color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tone-bad .step-ico { color: var(--bad); }
.step-text { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.step-when { font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* 4. What you own: the treemap. */
.treemap { position: relative; width: 100%; height: min(58vh, 520px); min-height: 300px; }
.tm-tile {
  position: absolute; border: 2px solid var(--bg); border-radius: 14px; padding: 14px 16px; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left;
  color: var(--label-on-series); overflow: hidden; transition: filter 160ms ease;
}
.tm-tile:hover { filter: brightness(1.08); }
.tm-tile[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.role-core { background: var(--series-core); }
.role-satellite { background: var(--series-picks); }
.role-other, .role-fold { background: var(--series-other); }
.tm-sym { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1; }
.tm-pct { font-size: clamp(16px, 1.8vw, 22px); font-weight: 600; }
.tm-tile.is-small { padding: 10px; }
.tm-tile.is-small .tm-sym { font-size: 18px; }
.tm-tile.is-small .tm-pct { font-size: 14px; }
.tm-tile.is-tiny .tm-pct { display: none; }
.tm-tile.is-tiny .tm-sym { font-size: 13px; }
.tm-pop { position: absolute; z-index: 5; width: 260px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); text-align: left; display: grid; gap: 6px; }
.tm-pop-sym { font-family: var(--font-display); font-weight: 700; font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.tm-pop-role { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.tm-pop-name { font-size: 14px; color: var(--ink-2); }
.tm-pop-rows { display: grid; gap: 2px; margin-top: 4px; }
.tm-pop-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.tm-pop-rows dt { color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 15px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* 5. Talk to Loopi. */
.talk-mark img { width: 64px; height: 64px; }
.ask-box {
  width: 100%; max-width: 560px; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 26px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 20px; color: var(--ink-2); cursor: text; text-align: left;
}
.ask-box:hover { border-color: var(--ink-3); }
.ask-go { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.big-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.big-chip { min-height: 52px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font-size: 17px; font-weight: 500; cursor: pointer; }
.big-chip:hover:not(:disabled) { border-color: var(--ink-3); }
.big-chip.small { min-height: 44px; padding: 9px 18px; font-size: 15px; }
.big-chip:disabled { opacity: 0.5; cursor: not-allowed; }
.other-brokers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }

/* 6. Your plan. */
.level-badge { display: inline-flex; align-items: center; gap: 18px; padding: 12px 26px 12px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.level-num { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.03em; }
.level-words { display: grid; text-align: left; }
.level-kicker { font-size: 14px; color: var(--ink-2); }
.level-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.plan-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 760px; }
.plan-num { display: flex; flex-direction: column-reverse; gap: 6px; padding: 22px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.plan-value { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.04em; line-height: 1; }
.plan-value.is-empty { color: var(--ink-2); font-size: 24px; }
.plan-label { font-size: 15px; color: var(--ink-2); }
.plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 520px; }
.plan-actions .btn { width: 100%; }
.page-foot { max-width: 34em; }
@media (max-width: 560px) {
  .plan-nums { grid-template-columns: 1fr; }
  .plan-num { flex-direction: column-reverse; padding: 14px 16px; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
  .plan-num .plan-value { grid-column: 2; grid-row: 1; }
  .plan-num .plan-label { grid-column: 1; grid-row: 1; }
  .plan-value { font-size: 30px; }
  .plan-actions { grid-template-columns: 1fr; }
}

/* intake: the chat is the whole screen. */
.scene-intake { padding: var(--header-h) 0 0; place-items: stretch; }
.intake-wrap { display: flex; flex-direction: column; width: 100%; max-width: 760px; margin: 0 auto; height: calc(100svh - var(--header-h)); padding: 12px var(--gutter) 10px; gap: 6px; }
.intake-wrap .chat { flex: 1; min-height: 0; }
.intake-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }

/* ── Chat ─────────────────────────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; min-width: 0; }
.monogram { width: 36px; height: 36px; flex: none; }
.chat-log { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.bubble { max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 17px; line-height: 1.5; display: grid; gap: 8px; }
.bubble-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble-notice { border: 1px solid var(--line-strong); }
.bubble-user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bubble-error { align-self: flex-start; border: 1px solid var(--bad); color: var(--bad); background: var(--surface); }
.typing { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; }
.chat-card { align-self: stretch; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.suggest { border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; padding: 10px 18px; font-size: 16px; cursor: pointer; color: var(--ink); min-height: 44px; }
.suggest:hover { border-color: var(--ink-3); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; min-width: 0; border-radius: 999px; padding-left: 18px; }
.btn-send { padding: 10px 20px; }

/* The chat sheet: full screen. */
.sheet { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(5, 4, 4, 0.7); }
.sheet-body { flex: 1; display: flex; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) calc(10px + env(safe-area-inset-bottom)); max-width: 820px; margin: 0 auto; width: 100%; }
.sheet-body .chat { flex: 1; }
.sheet-close { width: 40px; height: 40px; }

/* ── Proposal cards (history and chat) ────────────────────────────────── */
.proposal-full, .proposal-compact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.proposal-compact { padding: 16px; gap: 12px; background: var(--surface-2); }
.proposal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proposal-kind { font-weight: 600; }
.proposal-date { font-size: 13px; color: var(--ink-2); }
.status { margin-left: auto; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.status-good { color: var(--good); border-color: currentColor; }
.status-warn { color: var(--warn); border-color: currentColor; }
.status-bad { color: var(--bad); border-color: currentColor; }
.proposal-why { font-size: 16px; line-height: 1.5; font-weight: 500; }
.trades { border-top: 1px solid var(--line); }
.trade { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trade-side { width: 34px; flex: none; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.trade-mid { flex: 1; min-width: 0; display: grid; }
.trade-sym { font-family: var(--font-display); font-weight: 600; }
.trade-name { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-dollars { font-weight: 600; white-space: nowrap; }
.plines { display: grid; gap: 6px; }
.pline { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.pline dt { color: var(--ink-3); }
.pline dd { color: var(--ink-2); }
.outcome { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; width: 100%; max-width: 520px; }
.proposal-hero .outcome { border: 0; text-align: center; }
.outcome-summary { font-weight: 500; font-size: 17px; }
.orders { display: grid; gap: 4px; font-size: 15px; }
.order { display: flex; justify-content: space-between; gap: 12px; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.busy-line { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 16px; }
.history-stack { display: grid; gap: 14px; }

/* ── Activity ─────────────────────────────────────────────────────────── */
.timeline { display: grid; }
.tl-item { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: 3.5px; top: 14px; bottom: 0; width: 1px; background: var(--line-strong); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--bg); margin-top: 7px; }
.tl-meta { font-size: 13px; color: var(--ink-2); }
.tl-text { font-size: 15px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }

/* ── Dialog ───────────────────────────────────────────────────────────── */
.dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
.dialog[open] { display: flex; flex-direction: column; }
.dialog::backdrop { background: rgba(5, 4, 4, 0.7); }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg); flex: none; }
.dialog-bar-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.dialog-body { overflow-y: auto; padding: 20px var(--gutter) 40px; flex: 1; overscroll-behavior: contain; }
.dialog-title { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 8px; }
.dialog .lede { margin-bottom: 20px; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; display: grid; gap: 8px; }
.summary li { position: relative; padding-left: 16px; }
.summary li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 6px; height: 1.5px; background: var(--accent); }
.summary + .hint { margin-top: 10px; }
.notice { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); display: grid; gap: 10px; justify-items: start; background: var(--surface); }
.form-section { margin-top: 28px; }
.section-label { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.fieldset legend { padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 15px; color: var(--ink-2); background: var(--surface); }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill.is-on { border-color: var(--accent); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.pill:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.levels { display: grid; gap: 8px; }
.level { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.level input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.level.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.level.is-locked { cursor: not-allowed; background: transparent; }
.level.is-locked .level-name, .level.is-locked .level-line { color: var(--ink-3); }
.level-text { display: grid; gap: 2px; }
.level .level-name { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.level-line { font-size: 14px; color: var(--ink-2); }
.level-note { font-size: 13px; color: var(--ink-2); font-weight: 500; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 14px; color: var(--ink); }
.chip:hover { border-color: var(--ink-3); }
.checks { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.check-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; }
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row label { display: grid; gap: 2px; cursor: pointer; }
.check-row .field-errors { grid-column: 2; }
.check-label { font-weight: 500; }
.check-label.is-off { color: var(--ink-3); }
.confirm-input { text-transform: uppercase; letter-spacing: 0.08em; }
.sign .btn { margin-top: 12px; }
.top-error { margin-top: 16px; display: grid; gap: 4px; }
.dialog .fine { margin-top: 24px; }
@media (min-width: 700px) {
  .dialog { max-width: 680px; height: auto; max-height: min(92dvh, 960px); margin: auto; border-radius: var(--radius); border: 1px solid var(--line); }
  .dialog-bar, .dialog-body { padding-left: 32px; padding-right: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal .ch .r, html.reveal .ch .r { transition: opacity 700ms ease !important; }
  .spinner { animation: none; border-top-color: var(--ink-3); }
  .money-mark img { animation: none; }
  .work-pulse { display: none; }
  .work-step { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .tm-tile, .swatch, .hold { forced-color-adjust: none; }
}

/* Phones: even gutters around the centered scenes (the rail sits in the right one), and the steps' time under their words. */
@media (max-width: 699px) {
  .scene { padding-left: 34px; padding-right: 34px; }
  .money-value { font-size: clamp(64px, 23vw, 120px); }
  .work-step { grid-template-columns: 40px minmax(0, 1fr); row-gap: 0; padding: 12px 16px 12px 12px; }
  .work-step .step-ico { grid-row: span 2; }
  .step-text { font-size: 17px; }
  .step-when { font-size: 13px; }
}
.scene.scene-intake { padding: var(--header-h) 0 0; }

/* ── Muse: the setup page (/muse) and the approve page (/p/<id>) ──────────
   Mobile first: one column, one step at a time, the same scene type. */
.muse { min-height: 100svh; display: flex; justify-content: center; padding: calc(var(--header-h) + 28px) var(--gutter) calc(40px + env(safe-area-inset-bottom)); }
.muse-col { width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.muse-col.is-wide { max-width: 760px; }
.muse-col { min-height: calc(100svh - var(--header-h) - 68px - env(safe-area-inset-bottom)); }
.muse-col.is-center { justify-content: center; }
.muse-head { display: grid; justify-items: center; gap: 14px; }
.muse-mark { width: clamp(104px, 28vw, 144px); line-height: 0; pointer-events: none; }
.muse-mark img { width: 100%; animation: breathe-soft 6s ease-in-out infinite; }
@keyframes breathe-soft { 0%, 100% { transform: scale(0.985); opacity: 0.8; } 50% { transform: scale(1.015); opacity: 1; } }
.muse-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 11vw, 72px); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; }
.muse-sub { font-size: clamp(17px, 4.4vw, 21px); line-height: 1.45; color: var(--ink-2); text-wrap: balance; max-width: 26em; }
.muse-lead { font-size: 16px; color: var(--ink-2); text-wrap: balance; }
.muse-signin { width: 100%; text-align: left; }
.muse-signin .signin-card { box-shadow: none; background: var(--surface); }
.muse-foot { max-width: 30em; margin-top: 6px; }

/* The steps, as four short bars with their names. */
.muse-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 440px; }
.muse-progress-step { width: 100%; display: grid; gap: 8px; padding: 6px 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.muse-progress-step:disabled { cursor: default; }
.muse-progress-bar { height: 4px; border-radius: 999px; background: var(--line-strong); transition: background-color 400ms ease; }
.muse-progress-step.is-done { color: var(--ink-2); }
.muse-progress-step.is-done .muse-progress-bar { background: var(--ink-3); }
.muse-progress-step.is-current { color: var(--ink); font-weight: 600; }
.muse-progress-step.is-current .muse-progress-bar { background: var(--accent); }
.muse-progress-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.muse-step { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; outline: none; }
.muse-step-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 8vw, 48px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.muse-line { font-size: clamp(16px, 4.2vw, 19px); line-height: 1.5; color: var(--ink-2); text-wrap: balance; max-width: 28em; }
.muse-cta { width: 100%; max-width: 380px; }
.muse-step .btn-xl { max-width: 100%; white-space: normal; text-align: center; }
.muse-next { margin-top: 6px; }
.muse-say { font-size: clamp(20px, 5vw, 26px); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
.muse-say strong { font-weight: 700; color: var(--ink); }

/* What to paste into Muse: three numbered blocks, each with its own Copy. */
.paste { width: 100%; display: grid; gap: 12px; text-align: left; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.paste-head { display: flex; align-items: flex-start; gap: 12px; }
.paste-n { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); font-size: 14px; font-weight: 700; }
.paste-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; padding-top: 2px; }
.paste-box { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-strong); font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.paste-key { font-size: 17px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.45; }
.paste-note { font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.paste-schedule { background: transparent; }

/* The keys in use. */
.keys { width: 100%; display: grid; gap: 10px; text-align: left; margin-top: 10px; }
.keys-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.keys-list { display: grid; gap: 8px; }
.key-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.key-row.is-asking { border-color: var(--bad); }
.key-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.key-text { display: grid; min-width: 0; }
.key-name { font-weight: 600; }
.key-meta { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.key-actions { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; justify-content: flex-end; }
.btn-danger { background: var(--bad); color: var(--bg); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
@media (max-width: 420px) {
  .key-row { grid-template-columns: 40px minmax(0, 1fr); }
  .key-row > .btn, .key-row > .key-actions { grid-column: 2; justify-self: start; }
}

/* The approve page. */
.approve-mark img { width: 64px; height: 64px; }
.approve-from { font-size: 15px; color: var(--ink-2); }
.muse-approve .proposal-hero { gap: 24px; }
.approve-after:empty { display: none; }
.approve-dash { color: var(--ink-2); }

/* The activation page (/go). One thing per screen; each screen rises in over
   700 ms with the film's slow easing. Nothing here moves faster than 600 ms
   except button feedback. */
.go-step { animation: go-in 700ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes go-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes go-fade { from { opacity: 0; } to { opacity: 1; } }
.go-plan { width: 100%; display: grid; text-align: left; border-top: 1px solid var(--line); }
.go-plan li { padding: 18px 2px; border-bottom: 1px solid var(--line); font-size: clamp(19px, 5vw, 24px); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; text-wrap: pretty; }
.go-consent {
  width: 100%; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong);
  font-size: clamp(19px, 5vw, 23px); line-height: 1.45; font-weight: 500; letter-spacing: -0.01em; text-align: left; color: var(--ink);
}
.go-hold { padding: 16px 0 6px; display: grid; place-items: center; }
.go-sub { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 26em; text-wrap: balance; }
.go-first { font-size: clamp(17px, 4.4vw, 20px); line-height: 1.5; color: var(--ink); max-width: 28em; text-wrap: balance; }
.go-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.go-quiet { color: var(--ink-2); }

/* Sign in with Loopi: the one sentence on /muse and the consent page
   (/authorize). A spinner on an apricot button turns ink, and the button in
   flight keeps its color while the other one dims. */
.btn-primary .spinner { border-color: rgba(42, 22, 11, 0.28); border-top-color: var(--on-accent); }
.btn.is-busy:disabled { opacity: 1; cursor: progress; }

.muse-home { justify-content: flex-start; }
.connect { gap: 14px; }
.connect-box { font-size: clamp(16px, 4.2vw, 18px); line-height: 1.55; user-select: all; -webkit-user-select: all; cursor: text; }
.connect-note:empty { display: none; }
.connect-steps { width: 100%; display: grid; gap: 14px; text-align: left; padding: 4px 2px; }
.connect-steps li { display: flex; align-items: center; gap: 14px; font-size: clamp(17px, 4.4vw, 19px); font-weight: 500; line-height: 1.4; color: var(--ink); }
.grants { margin-top: 6px; }
.grants-title { font-size: 17px; color: var(--ink); }
.grants-empty { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.muse-keys, .muse-more { max-width: 100%; scroll-margin-top: calc(var(--header-h) + 16px); }
.muse-keys summary, .muse-more summary { font-size: 16px; padding: 12px; }
.muse-keys .disclose-body { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 10px 0 0; background: transparent; border: 0; border-radius: 0; }
.muse-more .disclose-body { padding: 8px 0 0; background: transparent; border: 0; border-radius: 0; }

.auth-mark { line-height: 0; }
.auth-list { width: 100%; display: grid; text-align: left; border-top: 1px solid var(--line); }
.auth-list li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 2px; border-bottom: 1px solid var(--line); font-size: clamp(17px, 4.4vw, 20px); line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.auth-list .icon { flex: none; margin-top: 0.15em; color: var(--accent); }
.auth-who { font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 28em; overflow-wrap: anywhere; }
.auth-who strong { color: var(--ink); font-weight: 600; }
.auth-actions { width: 100%; max-width: 380px; display: grid; gap: 10px; }
.auth-account { overflow-wrap: anywhere; }

@media (min-width: 700px) {
  .muse { padding-top: calc(var(--header-h) + 48px); }
  .muse.muse-approve { padding-top: calc(var(--header-h) + 28px); }
  .muse .muse-col { min-height: calc(100svh - var(--header-h) - 88px); }
  .muse.muse-approve .muse-col { min-height: calc(100svh - var(--header-h) - 68px); }
  .muse-col { gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .muse-mark img { animation: none; }
  .go-step { animation: go-fade 600ms ease both; }
}
