:root { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: Canvas; color: CanvasText; }
.site-header, footer { max-width: 900px; margin: 0 auto; padding: 1rem; }
.site-header { display: grid; gap: .65rem; border-bottom: 1px solid color-mix(in srgb, CanvasText 20%, transparent); }
.site-header strong, .site-header span { display: block; }
#runtime { max-width: 760px; margin: 0 auto; padding: 1rem; }
.form-card { border: 1px solid color-mix(in srgb, CanvasText 22%, transparent); border-radius: 14px; padding: clamp(1rem, 4vw, 2rem); }
.integrity-meta { font-size: .85rem; opacity: .72; overflow-wrap: anywhere; }
.authority-notice { margin: 1rem 0; padding: .75rem; border: 2px solid currentColor; border-radius: 8px; font-weight: 700; }
.progress { margin-top: 1.2rem; font-weight: 650; }
.field { margin: 1.25rem 0; }
.field > label, .field-label, legend { font-weight: 650; }
.help { margin: .25rem 0 .5rem; opacity: .78; font-size: .92rem; }
input, textarea, select, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select { width: 100%; padding: .72rem; border: 1px solid color-mix(in srgb, CanvasText 38%, transparent); border-radius: 8px; background: Canvas; color: CanvasText; }
textarea { min-height: 7rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
.error { min-height: 1.4em; margin-top: .35rem; font-weight: 650; }
.error:not(:empty)::before { content: "Error: "; }
.choice-group { border: 0; padding: 0; margin: 1.25rem 0; }
.choice-row { display: flex; align-items: flex-start; gap: .65rem; padding: .45rem 0; }
.choice-row input { margin-top: .3rem; }
.calculated-output { display: block; padding: .8rem; border: 1px dashed currentColor; border-radius: 8px; font-size: 1.15rem; font-weight: 700; }
.nav-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; }
button { padding: .72rem 1rem; border-radius: 8px; border: 1px solid currentColor; background: Canvas; color: CanvasText; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
.review-section { padding: .5rem 0; }
.review-row { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid color-mix(in srgb, CanvasText 15%, transparent); }
.fatal-error { border: 2px solid currentColor; padding: 1rem; border-radius: 8px; font-weight: 700; }
@media (max-width: 430px) {
  #runtime, .site-header, footer { padding: .75rem; }
  .form-card { border-radius: 10px; }
  .review-row { grid-template-columns: 1fr; gap: .25rem; }
  .nav-actions { flex-direction: column-reverse; }
  .nav-actions button { width: 100%; }
}
@media (min-width: 768px) {
  .site-header { grid-template-columns: 1fr minmax(12rem, 18rem); align-items: end; }
  .site-header > label { grid-column: 2; grid-row: 1; align-self: start; }
  #form-selector { grid-column: 2; }
  #status { grid-column: 1 / -1; }
}
