:root { --ink: #1e293b; --muted: #64748b; --paper: #f3f5f8; --line: #dce3eb; --blue: #315f8c; --blue-dark: #24486c; --green: #297355; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
.shell { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 24px; }
.masthead { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; margin-bottom: 24px; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-dark); color: white; font: 700 23px Georgia, serif; }
h1 { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; }
.subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.secure { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.secure i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 4px 24px #182e4710; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h2 { margin: 0; font-size: 15px; font-weight: 650; }
.section-heading > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dropzone { position: relative; min-height: 160px; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1px dashed #acbed0; border-radius: 9px; background: #f8fafc; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eff5fb; }
.dropzone:focus-within { outline: 3px solid #b9d1e8; outline-offset: 3px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 8px; background: #eaf0f6; color: var(--blue); font-size: 23px; }
.dropzone strong { max-width: 100%; font-size: 14px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.dropzone > span:not(.upload-icon) { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dropzone em { margin-top: 8px; color: var(--blue); font-size: 12px; font-style: normal; font-weight: 600; }
.dropzone em:empty { display: none; }
.formats { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.context-options { margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid #e8edf2; }
.context-options summary { cursor: pointer; color: var(--blue-dark); font-size: 13px; font-weight: 600; line-height: 1.6; }
.context-options summary span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.context-label { display: block; margin: 14px 0 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
textarea, .access-row input { width: 100%; border: 1px solid #cbd5e1; border-radius: 7px; background: white; color: var(--ink); outline: none; }
textarea { display: block; min-height: 88px; padding: 11px 12px; resize: vertical; font-size: 14px; line-height: 1.5; }
textarea:focus, .access-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #315f8c18; }
.actions { display: grid; grid-template-columns: 1fr 1.1fr; align-items: end; gap: 16px; }
.access-row { min-width: 0; }
.access-row label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.access-row input { height: 46px; padding: 0 12px; font-size: 16px; }
#submit { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 7px; background: var(--blue-dark); color: white; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
#submit:hover:not(:disabled) { background: #173b5d; }
#submit:disabled { cursor: not-allowed; background: #e2e8f0; color: #65748a; }
#submit b { font-size: 18px; }
button:focus-visible, summary:focus-visible { outline: 3px solid #8db1d2; outline-offset: 3px; }
.working-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.status, .result { margin-top: 20px; padding: 16px; border: 1px solid #d5e1ec; border-radius: 8px; background: #f6f9fc; }
.status-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
#timer { color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { height: 4px; margin: 13px 0 10px; overflow: hidden; border-radius: 4px; background: #dce5ec; }
.progress i { display: block; width: 8%; height: 100%; background: var(--blue); transition: width .7s ease; }
.progress i.indeterminate { animation: processing 1.7s ease-in-out infinite alternate; }
@keyframes processing { from { transform: translateX(0); } to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) { .progress i.indeterminate { animation: none; } }
.status p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.result { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-color: #cbe1d5; background: #f4faf6; }
.check { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; }
.result div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.result strong { font-size: 13px; }
.result span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.result button { min-height: 40px; border: 1px solid #a6c8b4; border-radius: 6px; background: white; padding: 9px 12px; color: #225a40; font-size: 12px; font-weight: 600; cursor: pointer; }
footer { display: flex; justify-content: center; gap: 8px; padding-top: 20px; color: var(--muted); font-size: 11px; }
@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); padding-top: 20px; }
  .masthead { grid-template-columns: 36px 1fr; margin-bottom: 18px; gap: 10px; }
  .mark { width: 36px; height: 36px; }
  h1 { font-size: 17px; }
  .secure { display: none; }
  .card { padding: 18px; border-radius: 11px; }
  .dropzone { min-height: 156px; padding: 18px 12px; }
  .actions { grid-template-columns: 1fr; gap: 14px; }
  .result { grid-template-columns: 30px minmax(0, 1fr); }
  .result button { grid-column: 1 / -1; }
}
