:root { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #161616; background: #fafafa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.site-header { height: 64px; padding: 0 clamp(20px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8e8e8; background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #161616; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 20px/1 "Betania Patmos", cursive; white-space: nowrap; }
main { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0 96px; }
.intro { width: 100%; }
.eyebrow { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #8b6adb; }
h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; letter-spacing: -.02em; font-weight: 500; }
.intro > p:last-child { margin: 20px 0 0; color: #646464; font-size: 15px; line-height: 1.7; }
.upload-card { margin-top: 42px; background: #fff; border: 1px solid #dedede; border-radius: 16px; overflow: hidden; }
.upload-trigger { width: 100%; min-height: 138px; padding: 30px; display: flex; align-items: center; justify-content: space-between; gap: 26px; border: 0; background: transparent; color: inherit; text-align: left; }
.upload-trigger:hover { background: #fcfaff; }
.upload-copy { display: inline-flex; align-items: flex-start; gap: 12px; min-width: 0; }
.upload-copy-text { display: grid; gap: 8px; min-width: 0; }
.write-icon { width: 78px; height: 40px; flex: none; overflow: visible; color: #292929; }
.write-guide, .write-trail { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.write-guide { stroke: #c7c7c7; }
.write-trail { stroke: #161616; stroke-dasharray: 100 200; stroke-dashoffset: 103; }
.write-pen { offset-path: path("M7 30C17 24 28 18 32 18c7-1-1 9-3 12-5 8 10 1 26-7"); offset-anchor: 7px 29.5px; offset-rotate: 0deg; offset-distance: 0%; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .write-icon { --write-timing: linear(0, 0.32 25%, 0.68 75%, 1); }
  .write-pen { transition: offset-distance 600ms var(--write-timing); }
  .write-trail { transition: stroke-dashoffset 600ms var(--write-timing); }
  .upload-trigger:hover .write-pen { offset-distance: 100%; }
  .upload-trigger:hover .write-trail { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .upload-trigger:hover .write-trail, .upload-trigger:focus-visible .write-trail { stroke-dashoffset: 0; }
}
.upload-title { font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.history h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.upload-description { color: #727272; }
.upload-arrow { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: #fff; color: #424242; }
.upload-arrow svg { width: 20px; height: 20px; }
dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: hidden; padding: 28px; border: 1px solid #dedede; border-radius: 18px; background: #fff; color: #161616; box-shadow: 0 24px 80px #16161630; }
dialog[open] { display: flex; flex-direction: column; gap: 0; }
dialog form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dialog-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #12121278; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dialog-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.dialog-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f3f3f3; color: #555; }
.dialog-close svg { width: 16px; height: 16px; }
.dialog-description { margin: 12px 0 22px; color: #686868; }
.task-name-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.task-name-label span { color: #777; font-weight: 400; }
.task-name-input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d8d8d8; border-radius: 8px; background: #fff; color: #161616; font: inherit; font-weight: 400; transition: border-color .12s ease, box-shadow .12s ease; }
.task-name-input::placeholder { color: #a0a0a0; }
.task-name-input:hover:not(:disabled) { border-color: #c2c2c2; }
.task-name-input:focus { outline: none; border-color: #8b6adb; box-shadow: 0 0 0 3px #8b6adb26; }
.task-name-input:disabled { background: #f6f6f6; color: #9a9a9a; border-color: #e6e6e6; cursor: not-allowed; }
.task-name-input.is-invalid { border-color: #d24b45; }
.task-name-input.is-invalid:focus { border-color: #d24b45; box-shadow: 0 0 0 3px #d24b4526; }
.field-hint { margin: 8px 0 0; color: #8b8b8b; font-size: 12px; }
.field-error { margin: 7px 0 0; color: #b4232c; font-size: 12px; }
.source-dropzone { padding: 0; border-radius: 10px; }
.source-dropzone-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.source-dropzone.is-dragging { outline: 2px solid #7545dd; outline-offset: 4px; border-radius: 12px; }
.source-dropzone.is-dragging .source-dropzone-buttons button { border-color: #8b6adb; background: #f8f3ff; }
.source-dropzone-buttons button { min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed #d1c9df; border-radius: 10px; background: #fcfaff; color: #161616; font-size: 14px; font-weight: 600; transition: border-color .12s ease, background .12s ease, color .12s ease; }
.source-dropzone-buttons button:hover:not(:disabled) { border-color: #8b6adb; background: #f8f3ff; }
.source-dropzone-buttons button:disabled { opacity: .5; cursor: not-allowed; }
.source-dropzone-buttons button svg { width: 18px; height: 18px; flex: none; }
.selection-summary { margin-top: 18px; padding: 14px; border: 1px solid #e5dff2; border-radius: 12px; background: #fbf9ff; }
.selection-summary-head { display: flex; align-items: center; gap: 11px; }
.selection-summary-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: #efe7fd; color: #6f42c9; }
.selection-summary-icon svg { width: 18px; height: 18px; }
.selection-summary-text { min-width: 0; flex: 1; }
.selection-summary-text strong { display: block; font-size: 14px; font-weight: 600; color: #161616; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-summary-text span { display: block; margin-top: 2px; color: #777; font-size: 12px; }
.selection-clear { flex: none; padding: 5px 10px; border: 1px solid #e0d8f0; border-radius: 7px; background: #fff; color: #5f3ca8; font-size: 12px; font-weight: 600; }
.selection-clear:hover:not(:disabled) { border-color: #b9a5e4; background: #f6f1ff; }
.selection-clear:disabled { opacity: .5; cursor: not-allowed; }
.selection-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 14px 0 0; padding-top: 13px; border-top: 1px solid #ebe5f7; }
.selection-facts > div { min-width: 0; }
.selection-facts dt { color: #8b8b8b; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.selection-facts dd { margin: 3px 0 0; color: #3d3d3d; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress { margin-top: 18px; }
.upload-progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #686868; font-size: 12px; }
.upload-progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #eee8f5; }
.upload-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #8b6adb; transition: width 160ms ease-out; }
.upload-progress.is-done .upload-progress-track span { background: #2f9e6e; }
.task-name-input:focus-visible, button:focus-visible, a:focus-visible, .task-name-input:focus { outline: 2px solid #7545dd; outline-offset: 2px; }
.task-name-input:focus { outline: none; box-shadow: 0 0 0 3px #8b6adb26; }
.error { color: #b4232c; margin: 14px 0 0; padding: 10px 12px; border: 1px solid #f0c9c9; border-radius: 9px; background: #fdf5f5; font-size: 13px; }
.dialog-field { margin-top: 20px; }
.upload-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid #ececec; background: #fff; }
/* Match the workbench top bar: solid dark primary, outlined white secondary, pill radius. */
.upload-actions button { min-height: 38px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.upload-actions .secondary { border: 1px solid #dcdcdc; background: #fff; color: #3a3a3a; }
.upload-actions .secondary:hover:not(:disabled) { border-color: #c4c4c4; background: #f7f7f7; }
.upload-actions .primary { border: 1px solid #161616; background: #161616; color: #fff; }
.upload-actions .primary:hover:not(:disabled) { border-color: #333; background: #333; }
.upload-actions button:disabled { opacity: .45; cursor: not-allowed; }
.upload-actions .secondary:focus-visible, .upload-actions .primary:focus-visible { outline: 2px solid #161616; outline-offset: 2px; }
.history { margin-top: 70px; }
.history-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.history-heading .eyebrow { margin-bottom: 5px; }
#projectCount { color: #8b8b8b; font-size: 12px; }
.history-table-wrap { overflow-x: auto; border: 1px solid #e2e2e2; border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 20px; text-align: left; font-size: 11px; color: #898989; text-transform: uppercase; letter-spacing: .08em; background: #fbfbfb; }
th:last-child { width: 45px; }
td { padding: 19px 20px; border-top: 1px solid #eeeeee; color: #686868; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f7f7f7; }
td:first-child { color: #161616; font-weight: 600; white-space: normal; }
td:first-child a { color: inherit; text-decoration: none; }
td:first-child small { display: block; margin-top: 3px; color: #929292; font-weight: 400; }
td:last-child { text-align: right; font-size: 18px; color: #777; }
.empty-history { margin: 0; padding: 36px 20px; color: #8b8b8b; text-align: center; border-top: 1px solid #eeeeee; }
@media (max-width: 620px) { .upload-trigger { min-height: 120px; padding: 22px; } dialog { padding: 22px; } .source-dropzone-buttons { grid-template-columns: 1fr; } .selection-facts { grid-template-columns: 1fr; } .upload-actions button { flex: 1; } th:nth-child(2), td:nth-child(2) { display: none; } td { padding: 16px 13px; } }
