.wg-tool { min-width: 0; color: var(--tinte); }
.wg-tool > * + * { margin-top: 1.2rem; }
.wg-tool p { overflow-wrap: anywhere; }
.wg-form { padding: 1rem; border: 1px solid var(--linie); border-radius: var(--r); background: var(--weiss); }
.wg-form > * + * { margin-top: 1rem; }
.wg-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: end; gap: 1rem; min-width: 0; }
.wg-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.wg-fieldset legend, .wg-field label { display: block; width: 100%; margin-bottom: .4rem; padding: 0; font-weight: 600; font-size: .94rem; }
.wg-form select, .wg-form input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--linie-stark); border-radius: var(--r); padding: .6rem .65rem; color: var(--tinte); background: var(--weiss); font: inherit; font-size: 1rem; }
.wg-form select { text-overflow: ellipsis; padding-right: 1.8rem; }
.wg-form input[aria-invalid="true"] { border: 2px solid var(--rot); }
.wg-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.wg-button { min-height: 44px; max-width: 100%; padding: .65rem 1rem; border: 1px solid var(--petrol); border-radius: var(--r); color: var(--weiss); background: var(--petrol); font: 600 1rem/1.35 var(--sans); cursor: pointer; overflow-wrap: anywhere; }
.wg-button:hover { background: var(--petrol-tief); }
.wg-button-secondary { color: var(--tinte); background: var(--flaeche); border-color: var(--linie-stark); }
.wg-button-secondary:hover { color: var(--petrol-tief); background: var(--petrol-hell); border-color: var(--petrol); }
.wg-form :focus-visible, .wg-tool summary:focus-visible, .wg-table:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }
.wg-cards { display: grid; gap: .8rem; min-width: 0; }
.wg-card { border: 1px solid var(--linie); border-left: 3px solid var(--petrol); border-radius: var(--r); background: var(--weiss); padding: 1rem; min-width: 0; }
.wg-card h3 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.wg-card p { margin-top: .6rem; }
.wg-criteria, .wg-order { font-family: var(--mono); font-size: .85rem; line-height: 1.65; }
.wg-small { font-size: .88rem; color: var(--tinte-2); }
.wg-method { padding: 1rem; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); }
.wg-method h2 { margin-top: 0; font-size: 1.2rem; }
.wg-method p + p { margin-top: .7rem; }
.wg-source { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--tinte-2); font-size: .88rem; }
.wg-size-result:not(:empty), .wg-notice { padding: 1rem; border: 1px solid var(--linie); border-left: 3px solid var(--petrol); border-radius: var(--r); color: var(--tinte); background: var(--petrol-hell); }
.wg-size-result > * + * { margin-top: .7rem; }
.wg-fallback { min-width: 0; border: 1px solid var(--linie); border-radius: var(--r); background: var(--weiss); padding: 1rem; }
.wg-fallback summary { min-height: 44px; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.wg-fallback > * + * { margin-top: .8rem; }
.wg-chart + .wg-chart { margin-top: 2rem; }
.wg-chart h3 { margin-top: 0; }
.wg-chart > * + * { margin-top: .6rem; }
.wg-table { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--r); overscroll-behavior-x: contain; }
.wg-table table { min-width: 38rem; }
.wg-table tbody th { min-width: 10rem; }
.wg-table td { min-width: 5rem; }
.wg-table thead th { white-space: normal; }
.wg-table tbody tr:nth-child(even) > * { background: var(--papier); }
.wg-crosslink a { display: inline-block; min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--linie-stark); border-radius: var(--r); background: var(--weiss); }
.wg-sr-only { position: absolute; width: 1px !important; height: 1px; margin: -1px !important; padding: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 450px) {
  .wg-fields { grid-template-columns: 1fr; }
  .wg-form, .wg-method, .wg-card, .wg-fallback { padding: .8rem; }
  .wg-form select { font-size: .95rem; }
}
