/* ==========================================================================
   tv.css – tomervolt content in the Tomer Electric design system
   Builds only on the tokens and components of styles.css / inner.css.
   ========================================================================== */

/* ============ Shared ============ */
.section--white {
  background: #fff;
  color: var(--dark);
}

.section--white .eyebrow::before,
.section--white .eyebrow::after {
  background: var(--yellow);
}

.btn--dark:hover {
  background: var(--dark-3);
}

/* ============ Home: hero, text beside the animation ============ */
.hero--split .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 40px 56px;
}

.hero--split .stage-wrap {
  width: 100%;
  min-width: 0;
}

.hero--split .values {
  grid-column: 1 / -1;
  justify-self: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__eyebrow {
  color: var(--yellow);
}

.hero__title {
  margin: 18px 0 20px;
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero__title em {
  font-style: normal;
  color: var(--yellow);
}

.hero__desc {
  max-width: 520px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--on-dark-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.anim-pending .hero__text > * {
  opacity: 0;
  animation: failsafe 0.4s 3s forwards;
}

.hero.is-ready .hero__text > * {
  animation: rise 1s var(--ease-out) both;
}

.hero.is-ready .hero__text > :nth-child(2) { animation-delay: 0.12s; }
.hero.is-ready .hero__text > :nth-child(3) { animation-delay: 0.24s; }
.hero.is-ready .hero__text > :nth-child(4) { animation-delay: 0.36s; }

/* ============ Home: reviews carousel ============ */
.rev {
  position: relative;
}

.rev__viewport {
  overflow: hidden;
  margin: -44px -16px;
  padding: 44px 16px;
}

.rev__track {
  --per: 3;
  --gap: 20px;
  display: flex;
  gap: var(--gap);
  transition: transform 0.7s var(--ease-out);
}

.rev-card {
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(30, 39, 46, 0.06), 0 16px 36px rgba(30, 39, 46, 0.12);
}

.rev-card__stars {
  display: flex;
  gap: 3px;
  color: var(--yellow-hover);
}

.rev-card__stars svg,
.st-reviews__stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.rev-card blockquote {
  flex: 1;
  font-size: 16px;
  line-height: 1.7;
  color: #34424d;
}

.rev-card__who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(30, 39, 46, 0.08);
}

.rev-card__avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: var(--yellow);
  font-size: 18px;
  font-weight: 800;
}

.rev-card__who b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.rev-card__who small {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #5f6b75;
}

.rev__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.rev__btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: var(--yellow);
  transition: background 0.2s, opacity 0.2s, scale 0.1s;
}

.rev__btn:hover {
  background: var(--dark-3);
}

.rev__btn:active {
  scale: 0.94;
}

.rev__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.rev__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.rev__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(30, 39, 46, 0.25);
  transition: width 0.35s var(--ease-out), background 0.3s;
}

.rev__dot.is-active {
  width: 28px;
  background: var(--dark);
}

/* ============ Home: services ============ */
.tv-svc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ============ Home: service area ============ */
.areas__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px 64px;
}

.areas__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.areas__text h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.areas__lead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}

.areas__lead svg {
  width: 26px;
  height: 26px;
  color: var(--yellow);
}

.areas__note {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-on-dark);
  font-size: 15px;
  color: var(--on-dark-2);
}

.areas__map {
  position: relative;
  padding: 10px;
  border-radius: 24px;
  background: var(--dark-2);
  border: 1px solid var(--line-on-dark);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.areas__map::before {
  content: "";
  position: absolute;
  inset: -1px 40px auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--yellow);
}

.areas__map img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ============ Home: about ============ */
.founder__facts a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(251, 197, 49, 0.5);
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.founder__facts a:hover {
  color: var(--yellow);
}

.certs b {
  font-size: 17px;
}

/* ============ Home: articles ============ */
.tv-articles__more {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

/* ============ Responsive (home) ============ */
@media (max-width: 1080px) {
  .hero--split .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero__text {
    align-items: center;
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero--split .stage-wrap {
    max-width: 680px;
    justify-self: center;
  }

  .tv-svc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .areas__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .areas__map {
    max-width: 620px;
  }

  .rev__track {
    --per: 2;
  }
}

@media (max-width: 640px) {
  .hero__desc {
    font-size: 17px;
  }

  .hero__actions .btn {
    flex: 1 1 0;
    padding: 0 18px;
  }

  .tv-svc {
    grid-template-columns: minmax(0, 1fr);
  }

  .rev__track {
    --per: 1;
    --gap: 14px;
  }

  .areas__lead {
    font-size: 19px;
  }
}

/* ==========================================================================
   Tool pages: lighting, formulas, electricity law
   ========================================================================== */

/* The calculators keep their original markup and scripts. Their inline styles and
   scripts read these older variable names, so they are mapped onto the design's tokens. */
:root {
  --clr-yellow: var(--yellow);
  --clr-yellow-dark: #9a6b00;
  --clr-yellow-light: #fdf1cc;
  --clr-yellow-bg: var(--yellow-soft);
  --clr-bg: #fff;
  --clr-bg-2: #eceef2;
  --clr-bg-card: #fff;
  --clr-border: rgba(30, 39, 46, 0.12);
  --clr-text: var(--dark);
  --clr-muted: #5f6b75;
  --clr-heading: var(--dark);
  --clr-eyebrow: #9a6b00;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-display: var(--font);
  --font-body: var(--font);
  --transition: 0.2s ease;
}

/* ---------- Cards grid (lighting types) ---------- */
.tv-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tv-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(30, 39, 46, 0.08);
}

.tv-specs li {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--yellow-soft);
  border: 1px solid rgba(251, 197, 49, 0.45);
  font-size: 13px;
  font-weight: 700;
  color: #6b4d00;
}

/* ---------- Lux levels ---------- */
.lux-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.lux {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px 22px;
  border-radius: 18px;
  background: var(--dark-2);
  border: 1px solid var(--line-on-dark);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s var(--ease-out);
}

.lux::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}

.lux:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 197, 49, 0.4);
}

.lux:hover::before {
  transform: scaleX(1);
}

.lux b {
  align-self: flex-start;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--yellow);
  letter-spacing: -0.01em;
}

.lux span {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-dark-2);
}

/* ---------- Formula cards ---------- */
.tv-fx {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tv-fx--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fx {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(30, 39, 46, 0.08);
  box-shadow: 0 1px 2px rgba(30, 39, 46, 0.04), 0 10px 26px rgba(30, 39, 46, 0.05);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}

.fx:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 197, 49, 0.6);
  box-shadow: 0 1px 2px rgba(30, 39, 46, 0.04), 0 20px 40px rgba(30, 39, 46, 0.1);
}

.fx__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #505b64;
}

.fx__label::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--yellow-hover);
}

.fx__eq {
  padding: 16px 14px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--white);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow-x: auto;
}

.fx__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: #505b64;
}

.fx-group + .fx-group {
  margin-top: 64px;
}

.fx-group__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 900;
  line-height: 1.2;
}

.fx-group__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--yellow);
  color: var(--dark);
}

.fx-group__icon svg {
  width: 22px;
  height: 22px;
}

/* ---------- Jump links under the page header ---------- */
.tv-jump {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  background: var(--dark-0);
  border-bottom: 1px solid var(--line-on-dark);
}

.tv-jump__inner {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 10px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tv-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--on-dark-2);
  transition: background 0.2s, color 0.2s;
}

.tv-jump a svg {
  width: 17px;
  height: 17px;
  color: var(--yellow);
}

.tv-jump a:hover {
  background: rgba(245, 246, 250, 0.08);
  color: var(--white);
}

.tv-tools .section {
  scroll-margin-top: 60px;
}

/* ==========================================================================
   Calculators
   ========================================================================== */
.tv-calc {
  max-width: 720px;
  margin: 0 auto;
}

/* Phase / mode switch: the dark bar with a yellow active tab, as in the services tabs */
.vd-mode-toggle {
  display: flex;
  width: 100%;
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  background: var(--dark);
  box-shadow: 0 18px 40px rgba(30, 39, 46, 0.18);
}

.vd-mode-btn {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 700;
  color: var(--on-dark-2);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.vd-mode-btn:hover {
  color: var(--white);
}

.vd-mode-btn--active,
.vd-mode-btn--active:hover {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 6px 18px rgba(251, 197, 49, 0.35);
}

/* Conductor material: two option cards */
.vd-mat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vd-mat-btn {
  padding: 14px 18px;
  border: 1.5px solid rgba(30, 39, 46, 0.14);
  border-radius: 14px;
  background: #fff;
  text-align: right;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--dark);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.vd-mat-btn:hover {
  border-color: var(--dark);
}

.vd-mat-btn--active {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--yellow);
  box-shadow: 0 12px 28px rgba(30, 39, 46, 0.18);
}

.vd-mat-rho {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7580;
  direction: ltr;
  text-align: right;
}

.vd-mat-btn--active .vd-mat-rho {
  color: var(--on-dark-2);
}

/* Fields */
.vd-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.form-row input,
.form-row select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid rgba(30, 39, 46, 0.14);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--dark);
  direction: rtl;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row select {
  appearance: none;
  padding-left: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e272e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center / 18px;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--yellow-hover);
  box-shadow: 0 0 0 4px rgba(251, 197, 49, 0.28);
}

/* Active / reactive current, live under the inputs */
.vd-components {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--yellow-soft);
  border: 1px solid rgba(251, 197, 49, 0.45);
}

.vd-component-label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #505b64;
}

.vd-component-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  direction: ltr;
  text-align: right;
}

.vd-go {
  width: 100%;
  margin-top: 6px;
}

.vd-go svg {
  rotate: 0deg;
}

/* Result: verdict banner + rows */
#vd-results {
  max-width: none !important;
}

.vd-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 24px 28px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(30, 39, 46, 0.16);
}

.vd-verdict--pass { background: #1d7a46; }
.vd-verdict--warn { background: #c26a12; }
.vd-verdict--fail { background: #b8352a; }

#vd-res-dv {
  direction: ltr;
  text-align: right;
}

.vd-verdict-badge {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.vd-result-rows {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(30, 39, 46, 0.1);
}

.vd-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  font-size: 15px;
  border-bottom: 1px solid rgba(30, 39, 46, 0.08);
}

.vd-result-row:last-child {
  border-bottom: none;
}

.vd-result-row span:first-child {
  flex: 1;
  color: #505b64;
}

.vd-result-row span:last-child {
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
  unicode-bidi: plaintext;
}

.vd-result-row--highlight {
  background: var(--yellow-soft);
}

.vd-result-row--highlight span:last-child {
  color: #7a5500;
}

/* Cable calculator: each block is a card, like the service cards */
.tv-calc--cc > div > div {
  max-width: none !important;
}

.calc-box {
  padding: 26px 28px !important;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(30, 39, 46, 0.08);
  box-shadow: 0 1px 2px rgba(30, 39, 46, 0.04), 0 12px 30px rgba(30, 39, 46, 0.06);
}

.calc-box__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 19px;
  font-weight: 800;
  color: var(--dark);
}

.calc-box__title::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--yellow);
}

.basic-params-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.basic-params-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.bp-pill-full {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Choice chips: white, dark when chosen (as in the contact form) */
.cc-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1.5px solid rgba(30, 39, 46, 0.14);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cc-pill:hover {
  border-color: var(--dark);
}

.cc-pill--on,
.cc-pill--on:hover {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--yellow);
}

/* On / off switches for the correction tables */
.cc-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cc-toggle-row > span {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--dark) !important;
}

.cc-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.cc-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9dde3;
  transition: background 0.25s;
}

.cc-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 39, 46, 0.25);
  transition: transform 0.25s var(--ease-out), background 0.25s;
}

.cc-switch input:checked + .cc-slider {
  background: var(--dark);
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(-20px);
  background: var(--yellow);
}

.cc-switch input:focus-visible + .cc-slider {
  outline: 2px solid var(--yellow-hover);
  outline-offset: 3px;
}

/* The result card is dark, with the value in yellow. The calculator script colours
   its numbers through the older variables, so they are re-pointed inside it. */
.calc-result {
  --clr-yellow-dark: var(--yellow);
  --clr-heading: var(--white);
  --clr-muted: var(--on-dark-2);
  --clr-border: var(--line-on-dark);
  --clr-eyebrow: var(--yellow);
  --clr-bg-card: var(--dark-2);
  --clr-yellow-light: rgba(251, 197, 49, 0.16);
  position: relative;
  padding: 28px 30px !important;
  border-radius: 22px;
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 24px 50px rgba(30, 39, 46, 0.25);
  overflow: hidden;
}

.calc-result::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--yellow);
}

#cc-frv,
#cc-rrv {
  unicode-bidi: plaintext;
  text-align: right;
  font-size: 46px !important;
}

/* Iz table in the reverse mode */
.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.data-table thead th {
  padding: 0 14px 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: var(--clr-eyebrow);
}

.data-table tbody td {
  padding: 12px 14px;
  font-size: 14.5px;
  background: var(--clr-bg-card);
  color: var(--clr-heading);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.data-table tbody td:first-child {
  border-radius: 0 10px 10px 0;
  border-right: 1px solid var(--clr-border);
}

.data-table tbody td:last-child {
  border-radius: 10px 0 0 10px;
  border-left: 1px solid var(--clr-border);
}

.data-table tbody tr.cc-match td {
  background: var(--clr-yellow-light);
  border-color: rgba(251, 197, 49, 0.5);
  font-weight: 800;
}

.data-table tbody tr.cc-fail td {
  color: rgba(245, 246, 250, 0.35);
}

.spec-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--dark);
  font-size: 12px;
  font-weight: 800;
}

/* ==========================================================================
   Electricity law viewer
   ========================================================================== */
.tv-law {
  background: var(--dark-0);
}

.tv-law .topbar {
  background: var(--dark);
  border-bottom-color: var(--line-on-dark);
}

.viewer-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  padding-top: var(--topbar-h);
  background: var(--dark-0);
}

.lv-topbar,
.lv-bottombar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 max(28px, env(safe-area-inset-right));
  background: var(--dark-2);
  color: var(--white);
}

.lv-topbar {
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid var(--line-on-dark);
}

.lv-bottombar {
  height: 54px;
  border-top: 1px solid var(--line-on-dark);
}

.lv-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lv-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 8px 20px rgba(251, 197, 49, 0.25);
  transition: background 0.2s, scale 0.1s, opacity 0.2s;
}

.lv-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.lv-btn:hover {
  background: var(--yellow-hover);
}

.lv-btn:active {
  scale: 0.95;
}

.lv-btn:disabled {
  background: var(--dark-4);
  color: var(--on-dark-3);
  box-shadow: none;
  cursor: default;
}

.lv-jump {
  width: 72px;
  height: 42px;
  padding: 0 6px;
  border-radius: 12px;
  border: 1.5px solid var(--line-on-dark);
  background: var(--dark);
  color: var(--white);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lv-jump:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(251, 197, 49, 0.2);
}

.lv-title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-title svg {
  color: var(--yellow);
}

.lv-title span {
  color: var(--yellow);
}

.lv-info {
  min-width: 110px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--on-dark-2);
  white-space: nowrap;
}

.lv-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 50%, rgba(251, 197, 49, 0.07), transparent 70%),
    var(--dark-0);
}

.lv-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  transition: transform 0.15s;
}

.lv-placeholder {
  padding: 60px 24px;
  text-align: center;
  color: var(--on-dark-2);
}

.lv-placeholder .lv-ph-icon {
  margin-bottom: 16px;
  font-size: 4rem;
  opacity: 0.4;
}

.lv-placeholder h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}

.lv-zoom-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1.5px solid var(--line-on-dark);
  background: var(--dark);
  color: var(--white);
  transition: border-color 0.2s, background 0.2s;
}

.lv-zoom-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.lv-zoom-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.lv-zoom-lbl {
  min-width: 46px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--on-dark-2);
}

.lv-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--dark-4);
  cursor: pointer;
}

.lv-fill {
  width: 100%;
  height: 100%;
  margin-right: auto;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(251, 197, 49, 0.5);
  pointer-events: none;
  transition: width 0.2s;
}

/* ============ Responsive (tool pages) ============ */
@media (max-width: 1080px) {
  .tv-cards,
  .tv-fx,
  .tv-fx--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lux-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tv-cards,
  .tv-fx,
  .tv-fx--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .lux-grid {
    gap: 10px;
  }

  .lux {
    padding: 18px 16px 16px;
  }

  .lux b {
    font-size: 26px;
  }

  .lux span {
    font-size: 14px;
  }

  .tv-jump__inner {
    justify-content: flex-start;
  }

  .tv-jump a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .vd-mode-btn {
    min-height: 44px;
    padding: 8px 8px;
    font-size: 14px;
  }

  .vd-mat-btn {
    padding: 11px 12px;
    font-size: 15px;
  }

  .vd-mat-rho {
    font-size: 11.5px;
  }

  .vd-fields-grid {
    gap: 0 10px;
  }

  .form-row label {
    font-size: 13px;
  }

  .vd-components {
    padding: 12px 14px;
  }

  .vd-component-val {
    font-size: 18px;
  }

  .vd-verdict {
    padding: 18px 18px;
  }

  #vd-res-dv {
    font-size: 30px !important;
  }

  .vd-result-row {
    padding: 11px 14px;
    font-size: 13.5px;
  }

  .calc-box,
  .calc-result {
    padding: 18px 16px !important;
  }

  #cc-pane-fwd > div,
  #cc-pane-rev > div {
    gap: 12px !important;
  }

  .basic-params-grid {
    gap: 8px;
  }

  .cc-pill {
    padding: 8px 10px;
    font-size: 13.5px;
  }

  .cc-toggle-row > span {
    font-size: 14.5px !important;
  }

  #cc-frv,
  #cc-rrv {
    font-size: 36px !important;
  }

  .calc-result [style*="grid-template-columns:repeat(4,1fr)"] {
    gap: 4px !important;
  }

  .lv-topbar,
  .lv-bottombar {
    padding: 0 12px;
    gap: 8px;
  }

  .lv-title {
    display: none;
  }

  .lv-info {
    min-width: 0;
    font-size: 13.5px;
  }

  .lv-stage {
    padding: 8px;
  }
}

@media (max-width: 400px) {
  #cc-ftb [style*="grid-template-columns:1fr 1fr"],
  #cc-rtb [style*="grid-template-columns:1fr 1fr"],
  #cc-fg4, #cc-rg4, #cc-fg5, #cc-rg5 {
    grid-template-columns: 1fr !important;
  }
}

.section--white .hl-mark {
  background-image: linear-gradient(var(--yellow), var(--yellow));
}
