:root {
    font-family: system-ui, sans-serif;
    color: #193039;
    background: #f2f6f7;
    line-height: 1.5;
}

* { box-sizing: border-box; }

body { margin: 0; }

h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.15;
}

a { color: #075568; }

:focus-visible {
    outline: 3px solid #ca601e;
    outline-offset: 3px;
}

button {
    min-height: 2.75rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 0.375rem;
    background: #075568;
    color: white;
    font: inherit;
    cursor: pointer;
}

.master-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr));
    gap: 1rem;
    align-items: start;
}

.master-grid label {
    display: grid;
    gap: 0.3rem;
    margin-block: 0.65rem;
}

.master-grid input, .master-grid select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem;
    border: 1px solid #68848f;
    border-radius: 0.375rem;
    background: white;
    color: inherit;
    font: inherit;
}

.master-grid button:disabled { opacity: 0.6; cursor: wait; }

.master-field { margin-block: 0.65rem; }
.master-grid .master-field label { margin: 0 0 0.3rem; }

.workflow-panel {
    background: white;
    border: 1px solid #cbd9df;
    border-radius: 0.75rem;
    padding: clamp(1rem, 4vw, 1.75rem);
    margin-block: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.workflow-panel label { display: block; margin-block: 0.7rem 0.25rem; }

.workflow-panel input:not([type="checkbox"]), .workflow-panel select, .workflow-panel textarea {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid #68848f;
    border-radius: 0.375rem;
    color: inherit;
    background: white;
    padding: 0.45rem;
    font: inherit;
}

.workflow-panel fieldset {
    border: 1px solid #cbd9df;
    border-radius: 0.45rem;
    min-width: 0;
    margin: 1rem 0;
}

/* Controls used with gloves or on small touch screens need the same target height as the workflow buttons. */
.reviewer-form input:not([type="checkbox"]),
.reviewer-form select,
.reviewer-form textarea,
.reviewer-form summary {
    min-height: 3rem;
}

.workflow-panel .workflow-check { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.workflow-panel .quiet { background: #e5eff1; color: #075568; }
.workflow-panel button:disabled { opacity: 0.55; cursor: default; }

.inspection-starts { list-style: none; padding: 0; }
.inspection-starts button { text-align: left; }
.workflow-panel progress { width: 100%; max-width: 32rem; }

.control-filters, .control-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 0.8rem;
    align-items: end;
}

.control-totals > div { background: #edf4f6; padding: 0.65rem 0.85rem; border-radius: 0.375rem; }
.control-totals dd { margin: 0; font-size: 1.35rem; font-weight: 700; }
.control-rows { list-style: none; padding: 0; }
.control-rows > li { border-top: 1px solid #cbd9df; padding: 0.85rem 0; }
.control-rows h3, .control-rows p { margin: 0 0 0.4rem; }
.control-filter { align-self: start; }
.touch-link, .workflow-panel button {
    box-sizing: border-box;
    min-height: 3rem;
}
.touch-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: 0.375rem;
    background: #e5eff1;
    color: #075568;
}

.master-grid .master-check { display: flex; align-items: center; gap: 0.65rem; min-height: 2.75rem; }
.master-grid .master-check input { width: auto; min-height: 0; }

.workflow-panel summary {
    min-height: 3rem;
    width: fit-content;
    padding-block: 0.7rem;
    cursor: pointer;
    color: #075568;
}

.workflow-panel h3[tabindex="-1"]:focus {
    outline: 2px solid #00596f;
    outline-offset: 0.3rem;
}

.qr-image, .qr-video {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block: 0.75rem;
}

.qr-video {
    width: min(100%, 28rem);
    background: #15252b;
}

.qr-video[hidden] {
    display: none;
}

.qr-code-text {
    overflow-wrap: anywhere;
}
