:root {
    color-scheme: light;
    --ink: #1E293B;
    --muted: #64748B;
    --soft: #94A3B8;
    --line: #E2E8F0;
    --panel: #FFFFFF;
    --page: #FAFAFA;
    --accent: #6891b3;
    --accent-soft: #e9eef3;
    --success: #7e9f74;
    --success-soft: #eaefe6;
    --warning-bg: #f4f0e4;
    --warning-line: #d4c090;
}

* {
    box-sizing: border-box;
}

body.guest-order-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--page);
    line-height: 1.7;
}

#jp-header {
    flex: 0 0 auto;
}

.guest-shell {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
    align-items: start;
    padding: 78px 0 72px;
}

.guest-main,
.status-shell {
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 13px;
}

.brand img {
    width: 24px;
    height: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 5px 12px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

h1 {
    margin: 0;
    max-width: 720px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 10px;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

.lead {
    max-width: 720px;
    margin: 12px 0 22px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.split-lines span {
    display: block;
}

.sample-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: baseline;
    margin: 0 0 0 8px;
    white-space: nowrap;
    padding: 3px 12px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    box-shadow: 0 1px 0 0 var(--soft);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.sample-report-btn:hover {
    border-color: var(--success);
    background: #FFFFFF;
}

.sample-pdf-frame {
    display: none;
    max-width: 760px;
    margin: 0 0 22px;
    position: relative;
    z-index: 2;
}

.sample-pdf-frame.is-visible {
    display: block;
}

.sample-pdf-container {
    background: #e5e7eb;
    border: 1px solid var(--ink);
    border-radius: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: min(92vh, 980px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
}

.sample-pdf-page {
    display: block;
    width: calc(100% - 16px);
    height: auto;
    margin: 6px auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.order-form,
.report-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.order-form {
    max-width: 720px;
    padding: 14px 16px;
}

.field-grid {
    display: grid;
    grid-template-columns: 0.72fr 0.95fr 1fr;
    gap: 8px;
}

label {
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.wide {
    grid-column: 1 / -1;
}

input {
    width: 100%;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 4px 8px;
    color: var(--ink);
    background: #FFFFFF;
    font: inherit;
    font-size: 13px;
}

input:focus {
    outline: 3px solid rgba(104, 145, 179, 0.18);
    border-color: var(--accent);
}

.suggest-field {
    position: relative;
    display: block;
}

.suggest-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.suggest-item {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.suggest-item:last-child {
    border-bottom: 0;
}

.suggest-item:hover,
.suggest-item:focus {
    outline: 0;
    background: var(--accent-soft);
}

.suggest-item strong {
    font-weight: 800;
}

.suggest-item span {
    color: var(--muted);
}

.email-hint {
    margin: 5px 0 -2px;
    padding: 8px 10px;
    border: 1px solid #b8c9d8;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.email-hint.is-hidden {
    display: none;
}

.email-hint span {
    display: block;
}

.email-field {
    padding: 8px;
    border: 1px solid var(--success);
    border-radius: 10px;
    background: #FFFFFF;
}

.email-field input {
    border-color: var(--success);
}

.email-field input:focus {
    outline-color: rgba(126, 159, 116, 0.22);
    border-color: var(--success);
}

.parcel-field input {
    border-color: var(--accent);
    background: #FFFFFF;
}

.parcel-field input:focus {
    outline-color: rgba(104, 145, 179, 0.22);
    border-color: var(--accent);
}

.alert,
.form-error {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--warning-bg);
    border: 1px solid var(--warning-line);
    color: #7a6040;
    font-size: 13px;
}

.form-error {
    margin-top: 14px;
    background: #fff0ef;
    border-color: #f2b7b1;
    color: #8f352e;
}

.summary {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(92px, 0.7fr) minmax(110px, 0.8fr);
    gap: 6px;
    margin: 12px 0;
}

.summary div {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #F8FAFC;
}

.summary span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.payment-note {
    margin: 4px 0 16px;
    padding: 12px 14px;
    border: 1px solid #b8c9d8;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-soft) 0%, #FFFFFF 100%);
    color: #475569;
    font-size: 13px;
}

.check {
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 9px;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.45;
}

.check input {
    min-height: 0;
    height: 17px;
    margin-top: 2px;
}

#submit-order,
.status-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 18px;
    border: 1px solid #c8b27a;
    border-radius: 6px;
    padding: 8px 14px;
    color: var(--ink);
    background: var(--warning-bg);
    box-shadow: 0 1px 0 0 #c8b27a;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

#submit-order {
    width: auto;
}

.status-link {
    width: 100%;
}

#submit-order:hover,
.status-link:hover {
    background: #fff8e6;
    border-color: #b79b53;
}

#submit-order:disabled {
    background: #F8FAFC;
    color: var(--soft);
    border-color: #CBD5E1;
    cursor: wait;
}

.fineprint {
    margin: 10px 0 0;
    color: var(--soft);
    font-size: 12px;
    line-height: 1.45;
}

.guest-aside {
    align-self: start;
}

.report-panel {
    padding: 20px 22px;
}

.report-panel h2 {
    font-size: 24px;
    line-height: 1.15;
    color: var(--ink);
}

.panel-intro {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.pillar-list {
    display: grid;
    gap: 8px;
}

.pillar-list div {
    display: grid;
    gap: 2px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.pillar-list div:nth-child(1)  { border-bottom-color: #6891b3; }
.pillar-list div:nth-child(2)  { border-bottom-color: #cb8989; }
.pillar-list div:nth-child(3)  { border-bottom-color: #a966a2; }
.pillar-list div:nth-child(4)  { border-bottom-color: #c8b27a; }
.pillar-list div:nth-child(5)  { border-bottom-color: #7e9f74; }
.pillar-list div:nth-child(6)  { border-bottom-color: #a966a2; }
.pillar-list div:nth-child(7)  { border-bottom-color: #c8b27a; }
.pillar-list div:nth-child(8)  { border-bottom-color: #7e9f74; }
.pillar-list div:nth-child(9)  { border-bottom-color: #a966a2; }
.pillar-list div:nth-child(10) { border-bottom-color: #cb8989; }
.pillar-list div:nth-child(11) { border-bottom-color: #6891b3; }
.pillar-list div:nth-child(12) { border-bottom-color: #7e9f74; }
.pillar-list div:nth-child(13) { border-bottom-color: #c8b27a; }

.pillar-list div:last-child {
    border-bottom: 0;
}

.pillar-list strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.pillar-list span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.status-shell {
    width: min(760px, calc(100% - 48px));
    flex: 1 0 auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 96px 0 72px;
}

.status-shell .eyebrow {
    align-self: flex-start;
}

.status-shell--thanks h1 {
    color: #c8b27a;
}

.status-link {
    width: auto;
    align-self: flex-start;
    min-height: 30px;
    margin-top: 16px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-link--blue {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    box-shadow: 0 1px 0 0 var(--soft);
}

.status-link--blue:hover {
    background: #FFFFFF;
    border-color: var(--success);
}

.status-card {
    display: grid;
    gap: 0;
    width: min(620px, 100%);
    margin: 4px 0 2px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.status-card div {
    display: grid;
    gap: 3px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.status-card div:last-child {
    border-bottom: 0;
}

.status-card strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.status-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.status-register {
    width: min(620px, 100%);
    margin: 12px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #FFFFFF;
}

.status-register p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.status-register-btn {
    display: inline-flex;
    vertical-align: baseline;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin-left: 6px;
    padding: 3px 10px;
    border: 1px solid var(--success);
    border-radius: 20px;
    background: var(--success-soft);
    color: var(--ink);
    box-shadow: 0 1px 0 0 var(--success);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.status-register-btn:hover {
    background: #FFFFFF;
}

.footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1296px;
    margin: 40px auto 0;
}

.footer span {
    font-size: 13px;
    color: var(--soft);
}

.footer a {
    font-size: 13px;
    color: var(--soft);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--ink);
}

.footer-payment-logos {
    width: 260px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 940px) {
    .guest-shell {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: 72px;
    }

    .order-form {
        max-width: none;
    }

    .sample-report-btn {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 620px) {
    .guest-shell,
    .status-shell {
        width: min(100% - 28px, 760px);
    }

    .field-grid,
    .summary {
        grid-template-columns: 1fr;
    }

    .order-form,
    .report-panel {
        padding: 18px;
    }

    h1 {
        font-size: 25px;
    }

}
