:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #14161a;
  --muted: #6b7280;
  --brand: #2858e8;
  --brand-dark: #1e40af;
  --brand-soft: #eaf0ff;
  --success: #168a4b;
  --success-soft: #eaf8f0;
  --warning: #9a640d;
  --warning-soft: #fff9e8;
  --danger: #d92d20;
  --danger-soft: #fff1f0;
  --lte: #087f99;
  --lte-soft: #e7f9fc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px rgba(16, 24, 40, .07);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, .05);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sidebar-width: 236px;
  --shell-width: 1040px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
.modal:focus-visible {
  outline: 3px solid rgba(40, 88, 232, .34);
  outline-offset: 3px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.app {
  width: min(100%, 600px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 12px 10px calc(18px + var(--safe-bottom));
}

.portal {
  position: relative;
  min-height: calc(100vh - 24px - var(--safe-bottom));
  min-height: calc(100dvh - 24px - var(--safe-bottom));
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand {
  position: relative;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  margin-right: 13px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--brand);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: clamp(18px, 4vw, 21px);
  line-height: 1.2;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.screen {
  min-height: 560px;
  padding: 22px 18px 118px;
  background: var(--surface);
  animation: screen-in .32s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen.compact {
  padding-top: 18px;
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #dbe4fa;
  border-radius: 13px;
  color: #4c5f83;
  background: #f4f7ff;
  font-size: 12px;
  line-height: 1.45;
}

.demo-banner strong {
  color: #294579;
}

.demo-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(40, 88, 232, .12);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel + .panel {
  margin-top: 14px;
}

.panel-body {
  padding: 21px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.icon-box {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 21px;
  font-weight: 800;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.125em;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-label {
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.field {
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 0 15px;
  border: 1px solid #d5dce7;
  border-radius: var(--radius-md);
  background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(40, 88, 232, .1);
}

.field > span {
  margin-right: 11px;
  color: #98a2b3;
  font-size: 19px;
}

.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.field input::placeholder {
  color: #98a2b3;
}

.field input:disabled {
  cursor: wait;
  opacity: .72;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  color: #475467;
  background: #f0f2f5;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #f7c8c4;
  border-radius: 11px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  line-height: 1.4;
}

.button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: background .16s, transform .16s, opacity .16s;
}

.button:hover:not(:disabled) {
  background: var(--brand-dark);
}

.button:active:not(:disabled) {
  transform: translateY(1px) scale(.995);
}

.button:disabled {
  color: #98a2b3;
  background: #e4e7ec;
  box-shadow: none;
  cursor: not-allowed;
}

.button.dark {
  background: #14161a;
}

.button.dark:hover:not(:disabled) {
  background: #262b33;
}

.button.green {
  background: var(--success);
}

.button.green:hover:not(:disabled) {
  background: #106b3a;
}

.button.soft {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}

.button.ghost {
  min-height: 44px;
  color: #475467;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 14px;
}

.telegram-button {
  color: #fff;
  background: #14161a;
}

.telegram-button:hover:not(:disabled) {
  background: #262b33;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

.separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 21px 0;
  color: #98a2b3;
  font-size: 13px;
}

.separator::before,
.separator::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.helper {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 2px 4px 7px;
}

.page-title h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.page-title p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.demo-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 800;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric {
  min-width: 0;
  padding: 16px;
  border-radius: 17px;
  background: var(--surface-soft);
}

.metric span {
  display: block;
  color: #7f8998;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.metric strong.success {
  color: var(--success);
}

.unlimited {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 15px 16px;
  border-radius: 17px;
  color: #176d3a;
  background: var(--success-soft);
}

.unlimited-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: rgba(22, 138, 75, .1);
  font-size: 25px;
  font-weight: 900;
}

.unlimited strong,
.unlimited span {
  display: block;
}

.unlimited strong {
  font-size: 15px;
}

.unlimited span {
  margin-top: 3px;
  color: #46785a;
  font-size: 12px;
  line-height: 1.4;
}

.lte-card {
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(8, 127, 153, .1), transparent 12rem),
    #fff;
}

.lte-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lte-head h2 {
  margin: 0;
  font-size: 18px;
}

.pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--lte);
  background: var(--lte-soft);
  font-size: 11px;
  font-weight: 850;
}

.progress {
  height: 12px;
  margin: 16px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.progress > span {
  display: block;
  width: var(--progress-value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1da0bb, #2858e8);
}

.lte-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 14px;
}

.action-grid .button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.public-email {
  margin-bottom: 17px;
}

.trial-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid #dce5fb;
  border-radius: 15px;
  color: #52617e;
  background: #f6f8ff;
  font-size: 12px;
  line-height: 1.4;
}

.trial-note strong {
  display: block;
  color: #2f4267;
  font-size: 13px;
}

.trial-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--brand);
  font-size: 15px;
  font-weight: 850;
}

.text-button {
  padding: 7px 5px;
  color: var(--brand);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.option-card {
  min-width: 0;
  min-height: 168px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color .18s, transform .18s, box-shadow .18s, background .18s;
}

.option-card:hover,
.option-card.selected {
  border-color: #96b0f8;
  background: #fbfcff;
  box-shadow: 0 0 0 3px rgba(40, 88, 232, .08);
}

.option-card:hover {
  transform: translateY(-2px);
}

.option-card .option-icon {
  display: grid;
  width: 55px;
  height: 55px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 16px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 25px;
  font-weight: 850;
}

.option-card.lte .option-icon {
  color: var(--lte);
  background: var(--lte-soft);
  font-size: 14px;
  letter-spacing: .04em;
}

.option-card strong,
.option-card span {
  display: block;
}

.option-card strong {
  font-size: 16px;
}

.option-card span:not(.option-icon) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.payment-details {
  margin-top: 18px;
}

.plan-list {
  display: grid;
  gap: 9px;
}

.plan {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.plan:hover,
.plan.selected {
  border-color: var(--brand);
  background: #fbfcff;
  box-shadow: 0 0 0 3px rgba(40, 88, 232, .07);
}

.plan-main {
  flex: 1;
  min-width: 0;
}

.plan-main strong,
.plan-main span,
.plan-price strong,
.plan-price span {
  display: block;
}

.plan-main strong,
.plan-price strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.plan-main span,
.plan-price span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.plan-price {
  max-width: 46%;
  flex: 0 0 auto;
  text-align: right;
}

.placeholder-price strong {
  color: var(--lte);
  font-size: 12px;
}

.product-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.payment-button {
  margin-top: 14px;
}

.state-message {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 0 11px;
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
}

.state-message > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  font-size: 18px;
  font-weight: 900;
}

.state-message strong {
  display: block;
  font-size: 13px;
}

.success-message {
  color: #2f6d4b;
  background: var(--success-soft);
}

.success-message > span:first-child {
  color: #fff;
  background: var(--success);
}

.list {
  display: grid;
  gap: 9px;
}

.list-item {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  text-align: left;
  text-decoration: none;
}

.list-item.interactive {
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.list-item.interactive:hover {
  border-color: #b7c7ec;
  background: #fbfcff;
  transform: translateY(-1px);
}

.item-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 20px;
  font-weight: 800;
}

.item-icon.secondary,
.option-icon.secondary {
  color: var(--muted);
  background: var(--surface-soft);
}

.chevron {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
}

.client-icon {
  font-size: 16px;
}

.item-copy {
  flex: 1;
  min-width: 0;
}

.item-copy strong,
.item-copy span {
  display: block;
}

.item-copy strong {
  font-size: 15px;
}

.item-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-hero h1 {
  margin: 0;
  font-size: 24px;
}

.profile-hero p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid #f7c8c4;
  border-radius: 13px;
  color: var(--danger);
  background: var(--danger-soft);
  cursor: pointer;
  font-weight: 750;
}

.identity-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.identity-list > div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.identity-list > div:first-child {
  padding-top: 0;
}

.identity-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.identity-list dt {
  color: var(--muted);
  font-size: 13px;
}

.identity-list dd {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.verified {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-actions {
  margin-top: 14px;
}

.compact-card {
  min-height: 145px;
}

.compact-card .option-icon {
  width: 48px;
  height: 48px;
}

.nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(12px, var(--safe-bottom));
  display: grid;
  width: min(calc(100% - 28px), 568px);
  min-height: 75px;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(218, 225, 236, .98);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 36px rgba(18, 32, 58, .17);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav.account {
  grid-template-columns: repeat(4, 1fr);
}

.nav button {
  display: grid;
  min-width: 0;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 15px;
  color: #667085;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.2;
  transition: color .16s, background .16s;
}

.nav button .nav-icon {
  font-size: 20px;
  line-height: 1;
}

.nav button.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 750;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 12px;
  background: rgba(20, 29, 45, .66);
  backdrop-filter: blur(7px);
  animation: modal-backdrop-in .2s ease both;
}

@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(100%, 560px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
  animation: modal-in .26s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.modal-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #667085;
  background: #f2f4f7;
  cursor: pointer;
  font-size: 22px;
}

.modal-body {
  padding: 20px;
}

.modal-intro {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.wizard-progress li {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  color: #98a2b3;
  font-size: 10px;
  text-align: center;
}

.wizard-progress li span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #667085;
  background: #f2f4f7;
  font-size: 11px;
  font-weight: 850;
}

.wizard-progress li.active {
  color: var(--brand);
  font-weight: 800;
}

.wizard-progress li.active span {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(40, 88, 232, .11);
}

.wizard-progress li.complete span {
  color: var(--success);
  background: var(--success-soft);
}

.wizard-progress li.complete span::before {
  content: "✓";
  font-size: 12px;
}

.wizard-progress li.complete span {
  font-size: 0;
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  padding: 13px;
  border-radius: 15px;
  color: #52617e;
  background: #f5f7fb;
  font-size: 12px;
  line-height: 1.4;
}

.selection-summary strong {
  display: block;
  color: #2f3b52;
  font-size: 14px;
}

.selection-icon {
  display: grid;
  min-width: 38px;
  height: 38px;
  padding: 0 7px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 850;
}

.modal-back-button {
  margin-top: 13px;
}

.setup-steps {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-steps li {
  display: flex;
  gap: 11px;
}

.setup-steps li > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 850;
}

.setup-steps strong {
  display: block;
  font-size: 14px;
}

.setup-steps p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  margin-top: 18px;
}

.warning {
  padding: 13px 14px;
  border: 1px solid #efd27a;
  border-radius: 14px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 12px;
  line-height: 1.5;
}

.manual-link {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.manual-link summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #475467;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.manual-content {
  padding-top: 8px;
}

.manual-content h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.link-box code {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border-radius: 11px;
  color: #5d6675;
  background: #f2f4f7;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-box button {
  padding: 0 13px;
  border-radius: 11px;
  color: #fff;
  background: #182236;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.document-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.document-list li > span:first-child {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 850;
}

.document-list strong,
.document-list small {
  display: block;
}

.document-list strong {
  font-size: 13px;
}

.document-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.status-mark {
  width: 9px;
  height: 9px;
  margin: 0 13px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px var(--success-soft);
}

.modal-subtitle {
  margin: 18px 0 10px;
  font-size: 15px;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(102px + var(--safe-bottom));
  width: min(calc(100% - 28px), 500px);
  padding: 13px 15px;
  border-radius: 14px;
  color: #fff;
  background: #182236;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  animation: toast-in .22s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.noscript {
  max-width: 520px;
  margin: 40px auto;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

[hidden] {
  display: none !important;
}

@media (min-width: 720px) {
  .app {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .portal {
    min-height: 780px;
  }

  .screen {
    min-height: 656px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

/*
 * Wide viewports get an actual desktop shell instead of a phone-sized card
 * stranded in empty space: the bottom tab bar becomes a persistent sidebar,
 * laid out next to the content via CSS grid areas. Source order in core.js
 * (brand, then screen, then nav) is unchanged — only the visual arrangement
 * moves, so no JS/markup changes were needed for this.
 */
@media (min-width: 920px) {
  .app {
    width: min(100%, var(--shell-width));
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .portal {
    display: grid;
    min-height: 720px;
    grid-template-areas: "brand brand" "nav screen";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr;
  }

  .brand {
    grid-area: brand;
    justify-content: flex-start;
    padding-inline: 32px;
  }

  .screen {
    grid-area: screen;
    min-height: 0;
    padding: 32px 36px 36px;
  }

  .nav {
    position: static;
    grid-area: nav;
    width: auto;
    min-height: 0;
    height: auto;
    align-content: start;
    gap: 3px;
    padding: 18px 14px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface-soft);
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }

  .nav.account {
    grid-template-columns: 1fr;
  }

  .nav button {
    grid-template-columns: 22px 1fr;
    justify-content: start;
    justify-items: start;
    padding: 11px 12px;
    gap: 10px;
    font-size: 13px;
    text-align: left;
  }

  .nav button .nav-icon {
    font-size: 17px;
  }

  .toast {
    bottom: 28px;
  }

  /* Signed-out screens render no <nav> at all (single path: log in,
     nothing else to switch between) - collapse the reserved sidebar
     column instead of leaving an empty gap, and centre the card. */
  .portal:not(:has(.nav)) {
    grid-template-areas: "brand" "screen";
    grid-template-columns: 1fr;
  }

  .portal:not(:has(.nav)) .screen {
    display: grid;
    align-content: start;
    justify-items: center;
    padding-top: 48px;
  }

  .portal:not(:has(.nav)) .screen > .panel {
    width: 100%;
    max-width: 440px;
  }
}

@media (max-width: 400px) {
  .app {
    padding-inline: 6px;
  }

  .portal {
    border-radius: 24px;
  }

  .brand {
    min-height: 112px;
    padding-inline: 18px 46px;
  }

  .brand-mark {
    width: 47px;
    height: 47px;
    margin-right: 10px;
    border-radius: 15px;
    font-size: 25px;
  }

  .brand-copy strong {
    font-size: 24px;
  }

  .brand-copy span {
    font-size: 11px;
  }

  .screen {
    padding: 16px 12px 112px;
  }

  .panel-body,
  .modal-body {
    padding: 16px;
  }

  .status-grid,
  .option-grid,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .option-card {
    min-height: 140px;
  }

  .compact-card {
    min-height: 132px;
  }

  .plan {
    align-items: flex-start;
  }

  .plan-price {
    max-width: 43%;
  }

  .trial-note {
    grid-template-columns: auto 1fr;
  }

  .trial-note .text-button {
    grid-column: 2;
    justify-self: start;
  }

  .link-box {
    grid-template-columns: 1fr;
  }

  .link-box code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .link-box button {
    min-height: 42px;
  }

  .nav {
    width: calc(100% - 16px);
  }
}

@media (max-width: 350px) {
  .action-grid {
    grid-template-columns: 1fr;
  }

  .action-grid .button:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .plan {
    display: grid;
  }

  .plan-price {
    max-width: none;
    text-align: left;
  }

  .identity-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

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