.extract {
  position: relative;
  overflow: clip;
  color: #16141c;
  background:
    radial-gradient(ellipse 72% 42% at 100% 0%, rgba(226, 210, 255, 0.78), transparent 70%),
    radial-gradient(ellipse 64% 38% at 0% 100%, rgba(236, 214, 255, 0.55), transparent 72%),
    #f7f4fc;
}

.extract__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.extract__ribbon {
  position: absolute;
  display: block;
  overflow: visible;
}

.extract__ribbon--top {
  top: -40px;
  right: -8%;
  width: min(92%, 680px);
  height: 280px;
}

.extract__ribbon--bottom {
  bottom: -56px;
  left: -12%;
  width: min(88%, 640px);
  height: 260px;
}

.extract__ribbon-fill {
  fill: url(#extract-ribbon);
  opacity: 0.8;
}

.extract__ribbon-line {
  fill: none;
  stroke: #cbb8f6;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.7;
}

.extract .shell {
  position: relative;
  z-index: 1;
}

.extract .scene-intro,
.extract__board,
.extract__look {
  width: min(100%, 480px);
  margin-inline: auto;
}

.extract .eyebrow {
  display: none;
}

.extract h2 {
  max-width: none;
  margin: 0;
  color: #16141c;
  font-size: clamp(2rem, 4vw + 1.05rem, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.048em;
  line-height: 1.02;
}

.extract__accent {
  display: block;
  background: linear-gradient(100deg, #6428f5 0%, #7c3aed 48%, #9333ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.extract__lead {
  max-width: 34em;
  margin: 14px 0 0;
  color: #5e5870;
  font-size: 1.05rem;
  line-height: 1.5;
}

.extract__board {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(92, 64, 150, 0.08);
}

.extract__calc,
.extract__result,
.extract__fields,
.extract__field,
.extract__steps,
.extract__step {
  min-width: 0;
}

.extract__calc-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.extract__board.is-open .extract__calc-head {
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
}

.extract__calc-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3edff;
  color: #6d46f5;
}

.extract__calc-icon svg {
  width: 20px;
  height: 20px;
}

.extract__badge {
  justify-self: end;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f0f8;
  color: #8b8498;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.extract__collapse {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #8b8498;
}

.extract__collapse svg {
  width: 16px;
  height: 16px;
}

.extract__collapse:focus-visible,
.extract__opportunity:focus-visible,
.extract__reset:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.extract__calc-icon svg,
.extract__coins svg,
.extract__mark svg,
.extract__point-icon svg,
.extract__chevron,
.extract__join svg {
  width: 22px;
  height: 22px;
}

.extract__calc-title {
  margin: 0;
  color: #16141c;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.extract__calc-kicker {
  margin: 4px 0 0;
  color: #8a8498;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.extract__drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 380ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.extract__board.is-open .extract__drawer {
  grid-template-rows: 1fr;
}

.extract__drawer-inner {
  min-height: 0;
  overflow: hidden;
}

.extract__board.is-open .extract__drawer-inner {
  animation: extract-unclip 380ms linear forwards;
}

@keyframes extract-unclip {
  0%,
  99% { overflow: hidden; }
  100% { overflow: visible; }
}

.extract__fields {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.extract__field {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(6.4rem, 8.2rem);
  column-gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.extract__field-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.extract__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #efe8ff;
  color: #6d46f5;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.extract__field-name {
  color: #1c1824;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.extract__hint {
  display: block;
  margin: 2px 0 0;
  color: #8a8496;
  font-size: 0.82rem;
  line-height: 1.3;
}

.extract__input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #16141c;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.extract__input:focus {
  outline: none;
  background: #f6f3fc;
  box-shadow: var(--focus);
}

.extract__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 2px;
  margin: 14px 0 0;
}

.extract__step {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #6a6478;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.extract__step span {
  color: #16141c;
  font-family: var(--font-display);
  font-weight: 800;
}

.extract__step--total {
  background: transparent;
  color: #5b3fd4;
}

.extract__step--total span {
  color: #5b21e6;
}

.extract__join {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: #b7adc8;
}

.extract__join svg {
  width: 14px;
  height: 14px;
}

.extract__result {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  min-height: 0;
  padding: 22px 16px 20px;
  border-radius: 12px;
  background: linear-gradient(165deg, #3a1d86 0%, #241252 58%, #1a0d3d 100%);
  color: #fff;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.extract__chart {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: 78%;
  height: auto;
  pointer-events: none;
}

.extract__coins,
.extract__result-label,
.extract__figure,
.extract__disclaimer {
  position: relative;
  z-index: 1;
}

.extract__coins {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #efe7ff;
}

.extract__result-label {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.extract__figure {
  margin: 0;
  max-width: 100%;
  color: #fff;
  font-size: clamp(2.45rem, 10vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.extract__disclaimer,
.extract__mix {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.4;
}

.extract__mix {
  max-width: 18em;
}

.extract__opportunity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 22px rgba(109, 40, 217, 0.28);
}

.extract__fine {
  margin: 10px 0 0;
  color: #8d879c;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.extract__reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 14px;
  background: #f3f1f7;
  color: #6e687c;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.extract__reset svg {
  width: 18px;
  height: 18px;
}

.extract__board.is-open .extract__opportunity,
.extract__board.is-open .extract__fine--preview,
.extract__board.is-open .extract__mix {
  display: none;
}

.extract__warning {
  max-width: 46rem;
  margin: 22px auto 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f6f1ff;
  color: #3c3948;
  font-size: 0.98rem;
  line-height: 1.5;
}

.extract__warning strong {
  color: #16141c;
  font-weight: 700;
}

.extract__action {
  display: grid;
  justify-items: center;
  margin-top: 26px;
  text-align: center;
}

.extract__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 14px 26px;
  border-radius: 999px;
  background: #6e2cf5;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(110, 44, 245, 0.28);
}

.extract__cta-note {
  max-width: 28em;
  margin: 12px 0 0;
  color: #6f687c;
  font-size: 0.98rem;
  line-height: 1.45;
}

.extract__look {
  margin-top: 34px;
}

.extract__where {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  color: #8b849c;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.extract__where::before,
.extract__where::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3dced;
}

.extract__list {
  display: grid;
  gap: 12px;
}

.extract__item {
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(80, 40, 140, 0.05);
}

.extract__toggle {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 16px;
  color: inherit;
  text-align: left;
}

.extract__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3edff;
  color: #6d46f5;
}

.extract__name {
  display: block;
  color: #16141c;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.extract__summary {
  display: block;
  margin-top: 3px;
  color: #6f687c;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.extract__chevron {
  color: #8b849c;
  transition: transform 280ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.extract__item.is-open .extract__chevron {
  transform: rotate(180deg);
}

.extract__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.extract__item.is-open .extract__panel {
  grid-template-rows: 1fr;
}

.extract__panel-inner {
  overflow: hidden;
  min-height: 0;
}

.extract__points {
  display: grid;
  gap: 14px;
  margin: 0 16px 16px;
  padding-top: 14px;
  border-top: 1px solid #efeaf6;
}

.extract__point {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.extract__point-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #6d46f5;
}

.extract__point-icon svg {
  width: 20px;
  height: 20px;
}

.extract__point-icon--leak {
  color: #e2554b;
}

.extract__point h4 {
  margin: 0;
  color: #16141c;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.extract__point p {
  margin: 3px 0 0;
  color: #5e5870;
  font-size: 0.98rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .extract .scene-intro,
  .extract__board,
  .extract__look {
    width: min(100%, 520px);
  }
}

@media (min-width: 768px) {
  .extract__board {
    padding: 22px;
  }

  .extract__figure {
    font-size: 3.15rem;
  }
}

@media (min-width: 1024px) {
  .extract__board {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 22px;
  }

  .extract__result {
    min-height: 0;
    height: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .extract__ribbon--top {
    animation: extract-drift 16s ease-in-out infinite;
  }

  .extract__ribbon--bottom {
    animation: extract-drift 18s ease-in-out infinite reverse;
  }

  .extract__chart {
    animation: extract-drift 14s ease-in-out infinite;
  }
}

@keyframes extract-drift {
  0%,
  100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, 10px, 0); }
}

[data-theme="dark"] .extract {
  color: #f5f0ff;
  background:
    radial-gradient(ellipse 72% 42% at 100% 0%, rgba(92, 54, 170, 0.38), transparent 70%),
    radial-gradient(ellipse 64% 38% at 0% 100%, rgba(120, 50, 150, 0.22), transparent 72%),
    #14101c;
}

[data-theme="dark"] .extract .eyebrow {
  color: #c5b4f0;
}

html[data-theme="dark"] .extract h2,
html[data-theme="dark"] .extract__calc-title,
html[data-theme="dark"] .extract__field-name,
html[data-theme="dark"] .extract__name,
html[data-theme="dark"] .extract__point h4,
html[data-theme="dark"] .extract__step span,
html[data-theme="dark"] .extract__input {
  color: #f7f4fb;
}

[data-theme="dark"] .extract__warning {
  background: rgba(255, 255, 255, 0.05);
  color: #c5bdd4;
}

[data-theme="dark"] .extract__warning strong {
  color: #f7f4fb;
}

[data-theme="dark"] .extract__lead,
[data-theme="dark"] .extract__hint,
[data-theme="dark"] .extract__summary,
[data-theme="dark"] .extract__cta-note,
[data-theme="dark"] .extract__point p,
[data-theme="dark"] .extract__calc-kicker,
[data-theme="dark"] .extract__where {
  color: #c5bdd4;
}

[data-theme="dark"] .extract__board,
[data-theme="dark"] .extract__item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(28, 22, 42, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .extract__drawer,
  .extract__drawer-inner,
  .extract__ribbon--top,
  .extract__ribbon--bottom,
  .extract__chart {
    transition: none;
    animation: none;
  }
}

[data-theme="dark"] .extract__badge {
  background: rgba(255, 255, 255, 0.08);
  color: #c8c0d4;
}

[data-theme="dark"] .extract__collapse,
[data-theme="dark"] .extract__fine,
[data-theme="dark"] .extract__reset {
  color: #c5bdd4;
}

[data-theme="dark"] .extract__reset {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .extract__input {
  border-color: transparent;
  background: transparent;
}

[data-theme="dark"] .extract__input:focus {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .extract__step {
  color: #d9d0ea;
}

[data-theme="dark"] .extract__step--total {
  color: #ddd0ff;
}

[data-theme="dark"] .extract__step--total span {
  color: #efe7ff;
}

[data-theme="dark"] .extract__points,
[data-theme="dark"] .extract__where::before,
[data-theme="dark"] .extract__where::after {
  border-color: rgba(255, 255, 255, 0.1);
  background: transparent;
}

[data-theme="dark"] .extract__where::before,
[data-theme="dark"] .extract__where::after {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .extract__calc-icon,
[data-theme="dark"] .extract__mark,
[data-theme="dark"] .extract__num {
  background: rgba(124, 77, 245, 0.2);
  color: #d7cbff;
}
