/* ── AB Test Calculator — page-specific styles ──────────────────── */
/* Fonts, reset, .container, .btn are already in styles.min.css     */

/* ── Hero (v2: центрированный, с фоновым изображением) ─────────── */
.abc-hero {
  position: relative;
  padding: 7rem 0 6rem;
  background: url('public/images/inner-hero-bg.jpg') center top / cover no-repeat;
  overflow: hidden;
  width: 100%;
  z-index: 1;
}
.abc-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.abc-hero__subtitle {
  display: inline-block;
  margin-top: 7rem;
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1.33;
  background-image: linear-gradient(90deg, #4F4DAD 0%, #8380FF 50.14%, #4F4DAD 100.27%);
  background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}
.abc-hero__title {
  font-size: 4.8rem; font-weight: 700; line-height: 1.2;
  color: #F3F3FF; letter-spacing: -0.03em;
  margin: 2.4rem auto 0; max-width: 77rem;
}
.abc-hero__desc {
  display: inline-block; margin-top: 2.4rem; max-width: 60.5rem;
  color: #8181A3; font-size: 2rem; line-height: 1.4;
  letter-spacing: -0.02em; text-align: center;
}
@media (max-width: 768px) {
  .abc-hero__subtitle { margin-top: 4rem; }
  .abc-hero__title { font-size: 3.2rem; }
  .abc-hero__desc { font-size: 1.7rem; }
}
@media (max-width: 480px) {
  .abc-hero { padding: 4rem 0 2.4rem; }
  .abc-hero__title { font-size: 2.8rem; }
  .abc-hero__desc { font-size: 1.5rem; }
}

/* ── Base font is handled globally via body.font-inter — see style.css.
   The page sets body-class="font-inter" through get_header() args,
   matching the pattern used on page-cases.php / page-blog.php / single.php. */

.eyebrow {
  display: inline-block;
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
  background: linear-gradient(90deg, #4F4DAD 0%, #8380FF 50%, #4F4DAD 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Calc button ──────────────────────────────────────────────────── */
.btn--calc {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(2,162,238,0.15);
  color: rgb(2,162,238);
  border-radius: 0.4rem;
  padding: 0.9rem 1.6rem;
  font-size: 1.4rem; font-weight: 500;
  white-space: nowrap; border: 0; cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: background .2s;
}
.btn--calc:hover { background: rgba(2,162,238,0.28); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.8rem 1.4rem; font-size: 1.3rem; font-weight: 500;
  color: #8181A3;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.8rem;
  transition: all .2s ease;
  font-family: "Inter", sans-serif; cursor: pointer;
}
.btn-ghost:hover { color: #F3F3FF; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }
.btn-ghost:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ── Steps strip ──────────────────────────────────────────────────── */
.steps-strip { padding: 0 0 2.4rem; position: relative; z-index: 1; }
.steps-min {
  list-style: none; margin: 0;
  padding: 2rem 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.step-min {
  display: flex; align-items: flex-start; gap: 1.4rem;
  padding: 0 2.8rem;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.step-min:first-child { padding-left: 0; }
.step-min:last-child { border-right: none; padding-right: 0; }
.step-min__n { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; color: #8380FF; padding-top: 0.3rem; flex-shrink: 0; }
.step-min__body { display: flex; flex-direction: column; gap: 0.3rem; }
.step-min__body strong { font-size: 1.4rem; font-weight: 600; color: #F3F3FF; }
.step-min__body span { font-size: 1.3rem; color: #8181A3; line-height: 1.45; }
@media (max-width: 680px) {
  .steps-min { grid-template-columns: 1fr; padding: 0; }
  .step-min { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 1.6rem 0; }
  .step-min:last-child { border-bottom: none; }
}

/* ── Calculator layout ────────────────────────────────────────────── */
.calc-section { padding: 0 0 7rem; position: relative; z-index: 1; }
.calc-block { margin-bottom: 4rem; }
.calc-block:last-child { margin-bottom: 0; }
.calc-block__head {
  display: flex; align-items: baseline; gap: 1.2rem;
  margin-bottom: 1.6rem; padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.calc-block__title { font-size: 2rem; font-weight: 700; color: #F3F3FF; margin: 0; letter-spacing: -0.02em; }

.calc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem; align-items: start;
}
.calc-col--left { display: grid; gap: 1.2rem; }
@media (max-width: 960px) { .calc-wrap { grid-template-columns: 1fr; } }

.tool-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.6rem; padding: 2.4rem 2.8rem;
}
@media (max-width: 600px) { .tool-card { padding: 2rem 1.8rem; } }

.card-title { font-size: 1.8rem; font-weight: 700; margin: 0 0 2rem; color: #F3F3FF; letter-spacing: -0.01em; }
.card-title small { font-size: 1.2rem; font-weight: 400; color: #8181A3; letter-spacing: 0; margin-left: 0.8rem; }

/* ── Form controls ────────────────────────────────────────────────── */
.params-grid {
  display: grid; grid-template-columns: 2fr 1fr auto;
  gap: 1.2rem; align-items: end;
}
@media (max-width: 900px) { .params-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .params-grid { grid-template-columns: 1fr; } }

.field-label { display: grid; gap: 0.6rem; font-size: 1.3rem; font-weight: 500; color: #8181A3; }
.field-label__txt { display: flex; align-items: center; font-size: inherit; font-weight: inherit; color: inherit; }

.toggle {
  display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.8rem; padding: 0.3rem; gap: 0.3rem; width: 100%;
}
.toggle-btn {
  border: none; background: transparent; color: #8181A3;
  border-radius: 0.6rem; padding: 1rem 1.2rem;
  font-size: 1.4rem; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s; font-family: "Inter", sans-serif; white-space: nowrap;
}
.toggle-btn.active { background: rgba(255,255,255,0.11); color: #F3F3FF; }
.toggle-btn:not(.active):hover { color: #F3F3FF; }

.section select,
.calc-section select,
.section input[type="number"],
.calc-section input[type="number"] {
  width: 100%; border-radius: 0.8rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #F3F3FF;
  padding: 1.1rem 1.4rem; font-size: 1.4rem;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  transition: border-color .2s; -webkit-appearance: none; appearance: none;
  height: auto;
}
.section select,
.calc-section select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238181A3' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.2rem center; padding-right: 3.2rem;
}
.section select:focus,
.calc-section select:focus,
.section input[type="number"]:focus,
.calc-section input[type="number"]:focus { outline: none; border-color: rgba(131,128,255,0.5); }
.section select option,
.calc-section select option { background: #0f1020; }

/* ── Table ────────────────────────────────────────────────────────── */
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.section-head .card-title { margin: 0; }
.row-actions { display: flex; gap: 0.8rem; align-items: center; }
.variant-counter {
  font-size: 1.2rem; color: #8181A3; letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem; border-radius: 0.6rem;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  margin-right: 0.4rem;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calc-section table { width: 100%; border-collapse: collapse; font-family: "Inter", sans-serif; }
.calc-section th {
  padding: 0.8rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #8181A3; white-space: nowrap;
}
.variants-col-name   { width: 22%; }
.variants-col-visits { width: 34%; }
.variants-col-conv   { width: 34%; }
.variants-col-cr     { width: 10%; }
.calc-section td { padding: 0.8rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 1.4rem; }
.calc-section tbody tr:last-child td { border-bottom: none; }
.variant-label { font-weight: 600; color: #F3F3FF; white-space: nowrap; }
.readonly-rate { color: #8380FF; font-weight: 600; }
.calc-section td input[type="number"] { padding: 0.8rem 1rem; font-size: 1.4rem; }
.hint { margin: 1.4rem 0 0; font-size: 1.2rem; color: #8181A3; }

/* ── Results ──────────────────────────────────────────────────────── */
.res-meta-row {
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  font-size: 1.3rem; padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 1.8rem;
}
.res-meta-row span { font-size: 13px; }
.res-meta__k { color: #8181A3; margin-right: 0.5rem; }
.res-meta__item { color: #F3F3FF; }
.res-meta__dot { color: rgba(255,255,255,0.18); }

.res-group { margin-bottom: 1.4rem; }
.res-group__label { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8181A3; margin-bottom: 0.8rem; }

.res-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.7rem; }
.res-stat { padding: 1rem 1.2rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 0.8rem; }
.res-stat__label { font-size: 1.05rem; color: #8181A3; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-stat__value { font-size: 1.65rem; font-weight: 700; color: #F3F3FF; margin-top: 0.3rem; line-height: 1.2; }
.res-stat.good .res-stat__value { color: #34d399; }
.res-stat.warn .res-stat__value { color: #f59e0b; }

.res-verdicts { display: grid; gap: 0.7rem; margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.07); }
.res-verdict {
  display: flex; align-items: center; gap: 1.6rem;
  padding: 1.4rem 1.8rem; border-radius: 0.8rem;
  border-left: 3px solid #34d399; background: rgba(52,211,153,0.07); flex-wrap: wrap;
}
.res-verdict.warn { border-left-color: #f59e0b; background: rgba(245,158,11,0.07); }
.res-verdict.bad  { border-left-color: #ef4444; background: rgba(239,68,68,0.07); }
.res-verdict__label { font-size: 1.2rem; color: #8181A3; white-space: nowrap; }
.res-verdict__value { font-size: 1.65rem; font-weight: 700; }
.res-verdict.good .res-verdict__value { color: #34d399; }
.res-verdict.warn .res-verdict__value { color: #f59e0b; }
.res-verdict.bad  .res-verdict__value { color: #ef4444; }

.res-warnings { margin-top: 1.2rem; display: grid; gap: 0.6rem; }
.res-warning {
  padding: 1rem 1.4rem; border-radius: 0.8rem;
  border: 1px solid rgba(245,158,11,0.2); background: rgba(245,158,11,0.05);
  font-size: 1.2rem; color: #f59e0b; line-height: 1.5;
}
.res-warning strong { font-weight: 600; }

/* ── Sample size ──────────────────────────────────────────────────── */
.ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 560px) { .ss-grid { grid-template-columns: 1fr; } }
.ss-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.7rem; }
.ss-results:empty { display: none; }

/* ── Content sections ─────────────────────────────────────────────── */
.section { padding: 7rem 0; position: relative; z-index: 1; }
.section__h { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 4rem; flex-wrap: wrap; }
.section__h .eyebrow { display: block; margin-bottom: 1rem; }
.section__h h2 { font-size: clamp(2.6rem, 3.2vw, 3.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; margin: 0; color: #F3F3FF; }
.section__more {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: #8380FF; font-size: 1.4rem; font-weight: 500;
  white-space: nowrap; text-decoration: none; transition: color .2s;
}
.section__more:hover { color: #B0B0FF; }
.section__more svg { flex-shrink: 0; transition: transform .2s; }
.section__more:hover svg { transform: translateX(3px); }

/* ── Approach cards ───────────────────────────────────────────────── */
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5.6rem; }
@media (max-width: 680px) { .approach-grid { grid-template-columns: 1fr; gap: 4rem; } }
.approach-card { padding: 2.8rem 0 0; border-top: 2px solid rgba(131,128,255,0.4); }
.approach-card--bayesian { border-top-color: rgba(52,211,153,0.45); }
.approach-label { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8181A3; margin: 0 0 1.2rem; }
.approach-card--bayesian .approach-label { color: rgba(110,231,183,0.65); }
.approach-card h3 { font-size: 2rem; font-weight: 700; margin: 0 0 2rem; color: #F3F3FF; }
.approach-list { list-style: none; padding: 0; margin: 0 0 2.8rem; display: grid; gap: 1.1rem; }
.approach-list li { font-size: 1.4rem; line-height: 1.55; color: #8181A3; padding-left: 1.8rem; position: relative; }
.approach-list li::before { content: "—"; position: absolute; left: 0; color: rgba(131,128,255,0.35); }
.approach-best { font-size: 1.3rem; line-height: 1.5; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1.8rem; margin: 0; color: #F3F3FF; }
.approach-best strong { color: #8380FF; }

/* ── FAQ ──────────────────────────────────────────────────────────── */
.faq-accordion { border: 1px solid rgba(255,255,255,0.08); border-radius: 1.6rem; overflow: hidden; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.07); }
.faq-item:last-child { border-bottom: none; }
.faq-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 2.2rem 2.8rem; background: transparent; color: #F3F3FF;
  font-size: 1.55rem; font-weight: 600; text-align: left; cursor: pointer; border: none;
  transition: color .2s, background .2s; font-family: "Inter", sans-serif; gap: 2rem;
}
.faq-trigger:hover, .faq-item.is-open .faq-trigger { color: #8380FF; background: rgba(131,128,255,0.04); }
.faq-icon { width: 2rem; height: 2rem; flex-shrink: 0; position: relative; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.faq-icon::before { width: 1.2rem; height: 1.5px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-icon::after  { width: 1.5px; height: 1.2rem; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-body { max-height: 0; overflow: hidden; transition: max-height .32s ease, padding .32s ease; padding: 0 2.8rem; }
.faq-item.is-open .faq-body { max-height: 40rem; padding: 0 2.8rem 2.4rem; }
.faq-body p { margin: 0; font-size: 1.4rem; line-height: 1.75; color: #8181A3; }
.faq-body p strong { color: #F3F3FF; }
@media (max-width: 600px) {
  .faq-trigger { padding: 1.8rem 2rem; font-size: 1.45rem; }
  .faq-body, .faq-item.is-open .faq-body { padding: 0 2rem; }
  .faq-item.is-open .faq-body { padding: 0 2rem 2rem; }
}

/* ── Methodology refs ─────────────────────────────────────────────── */
.refs-list { display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,0.07); }
.ref-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 2rem; padding: 1.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none; transition: color .2s;
}
.ref-body { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.ref-title { font-size: 1.5rem; font-weight: 600; color: #F3F3FF; transition: color .2s; }
.ref-item:hover .ref-title { color: #8380FF; }
.ref-meta { font-size: 1.2rem; color: #8181A3; }
.ref-arrow { font-size: 1.6rem; color: #8181A3; flex-shrink: 0; transition: color .2s, transform .2s; }
.ref-item:hover .ref-arrow { color: #8380FF; transform: translateX(3px); }

/* ── CTA band ─────────────────────────────────────────────────────── */
.cta-band { background: rgba(131,128,255,0.06); border-top: 1px solid rgba(131,128,255,0.18); border-bottom: 1px solid rgba(131,128,255,0.18); padding: 6rem 0; position: relative; z-index: 1; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 4rem; flex-wrap: wrap; }
.cta-band__copy .eyebrow { margin-bottom: 1.2rem; }
.cta-band__copy h2 { font-size: clamp(2.2rem, 2.8vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1rem; color: #F3F3FF; }
.cta-band__copy p { font-size: 1.5rem; line-height: 1.6; color: #8181A3; margin: 0; max-width: 52rem; }
@media (max-width: 680px) { .cta-band__inner { flex-direction: column; align-items: flex-start; gap: 2.4rem; } }

/* ── Tooltip ──────────────────────────────────────────────────────── */
.tt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 1px solid rgba(131,128,255,0.35); color: #8181A3;
  background: transparent;
  padding: 0;
  font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: help;
  margin-left: 0.4rem; vertical-align: middle; line-height: 1;
  flex-shrink: 0; transition: border-color .2s, color .2s, box-shadow .2s;
  user-select: none;
}
.tt:hover { border-color: rgba(131,128,255,0.7); color: #8380FF; }
.tt:focus-visible {
  outline: none;
  border-color: rgba(131,128,255,0.9); color: #8380FF;
  box-shadow: 0 0 0 3px rgba(131,128,255,0.25);
}

.global-tooltip {
  position: fixed; z-index: 2147483000; background: #14142a;
  border: 1px solid rgba(255,255,255,0.12); color: #C8C8E8;
  font-size: 1.2rem; font-weight: 400; font-family: "Inter", sans-serif;
  line-height: 1.55; border-radius: 0.8rem; padding: 0.9rem 1.2rem;
  max-width: 24rem; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(-100%);
  transition: opacity .15s, visibility .15s; white-space: normal;
}
.global-tooltip.global-tooltip--below {
  transform: translateX(-50%) translateY(0);
}
.global-tooltip.is-visible { opacity: 1; visibility: visible; }
