@font-face { font-family: "Jakarta"; src: url("/static/fonts/PlusJakartaSans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/static/fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --noir: #0e0e10; --encre: #12100f; --surface: #161618; --surface-2: #1d1d20; --line: rgba(255,255,255,.08);
  --papier: #f5f5f3; --muted: #a3a19c; --faint: #6e6c68;
  --rouge: #ff2d2d; --rouge-fill: #d11616; --rouge-dk: #a81010; --ok: #34d399;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--noir); color: var(--papier); font-family: "Jakarta", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow-x: hidden; }
a { color: inherit; }
.glow { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(140px); z-index: 0; }
.glow.a { width: 520px; height: 520px; top: -200px; right: -200px; background: rgba(255,45,45,.10); }
.glow.b { width: 460px; height: 460px; bottom: -260px; left: -200px; background: rgba(168,16,16,.08); }

.top, .foot, main { position: relative; z-index: 1; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 4vw, 40px); }
.top .logo img { height: 22px; display: block; }
.top nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mono { font-family: "JBMono", ui-monospace, monospace; }
.eyebrow { font-family: "JBMono", ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .26em; color: var(--rouge); margin: 0; }
.tag { font-family: "JBMono", ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 24px clamp(18px, 4vw, 40px) 48px; }
main.narrow { max-width: 560px; }
main.center { display: flex; flex-direction: column; justify-content: center; }
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 10px; }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
p.lead { color: var(--muted); margin: 0 0 24px; font-size: 15px; line-height: 1.5; }
.foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 clamp(20px, 4vw, 40px) 22px; font-family: "JBMono", monospace; font-size: 11px; color: var(--faint); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--papier); }

.card { background: rgba(22,22,24,.82); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 28px); box-shadow: 0 30px 60px rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.card + .card { margin-top: 16px; }
label { display: block; font-size: 14px; color: #d8d6d1; margin: 0 0 6px; font-weight: 500; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; background: var(--noir); color: var(--papier); border: 1px solid #2c2c31; border-radius: 10px;
  padding: 12px 13px; font: inherit; font-size: 16px; outline: none; transition: border-color .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--rouge); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, opacity .15s, transform .05s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--rouge); color: #fff; } .btn.primary:hover { background: var(--rouge-fill); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); } .btn.ghost:hover { color: var(--papier); border-color: #3a3a40; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 8px; font-size: 14px; } .linkbtn:hover { color: var(--papier); }
.error { background: rgba(255,45,45,.1); border: 1px solid rgba(255,45,45,.3); color: #ff8a8a; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }
.success { background: rgba(52,211,153,.08); border: 1px solid rgba(52,211,153,.3); color: #8ef0c6; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }

/* drop zone */
.drop { border: 1.5px dashed #3a3a40; border-radius: var(--radius); padding: 30px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: rgba(14,14,16,.5); }
.drop:hover, .drop.over { border-color: var(--rouge); background: rgba(255,45,45,.05); }
.drop .big { font-size: 17px; font-weight: 700; margin: 8px 0 4px; }
.drop .small { color: var(--muted); font-size: 13px; }
.drop svg { color: var(--rouge); }
.files { list-style: none; margin: 14px 0 0; padding: 0; }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files .name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.files .meta { color: var(--faint); font-size: 12px; font-family: "JBMono", monospace; }
.files .bar { grid-column: 1 / -1; height: 4px; background: #26262a; border-radius: 4px; overflow: hidden; }
.files .bar > i { display: block; height: 100%; width: 0; background: var(--rouge); transition: width .2s; }
.files li.done .bar > i { background: var(--ok); }
.files li.err .meta { color: #ff8a8a; }
.total { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; font-family: "JBMono", monospace; }

/* dashboard */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; background: rgba(22,22,24,.82); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; transition: border-color .15s; }
.item:hover { border-color: #3a3a40; }
.item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item .m { color: var(--faint); font-size: 12px; font-family: "JBMono", monospace; }
.pill { font-family: "JBMono", monospace; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.pill.warn { color: #ffb4b4; border-color: rgba(255,45,45,.35); }
.empty { color: var(--faint); font-size: 14px; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

.copy { display: flex; gap: 8px; }
.copy input { font-family: "JBMono", monospace; font-size: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.kv b { color: var(--papier); font-weight: 600; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { margin: 0; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; padding: 9px 14px; border: 1px solid #2c2c31; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--muted); }
.choices input:checked + span { border-color: var(--rouge); color: var(--papier); background: rgba(255,45,45,.08); }
.choices input:focus-visible + span { outline: 2px solid var(--rouge); outline-offset: 2px; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.hidden { display: none !important; }
.inline-form { display: inline; }
.dl-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: 0; }
