:root {
    color-scheme: light;
    --ink: #17232b;
    --muted: #66747c;
    --line: #dce5e4;
    --green: #0c6b5a;
    --green-dark: #084d42;
    --green-soft: #e8f5f1;
    --blue: #2f74b5;
    --red: #c64545;
    --paper: #ffffff;
    --canvas: #eef4f2;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(12, 107, 90, .12), transparent 28rem),
        radial-gradient(circle at 92% 12%, rgba(47, 116, 181, .09), transparent 25rem),
        var(--canvas);
}

button, input { font: inherit; }

.shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 36px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    color: white;
    background: linear-gradient(145deg, var(--green), var(--green-dark));
    box-shadow: 0 16px 36px rgba(8, 77, 66, .22);
    font-weight: 800;
    letter-spacing: .04em;
}

.eyebrow, .step {
    margin: 0 0 5px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 23px; letter-spacing: -.02em; }
.lead { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

.panel {
    margin-top: 18px;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(12, 107, 90, .12);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 60px rgba(28, 54, 50, .08);
}

.panel-heading, .selection-bar, .file-title-line, .file-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.format-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
}

.project-guide {
    margin: 24px 0 2px;
    padding: 18px;
    border-radius: 17px;
    background: #f4f8f7;
}

.project-guide > p {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
}

.project-guide > p strong { color: var(--ink); }

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.project-card {
    display: grid;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper);
}

.project-card span {
    margin-bottom: 8px;
    color: var(--green);
    font-size: 11px;
    font-weight: 850;
}

.project-card strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
}

.project-card small {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
}

.instruction-strip {
    display: flex;
    margin-top: 12px;
    padding: 14px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #cfe2de;
    border-radius: 14px;
    background: #fbfdfc;
}

.instruction-strip > div {
    display: grid;
    gap: 3px;
}

.instruction-strip strong { font-size: 14px; }
.instruction-strip span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.pdf-button {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.pdf-button:hover { color: white; background: var(--green); }

.drop-zone {
    display: flex;
    min-height: 230px;
    margin: 26px 0 20px;
    padding: 32px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    text-align: center;
    border: 2px dashed #a9c8c0;
    border-radius: 19px;
    color: var(--muted);
    background: linear-gradient(180deg, #f8fcfb, #f1f8f6);
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

.drop-zone:hover, .drop-zone.dragging {
    border-color: var(--green);
    background: var(--green-soft);
    transform: translateY(-2px);
}

.drop-zone strong { color: var(--ink); font-size: 18px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.upload-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 5px;
    place-items: center;
    border-radius: 17px;
    color: white;
    background: var(--green);
    font-size: 30px;
    font-weight: 300;
    box-shadow: 0 10px 22px rgba(12, 107, 90, .22);
}

.selection-bar > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.selection-bar span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.capacity-panel {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid #cfe2de;
    border-radius: 16px;
    background: #fbfdfc;
}

.capacity-heading {
    display: flex;
    margin-bottom: 12px;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.capacity-heading strong { font-size: 15px; }
.capacity-heading span { color: var(--muted); font-size: 12px; }

.capacity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.capacity-grid > div {
    display: grid;
    gap: 3px;
    padding: 12px;
    border-radius: 12px;
    background: #f1f6f4;
}

.capacity-grid strong {
    color: var(--ink);
    font-size: 19px;
    letter-spacing: -.02em;
}

.capacity-grid span { color: var(--muted); font-size: 11px; }

.capacity-grid .capacity-primary { background: var(--green-soft); }
.capacity-grid .capacity-primary strong { color: var(--green-dark); }

.capacity-panel > p {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.primary-button {
    min-width: 190px;
    padding: 14px 22px;
    border: 0;
    border-radius: 13px;
    color: white;
    background: var(--green);
    box-shadow: 0 10px 22px rgba(12, 107, 90, .19);
    font-weight: 750;
    cursor: pointer;
}

.primary-button:hover:not(:disabled) { background: var(--green-dark); }
.primary-button:disabled { color: #a6afad; background: #e4e9e8; box-shadow: none; cursor: default; }

.safe-note {
    margin: 17px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.safe-note span { display: inline-grid; width: 20px; height: 20px; margin-right: 5px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-weight: 800; }

.text-button, .remove-button {
    border: 0;
    color: var(--green);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 24px 0;
}

.summary-grid div {
    display: flex;
    min-height: 76px;
    padding: 13px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 14px;
    background: #f4f8f7;
}
.summary-grid span { font-size: 22px; font-weight: 800; }
.summary-grid small { color: var(--muted); }

.empty-state {
    padding: 34px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}
.empty-state[hidden] { display: none; }

.upload-list { display: grid; gap: 11px; }
.upload-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 15px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 15px;
}
.file-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.file-main { min-width: 0; }
.file-title-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-detail { margin: 5px 0 9px; color: var(--muted); font-size: 12px; }
.file-detail span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-detail span:last-child { flex: 0 0 auto; }
.status { flex: 0 0 auto; padding: 5px 8px; border-radius: 20px; color: var(--muted); background: #eef2f1; font-size: 11px; font-weight: 800; }
.status.active { color: var(--blue); background: #e9f2fb; }
.status.success { color: var(--green); background: var(--green-soft); }
.status.error { color: var(--red); background: #fbecec; }
.progress-track { height: 6px; overflow: hidden; border-radius: 20px; background: #e8edec; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .18s ease; }
.upload-row.error .progress-track span { background: var(--red); }
.remove-button { align-self: start; padding: 2px 6px; color: #8b9694; font-size: 23px; font-weight: 400; }

footer { padding: 24px 10px 0; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 650px) {
    .shell { width: min(100% - 20px, 920px); padding-top: 26px; }
    .hero { align-items: flex-start; }
    .brand-mark { flex-basis: 56px; width: 56px; height: 56px; border-radius: 17px; font-size: 13px; }
    h1 { font-size: 34px; }
    .lead { font-size: 15px; }
    .panel { padding: 19px; border-radius: 19px; }
    .format-note { display: none; }
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .instruction-strip { align-items: stretch; flex-direction: column; }
    .pdf-button { text-align: center; }
    .drop-zone { min-height: 190px; padding: 22px 14px; }
    .selection-bar { align-items: stretch; flex-direction: column; }
    .capacity-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .capacity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .primary-button { width: 100%; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .upload-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
    .file-icon { width: 42px; height: 42px; }
    .file-title-line { align-items: flex-start; }
    .file-detail span:last-child { display: none; }
}
