/* Shared styles for Thumb's app pages: /signin, /app, /docs, /privacy, /terms.
   Standalone: pages link this file instead of styles.css (which stays landing-only).

   Page skeleton:
     <a class="skip" href="#main">Skip to content</a>
     <header class="page-nav wrap"> a.logo + nav.page-links </header>
     <main id="main" class="wrap …"> .eyebrow, h1.display, .lede, .card, .button(.dark|.lime|.ghost|.danger) </main>
     <footer class="page-footer wrap"> a.logo + nav.footer-links + .footer-note </footer>
   Long-form text (privacy, terms): wrap it in <article class="prose">. */

:root {
  --paper: #f6f5ef;
  --paper-2: #fbfbf7;
  --ink: #1c2b22;
  --ink-2: #324637;
  --muted: #647063;
  --faint: #8d9689;
  --lime: #d4fb53;
  --lime-soft: #eef9c8;
  --olive: #6f8f22;
  --sage: #e7ebde;
  --sage-2: #e8eddc;
  --line: #dddfd4;
  --line-2: #ccd5bf;
  --code-bg: #142219;
  --code-line: #33432f;
  --code-text: #d1e4b6;
  --code-muted: #a9b69c;
  --danger: #9a3028;
  --danger-bg: #f7e6e1;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --focus: #6f8f22;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: break-word;
}
main {
  flex: 1 0 auto;
}
a {
  color: inherit;
}
img,
svg {
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
code,
kbd,
pre {
  font-family: var(--mono);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 14px 16px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 10px;
}
.wrap {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* Header */
.page-nav {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -1.7px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  width: 32px;
  height: 32px;
}
.logo-dot {
  margin-left: -8px;
}
.page-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  min-width: 0;
}
.page-links a {
  text-decoration: none;
}
.page-links a:hover,
.footer-links a:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.account-chip {
  font: 11px var(--mono);
  color: var(--muted);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Type */
.eyebrow {
  font: 600 10px/1.6 var(--mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #89a541;
  flex-shrink: 0;
}
.display {
  font-size: clamp(42px, 6.2vw, 80px);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 750;
  margin: 18px 0 20px;
}
.display:focus {
  outline: none;
}
h2 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.9px;
  margin: 10px 0 0;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}
.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 580px;
  margin: 0;
}
.underlined {
  position: relative;
  display: inline-block;
}
.underlined svg {
  position: absolute;
  left: 0;
  bottom: -0.16em;
  width: 100%;
  height: 0.26em;
  fill: none;
  stroke: #a7c838;
  stroke-width: 5;
  stroke-linecap: round;
}
.fine-print {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 14px 0 0;
}
.fine-print a,
.lede a,
.card a:not(.button),
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  background: var(--paper-2);
  color: var(--ink);
  transition:
    transform 0.18s,
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button .arrow {
  font-size: 19px;
  line-height: 1;
}
.button.dark {
  background: var(--ink);
  color: var(--paper);
}
.button.dark:hover:not(:disabled) {
  background: var(--ink-2);
}
.button.lime {
  background: var(--lime);
  color: var(--ink);
  border-color: #bddf45;
}
.button.lime:hover:not(:disabled) {
  background: #dcff6e;
}
.button.ghost {
  background: transparent;
  border-color: var(--line-2);
}
.button.ghost:hover:not(:disabled) {
  background: var(--sage-2);
}
.button.danger {
  background: var(--danger);
  color: #fff;
}
.button.danger-ghost {
  background: transparent;
  border-color: #e0bdb5;
  color: var(--danger);
}
.button.danger-ghost:hover:not(:disabled) {
  background: var(--danger-bg);
}
.button.small {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 12px;
  gap: 8px;
}
.button.wide {
  width: 100%;
  justify-content: space-between;
}

/* Forms */
.field-label,
form label:not(.consent) {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
}
.field-label span,
form label > .optional {
  font-weight: 400;
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: #f8faf2;
  color: var(--ink);
  font-size: 15px;
}
form input:not([type="checkbox"]):not([type="radio"]) + label,
form textarea + label,
form select + label {
  margin-top: 18px;
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #7f8b73;
}
input[readonly] {
  background: var(--sage-2);
  color: var(--muted);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 0 18px;
}
.consent input {
  accent-color: var(--ink);
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  margin: 10px 0 0;
}
.form-error:empty,
.form-note:empty {
  display: none;
}
.form-note {
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 0;
  color: var(--muted);
}
.notice {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--lime-soft);
  border: 1px solid #d8ee8f;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.notice.is-error {
  background: var(--danger-bg);
  border-color: #eac7bf;
  color: #6f231d;
}
.notice a {
  font-weight: 600;
}

/* Cards */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.card-head h2 {
  margin-top: 8px;
}
.card-lede {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 560px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--sage-2);
  color: var(--ink-2);
}
.empty {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
}

/* Footer */
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.page-footer .logo {
  font-size: 23px;
  letter-spacing: -1.2px;
}
.page-footer .logo img {
  width: 24px;
  height: 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 12px;
}
.footer-links a {
  text-decoration: none;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
}

/* Long-form pages (privacy, terms) */
.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
  color: #2c3a30;
  padding-bottom: 56px;
}
.prose h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 18px 0 16px;
  color: var(--ink);
}
.prose h2 {
  font-size: 24px;
  margin: 40px 0 10px;
  color: var(--ink);
}
.prose h3 {
  margin: 28px 0 6px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}
.prose li + li {
  margin-top: 6px;
}
.prose code {
  font-size: 0.88em;
  background: var(--sage-2);
  padding: 2px 6px;
  border-radius: 5px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 20px;
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose .meta,
.beta-note {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font: 11px/1.6 var(--mono);
  letter-spacing: 0.4px;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}

/* ---------- Sign in ---------- */
.signin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 64px;
}
.signin-panel {
  max-width: 520px;
  min-width: 0;
}
.signin-panel form {
  margin-top: 30px;
}
.signin-panel .display {
  margin-bottom: 30px;
}
.signin-panel .button.wide {
  margin-top: 16px;
}
.signin-email {
  display: block;
  font: 600 clamp(17px, 2.2vw, 22px) / 1.3 var(--mono);
  letter-spacing: -0.3px;
  padding: 16px 18px;
  margin: 22px 0 0;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.signin-email:empty {
  display: none;
}
.sent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14px;
  margin-top: 26px;
  align-items: center;
}
.token-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.warning-line {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 18px 0 0;
}
.warning-line::before {
  content: "!";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage-2);
  font: 700 11px var(--mono);
  color: var(--ink);
  margin-top: 1px;
}
.signin-visual {
  position: relative;
  min-height: 560px;
  border-radius: 22px;
  background: var(--sage);
  border: 1px solid #e0e4d7;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.signin-visual::before,
.live-stage::before,
.phone-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#a0b196 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.42;
  pointer-events: none;
}
.orbit {
  position: absolute;
  border: 1px solid #c9d3bd;
  border-radius: 50%;
  width: 420px;
  height: 420px;
}
.orbit.two {
  width: 560px;
  height: 560px;
}
.visual-label {
  position: absolute;
  left: 22px;
  top: 22px;
  font: 9px var(--mono);
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mock-phone {
  position: relative;
  width: 232px;
  height: 452px;
  background: #f6f5e9;
  border: 8px solid var(--ink);
  border-radius: 38px;
  padding: 16px 14px;
  transform: rotate(6deg);
  box-shadow:
    13px 17px 0 #b5c0a754,
    0 22px 36px #1c2b2220;
}
.mock-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
}
.mock-time {
  font-size: 50px;
  font-weight: 300;
  letter-spacing: -2px;
  text-align: center;
  margin-top: 34px;
}
.mock-date {
  font: 8px var(--mono);
  letter-spacing: 0.8px;
  text-align: center;
  color: #6d7a64;
  margin-top: 4px;
}
.mock-note {
  margin-top: 30px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 18px #1c2b2214;
  animation: arrive 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.3s both;
}
.mock-note-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  color: #6d7a64;
}
.mock-app {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--lime);
  font-size: 10px;
  color: var(--ink);
}
.mock-note strong {
  display: block;
  font-size: 11px;
  margin-top: 8px;
}
.mock-note span.mock-body {
  display: block;
  font-size: 9px;
  line-height: 1.45;
  color: #5c6857;
  margin-top: 4px;
}
.mock-tap {
  position: absolute;
  right: 26px;
  top: 214px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #d4fb5399;
  animation: tap 2.8s ease-in-out 1.2s infinite;
}
.mock-bar {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 72px;
  height: 3px;
  margin-left: -36px;
  border-radius: 2px;
  background: #26392c;
}
.visual-caption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  font-size: 12px;
  line-height: 1.5;
}
.visual-caption strong {
  display: block;
}

/* ---------- Dashboard ---------- */
.dashboard {
  padding-bottom: 48px;
}
.dashboard:focus {
  outline: none;
}
.connection-banner {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}
.connection-banner .status-dot {
  background: #e0a33a;
}
.loading-view {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 72px 0 120px;
  color: var(--muted);
  font-size: 15px;
}
.state-view {
  padding: 24px 0 40px;
  max-width: 980px;
}
.state-view .lede {
  margin-bottom: 8px;
}
.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.next-steps {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.next-steps li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--paper-2);
  position: relative;
}
.next-steps .num {
  font: 10px var(--mono);
  color: var(--faint);
  display: block;
  margin-bottom: 28px;
}
.next-steps li.is-done {
  background: var(--lime-soft);
  border-color: #d8ee8f;
}
.next-steps li.is-done .num::after {
  content: "  ✓ DONE";
  color: var(--olive);
  font-weight: 700;
}
.next-steps p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.bridge-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  background: var(--sage-2);
  border-color: #dce3ce;
}
.terms-card {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 36px;
}
.terms-points ul {
  margin: 14px 0 0;
  padding-left: 18px;
}
.terms-points li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 8px;
}
.terms-card form .consent {
  font-size: 14px;
  margin: 12px 0;
}
.terms-card form .consent a {
  font-weight: 600;
}
.terms-card form .button {
  margin-top: 8px;
}
.field-hint {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 16px;
}
.field-hint a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-thanks {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--lime-soft);
  border: 1px solid #d8ee8f;
  font-size: 14px;
  font-weight: 600;
}
.terms-thanks[hidden] {
  display: none;
}
.bridge-done {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--lime-soft);
  border: 1px solid #d8ee8f;
  font-size: 14px;
  font-weight: 600;
}
.contact-line {
  font-size: 14px;
  color: var(--muted);
  margin: 26px 0 0;
}
.contact-line a {
  color: var(--ink);
  font-weight: 600;
}
.suspended-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 26px;
  margin-bottom: 8px;
}

/* Hero + setup steps */
.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 40px;
  align-items: end;
  padding: 16px 0 36px;
}
.dash-hero .display {
  font-size: clamp(40px, 5.4vw, 72px);
  margin-bottom: 16px;
}
.setup-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.setup-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.step-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.step-state {
  font: 600 9px var(--mono);
  letter-spacing: 1px;
  color: var(--faint);
  text-transform: uppercase;
}
.setup-steps li.is-done {
  background: var(--lime-soft);
  border-color: #d8ee8f;
}
.setup-steps li.is-done .step-mark {
  background: var(--lime);
  border-color: #b3d63a;
}
.setup-steps li.is-done .step-mark::before {
  content: "✓";
}
.setup-steps li.is-done .step-state {
  color: var(--olive);
}
.setup-steps li.is-current {
  border-color: var(--ink);
}
.setup-steps li.is-current .step-mark::before,
.setup-steps li.is-waiting .step-mark::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.setup-steps li.is-waiting .step-mark::before {
  background: #89a541;
  animation: pulse 1.6s ease-in-out infinite;
}
.setup-steps li.is-current .step-state {
  color: var(--ink);
}

/* Phone: none / requested */
.phone-empty {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 40px;
  border-radius: 22px;
  background: var(--sage);
  border: 1px solid #e0e4d7;
}
.phone-empty > * {
  position: relative;
}
.phone-empty h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -1.6px;
}
.phone-empty p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
  margin: 14px 0 0;
}
.phone-empty .button {
  margin-top: 26px;
}
.ghost-phone {
  width: 150px;
  height: 300px;
  margin: 0 auto;
  border-radius: 30px;
  border: 2px dashed #9aae88;
  display: grid;
  place-items: center;
  font-size: 40px;
  color: #8ea17c;
  transform: rotate(-5deg);
  background: #eef1e6;
}
.ghost-phone.is-coming {
  border: 7px solid var(--ink);
  background: #f6f5e9;
  transform: rotate(5deg);
  box-shadow: 11px 14px 0 #b5c0a754;
}
.ghost-chip {
  font: 600 9px var(--mono);
  letter-spacing: 1.2px;
  background: var(--lime);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ghost-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 1.6s ease-in-out infinite;
}
.phone-empty .fine-print {
  font-size: 12px;
  margin-top: 14px;
}

/* Phone: assigned */
.phone-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.phone-select-wrap label {
  margin: 0;
}
.phone-select-wrap select {
  width: auto;
  min-width: 220px;
}
.phone-grid {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.live-stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--sage);
  border: 1px solid #e0e4d7;
  padding: 16px 18px 20px;
  min-width: 0;
}
.live-stage > * {
  position: relative;
}
.stage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid #d5dccb;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}
.live-badge.is-live .live-dot {
  background: #6c9a1f;
  box-shadow: 0 0 0 0 #6c9a1f66;
  animation: beacon 1.8s ease-out infinite;
}
.live-badge.is-offline .live-dot {
  background: var(--danger);
}
.live-badge.is-owner {
  background: var(--lime);
  border-color: #b3d63a;
}
.live-badge.is-owner .live-dot {
  background: var(--ink);
}
.stage-toggle {
  border: 0;
  background: transparent;
  font: 600 11px var(--mono);
  letter-spacing: 0.5px;
  padding: 8px 4px;
  min-height: 36px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.device {
  position: relative;
  width: min(292px, 100%);
  margin: 0 auto;
  padding: 10px;
  border-radius: 40px;
  background: var(--ink);
  box-shadow:
    12px 16px 0 #b5c0a754,
    0 26px 44px -20px #1c2b2270;
}
.device-screen {
  position: relative;
  aspect-ratio: 591 / 1280;
  border-radius: 30px;
  overflow: hidden;
  background: #0f1a13;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.device-screen:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}
.device-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
  transition:
    opacity 0.3s,
    filter 0.3s;
}
.device-screen.is-dim img {
  opacity: 0.32;
  filter: grayscale(0.7);
}
.screen-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  color: #a9ba97;
  font: 10px var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: linear-gradient(160deg, #1b2c21, #0f1a13);
}
.screen-placeholder::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #3c5142;
  border-top-color: var(--lime);
  animation: spin 1s linear infinite;
}
.screen-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 3;
  cursor: default;
}
.overlay-card {
  width: 100%;
  max-width: 228px;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 18px 40px -12px #0008;
}
.overlay-card strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.overlay-card p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}
.overlay-card .button {
  margin-top: 14px;
  width: 100%;
}
.touch-mark {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background: #d4fb5359;
  pointer-events: none;
  z-index: 2;
  animation: ripple 0.6s ease-out forwards;
}
.swipe-trail {
  position: absolute;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d4fb5300, var(--lime));
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 2;
  animation: fade 0.7s ease-out forwards;
}
.screen-help {
  text-align: center;
  font: 10px/1.5 var(--mono);
  letter-spacing: 0.4px;
  color: #56654e;
  margin: 14px 0 0;
}
.nav-keys {
  display: flex;
  gap: 4px;
  width: min(292px, 100%);
  margin: 14px auto 0;
  padding: 5px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid #d5dccb;
}
.key-button {
  flex: 1;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  transition: background 0.15s;
}
.key-button:hover,
.key-button:active {
  background: var(--sage);
}
.key-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.type-form {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px solid #d5dccb;
}
.type-form label {
  margin-bottom: 8px;
}
.type-row {
  display: flex;
  gap: 6px;
}
.type-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 14px;
}
.toggle-button {
  flex-shrink: 0;
  min-width: 58px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}
.toggle-button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.type-row .button {
  flex-shrink: 0;
  min-height: 46px;
}
.type-keys {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.type-keys .button {
  flex: 1;
  gap: 8px;
}
.type-keys svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.type-hint {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 0;
}
.type-hint.is-warning {
  color: var(--ink);
}
.type-hint.is-warning strong {
  background: var(--lime);
  padding: 0 4px;
  border-radius: 3px;
}
.action-status {
  min-height: 18px;
  margin: 12px 0 0;
  text-align: center;
  font: 11px/1.5 var(--mono);
  color: #56654e;
}
.action-status.is-error {
  color: var(--danger);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
}
.phone-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.phone-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.phone-card h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -1.5px;
  margin: 8px 0 6px;
}
.phone-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.status-pill {
  background: #e7f2c7;
  color: #3b5410;
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6c9a1f;
}
.status-pill.is-offline {
  background: var(--danger-bg);
  color: var(--danger);
}
.status-pill.is-offline .dot {
  background: var(--danger);
}
.status-pill.is-frozen {
  background: #f3ead2;
  color: #6b4d0c;
}
.status-pill.is-frozen .dot {
  background: #b07d12;
}
.offline-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: #6f231d;
  font-size: 13px;
  line-height: 1.5;
}
.offline-note.is-frozen {
  background: #f3ead2;
  color: #5a410a;
}
.offline-note a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.facts {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.25fr) minmax(0, 0.6fr);
  gap: 14px;
  margin: 22px 0 0;
}
.facts > div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  min-width: 0;
}
.facts dt {
  font: 600 11px var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin: 7px 0 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.facts code {
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.copy-mini {
  border: 1px solid var(--line-2);
  background: transparent;
  border-radius: 6px;
  padding: 4px 8px;
  min-height: 28px;
  font: 600 10px var(--mono);
  letter-spacing: 0.4px;
}
.copy-mini:hover {
  background: var(--sage-2);
}
.agent-control {
  margin-top: 22px;
  padding: 18px 18px 18px 20px;
  border-radius: 14px;
  background: var(--sage-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition:
    background 0.25s,
    color 0.25s;
}
.agent-control h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
  font-size: 15px;
}
.agent-control p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.agent-control .button {
  flex-shrink: 0;
}
.agent-control.is-paused {
  background: var(--ink);
  color: var(--paper);
}
.agent-control.is-paused p {
  color: #c3ccb9;
}
.agent-control.is-paused .status-dot {
  background: var(--lime);
}
.return-row {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.confirm-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e3c4bc;
  background: #fbf1ee;
}
.confirm-panel p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Activity */
.connected-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--lime);
  color: var(--ink);
}
.connected-banner strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.connected-banner span {
  display: block;
  font-size: 12.5px;
  margin-top: 3px;
  color: #3a4a2c;
}
.connected-banner .check {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.connected-banner.is-new,
.connect-status.is-new {
  animation: celebrate 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.activity-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}
.activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.activity-row:last-child {
  border-bottom: 0;
}
.act-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fa12a;
}
.activity-row.is-error .act-dot {
  background: var(--danger);
}
.act-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.act-tool {
  font: 600 12.5px var(--mono);
}
.act-source {
  font: 600 9px var(--mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--sage-2);
  color: var(--ink-2);
}
.act-source.is-owner {
  background: #e4e0f1;
  color: #43386b;
}
.act-first {
  font: 700 9px var(--mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--lime);
}
.act-target {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.act-failed {
  font-size: 11px;
  color: var(--danger);
  font-weight: 600;
}
.act-duration,
.act-time {
  font: 11px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.activity-row.is-first {
  background: linear-gradient(90deg, #eef9c8, transparent);
}

/* Lower grid: keys + connect */
.dash-section {
  margin-top: 20px;
}
.keys-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
}
.key-form {
  margin-top: 22px;
}
.field-row {
  display: flex;
  gap: 8px;
}
.field-row input {
  flex: 1;
  min-width: 0;
}
.field-row .button {
  flex-shrink: 0;
}
.count {
  font: 600 11px var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}
.new-key {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 0 0 4px #d4fb5366;
  animation: arrive 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.new-key:focus {
  outline: none;
}
.new-key .eyebrow {
  color: var(--lime);
}
.new-key-name {
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0 0;
}
.secret-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}
.secret-row code {
  align-self: stretch;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0f1a13;
  border: 1px solid #3b4c3c;
  color: var(--lime);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.new-key p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #c3ccb9;
  margin: 12px 0 0;
}
.new-key .text-link {
  color: var(--paper);
  font-size: 12.5px;
  margin-top: 10px;
}
.key-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.key-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.key-row:first-child {
  padding-top: 4px;
}
.key-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
}
.key-name {
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.key-prefix {
  font-size: 12px;
  color: var(--ink-2);
  background: var(--sage-2);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 8px;
  white-space: nowrap;
}
.key-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font: 11px var(--mono);
  color: var(--muted);
}
.key-meta .is-used {
  color: var(--olive);
  font-weight: 600;
}
.key-row .confirm-panel {
  margin-top: 12px;
}

/* Connect panel */
.connect-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 40px;
  padding: 40px;
  border-radius: 22px;
  background: var(--ink);
  color: #f3f4e9;
}
.connect-panel .eyebrow {
  color: #a4b28f;
}
.connect-panel h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  letter-spacing: -1.6px;
  line-height: 1.08;
}
.connect-panel h2 span {
  color: var(--lime);
}
.connect-intro p {
  font-size: 14px;
  line-height: 1.75;
  color: #b6c1ad;
  margin: 18px 0 0;
}
.connect-intro code {
  color: var(--lime);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.key-state {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #3c4d3e;
  font-size: 13px !important;
}
.key-state.has-key {
  border-color: #6d8a2a;
  color: #e3edcf !important;
}
.connect-intro .docs-link {
  display: inline-flex;
  gap: 10px;
  color: var(--lime);
  text-decoration: none;
  font-size: 13px;
  margin-top: 18px;
}
.code-panel {
  min-width: 0;
  background: var(--code-bg);
  border: 1px solid #45533e;
  border-radius: 14px;
  overflow: hidden;
}
.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--code-line);
}
.client-tabs button {
  border: 1px solid #3c4d3e;
  background: transparent;
  color: #b6c1ad;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
  font: 600 11px var(--mono);
  letter-spacing: 0.3px;
}
.client-tabs button:hover {
  color: #f3f4e9;
  border-color: #5c6f55;
}
.client-tabs button[aria-selected="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.client-panel {
  min-height: 300px;
}
.client-panel:focus-visible {
  outline-offset: -3px;
}
.snippet + .snippet {
  border-top: 1px dashed var(--code-line);
}
.snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}
.snippet-title {
  font: 11px/1.5 var(--mono);
  color: var(--code-muted);
  letter-spacing: 0.2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.copy-button {
  flex-shrink: 0;
  border: 1px solid #4c5e48;
  background: transparent;
  color: var(--lime);
  border-radius: 7px;
  padding: 6px 11px;
  min-height: 32px;
  font: 600 11px var(--mono);
}
.copy-button:hover {
  background: #22331f;
}
.snippet pre {
  margin: 0;
  padding: 10px 18px 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--code-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.snippet-notes {
  list-style: none;
  margin: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--code-line);
  display: grid;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #b6c1ad;
}
.snippet-notes li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
}
.snippet-notes li::before {
  content: "↳";
  color: var(--lime);
}
.snippet-notes a {
  color: var(--lime);
}
.snippet-notes code {
  font-size: 11.5px;
  color: var(--code-text);
  background: #22331f;
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.connect-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--code-line);
  font-size: 13px;
  color: #d7dfcc;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a4b28f;
  flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}
.connect-status.is-connected {
  color: var(--lime);
  font-weight: 600;
}
.connect-status.is-connected .pulse-dot {
  background: var(--lime);
  animation: none;
}
.connect-status.is-idle .pulse-dot {
  animation: none;
}

/* Account */
.account-card {
  margin-top: 20px;
}
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.account-row h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.account-row p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.account-row strong {
  color: var(--ink);
}
.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.danger-zone {
  margin-top: 22px;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid #e3c4bc;
  background: #fbf1ee;
}
.danger-zone h3 {
  color: var(--danger);
}
.danger-zone p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 640px;
}
.danger-zone form {
  max-width: 520px;
}
.danger-zone input {
  font-family: var(--mono);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@keyframes beacon {
  70% {
    box-shadow: 0 0 0 7px #6c9a1f00;
  }
  100% {
    box-shadow: 0 0 0 0 #6c9a1f00;
  }
}
@keyframes ripple {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes arrive {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes celebrate {
  0% {
    transform: scale(0.96);
  }
  45% {
    transform: scale(1.03);
  }
  100% {
    transform: none;
  }
}
@keyframes tap {
  0%,
  60%,
  100% {
    transform: scale(1);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  80% {
    transform: scale(0.75);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .phone-grid {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .facts > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 950px) {
  .wrap {
    padding-left: 25px;
    padding-right: 25px;
  }
  .signin-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
    align-content: start;
  }
  .signin-visual {
    min-height: 380px;
  }
  .mock-phone {
    transform: rotate(6deg) scale(0.78);
  }
  .dash-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .setup-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .phone-grid,
  .keys-card,
  .connect-panel,
  .bridge-card,
  .terms-card {
    grid-template-columns: 1fr;
  }
  .keys-card,
  .bridge-card,
  .terms-card {
    gap: 22px;
  }
  .connect-panel {
    gap: 28px;
    padding: 32px;
  }
  .live-stage {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
  .next-steps {
    grid-template-columns: 1fr;
  }
  .next-steps .num {
    margin-bottom: 12px;
  }
}
@media (max-width: 700px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .page-nav {
    min-height: 74px;
  }
  .logo {
    font-size: 26px;
  }
  .logo img {
    width: 28px;
    height: 28px;
  }
  .page-links {
    gap: 14px;
  }
  .page-links .hide-small,
  .account-chip {
    display: none;
  }
  .display {
    font-size: clamp(38px, 11.5vw, 54px);
    letter-spacing: -0.05em;
    line-height: 1.02;
  }
  .dash-hero .display {
    font-size: clamp(36px, 10.5vw, 50px);
  }
  .lede {
    font-size: 16px;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  textarea,
  select {
    font-size: 16px;
  }
  .type-row input {
    font-size: 16px;
  }
  .card {
    padding: 22px 18px;
    border-radius: 16px;
  }
  .signin-layout {
    padding-top: 4px;
  }
  .signin-visual {
    display: none;
  }
  .dash-hero {
    padding-top: 6px;
    padding-bottom: 26px;
  }
  .setup-steps {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .phone-empty {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 20px;
    text-align: left;
  }
  .ghost-phone {
    width: 104px;
    height: 200px;
    margin: 0;
    font-size: 30px;
  }
  .phone-empty .button {
    width: 100%;
  }
  .live-stage {
    padding: 14px 12px 16px;
    border-radius: 18px;
  }
  .device {
    width: min(268px, 100%);
  }
  .nav-keys {
    width: min(268px, 100%);
  }
  .type-form {
    padding: 12px;
  }
  .type-row {
    flex-wrap: wrap;
  }
  .type-row input {
    flex-basis: 100%;
  }
  .type-row .toggle-button {
    flex: 1;
  }
  .type-row .button {
    flex: 2;
  }
  .phone-card-top {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .agent-control {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .agent-control .button {
    width: 100%;
  }
  .activity-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 4px 10px;
  }
  .act-duration {
    display: none;
  }
  .field-row {
    flex-direction: column;
  }
  .field-row .button {
    width: 100%;
  }
  .connect-panel {
    padding: 26px 16px 16px;
    border-radius: 18px;
    margin-left: -4px;
    margin-right: -4px;
  }
  .client-tabs {
    padding: 10px;
    gap: 5px;
  }
  .client-tabs button {
    padding: 7px 10px;
    font-size: 10.5px;
  }
  .snippet-head {
    padding: 12px 14px 0;
  }
  .snippet pre {
    padding: 10px 14px 14px;
    font-size: 12px;
  }
  .snippet-notes {
    padding: 12px 14px 16px;
  }
  .account-actions,
  .account-actions .button,
  .state-actions .button {
    width: 100%;
  }
  .danger-zone {
    padding: 18px 16px;
  }
  .confirm-actions .button {
    flex: 1;
  }
  .page-footer {
    gap: 14px;
  }
  .footer-links {
    width: 100%;
    order: 2;
  }
  .footer-note {
    order: 3;
  }
}
@media (max-width: 360px) {
  .page-links {
    gap: 10px;
    font-size: 12px;
  }
  .page-links .button.small {
    padding: 8px 10px;
  }
  .logo {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
