:root {
    color-scheme: light;
    --page-bg: #eeeeee;
    --panel: #ffffff;
    --navy: #00324c;
    --navy-deep: #002f49;
    --blue: #176dcc;
    --orange: #f4510b;
    --text: #001f34;
    --body-text: #111111;
    --muted: #777777;
    --line: #cfcfcf;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    --danger: #b3261e;
    --success: #137333;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    color: var(--body-text);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-header {
    background: var(--panel);
}

.mobile-topbar {
    display: none;
}

.top-strip {
    height: 46px;
    background: var(--navy);
}

.header-container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}

.active-tab {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 16px;
    background: var(--orange);
    color: #ffffff;
    font-size: 18px;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    border-bottom: 1px solid #b8b8b8;
}

.desktop-logo-slot,
.mobile-logo-slot,
.card-logo-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.desktop-logo-slot {
    font-size: 18px;
    color: #000000;
}

.desktop-logo-slot img {
    max-width: 260px;
    max-height: 48px;
    object-fit: contain;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 46px;
    color: #005c99;
    font-size: 23px;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid currentColor;
    vertical-align: middle;
}

.search-link {
    position: relative;
    width: 23px;
    height: 23px;
}

.search-link::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 13px;
    height: 13px;
    border: 4px solid currentColor;
    border-radius: 50%;
}

.search-link::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 11px;
    height: 4px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: center;
}

.breadcrumb {
    height: 29px;
    padding-top: 7px;
    border-bottom: 1px solid #b8b8b8;
    color: #545454;
    font-size: 13px;
}

.page-shell {
    min-height: calc(100vh - 162px - 20px);
    padding: clamp(28px, 4vh, 42px) 20px 44px;
}

.quote-layout {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
}

.quote-layout h1 {
    width: min(820px, 100%);
    margin: 0 auto 26px;
    color: var(--text);
    font-size: clamp(24px, 2vw, 26px);
    line-height: 1.15;
}

.quote-content {
    width: min(820px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 300px) minmax(300px, 420px);
    gap: clamp(28px, 4.5vw, 56px);
    align-items: center;
    justify-content: center;
}

.quote-column {
    width: min(300px, 100%);
}

.quote-card,
.night-card {
    background: var(--panel);
    box-shadow: var(--shadow);
}

.quote-card {
    overflow: hidden;
}

.card-logo-slot {
    height: 72px;
    background: var(--navy);
    color: #ffffff;
    font-size: 18px;
}

.card-logo-slot img {
    max-width: 210px;
    max-height: 52px;
    object-fit: contain;
}

.card-body {
    padding: 16px 24px 34px;
}

.field {
    margin-bottom: 8px;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

input[type="text"] {
    width: 100%;
    height: 35px;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 8px 12px;
    background: #ffffff;
    color: #111111;
    font: inherit;
}

input[type="text"]::placeholder {
    color: #b4b4b4;
}

input[type="text"]:focus {
    border-color: var(--navy);
    outline: 2px solid rgba(0, 50, 76, 0.16);
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    border: 0;
    border-radius: 0;
    padding: 9px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.primary-button {
    width: 100%;
    margin-top: 22px;
    background: var(--navy);
    color: #ffffff;
    font-size: 18px;
}

.primary-button:hover {
    background: var(--navy-deep);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.secondary-button {
    width: 100%;
    min-height: 42px;
    background: #eef4ff;
    color: #004f8c;
    border: 1px solid #c9dcff;
    gap: 9px;
}

.secondary-button input {
    display: none;
}

.secondary-button-upload::before,
.secondary-button-camera::before {
    content: "";
    display: inline-block;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    background: currentColor;
}

.secondary-button-upload::before {
    clip-path: polygon(50% 0, 88% 38%, 68% 38%, 68% 65%, 88% 65%, 88% 100%, 12% 100%, 12% 65%, 32% 65%, 32% 38%, 12% 38%);
}

.secondary-button-camera::before {
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px currentColor;
    background:
        radial-gradient(circle at 50% 56%, transparent 0 28%, currentColor 30% 42%, transparent 44%),
        linear-gradient(currentColor, currentColor);
    clip-path: polygon(0 24%, 27% 24%, 34% 8%, 66% 8%, 73% 24%, 100% 24%, 100% 100%, 0 100%);
}

.hidden-file-input {
    display: none;
}

.mobile-icon-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 31px;
    color: #000000;
    font-weight: 700;
    text-align: center;
}

.mobile-icon-row img {
    justify-self: center;
    max-width: 72px;
    max-height: 42px;
    object-fit: contain;
}

.night-card {
    margin-top: 7px;
    padding: 12px 16px 14px;
    text-align: center;
}

.night-card p {
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.night-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 136px;
    min-height: 36px;
    background: var(--blue);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.desktop-notes {
    display: grid;
    gap: 45px;
    padding-top: 26px;
}

.note-item {
    display: grid;
    grid-template-columns: clamp(58px, 7vw, 78px) minmax(0, 340px);
    gap: 16px;
    align-items: start;
    font-size: clamp(16px, 1.35vw, 18px);
    line-height: 1.27;
}

.note-item img {
    max-width: 72px;
    max-height: 42px;
    object-fit: contain;
}

.note-item p {
    margin-bottom: 0;
}

.site-footer {
    height: 20px;
    background: var(--navy);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(12, 22, 35, 0.58);
    z-index: 10;
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    position: relative;
    width: min(100%, 780px);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: var(--panel);
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(20, 32, 45, 0.18);
}

.modal-panel h2 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 24px;
}

.modal-panel h3 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 18px;
}

.modal-copy,
.upload-card p {
    color: #5c6670;
    line-height: 1.5;
}

.close-button {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #edf1f5;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.upload-card {
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 16px;
}

.upload-actions {
    display: grid;
    gap: 10px;
}

.preview {
    display: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-top: 14px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    object-fit: cover;
}

.preview.has-image {
    display: block;
}

.error {
    display: block;
    min-height: 20px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 14px;
}

.form-alert {
    min-height: 22px;
    margin-bottom: 14px;
    color: #5c6670;
    font-weight: 700;
}

.form-alert.success {
    color: var(--success);
}

.form-alert.error {
    color: var(--danger);
}

.camera-panel {
    display: none;
    margin: 20px 0;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
}

.camera-panel.is-open {
    display: block;
}

.camera-header {
    position: relative;
    padding-right: 48px;
}

.camera-close {
    top: -4px;
    right: 0;
}

.camera-view {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #111820;
}

.camera-view video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.camera-guide {
    position: absolute;
    inset: 10%;
    border: 2px solid rgba(0, 190, 90, 0.75);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: #00c853;
}

.top-left {
    top: -4px;
    left: -4px;
    border-top: 5px solid;
    border-left: 5px solid;
}

.top-right {
    top: -4px;
    right: -4px;
    border-top: 5px solid;
    border-right: 5px solid;
}

.bottom-left {
    bottom: -4px;
    left: -4px;
    border-bottom: 5px solid;
    border-left: 5px solid;
}

.bottom-right {
    right: -4px;
    bottom: -4px;
    border-right: 5px solid;
    border-bottom: 5px solid;
}

.guide-text {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.camera-help {
    margin: 12px 0;
    color: #5c6670;
    line-height: 1.45;
}

@media (max-width: 1180px) and (min-width: 681px) {
    .desktop-nav {
        gap: clamp(22px, 4vw, 38px);
        font-size: clamp(19px, 2vw, 22px);
    }

    .desktop-logo-slot img {
        max-width: clamp(190px, 24vw, 260px);
    }
}

@media (max-width: 920px) and (min-width: 681px) {
    .quote-layout {
        width: min(620px, calc(100% - 40px));
    }

    .quote-layout h1,
    .quote-content {
        width: 100%;
    }

    .quote-content {
        grid-template-columns: minmax(280px, 300px);
        justify-items: center;
        gap: 24px;
    }

    .desktop-notes {
        width: min(100%, 420px);
        padding-top: 2px;
        gap: 18px;
    }

    .note-item {
        grid-template-columns: 64px 1fr;
        gap: 14px;
    }

    .header-main {
        gap: 20px;
    }

    .desktop-nav {
        gap: 20px;
        font-size: 19px;
    }
}

@media (max-width: 680px) {
    .desktop-header {
        display: none;
    }

    .mobile-topbar {
        display: grid;
        grid-template-columns: 42px 1fr 42px;
        align-items: center;
        min-height: 56px;
        padding: 0 14px;
        border-bottom: 1px solid #b8b8b8;
        background: #ffffff;
    }

    .menu-button {
        display: inline-grid;
        gap: 5px;
        width: 28px;
        border: 0;
        padding: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-button span {
        display: block;
        width: 21px;
        height: 2px;
        background: var(--orange);
    }

    .mobile-logo-slot {
        justify-self: center;
        color: #000000;
        font-size: 21px;
    }

    .mobile-logo-slot img {
        max-width: 235px;
        max-height: 44px;
        object-fit: contain;
    }

    .user-icon {
        position: relative;
        justify-self: end;
        width: 24px;
        height: 24px;
    }

    .user-icon::before,
    .user-icon::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        background: var(--orange);
    }

    .user-icon::before {
        top: 2px;
        width: 11px;
        height: 13px;
        border-radius: 50%;
    }

    .user-icon::after {
        bottom: 2px;
        width: 22px;
        height: 9px;
        border-radius: 14px 14px 2px 2px;
    }

    .page-shell {
        min-height: calc(100vh - 56px - 17px);
        padding: 18px 0 62px;
    }

    .quote-layout {
        width: min(302px, calc(100% - 34px));
    }

    .quote-layout h1 {
        margin: 0 0 25px 5px;
        font-size: 25px;
    }

    .quote-content {
        display: block;
    }

    .quote-column {
        width: 100%;
    }

    .card-logo-slot {
        height: 70px;
    }

    .card-body {
        padding: 15px 24px 34px;
    }

    .primary-button {
        margin-top: 22px;
    }

    .desktop-notes {
        display: none;
    }

    .site-footer {
        height: 17px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .modal {
        align-items: stretch;
        padding: 0;
        background: rgba(0, 31, 52, 0.72);
    }

    .modal-panel {
        width: 100%;
        max-height: none;
        min-height: 100vh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        padding: 18px 16px 24px;
        box-shadow: none;
    }

    .modal-panel h2 {
        width: calc(100% - 44px);
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.15;
    }

    .modal-copy {
        margin-bottom: 16px;
        padding: 12px;
        border-left: 4px solid var(--navy);
        background: #f4f7fa;
        font-size: 15px;
    }

    .close-button {
        top: 12px;
        right: 12px;
        background: #e7eef4;
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 16px 0;
    }

    .upload-card {
        padding: 15px;
        border-color: #c9d5df;
        background: #ffffff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .upload-card h3 {
        margin-bottom: 6px;
        font-size: 18px;
    }

    .upload-card p {
        margin-bottom: 12px;
        font-size: 14px;
    }

    .upload-actions {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .secondary-button {
        min-height: 46px;
        font-size: 15px;
    }

    .preview {
        aspect-ratio: 16 / 10;
        margin-top: 12px;
    }

    .form-alert {
        margin: 10px 0;
        text-align: center;
    }

    #submit-button {
        position: sticky;
        bottom: 0;
        margin-top: 8px;
        min-height: 48px;
        box-shadow: 0 -10px 16px rgba(255, 255, 255, 0.92);
        z-index: 2;
    }

    .camera-panel {
        margin: 14px 0;
        padding: 12px;
    }

    .camera-header h3 {
        padding-right: 42px;
        font-size: 18px;
    }

    .camera-close {
        top: -8px;
        right: -4px;
    }

    .camera-view {
        aspect-ratio: 3 / 4;
    }

    .camera-guide {
        inset: 16% 8%;
    }

    .guide-text {
        width: calc(100% - 24px);
        bottom: 10px;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
    }

    .camera-help {
        font-size: 14px;
    }

    #capture-camera {
        min-height: 48px;
    }
}
