:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #111827;
  --muted: #616a79;
  --line: #e5e7eb;
  --control-line: #aeb9ca;
  --soft-line: #dbe4f4;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --accent-text: #1d4ed8;
  --focus: #2563eb;
  --tint: #edf3ff;
  --danger: #b42318;
  --danger-text: #b42318;
  --hero-end: #f3f7ff;
  --subtle-ink: #39465d;
  --placeholder: #e9eef5;
  --code-bg: #eaf0fa;
  --backdrop: #0d172d91;
  --shadow: #24458014;
  --radius: 16px;
  font:
    16px/1.55 Inter,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #101622;
  --surface: #182233;
  --ink: #f0f4fc;
  --muted: #b1bed3;
  --line: #35435b;
  --control-line: #637694;
  --soft-line: #3d5070;
  --blue: #315ecb;
  --blue-dark: #284fae;
  --accent-text: #a2bfff;
  --focus: #adc6ff;
  --tint: #243754;
  --danger: #a73732;
  --danger-text: #ffb4ac;
  --hero-end: #151f31;
  --subtle-ink: #c4d3eb;
  --placeholder: #29374e;
  --code-bg: #202d43;
  --backdrop: #070b14bd;
  --shadow: #080b1260;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent-text);
  text-underline-offset: 0.25em;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: var(--blue);
  color: white;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:hover,
.button:hover {
  background: var(--blue-dark);
}
button:active,
.button:active {
  filter: brightness(0.9);
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--control-line);
}
.secondary:hover {
  background: var(--tint);
}
.danger,
.danger:hover {
  background: var(--danger);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}
h2 {
  font-size: clamp(1.3rem, 2.4vw, 2.15rem);
}
h3 {
  font-size: 1.15rem;
}
p + p {
  margin-top: 0.65rem;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.875rem;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}
.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: var(--surface);
  padding: 10px;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header-inner,
.site-footer,
.header-actions,
.site-header nav,
.site-footer nav,
.actions,
.section-title,
.page-heading,
.sample-caption {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header-inner {
  min-height: 72px;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 785;
  letter-spacing: -0.06em;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  color: var(--accent-text);
  margin-left: -7px;
}
.brand img {
  border-radius: 11px;
}
.site-header a:not(.button),
.site-footer a:not(.brand) {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-header a:hover:not(.button),
.site-footer a:hover {
  color: var(--accent-text);
}
.compact {
  font-size: 0.9rem;
}
.hero {
  padding: 76px 0 66px;
  background: linear-gradient(150deg, var(--surface) 15%, var(--hero-end) 88%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.13fr 0.87fr;
  align-items: center;
  gap: 46px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.55vw, 4.45rem);
  line-height: 1.01;
  letter-spacing: -0.075em;
  margin: 14px 0 20px;
}
.hero h1 span,
.eyebrow {
  color: var(--accent-text);
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 5px;
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 50ch;
}
.actions {
  flex-wrap: wrap;
}
.hero .actions {
  margin-top: 26px;
}
.preview {
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: 22px;
  box-shadow: 0 18px 45px var(--shadow);
  min-width: 0;
}
.preview-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.preview-dots i {
  width: 7px;
  height: 7px;
  background: var(--control-line);
  border-radius: 50%;
}
.preview-dots span {
  margin-left: auto;
}
.preview-inner {
  padding: 17px;
}
.sample-wallet {
  background: var(--tint);
  border-radius: 13px;
  padding: 17px;
}
.sample-caption {
  justify-content: space-between;
  color: var(--subtle-ink);
  font-size: 0.85rem;
}
.sample-wallet strong {
  font-size: 2.25rem;
  letter-spacing: -0.075em;
}
.sample-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.sample-buttons span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--blue);
  color: #fff;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.75rem;
}
.sample-buttons span + span {
  background: var(--surface);
  color: var(--ink);
}
.sample-buttons svg {
  width: 16px;
  height: 16px;
}
.sample-heading {
  margin: 16px 0 7px;
  font-weight: 700;
}
.sample-card,
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sample-card {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.sample-card strong,
.item .right {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}
.sample-card small,
.item small {
  display: block;
}
.glyph {
  display: inline-grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--tint);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex: 0 0 42px;
}
.section {
  margin-block: 62px;
}
.section h2 {
  margin: 0.4rem 0 1rem;
}
.section p:not(.eyebrow),
.feature p,
.faq p {
  color: var(--muted);
}
.three,
.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.three .panel h3 {
  margin: 13px 0 7px;
}
.pricing strong {
  display: block;
  font-size: 2.4rem;
  margin: 5px 0 8px;
  letter-spacing: -0.07em;
}
.feature {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.feature h2 {
  margin: 0 0 8px;
}
.faq {
  max-width: 760px;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0 0 4px;
}
.faq summary {
  cursor: pointer;
  padding: 13px 0;
  font-weight: 650;
}
.faq details p {
  padding: 0 0 12px;
}
.site-footer {
  padding-block: 23px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}
.prose {
  max-width: 790px;
  margin-block: 54px;
  overflow-wrap: anywhere;
}
.prose h2 {
  margin: 1.4em 0 0.45em;
}
.prose h1 {
  margin-bottom: 0.5em;
}
.prose pre {
  padding: 15px;
}
.prose table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
  margin-block: 14px;
}
.prose th,
.prose td {
  text-align: left;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
}
.cabinet {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar .brand {
  margin-left: 9px;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.sidebar nav a,
.side-docs {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  min-height: 45px;
  padding: 9px 11px;
  border-radius: 9px;
  font-weight: 650;
}
.sidebar a[aria-current],
.sidebar nav a:hover,
.side-docs:hover {
  background: var(--tint);
  color: var(--accent-text);
}
.side-docs {
  margin-top: auto;
}
.workspace {
  width: min(100%, 1130px);
  padding: 36px 32px;
  margin-inline: auto;
  display: grid;
  gap: 16px;
  align-content: start;
}
.page-heading,
.section-title {
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-heading h1 {
  font-size: 2.15rem;
}
.page-heading p {
  margin-top: 6px;
  color: var(--muted);
}
.section-title {
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 1.24rem;
}
.balance-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  margin: 0;
}
.wallet {
  background: var(--tint);
  border-color: var(--soft-line);
}
.wallet p,
.card-total p {
  font-weight: 650;
  color: var(--subtle-ink);
}
.balance-value {
  display: block;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.075em;
  line-height: 1.2;
  margin: 8px 0 13px;
  font-variant-numeric: tabular-nums;
}
.card-total .balance-value {
  font-size: 2rem;
}
.card-total .glyph {
  margin-bottom: 8px;
}
.item {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
  overflow-wrap: anywhere;
}
.item:last-child {
  border-bottom: 0;
}
.item a {
  font-weight: 650;
}
.item .date {
  color: var(--muted);
}
.empty {
  border: 1px dashed var(--control-line);
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.filters label {
  min-width: 125px;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 650;
}
.masked {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}
.auth {
  width: min(440px, calc(100% - 32px));
  margin: 54px auto;
}
[data-screen='login'] .auth {
  animation: login-enter 240ms ease-out both;
}
@keyframes login-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
[data-login-step][aria-busy='true'] button:not([type='button']):disabled::before {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid #fff8;
  border-top-color: white;
  border-radius: 50%;
  animation: login-spin 550ms linear infinite;
}
@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}
.auth h1 {
  font-size: 1.85rem;
  margin-bottom: 20px;
}
.auth-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}
.auth-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.workspace form,
.auth form,
dialog form {
  display: grid;
  gap: 11px;
  justify-items: start;
  margin-bottom: 10px;
}
.workspace form:not(.filters),
.auth form,
dialog form {
  max-width: 440px;
}
.workspace form.filters {
  display: flex;
}
.auth form {
  justify-items: stretch;
}
label:not(.check) {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
  font-weight: 650;
  width: 100%;
}
.filters label {
  width: auto;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.check input {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.check a {
  display: inline;
}
input:not([type='checkbox']),
select {
  min-height: 44px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  width: 100%;
}
.form-error {
  color: var(--danger-text);
  overflow-wrap: anywhere;
}
.form-error:empty {
  display: none;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  max-width: min(440px, calc(100vw - 36px));
  padding: 12px 16px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 12px;
  box-shadow: 0 8px 22px var(--shadow);
}
.skeleton {
  height: 50px;
  border-radius: 8px;
  background: var(--placeholder);
  animation: pulse 1.4s ease-in-out infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.5;
  }
}
dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink);
  background: var(--surface);
  overflow: auto;
}
dialog::backdrop {
  background: var(--backdrop);
}
dialog h2 {
  font-size: 1.45rem;
}
.once,
code {
  overflow-wrap: anywhere;
}
pre {
  background: var(--code-bg);
  border-radius: 9px;
  overflow: auto;
  max-width: 100%;
  padding: 12px;
}
pre code {
  overflow-wrap: normal;
}
dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 13px;
}
dd {
  margin: 0;
  text-align: right;
  font-weight: 650;
}
.invoice-qr {
  display: block;
  margin: 12px 0;
  width: 144px;
  height: 144px;
  background: white;
}
.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--tint);
}
.profile-label {
  color: var(--subtle-ink);
  font-weight: 650;
  font-size: 0.85rem;
}
.profile-email {
  display: block;
  margin: 2px 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
#theme-preference {
  margin-top: 6px;
}
#change-password-code {
  width: 100%;
}
@media (max-width: 850px) {
  .hero-grid {
    gap: 25px;
  }
  .site-header nav a:not(:last-child) {
    display: none;
  }
  .cabinet {
    grid-template-columns: 166px minmax(0, 1fr);
  }
  .workspace {
    padding: 25px 17px;
  }
}
@media (max-width: 650px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .site-header-inner {
    min-height: 62px;
  }
  .site-header nav,
  .header-actions .compact {
    display: none;
  }
  .hero {
    padding: 40px 0;
  }
  .hero-grid,
  .three,
  .balance-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 br {
    display: none;
  }
  .section {
    margin-block: 42px;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .cabinet {
    display: block;
  }
  .workspace {
    padding: 21px 14px calc(85px + env(safe-area-inset-bottom));
    gap: 13px;
  }
  .sidebar {
    height: auto;
    position: static;
    background: none;
    border: 0;
    display: block;
    padding: 12px 14px 0;
  }
  .sidebar .brand {
    margin-left: 0;
  }
  .sidebar nav {
    position: fixed;
    z-index: 4;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .sidebar nav a {
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    font-size: 0.71rem;
    padding: 4px 1px;
    text-align: center;
    min-height: 53px;
  }
  .side-docs {
    display: none;
  }
  .panel {
    padding: 16px;
  }
  .toast {
    bottom: calc(71px + env(safe-area-inset-bottom));
  }
  .item {
    flex-wrap: wrap;
  }
  .item .right {
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.875rem);
}
#deliveries h3,
#admin-client .panel,
#admin-client form {
  margin-top: 16px;
}
#deliveries h3 {
  margin-bottom: 9px;
}
#deliveries > button {
  margin-top: 9px;
}
.once button {
  margin: 8px 8px 0 0;
}
@media (max-width: 650px) {
  .workspace {
    scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .wallet .actions {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 8px;
  }
  .wallet .actions > * {
    padding-inline: 8px;
    font-size: 0.875rem;
  }
  .wallet .actions svg {
    width: 18px;
    flex: 0 0 18px;
  }
  #card .actions {
    gap: 8px;
  }
}
@media (max-width: 330px) {
  .wallet .actions {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .profile-identity {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-identity .glyph {
    display: none;
  }
}
@font-face {
  font-family: Inter;
  src: url('inter-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url('inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
