/* Определение тарифного уровня напряжения — energo-market.com */

:root {
  --tun-vn1: #0c2d6b;
  --tun-vn: #178ae4;
  --tun-sn1: #38bdf8;
  --tun-sn2: #22c55e;
  --tun-nn: #eab308;
}

.tun-page .tools-hero {
  border-bottom: 1px solid rgba(23, 138, 228, 0.12);
}

.tun-hero .tools-hero__subtitle {
  margin: 0 0 1rem;
  font-size: 1.44rem;
  font-weight: 600;
  color: var(--blue);
}

.tun-page .tools-hero__lead {
  margin: 0;
  max-width: 62rem;
  font-size: 2.16rem;
  line-height: 1.55;
  color: #4a5c68;
}

.tun-hero__cta {
  display: inline-block;
  margin: 2rem 0 2.5rem;
}

.tun-highlight {
  margin: 0 0 1.75rem;
  padding: 1.35rem 1.5rem;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-left: 6px solid #d97706;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(217, 119, 6, 0.12);
}

.tun-highlight__text {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.65;
  color: #78350f;
}

.tun-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tun-nav a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
}

.tun-nav a:hover {
  text-decoration: underline;
}

.tun-section {
  padding: 3.5rem 0;
}

.tun-section--gray {
  background: #f4f7f9;
}

.tun-section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 2.4vw, 2.35rem);
  font-weight: 800;
  color: #094879;
}

.tun-section__lead {
  margin: 0 0 1.5rem;
  max-width: 72rem;
  font-size: 1.38rem;
  line-height: 1.65;
  color: #4a5c68;
}

.tun-section p {
  margin: 0 0 1rem;
  font-size: 1.32rem;
  line-height: 1.65;
  color: #4a5c68;
}

/* —— Цветовые бейджи уровней —— */

.tun-level-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  border-radius: 6px;
}

.tun-level-badge--vn1 { background: var(--tun-vn1); }
.tun-level-badge--vn { background: var(--tun-vn); }
.tun-level-badge--sn1 { background: var(--tun-sn1); color: #0a2540; }
.tun-level-badge--sn2 { background: var(--tun-sn2); color: #0a2540; }
.tun-level-badge--nn { background: var(--tun-nn); color: #0a2540; }

.tun-levels {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .tun-levels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tun-levels {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tun-level-card {
  padding: 1.35rem;
  background: #fff;
  border: 1px solid rgba(23, 138, 228, 0.14);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.05);
  border-top: 4px solid var(--blue);
}

.tun-level-card--vn1 { border-top-color: var(--tun-vn1); }
.tun-level-card--vn { border-top-color: var(--tun-vn); }
.tun-level-card--sn1 { border-top-color: var(--tun-sn1); }
.tun-level-card--sn2 { border-top-color: var(--tun-sn2); }
.tun-level-card--nn { border-top-color: var(--tun-nn); }

.tun-level-card__badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.3rem 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
}

.tun-level-card--vn1 .tun-level-card__badge { background: var(--tun-vn1); }
.tun-level-card--vn .tun-level-card__badge { background: var(--tun-vn); }
.tun-level-card--sn1 .tun-level-card__badge { background: var(--tun-sn1); color: #0a2540; }
.tun-level-card--sn2 .tun-level-card__badge { background: var(--tun-sn2); color: #0a2540; }
.tun-level-card--nn .tun-level-card__badge { background: var(--tun-nn); color: #0a2540; }

.tun-level-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #094879;
}

.tun-level-card__text {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.55;
  color: #4a5c68;
}

.tun-infographic {
  margin: 2rem 0 0;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid rgba(23, 138, 228, 0.12);
  border-radius: 16px;
  overflow-x: auto;
}

.tun-infographic__svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.tun-infographic__caption {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #64748b;
  text-align: center;
}

.tun-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  background: #fff;
  border: 1px solid rgba(23, 138, 228, 0.12);
  border-radius: 14px;
}

.tun-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 1.05rem;
}

.tun-table th,
.tun-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5c68;
}

.tun-table thead th {
  background: #eef7ff;
  font-weight: 800;
  color: #094879;
}

.tun-table tbody th {
  font-weight: 800;
  color: #094879;
}

.tun-row--vn1 { background: rgba(12, 45, 107, 0.06); }
.tun-row--vn { background: rgba(23, 138, 228, 0.06); }
.tun-row--sn1 { background: rgba(56, 189, 248, 0.08); }
.tun-row--sn2 { background: rgba(34, 197, 94, 0.08); }
.tun-row--nn { background: rgba(234, 179, 8, 0.1); }

.tun-table-note {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  font-size: 1.26rem;
  font-weight: 600;
  color: #094879;
  background: #eef7ff;
  border-radius: 10px;
}

.tun-quote {
  margin: 1.5rem 0;
  padding: 1.5rem 1.75rem;
  background: #eef7ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
}

.tun-quote p {
  margin: 0 0 0.75rem;
  font-size: 1.32rem;
  line-height: 1.65;
  color: #094879;
}

.tun-quote cite {
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 700;
  color: #64748b;
}

/* —— Калькулятор-мастер —— */

.tun-calc-wrap {
  padding: 3rem 0;
  background: linear-gradient(180deg, #eef7ff 0%, #fff 100%);
  border-top: 4px solid rgba(23, 138, 228, 0.25);
  border-bottom: 4px solid rgba(23, 138, 228, 0.15);
}

.tun-calc-panel {
  padding: 2rem 1.5rem;
  background: #fff;
  border: 2px solid rgba(23, 138, 228, 0.2);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(10, 37, 64, 0.08);
}

@media (min-width: 768px) {
  .tun-calc-panel {
    padding: 2.5rem 2rem;
  }
}

.tun-progress {
  margin-bottom: 2rem;
}

.tun-progress__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
}

.tun-progress__track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.tun-progress__bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--blue), #0ea0ff);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.tun-wizard__step {
  animation-duration: 0.35s;
  animation-fill-mode: both;
}

.tun-wizard__step.tun-step-enter {
  animation-name: tunFadeIn;
}

@keyframes tunFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tun-wizard__step-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #094879;
}

.tun-wizard__hint {
  margin: 0 0 1.25rem;
  font-size: 1.26rem;
  line-height: 1.55;
  color: #64748b;
}

.tun-options {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.tun-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.tun-option:hover {
  border-color: var(--blue);
  background: #eef7ff;
}

.tun-option input {
  margin-top: 0.35rem;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--blue);
}

.tun-option__icon {
  flex-shrink: 0;
  color: var(--blue);
  margin-top: 0.1rem;
}

.tun-option__text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #0a2540;
}

.tun-option__text small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.92rem;
  color: #64748b;
}

.tun-field {
  margin-bottom: 1rem;
}

.tun-field__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #094879;
}

.tun-field__tip {
  margin: 0.5rem 0 0;
  font-size: 1.14rem;
  line-height: 1.5;
  color: #64748b;
}

.tun-field__control {
  width: 100%;
  max-width: 24rem;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1.15rem;
  color: #0a2540;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.tun-field__control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 138, 228, 0.2);
}

.tun-field-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .tun-field-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 32rem;
  }
}

.tun-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
}

.tun-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tun-actions .ui-btn {
  min-height: 48px;
  font-size: 1.05rem;
}

.tun-actions .ui-btn--outline {
  background: #fff;
  color: #094879;
  border: 1px solid #cbd5e1;
}

.tun-actions .ui-btn--outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tun-result {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(145deg, #ecfdf5 0%, #fff 100%);
  border: 2px solid #86efac;
  border-radius: 16px;
}

.tun-result__label {
  margin: 0 0 0.35rem;
  font-size: 1.32rem;
  font-weight: 700;
  color: #64748b;
}

.tun-result__level {
  margin: 0 0 1rem;
  font-size: 2.75rem;
  font-weight: 800;
  color: #15803d;
}

.tun-result__level.tun-level--vn1 { color: var(--tun-vn1); }
.tun-result__level.tun-level--vn { color: var(--tun-vn); }
.tun-result__level.tun-level--sn1 { color: #0284c7; }
.tun-result__level.tun-level--sn2 { color: #15803d; }
.tun-result__level.tun-level--nn { color: #a16207; }

.tun-result__meta {
  margin: 0 0 0.75rem;
  font-size: 1.32rem;
  line-height: 1.55;
  color: #4a5c68;
}

.tun-result__chain-label {
  margin: 1rem 0 0.35rem;
  font-size: 1.14rem;
  font-weight: 700;
  color: #64748b;
}

.tun-result__chain {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: #094879;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.tun-result__citation {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(10, 37, 64, 0.1);
  font-size: 1.14rem;
  line-height: 1.55;
  color: #64748b;
}

.tun-result__citation a {
  font-weight: 700;
}

/* —— Примеры, FAQ, ссылки —— */

.tun-examples {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tun-example {
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #4a5c68;
}

.tun-faq {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tun-faq__item {
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid rgba(23, 138, 228, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.tun-faq__question {
  margin: 0;
  padding: 1.15rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #094879;
  cursor: pointer;
  list-style: none;
}

.tun-faq__question::-webkit-details-marker {
  display: none;
}

.tun-faq__answer {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  font-size: 1.26rem;
  line-height: 1.6;
  color: #4a5c68;
}

.tun-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tun-links li {
  margin-bottom: 0.65rem;
}

.tun-links a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue);
}

.tun-links a:hover {
  text-decoration: underline;
}

.tun-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 479px) {
  .tun-actions .ui-btn {
    width: 100%;
    justify-content: center;
  }
}
