/* BY calculator — page container (global .container is display:contents) */
body.page-calculator .content-area > .container {
  display: block !important;
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.25rem 4.5rem;
  box-sizing: border-box;
}
body.page-calculator .ec-floating-left-stack {
  display: none;
}

.ecb {
  --ecb-yellow: var(--ec-yellow, #ffb700);
  --ecb-ink: #111;
  --ecb-muted: #6b6b6b;
  --ecb-line: rgba(0,0,0,.08);
  --ecb-card: #111;
  --ecb-radius: 16px;
  color: #111;
  padding: 0;
  font-family: var(--ec-font, Inter, system-ui, sans-serif);
}
.ecb *,
.ecb *::before,
.ecb *::after { box-sizing: border-box; }

.ec-single-calc .ecb { padding: 0; max-width: none; }

.ecb-intro {
  margin: 0 0 24px;
  border-left: 4px solid var(--ecb-yellow);
  padding-left: 16px;
}
.ecb-intro h1,
.ecb-intro h2 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.ecb-intro h1 span,
.ecb-intro h2 span { color: var(--ecb-yellow); }
.ecb-intro p { margin: 0; color: var(--ecb-muted); font-size: 16px; line-height: 1.45; }

.ecb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 24px;
  align-items: start;
}
.ecb-main,
.ecb-side { min-width: 0; }

.ecb-mode {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: #f4f4f5;
  padding: 4px;
  border-radius: 12px;
}
.ecb-mode button {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  min-height: 44px;
  cursor: pointer;
  color: #52525b;
}
.ecb-mode button.is-on {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.ecb-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--ecb-line);
  border-radius: var(--ecb-radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, .04);
}
.ecb-price button {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--ecb-yellow);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  color: #111;
}
.ecb-price button:hover { filter: brightness(.96); }
.ecb-price .ecb-price-field { flex: 1; min-width: 0; text-align: center; }
.ecb-price label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ecb-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ecb-price input {
  border: 0;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  width: 100%;
  background: transparent;
  color: #111;
  outline: none;
}

.ecb-acc {
  background: #fff;
  border: 1px solid var(--ecb-line);
  border-radius: var(--ecb-radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(17, 17, 17, .04);
}
.ecb-acc:last-child { margin-bottom: 0; }
.ecb-acc-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
}
.ecb-acc-h strong { font-size: 16px; }
.ecb-acc-h em {
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  font-size: 14px;
}
.ecb-acc-b { display: none; padding: 0 18px 18px; }
.ecb-acc.is-open .ecb-acc-b { display: block; }

.ecb-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.ecb-row:last-child { margin-bottom: 0; }
.ecb-row label { font-size: 13px; color: var(--ecb-muted); font-weight: 600; }
.ecb-row select,
.ecb-row input[type="text"],
.ecb-row input[type="number"] {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--ecb-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fafafa;
  color: #111;
}
.ecb-row select:focus,
.ecb-row input:focus {
  outline: 2px solid rgba(245,183,0,.45);
  border-color: var(--ecb-yellow);
}

.ecb-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ecb-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ecb-line);
  border-radius: 12px;
  cursor: pointer;
  background: #fafafa;
}
.ecb-check span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.ecb-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.ecb-check::after {
  content: '';
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: #e4e4e7;
  background-image: radial-gradient(circle at 12px 12px, #fff 9px, transparent 10px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  transition: background-color .15s ease;
}
.ecb-check:has(input:checked),
.ecb-check.is-on {
  border-color: var(--ecb-yellow);
  background: rgba(255,183,0,.12);
}
.ecb-check:has(input:checked)::after,
.ecb-check.is-on::after {
  background-color: var(--ecb-yellow);
  background-image: radial-gradient(circle at 30px 12px, #111 9px, transparent 10px);
}

.ecb-side {
  background: var(--ecb-card);
  color: #fff;
  border-radius: 22px;
  padding: 24px;
  position: sticky;
  top: calc(var(--ec-header-h, 152px) + 16px);
  scroll-margin-top: calc(var(--ec-header-h, 152px) + 12px);
}
.ecb-side h3 { margin: 0 0 6px; font-size: 18px; }
.ecb-total {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--ecb-yellow);
  margin: 8px 0 18px;
}
.ecb-total small {
  display: block;
  font-size: 16px;
  color: rgba(255,255,255,.7);
  font-weight: 600;
  margin-top: 6px;
}
.ecb-bd { list-style: none; margin: 0; padding: 0; }
.ecb-bd-sec { margin: 0 0 16px; }
.ecb-bd-sec:last-child { margin-bottom: 0; }
.ecb-bd-sec h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255,255,255,.5);
}
.ecb-bd-sec ul { list-style: none; margin: 0; padding: 0; }
.ecb-bd-sec li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
}
.ecb-bd-sec li span:first-child {
  color: rgba(255,255,255,.7);
  min-width: 0;
  overflow-wrap: anywhere;
}
.ecb-bd-sec li strong { color: #fff; flex-shrink: 0; }

.ecb-cta {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--ecb-yellow);
  color: #111;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
}
.ecb-cta:hover { filter: brightness(.96); }
.ecb-note { margin: 14px 0 0; font-size: 12px; color: rgba(255,255,255,.5); line-height: 1.4; }
.ecb-wait { color: rgba(255,255,255,.6); padding: 20px 0; }
.ecb-error { color: #fecaca; font-size: 14px; }

.ecb-method { margin-top: 48px; }
.ecb-method h2 { font-size: 28px; margin: 0 0 6px; font-weight: 800; letter-spacing: -.03em; }
.ecb-method-lead { margin: 0 0 18px; color: var(--ecb-muted); font-size: 15px; }
.ecb-method details {
  background: #fff;
  border: 1px solid var(--ecb-line);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, .04);
}
.ecb-method summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}
.ecb-method summary::-webkit-details-marker { display: none; }
.ecb-method summary::before {
  content: '+';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 183, 0, .18);
  color: #111;
  font-size: 20px;
  font-weight: 800;
  line-height: 32px;
  text-align: center;
}
.ecb-method details[open] summary::before { content: '−'; }
.ecb-method summary::after {
  content: '';
  margin-left: auto;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid #a1a1aa;
  border-bottom: 2px solid #a1a1aa;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.ecb-method details[open] summary::after { transform: rotate(-135deg); }
.ecb-method-body { padding: 0 18px 18px 62px; }
.ecb-method h3 { font-size: 16px; margin: 16px 0 8px; }
.ecb-method p { color: #52525b; font-size: 14px; line-height: 1.55; margin: 0 0 10px; }
.ecb-method ol { margin: 0 0 12px; padding-left: 18px; color: #52525b; font-size: 14px; line-height: 1.55; }
.ecb-method li { margin-bottom: 4px; }
.ecb-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0;
}
.ecb-method table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 14px; }
.ecb-method caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.ecb-method th,
.ecb-method td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ecb-line); }
.ecb-method th { color: var(--ecb-muted); font-weight: 700; }

@media (max-width: 900px) {
  body.page-calculator .content-area > .container {
    padding: 1rem 1.25rem 5.5rem;
  }
  .ecb-layout { grid-template-columns: 1fr; gap: 16px; }
  .ecb-side {
    position: static;
    padding: 20px 18px 22px;
    border-radius: 18px;
  }
  .ecb-row { grid-template-columns: 1fr; gap: 6px; }
  .ecb-intro h1,
  .ecb-intro h2 { font-size: 26px; }
  .ecb-intro { margin-bottom: 20px; padding-left: 14px; }
  .ecb-method-body { padding: 0 16px 16px; }
  .ecb-method h2 { font-size: 24px; }
  .ecb-price input { font-size: 28px; }
  .ecb-total { font-size: 32px; }
  .ecb-acc-h { padding: 14px 16px; }
  .ecb-acc-b { padding: 0 16px 16px; }
  .ecb-mode button { font-size: 13px; padding: 10px 8px; }
}

@media (max-width: 480px) {
  body.page-calculator .content-area > .container {
    padding: 0.85rem 1rem 5.5rem;
  }
}

.ecb [hidden] { display: none !important; }
