.calculator-page {
  background: #f6f7fb;
}
.calculator-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 120, 74, .3), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(108, 76, 245, .2), transparent 25%),
    #11101b;
}
.calculator-hero::after {
  position: absolute;
  top: -240px;
  right: -180px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.calculator-hero .container { position: relative; z-index: 1; }
.calculator-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 2rem;
  color: rgba(255,255,255,.66);
  font-weight: 700;
  text-decoration: none;
}
.calculator-back:hover { color: #fff; }
.calculator-hero__content {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1.35rem;
  align-items: start;
  max-width: 970px;
}
.calculator-hero__icon {
  display: grid;
  width: 76px;
  height: 76px;
  color: #fff;
  background: linear-gradient(135deg, #ee4d2d, #ff7b4d);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(238,77,45,.24);
  font-size: 1.8rem;
  place-items: center;
}
.calculator-hero .kicker { color: #ffc2b4; }
.calculator-hero h1 {
  max-width: 900px;
  margin: 0 0 .85rem;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
}
.calculator-hero__content p {
  max-width: 800px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 1.08rem;
}
.calculator-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0 0 98px;
}
.calculator-trust span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.calculator-trust i { color: #72e8bb; }
.calculator-workspace { padding-top: 56px; }
.calculator-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin-bottom: 1.5rem;
}
.calculator-switcher a {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.1rem;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  transition: .2s ease;
}
.calculator-switcher a:hover { border-color: #ef9a86; transform: translateY(-2px); }
.calculator-switcher a.active { color: #c8371d; background: #fff2ed; border-color: #f2b09f; }
.calculator-switcher i { font-size: 1.05rem; }
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 1.5rem;
  align-items: start;
}
.calculator-layout--order { grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.calculator-form,
.calculator-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 42px rgba(16,24,40,.07);
}
.calculator-form { padding: 1.7rem; }
.calculator-result {
  position: sticky;
  top: 106px;
  overflow: hidden;
  min-height: 440px;
}
.calculator-panel-heading {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.calculator-panel-heading > span {
  display: grid;
  flex: 0 0 48px;
  height: 48px;
  color: #d44023;
  background: #fff0eb;
  border-radius: 14px;
  place-items: center;
}
.calculator-panel-heading h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.calculator-panel-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.calculator-fields { display: grid; gap: 1rem; }
.calculator-fields--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculator-field { display: grid; gap: .45rem; min-width: 0; }
.calculator-field > span { color: #344054; font-size: .82rem; font-weight: 800; }
.calculator-field b { color: #e23d22; }
.calculator-field input,
.calculator-field select {
  width: 100%;
  min-height: 47px;
  padding: .68rem .8rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d9dde5;
  border-radius: 11px;
  outline: 0;
}
.calculator-field input:focus,
.calculator-field select:focus {
  border-color: #ee765e;
  box-shadow: 0 0 0 3px rgba(238,77,45,.12);
}
.input-prefix,
.input-suffix { position: relative; }
.input-prefix > span,
.input-suffix > span {
  position: absolute;
  top: 50%;
  color: #7b8493;
  font-size: .82rem;
  font-weight: 800;
  transform: translateY(-50%);
}
.input-prefix > span { left: .8rem; }
.input-prefix input { padding-left: 2.45rem; }
.input-suffix > span { right: .8rem; }
.input-suffix input { padding-right: 2.25rem; }
.calculator-field--conditional { display: none; }
.calculator-field--conditional.is-visible { display: grid; }
.calculator-help {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem;
  margin-top: 1rem;
  color: #254c90;
  background: #eef5ff;
  border: 1px solid #c9ddff;
  border-radius: 12px;
  font-size: .82rem;
}
.calculator-help i { flex: 0 0 auto; color: #f2a900; }
.calculator-help p { margin: 0; }
.calculator-error { display: none; margin: 1rem 0 0; color: #b42318; font-size: .84rem; font-weight: 700; }
.calculator-error.is-visible { display: block; }
.calculator-submit,
.calculator-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  min-height: 50px;
  padding: .75rem 1rem;
  border-radius: 12px;
  font-weight: 800;
}
.calculator-submit {
  margin-top: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #ee4d2d, #dd3518);
  border: 0;
  box-shadow: 0 12px 24px rgba(238,77,45,.2);
}
.calculator-submit:hover { background: #cd3116; }
.calculator-empty {
  display: grid;
  min-height: 440px;
  padding: 2.5rem;
  text-align: center;
  place-content: center;
}
.calculator-empty > i {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.15rem;
  color: #abb2bd;
  background: #f2f4f7;
  border-radius: 20px;
  font-size: 1.8rem;
  place-items: center;
}
.calculator-empty h2 { font-size: 1.35rem; }
.calculator-empty p { max-width: 400px; margin: 0; color: var(--muted); }
.result-content { padding: 1.6rem; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.result-heading h2 { margin: 0; font-size: 1.3rem; }
.result-badge { padding: .4rem .65rem; color: #12663d; background: #e9f8ef; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.result-badge.is-negative { color: #9f2616; background: #fff0ed; }
.result-highlight {
  padding: 1.35rem;
  margin-bottom: 1rem;
  color: #fff;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 32%), linear-gradient(135deg, #27175f, #111a45);
  border-radius: 18px;
}
.result-highlight small { color: rgba(255,255,255,.64); font-weight: 700; }
.result-highlight strong { display: block; margin: .25rem 0; color: #fff; font-family: var(--font-title); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.result-highlight span { color: rgba(255,255,255,.7); font-size: .8rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin-bottom: 1rem; }
.result-stat { padding: .85rem; background: #f7f8fb; border: 1px solid #eceef2; border-radius: 12px; }
.result-stat span { display: block; color: var(--muted); font-size: .72rem; }
.result-stat strong { display: block; margin-top: .15rem; font-family: var(--font-title); font-size: 1rem; }
.result-stat strong.positive { color: #128052; }
.result-stat strong.negative { color: #c43a22; }
.result-table { width: 100%; margin: .5rem 0 0; border-collapse: collapse; font-size: .8rem; }
.result-table caption { padding: .8rem 0 .55rem; color: var(--ink); font-family: var(--font-title); font-weight: 800; text-align: left; }
.result-table th,
.result-table td { padding: .65rem .25rem; border-bottom: 1px solid #eceef2; }
.result-table th { color: var(--muted); font-weight: 600; text-align: left; }
.result-table td { font-weight: 800; text-align: right; }
.result-table tr:last-child th,
.result-table tr:last-child td { border: 0; }
.result-note { display: flex; gap: .6rem; padding: .8rem; margin-top: 1rem; color: #625a67; background: #fff8f5; border: 1px solid #f1d9d1; border-radius: 11px; font-size: .76rem; }
.result-note i { color: #dc3c1f; }
.roas-scale { display: grid; gap: .55rem; margin-top: 1rem; }
.roas-scale div { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .75rem; background: #f7f8fb; border-radius: 10px; font-size: .78rem; }
.roas-scale i { margin-top: .1rem; }
.roas-scale .profit i { color: #19a568; }
.roas-scale .break-even i { color: #d49300; }
.roas-scale .loss i { color: #d8432a; }
.order-items { display: grid; gap: .8rem; }
.order-item { padding: 1rem; background: #f9fafb; border: 1px solid #e5e8ed; border-radius: 15px; }
.order-item__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.order-item__heading strong { font-family: var(--font-title); font-size: .9rem; }
.order-item__heading button { display: grid; width: 34px; height: 34px; padding: 0; color: #b53b25; background: #fff0ed; border: 0; border-radius: 9px; place-items: center; }
.order-item__heading button:disabled { opacity: .35; cursor: not-allowed; }
.calculator-fields--item { grid-template-columns: minmax(0, 1fr) 110px; }
.order-item small { display: block; margin-top: .65rem; color: var(--muted); font-size: .7rem; }
.calculator-add { margin-top: .8rem; color: #b7351e; background: #fff; border: 1px dashed #e99b89; }
.order-subtotal { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; margin: 1rem 0 1.3rem; color: #a4321d; background: #fff0eb; border-radius: 12px; font-weight: 800; }
.order-options { padding-top: 1.2rem; border-top: 1px solid var(--line); }
.calculator-disclaimer { display: flex; align-items: flex-start; gap: .8rem; max-width: 900px; padding: 1rem 1.15rem; margin: 1.5rem auto 0; color: #625a67; background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: .8rem; }
.calculator-disclaimer > i { color: #d74428; }
.calculator-disclaimer strong { display: block; color: var(--ink); }
.calculator-disclaimer p { margin: .15rem 0 0; }
.calculator-faq { background: #fff; }
.calculator-faq .section-heading { margin-right: auto; margin-left: auto; text-align: center; }
.calculator-faq .section-heading .kicker::before { display: none; }
@media (max-width: 1199.98px) {
  .calculator-layout,
  .calculator-layout--order { grid-template-columns: 1fr; }
  .calculator-result { position: static; min-height: 360px; }
  .calculator-empty { min-height: 360px; }
}
@media (max-width: 767.98px) {
  .calculator-hero { padding: 42px 0 36px; }
  .calculator-back { margin-bottom: 1.4rem; }
  .calculator-hero__content { grid-template-columns: 1fr; }
  .calculator-hero__icon { width: 60px; height: 60px; border-radius: 17px; font-size: 1.4rem; }
  .calculator-hero h1 { font-size: clamp(2.15rem, 11vw, 3.25rem); }
  .calculator-trust { margin-left: 0; }
  .calculator-trust span { width: 100%; border-radius: 12px; }
  .calculator-switcher { grid-template-columns: 1fr; }
  .calculator-switcher a { padding: .8rem .9rem; }
  .calculator-form,
  .result-content { padding: 1.2rem; }
  .calculator-fields--two { grid-template-columns: 1fr; }
  .calculator-fields--item { grid-template-columns: 1fr 92px; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .calculator-switcher a { transition: none; }
}
