:root {
  color-scheme: light;
  --ink: #152338;
  --muted: #66758a;
  --soft: #f5f7fb;
  --line: #dce3ee;
  --card: #ffffff;
  --accent: #335eea;
  --accent-deep: #2142bc;
  --accent-soft: #eaf0ff;
  --green: #0d8d67;
  --red: #bc3b50;
  --shadow: 0 18px 48px rgba(33, 55, 91, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #eef2f8; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(135deg, #f5f8fd 0%, #edf1f8 56%, #e8eefb 100%); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1320px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 72px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.2rem, 4.5vw, 4.3rem); letter-spacing: -.065em; line-height: .98; }
h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.035em; }
.lede { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.status-pill, .chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-pill { padding: 10px 13px; }
.status-pill[data-state="ready"] { color: var(--green); border-color: #aee2d1; background: #effbf7; }
.status-pill[data-state="error"] { color: var(--red); border-color: #efc3cb; background: #fff4f5; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa7b8; }
.status-pill[data-state="ready"] .status-dot { background: var(--green); }
.status-pill[data-state="error"] .status-dot { background: var(--red); }
.grid { display: grid; gap: 18px; }
.grid-config { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); margin-bottom: 18px; }
.card { border: 1px solid rgba(214, 223, 237, .95); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.config-card, .how-card, .upload-card, .uploads-card { padding: 28px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.compact-heading { align-items: center; margin-bottom: 18px; }
.chip { padding: 7px 10px; font-size: 10px; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.wide, .form-actions.wide { grid-column: 1 / -1; }
.field > span { color: #334762; font-size: 12px; font-weight: 800; }
.field small, .save-note, .helper, .section-copy { color: var(--muted); font-size: 12px; line-height: 1.45; }
input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cbd5e4; border-radius: 11px; outline: none; background: #fff; color: var(--ink); }
input:focus-visible, button:focus-visible { border-color: var(--accent); outline: 3px solid rgba(51,94,234,.2); outline-offset: 2px; }
.form-actions { display: flex; align-items: center; gap: 14px; padding-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 850; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(51,94,234,.2); }
.button.primary:hover:not(:disabled) { background: var(--accent-deep); }
.button.secondary { border-color: #c8d3e5; background: #fff; color: var(--ink); }
.button.secondary:hover { border-color: var(--accent); color: var(--accent); }
.button.ghost { min-height: 34px; padding: 0 12px; border-color: var(--line); background: transparent; color: var(--muted); }
.button.ghost:hover { color: var(--accent); border-color: #b9c8e8; background: var(--accent-soft); }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; min-height: 100%; opacity: 0; cursor: pointer; }
.how-card { background: #172844; color: #fff; }
.how-card .eyebrow { color: #9eb6ff; }
.how-card h2 { color: #fff; }
.flow { display: grid; gap: 10px; margin: 24px 0; }
.flow-step { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.flow-step > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(171,192,255,.35); border-radius: 9px; color: #b8c7ff; font-size: 10px; font-weight: 900; }
.flow-step strong { font-size: 13px; }
.flow-step small { grid-column: 2; margin-top: 2px; color: #afbdd2; font-size: 11px; line-height: 1.4; }
.flow-line { height: 16px; margin-left: 13px; border-left: 1px dashed rgba(171,192,255,.4); }
.notice { display: grid; gap: 4px; padding: 13px; border: 1px solid rgba(171,192,255,.2); border-radius: 13px; background: rgba(255,255,255,.06); color: #c3cfe1; font-size: 11px; line-height: 1.45; }
.notice strong { color: #fff; font-size: 12px; }
.section-copy { max-width: 680px; margin-bottom: 0; }
.selected-file { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #d8e1ef; border-radius: 15px; background: var(--soft); }
.file-icon, .empty-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 20px; font-weight: 800; }
.file-summary { display: grid; min-width: 0; gap: 4px; }
.file-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-summary span { color: var(--muted); font-size: 12px; }
.icon-button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.icon-button:hover { color: var(--red); }
.upload-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.progress-wrap { margin-top: 20px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.progress-label strong { color: var(--ink); }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e4e9f2; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #70a4ff); transition: width .2s ease; }
.empty-state { display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 18px; border: 1px dashed #cfd9e7; border-radius: 15px; background: #fafbfd; }
.empty-state strong { display: block; margin-bottom: 4px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
td { padding: 14px 12px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.table-file { display: grid; gap: 4px; max-width: 260px; }
.table-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-file span, .checksum { color: var(--muted); font-size: 11px; }
.status-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 800; }
.status-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa7b8; }
.status-label.completed { color: var(--green); }
.status-label.completed::before { background: var(--green); }
.status-label.failed { color: var(--red); }
.status-label.failed::before { background: var(--red); }
.status-label.uploading { color: var(--accent); }
.status-label.uploading::before { background: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.row-button { padding: 7px 9px; border: 1px solid #ccd7e8; border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 800; }
.row-button:hover { border-color: var(--accent); color: var(--accent); }
.toast { position: fixed; z-index: 5; top: 22px; left: 50%; width: min(460px, calc(100% - 30px)); padding: 13px 16px; transform: translateX(-50%); border: 1px solid #bcd0f4; border-radius: 12px; background: #f6f9ff; box-shadow: var(--shadow); color: var(--ink); font-size: 12px; font-weight: 750; }
.toast.error { border-color: #edc2ca; background: #fff4f5; color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .grid-config { grid-template-columns: 1fr; } .how-card { min-height: 0; } }
@media (max-width: 620px) { .shell { width: min(100% - 24px, 1320px); padding-top: 26px; } .topbar, .section-heading, .upload-actions { align-items: stretch; flex-direction: column; } .topbar { gap: 18px; } .status-pill { align-self: flex-start; } .config-card, .how-card, .upload-card, .uploads-card { padding: 20px; border-radius: 17px; } .form-grid { grid-template-columns: 1fr; } .field.wide, .form-actions.wide { grid-column: auto; } .form-actions { align-items: stretch; flex-direction: column; } .button { width: 100%; } .file-button { width: auto; } h1 { font-size: 2.5rem; } .section-heading { gap: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
