/* Calculator pages (/israel-purchase-costs, /de/kaufnebenkosten-israel), written by
   calculator/build/build-pages.js. Header and footer come from styles.css, the chat from
   chat-calc.css (inline in #bhc-inline). Everything here is under .cp… */

/* ---------- header: nav links plus EN / DE switch ---------- */
.cp-nav-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.cp-lang {
  display: inline-flex;
  border: 1px solid var(--sage);
  border-radius: 99px;
  overflow: hidden;
}

.cp-lang a {
  min-width: 44px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}

.cp-lang a:hover {
  background: var(--sage-50);
}

.cp-lang a[aria-current="page"] {
  background: var(--teal);
  color: var(--cream);
}

/* ---------- page ---------- */
.cp {
  padding: 0 80px;
}

.cp-hero {
  max-width: 880px;
  padding: 40px 0 56px;
}

.cp-crumbs {
  font-size: 14px;
  color: var(--grey-blue);
  margin-bottom: 40px;
}

.cp-crumbs a {
  color: var(--grey-blue);
}

.cp-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.68px;
  color: var(--terracotta);
  margin-bottom: 16px;
}

.cp-hero h1 {
  font-size: 52px;
  line-height: 1.12;
  font-weight: 700;
  margin-bottom: 20px;
}

.cp-sub {
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink-80);
  margin-bottom: 20px;
}

.cp-meta {
  font-size: 14px;
  color: var(--grey-blue);
}

.cp-meta a {
  color: var(--teal);
  font-weight: 700;
}

.cp-section {
  border-top: 1px solid var(--sage);
  padding: 64px 0;
  max-width: 880px;
}

.cp-section-calc {
  max-width: none;
}

.cp-section h2 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 16px;
}

.cp-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 8px;
}

.cp-section p,
.cp-list li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-80);
}

.cp-section p + p,
.cp-section p + table,
.cp-section table + p {
  margin-top: 14px;
}

.cp-section .cp-lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 20px;
}

.cp-section a:not(.cta-button) {
  color: var(--teal);
}

.cp-note {
  font-size: 14px !important;
  color: var(--grey-blue) !important;
}

/* calculator: text left, chat right */
.cp-calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 64px;
  align-items: start;
}

.cp-section-calc .cp-lead {
  max-width: 880px;
}

.cp-list {
  list-style: none;
  margin-bottom: 20px;
}

.cp-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.cp-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
}

.cp-chat {
  min-height: 200px;
}

/* tables */
.cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.cp-table th,
.cp-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--sage);
}

.cp-table thead th {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--grey-blue);
}

.cp-rates {
  max-width: 560px;
}

.cp-rates td + td {
  font-weight: 700;
  white-space: nowrap;
}

.cp-costs tbody th {
  font-weight: 700;
  min-width: 160px;
}

.cp-costs td:nth-child(2) {
  white-space: nowrap;
}

.cp-costs td:nth-child(3) {
  min-width: 130px;
}

.cp-costs td:last-child {
  color: var(--ink-80);
  font-size: 15px;
}

/* FAQ */
.cp-faq {
  border-bottom: 1px solid var(--sage);
}

.cp-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 18px 40px 18px 0;
  font-size: 18px;
  font-weight: 700;
}

.cp-faq summary::-webkit-details-marker {
  display: none;
}

.cp-faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 26px;
  font-weight: 400;
  color: var(--terracotta);
}

.cp-faq[open] summary::after {
  content: '\2212';
}

.cp-faq p {
  padding-bottom: 18px;
}

.cp-sources {
  list-style: disc;
  padding-left: 20px;
}

.cp-sources li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-80);
  margin-bottom: 6px;
}

.cp-section-talk .cta-button {
  margin-top: 24px;
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .cp {
    padding: 0 40px;
  }

  .cp-calc {
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .cp-calc {
    grid-template-columns: minmax(0, 1fr);
  }

  .cp-chat {
    max-width: 480px;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .cp-nav-right {
    gap: 10px;
  }

  .cp-lang a {
    min-width: 0;
    padding: 6px 8px;
    font-size: 13px;
  }

  .cp {
    padding: 0 24px;
  }

  .cp-hero {
    padding: 24px 0 40px;
  }

  .cp-crumbs {
    margin-bottom: 28px;
  }

  .cp-hero h1 {
    font-size: 34px;
  }

  .cp-sub {
    font-size: 18px;
  }

  .cp-section {
    padding: 48px 0;
  }

  .cp-section h2 {
    font-size: 28px;
  }

  .cp-section .cp-lead {
    font-size: 18px;
  }

  .cp-section p,
  .cp-list li {
    font-size: 16px;
  }

  .cp-faq summary {
    font-size: 17px;
  }

  /* costs table: one block per cost */
  .cp-costs thead {
    display: none;
  }

  .cp-costs tr {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--sage);
  }

  .cp-costs th,
  .cp-costs td {
    display: block;
    border: 0;
    padding: 2px 0;
  }

  .cp-costs td::before {
    content: attr(data-label) ': ';
    font-weight: 700;
    color: var(--grey-blue);
  }

  .cp-costs td:last-child::before {
    content: '';
  }

  .cp-costs td:nth-child(2) {
    white-space: normal;
  }

  .cta-button {
    display: block;
    text-align: center;
  }
}
