@layer properties, theme, base, components, utilities;
@layer components {
  .system-calc {scroll-margin-top:90px}
  .system-calc .system-calc-heading {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
  .system-calc-badge {padding:5px 10px;border-radius:20px;background:#e6f4ee;color:#18654c;font-size:12px;font-weight:700}
  .system-calc-examples {display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
  .system-calc button {padding:9px 14px;border:1px solid #cddde9;border-radius:10px;background:#eef5fb;color:#254f73;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s}
  .system-calc button:hover {background:#dcecf8;border-color:#6d97b9}
  .system-calc-controls {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px}
  .system-calc label {display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#304b65;min-width:0}
  .system-calc input,.system-calc select {width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #bfcfdd;border-radius:10px;background:#fff;color:#172b43;font:inherit;font-size:15px}
  .system-calc :is(input,select,button):focus-visible {outline:3px solid #78afd5;outline-offset:2px}
  .system-calc [aria-invalid=true] {border-color:#b33d3d;background:#fff7f7}
  .system-calc-event {display:grid;grid-template-columns:100px minmax(0,1fr) minmax(0,1.25fr);align-items:center;gap:14px;padding:15px;border:1px solid #dae4ec;border-radius:12px;background:#f7fafc;margin-bottom:10px}
  .system-calc-event>strong {font-size:14px;color:#23445f}
  .system-calc-results {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}
  .system-calc-results>div {padding:18px;border-radius:12px;background:#f0f5f9;border:1px solid #d9e4ed;min-width:0}
  .system-calc-results dt {font-size:12px;color:#4f6578;margin-bottom:8px}
  .system-calc-results dd {margin:0;font-size:20px;font-weight:800;color:#193f60;overflow-wrap:anywhere}
  .system-calc-results>div:last-child {background:#e9f5ee;border-color:#c4dfd0}
  .system-calc [data-tone=positive] {color:#186344}.system-calc [data-tone=negative] {color:#ac3434}
  .system-calc-error {padding:14px;border:1px solid #edc8c8;background:#fff4f4;border-radius:10px;color:#9e2929}
  .system-calc details {border:1px solid #d8e3ec;border-radius:12px;padding:16px;margin-top:18px}
  .system-calc summary {font-weight:750;color:#254f73;cursor:pointer}
  .system-calc-breakdown {list-style:none!important;padding:0!important;max-height:420px;overflow:auto;margin-top:16px!important}
  .system-calc-breakdown li {padding:12px 0;border-top:1px solid #e0e8ef;margin:0!important}
  .system-calc-breakdown li>div {display:flex;justify-content:space-between;gap:12px;font-size:13px}
  .system-calc-breakdown li span {color:#576d80}.system-calc .system-calc-breakdown p {font-size:13px;margin:5px 0 0;overflow-wrap:anywhere}
  .system-calc [hidden] {display:none!important}
  @media(max-width:600px) {
    .system-calc-event {grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:10px;padding:12px}
    .system-calc-event>strong {grid-column:1/-1}.system-calc-results {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .system-calc-results>div {padding:13px}.system-calc-results dd {font-size:18px}
    .system-calc-controls {gap:12px}.system-calc-controls label:nth-last-child(-n+2){grid-column:1/-1}
  }
}
