/* Výpočty používají společnou paletu a jednotné odsazení 12 px. */
.three-phase { min-width: 0; padding: var(--layout-gap); }
.three-phase > * { margin: 0 0 var(--layout-gap); }
.three-phase > :last-child { margin-bottom: 0; }
.three-phase [hidden] { display: none !important; }
.three-phase h3, .three-phase p, .three-phase figure, .three-phase dl { margin-top: 0; }
.three-phase form { display: grid; gap: var(--layout-gap); }
.three-phase-toolbar { display: flex; gap: var(--layout-gap); align-items: end; flex-wrap: wrap; }
.three-phase-toolbar > label { flex: 1 1 220px; }
.three-phase label { display: grid; gap: 4px; min-width: 0; font-weight: 700; }
.three-phase input, .three-phase select, .three-phase button { box-sizing: border-box; min-height: 40px; min-width: 0; padding: 8px; border: 1px solid var(--field-border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; }
.three-phase input, .three-phase select { width: 100%; }
.three-phase button { cursor: pointer; }
.three-phase button:hover { background: var(--surface-hover); }
.three-phase input[aria-invalid="true"] { border-color: var(--danger); }
.three-phase-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--layout-gap); }
.three-phase-note { color: var(--muted); }
.three-phase-error { margin: 0; color: var(--danger); }
.three-phase-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--layout-gap); }
.three-phase-results > div { min-width: 0; padding: var(--layout-gap); border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.three-phase-results dt { color: var(--text-secondary); }
.three-phase-results dd { margin: 4px 0 0; color: var(--heading); font-size: 23px; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.three-phase-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--layout-gap); }
.three-phase-card { min-width: 0; margin: 0; padding: var(--layout-gap); border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.three-phase-card h3 { margin-bottom: var(--layout-gap); }
.three-phase-card > :last-child { margin-bottom: 0; }
.three-phase-formulas { display: grid; gap: 8px; margin: 0; color: var(--heading); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.three-phase-formulas p { margin: 0; }
/* Výkonový trojúhelník je vektorový, bez obrázků a bez vodorovného posouvání. */
.three-phase svg { display: block; width: 100%; max-width: 360px; margin-inline: auto; }
.three-phase svg polygon { fill: var(--surface-raised); }
.three-phase svg path { fill: none; stroke-width: 3; }
.three-phase svg .power-p { stroke: var(--heading); }
.three-phase svg .power-q { stroke: var(--link); }
.three-phase svg .power-s { stroke: var(--accent); }
.three-phase svg .angle { stroke: var(--muted); stroke-width: 1.5; }
.three-phase svg text { fill: var(--text); font: bold 18px Arial, sans-serif; text-anchor: middle; }
.three-phase figcaption { color: var(--heading); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
    .three-phase-detail { grid-template-columns: minmax(0, 1fr); }
    .three-phase-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
    .three-phase-fields { grid-template-columns: minmax(0, 1fr); }
    .three-phase-results dd { font-size: 20px; }
}
