:root {
    --navy: #00085a;
    --blue: #233f76;
    --pale: #f4f5f8;
    --ink: #11183a;
    --muted: #687386;
    --line: #dce0e8;
    --good: #16744b;
    --warn: #9a5900;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--pale);
    color: var(--ink);
    font: 16px/1.45 Arial, Helvetica, sans-serif;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    border-radius: 4px;
    padding: .78rem 1rem;
    background: var(--navy);
    color: white;
    font-weight: 700;
    min-height: 44px;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.secondary {
    background: #ebedf4;
    color: var(--navy);
}

.text-button {
    background: transparent;
    color: var(--blue);
    padding: .3rem;
    min-height: auto;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 12px;
}

.header-actions .text-button {
    min-height: 44px;
}

.shell {
    width: min(100%, 760px);
    margin: auto;
    padding: 16px;
}

header, .topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.shell > header {
    background: #fff;
    border-bottom: 3px solid var(--navy);
    box-shadow: 0 2px 10px #00085a12;
    margin: -16px -16px 24px;
    padding: 14px 16px;
}

.brand {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 146px;
    height: auto;
    display: block;
}

.brand-divider {
    height: 30px;
    width: 1px;
    background: #c7ccda;
}

.brand-product {
    letter-spacing: .01em;
}

.language {
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: .85rem;
}

select {
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: .28rem;
    background: #fff;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 12px #00085a0c;
    margin: 14px 0;
}

.login {
    margin: 8vh auto;
    max-width: 440px;
    border-top: 5px solid var(--navy);
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: 1.7rem;
}

h2 {
    font-size: 1.1rem;
}

.eyebrow {
    color: var(--blue);
    font-size: .78rem;
    letter-spacing: .08em;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.muted, small {
    color: var(--muted);
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 650;
}

input, textarea {
    width: 100%;
    border: 1px solid #aab8c2;
    border-radius: 3px;
    padding: .72rem;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

details {
    margin-top: 18px;
    color: var(--muted);
}

.choice {
    grid-template-columns:auto 1fr;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.choice input {
    width: auto;
}

.choice span {
    display: grid;
}

.processes {
    display: grid;
    grid-template-columns:1fr;
    gap: 12px;
    margin: 20px 0;
}

.processes button {
    width: 100%;
    min-height: 72px;
    font-size: 1.1rem;
    text-align: left;
    padding-left: 20px;
}

.step.disabled {
    opacity: .65;
}

.step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.badge {
    display: inline-block;
    border-radius: 100px;
    background: #e8ebf3;
    color: var(--navy);
    padding: .18rem .55rem;
    font-size: .78rem;
    font-weight: 700;
}

.success {
    background: #dff5e8;
    color: var(--good);
}

.warning {
    background: #fff0d8;
    color: var(--warn);
}

.alert {
    padding: 10px 12px;
    border-radius: 3px;
}

.neutral {
    background: #edf0f6;
    color: var(--muted);
}

.error {
    background: #fde8e7;
    color: var(--danger);
}

.metrics {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.metrics div {
    background: #f5f6fa;
    padding: 9px;
    border-radius: 3px;
    display: grid;
}

.metrics small {
    font-size: .72rem;
}

.metrics strong {
    font-size: .92rem;
}

.danger {
    color: var(--danger);
}

.good {
    color: var(--good);
}

.scan-list {
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.scan-list > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.scan-list span:first-child {
    display: grid;
}

.exceptions {
    margin-top: 14px;
}

.exceptions h3 {
    font-size: .9rem;
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-preview {
    display: block;
    max-width: 100%;
    max-height: 180px;
    margin-top: 12px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.finish {
    background: #f7f8fc;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: end center;
    padding: 12px;
    background: #00085a99;
}

.modal {
    position: relative;
    width: min(100%, 600px);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    padding: 24px;
    border-radius: 6px 6px 3px 3px;
    box-shadow: 0 12px 48px #0005;
}

.icon-close {
    position: absolute;
    right: 10px;
    top: 8px;
    min-height: 36px;
    padding: 0 12px;
    background: transparent;
    color: var(--ink);
    font-size: 1.8rem;
}

#camera-area video, #photo-camera-area video {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 3px;
    background: #17212b;
    margin: 10px 0;
}

.demo-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.completion {
    text-align: center;
    margin-top: 15vh;
    border-top: 5px solid var(--navy);
}

.completion-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #dff5e8;
    color: var(--good);
    font-size: 2rem;
    font-weight: 800;
}

@media (max-width: 440px) {
    .shell {
        padding: 12px;
    }

    .shell > header {
        margin: -12px -12px 20px;
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .metrics {
        grid-template-columns:1fr;
    }

    .language span, .brand-divider, .brand-product {
        display: none;
    }

    .brand-logo {
        width: 126px;
    }
}
