:root {
  --mc-ink: #17211c;
  --mc-muted: #6c766f;
  --mc-line: #e7e4dd;
  --mc-paper: #fffdf8;
  --mc-soft: #f6f1e8;
  --mc-accent: #7b1f45;
  --mc-accent-2: #e19a3b;
  --mc-green: #496b54;
  --mc-shadow: 0 18px 55px rgba(23, 33, 28, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--mc-paper);
  color: var(--mc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.mestizo-calculator {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.mc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: center;
  min-height: 420px;
  padding: 36px 0 28px;
}

.mc-eyebrow {
  margin: 0 0 12px;
  color: var(--mc-accent);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mc-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.mc-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #334139;
  font-size: 1.12rem;
  line-height: 1.65;
}

.mc-note,
.mc-help {
  color: var(--mc-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.mc-note {
  max-width: 740px;
  margin: 18px 0 0;
}

.mc-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 18px 55px rgba(23, 33, 28, 0.13);
  overflow: hidden;
}

.mc-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.mc-form {
  display: grid;
  gap: 18px;
}

.mc-section {
  padding: 30px 0;
  border-top: 1px solid var(--mc-line);
}

.mc-section-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.mc-section-title > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mc-ink);
  color: #fff;
  font-weight: 800;
}

.mc-section-title h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.mc-section-title p {
  margin: 5px 0 0;
  color: var(--mc-muted);
  line-height: 1.5;
}

.mc-field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.mc-field span {
  color: #34413a;
  font-size: 0.91rem;
  font-weight: 750;
}

.mc-field input,
.mc-field select,
.mc-field textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fff;
  color: var(--mc-ink);
  padding: 14px 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mc-field textarea {
  resize: vertical;
}

.mc-field input:focus,
.mc-field select:focus,
.mc-field textarea:focus {
  border-color: var(--mc-accent);
  box-shadow: 0 0 0 4px rgba(123, 31, 69, 0.12);
}

.mc-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mc-choice-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mc-choice-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mc-choice-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mc-card,
.mc-toggle-card,
.mc-pill {
  border: 1px solid var(--mc-line);
  background: #fff;
  color: var(--mc-ink);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mc-card {
  min-height: 148px;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
}

.mc-card:hover,
.mc-toggle-card:hover,
.mc-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 31, 69, 0.42);
  box-shadow: 0 12px 32px rgba(23, 33, 28, 0.08);
}

.mc-card.is-selected,
.mc-pill.is-selected,
.mc-toggle-card.is-selected {
  border-color: var(--mc-accent);
  background: #fff8fb;
  box-shadow: 0 0 0 3px rgba(123, 31, 69, 0.11);
}

.mc-card small,
.mc-toggle-card small {
  display: block;
  margin-bottom: 10px;
  color: var(--mc-accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mc-card strong,
.mc-toggle-card strong {
  display: block;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.mc-card span,
.mc-card em,
.mc-toggle-card em {
  display: block;
  margin-top: 10px;
  color: var(--mc-muted);
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.45;
}

.mc-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mc-pill {
  min-width: 82px;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 850;
}

.mc-info-band {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: var(--mc-soft);
}

.mc-info-band p {
  margin: 7px 0 0;
  color: var(--mc-muted);
  line-height: 1.45;
}

.mc-stepper {
  display: inline-grid;
  grid-template-columns: 42px 54px 42px;
  align-items: center;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--mc-line);
  border-radius: 999px;
  background: #fff;
}

.mc-stepper button {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
}

.mc-stepper output {
  text-align: center;
  font-weight: 850;
}

.mc-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 124px;
  border-radius: 8px;
  padding: 20px;
  text-align: left;
}

.mc-toggle-card b {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--mc-ink);
  color: #fff;
  padding: 10px 16px;
}

.mc-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.mc-submit {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--mc-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mc-submit:hover {
  transform: translateY(-1px);
  background: #641838;
}

.mc-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.mc-submit-message {
  margin-top: 14px;
  color: var(--mc-green);
  font-weight: 800;
  line-height: 1.5;
}

.mc-success {
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
}

.mc-success h2 {
  margin: 0 0 10px;
}

.mc-success p {
  color: var(--mc-muted);
  line-height: 1.55;
}

.mc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mc-conditions {
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.mc-conditions summary {
  cursor: pointer;
  font-weight: 850;
}

.mc-conditions h3 {
  margin: 18px 0 6px;
}

.mc-conditions p {
  color: var(--mc-muted);
  line-height: 1.55;
}

.mc-summary {
  position: sticky;
  top: 22px;
}

.mc-summary-card {
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--mc-shadow);
}

.mc-items {
  display: grid;
  gap: 12px;
  min-height: 86px;
}

.mc-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #334139;
  line-height: 1.35;
}

.mc-item strong {
  flex: 0 0 auto;
  color: var(--mc-ink);
}

.mc-muted {
  color: var(--mc-muted);
}

.mc-route {
  margin: 18px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--mc-soft);
  color: #44514a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mc-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding-top: 18px;
  border-top: 1px solid var(--mc-line);
}

.mc-total span {
  color: var(--mc-muted);
}

.mc-total strong {
  text-align: right;
}

.mc-total strong:last-child {
  color: var(--mc-accent);
  font-size: 2rem;
}

.mc-warnings {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mc-warning {
  border-radius: 8px;
  background: #fff4dc;
  color: #72511d;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.4;
}

@media (max-width: 940px) {
  .mestizo-calculator {
    width: min(100% - 22px, 720px);
    padding-top: 18px;
  }

  .mc-hero,
  .mc-layout {
    grid-template-columns: 1fr;
  }

  .mc-hero {
    min-height: auto;
    padding-top: 24px;
  }

  .mc-visual {
    width: min(210px, 54vw);
    justify-self: center;
  }

  .mc-hero h1 {
    font-size: 3.4rem;
  }

  .mc-summary {
    position: static;
    order: -1;
  }
}

@media (max-width: 680px) {
  .mc-choice-grid,
  .mc-choice-grid-2,
  .mc-choice-grid-3,
  .mc-choice-grid-4,
  .mc-contact-grid {
    grid-template-columns: 1fr;
  }

  .mc-card {
    min-height: auto;
  }

  .mc-section {
    padding: 24px 0;
  }

  .mc-hero h1 {
    font-size: 2.55rem;
  }

  .mc-toggle-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
