:root {
  --bg: #0a0c0e;
  --panel: #11151a;
  --line: #303841;
  --text: #e8edf1;
  --muted: #8c98a3;
  --accent: #8fe500;
  --danger: #ff6472;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
a { color: inherit; }
button, input { font: inherit; }
.topbar { min-height: 64px; padding: 0 max(1rem, 5vw); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: var(--text); font-weight: 900; letter-spacing: .12em; text-decoration: none; }
.brand span { color: var(--accent); }
.identity { display: flex; align-items: center; gap: 1rem; font-size: .75rem; }
.identity a, .link-button { color: var(--accent); font-weight: 700; }
.link-button { border: 0; padding: 0; background: transparent; cursor: pointer; text-decoration: underline; }
.clear-history { color: var(--muted); font-size: .8em; }
main { width: min(100% - 2rem, 900px); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) 0; flex: 1; }
.intro { margin-bottom: 1.75rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .6rem; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.05em; }
h2 { margin: 2.5rem 0 .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
h3 { margin-bottom: .35rem; font-size: clamp(1rem, 3vw, 1.35rem); overflow-wrap: anywhere; }
.intro p, .muted { color: var(--muted); line-height: 1.55; }
.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 5px 5px 0 #050607; }
.upload-panel { padding: .8rem; }
.dropzone { min-height: 190px; border: 1px dashed #5b6873; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; text-align: center; cursor: pointer; outline: 0; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragging { border-color: var(--accent); background: rgb(143 229 0 / 5%); }
.drop-icon { width: 42px; height: 42px; color: var(--accent); }
.dropzone strong { font-size: 1rem; margin-top: .3rem; }
.dropzone span { color: var(--muted); font-size: .8rem; margin-top: -.2rem; }
.transfer-list { display: grid; gap: 1rem; margin-top: 1rem; }
.transfer-card { padding: clamp(1rem, 3vw, 1.5rem); transition: border-color .15s; }
.transfer-card.completed { border-color: #5b850f; }
.transfer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.label { margin-bottom: .35rem; color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.file-meta, .resume-meta { margin-bottom: 0; font-size: .75rem; }
.badge { padding: .35rem .5rem; border: 1px solid var(--line); color: var(--muted); font-size: .65rem; font-weight: 800; white-space: nowrap; }
.progress-wrap { margin-top: 1.4rem; }
.progress-labels, .progress-details { display: flex; justify-content: space-between; gap: 1rem; }
.progress-labels { margin-bottom: .55rem; font-size: .8rem; font-weight: 800; }
.progress-details { margin-top: .45rem; color: var(--muted); font-size: .66rem; }
.progress { height: 10px; border: 1px solid var(--line); background: #080a0c; overflow: hidden; }
.progress > div { width: 0; height: 100%; background: var(--accent); transition: width .12s; }
.message { margin: 1rem 0 0; border-left: 2px solid var(--danger); padding: .65rem .8rem; color: #ff9da6; background: rgb(255 100 114 / 6%); font-size: .76rem; line-height: 1.45; }
.actions, .result-links { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.result-links { align-items: stretch; }
.link-kind { display: flex; border: 1px solid #64717d; }
.link-kind-button { border: 0; border-right: 1px solid #64717d; padding: .55rem .7rem; background: transparent; color: var(--muted); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.link-kind-button:last-child { border-right: 0; }
.link-kind-button.active { background: var(--accent); color: #071000; }
.share-link-row { display: flex; flex: 1 1 24rem; min-width: 0; }
.share-link { min-width: 0; flex: 1; border: 1px solid #64717d; border-right: 0; border-radius: 0; padding: .6rem .75rem; background: #080a0c; color: var(--text); }
.share-link:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
.button { min-height: 38px; padding: .6rem .85rem; border: 1px solid var(--accent); border-radius: 0; background: var(--accent); color: #071000; font-weight: 800; font-size: .75rem; text-decoration: none; cursor: pointer; }
.button.secondary { color: var(--text); background: transparent; border-color: #64717d; }
.button.danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.button:disabled { opacity: .4; cursor: not-allowed; }
.public-file-main { display: grid; place-items: center; }
.public-file-card { width: min(100%, 720px); padding: clamp(1.25rem, 5vw, 2.5rem); }
.public-file-card h1 { margin-bottom: .65rem; overflow-wrap: anywhere; font-size: clamp(1.6rem, 5vw, 3.2rem); }
.public-file-hint { color: var(--muted); }
.file-details { margin: 2rem 0; border-top: 1px solid var(--line); }
.file-details div { display: grid; grid-template-columns: minmax(7rem, .35fr) 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.file-details dt { color: var(--muted); font-size: .7rem; letter-spacing: .08em; }
.file-details dd { margin: 0; overflow-wrap: anywhere; }
.file-details small { display: block; margin-top: .3rem; color: var(--muted); font-size: .68rem; }
.public-download { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.public-file-card.error { border-color: var(--danger); }
.download-row { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 .5rem; flex-wrap: wrap; }
.direct-link-row { display: flex; flex: 1 1 20rem; min-width: 0; gap: 0; }
.direct-link { min-width: 0; flex: 1; border: 1px solid #64717d; border-right: 0; border-radius: 0; padding: .6rem .75rem; background: #080a0c; color: var(--text); font: inherit; font-size: .8rem; }
.direct-link:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
.download-note { margin: .8rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.resume-card { padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.resume-card .actions { margin-top: 0; flex-shrink: 0; }
.hidden { display: none !important; }

@media (max-width: 600px) {
  main { width: min(100% - 1rem, 900px); }
  .transfer-head { align-items: stretch; flex-direction: column; }
  .badge { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
