/* Free File Transfer — upload card and download page. Uses the tokens from site.css. */
.tx-body { --field: #f4f4f2; }
html[data-theme="dark"] .tx-body { --field: #1a1a1d; }

.tx-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(32px, 6vw, 96px); align-items: start; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 88px); }
.tx-copy .tt-tabs { margin-bottom: 36px; }
.tx-copy h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.tx-lead { max-width: 520px; margin-top: 18px !important; color: var(--muted); font-size: 17px; line-height: 1.6; }
.tx-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 600px; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line-2); }
.tx-facts dt { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.tx-facts dd { margin: 4px 12px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* The card ---------------------------------------------------------------- */
.tx-card { position: relative; padding: 22px; border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -30px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .tx-card { background: #121214; box-shadow: inset 0 0 0 1px var(--line-2); }
.tx-step { display: grid; gap: 14px; }
.tx-step[hidden] { display: none; }
.tx-center { justify-items: center; padding: 18px 6px 8px; text-align: center; }
.tx-center h2 { font-size: 24px; letter-spacing: -.035em; }
.tx-center > p { color: var(--muted); font-size: 15px; }
.tx-center > p strong { color: var(--text); font-weight: 600; word-break: break-all; }

.tx-drop { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--field); cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; }
.tx-drop:focus-within { box-shadow: inset 0 0 0 1.5px var(--text); }
.tx-drop-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; }
.tx-drop-icon svg { width: 26px; height: 26px; }
.tx-drop-text strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.tx-drop-text small { color: var(--muted); font-size: 13.5px; }
.tx-drop-limit { padding: 5px 10px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 600; }

.tx-files { display: grid; gap: 2px; max-height: 210px; margin: 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.tx-files[hidden] { display: none; }
.tx-files li { display: grid; grid-template-columns: minmax(0, 1fr) auto 30px; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 10px; }
.tx-files li:nth-child(odd) { background: var(--field); }
.tx-files .n { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.tx-files .s { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tx-files button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.tx-files button svg { width: 15px; height: 15px; }

.tx-meter { display: grid; gap: 6px; }
.tx-meter[hidden] { display: none; }
.tx-meter > span { display: block; height: 4px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.tx-meter i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--accent); transition: width .3s var(--ease); }
.tx-meter.is-over i { background: #e5484d; }
.tx-meter small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.tx-modes { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--field); }
.tx-modes button { height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tx-modes button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
html[data-theme="dark"] .tx-modes button[aria-checked="true"] { background: #26262a; }

.tx-field { display: grid; gap: 6px; }
.tx-field[hidden] { display: none; }
.tx-field label { color: var(--text); font-size: 13px; font-weight: 500; }
.tx-field input, .tx-field textarea, .tx-chips {
    width: 100%; min-height: 46px; padding: 11px 14px; border: 0; border-radius: 12px; outline: 0;
    background: var(--field); color: var(--text); -webkit-text-fill-color: var(--text); caret-color: var(--text);
    box-shadow: inset 0 0 0 1px transparent; font: inherit; font-size: 15px;
}
.tx-field textarea { resize: vertical; min-height: 84px; }
.tx-field input::placeholder, .tx-field textarea::placeholder { color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; }
.tx-field input:focus, .tx-field textarea:focus, .tx-chips:focus-within { box-shadow: inset 0 0 0 1.5px var(--text); }
.tx-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--field) inset; -webkit-text-fill-color: var(--text); }
.tx-field .is-bad { box-shadow: inset 0 0 0 1.5px #e5484d !important; }
.tx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 8px; cursor: text; }
.tx-chips input { flex: 1 1 140px; min-width: 120px; min-height: 30px; padding: 4px 6px; border-radius: 8px; box-shadow: none !important; background: transparent; }
.tx-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; }
html[data-theme="dark"] .tx-chip { background: #26262a; }
.tx-chip button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.tx-chip button svg { width: 12px; height: 12px; }
.tx-hint { color: var(--muted); font-size: 12px; }

.tx-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(229, 72, 77, .1); color: #d93036; font-size: 14px; }
html[data-theme="dark"] .tx-error { color: #ff7b80; }
.tx-error[hidden] { display: none; }
.tx-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.tx-go[disabled] { opacity: .55; cursor: default; }
.tx-go svg { width: 18px; height: 18px; }
.tx-ghost { height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--field); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tx-fine { margin: 0; color: var(--muted); font-size: 12.5px; text-align: center; }

.tx-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--field); color: var(--text); }
.tx-badge svg { width: 28px; height: 28px; }
.tx-badge.is-ok { background: var(--accent); color: #fff; }

.tx-code { display: grid; grid-template-columns: repeat(6, 48px); gap: 8px; justify-content: center; margin: 6px 0; }
.tx-code input { width: 48px; height: 58px; border: 0; border-radius: 14px; outline: 0; background: var(--field); color: var(--text); -webkit-text-fill-color: var(--text); caret-color: var(--accent); text-align: center; font: inherit; font-size: 24px; font-weight: 600; box-shadow: inset 0 0 0 1px transparent; }
.tx-code input:focus { box-shadow: inset 0 0 0 1.5px var(--text); }
.tx-code.is-bad input { box-shadow: inset 0 0 0 1.5px #e5484d; }
.tx-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.tx-links button { padding: 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.tx-links button[disabled] { text-decoration: none; cursor: default; }

.tx-ring { position: relative; width: 168px; height: 168px; }
.tx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tx-ring circle { fill: none; stroke-width: 8; }
.tx-ring-bg { stroke: var(--chip); }
.tx-ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .3s linear; }
.tx-ring strong { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tx-up-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tx-up-file { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.tx-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; width: 100%; padding: 5px; border-radius: 999px; background: var(--field); }
.tx-link input { min-width: 0; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.tx-link button { height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* drag files over the card */
.tx-dropping { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; border-radius: inherit; background: color-mix(in srgb, var(--accent) 92%, transparent); color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -.02em; pointer-events: none; }
.tx-card.is-dragging .tx-dropping { display: grid; }

/* Download page ------------------------------------------------------------ */
.tx-dl { display: grid; justify-items: center; gap: 18px; padding-top: clamp(32px, 6vw, 72px); padding-bottom: 24px; }
.tx-dl-card { display: grid; gap: 18px; width: min(640px, 100%); padding: clamp(22px, 4vw, 36px); }
.tx-dl-head h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.04em; word-break: break-word; }
.tx-dl-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px !important; color: var(--muted); font-size: 14px; }
.tx-dl-meta strong { color: var(--text); font-weight: 600; }
.tx-dl-msg { margin-top: 16px !important; padding: 14px 16px; border-radius: 14px; background: var(--field); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.tx-dl-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tx-dl-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--field); }
.tx-dl-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--card); color: var(--text); }
html[data-theme="dark"] .tx-dl-icon { background: #26262a; }
.tx-dl-icon svg { width: 20px; height: 20px; }
.tx-dl-name { min-width: 0; }
.tx-dl-name strong { display: block; overflow: hidden; font-size: 14.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.tx-dl-name small { color: var(--muted); font-size: 12.5px; }
.tx-dl-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.tx-dl-btn svg { width: 16px; height: 16px; }
.tx-gone-title { font-size: 26px; letter-spacing: -.035em; }
.tx-dl-own a { color: var(--muted); font-size: 14px; text-decoration: none; }

@media (max-width: 980px) {
    .tx-hero { grid-template-columns: minmax(0, 1fr); }
    .tx-copy .tt-tabs { margin-bottom: 24px; }
}
@media (max-width: 520px) {
    .tx-card { padding: 16px; border-radius: 22px; }
    .tx-facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .tx-drop { grid-template-columns: 44px minmax(0, 1fr); }
    .tx-drop-icon { width: 44px; height: 44px; }
    .tx-drop-limit { display: none; }
    .tx-code { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; }
    .tx-code input { width: 100%; height: 52px; }
    .tx-dl-btn span { display: none; }
}
