/* ===== NAVLE Score Estimator ===== */

.estimator-page {
  --se-brand: var(--navle-brand, #0f766e);
  --se-brand-strong: var(--navle-brand-strong, #0b5b55);
  --se-ink: var(--navle-ink, #1c2729);
  --se-ink-soft: var(--navle-ink-soft, #58676b);
  --se-line: var(--navle-line, rgba(28, 39, 41, 0.10));
  --se-surface: var(--navle-surface-strong, #ffffff);
}

.se-hero {
  max-width: 1200px;
  margin: 0 auto clamp(18px, 2.6vw, 28px);
  padding: clamp(10px, 2vw, 18px) 0 0;
}

.se-hero .navle-breadcrumbs.container {
  width: 100%;
  margin: 0 0 clamp(18px, 2vw, 24px);
}

.se-hero h1 {
  max-width: 1200px;
  margin: 0;
  color: var(--se-ink);
  font-size: clamp(2.65rem, 4.7vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.se-hero p {
  max-width: 900px;
  margin: clamp(16px, 2vw, 22px) 0 clamp(18px, 2vw, 24px);
  color: var(--se-ink);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
}

.se-hero .navle-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.se-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 24px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

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

.se-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.se-card, .se-chart-card, .se-result {
  background: var(--se-surface);
  border: 1px solid rgba(14, 107, 105, 0.14);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 38px rgba(17, 32, 51, 0.07);
}

.se-card__title, .se-section-title {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--se-ink);
}

.se-card__title svg, .se-section-title svg {
  color: var(--se-brand);
}

.se-card__subtitle, .se-section-subtitle {
  font-size: 0.95rem;
  color: var(--se-ink-soft);
  margin-bottom: 20px;
}

.se-field {
  margin-bottom: 20px;
}

.se-field__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--se-ink);
}

.se-field__header span {
  color: var(--se-brand);
}

.se-field input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  height: 8px;
  margin: 14px 0 6px;
  background: #e8e4df;
  border: 0;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(28, 39, 41, 0.04);
}

.se-field input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.se-field input[type="range"]::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.se-field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid var(--se-brand);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
  cursor: pointer;
  transform: translateY(-6px);
}

.se-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid var(--se-brand);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
  cursor: pointer;
}

.se-divider {
  height: 1px;
  background: rgba(14, 107, 105, 0.1);
  margin: 20px 0;
}

.se-readonly {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 8px 0;
  color: var(--navle-ink-soft, #58676b);
  border-bottom: 1px solid rgba(14, 107, 105, 0.05);
}
.se-readonly:last-child {
  border-bottom: none;
}

.se-readonly span:last-child {
  font-weight: 700;
  color: var(--navle-ink, #1c2729);
}

.se-tabs {
  display: flex;
  gap: 8px;
  background: rgba(28, 39, 41, 0.06);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.se-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: var(--se-ink-soft);
  transition: all 0.2s ease;
}

.se-tab.is-active {
  background: #fff;
  color: var(--se-brand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.se-result {
  position: sticky;
  top: 90px;
  background: linear-gradient(145deg, var(--se-brand), var(--se-brand-strong));
  color: #fff;
  border: none;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.2);
}

.se-result__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 8px;
  display: block;
}

.se-result__score {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.se-result__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  margin-bottom: 24px;
}
.se-result__badge.is-pass { background: #136f55; }
.se-result__badge.is-fail { background: #9c3f3f; }

.se-result__ci {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 16px;
  display: block;
}

.se-result__guidance {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.se-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  position: relative;
  margin-bottom: 8px;
}

.se-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.se-bar__fill.is-pass { background: #4ade80; }
.se-bar__fill.is-fail { background: #f87171; }

.se-bar__mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #fff;
  left: 37.5%;
}

.se-bar__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 24px;
}

.se-ministats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.se-ministat {
  display: flex;
  flex-direction: column;
}

.se-ministat__label {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.se-ministat__value {
  font-size: 1.25rem;
  font-weight: 700;
}

.se-scenarios-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-top: 24px;
  margin-bottom: 16px;
}

.se-scenario {
  margin-bottom: 12px;
}

.se-scenario__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.se-scenario__track {
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  position: relative;
}

.se-scenario__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
}
.se-scenario__fill.is-brand { background: #60a5fa; }
.se-scenario__fill.is-caution { background: #fbbf24; }
.se-scenario__fill.is-success { background: #4ade80; }

.se-scenario__pass {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #fff;
  left: 37.5%;
}

.se-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.se-next a {
  display: block;
  padding: 20px;
  background: var(--se-surface);
  border: 1px solid rgba(14, 107, 105, 0.15);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.se-next a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--navle-brand, #0f766e);
}

.se-next strong {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--se-brand);
  margin-bottom: 8px;
}

.se-next span {
  font-size: 0.95rem;
  color: var(--se-ink-soft);
}

.estimator-block-card {
  background: #f6f1e8;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.estimator-block-card__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
}

.estimator-block-card label {
  font-size: 0.85rem;
  color: var(--navle-ink-soft);
  display: block;
  margin-bottom: 6px;
}

.estimator-block-card__value {
  text-align: right;
  font-weight: 700;
  color: var(--navle-brand);
  margin-top: 4px;
}

.se-import-bar {
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.se-import-bar span {
  font-size: 0.9rem;
  color: var(--navle-ink);
}

.se-disclaimer {
  font-size: 0.85rem;
  color: var(--se-ink-soft);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e8e4df;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .se-layout {
    gap: 18px;
  }

  .se-result {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .se-hero {
    margin-bottom: 18px;
    padding-top: 6px;
  }

  .se-hero h1 {
    font-size: clamp(2.25rem, 10.5vw, 3.15rem);
    line-height: 1.06;
  }

  .se-hero p {
    margin: 18px 0 20px;
  }

  .se-hero .navle-inline-links {
    align-items: stretch;
    flex-direction: column;
  }

  .se-hero .navle-inline-links .button {
    justify-content: center;
    width: 100%;
  }

  .se-card, .se-chart-card, .se-result {
    border-radius: 18px;
    padding: 18px;
  }

  .se-result__score {
    font-size: 3.35rem;
  }

  .se-result__badge {
    margin-bottom: 16px;
  }

  .se-result__guidance {
    margin-bottom: 16px;
    padding-bottom: 16px;
    line-height: 1.5;
  }

  .se-ministats {
    gap: 14px;
    margin-bottom: 18px;
  }

  .se-scenarios-title,
  .estimator-scenarios {
    display: none;
  }

  .se-tabs {
    margin-bottom: 18px;
  }

  .se-tab {
    min-height: 44px;
  }

  .se-next {
    grid-template-columns: 1fr;
  }
}
