:root {
    color-scheme: light;
    --navy: #243f91;
    --ink: #3f4652;
    --label: #596170;
    --muted: #9a9a9a;
    --placeholder: #a6a6a6;
    --page: #fffdf7;
    --field: #f4f2ec;
    --line: #e9e8e4;
    --yellow: #ffda55;
    --red: #ff4f43;
    --green: #21a75a;
    --button-hover: #1c347d;

    --form-action-gap: 45px;
    --header-edge: max(32px, calc((100% - 1280px) / 2));
}

@font-face {
    font-family: "Switzer";
    src: url("/static/fonts/Switzer-Extrabold.woff2") format("woff2");
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.site-header {
    position: relative;
    padding: 42px 24px 0;
    text-align: center;
}

.site-header h1 {
    margin: 0;
    color: var(--navy);
    font-family: "Switzer", Arial, Helvetica, sans-serif;
    font-size: calc(clamp(3rem, 7.5vw, 5.25rem)* 1.25);
    font-weight: 800;
    letter-spacing: -0.005em;
    line-height: 1.05;
}

main, .auth-main {
    padding: 0 24px 64px;
}

.entry-section, .auth-panel { 
    width: min(100%, 600px);
    margin: 100px auto 0;

    animation: fadeUp 0.24s ease-out; /* fade motion for panels */
}

.item-form, .auth-form { 
    width: min(100%, 400px);
    margin: 0 auto; 
}

.entry-section h2,
.auth-panel h1 {
    margin: 0;
    color: var(--navy);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.2;
    text-align: center;
}

/* Shared navigation button styles. Side alignment stays page-specific. */
.account-button, .back-button {
    position: absolute;
    top: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;

    border: 0;
    border-radius: 999px;
    padding: 10px 0;
    background: var(--yellow);
    color: #4e4e4e;
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.submit-button, .primary-button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.submit-button:hover, .primary-button:hover {
    background: var(--button-hover);
}


.form-row input:not([type="radio"]):not([type="file"]),
.form-row select,
.form-row textarea,
.auth-form input,
.readonly-field {
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}
.form-row input:not([type="radio"]):not([type="file"]),
.form-row select,
.auth-form input {
    height: 42px;
    padding: 0 11px; /*0 14px;*/
}

.form-row textarea {
    min-height: 140px;
    padding: 10px 11px;
    resize: vertical;
}

.form-row > label,
.form-row > .field-label,
.auth-form label {
    color: var(--label);
    font-size: 13px;
    font-weight: 600;
}


.form-row select:has(option[value=""]:checked),
.form-row input::placeholder,
.form-row textarea::placeholder,
.auth-form input::placeholder { 
    color: var(--placeholder);
}
.form-row select option {
    color: var(--ink);
}


.form-row input:not([type="radio"]):not([type="file"]):focus,
.form-row select:focus,
.form-row textarea:focus,
.auth-form input:focus {
    border-color: #8798cf;
    box-shadow: 0 0 0 3px rgb(36 63 145 / 10%);
}

/*
.debug-section h2,
.form-message.info { 
    color: var(--navy);
}*/

@media (max-width: 560px) {
    :root { --header-edge: 20px; }
    .site-header { padding-top: 86px; }
    .account-button, .back-button {
        top: 20px;
        width: 96px;
        padding: 7px 0;
        font-size: 12px;
    }
    main, .auth-main { 
        padding-right: 18px;
        padding-left: 18px;
    }
    .entry-section, .auth-panel {
        margin-top: 72px;
    }
    .item-form, .auth-form { 
        width: 100%;
    }
}




/* Shared entrance motion */
.matching-section:not([hidden]),
#category_custom_input:not([hidden]),
#search_feedback:not([hidden]) {
    animation: fadeUp 0.2s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .entry-section,
    .auth-panel,
    .matching-section:not([hidden]),
    #category_custom_input:not([hidden]),
    #search_feedback:not([hidden]) {
        animation: none;
    }
}