:root {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #20324a;
    background: #f2f5f8;
    font-size: 16px;
    line-height: 1.55;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

header {
    background: #112c42;
    color: white;
    padding: 24px max(5vw, 20px);
    display: flex;
    align-items: center;
    gap: 16px;
}

header b {
    font-size: 20px;
}

header small {
    display: block;
    color: #d2dde6;
}

/* FHSS logo */
.brand-mark {
    width: 62px !important;
    height: 62px !important;
    min-width: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #c0a66b;
    border-radius: 8px;
    padding: 3px;
}

.brand-mark img {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    object-fit: contain;
    display: block;
}

main {
    max-width: 1040px;
    margin: 40px auto;
    padding: 0 22px;
}

h1 {
    font: 600 42px/1.15 Georgia, serif;
    color: #112c42;
    margin: 12px 0 20px;
}

h2 {
    font-size: 22px;
    margin: 0 0 20px;
    color: #173e58;
}

h3 {
    font-size: 18px;
    margin-top: 24px;
}

.intro {
    max-width: 790px;
    margin-bottom: 32px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 1.8px;
    font-weight: 700;
    color: #62777c;
}

.pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.pills span,
.badge {
    font-size: 12px;
    border-radius: 20px;
    background: #e3edf1;
    padding: 6px 12px;
}

.card {
    background: white;
    border: 1px solid #e0e7ed;
    border-radius: 14px;
    padding: 28px;
    margin: 22px 0;
    box-shadow: 0 3px 15px #15344805;
}

.step {
    font-size: 14px;
    background: #e5eeef;
    color: #24505a;
    border-radius: 50%;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.grid > .hint {
    margin-top: -15px;
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea {
    font: inherit;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd6df;
    border-radius: 7px;
    background: white;
    color: #183247;
    margin-top: 7px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #548593;
    outline-offset: 2px;
}

input[type="range"] {
    padding: 0;
}

input[type="checkbox"] {
    width: auto;
    margin: 4px 9px 0 0;
}

.required {
    color: #975430;
}

.hint,
small {
    color: #637485;
    font-size: 13px;
}

.notice {
    background: #fff3e8;
    border-left: 4px solid #b86d34;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.photo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px;
}

.photo-layout label {
    margin-bottom: 14px;
}

.portrait {
    text-align: center;
    padding: 15px;
    background: #edf2f4;
    border-radius: 10px;
    align-self: start;
}

canvas {
    max-width: 100%;
    width: 210px;
    height: 270px;
    background: #fff;
    border: 1px solid #cad6de;
}

.portrait small {
    display: block;
}

.check {
    font-weight: 400;
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
}

button,
.button {
    border: 0;
    border-radius: 7px;
    background: #1c5267;
    color: white;
    padding: 12px 20px;
    font: 600 14px "Segoe UI", Arial, sans-serif;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    margin: 6px 6px 6px 0;
}

button:hover,
.button:hover {
    background: #143e51;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.secondary {
    background: #e7edf1;
    color: #24465c;
}

.secondary:hover {
    background: #d5e2e9;
}

.danger {
    background: #854335;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

dialog {
    width: 750px;
    max-width: calc(100vw - 28px);
    max-height: 90vh;
    border: 0;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 80px #112c4266;
}

dialog::backdrop {
    background: #112c4299;
}

dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

dt {
    color: #627485;
    font-size: 14px;
}

dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.review-photo {
    width: 140px;
    border-radius: 5px;
    margin-top: 15px;
}

a {
    color: #21566d;
}

footer {
    text-align: center;
    color: #7d8b98;
    font-size: 12px;
    padding: 25px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

td,
th {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dde5eb;
}

th {
    color: #547084;
    background: #eff4f7;
}

.table-wrap {
    overflow: auto;
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.toolbar label {
    min-width: 120px;
}

.toolbar input,
.toolbar select {
    max-width: 220px;
}

.stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.stats .card {
    margin: 0;
    flex: 1;
}

.stats strong {
    font-size: 28px;
    display: block;
}

.photo-admin {
    width: 140px;
}

.print-sign {
    display: flex;
    justify-content: space-between;
    margin-top: 80px;
}

.print-sign p {
    border-top: 1px solid #82909d;
    padding-top: 10px;
    min-width: 180px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    header b {
        font-size: 16px;
    }

    header {
        padding: 18px;
    }

    .brand-mark {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px;
    }

    .brand-mark img {
        width: 44px !important;
        height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
    }

    main {
        margin: 24px auto;
        padding: 0 14px;
    }

    h1 {
        font-size: 34px;
    }

    .card {
        padding: 20px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .photo-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portrait {
        order: -1;
    }

    .pills span {
        font-size: 11px;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    dd {
        margin-bottom: 10px;
    }

    .stats .card {
        min-width: 130px;
    }

    dialog {
        padding: 20px;
    }
}

@media print {
    body {
        background: white;
        font-size: 11px;
    }

    header {
        background: white;
        color: #112c42;
        padding: 5px;
    }

    header small {
        color: #333;
    }

    .brand-mark,
    footer,
    .no-print {
        display: none !important;
    }

    main {
        margin: 10px auto;
        max-width: none;
        padding: 0;
    }

    .card {
        padding: 10px;
        border: 0;
        box-shadow: none;
        margin: 0;
    }

    h1 {
        font-size: 25px;
    }

    dl {
        grid-template-columns: 1fr 1.8fr;
        gap: 4px;
    }

    dt {
        font-size: 10px;
    }

    dd {
        font-size: 11px;
    }

    .notice {
        display: none;
    }

    .print-sign {
        margin-top: 40px;
    }
}