/* ---------- type ---------- */

@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-cyrillic-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

@font-face { font-family: 'Geologica'; font-weight: 100 900; font-display: swap; src: url('/fonts/geologica-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geologica'; font-weight: 100 900; font-display: swap; src: url('/fonts/geologica-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geologica'; font-weight: 100 900; font-display: swap; src: url('/fonts/geologica-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Geologica'; font-weight: 100 900; font-display: swap; src: url('/fonts/geologica-cyrillic-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

/* ---------- tokens ---------- */

:root {
  --ink-rgb: 24, 22, 16;
  --accent-rgb: 226, 74, 43;
  --bg: #f4f1ea;
  --raise: #fffefb;
  --card: #fbf9f4;
  --ink: rgb(var(--ink-rgb));
  --ink-2: rgba(var(--ink-rgb), 0.62);
  --ink-3: rgba(var(--ink-rgb), 0.4);
  --line: rgba(var(--ink-rgb), 0.1);
  --line-2: rgba(var(--ink-rgb), 0.18);
  --chip: rgba(var(--ink-rgb), 0.055);
  --accent: rgb(var(--accent-rgb));
  --veil: rgba(244, 241, 234, 0.78);
  --lift: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px -18px rgba(60, 48, 20, 0.22);
  --float: 0 10px 34px -12px rgba(60, 48, 20, 0.28);

  --sans: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Geologica', 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;

  /* A spring that overshoots a little and settles: things arrive, they do not slide. */
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink-rgb: 243, 239, 230;
    --accent-rgb: 255, 112, 77;
    --bg: #0e0d0b;
    --raise: #1b1a17;
    --card: #161512;
    --veil: rgba(14, 13, 11, 0.78);
    --lift: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --float: 0 10px 34px -12px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 1.2s var(--out);
}

#root { position: relative; height: 100dvh; }

.view {
  display: flex;
  flex-direction: column;
  width: min(100%, 480px);
  height: 100%;
  margin-inline: auto;
  animation: view-in 0.7s var(--out) both;
}

.view.leaving { animation: view-out 0.22s ease-in both; }

@keyframes view-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes view-out { to { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }

/* ---------- shared pieces ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 19px/1 var(--display);
  letter-spacing: -0.03em;
}

.brand svg { width: 28px; height: 28px; }
.brand svg .a { stroke: var(--ink); }
.brand svg .b { stroke: var(--accent); }

.display {
  margin: 0;
  font: 300 clamp(36px, 10.4vw, 54px)/1.05 var(--display);
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.display em { display: block; color: var(--accent); font-style: normal; text-wrap: balance; }

.title {
  margin: 0;
  font: 300 32px/1.1 var(--display);
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.label {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.muted { color: var(--ink-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 17px;
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform 0.35s var(--spring), opacity 0.2s, background 0.2s;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.32; cursor: default; }
.btn.spark { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.7); }
.btn.quiet { background: var(--chip); color: var(--ink); }
.btn.ghost { min-height: 44px; background: none; color: var(--ink-2); font-weight: 500; }
.btn.danger { background: none; color: var(--accent); font-weight: 500; }
.btn.round { width: 54px; padding: 0; border-radius: 50%; }
.btn.round.busy svg { display: none; }
.btn.busy { pointer-events: none; }
.btn.busy::after {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  content: '';
}

@keyframes spin { to { transform: rotate(360deg); } }

.input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 17px;
  outline: none;
  background: var(--raise);
  font-size: 17px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14); }

.error {
  min-height: 20px;
  margin: 8px 2px 0;
  color: var(--accent);
  font-size: 14px;
}

.shake { animation: shake 0.42s var(--out); }
@keyframes shake { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }

/* ---------- landing ---------- */

.landing {
  padding: max(22px, env(safe-area-inset-top)) 24px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

.landing-top { display: flex; align-items: center; justify-content: space-between; }

.hero { margin-top: auto; padding-top: 14px; }
.hero > * { animation: rise 0.9s var(--out) both; }
.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.22s; }

.lead { max-width: 24em; margin: 10px 0 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.45; text-wrap: pretty; }

.need { margin: 20px 0 0; font: 300 23px/1.25 var(--display); letter-spacing: -0.04em; white-space: nowrap; }
.need span, .need b { display: inline-block; }
.need b { color: var(--accent); font-weight: 400; }
.need .in { animation: ghost 0.7s var(--out) both; }

.principles { margin: 18px 0 0; padding: 0; list-style: none; }
.principles li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.4;
}
.principles svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

.signin { margin-top: 18px; animation: rise 0.9s 0.24s var(--out) both; }
.signin-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14.5px; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check i {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-2);
  border-radius: 7px;
  transition: background 0.2s, border-color 0.2s, transform 0.35s var(--spring);
}
.check i::after { width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; opacity: 0; transform: rotate(-45deg) translate(1px, -1px); content: ''; }
.check input:checked + i { border-color: var(--accent); background: var(--accent); transform: scale(1.06); }
.check input:checked + i::after { opacity: 1; }
.check input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 3px; }

.legal { margin: 12px 0 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }

/* ---------- code and profile steps ---------- */

.step { padding: max(22px, env(safe-area-inset-top)) 24px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; }
.step-body { margin-block: auto; padding-block: 32px; }
.step-body > * { animation: rise 0.8s var(--out) both; }
.step-body > :nth-child(2) { animation-delay: 0.06s; }
.step-body > :nth-child(3) { animation-delay: 0.12s; }
.step-body > :nth-child(4) { animation-delay: 0.18s; }
.step-body > :nth-child(5) { animation-delay: 0.24s; }
.step p { margin: 12px 0 0; }

.code { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 28px; }
.code input { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; outline: 0; background: none; color: transparent; caret-color: transparent; font-size: 16px; letter-spacing: 2em; }
.code span {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 6;
  border: 1px solid var(--line-2);
  border-radius: 15px;
  background: var(--raise);
  font: 400 28px/1 var(--display);
  transition: border-color 0.2s, transform 0.35s var(--spring), box-shadow 0.2s;
}
.code span.at { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14); transform: translateY(-2px); }
.code span.filled { animation: pop 0.4s var(--spring); }
@keyframes pop { from { transform: scale(0.82); } }

.dev-code { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 18px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 13px; color: var(--ink-2); font-size: 13.5px; }
.dev-code b { color: var(--ink); font: 500 18px var(--display); letter-spacing: 0.1em; }

.step-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 22px; }
.link { color: var(--ink-2); font-size: 14.5px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.link:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

.fields { display: grid; gap: 10px; margin-top: 26px; }
.fields .label { margin: 12px 2px 0; }
.help { margin: 4px 2px 0 !important; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.step .btn.wide { width: 100%; margin-top: 22px; }

/* ---------- the app frame ---------- */

.app { position: relative; }

.bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--raise);
  font: 500 15px/1 var(--display);
  text-transform: uppercase;
  transition: transform 0.35s var(--spring);
}
.avatar:active { transform: scale(0.92); }

.screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.swap { animation: screen-in 0.5s var(--out) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(5px); } }

.dock { display: grid; flex: none; gap: 10px; padding: 6px 12px max(12px, env(safe-area-inset-bottom)); }

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-self: center;
  width: min(100%, 250px);
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
  backdrop-filter: blur(14px);
}
.tabs i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--raise); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.18); transition: transform 0.6s var(--spring); }
.tabs[data-tab='matches'] i { transform: translateX(100%); }
.tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; color: var(--ink-2); font-size: 14.5px; font-weight: 600; transition: color 0.25s; }
.tabs button[aria-selected='true'] { color: var(--ink); }

.badge { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; animation: pop 0.5s var(--spring); }

/* On a phone the keyboard needs the room more than the tabs do. */
@media (pointer: coarse) and (max-height: 520px) { .dock:focus-within .tabs { display: none; } }

/* ---------- chat ---------- */

.thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 18px 20px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  mask-image: linear-gradient(to bottom, transparent, #000 22px, #000 calc(100% - 14px), transparent);
  scrollbar-width: none;
}
.thread::-webkit-scrollbar { display: none; }
.thread > :first-child { margin-top: auto; }

.welcome { padding: 8px 4px 22px; }
.welcome p { max-width: 24em; margin: 14px 0 0; color: var(--ink-2); line-height: 1.5; }
.welcome small { display: block; margin-top: 14px; color: var(--ink-3); font-size: 13px; }

.day { align-self: center; margin: 22px 0 10px; color: var(--ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }

.mine {
  align-self: flex-end;
  max-width: 86%;
  margin-top: 10px;
  padding: 11px 15px;
  border-radius: 21px 21px 7px 21px;
  background: var(--raise);
  box-shadow: 0 0 0 1px var(--line), 0 8px 20px -14px rgba(60, 48, 20, 0.35);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.mine.new { transform-origin: 100% 100%; animation: send 0.55s var(--spring) both; }
@keyframes send { from { opacity: 0; transform: translateY(26px) scale(0.9); } }

.hooks { display: flex; flex-wrap: wrap; align-self: flex-end; justify-content: flex-end; gap: 6px; max-width: 94%; margin-top: 7px; }

.hook {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--veil);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.3;
  text-align: left;
  transition: transform 0.35s var(--spring), color 0.2s, border-color 0.2s;
}
.hook:active { transform: scale(0.95); }
.hook::before { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ''; transition: all 0.3s var(--out); }
.hook.new { animation: hook-in 0.6s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes hook-in { from { opacity: 0; transform: translateY(8px) scale(0.86); } }
.hook[data-kind='request'] { border-color: rgba(var(--accent-rgb), 0.45); color: var(--ink); }
.hook[data-kind='request'] b { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hook[data-kind='request'] { display: inline-block; }
.hook[data-kind='request']::before { display: inline-block; margin-right: 7px; vertical-align: middle; }
.hook[aria-pressed='true'] { border-style: dashed; border-color: var(--line-2); color: var(--ink-3); }
.hook[aria-pressed='true']::before {
  width: 9px;
  height: 10px;
  border-radius: 0;
  background: var(--ink-3);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Cpath d='M9 0a5 5 0 0 0-5 5v3H3a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V5a5 5 0 0 0-5-5Zm-3 5a3 3 0 0 1 6 0v3H6V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.reading { align-self: flex-end; margin-top: 7px; color: var(--ink-3); font-size: 12.5px; }
.reading::after { display: inline-block; width: 1.2em; text-align: left; animation: dots 1.4s steps(4) infinite; content: ''; }
@keyframes dots { 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }

.voice {
  align-self: flex-start;
  max-width: 92%;
  margin-top: 14px;
  padding: 0 2px;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.voice.new span { display: inline-block; animation: word 0.6s var(--out) both; animation-delay: calc(var(--i) * 34ms); white-space: pre; }
@keyframes word { from { opacity: 0; transform: translateY(6px); filter: blur(5px); } }

.thinking { display: flex; align-self: flex-start; gap: 5px; margin-top: 18px; padding: 6px 2px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: think 1.3s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: 0.16s; }
.thinking i:nth-child(3) { animation-delay: 0.32s; }
@keyframes think { 0%, 70%, 100% { opacity: 0.3; transform: none; } 35% { opacity: 1; transform: translateY(-4px); } }

.note { align-self: center; max-width: 90%; margin-top: 12px; color: var(--ink-3); font-size: 13px; text-align: center; }

.composer {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--raise);
  box-shadow: var(--float);
  transition: border-color 0.2s, box-shadow 0.3s;
}
.composer:focus-within { border-color: var(--line-2); }
.composer textarea { flex: 1; min-width: 0; max-height: 168px; padding: 11px 0; border: 0; outline: 0; background: none; font-size: 16.5px; line-height: 1.4; resize: none; scrollbar-width: none; }
.composer textarea::-webkit-scrollbar { display: none; }

.ghost-text { position: absolute; top: 17px; left: 21px; right: 60px; overflow: hidden; color: var(--ink-3); font-size: 16.5px; line-height: 1.4; pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
.ghost-text span { display: inline-block; animation: ghost 0.7s var(--out) both; }
@keyframes ghost { from { opacity: 0; transform: translateY(9px); filter: blur(4px); } }

.send { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: transform 0.4s var(--spring), opacity 0.2s, background 0.2s; }
.send:disabled { background: var(--chip); color: var(--ink-3); cursor: default; }
.send:not(:disabled):active { transform: scale(0.88); }
.send.go { animation: launch 0.5s var(--spring); }
@keyframes launch { 40% { transform: translateY(-5px) scale(0.92); } }

/* ---------- matches ---------- */

.quiet-state { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 24px 32px 48px; text-align: center; }
.quiet-state p { max-width: 20em; margin: 12px 0 0; color: var(--ink-2); line-height: 1.5; }
.quiet-state .btn { margin-top: 24px; }

.orbit { position: relative; width: 132px; height: 132px; margin-bottom: 30px; }
.orbit i { position: absolute; inset: 0; border: 1px solid var(--line-2); border-radius: 50%; animation: ring 4.8s var(--out) infinite; }
.orbit i:nth-child(2) { animation-delay: 1.6s; }
.orbit i:nth-child(3) { animation-delay: 3.2s; }
.orbit b { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: var(--ink); }
@keyframes ring { from { opacity: 0.9; transform: scale(0.08); } to { opacity: 0; transform: scale(1); } }

.cards { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; padding: 14px 14px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; mask-image: linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 18px), transparent); }
.cards::-webkit-scrollbar { display: none; }

.card {
  /* Every step has its own light. The card carries its colours itself, whatever the theme. */
  --c-bg: #14130f;
  --c-ink: #f3efe6;
  --c-sub: rgba(243, 239, 230, 0.58);
  --c-line: rgba(243, 239, 230, 0.13);
  --c-fill: rgba(243, 239, 230, 0.08);
  position: relative;
  flex: none;
  padding: 20px 22px 22px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 30px;
  background: var(--c-bg);
  color: var(--c-ink);
  box-shadow: var(--lift);
  transition: background 0.8s var(--out), color 0.8s var(--out);
}

/* Step 1, night: almost nothing is known. A few far lights. */
.card[data-stage='1'] {
  background:
    radial-gradient(1px 1px at 18% 22%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 46%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 34% 78%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(120% 90% at 85% -10%, #26221b, transparent 60%),
    #100f0c;
}

/* Step 2, ember: something warm is coming up from below. */
.card[data-stage='2'] {
  --c-line: rgba(255, 214, 190, 0.16);
  --c-fill: rgba(255, 214, 190, 0.09);
  background:
    radial-gradient(130% 70% at 50% 118%, rgba(var(--accent-rgb), 0.55), transparent 62%),
    radial-gradient(90% 60% at 100% 0%, #33241c, transparent 70%),
    #17120f;
}

/* Step 3, day: it is light now, everything can be read. */
.card[data-stage='3'] {
  --c-bg: #fffaf2;
  --c-ink: #1a1711;
  --c-sub: rgba(26, 23, 17, 0.6);
  --c-line: rgba(26, 23, 17, 0.12);
  --c-fill: rgba(26, 23, 17, 0.05);
  border-color: rgba(var(--accent-rgb), 0.45);
  background:
    radial-gradient(120% 70% at 100% -10%, rgba(var(--accent-rgb), 0.3), transparent 60%),
    radial-gradient(90% 60% at 0% 110%, rgba(255, 196, 120, 0.35), transparent 65%),
    #fffaf2;
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.1), var(--lift);
}

/* All three said: the sun. */
.card[data-stage='4'] {
  --c-ink: #fff;
  --c-sub: rgba(255, 255, 255, 0.78);
  --c-line: rgba(255, 255, 255, 0.28);
  --c-fill: rgba(255, 255, 255, 0.16);
  border-color: transparent;
  background: radial-gradient(130% 90% at 80% -10%, #ff9a5c, transparent 60%), linear-gradient(165deg, #f0623a, #c8391c);
  box-shadow: 0 24px 50px -22px rgba(var(--accent-rgb), 0.9);
}

.card.new { animation: card-in 0.9s var(--spring) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(0.94); } }
.card[data-status='declined'], .card[data-status='expired'] { box-shadow: none; opacity: 0.45; filter: saturate(0.3); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--c-sub); content: ''; }
.card[data-turn='mine'] .eyebrow::before { background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); animation: beacon 2s var(--out) infinite; }
@keyframes beacon { to { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); } }
.more { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px -8px -6px 0; border-radius: 50%; color: var(--c-sub); }
.more:active { background: var(--c-fill); }

/* The counter. It is the largest thing on the card on purpose. */
.count { display: flex; align-items: flex-end; margin: 14px 0 18px; }
.count b { font: 200 104px/0.78 var(--display); letter-spacing: -0.07em; }
.count > i { margin: 0 0 6px 4px; color: var(--c-sub); font: 300 30px/1 var(--display); font-style: normal; letter-spacing: -0.04em; }
.count-side { display: grid; gap: 9px; margin: 0 0 8px auto; justify-items: end; }
.count-name { font: 400 17px/1 var(--display); letter-spacing: -0.03em; }
.bars { display: flex; gap: 5px; }
.bars i { width: 26px; height: 4px; border-radius: 2px; background: var(--c-line); transition: background 0.6s; }
.bars i.on { background: var(--c-ink); }
.card[data-stage='2'] .count b, .card[data-stage='3'] .count b { color: var(--accent); }
.card[data-stage='1'] .count b { color: transparent; -webkit-text-stroke: 1.2px var(--c-ink); }
.card.new .count b, .card .count b.tick { animation: tick 0.9s var(--spring) both; }
@keyframes tick { from { opacity: 0; transform: translateY(40px) scale(0.7); filter: blur(10px); } }

.step-part { padding-top: 15px; border-top: 1px solid var(--c-line); }
.step-part + .step-part { margin-top: 18px; }
.step-part .label, .sealed .label { color: var(--c-sub); }
.step-part p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.56; text-wrap: pretty; }

.facts { margin: 6px 0 0; padding: 0; list-style: none; }
.facts li { padding: 11px 0; border-top: 1px solid var(--c-line); font: 400 19.5px/1.3 var(--display); letter-spacing: -0.03em; text-wrap: pretty; }
.facts li:first-child { border-top: 0; }
.card.new .facts li, .step-part.new { animation: reveal 0.9s var(--out) both; animation-delay: calc(0.3s + var(--i, 0) * 0.16s); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); filter: blur(10px); } }

/* The step that has not opened: you can see that something is there. */
.sealed { position: relative; margin-top: 18px; padding: 15px 16px 14px; border: 1px dashed var(--c-line); border-radius: 20px; }
.sealed-lines { display: grid; gap: 8px; margin: 12px 0; filter: blur(5px); }
.sealed-lines i { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--c-fill), var(--c-sub), var(--c-fill)); background-size: 220% 100%; animation: shimmer 3.2s linear infinite; }
.sealed-lines i:nth-child(2) { width: 82%; animation-delay: 0.4s; }
.sealed-lines i:nth-child(3) { width: 56%; animation-delay: 0.8s; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -20% 0; } }
.sealed-note { display: flex; align-items: center; gap: 9px; color: var(--c-sub); font-size: 13px; }
.sealed-note svg { flex: none; width: 12px; height: 14px; fill: currentColor; }

.actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-top: 20px; }
.actions .btn { min-height: 54px; }
.card .btn.quiet { background: var(--c-fill); color: var(--c-ink); }

.state { margin: 18px 0 0; color: var(--c-sub); font-size: 14.5px; }

/* Waiting for the other one: two bodies going round each other. */
.await { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 14px 16px; border-radius: 20px; background: var(--c-fill); }
.await p { display: grid; gap: 3px; margin: 0; }
.await strong { font-weight: 600; }
.await span { color: var(--c-sub); font-size: 13.5px; line-height: 1.35; }
.orbit2 { position: relative; flex: none; width: 34px; height: 34px; animation: spin 3.6s linear infinite; }
.orbit2 i { position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; }
.orbit2 i:first-child { left: 0; background: var(--c-ink); }
.orbit2 i:last-child { right: 0; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.9); }

.contact { margin-top: 20px; padding: 18px 18px 16px; border-radius: 22px; background: rgba(255, 255, 255, 0.16); animation: reveal 1s 0.2s var(--out) both; }
.contact small { display: block; font-size: 13.5px; line-height: 1.4; opacity: 0.8; }
.contact strong { display: block; margin-top: 12px; font: 400 26px/1.2 var(--display); letter-spacing: -0.04em; overflow-wrap: anywhere; }
.contact span { display: block; margin-top: 4px; font-size: 16px; opacity: 0.9; overflow-wrap: anywhere; }
.contact button { margin-top: 14px; padding: 9px 16px; border-radius: 999px; background: #fff; color: #c8391c; font-size: 13.5px; font-weight: 600; }

/* ---------- the reveal: a new introduction, an opened step, the last yes ---------- */

.reveal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  overflow: hidden;
  background: radial-gradient(90% 60% at 50% 42%, #2a1d15, #0c0b09 75%);
  color: #f3efe6;
  text-align: center;
  animation: veil-in 0.5s var(--out) both;
}
.reveal.gone { animation: veil-out 0.42s ease-in both; }
@keyframes veil-in { from { opacity: 0; } }
@keyframes veil-out { to { opacity: 0; transform: scale(1.04); } }
.reveal[data-level='3'] { background: radial-gradient(90% 60% at 50% 42%, #5a2a17, #120d0a 78%); }
.reveal[data-level='4'] { background: radial-gradient(100% 70% at 50% 40%, #ff9a5c, #c8391c 70%); }

.reveal-rings { position: absolute; top: 42%; left: 50%; width: 0; height: 0; }
.reveal-rings i { position: absolute; top: -170px; left: -170px; width: 340px; height: 340px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; animation: ring 3.4s var(--out) infinite; }
.reveal-rings i:nth-child(2) { animation-delay: 1.1s; }
.reveal-rings i:nth-child(3) { animation-delay: 2.2s; }

.reveal-mark { width: 54px; height: 54px; animation: mark-in 1.1s var(--spring) both; }
.reveal-mark svg { width: 100%; height: 100%; }
.reveal-mark svg .a { stroke: #f3efe6; }
.reveal-mark svg .b { stroke: var(--accent); }
.reveal[data-level='4'] .reveal-mark svg .b { stroke: #fff; }
@keyframes mark-in { from { opacity: 0; transform: scale(0.3) rotate(-120deg); } }

.reveal-count { display: flex; align-items: flex-end; margin-top: 18px; animation: tick 1s 0.25s var(--spring) both; }
.reveal-count b { font: 200 168px/0.8 var(--display); letter-spacing: -0.07em; }
.reveal-count i { margin: 0 0 12px 6px; font: 300 42px/1 var(--display); font-style: normal; opacity: 0.6; }
.reveal-count s { margin: 0 14px 14px 0; font: 200 64px/1 var(--display); opacity: 0.3; text-decoration-thickness: 2px; }
.reveal .title { margin-top: 26px; color: inherit; animation: rise 0.8s 0.55s var(--out) both; }
.reveal p { margin: 10px 0 0; opacity: 0.72; animation: rise 0.8s 0.65s var(--out) both; }
.reveal .btn { min-width: 190px; margin-top: 34px; animation: rise 0.8s 0.85s var(--out) both; }
.reveal[data-level='4'] .btn { background: #fff; color: #c8391c; box-shadow: none; }

/* ---------- a blocked account ---------- */

.ban .title { color: var(--accent); }
.ban .muted { font-size: 17px; line-height: 1.5; }
.ban-label { display: block; margin-top: 30px; }
.ban textarea.input { min-height: 130px; margin-top: 10px; padding: 14px 18px; line-height: 1.45; resize: none; }
.ban-state { margin-top: 22px; padding: 14px 16px; border-radius: 16px; background: var(--chip); }

/* ---------- sheets ---------- */

.backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, 0.36); opacity: 0; transition: opacity 0.35s; }
.backdrop.open { opacity: 1; }

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 11;
  display: flex;
  flex-direction: column;
  width: min(100%, 480px);
  max-height: 92dvh;
  padding: 10px 22px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border-radius: 30px 30px 0 0;
  background: var(--bg);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 104%);
  transition: transform 0.62s var(--spring);
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.open { transform: translate(-50%, 0); }
.sheet.closing { transition: transform 0.28s ease-in; }
.sheet::before { flex: none; align-self: center; width: 38px; height: 4px; margin-bottom: 18px; border-radius: 2px; background: var(--line-2); content: ''; }
.sheet .title { font-size: 28px; }
.sheet > p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.5; }
.sheet-actions { display: grid; gap: 8px; margin-top: 24px; }
.sheet textarea.input { min-height: 120px; margin-top: 18px; padding: 14px 18px; line-height: 1.45; resize: none; }

.rows { margin-top: 22px; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 58px; border-bottom: 1px solid var(--line); font-size: 16px; text-align: left; }
.row small { color: var(--ink-3); font-size: 14px; }
.row.danger { color: var(--accent); }
.chev { flex: none; width: 8px; height: 8px; border: solid var(--ink-3); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }

.group { margin-top: 26px; }
.group .label { display: block; margin-bottom: 4px; }
.entry { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.entry div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.entry q { display: block; margin-top: 3px; color: var(--ink-3); font-size: 13px; }
.entry[data-private='true'] > div > span { color: var(--ink-3); }

.lock { display: grid; flex: none; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; border-radius: 50%; color: var(--ink-3); transition: transform 0.35s var(--spring), background 0.2s, color 0.2s; }
.lock svg { width: 14px; height: 16px; fill: currentColor; }
.lock[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.lock:active { transform: scale(0.86); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.chips span i { color: var(--ink-3); font-style: normal; }

/* ---------- toast ---------- */

#toast { position: fixed; bottom: calc(150px + env(safe-area-inset-bottom)); left: 50%; z-index: 20; width: max-content; max-width: min(88vw, 400px); padding: 11px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transform: translate(-50%, 14px) scale(0.96); transition: opacity 0.3s, transform 0.5s var(--spring); }
#toast.open { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wide screens: the column sits in the field like a page on a desk ---------- */

@media (min-width: 720px) and (min-height: 640px) {
  #root { padding-block: 28px; }
  .view.app { overflow: hidden; border: 1px solid var(--line); border-radius: 36px; background: var(--veil); box-shadow: var(--lift); backdrop-filter: blur(18px); }
  .sheet { bottom: 28px; border-radius: 30px; }
  .sheet:not(.open) { transform: translate(-50%, calc(104% + 28px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

/* ---------- notifications ---------- */

.push-cta { margin-top: 14px !important; min-height: 46px; font-size: 14.5px; }
.push-cta[data-state='on'], .push-cta[data-state='denied'], .push-cta[data-state='install'] { background: none; color: var(--ink-3); font-weight: 400; opacity: 1; }
.push-row { max-width: 60%; color: var(--ink-3); font-size: 14px; text-align: right; }
.push-row[data-state='off'] { padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; }
.push-row:disabled, .push-cta:disabled { cursor: default; }
