.nw-calculator {
  --nw-calculator-ink: #1b1b1a;
  --nw-calculator-muted: #686660;
  --nw-calculator-ivory: #f4f2ed;
  --nw-calculator-paper: #faf9f6;
  --nw-calculator-gold: #8b7655;
  --nw-calculator-line: #d8d5ce;
  --nw-calculator-result: #1b1b1a;
  --nw-calculator-result-text: #ffffff;
  width: 100%;
  color: var(--nw-calculator-ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.nw-calculator__stage {
  max-width: 1120px;
  min-height: 530px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 90px;
}

.nw-calculator__orbit {
  width: 380px;
  height: 380px;
  position: relative;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(139, 118, 85, 0.08), transparent 56%);
}

.nw-calculator__orbit::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 8%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 45px color-mix(in srgb, var(--nw-calculator-ink) 3%, transparent);
}

.nw-calculator__orbit-line {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 20%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.nw-calculator__orbit-line--outer {
  inset: 20px;
}

.nw-calculator__orbit-line--inner {
  inset: 63px;
  border-color: color-mix(in srgb, var(--nw-calculator-ink) 16%, transparent);
  border-style: dashed;
  transform: rotate(-8deg);
}

.nw-calculator__orbit-line--equator {
  inset: 102px -16px;
  border-color: color-mix(in srgb, var(--nw-calculator-gold) 48%, transparent);
  transform: rotate(-12deg);
}

.nw-calculator__orbit-line--tilt {
  inset: 32px 89px;
  border-color: color-mix(in srgb, var(--nw-calculator-ink) 13%, transparent);
  transform: rotate(36deg);
}

.nw-calculator__orbit-number {
  width: 28px;
  height: 28px;
  position: absolute;
  left: calc(50% - 14px);
  top: calc(50% - 14px);
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #55534e;
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 13px;
}

.nw-calculator__orbit-number:nth-of-type(7) {
  color: var(--nw-calculator-gold);
  font-size: 22px;
}

.nw-calculator__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nw-calculator__stars i {
  position: absolute;
  color: var(--nw-calculator-gold);
  font-style: normal;
  line-height: 1;
}

.nw-calculator__stars i:first-child {
  top: 18px;
  left: 84px;
  font-size: 16px;
}

.nw-calculator__stars i:nth-child(2) {
  top: 85px;
  right: 18px;
  font-size: 21px;
}

.nw-calculator__stars i:nth-child(3) {
  right: 88px;
  bottom: 36px;
  font-size: 11px;
}

.nw-calculator__stars i:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 18px;
  bottom: 78px;
  border-radius: 50%;
  background: var(--nw-calculator-ink);
}

.nw-calculator__orbit-center {
  position: absolute;
  inset: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 10%, transparent);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 55px color-mix(in srgb, var(--nw-calculator-ink) 8%, transparent);
  backdrop-filter: blur(10px);
}

.nw-calculator__orbit-center small {
  color: var(--nw-calculator-muted);
  font-size: 7px;
  letter-spacing: 0.22em;
}

.nw-calculator__eye {
  width: 126px;
  height: 66px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 9px 0;
}

.nw-calculator__eye::before {
  content: "";
  width: 82px;
  height: 82px;
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 58%, transparent);
  border-radius: 100% 0 100% 0;
  transform: rotate(45deg);
}

.nw-calculator__eye::after {
  content: "";
  width: 42px;
  height: 42px;
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-gold) 65%, transparent);
  border-radius: 50%;
}

.nw-calculator__eye strong {
  position: relative;
  z-index: 1;
  color: var(--nw-calculator-ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
}

.nw-calculator__form {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 16%, transparent);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), color-mix(in srgb, var(--nw-calculator-ivory) 58%, transparent));
  box-shadow: 0 18px 45px color-mix(in srgb, var(--nw-calculator-ink) 5%, transparent);
}

.nw-calculator__form::before {
  content: "";
  width: 82px;
  height: 2px;
  position: absolute;
  left: 36px;
  top: -1px;
  background: var(--nw-calculator-gold);
}

.nw-calculator__form > :not(.nw-calculator__form-celestial) {
  position: relative;
  z-index: 1;
}

.nw-calculator__form-celestial {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.nw-calculator__form-celestial i {
  position: absolute;
  display: block;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-gold) 14%, transparent);
  border-radius: 50%;
}

.nw-calculator__form-celestial i:first-child {
  width: 270px;
  height: 270px;
  right: -176px;
  top: -165px;
}

.nw-calculator__form-celestial i:nth-child(2) {
  width: 350px;
  height: 112px;
  right: -212px;
  top: 18px;
  transform: rotate(28deg);
  border-color: color-mix(in srgb, var(--nw-calculator-ink) 8%, transparent);
}

.nw-calculator__form-celestial span {
  position: absolute;
  right: 34px;
  top: 82px;
  color: color-mix(in srgb, var(--nw-calculator-gold) 50%, transparent);
  font-size: 12px;
}

.nw-calculator__form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 25px;
  border-bottom: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 13%, transparent);
}

.nw-calculator__form-kicker {
  margin: 0 0 10px;
  color: var(--nw-calculator-gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.nw-calculator__form-title {
  margin: 0;
  color: var(--nw-calculator-ink);
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.nw-calculator__form-heading > span {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 15%, transparent);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--nw-calculator-muted);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.nw-calculator__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 26px 0;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 16%, transparent);
  background: rgba(255, 255, 255, 0.56);
}

.nw-calculator__field {
  min-width: 0;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px 18px;
  border-right: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 13%, transparent);
  transition: background 0.25s, box-shadow 0.25s;
}

.nw-calculator__field:last-child {
  border-right: 0;
}

.nw-calculator__field:focus-within {
  background: color-mix(in srgb, var(--nw-calculator-ivory) 80%, transparent);
  box-shadow: inset 0 -2px var(--nw-calculator-gold);
}

.nw-calculator__field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nw-calculator__field-heading > span {
  color: var(--nw-calculator-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.nw-calculator__field-heading i {
  color: var(--nw-calculator-gold);
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 12px;
  font-style: normal;
}

.nw-calculator__select {
  width: 100%;
  height: 72px;
  appearance: none;
  border: 0;
  outline: 0;
  background-color: transparent;
  color: var(--nw-calculator-ink);
  cursor: pointer;
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 29px;
  background-image: linear-gradient(45deg, transparent 50%, var(--nw-calculator-muted) 50%), linear-gradient(135deg, var(--nw-calculator-muted) 50%, transparent 50%);
  background-position: calc(100% - 5px) calc(50% + 3px), 100% calc(50% + 3px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.nw-calculator__form-action {
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--nw-calculator-ink) 13%, transparent);
}

.nw-calculator__privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--nw-calculator-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.nw-calculator__privacy span {
  color: var(--nw-calculator-gold);
  font-size: 5px;
}

.nw-calculator__submit {
  width: 100%;
  height: 66px;
  margin-top: 15px;
  padding: 0 18px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--nw-calculator-ink);
  border-radius: 0;
  background: var(--nw-calculator-ink);
  color: #ffffff;
  cursor: pointer;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}

.nw-calculator__submit:hover,
.nw-calculator__submit:focus-visible {
  background: transparent;
  color: var(--nw-calculator-ink);
}

.nw-calculator__submit span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  font-size: 15px;
}

.nw-calculator__submit:hover span,
.nw-calculator__submit:focus-visible span {
  border-color: var(--nw-calculator-ink);
}

.nw-calculator__result {
  max-width: 1080px;
  height: 0;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
  opacity: 0;
  background: var(--nw-calculator-result);
  color: var(--nw-calculator-result-text);
  transform: translateY(28px);
  transition: opacity 0.7s, transform 0.7s, min-height 0.7s, margin-top 0.7s;
}

.nw-calculator__result.is-visible {
  height: auto;
  min-height: 430px;
  margin-top: 42px;
  opacity: 1;
  transform: translateY(0);
}

.nw-calculator__result-number {
  display: grid;
  place-items: center;
  position: relative;
  background: color-mix(in srgb, var(--nw-calculator-result) 92%, #ffffff 8%);
}

.nw-calculator__result-number::before,
.nw-calculator__result-number::after {
  content: "";
  width: 230px;
  height: 230px;
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--nw-calculator-result-text) 18%, transparent);
  border-radius: 50%;
}

.nw-calculator__result-number::after {
  width: 175px;
  height: 175px;
  border-style: dashed;
}

.nw-calculator__result-number span {
  z-index: 1;
  color: color-mix(in srgb, var(--nw-calculator-gold) 72%, #ffffff 28%);
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 170px;
  line-height: 1;
}

.nw-calculator__result-copy {
  padding: 74px 72px;
  border-left: 1px solid color-mix(in srgb, var(--nw-calculator-result-text) 13%, transparent);
}

.nw-calculator__result-kicker {
  margin: 0 0 20px;
  color: color-mix(in srgb, var(--nw-calculator-gold) 72%, #ffffff 28%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.nw-calculator__result-name {
  margin: 0;
  color: var(--nw-calculator-result-text);
  font-family: Baskerville, "Iowan Old Style", "Times New Roman", serif;
  font-size: 54px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.nw-calculator__result-traits {
  margin: 12px 0 26px;
  color: color-mix(in srgb, var(--nw-calculator-gold) 72%, #ffffff 28%);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.nw-calculator__result-description {
  max-width: 500px;
  margin: 0;
  color: color-mix(in srgb, var(--nw-calculator-result-text) 58%, transparent);
  font-size: 16px;
  line-height: 1.7;
}

.nw-calculator__result-actions {
  display: flex;
  gap: 38px;
  margin-top: 34px;
}

.nw-calculator__result-actions a {
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--nw-calculator-result-text) 35%, transparent);
  color: var(--nw-calculator-result-text);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .nw-calculator__stage {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .nw-calculator__form {
    width: 100%;
    max-width: 580px;
    margin: auto;
  }
}

@media (max-width: 680px) {
  .nw-calculator__stage {
    min-height: 0;
  }

  .nw-calculator__orbit {
    width: 320px;
    height: 320px;
  }

  .nw-calculator__orbit-number {
    display: none;
  }

  .nw-calculator__orbit-center {
    inset: 72px;
  }

  .nw-calculator__orbit-line--outer {
    inset: 10px;
  }

  .nw-calculator__orbit-line--inner {
    inset: 44px;
  }

  .nw-calculator__form {
    padding: 26px 18px;
  }

  .nw-calculator__form::before {
    left: 18px;
    width: 68px;
  }

  .nw-calculator__form-celestial i:first-child {
    right: -205px;
  }

  .nw-calculator__form-celestial i:nth-child(2) {
    right: -245px;
  }

  .nw-calculator__form-celestial span {
    right: 20px;
    top: 74px;
  }

  .nw-calculator__form-title {
    font-size: 27px;
  }

  .nw-calculator__fields {
    margin: 22px 0;
  }

  .nw-calculator__field {
    min-height: 122px;
    padding: 12px 10px;
  }

  .nw-calculator__field-heading > span {
    font-size: 9px;
  }

  .nw-calculator__field-heading i {
    font-size: 10px;
  }

  .nw-calculator__select {
    height: 62px;
    font-size: 23px;
  }

  .nw-calculator__result,
  .nw-calculator__result.is-visible {
    grid-template-columns: 1fr;
  }

  .nw-calculator__result-number {
    min-height: 260px;
  }

  .nw-calculator__result-number span {
    font-size: 120px;
  }

  .nw-calculator__result-number::before {
    width: 180px;
    height: 180px;
  }

  .nw-calculator__result-number::after {
    width: 135px;
    height: 135px;
  }

  .nw-calculator__result-copy {
    padding: 48px 28px;
    border-top: 1px solid color-mix(in srgb, var(--nw-calculator-result-text) 13%, transparent);
    border-left: 0;
  }

  .nw-calculator__result-name {
    font-size: 42px;
  }

  .nw-calculator__result-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nw-calculator__result,
  .nw-calculator__submit {
    transition: none;
  }
}
