.thc-root {
  --thc-brand: #ba272b;
  --thc-brand-dark: #971e22;
  --thc-brand-soft: #fff1f1;
  --thc-ink: #2b2a29;
  --thc-muted: #6d6b69;
  --thc-line: #dedddb;
  --thc-soft: #f3f3f3;
  --thc-success: #2f7042;
  --thc-success-soft: #edf8f0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto 60px;
  color: var(--thc-ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.thc-root *, .thc-root *::before, .thc-root *::after { box-sizing: border-box; }
.thc-root [hidden] { display: none !important; }
.thc-root h2, .thc-root h3, .thc-root p { margin-top: 0; }
.thc-root button, .thc-root input, .thc-root select { font: inherit; }
.thc-root a { color: var(--thc-brand); }

.thc-intro { max-width: 850px; margin-bottom: 26px; }
.thc-intro p { margin-bottom: 0; color: var(--thc-muted); font-size: 17px; }

.thc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  border: 1px solid var(--thc-line);
  background: var(--thc-soft);
}

.thc-root button.thc-tab {
  min-height: 76px;
  margin: 0;
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
  border-bottom: 4px solid transparent;
  color: var(--thc-ink);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}

.thc-root button.thc-tab + button.thc-tab { border-left: 1px solid var(--thc-line); }
.thc-tab strong, .thc-tab small { display: block; }
.thc-tab strong { font-size: 16px; }
.thc-tab small { margin-top: 2px; color: var(--thc-muted); font-size: 14px; }
.thc-root button.thc-tab[aria-selected="true"] { border-bottom-color: var(--thc-brand); background: #fff; }
.thc-root button.thc-tab[aria-selected="true"] strong { color: var(--thc-brand); }

.thc-calculator { border: 1px solid var(--thc-line); background: #fff; box-shadow: 0 16px 42px rgba(43, 42, 41, .09); }
.thc-calculator__head { padding: 26px 30px 20px; border-bottom: 1px solid var(--thc-line); }
.thc-calculator__head h2 { margin-bottom: 8px; font-size: clamp(23px, 3vw, 31px); line-height: 1.25; }
.thc-calculator__head > p { margin-bottom: 0; color: var(--thc-muted); }
.thc-calculator__body { padding: 30px; }
.thc-two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 34px; align-items: start; }
.thc-section + .thc-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--thc-line); }
.thc-section-title { margin-bottom: 14px; font-weight: 700; }
.thc-spaced { margin-top: 18px; }

.thc-notice { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--thc-brand); color: #5b292b; background: var(--thc-brand-soft); }
.thc-notice::before { content: "!"; flex: 0 0 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--thc-brand); font-weight: 700; line-height: 24px; text-align: center; }
.thc-notice p { margin: 0; }

.thc-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.thc-choice { position: relative; display: block; min-height: 138px; padding: 18px; border: 1px solid var(--thc-line); background: #fff; cursor: pointer; }
.thc-choice:hover { border-color: #b9b9b9; }
.thc-choice:has(input:checked) { border-color: var(--thc-brand); background: #fffafa; box-shadow: inset 0 -4px 0 var(--thc-brand); }
.thc-choice input { position: absolute; opacity: 0; pointer-events: none; }
.thc-choice__title, .thc-choice__formula, .thc-choice__caption { display: block; }
.thc-choice__title { margin-bottom: 6px; font-weight: 700; }
.thc-choice__formula { color: var(--thc-brand); font-weight: 700; }
.thc-choice__caption { margin-top: 6px; color: var(--thc-muted); font-size: 14px; line-height: 1.4; }

.thc-segmented { display: inline-grid; grid-template-columns: 1fr 1fr; width: min(100%, 560px); border: 1px solid var(--thc-line); }
.thc-segmented label { position: relative; margin: 0; padding: 10px 16px; cursor: pointer; text-align: center; }
.thc-segmented label + label { border-left: 1px solid var(--thc-line); }
.thc-segmented input { position: absolute; opacity: 0; }
.thc-segmented label:has(input:checked) { color: #fff; background: var(--thc-brand); }

.thc-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.thc-field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thc-field-grid--location { grid-template-columns: .7fr 1.25fr 1fr; }
.thc-field { min-width: 0; }
.thc-field label { display: block; margin-bottom: 7px; color: #3d3b39; font-size: 14px; font-weight: 600; }
.thc-field input, .thc-field select {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b9b9b9;
  border-radius: 0;
  color: var(--thc-ink);
  background: #fff;
  box-shadow: none;
  outline: none;
}
.thc-field input:focus, .thc-field select:focus { border-color: var(--thc-brand); box-shadow: 0 0 0 3px rgba(186, 39, 43, .12); }
.thc-field input[readonly] { background: var(--thc-soft); }
.thc-field input.thc-invalid, .thc-field select.thc-invalid { border-color: #c6252d; }
.thc-field small, .thc-actions small { display: block; margin-top: 5px; color: var(--thc-muted); font-size: 13px; line-height: 1.4; }
.thc-unit-field { position: relative; }
.thc-unit-field input { padding-right: 58px; }
.thc-unit-field > span { position: absolute; right: 13px; top: 50%; color: var(--thc-muted); transform: translateY(-50%); pointer-events: none; }

.thc-result-card { position: sticky; top: 20px; padding: 26px; border-top: 5px solid var(--thc-brand); background: var(--thc-soft); }
.thc-result-card__label { margin-bottom: 8px; color: var(--thc-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .055em; }
.thc-result-value { margin-bottom: 6px; color: var(--thc-brand); font-size: clamp(36px, 6vw, 60px); font-weight: 700; line-height: 1; }
.thc-result-value small { font-size: .42em; }
.thc-result-card__explain { margin: 14px 0 0; color: var(--thc-muted); }
.thc-result-placeholder { margin: 0; color: var(--thc-muted); }
.thc-method-note { margin: 22px 0 0; color: var(--thc-muted); font-size: 14px; }

.thc-advanced-layout { max-width: 960px; }
.thc-contact-box { margin-top: 28px; padding: 24px; border: 1px solid #d8b2b3; background: #fffafa; }
.thc-contact-box h3 { margin-bottom: 7px; font-size: 18px; }
.thc-contact-box > p { color: var(--thc-muted); }
.thc-contact-saved { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border: 1px solid #a8cdb2; background: var(--thc-success-soft); }
.thc-contact-saved p { margin: 0; }
.thc-root button.thc-link-button { margin: 0; padding: 0; border: 0; color: var(--thc-brand); background: transparent; box-shadow: none; cursor: pointer; text-decoration: underline; }
.thc-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; }
.thc-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--thc-brand); }
.thc-consent input.thc-invalid { outline: 2px solid #c6252d; outline-offset: 2px; }
.thc-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.thc-turnstile-wrap { max-width: 100%; margin-top: 18px; }
.thc-form-error { margin-top: 14px; padding: 12px 14px; border: 1px solid #e1a5a7; color: #7a1d20; background: #fff0f0; }
.thc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.thc-actions small { margin: 0; }

.thc-root button.thc-button {
  min-height: 48px;
  margin: 0;
  padding: 11px 22px;
  border: 1px solid var(--thc-brand);
  border-radius: 0;
  color: #fff;
  background: var(--thc-brand);
  box-shadow: none;
  cursor: pointer;
  font-weight: 700;
}
.thc-root button.thc-button:hover, .thc-root button.thc-button:focus-visible { color: var(--thc-brand); background: #fff; }
.thc-root button.thc-button:disabled { opacity: .55; cursor: wait; }
.thc-root button.thc-button--outline { color: var(--thc-brand); background: #fff; }
.thc-root button.thc-button--outline:hover { color: #fff; background: var(--thc-brand); }

.thc-success-panel { max-width: 960px; margin-top: 28px; padding: 24px; border-left: 5px solid var(--thc-success); background: var(--thc-success-soft); }
.thc-success-panel h3 { margin-bottom: 8px; color: #225b33; }
.thc-success-panel p { margin-bottom: 12px; }
.thc-order-success { margin: 16px 0 0; padding: 12px 14px; border: 1px solid #a8cdb2; color: #225b33; background: #fff; font-weight: 600; }

@media (max-width: 860px) {
  .thc-choice-grid { grid-template-columns: 1fr; }
  .thc-choice { min-height: auto; }
  .thc-two-column { grid-template-columns: 1fr; }
  .thc-result-card { position: static; }
  .thc-field-grid--3, .thc-field-grid--location { grid-template-columns: 1fr 1fr; }
  .thc-field-grid--location .thc-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .thc-tabs { grid-template-columns: 1fr; }
  .thc-root button.thc-tab + button.thc-tab { border-left: 0; border-top: 1px solid var(--thc-line); }
  .thc-calculator__head, .thc-calculator__body { padding: 22px 18px; }
  .thc-field-grid, .thc-field-grid--3, .thc-field-grid--location { grid-template-columns: 1fr; }
  .thc-field-grid--location .thc-field:last-child { grid-column: auto; }
  .thc-segmented { grid-template-columns: 1fr; }
  .thc-segmented label + label { border-left: 0; border-top: 1px solid var(--thc-line); }
  .thc-contact-saved { align-items: flex-start; flex-direction: column; }
  .thc-root button.thc-button { width: 100%; }
}
