:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 245, 0.94);
  --panel-strong: #fffaf1;
  --line: #d9ccb7;
  --ink: #13263d;
  --ink-soft: #466178;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --warn: #9a5b00;
  --error: #b42318;
  --ok: #166534;
  --shadow: 0 24px 70px rgba(19, 38, 61, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(15, 118, 110, 0.18), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(205, 137, 53, 0.18), transparent 28%),
    linear-gradient(160deg, #f5f0e6, #eee4d3 42%, #f7f4ee);
  line-height: 1.55;
}

body.is-booting {
  overflow: hidden;
}

a {
  color: inherit;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(205, 137, 53, 0.18), transparent 24%),
    rgba(244, 239, 230, 0.96);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.is-ready .boot-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-screen__panel {
  width: min(420px, 100%);
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.1rem;
}

.boot-screen__eyebrow,
.boot-screen__title,
.boot-screen__status,
.boot-screen__detail {
  margin: 0;
}

.boot-screen__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-strong);
}

.boot-screen__title {
  margin-top: 0.5rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.boot-screen__status {
  margin-top: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
}

.boot-screen__detail {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.boot-screen__meter {
  margin-top: 1rem;
  height: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(19, 38, 61, 0.08);
}

.boot-screen__meter span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.18), var(--brand), rgba(205, 137, 53, 0.8));
  animation: boot-meter-slide 1.1s ease-in-out infinite;
}

.shell {
  transition: opacity 0.28s ease, transform 0.28s ease;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

body.is-booting .shell {
  opacity: 0.12;
  transform: scale(0.995);
  pointer-events: none;
  user-select: none;
}

.hero,
.card {
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 1rem;
  background: linear-gradient(140deg, rgba(15, 118, 110, 0.96), rgba(13, 84, 81, 0.94));
  color: #f2fffd;
  border-radius: 30px;
  padding: 1.3rem 1.2rem;
}

.hero__eyebrow,
.card__eyebrow,
.plan-card__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero__title,
.card__title,
.plan-card h3 {
  font-family: "Sora", "Segoe UI", sans-serif;
}

.hero__title {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 4.3vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0.6rem 0 0;
  max-width: 48rem;
}

.hero__actions,
.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.grid--top {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1rem;
}

.card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.card__title {
  margin: 0.2rem 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.meta {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.field {
  display: grid;
  gap: 0.38rem;
  margin-top: 0.85rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--panel-strong);
}

.field textarea {
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.button--primary {
  background: var(--brand);
  color: #f4fffd;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.22);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  border-color: rgba(255, 255, 255, 0.24);
}

.card .button--ghost {
  background: rgba(19, 38, 61, 0.04);
  border-color: rgba(19, 38, 61, 0.12);
}

.button--danger {
  background: rgba(180, 35, 24, 0.1);
  color: var(--error);
  border-color: rgba(180, 35, 24, 0.18);
}

.billing-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(19, 38, 61, 0.08);
}

.billing-actions__title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.billing-actions__copy {
  margin-top: 0.45rem;
}

.billing-actions__buttons {
  margin-top: 0.85rem;
}

.flash,
.status {
  margin: 0.75rem 0 0;
  border-radius: 16px;
  padding: 0.82rem 0.95rem;
  font-size: 0.95rem;
}

.flash {
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-strong);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.status--info {
  background: rgba(19, 38, 61, 0.06);
  color: var(--ink);
}

.status--success {
  background: rgba(22, 101, 52, 0.1);
  color: var(--ok);
}

.status--warning {
  background: rgba(154, 91, 0, 0.12);
  color: var(--warn);
}

.status--error {
  background: rgba(180, 35, 24, 0.12);
  color: var(--error);
}

.plan-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.plan-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(19, 38, 61, 0.08);
  border-radius: 20px;
  padding: 1rem;
}

.plan-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.plan-card--framed {
  background:
    radial-gradient(circle at top right, rgba(205, 137, 53, 0.18), transparent 42%),
    linear-gradient(160deg, rgba(19, 38, 61, 0.98), rgba(23, 56, 83, 0.96));
  color: #f4f8ff;
  border-color: rgba(205, 137, 53, 0.38);
  box-shadow: 0 20px 42px rgba(19, 38, 61, 0.24);
}

.plan-card--framed .plan-card__eyebrow,
.plan-card--framed .plan-card__copy,
.plan-card--framed .plan-card__list,
.plan-card--framed .plan-card__price span,
.plan-card--framed .plan-card__note {
  color: rgba(244, 248, 255, 0.82);
}

.plan-card__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(205, 137, 53, 0.18);
  border: 1px solid rgba(205, 137, 53, 0.28);
  color: #ffe3be;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.plan-card.is-selected {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12), 0 16px 36px rgba(15, 118, 110, 0.12);
}

.plan-card.is-unavailable {
  opacity: 0.76;
}

.plan-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.plan-card__price {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.plan-card__price span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-left: 0.2rem;
}

.plan-card__copy {
  margin: 0;
  color: var(--ink-soft);
}

.plan-card__list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.plan-card__list li + li {
  margin-top: 0.35rem;
}

.plan-card__note {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.plan-card__action {
  margin-top: auto;
}

.plan-card--framed .plan-card__action {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #f4f8ff;
}

.card--custom {
  margin-top: 1rem;
}

.custom-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 0.75rem;
  }

  .hero,
  .card {
    border-radius: 22px;
  }

  .button,
  .plan-card__action {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
  }
}

@keyframes boot-meter-slide {
  0% {
    transform: translateX(-110%);
  }

  55% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(210%);
  }
}
