:root {
  --cr-ink: #15202b;
  --cr-muted: #5f6b76;
  --cr-bg: #f3f5f7;
  --cr-surface: #ffffff;
  --cr-line: #d7dde3;
  --cr-teal: #087f76;
  --cr-teal-soft: #e3f4f1;
  --cr-coral: #c74b38;
  --cr-coral-soft: #fff0ed;
  --cr-gold: #aa7811;
  --cr-gold-soft: #fff7df;
  --cr-blue: #245ea8;
  --cr-blue-soft: #edf4ff;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body.credit-restructuring-page {
  margin: 0;
  background: var(--cr-bg);
  color: var(--cr-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body.credit-restructuring-page #sc-chat-bubble,
body.credit-restructuring-page #sc-capucine-card {
  display: none !important;
}

.credit-restructuring-page button,
.credit-restructuring-page input {
  font: inherit;
}

.cr-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 80px;
}

.cr-intro {
  max-width: 860px;
  padding: 20px 0 42px;
}

.cr-eyebrow,
.cr-step {
  margin: 0 0 8px;
  color: var(--cr-teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cr-intro h1 {
  max-width: 820px;
  margin: 0;
  font-size: 3rem;
  line-height: 1.08;
  font-weight: 820;
}

.cr-lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--cr-muted);
  font-size: 1.14rem;
}

.cr-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cr-jump a,
.cr-expert a {
  color: var(--cr-blue);
  font-weight: 750;
  text-underline-offset: 3px;
}

.cr-jump a:first-child {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--cr-ink);
  color: #fff;
  text-decoration: none;
}

.cr-jump a:last-child {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 4px;
}

.cr-differences {
  padding: 30px 0 40px;
  border-top: 1px solid var(--cr-line);
}

.cr-differences > h2,
.cr-method h2,
.cr-expert h2,
.cr-sources h2,
.cr-related h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.cr-difference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.cr-difference-grid article {
  min-width: 0;
  padding: 20px;
  border-top: 3px solid var(--cr-teal);
  background: var(--cr-surface);
}

.cr-difference-grid article:nth-child(2) {
  border-color: var(--cr-blue);
}

.cr-difference-grid article:nth-child(3) {
  border-color: var(--cr-coral);
}

.cr-number {
  color: var(--cr-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.cr-difference-grid h3 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
}

.cr-difference-grid p {
  margin: 0;
  color: var(--cr-muted);
  font-size: 0.92rem;
}

.cr-tool {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 620px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #bfc8d1;
  border-radius: 8px;
  background: var(--cr-surface);
  box-shadow: 0 18px 50px rgba(31, 43, 55, 0.11);
}

.cr-tool-input,
.cr-tool-result {
  min-width: 0;
  padding: 34px;
}

.cr-tool-input {
  border-right: 1px solid var(--cr-line);
}

.cr-tool-result {
  background: #f8fafb;
}

.cr-tool-heading h2,
.cr-result-empty h2,
.cr-result-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.cr-tool-heading > p:last-child,
.cr-result-empty > p,
.cr-result-head > p {
  margin: 8px 0 0;
  color: var(--cr-muted);
}

.cr-mode {
  margin: 28px 0 22px;
  padding: 0;
  border: 0;
}

.cr-mode legend {
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 760;
}

.cr-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cr-segments label {
  min-width: 0;
  cursor: pointer;
}

.cr-segments input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  opacity: 0;
}

.cr-segments span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--cr-line);
  border-radius: 6px;
  background: #fff;
  color: #43505c;
  font-size: 0.86rem;
  font-weight: 720;
  text-align: center;
}

.cr-segments input:checked + span {
  border-color: var(--cr-teal);
  background: var(--cr-teal-soft);
  color: #075c56;
  box-shadow: inset 0 0 0 1px var(--cr-teal);
}

.cr-segments input:focus-visible + span {
  outline: 3px solid rgba(36, 94, 168, 0.25);
  outline-offset: 2px;
}

.cr-fields {
  display: grid;
  gap: 14px;
}

.cr-fields-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cr-fields-primary label:first-child {
  grid-column: 1 / -1;
}

.cr-fields label,
.cr-contact-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #33404d;
  font-size: 0.86rem;
  font-weight: 720;
}

.cr-fields label > span,
.cr-contact-fields label > span {
  color: var(--cr-muted);
  font-size: 0.75rem;
  font-weight: 550;
}

.cr-fields input,
.cr-contact-fields input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #bac4ce;
  border-radius: 6px;
  background: #fff;
  color: var(--cr-ink);
  font-size: 1rem;
}

.cr-fields input:focus,
.cr-contact-fields input:focus {
  border-color: var(--cr-blue);
  outline: 3px solid rgba(36, 94, 168, 0.16);
}

.cr-offer-details {
  margin: 20px 0;
  border-top: 1px solid var(--cr-line);
  border-bottom: 1px solid var(--cr-line);
}

.cr-offer-details summary {
  padding: 15px 0;
  cursor: pointer;
  color: var(--cr-blue);
  font-weight: 780;
}

.cr-offer-details > p {
  margin: -4px 0 14px;
  color: var(--cr-muted);
  font-size: 0.84rem;
}

.cr-fields-offer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 18px;
}

.cr-primary,
.cr-secondary {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.cr-primary {
  width: 100%;
  padding: 0 18px;
  background: var(--cr-ink);
  color: #fff;
}

.cr-primary:hover {
  background: #263746;
}

.cr-primary:disabled {
  cursor: wait;
  opacity: 0.62;
}

.cr-secondary {
  width: 100%;
  margin-top: 22px;
  padding: 0 18px;
  border: 1px solid var(--cr-teal);
  background: var(--cr-teal-soft);
  color: #075c56;
}

.cr-form-error {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--cr-coral);
  background: var(--cr-coral-soft);
  color: #8d3022;
  font-size: 0.86rem;
}

.cr-result-empty {
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: start;
}

.cr-empty-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 8px;
  background: var(--cr-gold-soft);
  color: var(--cr-gold);
  font-size: 1.45rem;
  font-weight: 850;
}

.cr-result-empty ul {
  margin: 20px 0 0;
  padding-left: 20px;
  color: #3f4d5a;
}

.cr-status {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--cr-blue-soft);
  color: var(--cr-blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.cr-status[data-status="lower_payment_higher_cost"],
.cr-status[data-status="no_measured_gain"] {
  background: var(--cr-coral-soft);
  color: #933724;
}

.cr-status[data-status="payment_and_cost_lower"] {
  background: var(--cr-teal-soft);
  color: #075c56;
}

.cr-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.cr-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--cr-line);
  border-radius: 6px;
  background: #fff;
}

.cr-metric span,
.cr-classification > span {
  display: block;
  color: var(--cr-muted);
  font-size: 0.74rem;
  font-weight: 720;
  text-transform: uppercase;
}

.cr-metric strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 1.16rem;
}

.cr-metric small {
  display: block;
  margin-top: 3px;
  color: var(--cr-muted);
  font-size: 0.72rem;
}

.cr-classification {
  margin-top: 12px;
  padding: 15px;
  border-left: 3px solid var(--cr-blue);
  background: var(--cr-blue-soft);
}

.cr-classification strong {
  display: block;
  margin-top: 4px;
}

.cr-classification p {
  margin: 4px 0 0;
  color: #45576b;
  font-size: 0.84rem;
}

.cr-result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.cr-result-columns section {
  min-width: 0;
}

.cr-result-columns h3 {
  margin: 0;
  font-size: 0.96rem;
}

.cr-result-columns ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #4d5b68;
  font-size: 0.82rem;
}

.cr-result-columns li + li {
  margin-top: 7px;
}

.cr-disclaimer {
  margin: 20px 0 0;
  color: var(--cr-muted);
  font-size: 0.75rem;
}

.cr-contact {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--cr-line);
}

.cr-contact-heading h3 {
  margin: 0;
  font-size: 1.12rem;
}

.cr-contact-heading > p:last-child {
  margin: 6px 0 0;
  color: var(--cr-muted);
  font-size: 0.82rem;
}

.cr-contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.cr-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
}

.cr-privacy,
.cr-contact-message {
  margin: 9px 0 0;
  color: var(--cr-muted);
  font-size: 0.74rem;
}

.cr-contact-message[data-state="success"] {
  padding: 10px 12px;
  border-left: 3px solid var(--cr-teal);
  background: var(--cr-teal-soft);
  color: #075c56;
}

.cr-contact-message[data-state="error"] {
  color: #933724;
}

.cr-method,
.cr-expert,
.cr-sources,
.cr-related {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--cr-line);
}

.cr-method {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
}

.cr-method-copy p {
  margin: 0;
  color: #4d5b68;
}

.cr-method-copy p + p {
  margin-top: 14px;
}

.cr-expert {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.cr-expert img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.cr-expert p:not(.cr-eyebrow) {
  max-width: 670px;
  margin: 9px 0;
  color: #4d5b68;
}

.cr-sources > div,
.cr-related > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.cr-sources a,
.cr-related a {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--cr-line);
  border-radius: 6px;
  background: #fff;
  color: var(--cr-blue);
  font-size: 0.86rem;
  font-weight: 720;
  text-decoration: none;
}

.cr-sources a:hover,
.cr-related a:hover {
  border-color: var(--cr-blue);
}

.cr-related strong,
.cr-related span {
  display: block;
}

.cr-related span {
  margin-top: 4px;
  color: var(--cr-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .cr-main {
    width: min(100% - 28px, 760px);
    padding-top: 34px;
  }

  .cr-intro h1 {
    font-size: 2.35rem;
  }

  .cr-difference-grid,
  .cr-sources > div,
  .cr-related > div {
    grid-template-columns: 1fr;
  }

  .cr-tool {
    grid-template-columns: 1fr;
  }

  .cr-tool-input {
    border-right: 0;
    border-bottom: 1px solid var(--cr-line);
  }

  .cr-result-empty {
    min-height: 340px;
  }

  .cr-method {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .cr-main {
    width: min(100% - 20px, 520px);
    padding-bottom: 54px;
  }

  .cr-intro {
    padding-bottom: 28px;
  }

  .cr-intro h1 {
    font-size: 2rem;
  }

  .cr-lead {
    font-size: 1rem;
  }

  .cr-jump {
    align-items: flex-start;
    flex-direction: column;
  }

  .cr-differences {
    padding-bottom: 28px;
  }

  .cr-tool-input,
  .cr-tool-result {
    padding: 22px 18px;
  }

  .cr-segments,
  .cr-fields-primary,
  .cr-fields-offer,
  .cr-metrics,
  .cr-result-columns,
  .cr-contact-fields {
    grid-template-columns: 1fr;
  }

  .cr-fields-primary label:first-child {
    grid-column: auto;
  }

  .cr-expert {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .cr-expert img {
    width: 88px;
    height: 88px;
  }
}
