:root {
  --red: #c81722;
  --red-dark: #98111a;
  --ink: #17181b;
  --muted: #687079;
  --line: #e5e7eb;
  --soft: #f5f6f7;
  --green: #0a7b42;
  --shadow: 0 18px 48px rgba(19, 24, 31, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7f7f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 20% 0, #fff 0, #f7f7f8 42%, #f1f2f4 100%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; padding: 12px max(20px, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(0,0,0,.08); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(200,23,34,.25); }
.brand b, .brand small { display: block; }
.brand b { font-size: 20px; letter-spacing: -.4px; }
.brand small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.site-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #d8dadd; border-radius: 999px; background: #fff; color: #4d535b; font-size: 13px; font-weight: 750; }
.site-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(10,123,66,.1); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero { padding: 56px 20px 32px; text-align: center; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--red); font-size: 12px; font-weight: 850; letter-spacing: .14em; }
.hero h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.04em; line-height: 1.03; }
.hero > p { max-width: 650px; margin: 16px auto 22px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.trust-row span { padding: 9px 13px; border: 1px solid #e2e3e5; border-radius: 999px; background: rgba(255,255,255,.8); color: #34383d; font-size: 13px; font-weight: 700; }

.calculator-shell { margin: 12px 0 40px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.calc-heading { padding: 28px 30px; color: #fff; background: linear-gradient(125deg, #1c1d21, #2b2d32); }
.calc-heading span { color: #ff9096; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.calc-heading h2 { margin: 7px 0 5px; font-size: 29px; letter-spacing: -.02em; }
.calc-heading p { margin: 0; color: #c9cbd0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 24px; padding: 24px; align-items: start; }
.form-column { display: grid; gap: 16px; min-width: 0; }
.card { min-width: 0; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.card legend { padding: 0 8px; font-weight: 850; font-size: 17px; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 9px; background: #fff0f1; color: var(--red); font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; min-height: 84px; flex-direction: column; justify-content: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; transition: .18s ease; }
.choice small { margin-top: 5px; color: var(--muted); line-height: 1.35; }
.choice input:checked + span { border-color: var(--red); background: #fff5f5; box-shadow: inset 0 0 0 1px var(--red); }
.info-note, .status-line { margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: #f5f6f7; color: #555d66; font-size: 13px; line-height: 1.5; }
.status-line.is-free { background: #eefaf3; color: #096638; }
.status-line.is-paid { background: #fff7e8; color: #8a5600; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { color: #40454c; font-size: 13px; font-weight: 750; }
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), select, textarea {
  width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #d8dadd; border-radius: 10px; background: #fff; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,23,34,.1); }
textarea { resize: vertical; }
.range-box { margin: 18px 0; padding: 16px; border-radius: 12px; background: #f7f7f8; }
.range-box > div, .range-box p { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.range-box output { color: var(--red); font-size: 18px; font-weight: 850; }
.range-box input { width: 100%; margin: 14px 0 5px; accent-color: var(--red); }
.range-box p { color: #7a8188; font-size: 11px; }
.full-field { display: block; margin-top: 13px; }
.toggle, .consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fafafa; }
.toggle input, .consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); flex: 0 0 auto; }
.toggle span b, .toggle span small { display: block; }
.toggle small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.input-suffix { display: flex; align-items: center; margin-top: 7px; border: 1px solid #d8dadd; border-radius: 10px; background: #fff; }
.input-suffix input { margin: 0 !important; border: 0 !important; box-shadow: none !important; }
.input-suffix em { padding-right: 13px; color: var(--muted); font-style: normal; font-weight: 700; }
.primary-button, .secondary-button { width: 100%; padding: 13px 16px; border: 0; border-radius: 10px; font-weight: 850; }
.primary-button { margin-top: 14px; color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(200,23,34,.2); }
.primary-button:hover { background: var(--red-dark); }
.secondary-button { color: var(--red); background: #fff; }
.form-message { min-height: 0; margin-top: 10px; font-size: 14px; font-weight: 750; line-height: 1.5; }
.form-message.success { padding: 12px; border-radius: 10px; background: #eaf8ef; color: var(--green); }
.form-message.error { padding: 12px; border-radius: 10px; background: #fff0f1; color: #9f121d; }

.result-card { position: sticky; top: 92px; padding: 24px; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #202226, #111215); box-shadow: 0 18px 36px rgba(0,0,0,.19); }
.mini-label { color: #f3979d; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.total-price { display: block; margin-top: 6px; font-size: clamp(35px, 4vw, 48px); letter-spacing: -.04em; }
.unit-label { color: #afb3b9; font-size: 13px; }
.result-card dl { margin: 22px 0 16px; }
.result-card dl div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #35373b; }
.result-card dt { color: #b8bbc0; }
.result-card dd { margin: 0; text-align: right; font-weight: 800; }
.result-card .travel-row dd { color: #85dfa9; }
.location-summary { margin: 14px 0; padding: 11px; border-radius: 10px; color: #dddfe2; background: #2a2c30; font-size: 13px; }
.result-card > p { margin: 14px 0 0; color: #9ea2a8; font-size: 11px; line-height: 1.55; }

footer { padding: 28px 16px 38px; color: #747b83; text-align: center; font-size: 12px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
}

@media (max-width: 640px) {
  main { width: min(100% - 18px, 1180px); }
  .topbar { min-height: 62px; padding: 9px 12px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand b { font-size: 17px; }
  .site-badge { padding: 7px 9px; font-size: 11px; }
  .hero { padding: 36px 10px 24px; }
  .hero > p { font-size: 15px; }
  .trust-row { align-items: stretch; flex-direction: column; }
  .calculator-shell { border-radius: 17px; }
  .calc-heading { padding: 23px 18px; }
  .calc-heading h2 { font-size: 24px; }
  .layout { gap: 14px; padding: 10px; }
  .card, .result-card { padding: 18px 15px; }
  .choice-grid, .field-grid { grid-template-columns: 1fr; }
  .choice span { min-height: 64px; }
  .total-price { font-size: 39px; }
}

/* Immediate acknowledgement; completion remains tied to the server response. */
.primary-button[data-state="sending"], .primary-button[data-state="sent"] { background: var(--green); box-shadow: none; opacity: 1; }
.primary-button[data-state="sending"] { cursor: progress; }
.primary-button[data-state="sending"]::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border: 2px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: sending-spin .8s linear infinite; }
.form-message.pending { padding: 12px; border-radius: 10px; background: #edf4fa; color: #254865; }
@keyframes sending-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .primary-button[data-state="sending"]::before { animation: none; } }

label, .info-note, .status-line, .result-card > p { font-size: 14px; }
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), select, textarea { font-size: 16px; }
.choice input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 3px; }
.contact-help { margin: 16px 0 0; line-height: 1.7; font-size: 14px; }
.contact-help a, .consent a { color: #98111a; text-decoration: underline; }
.total-price { overflow-wrap: anywhere; }
