.study-page.arc-calc-page { --study-article-hero-image: url("images/arc-flash-calculator-hero.png"); }
.arc-calc-page .af-intro { max-width: 900px; }
.arc-calc-page .af-intro p + p { margin-top: 12px; }
/* Holds the electrode configuration symbols. display: none would stop their gradients rendering. */
.af-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Each field spans label, input and helper rows shared with its neighbour (CSS subgrid), so side-by-side
   inputs stay aligned whether or not their helper text wraps. The 20px field spacing moves into padding. */
.arc-calc-page .calculator-fields { row-gap: 0; margin-bottom: -20px; }
.arc-calc-page .calculator-fields > .calc-field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; padding-bottom: 20px; }
.arc-calc-page .calculator-fields > .calc-field > label { align-self: end; margin-bottom: 5px; }
.arc-calc-page .calculator-fields > .calc-field > small { margin-top: 5px; }
.arc-calc-page .af-method-note { margin: 16px 0 0; }
.arc-calc-page .af-method-note strong { color: var(--navy); }
.arc-calc-page .af-equipment-field { margin-bottom: 20px; }
/* Standard equipment values are shown read-only, in the site's calculated-value colors. */
.arc-calc-page #power-form input[type="number"]:read-only:not(:disabled) { background: #fff8e9; border-color: #ad7e25; }
.arc-calc-page #power-form .af-enclosure.is-inactive .af-group-label,
.arc-calc-page #power-form .af-enclosure.is-inactive label { color: #607080; }

.arc-calc-page .af-enclosure { margin-top: 20px; padding: 16px; border: 1px solid var(--gray-300); border-radius: 8px; background: var(--gray-50); }
.arc-calc-page .af-enclosure-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.arc-calc-page .af-group-label { margin: 0; color: var(--navy); font-size: .9rem; font-weight: 700; }
.arc-calc-page #power-form .af-enclosure-head select { width: 84px; min-height: 36px; padding: 4px 8px; font-size: .86rem; font-weight: 700; }
.arc-calc-page .af-enclosure-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.arc-calc-page .af-enclosure > small { display: block; margin-top: 10px; }

.arc-calc-page .af-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arc-calc-page .af-config-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 10px 8px 12px;
  border: 1px solid #9babb9;
  border-radius: 8px;
  background: white;
  color: var(--navy);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}
.arc-calc-page .af-config-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.arc-calc-page .af-config-card svg { display: block; width: 100%; max-width: 136px; height: auto; aspect-ratio: 120 / 84; }
.arc-calc-page .af-config-name { font-size: .92rem; font-weight: 700; }
.arc-calc-page .af-config-desc { color: #526477; font-size: .75rem; line-height: 1.35; }
.arc-calc-page .af-config-card:hover { border-color: var(--blue); }
.arc-calc-page .af-config-card:has(input:checked) { border-color: var(--blue); background: #eef5f9; box-shadow: inset 0 0 0 1px var(--blue); }
.arc-calc-page .af-config-card:has(input:focus-visible) { outline: 3px solid var(--blue-light); outline-offset: 2px; }
/* A check badge marks each selected card, which matters most for the multi-select checkboxes. */
.arc-calc-page .af-config-card::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #9babb9;
  border-radius: 50%;
  background: white;
}
.arc-calc-page .af-config-card:has(input[type="checkbox"])::after { border-radius: 4px; }
.arc-calc-page .af-config-card:has(input:checked)::after {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.arc-calc-page .af-config-card:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.arc-calc-page .af-config-card:has(input:disabled):hover { border-color: #9babb9; }
.arc-calc-page .af-config-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.arc-calc-page .af-config-compact .af-config-card { padding: 8px 4px 8px; }
.arc-calc-page .af-config-compact .af-config-card::after { top: 5px; right: 5px; width: 14px; height: 14px; background-size: 12px; }
.arc-calc-page fieldset[data-ieee-only] > .calc-note { margin: 12px 0 0; }

.arc-calc-page .af-check { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--navy); font-size: .9rem; font-weight: 700; cursor: pointer; }
.arc-calc-page #power-form .af-check input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.arc-calc-page #wc-custom-fields { margin-top: 14px; }
.arc-calc-page .wc-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.arc-calc-page .wc-rows:empty { display: none; }
.arc-calc-page #power-form .wc-rows .af-check { margin: 0; padding: 10px 12px; border: 1px solid #9babb9; border-radius: 6px; font-weight: 400; line-height: 1.4; }
.arc-calc-page #power-form .wc-rows .af-check:has(input:checked) { border-color: var(--blue); background: #eef5f9; }
.arc-calc-page .wc-rows strong { display: block; }
.arc-calc-page .wc-rows small { display: block; color: #526477; font-size: .78rem; }

/* Results pane. */
.arc-calc-page .calculator-errors p, .arc-calc-page .calculator-warnings p { margin: 0; }
.arc-calc-page .calculator-errors p + p { margin-top: 6px; }
.arc-calc-page #power-form fieldset:disabled legend { color: #607080; }
.arc-calc-page .calculator-results .af-governing dt { color: white; font-weight: 700; }
.arc-calc-page .calculator-results .af-governing dd output { color: #efc571; font-weight: 700; }
.arc-calc-page .calculator-results .result-pair { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.arc-calc-page .calculator-results .result-pair-label { display: block; color: #8fa3b5; font-size: .78rem; }
.arc-calc-page .af-results-table-wrap { margin-top: 10px; overflow-x: auto; }
.arc-calc-page #wc-results .af-results-table-wrap { margin-top: 18px; }
.arc-calc-page .af-results-table { width: 100%; border-collapse: collapse; color: white; font-size: .82rem; font-variant-numeric: tabular-nums; line-height: 1.35; }
.arc-calc-page .af-results-table th, .arc-calc-page .af-results-table td { padding: 8px 6px; border-bottom: 1px solid #304251; text-align: left; vertical-align: top; }
.arc-calc-page .af-results-table th:first-child, .arc-calc-page .af-results-table td:first-child { padding-left: 0; }
.arc-calc-page .af-results-table th:last-child, .arc-calc-page .af-results-table td:last-child { padding-right: 0; }
.arc-calc-page .af-results-table thead th { color: #bdcddb; font-size: .74rem; font-weight: 700; }
.arc-calc-page .af-results-table tbody th { color: #bdcddb; font-weight: 400; }
.arc-calc-page .af-results-table td.is-governing { color: #efc571; font-weight: 700; }
.arc-calc-page #af-case-table td { white-space: nowrap; }
.arc-calc-page #af-case-work { margin-top: 8px; }
.arc-calc-page .wc-table tbody th { color: white; font-weight: 700; white-space: nowrap; }
.arc-calc-page .wc-table .wc-group th { padding-top: 14px; color: #efc571; font-size: .78rem; font-weight: 700; white-space: normal; border-bottom-color: #4a6178; }
.arc-calc-page .wc-table .wc-afb { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.arc-calc-page .wc-table small { display: block; color: #8fa3b5; font-size: .72rem; font-weight: 400; }
.arc-calc-page .wc-table .result-work { margin-top: 4px; }
.arc-calc-page .wc-notes { margin: 10px 0 0; color: #8fa3b5; font-size: .75rem; line-height: 1.45; }
.arc-calc-page .wc-download { margin-top: 14px; }
.arc-calc-page .wc-download .btn { font: inherit; font-size: 0.85rem; font-weight: 700; padding: 8px 14px; color: white; background: transparent; border: 1px solid #5d7489; box-shadow: none; }
.arc-calc-page .wc-download .btn:hover { border-color: #efc571; color: #efc571; background: transparent; box-shadow: none; }
.arc-calc-page .af-plot-select { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: #bdcddb; font-size: .8rem; }
.arc-calc-page .af-plot-select select { min-width: 0; flex: 1; padding: 6px 8px; border: 1px solid #5d7489; border-radius: 6px; background: #0d2436; color: white; font: inherit; }

/* Incident energy vs distance, in the results pane colors. */
.arc-calc-page .af-figure { min-width: 0; margin: 0; }
.arc-calc-page .af-plot { display: block; width: 100%; height: auto; margin: 10px 0 8px; }
.arc-calc-page .af-plot .plot-grid line { stroke-width: 1; }
.arc-calc-page .af-plot .plot-grid line.major { stroke: #2a3f52; }
.arc-calc-page .af-plot .plot-grid line.minor { stroke: #1c3041; }
.arc-calc-page .af-plot .plot-frame { fill: none; stroke: #5d7489; stroke-width: 1; }
.arc-calc-page .af-plot .plot-tick { font-size: 10px; fill: #bdcddb; font-variant-numeric: tabular-nums; }
.arc-calc-page .af-plot .plot-axis { font-size: 10.5px; font-weight: 700; fill: white; }
.arc-calc-page .af-plot path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.arc-calc-page .af-plot .curve-governing { stroke: #efc571; stroke-width: 2.25; }
.arc-calc-page .af-plot .curve-other { stroke: #83d3ee; stroke-width: 1.5; stroke-opacity: .8; }
.arc-calc-page .af-plot .line-boundary { stroke: #e6eef5; stroke-opacity: .75; stroke-width: 1.25; stroke-dasharray: 6 4; }
.arc-calc-page .af-plot .line-target { stroke: #7fdc9a; stroke-width: 1.25; stroke-dasharray: 6 4; }
.arc-calc-page .af-plot .line-distance { stroke: #8fa3b5; stroke-width: 1; stroke-dasharray: 2 3; }
.arc-calc-page .af-plot .plot-marker { stroke: var(--navy); stroke-width: 2; }
.arc-calc-page .af-plot .marker-energy { fill: #efc571; }
.arc-calc-page .af-plot .marker-boundary { fill: #e6eef5; }
.arc-calc-page .af-plot .marker-target { fill: #7fdc9a; }
.arc-calc-page .af-plot .marker-VCB { fill: #efc571; }
.arc-calc-page .af-plot .marker-VCBB { fill: #83d3ee; }
.arc-calc-page .af-plot .marker-HCB { fill: #7fdc9a; }
.arc-calc-page .af-plot .marker-VOA { fill: #f4a582; }
.arc-calc-page .af-plot .marker-HOA { fill: #c3b1f2; }
.arc-calc-page .af-plot .plot-callout { font-size: 10px; font-weight: 700; fill: #e6eef5; paint-order: stroke; stroke: var(--navy); stroke-width: 3px; stroke-linejoin: round; }
.arc-calc-page .af-plot .curve-VCB { stroke: #efc571; }
.arc-calc-page .af-plot .curve-VCBB { stroke: #83d3ee; }
.arc-calc-page .af-plot .curve-HCB { stroke: #7fdc9a; }
.arc-calc-page .af-plot .curve-VOA { stroke: #f4a582; }
.arc-calc-page .af-plot .curve-HOA { stroke: #c3b1f2; }
.arc-calc-page .af-plot .curve-config { stroke-width: 1.5; }
.arc-calc-page .af-plot .curve-config.is-worst { stroke-width: 2.5; }
.arc-calc-page .plot-legend .swatch-governing { border-top: 2px solid #efc571; }
.arc-calc-page .plot-legend .swatch-other { border-top: 2px solid #83d3ee; }
.arc-calc-page .plot-legend .swatch-boundary { border-top: 2px dashed #e6eef5; }
.arc-calc-page .plot-legend .swatch-target { border-top: 2px dashed #7fdc9a; }
.arc-calc-page .plot-legend .swatch-VCB { border-top: 2px solid #efc571; }
.arc-calc-page .plot-legend .swatch-VCBB { border-top: 2px solid #83d3ee; }
.arc-calc-page .plot-legend .swatch-HCB { border-top: 2px solid #7fdc9a; }
.arc-calc-page .plot-legend .swatch-VOA { border-top: 2px solid #f4a582; }
.arc-calc-page .plot-legend .swatch-HOA { border-top: 2px solid #c3b1f2; }

/* Reference tables, as on the low voltage duty calculator. */
.arc-calc-page .af-table-wrap { overflow-x: auto; margin: 4px 0 10px; border: 1px solid var(--gray-300); border-radius: 8px; }
.arc-calc-page .af-table-wrap:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; }
.arc-calc-page .af-table { width: 100%; min-width: 640px; border-collapse: collapse; color: var(--navy); font-size: .88rem; font-variant-numeric: tabular-nums; }
.arc-calc-page .af-table caption { padding: 10px 12px; caption-side: top; background: var(--gray-50); border-bottom: 1px solid var(--gray-300); font-weight: 700; text-align: left; }
.arc-calc-page .af-table th, .arc-calc-page .af-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-300); text-align: left; vertical-align: top; }
.arc-calc-page .af-table thead th { background: var(--navy); color: white; font-weight: 700; white-space: nowrap; }
.arc-calc-page .af-table tbody th { font-weight: 700; }
.arc-calc-page .af-table tbody { background: white; }
.arc-calc-page .af-table tbody tr:last-child > * { border-bottom: 0; }
.arc-calc-page .af-exponent-table, .arc-calc-page .af-number-table { min-width: 420px; }
.arc-calc-page .af-exponent-table td, .arc-calc-page .af-number-table td { text-align: right; }
.arc-calc-page .af-exponent-table thead th:not(:first-child), .arc-calc-page .af-number-table thead th:not(:first-child) { text-align: right; }
.arc-calc-page #worst-case-basis .af-table-wrap { max-width: 560px; margin-top: 18px; }
.arc-calc-page .af-reduction-wrap { max-width: 640px; margin-top: 18px; }
.arc-calc-page .technical-note { color: #42576c; }
.arc-calc-page .key-definitions > div { grid-template-columns: 3.4rem minmax(0, 1fr); }
.arc-calc-page .formula-list { grid-template-columns: 1fr; }
.arc-calc-page .af-table-wrap + .formula-list { margin-top: 24px; }

@media (max-width: 520px) {
  .arc-calc-page .af-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arc-calc-page .af-config-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .arc-calc-page .af-enclosure { padding: 14px 12px; }
  .arc-calc-page .af-enclosure-fields { gap: 8px; }
}
