:root {
  --bg: #efe1c5;
  --bg-soft: #f8edd8;
  --paper: #fff9ef;
  --paper-strong: #f6ead1;
  --paper-deep: #ead7b0;
  --ink: #15110d;
  --ink-soft: #4c4037;
  --accent: #ee8e00;
  --accent-strong: #c65f00;
  --accent-soft: #f6c86b;
  --night: #123946;
  --night-strong: #092733;
  --night-soft: #275b6d;
  --gold: #f8cf72;
  --line: rgba(21, 17, 13, 0.13);
  --line-strong: rgba(21, 17, 13, 0.24);
  --success: #1f6b44;
  --success-bg: #ebfff3;
  --error: #8f291c;
  --error-bg: #fff0ed;
  --shadow: 0 20px 46px rgba(27, 17, 10, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Bitter", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(135deg, #fbf4e8 0%, #edf3f2 42%, #f2dfba 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 23px,
      rgba(18, 57, 70, 0.025) 23px,
      rgba(18, 57, 70, 0.025) 24px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 15px,
      rgba(21, 17, 13, 0.018) 15px,
      rgba(21, 17, 13, 0.018) 16px
    );
  opacity: 0.72;
}

.redirect-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.redirect-shell__card {
  width: min(760px, 100%);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(9, 39, 51, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96), rgba(246, 234, 209, 0.94));
  box-shadow: var(--shadow);
  text-align: center;
}

.redirect-shell__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.55rem;
  background: linear-gradient(90deg, var(--night-strong), var(--accent), var(--gold), var(--night-strong));
}

.redirect-shell__card--form {
  text-align: left;
}

.redirect-shell__eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night);
}

.redirect-shell__card h1 {
  margin-bottom: 0.8rem;
}

.redirect-shell__message {
  max-width: 36rem;
  margin: 0 auto;
}

.redirect-shell__card--form .redirect-shell__message {
  margin: 0 0 0.8rem;
}

.redirect-shell__quote {
  margin: 1rem auto 0;
  padding: 1rem 1.1rem;
  max-width: 36rem;
  border: 1px solid rgba(9, 39, 51, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(248, 207, 114, 0.22), rgba(18, 57, 70, 0.08));
  color: #5b3d22;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
}

.redirect-shell__card--form .redirect-shell__quote {
  margin-left: 0;
  margin-right: 0;
}

.redirect-shell__note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
}

.redirect-shell__loader {
  width: 3rem;
  height: 3rem;
  margin: 1.2rem auto 0;
  border: 3px solid rgba(233, 130, 0, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.redirect-shell__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.redirect-shell__card--form .redirect-shell__actions {
  justify-content: flex-start;
}

.redirect-shell__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.redirect-shell__button.primary {
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: var(--night-strong);
}

.redirect-shell__button.secondary {
  background: linear-gradient(135deg, var(--night-soft), var(--night));
  border-color: rgba(9, 39, 51, 0.15);
  color: #fff8f0;
}

.redirect-shell__button.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.password-bridge-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.password-bridge-form__field {
  display: grid;
  gap: 0.45rem;
}

.password-bridge-form__field span {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
}

.password-bridge-form__field input {
  width: 100%;
  min-height: 3.3rem;
  padding: 0.92rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}

.password-bridge-form__field input:focus-visible {
  outline: 3px solid rgba(233, 130, 0, 0.22);
  border-color: rgba(233, 130, 0, 0.6);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
fieldset,
a {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 5.5rem;
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 1.5rem;
}

.hero__brand,
.attention-card,
.privacy-card,
.panel-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(9, 39, 51, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 239, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero__brand::before,
.attention-card::before,
.privacy-card::before,
.panel-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.55rem;
  background: linear-gradient(90deg, var(--night), var(--accent), var(--gold), var(--night));
}

.hero__brand {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.98), rgba(246, 234, 209, 0.96)),
    var(--paper);
}

.hero__logo {
  width: min(220px, 58vw);
  justify-self: center;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-tag {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 8vw, 3.9rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
}

h3 {
  font-size: clamp(1.25rem, 4vw, 1.7rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero__lead {
  margin-top: 0.9rem;
  max-width: 34rem;
  font-size: 1rem;
}

.hero__welcome {
  margin-top: 0.9rem;
  max-width: 36rem;
  font-size: 0.98rem;
}

.hero__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.hero__actions {
  margin-top: 1rem;
}

.hero__values span,
.panel-shell__meta,
.choice-pill span {
  border: 1px solid rgba(9, 39, 51, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.hero__values span {
  padding: 0.58rem 1rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff8f0;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--night), var(--night-soft));
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
}

.attention-card {
  padding: 1.2rem 1.25rem;
  background:
    linear-gradient(145deg, rgba(255, 244, 222, 0.98), rgba(238, 246, 244, 0.94));
}

.attention-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--night-strong);
}

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

.attention-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid rgba(9, 39, 51, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 12px 24px rgba(198, 95, 0, 0.16);
  color: var(--night-strong);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.attention-card__button:hover,
.attention-card__button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(198, 95, 0, 0.2);
}

.attention-card__button.is-disabled,
.attention-card__button[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.content {
  display: grid;
  gap: 1rem;
}

.privacy-card {
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(236, 245, 243, 0.95));
}

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

.info-chip {
  padding: 1rem;
  border: 1px solid rgba(9, 39, 51, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.info-chip:nth-child(2) {
  background: linear-gradient(180deg, rgba(255, 245, 222, 0.92), rgba(255, 250, 242, 0.82));
}

.cordel-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.35rem 0 1rem;
}

.cordel-divider::before,
.cordel-divider::after,
.cordel-divider span {
  content: "";
  display: block;
  border-radius: 999px;
}

.cordel-divider::before,
.cordel-divider::after {
  width: min(11rem, 28vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--night), transparent);
}

.cordel-divider span {
  width: 2.75rem;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--night));
}

.info-chip h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.panel-shell {
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 249, 239, 0.98), rgba(238, 246, 244, 0.96));
}

.panel-shell__header {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.panel-shell__meta {
  justify-self: start;
  padding: 0.65rem 0.95rem;
  font-size: 0.92rem;
  color: #fff8f0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--night), var(--night-soft));
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tabs--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 34rem;
}

.tab-button {
  min-height: 3.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(9, 39, 51, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.9), rgba(242, 226, 193, 0.76));
  color: var(--night-strong);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab-button:hover,
.tab-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(200, 93, 0, 0.45);
}

.tab-button.is-active {
  border-color: rgba(9, 39, 51, 0.1);
  background: linear-gradient(135deg, var(--night), var(--night-soft));
  color: #fff8f0;
}

.panel-card {
  padding: 1.15rem;
  position: relative;
  border: 1px solid rgba(9, 39, 51, 0.16);
  border-radius: calc(var(--radius-lg) - 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 240, 0.94));
}

.panel-card::after {
  content: "";
  position: absolute;
  inset: 1rem 1rem auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 57, 70, 0.25), transparent);
}

.panel-card__header {
  margin-bottom: 1rem;
}

.panel-card__header p {
  margin-top: 0.55rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.field,
.choice-group {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.field label,
.choice-group legend {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
}

.field input,
.field select,
#signupPhoneCountryCustom {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.92rem 1rem;
  border: 1px solid rgba(9, 39, 51, 0.2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}

.field input::placeholder,
#signupPhoneCountryCustom::placeholder {
  color: #8b7f77;
}

.field input:focus-visible,
.field select:focus-visible,
#signupPhoneCountryCustom:focus-visible {
  outline: 3px solid rgba(238, 142, 0, 0.22);
  border-color: rgba(18, 57, 70, 0.45);
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(18, 57, 70, 0.85) 50%),
    linear-gradient(135deg, rgba(18, 57, 70, 0.85) 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) calc(50% - 0.18rem),
    calc(100% - 0.8rem) calc(50% - 0.18rem);
  background-size: 0.42rem 0.42rem, 0.42rem 0.42rem;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.phone-field__row {
  display: grid;
  gap: 0.7rem;
}

#signupPhoneCountryCustom {
  margin-top: 0.7rem;
}

.field__hint {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.choice-group {
  padding: 0;
  border: 0;
}

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

.choice-pill {
  cursor: pointer;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span {
  display: grid;
  place-items: center;
  min-height: 3.1rem;
  padding: 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  color: var(--ink);
}

.choice-pill input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(18, 57, 70, 0.18), rgba(238, 142, 0, 0.38));
  box-shadow: inset 0 0 0 1px rgba(9, 39, 51, 0.18);
}

.consent-box {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem;
  margin: 1rem 0 0.9rem;
  border: 1px solid rgba(18, 57, 70, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 240, 214, 0.72), rgba(246, 234, 209, 0.84));
}

.consent-box--soft {
  background: rgba(255, 250, 241, 0.92);
}

.consent-box input {
  margin-top: 0.16rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.45rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.action-stack {
  display: grid;
  gap: 0.7rem;
}

.primary-button {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: var(--night-strong);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(198, 95, 0, 0.18);
}

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

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

.primary-button.is-loading::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 248, 240, 0.55);
  border-top-color: #fff8f0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.secondary-button {
  border: 1px solid rgba(9, 39, 51, 0.12);
  background: linear-gradient(135deg, var(--night-soft), var(--night));
  color: #fff8f0;
}

.secondary-button--full {
  width: 100%;
}

.secondary-button.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.form-note {
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.form-note--support {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  color: rgba(18, 57, 70, 0.78);
}

.feedback {
  min-height: 1.5rem;
  margin-top: 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.feedback[data-tone="success"] {
  color: var(--success);
}

.feedback[data-tone="error"] {
  color: var(--error);
}

.feedback__box {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.feedback[data-tone="success"] .feedback__box {
  background: var(--success-bg);
  border-color: rgba(31, 107, 68, 0.14);
}

.feedback[data-tone="error"] .feedback__box {
  background: var(--error-bg);
  border-color: rgba(143, 41, 28, 0.12);
}

.terms-summary {
  display: grid;
  gap: 0.85rem;
}

.terms-summary article {
  padding: 1rem;
  border: 1px solid rgba(9, 39, 51, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
}

.terms-summary article p {
  margin-top: 0.45rem;
}

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

.floating-educator-link {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.4rem);
  bottom: clamp(0.8rem, 2.4vw, 1.35rem);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
  min-height: 2.95rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(9, 39, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.88);
  box-shadow: 0 14px 32px rgba(16, 27, 32, 0.16);
  backdrop-filter: blur(12px);
  color: var(--night);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.floating-educator-link::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 0 0 0.28rem rgba(238, 142, 0, 0.14);
}

.floating-educator-link:hover,
.floating-educator-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(198, 95, 0, 0.32);
  background: rgba(255, 249, 239, 0.96);
  box-shadow: 0 16px 34px rgba(16, 27, 32, 0.2);
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 720px) {
  .page-shell {
    width: min(1180px, calc(100% - 2rem));
    padding-top: 1.35rem;
    padding-bottom: 6rem;
  }

  .hero {
    grid-template-columns: 1.45fr 0.85fr;
    align-items: stretch;
  }

  .hero__brand {
    grid-template-columns: minmax(210px, 260px) 1fr;
    align-items: center;
    gap: 1.3rem;
    padding: 1.6rem;
  }

  .hero__logo {
    width: 100%;
    max-width: 250px;
  }

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

  .panel-shell__header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

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

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

  .phone-field__row {
    grid-template-columns: minmax(190px, 240px) 1fr;
    align-items: start;
  }

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

  .terms-actions {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

}

@media (max-width: 420px) {
  .tabs {
    grid-template-columns: 1fr;
  }

  .choice-group__options {
    grid-template-columns: 1fr;
  }

  .redirect-shell__actions {
    flex-direction: column;
  }

  .redirect-shell__button {
    width: 100%;
  }

  .floating-educator-link {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
    padding-inline: 0.95rem;
  }
}
