@charset "UTF-8";
:root {
  --blue: #0a449b;
  --blue-hover: #07377f;
  --ink: #111827;
  --muted: #667085;
  --line: #dce2ea;
  --surface: #ffffff;
  --wash: #f5f7fb;
  --error: #a93232;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
.skip-link { position: absolute; top: 8px; left: 12px; z-index: 10; padding: 10px 16px; color: var(--blue); background: white; border: 1px solid var(--blue); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
button, input { font: inherit; }
a { color: var(--blue); text-underline-offset: 3px; }
a, button, input, label { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible,
label.file-button:has(+input:focus-visible) { outline: 3px solid #8bb9ff; outline-offset: 4px; }
button, .file-button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -1px; }
h2 { margin-bottom: 12px; font-size: 18px; line-height: 1.4; font-weight: 600; }
h3 { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.site-header { background: var(--blue); color: white; border-bottom: 1px solid #ffffff26; }
.header-inner { max-width: 1160px; margin: auto; padding: 22px 32px; min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { color: white; font-size: 30px; font-weight: 600; letter-spacing: -1.1px; text-decoration: none; line-height: 1; }
.account-nav { display: flex; align-items: center; gap: 24px; min-width: 0; font-family: var(--mono); font-size: 11px; }
.account-nav form { margin: 0; }
.account-link { color: white; text-decoration: none; padding: 8px 0; }
.account-link:hover, .account-link[aria-current="page"] { text-decoration: underline; }
.username { max-width: 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-button { padding: 9px 13px; background: transparent; border: 1px solid #ffffff70; color: white; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; }
.text-button:hover { background: #ffffff15; border-color: white; }
.test-banner { padding: 10px 24px; text-align: center; background: #f3f6fc; color: #456084; border-bottom: 1px solid #e5ebf5; font-family: var(--mono); font-size: 10px; letter-spacing: .01em; }
.test-banner strong { font-weight: 500; }
.page-shell { max-width: 1056px; margin: 0 auto; padding: 52px 0 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 36px; }
.compact-heading { margin-bottom: 30px; }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.lede { max-width: 600px; color: var(--muted); margin: 14px 0 0; font-size: 14px; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 11px 18px; border: 1px solid var(--blue); border-radius: 3px; color: white; background: var(--blue); font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .015em; line-height: 1.4; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button span { font-family: Arial, sans-serif; font-size: 17px; line-height: 1; }
.button-secondary { color: var(--blue); background: white; border-color: #a9bbd4; }
.button-secondary:hover { color: var(--blue); background: #f2f6fc; border-color: var(--blue); }
.button:disabled { color: #8b97a8; background: #edf0f4; border-color: #e1e6ed; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 0; }
.quiet { color: var(--muted); font-size: 12px; }
.attempt-list { border-top: 1px solid var(--line); }
.attempt-row { display: flex; align-items: center; gap: 20px; padding: 22px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.attempt-row:hover { background: #f8faff; }
.attempt-summary { flex: 1; min-width: 0; }
.attempt-summary h3 { overflow-wrap: anywhere; }
.attempt-summary p { margin: 0; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.document-icon { width: 38px; height: 44px; border: 1px solid var(--line); background: #f8faff; color: var(--blue); display: flex; justify-content: center; align-items: center; flex: none; font-family: var(--mono); font-size: 11px; }
.document-icon span { font-size: 9px; margin-top: 4px; }
.status-badge { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid #d7e2f3; border-radius: 3px; font-family: var(--mono); font-size: 10px; line-height: 1.5; color: var(--blue); background: #f5f8fe; white-space: nowrap; }
.status-badge[data-phase="ready"] { background: #f1f7f5; color: #27654e; border-color: #d4e6de; }
.status-badge[data-phase="failed"], .status-badge[data-phase="interrupted"] { color: #924039; border-color: #edd6d2; background: #fcf5f3; }
.row-arrow { font-size: 18px; color: #8393ab; }
.empty-state { padding: 48px 28px; background: #fafbfe; border: 1px solid var(--line); text-align: center; }
.empty-state h3 { font-size: 17px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.retention-note { margin: 22px 0 0; max-width: 850px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.back-link { display: inline-block; margin-bottom: 27px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-decoration: none; }
.back-link:hover { color: var(--blue); text-decoration: underline; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.upload-card { padding: 25px; border: 1px solid var(--line); }
.upload-card h2 { font-size: 19px; margin-bottom: 10px; }
.upload-card > p { margin-bottom: 22px; min-height: 42px; font-size: 13px; color: var(--muted); }
.reference-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 24px; font-size: 13px; }
.reference-summary p { margin: 0; color: var(--muted); }
.reference-summary a { flex: none; }
.library-description { max-width: 700px; margin-bottom: 26px; color: var(--muted); font-size: 13px; }
.step-number { color: var(--blue); font-family: var(--mono); font-size: 10px; margin-bottom: 16px; }
.upload-zone { min-height: 174px; padding: 25px 16px; background: #f8faff; border: 1px dashed #c9d5e6; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.upload-zone strong { margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.upload-zone > span:not(.upload-symbol) { max-width: 280px; color: var(--muted); font-size: 11px; margin-bottom: 20px; }
.upload-symbol { display: none; }
.file-button { min-height: 38px; padding: 9px 14px; }
.file-button[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.uploaded-section { margin-top: 32px; }
.file-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.file-list li { display: flex; align-items: center; gap: 16px; padding: 14px 3px; border-bottom: 1px solid var(--line); font-size: 12px; }
.file-kind { width: 76px; flex: none; font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--muted); }
.file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-size { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.file-complete { color: var(--blue); }
.reference-list form { margin: 0; flex: none; }
.reference-description { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.reference-description .file-name { overflow-wrap: anywhere; }
.reference-message { color: var(--muted); line-height: 1.5; font-size: 11px; }
.reference-status { color: var(--muted); flex: none; font-size: 11px; }
.reference-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.retry-reference { min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 3px; color: var(--blue); background: white; font-family: var(--mono); font-size: 10px; }
.retry-reference:disabled { color: #8b97a8; background: #edf0f4; }
.remove-reference { min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: white; font-family: var(--mono); font-size: 10px; }
.remove-reference:hover { color: var(--error); border-color: #d4aeae; background: #fff8f7; }
.remove-reference:disabled { color: #8b97a8; background: #edf0f4; border-color: #e1e6ed; }
.file-list li.files-placeholder { padding: 21px 3px; color: var(--muted); }
.upload-progress { padding: 16px 0; }
.progress-caption { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.progress-caption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
progress { display: block; height: 4px; width: 100%; border: 0; background: #e6ecf5; accent-color: var(--blue); }
progress::-webkit-progress-bar { background: #e6ecf5; }
progress::-webkit-progress-value { background: var(--blue); }
.start-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.start-panel strong { font-size: 13px; font-weight: 500; }
.start-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.csrf-holder { display: none; }
.notice { padding: 13px 15px; border: 1px solid #cddced; background: #f0f5fd; color: #335b8e; font-size: 13px; line-height: 1.6; border-radius: 3px; }
.notice.error { border-color: #e7caca; background: #fff6f5; color: var(--error); }
.notice ul { margin: 0; padding-left: 18px; }
.messages { margin-bottom: 24px; }
.detail-heading { margin-bottom: 28px; }
.detail-heading h1 { font-size: 30px; word-break: break-word; margin-bottom: 10px; }
.detail-heading .quiet { margin-bottom: 0; font-family: var(--mono); font-size: 10px; }
.status-panel { padding: 28px; background: #fafbfe; border: 1px solid var(--line); }
.status-panel-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.status-panel-top h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.connection-note { font-family: var(--mono); font-size: 10px; color: #9b6b1d; }
.connection-note.healthy { color: var(--muted); }
.status-panel h2 { font-size: 21px; margin-bottom: 12px; }
.status-panel > p:not(.last-confirmed) { max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 22px; }
.status-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 43px; }
.status-actions form { margin: 0; }
.status-actions:empty, #status-message:empty { display: none; }
.pdf-download { position: relative; }
.pdf-download summary { list-style: none; cursor: pointer; }
.pdf-download summary::-webkit-details-marker { display: none; }
.pdf-download[open] summary { border-color: var(--blue); }
.pdf-download-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 2; min-width: 100%; width: max-content; max-width: min(420px, calc(100vw - 92px)); margin: 0; padding: 5px 0; list-style: none; border: 1px solid var(--line); border-radius: 3px; background: white; box-shadow: 0 5px 15px #152d5012; }
.pdf-download-list a { display: block; padding: 10px 15px; font-family: var(--mono); font-size: 11px; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.pdf-download-list a:hover, .pdf-download-list a:focus-visible { background: #f2f6fc; }
.last-confirmed { margin: 24px 0 0; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.working-indicator { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.working-indicator > span, .status-spinner { display: inline-block; flex: none; width: 13px; height: 13px; border: 1px solid #c4d3e9; border-top-color: var(--blue); border-radius: 50%; animation: spin 1.5s linear infinite; }
.detail-files { margin-top: 32px; }
.draft-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.draft-link { padding: 9px 12px; border: 1px solid var(--line); color: var(--blue); font-family: var(--mono); font-size: 10px; text-decoration: none; }
.draft-link:hover { background: #f2f6fc; }
.auth-page { min-height: 100vh; background: #0a449b; }
.auth-page .site-header { background: transparent; border-bottom: 0; }
.auth-page .header-inner { justify-content: center; padding-top: 35px; padding-bottom: 18px; }
.auth-page .brand { font-size: 34px; }
.auth-page .test-banner { max-width: 600px; margin: 0 auto; padding: 8px 20px; background: transparent; color: #d6e5fd; border: 0; }
.auth-shell { max-width: 460px; padding: 38px 0 72px; }
.auth-card { padding: 37px 38px; background: white; border: 1px solid #ffffff; border-radius: 24px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.6px; margin-bottom: 28px; }
.auth-intro { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.account-form { display: flex; flex-direction: column; gap: 20px; }
.form-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 500; color: #344054; }
.form-field input { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd5dd; border-radius: 6px; background: white; color: var(--ink); font-size: 14px; }
.form-field input:hover { border-color: #99a9c1; }
.field-help { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.field-help ul { margin: 0; padding-left: 16px; }
.field-error { margin: 7px 0 0; color: var(--error); font-size: 11px; }
.field-error p { margin: 0; }
.full-width { width: 100%; justify-content: center; margin-top: 3px; border-radius: 6px; font-family: Arial, sans-serif; font-size: 14px; text-transform: none; letter-spacing: 0; }
.auth-footnote { margin: 25px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 1120px) { .page-shell { margin-left: 32px; margin-right: 32px; } .auth-shell { margin-left: auto; margin-right: auto; } }
@media (max-width: 700px) {
  .header-inner { padding: 20px 22px; min-height: 76px; }
  .header-inner { gap: 16px; }
  .header-inner { flex-wrap: wrap; }
  .brand { font-size: 27px; }
  .account-nav { gap: 14px; font-size: 10px; }
  .account-nav { margin-left: auto; }
  .username { max-width: 110px; }
  .text-button { padding: 8px 10px; font-size: 9px; }
  .test-banner { padding: 9px 20px; font-size: 9px; }
  .page-shell { margin: 0 22px; padding-top: 32px; padding-bottom: 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 28px; }
  h1 { font-size: 28px; letter-spacing: -.6px; }
  .section-heading { gap: 12px; }
  .section-heading .quiet { font-size: 10px; }
  .attempt-row { padding: 20px 0; gap: 12px; flex-wrap: wrap; }
  .attempt-summary { flex-basis: calc(100% - 60px); }
  .attempt-summary h3 { font-size: 14px; }
  .attempt-summary p { font-size: 9px; }
  .attempt-row > .status-badge { margin-left: 50px; }
  .row-arrow { margin-left: auto; }
  .upload-grid { grid-template-columns: 1fr; gap: 18px; }
  .upload-card { padding: 22px; }
  .upload-card > p { min-height: 0; }
  .reference-summary { align-items: flex-start; flex-direction: column; gap: 10px; }
  .file-list li { gap: 10px; }
  .file-kind { width: 63px; font-size: 9px; }
  .file-size { font-size: 9px; }
  .start-panel { align-items: stretch; flex-direction: column; gap: 17px; }
  .start-panel .button { width: 100%; }
  .detail-heading h1 { font-size: 26px; }
  .status-panel { padding: 23px; }
  .status-actions { align-items: stretch; flex-direction: column; }
  .status-actions > .button, .status-actions .pdf-download summary { width: 100%; }
  .pdf-download-list { width: 100%; max-width: none; }
  .status-panel-top { gap: 12px; }
  .connection-note { font-size: 9px; }
  .auth-shell { margin: 0 auto; padding: 28px 20px 48px; }
  .auth-card { padding: 30px 27px; }
  .auth-page .header-inner { padding-top: 32px; }
}
@media (max-width: 380px) {
  .header-inner { gap: 12px; padding-left: 18px; padding-right: 18px; }
  .brand { font-size: 24px; flex: none; }
  .account-nav { gap: 10px; }
  .account-nav { width: 100%; }
  .username { max-width: 64px; }
  .account-nav .username { margin-left: auto; }
  .text-button { flex: none; white-space: nowrap; }
  .file-list li { flex-wrap: wrap; }
  .file-name { flex-basis: calc(100% - 75px); }
  .file-size { margin-left: 73px; }
  .reference-list .reference-description { flex-basis: 100%; }
  .reference-list .file-size { margin-left: 0; }
  .reference-list .reference-actions { margin-left: auto; }
}
