/* Steady: first crypto purchase concept. iOS-sized screens, 390 x 844. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --line: #e2dfd8;
  --text: #17150f;
  --text-2: #5b574e;
  --text-3: #8a857a;
  --brand: #14532d;
  --brand-ink: #ffffff;
  --brand-soft: #e3efe6;
  --up: #15803d;
  --down: #b42318;
  --warn-bg: #fdf3dc;
  --warn-ink: #6b4a05;
  --btc: #e8890c;
  --eth: #5b5f97;
  --usdc: #2a6fb0;
  --radius: 12px;
  --font: "Inter", -apple-system, "SF Pro Text", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #2b2a27;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

/* Stage: phone frame on wide screens, full bleed on phones */
.stage {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 32px 24px;
}
.stage-notes {
  color: #d9d5cc;
  font-size: 14px;
  line-height: 1.5;
  max-width: 300px;
  justify-self: end;
}
.stage-notes h1 { font-size: 18px; margin: 0 0 8px; color: #fff; font-weight: 600; }
.stage-notes p { margin: 0 0 12px; }
.stage-notes a { color: #fff; }
.stage-map {
  justify-self: start;
  color: #d9d5cc;
  font-size: 13px;
  max-width: 240px;
}
.stage-map ol { margin: 0; padding-left: 18px; line-height: 1.9; }
.stage-map button {
  all: unset;
  cursor: pointer;
  color: #d9d5cc;
}
.stage-map button[aria-current="true"] { color: #fff; font-weight: 600; text-decoration: underline; }
.stage-map button:hover { color: #fff; }

.device {
  width: 390px;
  height: 844px;
  border-radius: 54px;
  background: #0c0c0b;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.device .screen { width: 366px; height: 820px; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .stage-notes, .stage-map { display: none; }
  .device { width: 100vw; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; }
  .device .screen { width: 100%; height: 100%; border-radius: 0; }
}

/* Frame-less render, used for screenshots and Figma import */
body.bare { background: var(--bg); }
body.bare .stage { display: block; padding: 0; }
body.bare .stage-notes, body.bare .stage-map { display: none; }
body.bare .device { width: 390px; height: 844px; border-radius: 0; padding: 0; box-shadow: none; background: var(--bg); }
body.bare .device .screen { width: 390px; height: 844px; border-radius: 0; }

/* iOS chrome */
.status {
  height: 50px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 30px 0 34px;
  font-size: 16px;
  font-weight: 600;
}
.status svg { display: block; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.home-indicator {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-indicator span {
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--text);
}

.nav {
  flex: none;
  height: 44px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 8px;
}
.nav-title { text-align: center; font-size: 17px; font-weight: 600; }
.icon-btn {
  all: unset;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text);
}
.icon-btn:focus-visible, .btn:focus-visible, .row:focus-visible, .tile:focus-visible, .chip:focus-visible, .key:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 16px;
  scrollbar-width: none;
}
.body::-webkit-scrollbar { display: none; }
.footer { flex: none; padding: 12px 20px 4px; }

/* Type */
.h1 { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 8px; }
.h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.lead { font-size: 16px; line-height: 23px; color: var(--text-2); margin: 0 0 20px; }
.label { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.fine { font-size: 13px; line-height: 18px; color: var(--text-3); margin: 0; }
.money-xl { font-size: 44px; line-height: 52px; font-weight: 700; letter-spacing: -0.03em; }
.up { color: var(--up); }
.down { color: var(--down); }

/* Buttons */
.btn {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand);
  color: var(--brand-ink);
  transition: opacity 150ms ease;
}
.btn:hover { opacity: 0.92; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--brand); height: 44px; }
.btn + .btn { margin-top: 8px; }

/* Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.row {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.row + .row { border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; }
.row-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.row-end { text-align: right; font-size: 16px; font-weight: 500; }
.chev { color: var(--text-3); }

.coin {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex: none;
}
.coin.btc { background: var(--btc); }
.coin.eth { background: var(--eth); }
.coin.usdc { background: var(--usdc); }
.coin.sm { width: 28px; height: 28px; font-size: 12px; }

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 14px;
  line-height: 20px;
}
.notice.calm { background: var(--brand-soft); color: var(--brand); }
.notice.danger { background: #fde8e6; color: #7a1a12; }
.notice svg { flex: none; margin-top: 1px; }

.kv { display: flex; justify-content: space-between; font-size: 15px; padding: 7px 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 500; }
.kv.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 600; }
.kv.total dt { color: var(--text); }

/* Home */
.greet { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.balance-card { background: var(--brand); color: #fff; border: 0; }
.balance-card .label { color: rgba(255,255,255,0.75); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 0; }
.quick span { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.9); }
.quick i { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.14); display: grid; place-items: center; font-style: normal; }
.section-title { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.tile {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.tile .new { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 0 0;
}
.tabbar span { display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.tabbar span.on { color: var(--brand); font-weight: 600; }

/* Intro */
.facts { list-style: none; padding: 0; margin: 0 0 16px; }
.facts li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; }
.facts b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.facts p { margin: 0; font-size: 15px; line-height: 21px; color: var(--text-2); }
.facts .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }

/* Amount */
.amount-head { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 4px; color: var(--text-2); font-size: 15px; }
.amount-value { text-align: center; font-size: 64px; line-height: 72px; font-weight: 700; letter-spacing: -0.03em; margin: 18px 0 2px; }
.amount-value.placeholder { color: var(--text-3); }
.amount-sub { text-align: center; font-size: 15px; color: var(--text-2); min-height: 22px; }
.chips { display: flex; gap: 8px; justify-content: center; margin: 18px 0 8px; }
.chip {
  all: unset;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 4px; }
.key {
  all: unset;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
}
.key:active { background: var(--surface-2); }
.from { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-2); padding: 0 2px 10px; }
.from b { color: var(--text); font-weight: 600; }

/* Review */
.lock { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-2); margin: 4px 0 12px; }
.lock-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-bottom: 16px; }
.lock-bar span { display: block; height: 100%; background: var(--brand); transition: width 1s linear; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--surface-2); position: relative; flex: none; border: 0; cursor: pointer; padding: 0; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: left 150ms ease; }
.switch[aria-checked="true"] { background: var(--up); }
.switch[aria-checked="true"] .knob { left: 22px; }

/* Success */
.done-mark { width: 64px; height: 64px; border-radius: 32px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 40px auto 18px; }
.center { text-align: center; }

/* Holding */
.chart { width: 100%; height: 150px; display: block; margin: 8px 0 4px; }
.ranges { display: flex; justify-content: space-between; margin: 0 0 16px; }
.ranges button { all: unset; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ranges button[aria-pressed="true"] { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Send */
.field { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field .mono { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 14px; line-height: 20px; word-break: break-all; }
.addr-check { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.02em; text-align: center; padding: 18px 0 6px; }
.addr-check b { color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 0 4px; }
.addr-check .mid { color: var(--text-3); }
.compare { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.compare div { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.compare div b { color: var(--down); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 12px; padding: 10px 0; font-size: 15px; line-height: 21px; }
.steps .num { width: 24px; height: 24px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; color: var(--text); }

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 100px;
  background: var(--text);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.toast.show { opacity: 1; }

.sheet-backdrop { position: absolute; inset: 0; background: rgba(23,21,15,0.4); display: flex; align-items: flex-end; }
.sheet { background: var(--surface); width: 100%; border-radius: 16px 16px 0 0; padding: 10px 20px 28px; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.faceid { display: grid; justify-items: center; gap: 10px; padding: 18px 0 8px; color: var(--brand); }

/* Fixes after first render */
.row-sub.up, .up { color: var(--up); }
.row-sub.down, .down { color: var(--down); }
.two .btn + .btn { margin-top: 0; }
.compare div { word-break: break-all; font-size: 15px; line-height: 24px; word-spacing: 2px; }
.compare div .label { font-family: var(--font); display: block; word-spacing: 0; }
.compare .match { color: var(--text-2); }
.compare .same { color: var(--text); }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--text-3); }
