.system-water-form { min-width: 0; }
.system-water-form [hidden] { display: none !important; }
.system-help { margin: 0 0 20px; color: var(--muted); font-size: .9rem; }
.system-rows { display: grid; gap: 22px; }
.system-component { min-width: 0; padding: 17px; margin: 0; border: 1px solid var(--line); border-radius: 16px; }
.system-component legend { padding: 0 8px; font-weight: 800; color: var(--primary); }
.system-component .form-grid + .form-grid, .system-mode-fields { margin-top: 17px; }
.system-component small { font-weight: 400; }
.system-component .field select { min-width: 0; }
.system-component-footer, .system-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 17px; }
.system-component-footer { justify-content: space-between; }
.system-component-footer output { overflow-wrap: anywhere; font-weight: 750; }
.system-remove, .system-secondary { min-height: 44px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); cursor: pointer; }
.system-actions .button { cursor: pointer; }
.system-actions small { color: var(--muted); }
.system-water-form button:disabled { opacity: .5; cursor: not-allowed; }
.system-water-form button:focus-visible, .system-copy-text:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.system-override { padding: 18px; margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; }
.system-override .check-field { background: var(--surface-2); }
.system-override .field { margin-top: 16px; }
.system-override p { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.system-error { margin: 12px 0 0; color: #b42d37; font-size: .9rem; }
:root[data-theme="dark"] .system-error { color: #ffb7bd; }
.system-component[aria-invalid="true"] { border-color: #b42d37; }
.system-result .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-result .result-main, .system-result .result-grid strong { overflow-wrap: anywhere; }
.system-breakdown { margin: 18px 0 0; }
.system-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.system-breakdown dt { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.system-breakdown dd { min-width: 0; margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 750; }
.system-handoff { display: grid; gap: 10px; margin-top: 20px; }
.system-handoff .button { text-align: center; }
.system-draft-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.system-status { min-height: 1.7em; margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.system-copy-text { width: 100%; min-height: 190px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.system-scope-list { padding-left: 20px; }
@media (max-width: 420px) {
  .system-component { padding: 12px; }
  .system-override, .system-result { padding: 16px; }
  .system-result .result-grid { grid-template-columns: 1fr; }
  .system-breakdown div { flex-direction: column; gap: 2px; }
  .system-breakdown dd { text-align: left; }
}
