/* ---------- welcome ---------- */
.welcome {
  max-width: 1040px; margin: 0 auto; padding: 72px 28px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 56px;
  grid-template-areas: "copy sign" "form sign";
  align-items: start;
}
.welcome-sign { grid-area: sign; position: sticky; top: 72px; }
.welcome-copy { grid-area: copy; display: grid; gap: 16px; max-width: 34em; }
.welcome-copy h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.01em; }
.welcome-copy p { color: var(--ink-2); font-size: 17px; }
.welcome-copy b { color: var(--ink); }
.welcome-form { grid-area: form; display: grid; gap: 18px; max-width: 30em; }
.pair { display: grid; grid-template-columns: 7em 1fr; gap: 12px; }
.choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.choice label {
  display: flex; gap: 8px; align-items: center; padding: 10px 12px 8px; border: 2px solid var(--rule);
  border-radius: 6px; background: var(--paper); cursor: pointer; font-size: 15px;
}
.choice label:has(input:checked) { border-color: var(--sign); }
.choice input, .consent input { accent-color: var(--sign); width: 18px; height: 18px; flex: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.welcome-form .btn-go { justify-self: start; }
.form-error { color: var(--stop); font-weight: 700; }

.sign-place { font-size: 52px; font-weight: 900; letter-spacing: -0.01em; line-height: 1; padding: 6px 0 18px; border-bottom: 3px solid #fff; }
.sign-rows { list-style: none; margin: 0; padding: 14px 0 2px; display: grid; gap: 12px; font-size: 24px; font-weight: 700; }
.sign-rows li { display: flex; align-items: center; gap: 14px; }
.sign-rows svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

@media (max-width: 820px) {
  .welcome { grid-template-columns: 1fr; grid-template-areas: "sign" "copy" "form"; padding: 20px 18px 56px; gap: 24px; }
  .welcome-sign { position: static; }
  .sign-place { font-size: 40px; }
  .sign-rows { font-size: 20px; }
}
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }

/* ---------- test ---------- */
.test {
  min-height: 100dvh; max-width: 1080px; margin: 0 auto; padding: 28px;
  display: grid; grid-template-columns: minmax(0, 30em) auto; justify-content: center; gap: 72px; align-items: center;
}
.test-side { display: grid; gap: 22px; align-content: center; max-width: 30em; }
.progress { height: 6px; background: var(--concrete-2); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s ease; }
.task-count { font-size: 16px; font-weight: 700; opacity: .85; }
.task-text { font-size: 26px; font-weight: 700; line-height: 1.25; margin-top: 6px; }
.controls { display: grid; gap: 10px; justify-items: start; }
.where { font-size: 15px; color: var(--ink-2); min-height: 1.5em; }
.where b { color: var(--ink); }

/* ---------- the phone ---------- */
.device-wrap { display: grid; place-items: center; }
.device {
  --h: min(760px, calc(100dvh - 56px));
  position: relative; height: var(--h); width: calc(var(--h) * 0.4663); border-radius: calc(var(--h) * 0.075);
  background: #1d1e21; padding: calc(var(--h) * 0.016);
  box-shadow: inset 0 0 0 2px #3a3c41, 0 30px 60px -30px rgba(35, 38, 43, .45);
}
.island {
  position: absolute; top: calc(var(--h) * 0.028); left: 50%; transform: translateX(-50%); z-index: 5;
  width: 31%; height: calc(var(--h) * 0.044); background: #000; border-radius: 999px;
}
.screen {
  position: relative; height: 100%; border-radius: calc(var(--h) * 0.06); overflow: hidden; background: #f2f2f7;
  display: flex; flex-direction: column; color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: normal; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.device-cover {
  position: absolute; inset: calc(var(--h) * 0.016); border-radius: calc(var(--h) * 0.06); z-index: 10;
  background: rgba(232, 234, 237, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; text-align: center;
  padding: 24px; font-weight: 700; color: var(--ink); font-family: var(--font);
}
.status { height: 50px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 34px; font-weight: 600; font-size: 15px; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.status-icons svg { height: 11px; fill: currentColor; }

.views { position: relative; flex: 1; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; background: #f2f2f7; padding-bottom: 24px; scrollbar-width: none; }
.view::-webkit-scrollbar { display: none; }
.view.push-in { animation: pushIn .32s cubic-bezier(.2, .8, .2, 1) both; }
.view.pop-in { animation: popIn .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pushIn { from { transform: translateX(100%); box-shadow: -8px 0 24px rgba(0,0,0,.08); } to { transform: none; } }
@keyframes popIn { from { transform: translateX(-28%); opacity: .6; } to { transform: none; opacity: 1; } }

.navbar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 44px; padding: 0 8px; background: rgba(242, 242, 247, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.navbar .title { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.back { justify-self: start; display: flex; align-items: center; gap: 2px; border: 0; background: none; color: #1b4f9c; font-size: 17px; padding: 8px 6px; cursor: pointer; font-family: inherit; max-width: 120px; }
.back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back svg { width: 12px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.large-title { font-size: 32px; font-weight: 700; letter-spacing: .01em; padding: 6px 18px 10px; }

.list { margin: 6px 16px 18px; background: #fff; border-radius: 12px; overflow: hidden; }
.row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 0 0 14px; min-height: 48px; border: 0; background: #fff;
  font-family: inherit; font-size: 17px; color: #000; text-align: left; cursor: pointer;
}
.row:active { background: #e5e5ea; }
.row .lbl { flex: 1; padding: 13px 14px 13px 0; border-bottom: .5px solid #c6c6c8; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row:last-child .lbl { border-bottom: 0; }
.row .chev { width: 8px; height: 14px; fill: none; stroke: #c4c4c6; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* app content (made-up data) */
.content { padding-bottom: 8px; }
.row-end { display: flex; align-items: center; gap: 8px; flex: none; }
.detail { color: #8a8a8e; font-size: 16px; }
.row.danger .row-name { color: #d70015; }
.group-title { margin: 14px 32px 6px; font-size: 13px; color: #6d6d72; text-transform: none; }
.card { margin: 0 16px 10px; background: #fff; border-radius: 12px; overflow: hidden; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: .5px solid #e1e1e5; }
.item:last-child { border-bottom: 0; }
.item b { display: block; font-weight: 500; font-size: 16px; }
.item span { display: block; font-size: 13px; color: #8a8a8e; margin-top: 1px; }
.item em { font-style: normal; font-size: 15px; color: #3a3a3c; white-space: nowrap; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: #e3e3e8; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: #34c759; }
.switch.on::after { left: 20px; }
.fake-btn { margin: 10px 16px; padding: 13px; border-radius: 12px; background: #1b4f9c; color: #fff; text-align: center; font-weight: 600; font-size: 16px; }
.fake-btn.ghost { background: #fff; color: #1b4f9c; }
.fake-btn.danger { background: #fff; color: #d70015; }
.map { position: relative; margin: 2px 16px 6px; height: 170px; border-radius: 14px; background: #dfe6dc; overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: #1b4f9c; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.me-dot { position: absolute; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: #0a84ff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(10,132,255,.2); }
.hello { margin: 6px 20px 2px; font-size: 15px; color: #6d6d72; }
.chips { display: flex; gap: 6px; padding: 0 16px 10px; overflow: hidden; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 14px; color: #3a3a3c; }
.chip.on { background: #1b4f9c; color: #fff; }
.ride { margin: 0 16px 8px; background: #fff; border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #c9d6ea; color: #143c78; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.big { width: 72px; height: 72px; font-size: 26px; }
.ride-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ride-main b { font-weight: 600; font-size: 15px; }
.ride-main span { font-size: 13px; color: #8a8a8e; }
.ride-main .ride-route { color: #3a3a3c; }
.ride-price { text-align: right; display: grid; gap: 1px; }
.ride-price b { font-size: 16px; }
.ride-price span { font-size: 12px; color: #8a8a8e; }
.banner { margin: 2px 16px 10px; padding: 12px 14px; border-radius: 12px; background: #e6edf7; color: #143c78; font-size: 14px; }
.search { margin: 4px 16px 12px; padding: 10px 12px; border-radius: 10px; background: #e3e3e8; color: #3a3a3c; display: flex; gap: 8px; font-size: 16px; }
.stepper { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 10px; font-size: 20px; }
.stepper span { color: #1b4f9c; font-size: 24px; }
.big-label { margin: 4px 20px 8px; text-align: center; color: #6d6d72; font-size: 14px; }
.big-number { margin: 14px 20px 0; text-align: center; font-size: 40px; font-weight: 700; }
.wheel { margin: 6px 16px 12px; background: #fff; border-radius: 12px; display: grid; justify-items: center; padding: 8px; gap: 4px; color: #b0b0b5; font-size: 20px; }
.wheel b { color: #000; font-size: 28px; padding: 4px 30px; background: #f2f2f7; border-radius: 8px; }
.timeline { padding: 6px 0; }
.stop-row { display: grid; grid-template-columns: 48px 14px 1fr; gap: 8px; align-items: center; padding: 8px 14px; }
.stop-row em { font-style: normal; font-size: 14px; color: #3a3a3c; }
.stop-row i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #1b4f9c; background: #fff; }
.stop-row b { display: block; font-weight: 500; font-size: 15px; }
.stop-row span { font-size: 13px; color: #8a8a8e; }
.balance { margin: 2px 16px 10px; padding: 16px; border-radius: 14px; background: #1b4f9c; color: #fff; display: grid; gap: 2px; }
.balance span { font-size: 14px; opacity: .8; }
.balance b { font-size: 32px; font-weight: 700; }
.bars-mini { margin: 0 16px 10px; height: 60px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px; background: #fff; border-radius: 12px; }
.bars-mini i { flex: 1; background: #9db5d8; border-radius: 3px 3px 0 0; }
.eco { margin: 2px 16px 10px; padding: 16px; border-radius: 14px; background: #e3f1e5; color: #1f5f2d; display: grid; gap: 2px; }
.eco b { font-size: 32px; font-weight: 700; }
.eco span { font-size: 14px; }
.center-block { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 10px 24px 16px; }
.center-block b { font-size: 18px; font-weight: 600; }
.center-block span { font-size: 14px; color: #8a8a8e; }
.center-block .link { color: #1b4f9c; }
.stars { font-size: 30px; color: #ff9f0a; letter-spacing: 4px; }
.stats { margin: 6px 16px 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: #fff; border-radius: 12px; padding: 12px 8px; text-align: center; display: grid; }
.stats b { font-size: 22px; }
.stats span { font-size: 12px; color: #8a8a8e; }
.car { margin: 6px 16px 10px; height: 110px; border-radius: 14px; background: linear-gradient(#e9ecf1, #dfe3e9); position: relative; }
.car::before { content: ""; position: absolute; left: 22%; right: 22%; bottom: 30px; height: 34px; background: #9aa4b2; border-radius: 18px 26px 8px 8px; }
.car::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 22px; height: 16px; background: radial-gradient(circle at 12% 50%, #3a3f47 8px, transparent 9px), radial-gradient(circle at 88% 50%, #3a3f47 8px, transparent 9px); }
.home-hint { padding-top: 40px; }
.logo-tile { width: 76px; height: 76px; border-radius: 18px; background: #1b4f9c; color: #fff; display: grid; place-items: center; font-size: 38px; font-weight: 800; margin-bottom: 6px; }

.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(249, 249, 251, .96); border-top: .5px solid #c6c6c8; padding: 6px 4px 0; }
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 2px 2px 4px; cursor: pointer; color: #8e8e93; font-family: inherit; font-size: 10px; font-weight: 500; line-height: 1.15; }
.tab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: #1b4f9c; }
.tab.on svg { stroke-width: 2.1; }
.home-indicator { flex: none; height: 26px; display: grid; place-items: center; background: rgba(249, 249, 251, .96); }
.home-indicator::after { content: ""; width: 36%; height: 5px; border-radius: 3px; background: #000; }

/* ---------- small screens: the app fills the screen ---------- */
@media (max-width: 760px) {
  .test { grid-template-columns: 1fr; padding: 12px 12px 0; gap: 12px; align-items: start; min-height: 100dvh; grid-template-rows: auto 1fr; }
  .test-side { gap: 10px; max-width: none; }
  .task-sign .sign-inner { padding: 10px 14px 8px; }
  .task-count { font-size: 13px; }
  .task-text { font-size: 18px; }
  .controls {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--concrete); border-top: 2px solid var(--rule); grid-template-columns: 1fr auto; align-items: center; justify-items: stretch;
  }
  .where { grid-column: 1 / -1; font-size: 13px; min-height: 0; }
  .device-wrap { padding-bottom: 120px; }
  .device { --h: calc(100dvh - 270px); height: auto; width: 100%; aspect-ratio: auto; min-height: 460px; height: var(--h); padding: 0; background: none; box-shadow: none; border-radius: 22px; }
  .island, .status, .home-indicator { display: none; }
  .screen { border-radius: 22px; border: 2px solid var(--rule); }
  .device-cover { inset: 0; border-radius: 22px; }
}

/* ---------- end ---------- */
.end { min-height: 100dvh; display: grid; place-items: center; padding: 28px; }
.end-box { width: 100%; max-width: 30em; display: grid; gap: 16px; }
.end-box h1 { font-size: 36px; }
.end-box p { color: var(--ink-2); font-size: 17px; }
.end-box .btn-go { justify-self: start; }
.thanks-sign { justify-self: start; }
.thanks-sign p { font-size: 26px; font-weight: 800; color: #fff; }

/* ---------- language switch ---------- */
.welcome { position: relative; }
.lang-switch {
  position: absolute; top: 14px; right: 28px; display: flex; gap: 2px; padding: 3px;
  background: var(--concrete-2); border-radius: 8px;
}
.lang-switch button {
  border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2);
  padding: 6px 12px 4px; border-radius: 6px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(35, 38, 43, .12); }
@media (max-width: 820px) {
  .lang-switch { position: static; justify-self: end; margin-bottom: -8px; grid-area: lang; }
  .welcome { grid-template-areas: "lang" "sign" "copy" "form"; }
}
