:root {
  --blue: #1429c2;
  --blue-dark: #10229f;
  --navy: #0d1747;
  --lime: #c5ef78;
  --lime-dark: #a7d94d;
  --ink: #0d1747;
  --muted: #66708d;
  --muted-2: #4a5578;
  --border: #dfe4f0;
  --bg: #f6f7fb;
  --white: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 70px rgba(22, 32, 77, 0.07);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* [hidden] must always win over component display rules of equal specificity
   (e.g. .btn{display:inline-flex}, .results-list__row{display:grid}). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #eef2fb 0%, #f7f8fc 320px, #f7f8fc 100%);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.topbar__inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 4px;
  flex-wrap: wrap;
}

.logo { height: 40px; width: auto; }
.logo-link { display: inline-flex; text-decoration: none; }

.topbar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-toggle { appearance: none; border: 1px solid var(--border); background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font); }
.lang-toggle svg { width: 17px; height: 17px; }
.lang-toggle--icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
@media (max-width: 859px) { .lang-toggle--icon { display: none; } }
.lang-toggle--footer { display: none; align-items: center; gap: 5px; border: none; padding: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
@media (max-width: 859px) { .lang-toggle--footer { display: inline-flex; } }

/* Buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--navy);
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--primary { background: var(--blue); color: #fff; height: 48px; width: 100%; font-size: 15px; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--primary:disabled { opacity: 0.7; cursor: default; }
.btn--lime { background: var(--lime); color: #0c1a7a; height: 52px; flex: 1 1 auto; font-size: 15px; }
.btn--lime:hover { background: var(--lime-dark); }
.btn--white { background: #fff; color: var(--blue); height: 52px; flex: 1 1 auto; font-size: 15px; }
.btn--white:hover { background: #f0f1f8; }
.btn--white:disabled { opacity: 0.7; cursor: default; }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #fff; height: 52px; }
.btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* Hero */
.hero { padding: 28px 0 8px; max-width: 640px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}
.eyebrow__icon { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.01em; }
.hero__lead { color: var(--muted-2); font-size: 16px; line-height: 1.6; margin: 0; }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}
@media (min-width: 640px) { .card { padding: 28px; } }

.calc-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .calc-grid { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

/* Form */
.field-group { margin-bottom: 22px; }
.field-group:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.field-label-row .field-label { margin-bottom: 0; }
.field-unit { font-size: 12px; color: var(--muted); }
.field-hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid #e2e6f0;
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  background: #fff;
}
.radio-tile input { position: absolute; opacity: 0; pointer-events: none; }
.radio-tile__icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.radio-tile span { font-weight: 600; color: var(--navy); }
.radio-tile:has(input:checked) {
  border-color: var(--blue);
  background: rgba(20, 41, 194, 0.045);
  box-shadow: 0 0 0 3px rgba(20, 41, 194, 0.08);
}
.radio-tile:has(input:checked) .radio-tile__icon { color: var(--blue); }
.radio-tile:hover { border-color: rgba(20, 41, 194, 0.45); }

.number-input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #e2e6f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.number-input input {
  border: none;
  outline: none;
  font-size: 20px;
  font-weight: 700;
  padding: 14px 16px;
  width: 100%;
  font-family: var(--font);
  color: var(--navy);
  background: transparent;
  -moz-appearance: textfield;
}
.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.number-input__suffix { padding: 0 16px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.number-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 41, 194, 0.1); }

input[type="range"] {
  width: 100%;
  margin-top: 12px;
  accent-color: var(--blue);
  height: 22px;
}

.select {
  width: 100%;
  border: 1px solid #e2e6f0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  font-family: var(--font);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366708d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 41, 194, 0.1); }

/* Results card */
.results-card {
  background: linear-gradient(160deg, var(--navy) 0%, #16215c 55%, var(--blue) 130%);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.results-card::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197,239,120,0.25), transparent 70%);
  pointer-events: none;
}
.results-card__head { display: flex; align-items: center; justify-content: space-between; }
.results-card__label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: rgba(255,255,255,0.65); margin: 0; }
.badge { background: var(--lime); color: #0c1a7a; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em; }
.results-card__price { font-size: clamp(32px, 6vw, 44px); font-weight: 800; margin: 14px 0 2px; letter-spacing: -0.01em; }
.results-card__price-caption { margin: 0 0 6px; font-size: 13px; color: rgba(255,255,255,0.6); border-top: 2px solid var(--lime); padding-top: 12px; margin-top: 12px; display: inline-block; }

.results-list { margin: 8px 0 0; }
.results-list__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 14px 0;
}
.results-list__row:last-child { border-bottom: none; }
.results-list dt { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0 0 4px; }
.results-list dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.results-list dd.accent { color: var(--lime); font-size: 16px; }

.results-card__minimum {
  margin: 16px 0 0;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

.results-card__explain {
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.065);
  border-radius: 16px;
  padding: 16px;
}
.results-card__explain-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; margin: 0;
}
.results-card__explain-title svg { width: 16px; height: 16px; color: var(--lime); flex-shrink: 0; }
.results-card__explain p:last-child { margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.65); }

.results-card__actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.results-card__actions .btn--lime,
.results-card__actions .btn--white { min-width: 160px; }

/* Lower grid */
.lower-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .lower-grid { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

.section-label { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--blue); margin: 0; text-transform: uppercase; }
.chart-card h2, .package-card h2 { font-size: 22px; margin: 6px 0 0; color: var(--navy); }
.chart-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 208px; margin-top: 28px; }
@media (min-width: 640px) { .chart { gap: 12px; } }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart__bar { width: 100%; max-width: 42px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--lime) 0%, var(--blue) 160%); min-height: 4px; }
.chart__label { font-size: 11px; color: var(--muted); font-weight: 600; }
.chart-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 16px 0 0; }

.checklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.checklist li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: #253052;
  font-weight: 500;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--lime);
}

.info-block {
  margin-top: 18px;
  background: var(--bg);
  border-radius: 14px;
  padding: 14px 16px;
}
.info-block strong { display: block; font-size: 13.5px; color: var(--navy); margin-bottom: 4px; }
.info-block p { margin: 0; font-size: 13.5px; color: var(--muted-2); line-height: 1.55; }

.info-row { display: flex; gap: 12px; margin-top: 16px; }
.info-row svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.info-row p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #364066; }
.info-row strong { color: #1e2749; }

.disclaimer { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }

.footer { text-align: center; padding: 24px 20px 40px; color: var(--muted); font-size: 13px; }

/* Dialog */
.dialog {
  border: none;
  border-radius: 20px;
  padding: 24px;
  max-width: 420px;
  width: calc(100% - 40px);
  box-shadow: 0 30px 80px rgba(13,23,71,0.25);
  color: var(--navy);
  font-family: var(--font);
}
.dialog::backdrop { background: rgba(13,23,71,0.45); backdrop-filter: blur(2px); }
.dialog--catalog { max-width: 880px; max-height: calc(100vh - 60px); overflow-y: auto; }

.catalog-back {
  appearance: none;
  -webkit-appearance: none;
  position: sticky;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(13,23,71,0.12);
  z-index: 2;
  margin-bottom: -34px;
}
.catalog-back:hover { background: var(--bg); }

.catalog-head { padding-left: 46px; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 4px; min-height: 34px; }
.catalog-head h3 { margin-bottom: 4px; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6e9f2;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.catalog-card:hover { border-color: rgba(20,41,194,0.35); box-shadow: 0 6px 18px rgba(22,32,77,0.06); }
.catalog-card__brand { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--blue); text-transform: uppercase; margin: 0; }
.catalog-card__model { font-size: 15px; font-weight: 700; color: var(--navy); margin: 6px 0 10px; line-height: 1.3; word-break: break-word; }
.catalog-card__power { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; color: #253052; background: var(--bg); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.catalog-card__link {
  margin-top: auto;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
}
.catalog-card__link:hover { background: rgba(20,41,194,0.06); }
.dialog h3 { margin: 0 0 10px; font-size: 19px; }
.dialog p { font-size: 14.5px; line-height: 1.6; margin: 0 0 12px; color: #3a4364; }
.dialog p.muted { color: var(--muted); font-size: 13px; }
.dialog .btn { margin-top: 4px; }
.dialog__actions { display: flex; gap: 10px; margin-top: 8px; }
.dialog__actions .btn { flex: 1; }

.text-input {
  width: 100%;
  border: 1px solid #e2e6f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  margin: 0 0 14px;
}
.text-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,41,194,0.1); }

.pdf-error {
  background: #fef2f2; color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(13,23,71,0.3);
  z-index: 50;
}

@media (max-width: 480px) {
  .checklist { grid-template-columns: 1fr; }
  .results-card__actions { flex-direction: column; }
  .results-card__actions .btn { width: 100%; }
  .container { padding-left: 24px; padding-right: 24px; }
  .topbar__inner { padding-left: 24px; padding-right: 24px; }
}
