/* Contact-specific styles; keep the public and signed-in layout loaders unchanged. */
.contact-page, .contact-dialog {
    --contact-ink: #12345b; --contact-muted: #708099; --contact-surface: #fffefc;
    --contact-soft: #f8f3eb; --contact-line: #ece2d4; --contact-focus: #c78c36;
    color: var(--contact-ink); font-size: 14px; line-height: 1.6;
}
/* Let the guest content fill short screens, while long pages scroll normally. */
body:has(> .guest-main .contact-page) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}
body:has(> .guest-main .contact-page) > .guest-main {
    flex: 1 0 auto;
    width: 100%;
    background: #fbf8f1;
}
body:has(> .guest-main .contact-page) > .site-footer {
    flex: 0 0 auto;
    margin-top: auto;
}
/* Keep the public header actions in the contact page's restrained palette. */
body:has(> .guest-main .contact-page) .guest-public-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    color: #12345b;
    font-size: 13px;
}
body:has(> .guest-main .contact-page) .guest-public-actions .guest-btn-primary {
    padding: 6px 14px !important;
    border: 1px solid #dfc9a6;
    border-radius: 4px;
    background: #fffefc;
    box-shadow: none;
    color: #79521f;
    font-weight: 550;
    line-height: 22px;
    white-space: nowrap;
}
body:has(> .guest-main .contact-page) .guest-public-actions .guest-btn-primary:hover {
    border-color: #c78c36;
    background: #f8f3eb;
    filter: none;
    transform: none;
}
body:has(> .guest-main .contact-page) .guest-public-actions > a:focus-visible {
    outline: 2px solid #c78c36;
    outline-offset: 3px;
}
.contact-page { width: min(100%, 1100px); margin: 0 auto; padding: 24px 16px 40px; }
.contact-page-header { display: flex; align-items: center; gap: 12px; min-height: 80px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid var(--contact-line); border-radius: 6px; background: var(--contact-surface); }
.contact-page-icon, .contact-card-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 36px; border: 1px solid #ead4b3; border-radius: 6px; background: #fff7e9; color: #b57b27; font-size: 18px; }
.contact-breadcrumb { margin-bottom: 4px; color: var(--contact-muted); font-size: 12px; }
.contact-page .contact-page-header h1 { margin: 0; color: var(--contact-ink); font-size: 22px; font-weight: 650; line-height: 1.4; }
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--contact-line); border-radius: 6px; background: var(--contact-surface); box-shadow: 0 2px 8px #12345b05; }
.contact-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.contact-page .contact-card h2, .contact-dialog .contact-dialog-header h2 { margin: 0; color: var(--contact-ink); font-size: 17px; font-weight: 650; }
.contact-page .contact-card p { margin: 0 0 14px; color: var(--contact-muted); font-size: 14px; line-height: 1.8; }
.contact-page .contact-card .contact-caption { font-size: 12px; }
.contact-email { align-self: flex-start; margin: 4px 0 20px; color: var(--contact-ink); font-size: clamp(18px, 2.5vw, 22px); font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.contact-email:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-card-actions { display: flex; justify-content: flex-start; margin-top: auto; padding-top: 8px; }
.contact-button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--contact-line); border-radius: 4px; font: inherit; font-size: 13px; font-weight: 550; line-height: 20px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.contact-button--primary { border-color: #0b315d; background: #0b315d; color: #fff; }
.contact-button--primary:hover:not(:disabled) { background: #194a7e; }
.contact-button--secondary { background: var(--contact-surface); color: var(--contact-ink); }
.contact-button--secondary:hover { border-color: var(--contact-focus); background: var(--contact-soft); }
.contact-button:disabled { opacity: .55; cursor: wait; }
.contact-button:focus-visible, .contact-close:focus-visible, .contact-email:focus-visible { outline: 2px solid var(--contact-focus); outline-offset: 3px; }
.contact-dialog { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--contact-line); border-radius: 8px; background: var(--contact-surface); box-shadow: 0 24px 70px #10253e30; }
.contact-dialog:not([open]) { display: none; }
.contact-dialog::backdrop { background: #10253e66; }
body:has(.contact-dialog[open]) { overflow: hidden; }
.contact-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--contact-line); }
.contact-dialog .contact-dialog-header p { margin: 5px 0 0; color: var(--contact-muted); font-size: 12px; }
.contact-close { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid var(--contact-line); border-radius: 4px; background: var(--contact-surface); color: var(--contact-muted); cursor: pointer; }
.contact-form-body { display: grid; gap: 16px; padding: 20px; }
.contact-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.contact-field label { font-size: 13px; font-weight: 550; }
.contact-field :is(input, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--contact-line); border-radius: 4px; background: var(--contact-surface); color: var(--contact-ink); font: inherit; font-size: 14px; line-height: 22px; }
.contact-field textarea { min-height: 140px; resize: vertical; }
.contact-field :is(input, textarea):focus { outline: 2px solid var(--contact-focus); outline-offset: 1px; }
.contact-field :is(input, textarea)[aria-invalid="true"] { border-color: #c43b39; }
.contact-field-error { color: #b33332; font-size: 12px; }
.contact-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--contact-line); }
.contact-page > .contact-notice, .contact-dialog .contact-notice { margin: 0; padding: 10px 12px; border: 1px solid #e7d2ae; border-radius: 4px; background: #fff7e9; color: #79521f; font-size: 12px; line-height: 1.8; }
.contact-page > .contact-notice { margin-bottom: 16px; }
.contact-page > .contact-notice--success { border-color: #a9d8c3; background: #eefaf4; color: #087d5c; }
.contact-dialog .contact-notice--error { border-color: #edc2be; background: #fff3f2; color: #b33332; }
html[data-theme="dark"] :is(.contact-page, .contact-dialog) { --contact-ink: #e2e8f0; --contact-muted: #a6b2c4; --contact-surface: #17202c; --contact-soft: #202c3b; --contact-line: #394555; --contact-focus: #d1ac6b; }
html[data-theme="dark"] .contact-notice { border-color: #765c35; background: #3d3021; color: #e6bd7d; }
html[data-theme="dark"] .contact-notice--success { border-color: #28654d; background: #163b30; color: #91dabc; }
html[data-theme="dark"] .contact-notice--error { border-color: #804343; background: #452728; color: #ffb3ac; }
@media(max-width:640px) { .contact-page { padding: 16px 8px 24px; } .contact-cards, .contact-form-row { grid-template-columns: minmax(0, 1fr); } .contact-card { padding: 18px; } .contact-page .contact-page-header h1 { font-size: 20px; } .contact-dialog-header, .contact-form-body { padding: 16px; } .contact-dialog-actions { padding: 12px 16px; } .contact-button { min-height: 40px; } .contact-field :is(input, textarea) { font-size: 16px; } }
