@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root {
  --bg: #f6fff8;
  --bg-soft: #eefbf2;
  --bg-panel: rgba(255, 255, 255, 0.94);
  --bg-panel-strong: #ffffff;
  --bg-accent: #dff6e7;
  --border: rgba(18, 93, 56, 0.14);
  --border-strong: rgba(18, 93, 56, 0.28);
  --text: #102319;
  --text-soft: #446153;
  --text-muted: #6d8377;
  --accent: #18955a;
  --accent-strong: #0f7a47;
  --accent-soft: #dcf6e5;
  --accent-ghost: #eefaf2;
  --danger: #d54862;
  --warning: #8a6806;
  --shadow-lg: 0 30px 90px rgba(22, 92, 54, 0.12);
  --shadow-md: 0 20px 50px rgba(22, 92, 54, 0.08);
  --shadow-sm: 0 12px 28px rgba(22, 92, 54, 0.06);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1180px;
  --stack-gap: 14px;
  --stack-gap-tight: 10px;
  --stack-gap-section: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.62;
  background:
    linear-gradient(125deg, rgba(24, 149, 90, 0.07) 0%, rgba(24, 149, 90, 0) 34%),
    radial-gradient(circle at top right, rgba(92, 209, 134, 0.18), rgba(92, 209, 134, 0) 36%),
    linear-gradient(180deg, #fbfffc 0%, #f2fcf5 52%, #edf9f0 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 90, 53, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 90, 53, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.55), transparent 88%);
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:not(.btn):hover {
  color: #0b633a;
}

.container {
  width: min(var(--container), calc(100% - 36px));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.site-header {
  position: relative;
  z-index: 20;
  padding: 18px 0 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 78px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  font-size: clamp(1rem, 0.82vw + 0.92rem, 1.24rem);
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.site-nav a:hover,
.site-nav button:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 149, 90, 0.18);
  background: rgba(24, 149, 90, 0.08);
  color: var(--text);
}

#user-info {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

#user-email {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.main {
  padding: 34px 0 90px;
}

.hero,
.section,
.card,
.form-card,
.payment-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 255, 248, 0.94));
  box-shadow: var(--shadow-md);
  text-align: left;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 22px;
  padding: 34px;
  border-radius: 38px 18px 38px 18px;
  box-shadow: var(--shadow-lg);
}

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 56%;
  height: 14px;
  background: linear-gradient(90deg, rgba(24, 149, 90, 0.9), rgba(24, 149, 90, 0));
}

.hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 208, 119, 0.2), rgba(67, 208, 119, 0));
  pointer-events: none;
}

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

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  padding: 20px;
  border-radius: 24px 14px 24px 14px;
  border: 1px solid rgba(24, 149, 90, 0.14);
  background:
    linear-gradient(160deg, rgba(24, 149, 90, 0.1), rgba(24, 149, 90, 0) 48%),
    rgba(255, 255, 255, 0.84);
}

.hero-panel h2,
.section h1,
.section h2,
.form-card h1,
.payment-card h1,
.card h2,
.card h3 {
  margin: 0;
  font-family: 'Sora', 'Manrope', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: clamp(2.35rem, 3vw + 1rem, 4.6rem);
  letter-spacing: -0.05em;
  line-height: 0.97;
}

.hero.hero-single h1 {
  max-width: none;
  width: 100%;
}

.card h3 {
  line-height: 1.14;
}

.hero p,
.section p,
.card p,
.form-card p,
.payment-card p,
.legal-doc p {
  margin: 0;
  color: var(--text-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(24, 149, 90, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  justify-content: flex-start;
}

.intro-points {
  margin-top: 0;
}

.flow-grid {
  margin-top: 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: default;
  opacity: 0.62;
  transform: none;
}

.btn-primary,
.btn-primary:visited {
  background: linear-gradient(135deg, #107c48 0%, #1ebe6c 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(24, 149, 90, 0.24);
}

.btn-secondary,
.btn-secondary:visited {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost,
.btn-ghost:visited {
  background: var(--accent-ghost);
  color: var(--accent-strong);
  border-color: rgba(24, 149, 90, 0.14);
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.metric-list {
  display: grid;
  gap: var(--stack-gap-tight);
}

.metric-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(24, 149, 90, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric-value {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.panel-caption {
  color: var(--text-soft);
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.section {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  margin-top: var(--stack-gap-section);
  padding: 30px;
  border-radius: 28px 14px 28px 14px;
}

.launch-container {
  max-width: 900px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.launch-section {
  margin-top: 0;
  width: min(820px, 100%);
  text-align: center;
}

.launch-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.launch-page .main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 16px 0 26px;
}

.launch-page .hero-actions {
  justify-content: center;
}

.launch-page .hero-actions .btn {
  min-width: 250px;
}

.card,
.form-card {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  padding: 24px;
  border-radius: 24px 12px 24px 12px;
}

.card::before,
.form-card::before,
.payment-card::before,
.section::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, rgba(24, 149, 90, 0.92), rgba(24, 149, 90, 0));
}

.steps { 
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  color: var(--text-soft);
  text-align: left;
}

.steps li {
  text-align: left;
}

.steps li + li {
  margin-top: var(--stack-gap-tight);
}

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 14px;
  margin: 0;
  text-align: left;
}

.kv dt {
  color: var(--text-muted);
  text-align: left;
}

.kv dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.access-kv {
  margin-top: 0;
  align-items: center;
}

.subscription-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  width: fit-content;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  text-align: left;
}

.subscription-chip.status-ok {
  background: rgba(220, 246, 229, 0.72);
  border-color: rgba(24, 149, 90, 0.32);
  color: var(--accent-strong);
}

.subscription-chip.status-fail {
  background: rgba(255, 232, 236, 0.76);
  border-color: rgba(213, 72, 98, 0.36);
  color: #b53c52;
}

.subscription-chip.status-warn {
  background: rgba(255, 244, 209, 0.8);
  border-color: rgba(138, 104, 6, 0.34);
  color: var(--warning);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.sub-link-panel {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap-tight);
}

.plan-picker {
  display: grid;
  gap: var(--stack-gap-tight);
}

.plan-picker label {
  color: var(--text);
  font-weight: 800;
}

.plan-picker .btn {
  width: 100%;
}

#plan-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' fill='none' stroke='%23102319' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 25, 0.42);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-panel-strong);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 1;
}

.modal-step {
  display: grid;
  gap: var(--stack-gap-tight);
  margin-top: var(--stack-gap);
}

.method-actions .btn {
  flex: 1 1 180px;
}

.method-select.is-active {
  border-color: transparent;
}

.plans-grid {
  display: grid;
  gap: var(--stack-gap-tight);
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap-tight);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(24, 149, 90, 0.16);
  background: rgba(255, 255, 255, 0.9);
}

.plan-card.is-disabled {
  opacity: 0.72;
}

.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-card h4 {
  margin: 0;
  font-family: 'Sora', 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.2;
}

.plan-price {
  color: var(--accent-strong);
  font-size: 1.06rem;
  font-weight: 800;
  white-space: nowrap;
}

.plan-meta {
  margin: 0;
  color: var(--text-soft);
}

.plan-actions {
  width: 100%;
}

.plan-actions .btn {
  flex: 1 1 180px;
}

.inline-actions {
  display: flex;
  gap: var(--stack-gap-tight);
  flex-wrap: wrap;
}

.sub-link-panel .sub-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: var(--stack-gap-tight);
}

.sub-link-panel .sub-actions .btn {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap-tight);
  margin-bottom: var(--stack-gap);
}

.form-group label {
  color: var(--text);
  font-weight: 800;
}

.input,
.input-row input,
.sub-link-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input:focus,
.input-row input:focus,
.sub-link-panel input:focus {
  border-color: rgba(24, 149, 90, 0.36);
  box-shadow: 0 0 0 4px rgba(24, 149, 90, 0.11);
  transform: translateY(-1px);
}

.input-hint {
  margin: 0;
  color: var(--text-muted);
}

.card .input-hint,
.section .input-hint {
  margin-top: 0;
}

.form-error {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(213, 72, 98, 0.18);
  background: rgba(255, 235, 240, 0.9);
  color: #a9364d;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-pill.ok {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill.warn {
  background: #fff4d1;
  color: var(--warning);
}

.status-pill.fail {
  background: #ffe8ec;
  color: #b53c52;
}

.inline-note {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.surface-note {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px dashed rgba(24, 149, 90, 0.22);
  background: linear-gradient(180deg, rgba(238, 250, 242, 0.95), rgba(255, 255, 255, 0.92));
  color: var(--text-soft);
}

.payment-card {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  padding: 38px 32px;
  border-radius: 30px 16px 30px 16px;
  text-align: left;
}

.emoji {
  width: 82px;
  height: 82px;
  margin: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--accent-soft);
  font-size: 2rem;
}

.legal-doc {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.legal-doc h2 {
  margin: 0;
  font-size: 1.12rem;
}

.legal-doc ul {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  color: var(--text-soft);
  text-align: left;
}

.legal-doc li {
  text-align: left;
}

.footer {
  padding: 18px 0 46px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links .support-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent-ghost);
  border: 1px solid rgba(24, 149, 90, 0.14);
  color: var(--accent-strong);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3,
  .input-row {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    width: 100%;
  }

  .inline-actions .btn {
    flex: 1 1 180px;
  }

  .sub-link-panel .sub-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(var(--container), calc(100% - 22px));
  }

  .site-header {
    padding-top: 12px;
  }

  .header-row,
  .footer-row {
    border-radius: 28px;
  }

  .header-row {
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    letter-spacing: 0.12em;
  }

  .main {
    padding: 24px 0 70px;
  }

  .launch-page .hero-actions .btn {
    min-width: 0;
  }

  .hero,
  .section,
  .card,
  .form-card,
  .payment-card {
    padding: 22px 20px;
  }

  .card,
  .form-card,
  .payment-card {
    padding-top: 26px;
  }

  .card::before,
  .form-card::before,
  .payment-card::before,
  .section::before {
    width: 96px;
  }

  .hero {
    border-radius: 28px 14px 28px 14px;
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .section,
  .card,
  .form-card,
  .payment-card {
    gap: var(--stack-gap-tight);
  }

  .sub-link-panel .sub-actions {
    gap: 12px;
  }

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

  .btn {
    width: 100%;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .site-nav > a,
  .site-nav > button {
    width: 100%;
    justify-content: center;
  }

  #auth-links,
  #user-info {
    width: 100%;
    grid-column: 1 / -1;
  }

  #auth-links {
    display: block;
  }

  #auth-links a {
    width: 100%;
  }

  #user-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #logout-btn,
  #user-email {
    width: 100%;
  }

  .site-nav a,
  .site-nav button,
  #user-email,
  #logout-btn {
    justify-content: center;
  }

  #user-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-links {
    width: 100%;
  }

  .footer-links a {
    width: 100%;
    justify-content: center;
  }
}
