:root {
    color-scheme: light;
    --paper: #e9e4d5;
    --paper-light: #f5f1e5;
    --ink: #181916;
    --muted: #625f55;
    --line: #8a8678;
    --orange: #ed5429;
    --red: #c62828;
    --green: #5f6d3c;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--mono);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(25, 25, 22, .055) .65px, transparent .65px);
    background-size: 5px 5px;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: .8rem 1rem;
    color: #fff;
    background: var(--ink);
}

.skip-link:focus { left: 1rem; top: 1rem; }

.site-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.masthead {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--ink);
    gap: 1.5rem;
}

.masthead__brand { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 11px; }
.brand-stamp { grid-row: span 2; display: grid; place-items: center; width: 47px; height: 47px; color: var(--orange); border: 2px solid var(--orange); border-radius: 50%; font-size: .69rem; font-weight: 900; transform: rotate(-9deg); }
.brand-word { font-family: var(--display); text-transform: uppercase; font-size: 1.32rem; letter-spacing: .035em; line-height: 1; }
.brand-subtitle { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.masthead__meta { display: grid; gap: .35rem; text-align: right; font-size: .64rem; letter-spacing: .09em; }
.meta-label { color: var(--muted); }
.meta-value { font-weight: 800; }

.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .86fr); gap: clamp(30px, 7vw, 100px); align-items: start; padding: 58px 0 64px; }

.intro-panel { min-height: 610px; position: relative; padding: 0 8px 0 2px; }
.panel-topline { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .62rem; font-weight: 800; letter-spacing: .09em; }
.eyebrow { margin: 34px 0 13px; color: var(--orange); font-size: .7rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.intro-panel h1 { margin: 0; font-family: var(--display); font-size: clamp(5.2rem, 10vw, 9rem); font-weight: 900; letter-spacing: -.045em; line-height: .77; text-transform: uppercase; }
.intro-panel h1 span { color: var(--orange); }
.intro-copy { max-width: 420px; margin: 28px 0 30px; font-size: .92rem; line-height: 1.65; }
.stamp-note { position: absolute; top: 195px; right: 20px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--red); border: 2px solid var(--red); font-size: .64rem; font-weight: 900; line-height: 1.3; transform: rotate(7deg); }
.stamp-note__mark { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--red); border-radius: 50%; font-size: .7rem; }
.photo-prompts { max-width: 470px; margin: -12px 0 24px; padding: 0; list-style: none; }
.photo-prompts li { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .72rem; font-weight: 700; line-height: 1.45; }
.photo-prompt-number { color: var(--red); font-size: .64rem; font-weight: 900; letter-spacing: .05em; }
.spec-list { max-width: 420px; border-top: 2px solid var(--ink); }
.spec-list div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 1px; border-bottom: 1px solid var(--line); font-size: .65rem; letter-spacing: .04em; }
.spec-list div span { color: var(--muted); }
.spec-list strong { text-align: right; }
.caution-stripe { width: min(420px, 100%); height: 13px; margin-top: 25px; border: 1px solid var(--ink); background: repeating-linear-gradient(135deg, var(--orange) 0 9px, var(--ink) 9px 18px); }
.small-print { max-width: 390px; margin: 12px 0 0; color: var(--muted); font-size: .63rem; line-height: 1.55; }
.privacy-details { max-width: 420px; margin-top: 20px; border: 1.5px solid var(--ink); background: rgba(245, 241, 229, .72); }
.privacy-details summary { padding: 10px 11px; font-size: .62rem; font-weight: 900; letter-spacing: .055em; cursor: pointer; }
.privacy-details summary::marker { color: var(--orange); }
.privacy-details__body { padding: 0 11px 10px; color: var(--muted); font-size: .64rem; line-height: 1.6; }
.privacy-details__body p { margin: 7px 0; }
.privacy-details__body strong { color: var(--ink); }
.privacy-details__body a, .consent-control a { color: #9f2f17; font-weight: 800; text-underline-offset: 2px; }

.form-panel { position: relative; padding: 23px clamp(22px, 3vw, 37px) 20px; background: var(--paper-light); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.form-panel::before { content: ""; position: absolute; top: -8px; left: 18%; width: 78px; height: 17px; background: rgba(237, 84, 41, .65); transform: rotate(-4deg); }
.form-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 15px; border-bottom: 1px dashed var(--line); font-size: .61rem; font-weight: 900; letter-spacing: .08em; }
.form-index { color: var(--orange); }
.status-light { display: inline-flex; align-items: center; gap: 7px; }
.status-light > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(95, 109, 60, .16); }
.form-heading-row { display: flex; align-items: end; justify-content: space-between; margin-top: 26px; }
.form-heading-row .eyebrow { margin: 0 0 9px; font-size: .62rem; }
.form-heading-row h2 { margin: 0; font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.65rem); font-weight: 900; letter-spacing: -.035em; line-height: .88; text-transform: uppercase; }
.form-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 2px; color: var(--orange); border: 2px solid var(--orange); border-radius: 50%; font-size: 1.5rem; transform: rotate(-12deg); }
.form-help { margin: 16px 0 24px; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.upload-form { display: grid; gap: 9px; }
.login-form { margin-top: 26px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 11px; }
.field-label { display: block; margin-top: 13px; font-size: .67rem; font-weight: 900; letter-spacing: .055em; }
.field-label span { margin-left: 4px; color: var(--muted); font-size: .56rem; font-weight: 500; letter-spacing: 0; }
.field-label-row .field-label { margin-top: 0; }
.char-counter, .file-counter { color: var(--muted); font-size: .61rem; font-weight: 800; white-space: nowrap; }
.counter-over { color: var(--orange); }
.text-input { width: 100%; min-height: 45px; padding: 11px 12px; color: var(--ink); background: #fffdf5; border: 1.5px solid var(--ink); border-radius: 0; outline: 0; }
.text-input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(237, 84, 41, .24); }
.text-input::placeholder { color: #8c887b; }
.text-area { min-height: 87px; resize: vertical; line-height: 1.45; }
.quota-line { display: flex; align-items: baseline; gap: 7px; margin: 18px 0 17px; padding: 8px 10px; background: #e7e2d3; font-size: .65rem; font-weight: 800; }
.quota-line strong { color: var(--orange); font-size: .82rem; }
.quota-line span { color: var(--muted); font-size: .58rem; font-weight: 400; }
.file-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.file-button, .camera-button { display: flex; min-height: 45px; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border: 1.5px solid var(--ink); font-size: .6rem; font-weight: 900; letter-spacing: .015em; text-align: center; cursor: pointer; }
.file-button { color: var(--paper-light); background: var(--ink); }
.file-button:hover, .file-button:focus-within { background: #373831; }
.file-button span { font-size: 1.1rem; line-height: .7; }
.camera-button { background: transparent; }
.camera-button:hover, .camera-button:focus-visible { color: var(--paper-light); background: var(--orange); }
.file-help { margin: 1px 0 0; color: var(--muted); font-size: .58rem; line-height: 1.5; }
.consent-summary { margin-top: 11px; padding: 10px 11px; border-left: 4px solid var(--orange); background: #eee8d8; font-size: .63rem; line-height: 1.5; }
.consent-summary strong { display: block; margin-bottom: 4px; font-size: .59rem; letter-spacing: .08em; }
.consent-summary p { margin: 0; }
.consent-control { display: grid; grid-template-columns: 19px 1fr; align-items: start; gap: 9px; padding: 9px 1px; font-size: .61rem; line-height: 1.55; cursor: pointer; }
.consent-control input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); }
.consent-control input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.preview-list { display: grid; gap: 6px; }
.preview-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 5px; border: 1px dashed var(--line); background: rgba(255,255,255,.48); }
.preview-card img { width: 52px; height: 45px; object-fit: cover; background: #d8d2c1; }
.preview-name { overflow: hidden; font-size: .58rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.preview-size { margin-top: 4px; color: var(--muted); font-size: .52rem; }
.remove-photo { width: 30px; height: 30px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.remove-photo:hover { border-color: var(--orange); color: var(--orange); }
.submit-button { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; padding: 0 16px; color: #fff; background: var(--orange); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: .72rem; font-weight: 900; letter-spacing: .04em; cursor: pointer; }
.submit-button span:last-child { font-size: 1.2rem; }
.submit-button:hover { background: #d9421d; }
.submit-button:focus-visible, .camera-button:focus-visible, .remove-photo:focus-visible, .text-button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.submit-button:disabled { opacity: .6; cursor: wait; }
.logout-form { margin-top: 16px; text-align: right; }
.text-button { padding: 5px 0; color: var(--muted); background: none; border: 0; font-size: .58rem; text-decoration: underline; cursor: pointer; }
.form-footer { display: flex; justify-content: space-between; margin-top: 19px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .54rem; letter-spacing: .08em; }
.notice { display: grid; gap: 5px; margin-top: 16px; padding: 11px 12px; border: 1.5px solid var(--ink); font-size: .69rem; line-height: 1.5; overflow-wrap: anywhere; }
.notice strong { font-size: .62rem; letter-spacing: .08em; }
.notice--error { border-left: 6px solid var(--orange); background: #f4ded4; }
.notice--success { border-left: 6px solid var(--green); background: #e2e8d3; }
.saved-files { font-size: .61rem; font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 14px 0 24px; border-top: 2px solid var(--ink); font-size: .59rem; font-weight: 800; letter-spacing: .07em; }
.fatal-panel { max-width: 760px; margin: 15vh auto; padding: 28px; background: var(--paper-light); border: 2px solid var(--ink); box-shadow: 8px 8px var(--ink); }
.fatal-panel .eyebrow { margin-top: 0; }
.fatal-panel h1 { overflow-wrap: anywhere; font-family: var(--mono); font-size: 1.1rem; line-height: 1.55; }
.fatal-panel p:last-child { margin-bottom: 0; color: var(--muted); font-size: .75rem; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 820px) {
    .site-shell { width: min(650px, calc(100% - 32px)); }
    .main-grid { grid-template-columns: 1fr; gap: 35px; padding-top: 34px; }
    .intro-panel { min-height: 0; padding-bottom: 2px; }
    .intro-panel h1 { font-size: clamp(5rem, 19vw, 8.4rem); }
    .stamp-note { top: 145px; right: 9px; }
    .intro-copy { max-width: 500px; }
    .spec-list, .caution-stripe, .privacy-details, .photo-prompts { max-width: none; }
}

@media (max-width: 480px) {
    .site-shell { width: calc(100% - 24px); }
    .masthead { min-height: 78px; }
    .brand-stamp { width: 39px; height: 39px; font-size: .59rem; }
    .brand-word { font-size: 1.05rem; }
    .brand-subtitle { font-size: .55rem; }
    .masthead__meta { font-size: .53rem; }
    .main-grid { padding-top: 28px; }
    .intro-panel h1 { font-size: clamp(4.6rem, 20vw, 6.3rem); }
    .stamp-note { top: 130px; right: 3px; padding: 6px; font-size: .53rem; }
    .stamp-note__mark { width: 28px; height: 28px; }
    .intro-copy { max-width: 78%; font-size: .8rem; }
    .form-panel { padding: 20px 17px 17px; box-shadow: 5px 5px 0 var(--ink); }
    .form-heading-row h2 { font-size: 2.8rem; }
    .quota-line { flex-wrap: wrap; }
    .file-controls { grid-template-columns: 1fr; }
    .site-footer { font-size: .5rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .submit-button, .file-button, .camera-button { transition: background-color .12s ease, transform .12s ease; }
    .submit-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
}
