:root {
  color-scheme: light;
  --ink: #243b49;
  --muted: #63737a;
  --paper: #f5f2ed;
  --card: #fffefa;
  --line: #d9dfdf;
  --accent: #557684;
  --accent-dark: #345663;
  --success: #356c55;
  --error: #a2433f;
}

* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(100% - 36px, 660px); margin: 0 auto; padding: 65px 0 36px; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 22px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.3rem, 11vw, 5.3rem); font-weight: 400; letter-spacing: -.055em; line-height: 1.02; }
h1 em { color: var(--accent); font-weight: 400; }
.intro { max-width: 610px; margin: 0; color: #4d6069; font-size: 1.13rem; line-height: 1.65; }
.deadline { display: inline-flex; margin: 27px 0 37px; padding: 11px 16px; border: 1px solid #cad8d8; border-radius: 50px; background: #e8efec; color: #385760; font-size: .9rem; font-weight: 600; line-height: 1.4; }

.upload-card { padding: 34px; border: 1px solid #e3e5e1; border-radius: 16px; background: var(--card); box-shadow: 0 18px 50px rgba(36, 59, 73, .06); }
.card-heading { display: flex; align-items: flex-start; gap: 17px; padding-bottom: 27px; border-bottom: 1px solid #e9ece9; }
.step-number { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: #e8efec; color: var(--accent-dark); font-family: Georgia, serif; font-size: .88rem; }
h2 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 400; line-height: 1.18; }
.card-heading p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.5; }
form { padding-top: 25px; }
.field-label { display: block; margin: 0 0 9px; font-size: .9rem; font-weight: 700; }
.field-label span { color: #89959a; font-weight: 400; }
input[type="text"], input[type="password"], textarea { display: block; width: 100%; margin-bottom: 23px; padding: 13px 14px; border: 1px solid #ced6d6; border-radius: 8px; outline: none; background: #fff; color: var(--ink); }
textarea { min-height: 92px; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, .file-drop:focus-within { outline: 3px solid #9fc2c7; outline-offset: 2px; }
::placeholder { color: #9aa7aa; }
.file-drop { display: flex; min-height: 175px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 20px; border: 1.5px dashed #a9bfc0; border-radius: 11px; background: #f8fbf9; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover, .file-drop.drag-over { border-color: var(--accent-dark); background: #edf4f1; }
.file-drop strong { color: var(--accent-dark); font-size: 1.03rem; text-decoration: underline; text-underline-offset: 3px; }
.file-drop span:not(.file-icon) { color: var(--muted); font-size: .86rem; }
.file-drop small { margin-top: 5px; color: #7e8e91; font-size: .78rem; }
.picker-note { margin: 9px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.file-icon { color: var(--accent); font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-list { display: grid; gap: 10px; margin: 18px 0 20px; padding: 0; list-style: none; }
.file-list:empty { display: none; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #e4e9e8; border-radius: 8px; background: #fff; }
.file-name { min-width: 0; overflow: hidden; font-size: .88rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { flex-shrink: 0; color: var(--muted); font-size: .78rem; text-align: right; }
.file-meta.saved { color: var(--success); font-weight: 700; }
.file-meta.failed { color: var(--error); font-weight: 700; }
.remove-file { flex: 0 0 auto; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8c999c; font-size: 1.3rem; line-height: 1; }
.remove-file:hover { background: #edf2f0; color: var(--ink); }
.primary-button { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 22px; padding: 15px 19px; border: 0; border-radius: 8px; background: var(--accent-dark); color: #fff; font-weight: 700; transition: background .15s; }
.primary-button:hover:not(:disabled) { background: #25434f; }
.primary-button:disabled { background: #a7b6b9; cursor: not-allowed; }
.primary-button span { font-size: 1.25rem; line-height: 1; }
.form-status { min-height: 1.4em; margin: 13px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.form-status.error { color: var(--error); }
.form-status.success { color: var(--success); }
.notice { margin-top: 23px; padding: 13px 15px; border-radius: 8px; background: #fff2e9; color: #79513c; font-size: .9rem; line-height: 1.5; }
.help-copy { display: grid; gap: 4px; padding: 22px 2px 4px; }
.help-copy p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.help-copy strong { color: var(--ink); }
footer { margin-top: 38px; padding-top: 18px; border-top: 1px solid #d9dfdc; color: #7b8b8d; font-family: Georgia, serif; font-size: .98rem; }
footer p { margin: 0; }
footer .fallback-note { margin-top: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .86rem; line-height: 1.5; }
footer a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.admin-card { margin-top: 35px; }
.admin-explain { margin: 9px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.admin-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.admin-summary span { color: var(--muted); font-size: .8rem; }
.admin-files { display: grid; gap: 11px; padding: 0; list-style: none; }
.admin-file { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid #e4e9e8; border-radius: 9px; background: #fff; }
.admin-file-content { display: grid; min-width: 0; gap: 5px; }
.admin-file-content strong { overflow-wrap: anywhere; font-size: .9rem; }
.admin-file-content span { color: var(--muted); font-size: .76rem; }
.admin-file-content p { margin: 2px 0 0; color: #4d6069; font-size: .82rem; line-height: 1.4; }
.secondary-button { flex-shrink: 0; padding: 9px 11px; border: 1px solid #a9bfc0; border-radius: 7px; background: #f8fbf9; color: var(--accent-dark); font-size: .79rem; font-weight: 700; }
.secondary-button:hover { background: #e8efec; }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 30px, 660px); padding-top: 44px; }
  .intro { font-size: 1.04rem; }
  .deadline { margin-bottom: 25px; border-radius: 12px; }
  .upload-card { padding: 23px 19px; }
  .card-heading { gap: 12px; }
  h2 { font-size: 1.45rem; }
  .file-row { align-items: flex-start; }
  .file-meta { max-width: 105px; }
  .admin-file { align-items: flex-start; flex-direction: column; }
}
