:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --text: #151917;
  --muted: #626b66;
  --line: #dbe1de;
  --accent: #1f7a5b;
  --accent-2: #0f5c90;
  --danger: #a33b32;
  --shadow: 0 18px 50px rgba(28, 34, 31, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 34px 0 26px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--surface);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 6px;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-panel {
  max-width: 560px;
  margin: 18px auto 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.auth-switch-button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-switch-button.is-active {
  background: var(--text);
  color: #fff;
}

.tab,
.primary,
.secondary {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  cursor: pointer;
}

.tab {
  background: transparent;
  color: var(--muted);
}

.tab.is-active {
  background: var(--text);
  color: #fff;
}

.panel {
  display: none;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel.is-active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.section-head p {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.form.row {
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  background: #fff;
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(31, 122, 91, 0.18);
  border-color: var(--accent);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

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

.auth-grid.single {
  grid-template-columns: 1fr;
}

.auth-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfb;
}

.auth-card h3 {
  margin-bottom: 0;
}

.plan {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  text-align: left;
}

.plan.is-selected {
  border-color: var(--accent);
  background: var(--surface-2);
}

.plan strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.plan span {
  display: block;
  color: var(--muted);
}

.pay-actions,
.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: #e9eeeb;
  color: var(--text);
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.notice,
.cabinet-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfb;
}

.notice.compact {
  margin: 0 0 18px;
}

.notice p,
.cabinet-card p {
  color: var(--muted);
  line-height: 1.45;
}

.copy-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.copy-line code {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
}

.payment-success {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 16px;
  align-items: start;
}

.qr-code {
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.connect-tools {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfb;
}

.connect-tools h3 {
  margin-bottom: 10px;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.platform-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  cursor: pointer;
}

.instructions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.instructions article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.instructions h3 {
  margin-bottom: 8px;
}

.instructions p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1060px);
    padding-top: 22px;
  }

  .hero,
  .section-head,
  .form,
  .form.row,
  .auth-grid,
  .plans,
  .instructions,
  .payment-success,
  .copy-line {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
  }

  .panel {
    padding: 18px;
  }
}
