#js-tool-container-led-resistor-calculator .ld-app { display: flex; flex-direction: column; gap: 22px; color: var(--text-primary); --ld-accent: #b45309; --ld-accent-light: rgba(180, 83, 9, 0.1); --ld-body: #e8d9b5; --ld-lead: #9aa3ad; }
html[data-theme="dark"] #js-tool-container-led-resistor-calculator .ld-app { --ld-accent: #f59e0b; --ld-accent-light: rgba(245, 158, 11, 0.12); --ld-body: #4a4234; --ld-lead: #5c6470; }
#js-tool-container-led-resistor-calculator .tbcalc-fieldset { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px 16px; margin: 0 0 14px; }
#js-tool-container-led-resistor-calculator .tbcalc-legend { padding: 0 6px; font-weight: 600; font-size: 0.95rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .tbcalc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
#js-tool-container-led-resistor-calculator .tbcalc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
#js-tool-container-led-resistor-calculator .tbcalc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#js-tool-container-led-resistor-calculator .tbcalc-hint { font-size: 0.8rem; line-height: 1.35; color: var(--text-muted); }


#js-tool-container-led-resistor-calculator .ld-outcome { display: flex; flex-direction: column; gap: 14px; min-width: 0; }


#js-tool-container-led-resistor-calculator .ld-hero { border: 1px solid var(--border-color); border-left: 3px solid var(--ld-accent); border-radius: var(--radius-md); background: var(--ld-accent-light); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; }
#js-tool-container-led-resistor-calculator .ld-hero-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#js-tool-container-led-resistor-calculator .ld-hero-label { font-size: 0.9rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-hero-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#js-tool-container-led-resistor-calculator .ld-hero-value { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 700; line-height: 1.05; color: var(--text-primary); font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .tbcalc-unit { font-size: 1rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-hero-note { margin: 0; font-size: 0.86rem; line-height: 1.4; color: var(--text-secondary); }


#js-tool-container-led-resistor-calculator .ld-comp { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 20px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background-color: var(--bg-secondary); background-image: linear-gradient(var(--border-color) 1px, transparent 1px), linear-gradient(90deg, var(--border-color) 1px, transparent 1px); background-size: 14px 14px; }
#js-tool-container-led-resistor-calculator .ld-resistor { position: relative; padding: 0 30px; }
#js-tool-container-led-resistor-calculator .ld-resistor::before, #js-tool-container-led-resistor-calculator .ld-resistor::after { content: ''; position: absolute; top: 50%; width: 30px; height: 2px; background: var(--ld-lead); transform: translateY(-50%); }
#js-tool-container-led-resistor-calculator .ld-resistor::before { left: 0; }
#js-tool-container-led-resistor-calculator .ld-resistor::after { right: 0; }
#js-tool-container-led-resistor-calculator .ld-resistor-body { display: flex; gap: 5px; align-items: center; justify-content: center; padding: 17px 16px; position: relative; border-radius: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.07)), var(--ld-body); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.14), 0 1px 2px var(--shadow-sm); min-width: 128px; }
#js-tool-container-led-resistor-calculator .ld-resistor-body::before, #js-tool-container-led-resistor-calculator .ld-resistor-body::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8px; background: linear-gradient(180deg, #dfe2e8, #a9aeb8); }
#js-tool-container-led-resistor-calculator .ld-resistor-body::before { left: 0; border-radius: 12px 0 0 12px; }
#js-tool-container-led-resistor-calculator .ld-resistor-body::after { right: 0; border-radius: 0 12px 12px 0; }
html[data-theme="dark"] #js-tool-container-led-resistor-calculator .ld-resistor-body { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.5), 0 1px 2px rgba(255, 255, 255, 0.04); }
html[data-theme="dark"] #js-tool-container-led-resistor-calculator .ld-resistor-body::before, html[data-theme="dark"] #js-tool-container-led-resistor-calculator .ld-resistor-body::after { background: linear-gradient(180deg, #4a4e57, #2c2f36); }
#js-tool-container-led-resistor-calculator .ld-band { display: block; width: 13px; height: 36px; border-radius: 3px; }
#js-tool-container-led-resistor-calculator .ld-band-black { background: #222326; }
#js-tool-container-led-resistor-calculator .ld-band-brown { background: #7a4a21; }
#js-tool-container-led-resistor-calculator .ld-band-red { background: #c9302c; }
#js-tool-container-led-resistor-calculator .ld-band-orange { background: #e8822e; }
#js-tool-container-led-resistor-calculator .ld-band-yellow { background: #e6c229; }
#js-tool-container-led-resistor-calculator .ld-band-green { background: #3d8b4f; }
#js-tool-container-led-resistor-calculator .ld-band-blue { background: #3563a8; }
#js-tool-container-led-resistor-calculator .ld-band-violet { background: #6b4f9e; }
#js-tool-container-led-resistor-calculator .ld-band-grey { background: #8a8f98; }
#js-tool-container-led-resistor-calculator .ld-band-white { background: #f2f3f5; }
#js-tool-container-led-resistor-calculator .ld-band-gold { background: #c9a227; }
#js-tool-container-led-resistor-calculator .ld-band-placeholder { color: var(--text-muted); font-size: 0.9rem; }
#js-tool-container-led-resistor-calculator .ld-resistor-caption { font-size: 0.78rem; color: var(--text-secondary); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }


#js-tool-container-led-resistor-calculator .tbcalc-status { border: 1px solid var(--border-color); border-left: 4px solid var(--accent-primary); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.9rem; line-height: 1.45; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .tbcalc-status.warn { border-left-color: var(--warning); background: var(--warning-light); color: var(--text-primary); }
#js-tool-container-led-resistor-calculator .tbcalc-status.danger { border-left-color: var(--danger); background: var(--danger-light); color: var(--text-primary); }


#js-tool-container-led-resistor-calculator .ld-circuit { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px 14px; }
#js-tool-container-led-resistor-calculator .ld-circuit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
#js-tool-container-led-resistor-calculator .ld-circuit-title { font-size: 0.88rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-circuit-total { font-size: 0.86rem; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-circuit-total output { font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-circuit-bar { display: flex; height: 16px; border-radius: 3px; overflow: hidden; background: var(--bg-tertiary); }
#js-tool-container-led-resistor-calculator .ld-circuit-seg { display: block; height: 100%; transition: width 150ms ease-out; }
#js-tool-container-led-resistor-calculator .ld-circuit-seg-led { background: var(--accent-primary); opacity: 0.85; }
#js-tool-container-led-resistor-calculator .ld-circuit-seg-r { background: var(--ld-accent); }
#js-tool-container-led-resistor-calculator .ld-circuit-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 10px; }
#js-tool-container-led-resistor-calculator .ld-circuit-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-circuit-chip b { font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-chip-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
#js-tool-container-led-resistor-calculator .ld-circuit-chip-led .ld-chip-dot { background: var(--accent-primary); opacity: 0.85; }
#js-tool-container-led-resistor-calculator .ld-circuit-chip-r .ld-chip-dot { background: var(--ld-accent); }
#js-tool-container-led-resistor-calculator .ld-circuit-chip-p { margin-left: auto; }
#js-tool-container-led-resistor-calculator .ld-circuit-chip-p output { font-variant-numeric: tabular-nums; }


#js-tool-container-led-resistor-calculator .ld-ruler { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px 14px 10px; }
#js-tool-container-led-resistor-calculator .ld-ruler-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
#js-tool-container-led-resistor-calculator .ld-ruler-title { font-size: 0.88rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-ruler-title b { font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-ruler-sel { font-size: 0.86rem; font-weight: 650; color: var(--ld-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
#js-tool-container-led-resistor-calculator .ld-ruler-scale { position: relative; height: 58px; margin-top: 6px; min-width: 0; }
#js-tool-container-led-resistor-calculator .ld-ruler-scale::before { content: ''; position: absolute; left: 0; right: 0; bottom: 13px; height: 1px; background: var(--border-color); }
#js-tool-container-led-resistor-calculator .ld-ruler-tick { position: absolute; bottom: 13px; width: 1px; height: 9px; background: var(--text-muted); transform: translateX(-50%); }
#js-tool-container-led-resistor-calculator .ld-ruler-tick-std { height: 17px; background: var(--ld-accent); }
#js-tool-container-led-resistor-calculator .ld-ruler-tick-label { position: absolute; bottom: 31px; transform: translateX(-50%); font-size: 0.78rem; font-weight: 650; color: var(--ld-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-ruler-caret { position: absolute; bottom: 7px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--text-secondary); transform: translateX(-50%); }
#js-tool-container-led-resistor-calculator .ld-ruler-caret-label { position: absolute; bottom: -2px; transform: translateX(-50%); font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
#js-tool-container-led-resistor-calculator .ld-ruler-empty { font-size: 0.86rem; color: var(--text-muted); }


#js-tool-container-led-resistor-calculator .ld-verdict { display: flex; flex-wrap: wrap; border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
#js-tool-container-led-resistor-calculator .ld-verdict-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; flex: 1 1 150px; border-left: 1px solid var(--border-color); }
#js-tool-container-led-resistor-calculator .ld-verdict-item:first-child { border-left: 0; }
#js-tool-container-led-resistor-calculator .ld-verdict-label { font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
#js-tool-container-led-resistor-calculator .ld-verdict-value { font-size: 1.05rem; font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .ld-verdict-item:first-child .ld-verdict-value { color: var(--ld-accent); }


#js-tool-container-led-resistor-calculator .ld-ledger { border: 1px solid var(--border-color); border-radius: var(--radius-sm); display: flex; flex-direction: column; }
#js-tool-container-led-resistor-calculator .ld-ledger-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border-color); }
#js-tool-container-led-resistor-calculator .ld-ledger-row:first-child { border-top: 0; }
#js-tool-container-led-resistor-calculator .ld-ledger-key { font-size: 0.88rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .ld-ledger-val { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }


#js-tool-container-led-resistor-calculator .ld-details { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#js-tool-container-led-resistor-calculator .tbcalc-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
#js-tool-container-led-resistor-calculator .tbcalc-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
#js-tool-container-led-resistor-calculator .ld-table-caption { caption-side: top; text-align: left; padding: 10px 14px; font-size: 0.84rem; color: var(--text-secondary); }
#js-tool-container-led-resistor-calculator .tbcalc-table th, #js-tool-container-led-resistor-calculator .tbcalc-table td { padding: 8px 14px; text-align: right; border-top: 1px solid var(--border-color); font-variant-numeric: tabular-nums; }
#js-tool-container-led-resistor-calculator .tbcalc-table thead th { text-align: right; color: var(--text-secondary); font-weight: 600; border-top: 0; }
#js-tool-container-led-resistor-calculator .tbcalc-table th[scope="row"], #js-tool-container-led-resistor-calculator .tbcalc-table thead th:first-child { text-align: left; }
#js-tool-container-led-resistor-calculator .ld-cand-selected { background: var(--ld-accent-light); }
#js-tool-container-led-resistor-calculator .ld-limits { margin: 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); }

@media (max-width: 760px) {
  #js-tool-container-led-resistor-calculator .tbcalc-grid-3, #js-tool-container-led-resistor-calculator .tbcalc-grid-2 { grid-template-columns: 1fr; }
  #js-tool-container-led-resistor-calculator .ld-hero { grid-template-columns: 1fr; }
  #js-tool-container-led-resistor-calculator .ld-comp { justify-self: start; }
}
@media (max-width: 480px) {
  #js-tool-container-led-resistor-calculator .ld-verdict-item { flex-basis: 44%; }
  #js-tool-container-led-resistor-calculator .ld-circuit-chip-p { margin-left: 0; }
}
