:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #222821;
    background: #f3f2ed;
    --ink: #222821;
    --muted: #555c51;
    --line: #d8d9ce;
    --accent: #294538;
    --paper: #fcfcf8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }

.shell {
    width: min(100% - 3rem, 70rem);
    margin-inline: auto;
}

.masthead {
    min-height: 5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    font-weight: 760;
    letter-spacing: .22em;
    font-size: .88rem;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(2.75rem, 8vw, 7rem);
    align-items: start;
    padding-block: clamp(3rem, 11vw, 8rem);
}

h1, h2, p, dl, dd { margin: 0; }

h1 {
    font-size: clamp(2.85rem, 6.3vw, 5rem);
    letter-spacing: -.066em;
    font-weight: 650;
    line-height: .99;
    overflow-wrap: anywhere;
    max-width: 11ch;
}

.invite-label {
    font-size: clamp(1.13rem, 2vw, 1.5rem);
    line-height: 1.35;
    margin-top: 1.6rem;
    overflow-wrap: anywhere;
}

.expiry, .resume-hint, .file-size, .drop-hint { color: var(--muted); }
.expiry { margin-top: .55rem; line-height: 1.5; }

.limits {
    display: grid;
    gap: 1rem;
    margin-top: 2.1rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
}

.limits dt { color: var(--muted); font-size: .875rem; }
.limits dd { margin-top: .24rem; font-weight: 620; font-variant-numeric: tabular-nums; }

.panel {
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: clamp(1.2rem, 4vw, 2.2rem);
}

h2 { font-size: 1.35rem; font-weight: 650; letter-spacing: -.025em; }
.status { margin-top: .62rem; color: var(--muted); line-height: 1.5; }
.status[data-state="complete"] { color: var(--accent); font-weight: 650; }
.error { margin-top: .8rem; color: #8e3128; line-height: 1.45; }
#retry-invite { margin-top: 1.2rem; }

.drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .55rem;
    min-height: 9.5rem;
    margin-top: 1.3rem;
    border: 1px dashed #929c90;
    border-radius: .75rem;
    background: #f4f6f0;
    padding: 1rem;
}

.drop-area[data-dragging] { border-color: var(--accent); background: #e6eee3; }
.drop-hint, .file-size, .resume-hint { font-size: .875rem; line-height: 1.5; }
.selection { margin-top: 1.25rem; }
.file-name { font-weight: 620; overflow-wrap: anywhere; }
.file-size { margin-top: .25rem; }

.progress-area { margin-top: 1rem; }
.progress-label { display: flex; justify-content: space-between; gap: .7rem; font-size: .85rem; }
#percent { font-variant-numeric: tabular-nums; }
progress {
    display: block;
    width: 100%;
    height: .5rem;
    margin-top: .5rem;
    appearance: none;
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #e3e7dd;
    accent-color: var(--accent);
}
progress::-webkit-progress-bar { background: #e3e7dd; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.actions { margin-top: 1.1rem; display: flex; gap: .55rem; flex-wrap: wrap; }
.resume-hint { margin-top: .94rem; }

.button {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    justify-content: center;
    padding: .62rem 1.05rem;
    border: 1px solid #9da698;
    border-radius: .55rem;
    font: inherit;
    font-size: .91rem;
    font-weight: 640;
    cursor: pointer;
}
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.secondary { color: var(--ink); background: var(--paper); }
.button.primary:hover:not(:disabled) { background: #1f352a; }
.button.secondary:hover:not(:disabled) { border-color: var(--accent); background: #eef2eb; }
.button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 46rem) {
    .shell { width: calc(100% - 2rem); }
    .masthead { min-height: 3.75rem; }
    .layout { display: block; padding-block: 2.4rem 3rem; }
    .panel { margin-top: 1.7rem; }
    .limits { grid-template-columns: 1fr 1fr; margin-top: 1.3rem; padding-top: .92rem; }
}

@media (pointer: coarse) {
    .drop-hint { display: none; }
    .drop-area { min-height: 6rem; }
}
