:root {
  --bg-0: #040814;
  --bg-1: #081227;
  --bg-2: #111f3f;
  --panel: rgba(7, 16, 36, 0.76);
  --panel-strong: rgba(6, 13, 30, 0.94);
  --line: rgba(0, 247, 255, 0.26);
  --line-soft: rgba(159, 182, 213, 0.24);
  --line-strong: rgba(184, 255, 90, 0.42);
  --text: #eaf6ff;
  --muted: #9ab3d5;
  --cyan: #00f7ff;
  --lime: #b8ff5a;
  --pink: #ff4f8f;
  --orange: #ff9a47;
  --danger: #ff5d72;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.44);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 247, 255, 0.18), transparent 32%),
    radial-gradient(circle at 88% 15%, rgba(255, 79, 143, 0.16), transparent 30%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 42%, var(--bg-2));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 110%, rgba(184, 255, 90, 0.12), transparent 45%);
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(32px);
  opacity: 0.34;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--a {
  left: -60px;
  top: 22%;
  background: rgba(0, 247, 255, 0.5);
  animation: float-a 10s ease-in-out infinite;
}

.bg-glow--b {
  right: -80px;
  top: 58%;
  background: rgba(255, 79, 143, 0.48);
  animation: float-b 12s ease-in-out infinite;
}

@keyframes float-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -16px, 0) scale(1.08);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, 12px, 0) scale(0.92);
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1150px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.3rem 0 3.1rem;
}

.locale-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.locale-link {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(8, 21, 47, 0.84);
  padding: 0.35rem 0.72rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.locale-link:hover,
.locale-link:focus-visible {
  color: var(--lime);
  text-decoration: underline;
}

.locale-link.active {
  color: #06142e;
  background: linear-gradient(135deg, var(--lime), #d4ff92);
  border-color: rgba(184, 255, 90, 0.7);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.eyebrow {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--lime);
}

.hero h1 {
  margin-top: 0.6rem;
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 5.8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-shadow: 0 0 26px rgba(0, 247, 255, 0.16);
}

.hero p {
  margin: 0.95rem auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.95vw, 1.08rem);
}

.panel {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(6, 14, 33, 0.36);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.panel:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 255, 90, 0.5);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 3.2vw, 1.34rem);
  letter-spacing: 0.02em;
}

.panel-head--actions {
  align-items: flex-start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.profile-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "age unit weight height sex activity"
    ". . action action . .";
  gap: 0.95rem;
  align-items: end;
}

.field-age {
  grid-area: age;
}

.field-unit {
  grid-area: unit;
}

.field-weight {
  grid-area: weight;
}

.field-height {
  grid-area: height;
}

.field-sex {
  grid-area: sex;
}

.field-activity {
  grid-area: activity;
}

.field-action {
  grid-area: action;
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.unit-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(8, 18, 41, 0.85);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  padding: 0.24rem 0.44rem;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(8, 21, 48, 0.9);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  min-height: 46px;
  padding: 0.72rem 0.78rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-action-label {
  display: none;
}

.step1-submit {
  width: 100%;
  min-height: 68px;
  border-radius: 16px;
  font-size: 1.02rem;
}

.field input::placeholder {
  color: #7393ba;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.16);
}

.field--full {
  grid-column: 1 / -1;
}

.field-set {
  margin: 0;
  padding: 0.72rem 0.8rem 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.field-set legend {
  padding: 0 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.chip-grid,
.radio-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-check,
.chip-radio {
  position: relative;
}

.chip-check input,
.chip-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-check span,
.chip-radio span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 18, 41, 0.85);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.46rem 0.82rem;
  transition: all 160ms ease;
  cursor: pointer;
}

.chip-check input:checked + span,
.chip-radio input:checked + span {
  border-color: var(--line-strong);
  color: var(--text);
  background: linear-gradient(145deg, rgba(184, 255, 90, 0.18), rgba(0, 247, 255, 0.13));
  box-shadow: 0 0 22px rgba(184, 255, 90, 0.16);
}

.action-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.95rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #071021;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  min-height: 43px;
  padding: 0.76rem 1.02rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(140deg, var(--cyan), var(--lime));
  box-shadow: 0 10px 26px rgba(0, 247, 255, 0.24);
}

.btn-secondary {
  background: linear-gradient(140deg, var(--orange), var(--pink));
  box-shadow: 0 10px 26px rgba(255, 79, 143, 0.24);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-soft);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 247, 255, 0.16);
}

.form-feedback {
  min-height: 1.45rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.form-feedback.success {
  color: var(--lime);
}

.results-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.placeholder {
  min-height: 142px;
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
  padding: 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  align-content: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.metric-card {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 0.74rem;
  background: rgba(8, 22, 50, 0.72);
}

.metric-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fb1da;
}

.metric-card p {
  margin-top: 0.35rem;
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: 0.02em;
}

.metric-card span {
  display: inline-block;
  margin-top: 0.32rem;
  font-size: 0.78rem;
  color: #b4cbe8;
}

.list-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.58rem;
}

.list-block {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 0.72rem;
  background: rgba(7, 17, 39, 0.82);
}

.list-block h4 {
  font-size: 0.84rem;
  color: #c2d7f1;
  margin-bottom: 0.42rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.list-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.32rem;
}

.list-block li {
  font-size: 0.88rem;
  color: #d8e8fb;
}

.meta-line {
  margin-top: 0.72rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.meta-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font-size: 0.76rem;
  color: #d5e9ff;
  background: rgba(8, 21, 47, 0.84);
}

.stack {
  display: grid;
  gap: 0.55rem;
}

.stack-card {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 0.72rem;
  background: rgba(8, 21, 47, 0.8);
}

.stack-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.stack-card h4 {
  font-size: 0.92rem;
}

.stack-card strong {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  color: var(--lime);
}

.stack-card p {
  margin-top: 0.4rem;
  color: #d6e6f8;
  font-size: 0.88rem;
}

.stack-card ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.stack-card li {
  font-size: 0.86rem;
  color: #d9ebff;
}

.export-panel {
  margin-top: 0.9rem;
}

.support-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-note {
  margin-top: 0.6rem;
  font-size: 0.84rem;
  color: #91a8c7;
}

.site-network p {
  font-size: 0.9rem;
  color: var(--muted);
}

.policy-links {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-network a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(8, 21, 47, 0.84);
  padding: 0.35rem 0.72rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.site-network a:hover,
.site-network a:focus-visible {
  color: var(--lime);
  text-decoration: underline;
}

.seo-content {
  margin-top: 0.9rem;
}

.seo-text {
  margin-top: 0.56rem;
  color: #c4d8f1;
  font-size: 0.92rem;
  line-height: 1.62;
}

.seo-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.64rem;
}

.faq-title {
  margin-top: 0.95rem;
  font-size: 1rem;
  font-family: "Orbitron", "Space Grotesk", sans-serif;
}

.faq-list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.48rem;
}

.faq-list details {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(8, 21, 47, 0.8);
  padding: 0.68rem 0.78rem;
}

.faq-list summary {
  cursor: pointer;
  color: #ddedff;
  font-size: 0.9rem;
  font-weight: 600;
}

.faq-list summary::-webkit-details-marker {
  color: var(--cyan);
}

.faq-list p {
  margin-top: 0.46rem;
  color: #bfd4ee;
  font-size: 0.88rem;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal-up 580ms ease forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.14s;
}

.delay-3 {
  animation-delay: 0.2s;
}

.delay-4 {
  animation-delay: 0.26s;
}

.delay-5 {
  animation-delay: 0.32s;
}

.delay-6 {
  animation-delay: 0.38s;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "age unit weight"
      "height sex activity"
      "action action action";
  }

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

@media (max-width: 760px) {
  .app-shell {
    width: min(96vw, 760px);
    padding-top: 1.35rem;
  }

  .locale-switch {
    justify-content: center;
    margin-bottom: 0.6rem;
  }

  .panel {
    padding: 0.95rem;
  }

  .form-grid,
  .results-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "age unit"
      "weight height"
      "sex activity"
      "action action";
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .policy-links {
    gap: 0.4rem;
  }

  .panel-head,
  .stack-card header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn,
  .btn-ghost,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .action-row {
    width: 100%;
  }

  .hero h1 {
    line-height: 1.14;
  }
}

@media (max-width: 560px) {
  .profile-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "age"
      "unit"
      "weight"
      "height"
      "sex"
      "activity"
      "action";
  }

  .step1-submit {
    min-height: 56px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
