:root {
    font: 1rem/1.5 system-ui, sans-serif;
    color: #152038;
    background: #f3f5f8;
}

* { box-sizing: border-box; }

body { margin: 0; }

main {
    width: min(100% - 2rem, 42rem);
    margin: clamp(1.5rem, 7vw, 4rem) auto;
}

h1 {
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

header p {
    margin: .4rem 0 1.5rem;
    color: #4a5870;
}

details, #scanner {
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #d5dde8;
    border-radius: .65rem;
    background: #fff;
}

details { margin-bottom: .85rem; }

summary, label { font-weight: 650; }

summary { cursor: pointer; }

details[open] summary { margin-bottom: .9rem; }

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

label { display: block; margin-bottom: .35rem; }

.controls {
    display: flex;
    align-items: stretch;
    gap: .55rem;
}

input, select, button {
    min-height: 2.75rem;
    padding: .5rem .7rem;
    border: 1px solid #8493a8;
    border-radius: .35rem;
    font: inherit;
}

input, select {
    min-width: 0;
    width: 100%;
    background: #fff;
    color: inherit;
}

button {
    flex-shrink: 0;
    border-color: #1c407a;
    background: #1c407a;
    color: #fff;
    font-weight: 650;
    cursor: pointer;
}

:disabled {
    opacity: .58;
    cursor: default;
}

:focus-visible {
    outline: 2px solid #2763c1;
    outline-offset: 3px;
}

a { color: #1d4e98; }

.hint, .status {
    margin: .55rem 0 0;
    font-size: .9rem;
}

.hint { color: #4a5870; }

.status:empty { margin: 0; }

.status[data-error] { color: #982c29; }

#printers { margin-top: 1rem; }

@media (max-width: 34rem) {
    .controls { flex-direction: column; }
}
