:root {
  color-scheme: light;
  --canvas: #f5f4f1;
  --paper: #fff;
  --ink: #201e1d;
  --muted: #625d59;
  --line: #e4dfda;
  --accent: #b41f29;
  --accent-dark: #8b1620;
  --tint: #fcf3f3;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
.shell { width: min(100% - 48px, 1024px); margin-inline: auto; }
.masthead { border-top: 5px solid var(--accent); border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 18px; min-height: 83px; }
.brand img { width: 100px; height: auto; display: block; }
.brand span { border-left: 1px solid var(--line); padding-left: 18px; font-size: .93rem; font-weight: 650; }
main { padding: 49px 0 36px; }
.intro { margin-bottom: 27px; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.35rem); letter-spacing: -.055em; line-height: 1.08; margin: 0 0 11px; }
h1 span { color: var(--accent); }
.intro p { margin: 0; color: var(--muted); font-size: 1.05rem; }

form { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 14px 32px -25px #32272345; }
fieldset { min-inline-size: 0; border: 0; margin: 0; padding: 0; }
.form-layout { display: grid; grid-template-columns: 1fr 1fr; padding: 28px 30px; }
.details { padding-right: 30px; border-right: 1px solid var(--line); }
.attachments { padding-left: 30px; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 19px; }
label, legend { display: block; font-size: .91rem; font-weight: 650; }
.optional { margin-left: 6px; font-size: .78rem; color: var(--muted); font-weight: 400; }
input, textarea, button { font: inherit; }
input[type=text], textarea { display: block; width: 100%; margin: 7px 0 15px; padding: 11px 12px; border: 1px solid #d4ceca; border-radius: 7px; color: var(--ink); background: #fff; }
textarea { resize: vertical; min-height: 84px; margin-bottom: 0; }
::placeholder { color: #726c66; }
:focus-visible { outline: 3px solid #a81b28; outline-offset: 2px; }

.type-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 7px 0 13px; }
.type-choices label { position: relative; cursor: pointer; }
.type-choices input { position: absolute; inset: 0; opacity: 0; cursor: inherit; margin: 0; }
.type-choices span { display: block; text-align: center; padding: 10px; border: 1px solid #d4ceca; border-radius: 7px; }
.type-choices input:checked + span { border-color: var(--accent); color: var(--accent-dark); background: var(--tint); }
.type-choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.drop-zone { min-height: 170px; display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; text-align: center; border: 1.5px dashed #c6b9b5; border-radius: 10px; background: #faf8f6; padding: 16px 8px; }
.drop-zone.dragging { background: var(--tint); border-color: var(--accent); }
.upload-icon { position: relative; width: 19px; height: 16px; margin: 10px 0 7px; border: 2px solid var(--accent); border-top: 0; border-radius: 0 0 4px 4px; }
.upload-icon::before { content: ''; position: absolute; width: 2px; height: 14px; left: 7px; top: -6px; background: var(--accent); }
.upload-icon::after { content: ''; position: absolute; width: 7px; height: 7px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); left: 4px; top: -6px; transform: rotate(45deg); }
button { cursor: pointer; }
.pick-files { padding: 7px 15px; background: var(--paper); border: 1px solid #d4ceca; border-radius: 7px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.pick-files:hover { border-color: var(--accent); color: var(--accent-dark); }
.drop-hint, .drop-zone small, .limit { color: var(--muted); font-size: .82rem; }
.drop-zone small { font-size: .76rem; }
.limit { margin: 9px 0 0; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.file-list li span { overflow-wrap: anywhere; }
.remove { flex: 0 0 auto; border: 0; background: transparent; padding: 6px 3px; color: var(--accent-dark); font-size: .8rem; font-weight: 650; }

.form-footer { border-top: 1px solid var(--line); background: #fcfbfa; padding: 16px 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scan-note { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--muted); font-size: .82rem; }
.shield { display: inline-block; flex: 0 0 auto; width: 13px; height: 15px; border: 1.5px solid var(--accent); border-radius: 2px 2px 7px 7px; }
.submit { flex: 0 0 auto; min-height: 45px; padding: 9px 24px; border: 1px solid transparent; border-radius: 7px; color: #fff; background: var(--accent); font-weight: 700; }
.submit:hover { background: var(--accent-dark); }
button:disabled { cursor: default; opacity: .65; }
.notice, .progress-wrap { margin: 14px 0 0; padding: 12px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .92rem; overflow-wrap: anywhere; }
#link-notice, noscript .notice { margin: 0 0 14px; }
.error { color: #871b24; border-color: #e9c8c8; background: #fff5f5; }
.success { color: #145739; border-color: #b6d6c4; background: #f3fbf6; }
progress { display: block; width: 100%; margin-top: 7px; accent-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 1024px); }
  .brand { min-height: 70px; }
  .brand img { width: 82px; }
  main { padding-top: 31px; }
  .intro { margin-bottom: 20px; }
  .form-layout { display: block; padding: 20px 17px; }
  .details { padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); }
  .attachments { padding: 20px 0 0; }
  .form-footer { flex-direction: column; align-items: stretch; padding: 15px 17px; }
  .scan-note { justify-content: center; }
  input[type=text], textarea { font-size: 16px; }
}

@media (pointer: coarse) {
  .drop-hint { display: none; }
}
