:root {
  --ink: #1e1d1c;
  --ink-soft: #7c7670;
  --ink-mute: #9a938c;
  --ink-faint: #a9a29a;
  --paper: #faf8f5;
  --line: #ded8d0;
  --accent: linear-gradient(146deg, #5f4f92 0%, #74609f 38%, #8a6b86 70%, #8a6f5e 100%);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--paper); }
button, textarea { font: inherit; color: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, .dial:focus-visible { outline: 2px solid #5f4f92; outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* The screen is a fixed 430x932 design, scaled as a whole to fit whatever window it
 * lands in — the same contract as the source document's content-width/content-height
 * fit. Reflowing it instead meant the intent field, the only flexible part of the
 * column, absorbed every shortfall and collapsed. The stage reserves the scaled
 * footprint in flow, since a transform does not affect layout; --fit is measured in
 * onboarding.js. */
.desk { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100dvh; }
.stage { --fit: 1; width: calc(430px * var(--fit)); height: calc(932px * var(--fit)); }
.device { position: relative; display: flex; flex-direction: column; width: 430px; height: 932px; overflow: hidden; background: var(--paper); transform: scale(var(--fit)); transform-origin: top left; }
.desk-note { display: none; }

.screen-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 30px; padding: 52px 30px 16px; }

@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbDrift { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.06) rotate(8deg); } }

/* greeting */
.greeting { flex-shrink: 0; display: flex; align-items: center; gap: 14px; animation: riseIn .5s ease both; }
.greeting-copy { display: flex; flex-direction: column; gap: 2px; }
.greeting-copy h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.015em; }
.greeting-copy p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.orb { position: relative; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: #9a8cb8; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 98%, transparent 100%); mask-image: radial-gradient(circle at 50% 50%, #000 98%, transparent 100%); animation: orbDrift 7s ease-in-out infinite; }
.orb i { position: absolute; inset: -40%; filter: blur(6px); background:
  radial-gradient(46% 42% at 34% 20%, #6e5da6 0 44%, transparent 76%),
  radial-gradient(44% 44% at 76% 28%, #8b83b4 0 42%, transparent 74%),
  radial-gradient(50% 46% at 40% 74%, #a08497 0 44%, transparent 76%),
  radial-gradient(44% 44% at 78% 80%, #ab8a6e 0 42%, transparent 74%); }
.orb-sm { width: 44px; height: 44px; }

/* questions */
.question { margin: 0; font-size: 16.5px; font-weight: 500; }
.question-row { flex-shrink: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.word-count, .dial-pace, .desk-note { font-family: "DM Mono", monospace; font-size: 11px; text-transform: uppercase; color: var(--ink-mute); }
.word-count { flex-shrink: 0; letter-spacing: .12em; }

/* time dial */
.dial-block { flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.dial-wrap { display: flex; justify-content: center; margin: 2px 0; }
.dial { position: relative; width: 190px; height: 190px; cursor: grab; touch-action: none; user-select: none; border-radius: 50%; }
.dial:active { cursor: grabbing; }
.dial-svg { display: block; transform: rotate(-90deg); }
.dial-ticks { position: absolute; inset: 0; pointer-events: none; }
.dial-tick { position: absolute; left: 50%; top: 50%; width: 2px; height: 6px; margin: -3px 0 0 -1px; border-radius: 2px; background: #d6cfc6; }
.dial-tick.is-lit { background: rgba(255, 255, 255, .55); }
.dial-handle { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 4px solid #9c8cc4; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(28, 26, 24, .22); pointer-events: none; }
.dial-readout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; pointer-events: none; }
.dial-clock { font-size: 42px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.dial-pace { letter-spacing: .14em; }

.presets { flex-shrink: 0; display: flex; gap: 8px; }
.preset { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: none; color: #4a4642; font-size: 14px; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.preset.is-on { border-color: #7b62c4; background: var(--accent); color: #fff; }

/* free-text intent */
.want-block { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; }
.want-field { flex: 1; min-height: 152px; position: relative; }
.want-field textarea { width: 100%; height: 100%; padding: 14px 16px 54px; border: 1px solid #e3ded7; border-radius: 18px; background: #fff; outline: none; resize: none; font-size: 15.5px; line-height: 1.55; }
.want-field textarea::placeholder { color: var(--ink-faint); }
.want-actions { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dictate-hint { font-size: 13px; color: var(--ink-faint); transition: color .18s ease; }
.mic { flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; background: #f1ede7; color: #6b6560; display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: none; -webkit-touch-callout: none; transition: background .18s ease, color .18s ease, transform .18s cubic-bezier(.2, .85, .2, 1), box-shadow .18s ease; }
.mic svg { width: 19px; height: 19px; }
.dictate-hint.is-holding { color: #5f4f92; }
.mic.is-holding { background: var(--accent); color: #fff; transform: scale(1.06); box-shadow: 0 0 0 6px rgba(95, 79, 146, .14); }

/* footer */
.screen-footer { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 30px 28px; padding-bottom: max(28px, env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 0 -14px 26px rgba(250, 248, 245, .96); }
.cta { min-height: 58px; border: none; border-radius: 18px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 500; cursor: pointer; transition: background .2s ease, color .2s ease; }
.cta[aria-disabled="true"] { background: #e6e1da; color: var(--ink-faint); cursor: default; }
.skip { min-height: 44px; border: none; background: none; color: var(--ink-mute); font-size: 14px; cursor: pointer; }

/* handoff */
.handoff { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 52px 44px; background: rgba(250, 248, 245, .97); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: riseIn .35s ease both; }
.handoff[hidden] { display: none; }
.handoff-kicker { margin: 0 0 10px; color: var(--ink-mute); font: 11px "DM Mono", monospace; letter-spacing: .15em; }
.handoff h2 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.handoff-progress { position: relative; display: grid; gap: 26px; margin: 42px 0 0; padding: 0; list-style: none; }
.handoff-progress::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.handoff-step { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 16px; min-height: 28px; color: var(--ink-faint); font-size: 15px; line-height: 1.35; transition: color .28s ease; }
.handoff-step i { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); transition: border-color .28s ease, background .28s ease, transform .28s ease; }
.handoff-step.is-current { color: var(--ink); }
.handoff-step.is-current i { border: 7px solid rgba(113, 94, 168, .18); background: var(--violet, #715ea8); background-clip: content-box; transform: scale(1.05); }
.handoff-step.is-complete { color: var(--ink); }
.handoff-step.is-complete i { border-color: #715ea8; background: #715ea8; }
.handoff-step.is-complete i::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid white; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.handoff-ready { margin: 38px 0 0 44px; color: #5f4f92; font-size: 16px; font-weight: 500; opacity: 0; transform: translateY(6px); transition: opacity .28s ease, transform .28s ease; }
.handoff-ready.is-visible { opacity: 1; transform: translateY(0); }

/* Match the trajectory page: full-bleed on phones, a 430x932 mobile shell when
 * demonstrated in a wider browser. The prototype instruction remains hidden. */
@media (min-width: 520px) {
  html, body { background: radial-gradient(circle at 50% 20%, #f4f1ec, #ded8d0); }
  .desk { padding: 24px; }
  .device { border-radius: 46px; box-shadow: 0 28px 70px rgba(43, 39, 34, .22); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
