:root {
    color-scheme: light;
    --background: #eef4fa;
    --surface: #ffffff;
    --surface-subtle: #f5f9fc;
    --text: #101828;
    --muted: #667085;
    --line: #cfdae7;
    --line-strong: #aebed0;
    --primary: #1463e6;
    --primary-hover: #0f52c4;
    --primary-soft: #eaf2ff;
    --success: #067647;
    --success-soft: #ecfdf3;
    --warning: #a15c00;
    --warning-soft: #fff6df;
    --danger: #b42318;
    --danger-soft: #fff0ef;
    --brand-teal: #00a991;
    --brand-violet: #7c5ce7;
    --brand-navy: #172033;
    --brand-stripe: linear-gradient(90deg, #1463e6 0%, #00a991 42%, #ed7a2f 72%, #7c5ce7 100%);
    --shadow: 0 16px 38px rgba(27, 54, 83, 0.11);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

body.menu-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid rgba(20, 99, 230, 0.28);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    z-index: 30;
    top: 0;
    min-height: 66px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 28px;
    padding: 10px max(24px, calc((100vw - 1240px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.site-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand-stripe);
    content: "";
    opacity: 0.72;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #1463e6 0%, #00a991 58%, #7c5ce7 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.brand-copy {
    min-width: 0;
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 17px;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.site-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.site-nav a:hover {
    background: var(--surface-subtle);
    color: var(--text);
}

.site-nav .account-link {
    margin-left: 8px;
    background: var(--text);
    color: #fff;
}

.site-nav .account-link:hover {
    background: #263245;
    color: #fff;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: #475467;
    cursor: pointer;
}

.menu-button,
.menu-close,
.nav-overlay {
    display: none;
}

.page-main {
    width: 100%;
    max-width: 1240px;
    flex: 1;
    margin: 0 auto;
    padding: 36px 24px 56px;
}

.page-footer {
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px max(24px, calc((100vw - 1240px) / 2));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.page-footer a {
    color: #475467;
    text-decoration: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475467;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}

.primary-button,
.secondary-button,
.text-button,
.danger-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: var(--primary);
    color: #fff;
}

.primary-button:hover {
    background: var(--primary-hover);
}

.secondary-button {
    border-color: var(--line-strong);
    background: var(--surface);
    color: #344054;
}

.secondary-button:hover {
    border-color: #8996a9;
    color: var(--text);
}

.text-button {
    min-height: 34px;
    padding-inline: 8px;
    background: transparent;
    color: var(--primary);
}

.danger-button {
    border-color: #f5b7b1;
    background: var(--surface);
    color: var(--danger);
}

button:disabled,
a[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.48;
}

.upload-workspace {
    scroll-margin-top: 82px;
}

.upload-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    margin-bottom: 20px;
}

.upload-heading h1 {
    max-width: 760px;
    margin: 7px 0 8px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.02;
    letter-spacing: 0;
}

.upload-heading p {
    max-width: 670px;
    margin: 0;
    color: #475467;
    font-size: 17px;
}

.limit-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.limit-item {
    display: grid;
    gap: 1px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.limit-item strong {
    font-size: 13px;
}

.limit-item span {
    color: var(--muted);
    font-size: 10px;
}

.upload-tool {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.upload-tool::before,
.download-shell::before,
.auth-surface::before {
    position: absolute;
    z-index: 1;
    top: -1px;
    right: -1px;
    left: -1px;
    height: 3px;
    background: var(--brand-stripe);
    content: "";
}

.file-stage {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid var(--line);
}

.drop-zone {
    min-height: 250px;
    display: grid;
    place-items: center;
    padding: 26px;
    border: 1px dashed #9aa9bd;
    border-radius: 8px;
    background: #f4f9fd;
    text-align: center;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.is-dragging,
.drop-zone:focus-within {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.drop-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.drop-zone-copy {
    max-width: 360px;
    display: grid;
    justify-items: center;
    gap: 8px;
}

.drop-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #c7d7f6;
    border-radius: 8px;
    background: #fff;
    color: #087f72;
}

.drop-icon svg {
    width: 21px;
    height: 21px;
}

.drop-zone strong {
    font-size: 18px;
}

.drop-zone small {
    color: var(--muted);
    font-size: 13px;
}

.selection-panel {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.selection-head {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-subtle);
}

.selection-head strong {
    font-size: 13px;
}

.selection-head span {
    color: var(--muted);
    font-size: 12px;
}

.file-list {
    max-height: 240px;
    overflow-y: auto;
}

.file-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto 34px;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}

.file-row:last-child {
    border-bottom: 0;
}

.file-row > svg {
    color: #667085;
}

.file-copy {
    min-width: 0;
    display: grid;
}

.file-copy strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-copy span,
.file-size {
    color: var(--muted);
    font-size: 11px;
}

.remove-file {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
}

.upload-options {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.tool-heading {
    margin-bottom: 18px;
}

.tool-heading h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.tool-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.form-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.form-field > span,
.field-label {
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}

.form-field em {
    color: var(--muted);
    font-style: normal;
    font-weight: 400;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #fff;
}

.form-field textarea {
    min-height: 82px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(20, 99, 230, 0.12);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #667085;
    cursor: pointer;
}

.upload-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.upload-actions .primary-button {
    flex: 1;
}

.notice {
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-subtle);
    color: #475467;
    font-size: 13px;
}

.notice[data-type="success"] {
    border-color: #a9e4c6;
    background: var(--success-soft);
    color: var(--success);
}

.notice[data-type="warning"] {
    border-color: #f2d28c;
    background: var(--warning-soft);
    color: var(--warning);
}

.notice[data-type="error"] {
    border-color: #f5b7b1;
    background: var(--danger-soft);
    color: var(--danger);
}

.progress-panel {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}

progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: #e9edf3;
    appearance: none;
}

progress::-webkit-progress-bar {
    background: #e9edf3;
}

progress::-webkit-progress-value {
    background: var(--primary);
}

progress::-moz-progress-bar {
    background: var(--primary);
}

.result-panel {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #a9e4c6;
    border-radius: 6px;
    background: var(--success-soft);
}

.result-panel strong {
    display: block;
    color: var(--success);
    font-size: 13px;
}

.result-url {
    display: block;
    margin: 6px 0 10px;
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.info-band {
    margin-top: 42px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.info-band-head {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 18px;
}

.info-band h2 {
    margin: 0;
    font-size: 24px;
}

.info-band-head p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
}

.step-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.step-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border-right: 1px solid var(--line);
}

.step-item:last-child {
    border-right: 0;
}

.step-number {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #e6f7f3;
    color: #087f72;
    font-size: 12px;
    font-weight: 750;
}

.step-item h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.step-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.contact-row {
    min-height: 82px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--brand-navy);
    color: #fff;
}

.contact-row h2 {
    margin: 0 0 2px;
    font-size: 17px;
}

.contact-row p {
    margin: 0;
    color: #cbd5e1;
    font-size: 12px;
}

.contact-row a {
    color: #fff;
    font-size: 13px;
    font-weight: 650;
}

.download-main,
.auth-main,
.redirect-main {
    display: grid;
    place-items: start center;
}

.download-shell {
    position: relative;
    width: min(760px, 100%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.download-head {
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.download-head h1 {
    margin: 8px 0 4px;
    overflow-wrap: anywhere;
    font-size: 30px;
    line-height: 1.12;
}

.download-head > p {
    margin: 0;
    color: var(--muted);
}

.status-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 750;
}

.status-badge[data-state="ready"] {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge[data-state="scanning"] {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-badge[data-state="error"],
.status-badge[data-state="deleted"] {
    background: var(--danger-soft);
    color: var(--danger);
}

.download-body {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.transfer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.summary-item {
    padding: 12px;
    border-right: 1px solid var(--line);
}

.summary-item:last-child {
    border-right: 0;
}

.summary-item dt {
    color: var(--muted);
    font-size: 11px;
}

.summary-item dd {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 650;
}

.message-box {
    margin: 0;
    padding: 12px;
    border-left: 3px solid var(--line-strong);
    background: var(--surface-subtle);
    color: #344054;
}

.download-files {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.download-file-row {
    min-height: 48px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
}

.download-file-row:last-child {
    border-bottom: 0;
}

.download-file-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.download-file-row strong {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.preview-box {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #e9edf3;
}

.preview-box img,
.preview-box iframe {
    width: 100%;
    display: block;
    border: 0;
}

.preview-box img {
    max-height: 520px;
    object-fit: contain;
}

.preview-box iframe {
    height: 520px;
}

.download-actions {
    display: flex;
    gap: 8px;
}

.auth-main {
    align-items: center;
    min-height: calc(100vh - 136px);
}

.auth-surface {
    position: relative;
    width: min(460px, 100%);
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-heading h1 {
    margin: 6px 0 5px;
    font-size: 28px;
    line-height: 1.15;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
}

.auth-form .primary-button {
    width: 100%;
    margin-top: 4px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 18px;
    color: #475467;
    font-size: 12px;
}

.auth-links a {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
}

.redirect-surface {
    width: min(520px, 100%);
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
}

.redirect-surface h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.redirect-surface p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .site-header {
        padding-inline: 18px;
    }

    .page-main {
        padding-inline: 18px;
    }

    .upload-heading {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .limit-strip {
        justify-content: flex-start;
    }

    .upload-tool {
        grid-template-columns: 1fr;
    }

    .file-stage {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .step-list {
        grid-template-columns: 1fr;
    }

    .step-item {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .step-item:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 680px) {
    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 60px;
        padding: 9px 12px;
    }

    .brand-copy small {
        display: none;
    }

    .menu-button,
    .menu-close {
        display: inline-grid;
    }

    .menu-close {
        align-self: end;
        margin-bottom: 12px;
    }

    .site-nav {
        position: fixed;
        z-index: 42;
        top: 0;
        right: 0;
        width: min(300px, 86vw);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border-left: 1px solid var(--line);
        background: var(--surface);
        transform: translateX(102%);
        transition: transform 180ms ease;
    }

    .menu-open .site-nav {
        transform: translateX(0);
    }

    .site-nav a {
        min-height: 44px;
        justify-content: flex-start;
    }

    .site-nav .account-link {
        margin: 8px 0 0;
        justify-content: center;
    }

    .nav-overlay {
        position: fixed;
        z-index: 40;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(16, 24, 40, 0.38);
    }

    .page-main {
        padding: 24px 12px 38px;
    }

    .page-footer {
        align-items: flex-start;
        padding-inline: 12px;
    }

    .upload-heading h1 {
        font-size: 34px;
    }

    .upload-heading p {
        font-size: 15px;
    }

    .limit-strip {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .limit-item {
        padding: 7px;
    }

    .file-stage,
    .upload-options {
        padding: 14px;
    }

    .drop-zone {
        min-height: 190px;
        padding: 18px;
    }

    .file-row {
        grid-template-columns: 24px minmax(0, 1fr) 32px;
    }

    .file-size {
        display: none;
    }

    .info-band-head,
    .contact-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-row a {
        width: 100%;
        min-height: 40px;
        display: grid;
        place-items: center;
        border: 1px solid #536178;
        border-radius: 6px;
    }

    .download-head,
    .download-body,
    .auth-surface {
        padding: 20px 16px;
    }

    .download-head h1 {
        font-size: 25px;
    }

    .transfer-summary {
        grid-template-columns: 1fr;
    }

    .summary-item {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .summary-item:last-child {
        border-bottom: 0;
    }

    .summary-item dd {
        margin: 0;
        text-align: right;
    }

    .download-actions,
    .result-actions,
    .upload-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .auth-main {
        align-items: start;
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
