:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --soft: #f5f7fb;
  --brand: #2d6cdf;
  --brand-dark: #194fb1;
  --accent: #22a06b;
  --shadow: 0 16px 42px rgba(30, 45, 76, 0.12);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 48%, #f7f9fc 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(45, 108, 223, 0.28);
  outline-offset: 3px;
}

.cloudy-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.cloudy-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(216, 222, 232, 0.8);
  backdrop-filter: blur(14px);
}

.cloudy-brand,
.cloudy-nav,
.hero-actions,
.auth-grid,
.tariff-card {
  display: flex;
  align-items: center;
}

.cloudy-brand {
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 20px;
}

.cloudy-brand img {
  border-radius: 8px;
  flex: 0 0 auto;
}

.cloudy-nav {
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}

.nav-action,
.primary-button,
.tariff-button {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.nav-action {
  padding: 10px 14px;
}

.cloudy-main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: stretch;
  min-height: 360px;
}

.hero-copy,
.hero-panel,
.auth-card,
.tariff-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 5vw, 56px);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 62px;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-button,
.tariff-button {
  min-height: 46px;
  padding: 0 18px;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover,
.tariff-button:hover,
.nav-action:hover {
  background: var(--brand-dark);
}

.primary-button:active,
.tariff-button:active,
.nav-action:active {
  transform: translateY(1px);
}

.secondary-link {
  color: var(--brand-dark);
  font-weight: 700;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.stat {
  display: grid;
  align-content: center;
  min-height: 140px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid rgba(216, 222, 232, 0.78);
  border-radius: 8px;
}

.stat-value {
  font-size: 36px;
  font-weight: 900;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
}

.auth-section,
.tariffs-section {
  margin-top: 38px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: 0;
}

.auth-grid {
  align-items: stretch;
  gap: 18px;
}

.auth-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 22px;
}

.auth-card h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.auth-card input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(45, 108, 223, 0.14);
}

.auth-card .primary-button {
  width: 100%;
  margin-top: 4px;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tariff-card {
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

.tariff-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.tariff-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.tariff-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.tariff-price {
  margin-left: auto;
  white-space: nowrap;
  font-size: 18px;
}

.tariff-button {
  flex: 0 0 auto;
  background: var(--accent);
}

.cabinet-subscription-card {
  align-items: flex-start;
}

@media (max-width: 860px) {
  .cloudy-header {
    position: static;
  }

  .hero,
  .auth-grid,
  .tariff-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 48px;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  .hero-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-grid {
    display: grid;
  }

  .tariff-card {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .cloudy-header,
  .cloudy-nav,
  .hero-actions,
  .tariff-card {
    align-items: stretch;
  }

  .cloudy-header {
    flex-direction: column;
  }

  .cloudy-nav,
  .hero-actions {
    width: 100%;
  }

  .cloudy-nav {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav-action {
    min-width: 96px;
    white-space: normal;
  }

  .cloudy-main {
    width: min(100% - 24px, 1160px);
    padding-top: 20px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .hero-copy,
  .hero-panel,
  .auth-card,
  .tariff-card {
    box-shadow: 0 10px 26px rgba(30, 45, 76, 0.1);
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .tariff-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .cabinet-subscription-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .cabinet-subscription-card .tariff-price {
    grid-column: auto;
    margin-left: 0;
  }

  .tariff-price,
  .tariff-button {
    grid-column: 1 / -1;
    margin-left: 0;
  }
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 14px;
}

.small {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 12px;
}

.btn:hover {
  filter: brightness(1.06);
}

body.is-guest-landing {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.14), transparent 32%),
    linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
}

body.is-guest-landing .wrap {
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(28px + env(safe-area-inset-bottom, 0px));
  gap: 18px;
}

body.is-guest-landing .panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

body.is-guest-landing .guest-showcase,
body.is-guest-landing .guest-tariffs {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.ios-pill-btn {
  min-height: 36px;
  border: 1px solid rgba(205, 211, 227, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #1168d8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
  white-space: nowrap;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.ios-pill-btn.secondary {
  color: #626a7e;
}

.guest-showcase {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(216, 224, 240, 0.92);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(64, 196, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
  box-shadow: 0 22px 48px rgba(17, 39, 84, 0.12);
  padding: 22px 22px 20px;
}

.guest-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.2), transparent 38%);
  pointer-events: none;
}

.guest-showcase > * {
  position: relative;
  z-index: 1;
}

.guest-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.guest-topbar .guest-auth-entry {
  color: #0a84ff;
  font-weight: 780;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .guest-topbar .guest-auth-entry {
    background-image: linear-gradient(90deg, #18b54a 0%, #0a84ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.guest-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #587196;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.guest-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-block;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.24);
}

.guest-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.guest-hero-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.guest-title {
  max-width: 12ch;
  margin: 0;
  color: #0e1728;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 0.96;
}

.guest-subtitle {
  max-width: 52ch;
  color: #5a6682;
  font-size: 15px;
  line-height: 1.45;
}

.guest-tariffs {
  display: grid;
  gap: 12px;
  margin: 14px auto 0;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.service-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.service-meta {
  color: #6b7383;
  font-size: 13px;
  line-height: 1.35;
}

.tariff-promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 320px));
  grid-auto-flow: row dense;
  gap: 14px;
  align-items: start;
  justify-content: start;
  margin-top: 10px;
}

.tariff-promo-grid.has-active .tariff-promo-card:not(.is-active) {
  opacity: 1;
}

.tariff-promo-card {
  position: relative;
  display: grid;
  gap: 10px;
  width: 320px;
  max-width: 100%;
  min-height: 220px;
  aspect-ratio: 16 / 13;
  overflow: hidden;
  border: 1px solid rgba(220, 226, 239, 0.96);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(12, 39, 76, 0.15);
  color: #141414;
  padding: 16px 16px 14px;
  transform-origin: top left;
  transition: box-shadow 220ms ease, opacity 220ms ease, transform 220ms ease;
  will-change: transform;
}

.tariff-promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.tariff-promo-card > * {
  position: relative;
  z-index: 1;
}

.tariff-promo-card.is-active {
  display: flow-root;
  grid-column: span 2;
  width: 100%;
  min-height: 220px;
  aspect-ratio: auto;
  box-shadow: 0 18px 34px rgba(12, 39, 76, 0.18);
}

.tariff-promo-card.is-active .tariff-promo-main {
  float: left;
  width: min(46%, 392px);
  margin: 0 18px 12px 0;
}

.tariff-promo-main {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: start;
  align-self: start;
  gap: 10px;
  cursor: pointer;
  outline: none;
  min-width: 0;
}

.tariff-promo-main:focus-visible {
  border-radius: 24px;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.28);
}

.tariff-promo-logo-box {
  width: 100%;
  max-width: 72px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(215, 222, 239, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.36);
}

.tariff-promo-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.tariff-promo-name {
  min-height: calc(2 * 0.98em);
  overflow: hidden;
  color: #101010;
  display: -webkit-box;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 760;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  letter-spacing: 0;
  line-height: 0.98;
  opacity: 1;
  text-overflow: ellipsis;
}

.tariff-promo-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  color: rgba(18, 18, 18, 0.56);
  font-size: clamp(15px, 1.35vw, 20px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.92;
  white-space: nowrap;
}

.tariff-promo-brief {
  max-width: 72ch;
  min-height: calc(3 * 1.38em);
  overflow: hidden;
  color: rgba(20, 20, 20, 0.78);
  display: -webkit-box;
  font-size: clamp(14px, 1.08vw, 18px);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.38;
  opacity: 1;
  text-overflow: ellipsis;
  white-space: pre-wrap;
}

.tariff-promo-full {
  max-width: 72ch;
  color: #111111;
  font-size: 14px;
  line-height: 1.35;
  opacity: 1;
  white-space: pre-wrap;
}

.tariff-promo-full,
.tariff-promo-actions {
  display: none;
}

.tariff-promo-card.is-active .tariff-promo-brief {
  display: none;
}

.tariff-promo-card.is-active .tariff-promo-full {
  display: block;
  min-height: 0;
  max-width: none;
  overflow: visible;
  padding-right: 4px;
}

.tariff-promo-card.is-active .tariff-promo-actions {
  display: flex;
  clear: both;
  margin-top: 12px;
}

.tariff-promo-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 1;
}

.tariff-promo-connect {
  min-height: 46px;
  border: 1px solid rgba(10, 132, 255, 0.64);
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.16);
  color: #0a84ff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  padding: 10px 16px;
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}

.tariff-promo-hint {
  color: rgba(20, 20, 20, 0.72);
  font-size: 12px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(8, 14, 24, 0.34);
  backdrop-filter: blur(22px) saturate(1.16);
  -webkit-backdrop-filter: blur(22px) saturate(1.16);
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal-card {
  width: min(100%, 460px);
  max-height: min(92vh, 760px);
  overflow: auto;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(219, 226, 241, 0.98);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 255, 0.96));
  box-shadow: 0 28px 60px rgba(9, 26, 56, 0.26);
  padding: 18px;
}

.auth-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-modal-title {
  display: grid;
  gap: 6px;
}

.auth-modal-title h3 {
  margin: 0;
  color: #101828;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 0.96;
}

.auth-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(214, 220, 233, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 999px;
  background: #f2f4fa;
  padding: 4px;
}

.auth-switch-btn {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f6880;
  cursor: pointer;
  font-size: 14px;
  font-weight: 740;
}

.auth-switch-btn.is-active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: #111111;
}

.auth-alt-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.auth-alt-actions .ios-pill-btn {
  width: 100%;
  justify-content: center;
}

.auth-alt-status {
  min-height: 16px;
  color: #7f879b;
  font-size: 12px;
}

.auth-pane {
  display: none;
  margin-top: 12px;
}

.auth-pane.is-active {
  display: block;
}

.auth-form {
  display: grid;
  gap: 8px;
  border: 1px solid #e2e6f1;
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
}

.auth-form label:not(.legal-accept) {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
}

.auth-note {
  margin-top: 8px;
  color: #7f879b;
  font-size: 12px;
}

.legal-accept {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  margin: 2px 0;
  color: #566174;
  font-size: 12px;
  line-height: 1.35;
}

.legal-accept input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.legal-accept a {
  color: var(--brand);
  font-weight: 750;
  text-decoration: none;
}

.legal-footer {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--muted);
  padding: 14px 6px 2px;
  text-align: center;
}

.legal-footer-brand {
  color: #5c6670;
  font-size: 12px;
  font-weight: 800;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  font-size: 12px;
  line-height: 1.35;
}

.legal-footer a {
  color: #4d6478;
  font-weight: 650;
}

.legal-footer-contact {
  font-size: 12px;
}

@media (max-width: 680px) {
  .tariff-promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .tariff-promo-card {
    width: auto;
    min-height: 0;
    border-radius: 24px;
    padding: 14px 12px 12px;
  }

  .tariff-promo-card.is-active {
    grid-column: 1 / -1;
    min-height: 0;
    aspect-ratio: auto;
  }

  .tariff-promo-card.is-active .tariff-promo-main {
    width: min(48%, 260px);
    margin-right: 12px;
    margin-bottom: 8px;
  }

  .tariff-promo-main {
    grid-template-columns: 50px 1fr;
  }

  .tariff-promo-logo-box {
    max-width: 50px;
    border-radius: 16px;
  }

  .tariff-promo-name {
    font-size: clamp(15px, 4.6vw, 21px);
    line-height: 0.96;
  }

  .tariff-promo-price {
    font-size: 16px;
  }

  .tariff-promo-brief,
  .tariff-promo-full {
    font-size: clamp(13px, 3.2vw, 16px);
    line-height: 1.35;
  }

  .tariff-promo-card.is-active .tariff-promo-actions {
    gap: 6px;
  }

  .tariff-promo-card.is-active .tariff-promo-hint {
    display: none;
  }

  .guest-showcase {
    border-radius: 28px;
    padding: 18px 16px 16px;
  }

  .guest-title {
    max-width: none;
    font-size: clamp(34px, 12vw, 54px);
  }

  .auth-modal-card {
    width: 100%;
    border-radius: 26px;
    padding: 16px;
  }

  body.is-guest-landing .wrap {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }
}
