:root {
  --bg: #f7f5f1;
  --panel: #ffffff;
  --ink: #1b1a18;
  --ink-2: #4b4842;
  --muted: #8b8680;
  --line: #e5e1d8;
  --line-2: #efece5;
  --accent: #b4431f;
  --accent-2: #fdf0e9;
  --ok: #2f7d4f;
  --err: #b3261e;
  --shadow: 0 1px 2px rgba(20, 18, 14, .05), 0 14px 40px -24px rgba(20, 18, 14, .35);
  --sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15151a; --panel: #1d1d24; --ink: #e9e6df; --ink-2: #c2beb5;
    --muted: #8d8880; --line: #2e2e37; --line-2: #26262e;
    --accent: #f0a082; --accent-2: #2b2320; --ok: #7cc79a; --err: #ff8a80;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.7);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }

/* top */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.logo small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-2); }
.links { display: flex; gap: 18px; font-size: 13.5px; }
.links a { color: var(--ink-2); }

/* hero */
.hero { padding: 54px 0 30px; }
.hero h1 { font-size: 34px; line-height: 1.3; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 720; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { color: var(--ink-2); font-size: 15.5px; max-width: 720px; margin: 0; }

/* card */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 26px; }

/* dropzone */
.drop {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 34px 18px; text-align: center;
  cursor: pointer; transition: .15s; background: linear-gradient(180deg, transparent, var(--line-2));
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-2); }
.drop-ico { font-size: 26px; color: var(--accent); }
.drop-title { font-weight: 600; margin-top: 6px; }
.drop-hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

.picked { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--line-2); }
.picked-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-meta { color: var(--muted); font-size: 12.5px; }

/* settings */
.settings { display: grid; grid-template-columns: 1.3fr 1fr .8fr .7fr; gap: 14px; margin-top: 18px; align-items: end; }
.settings .field { display: flex; flex-direction: column; gap: 5px; }
.settings .field.small { grid-column: span 1; }
.settings label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.settings input[type=text], .settings input[type=password], .settings input[type=number] {
  font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); width: 100%;
}
.settings input:focus { outline: 2px solid var(--accent-2); border-color: var(--accent); }
.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; grid-column: 1 / -1; color: var(--ink-2); }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.mini { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; }

/* buttons */
.actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.primary, button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 10px;
  padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.primary:hover { background: var(--accent); color: #fff; text-decoration: none; }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.ghost {
  display: inline-flex; align-items: center; background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; font: inherit; cursor: pointer; text-decoration: none;
}
.ghost:hover { border-color: var(--ink-2); text-decoration: none; }
.hint { color: var(--muted); font-size: 12.5px; }

/* job */
.job-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.job-title { font-weight: 650; }
.job-state { font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 12px 0 14px; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #d97757); transition: width .4s; }
.steps { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.step { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; }
.step b { width: 17px; height: 17px; border-radius: 50%; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink-2); }
.step.active { color: var(--ink); border-color: var(--accent); background: var(--accent-2); }
.step.active b { background: var(--accent); color: #fff; }
.step.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.step.done b { background: var(--ok); color: #fff; }
.msg { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); min-height: 20px; }
.log {
  margin: 10px 0 0; max-height: 190px; overflow: auto; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--muted);
  white-space: pre-wrap;
}
.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { background: var(--line-2); border-radius: 8px; padding: 6px 11px; font-size: 12.5px; color: var(--ink-2); }
.stat b { color: var(--ink); }
.result-actions { display: flex; gap: 12px; margin-top: 14px; }

/* history */
.h2 { font-size: 17px; letter-spacing: -.01em; margin: 34px 0 12px; }
.jobs { display: grid; gap: 10px; }
.jobrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.jobrow .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobrow .m { color: var(--muted); font-size: 12px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tag.error { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
.tag.running { color: var(--accent); border-color: var(--accent); }
.rowacts { display: flex; gap: 10px; font-size: 12.5px; }

/* about */
.about { margin: 40px 0 60px; color: var(--ink-2); }
.howto { padding-left: 20px; margin: 8px 0; }
.howto li { margin-bottom: 7px; }
.fine { color: var(--muted); font-size: 12.5px; }
.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding-bottom: 30px; }

@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 26px; }
}
@media (max-width: 560px) {
  .settings { grid-template-columns: 1fr; }
  .links { gap: 12px; }
}

/* A quiet workspace for academic reading. */
:root {color-scheme:light;--bg:#f8f9fc;--panel:#fff;--ink:#17233b;--ink-2:#526078;--muted:#7b879b;--line:#e4e8f0;--line-2:#f1f4f9;--accent:#355cdd;--accent-2:#edf1ff;--shadow:0 16px 60px -30px #263b662b}
.wrap{max-width:1100px}.top{background:#ffffffdf;border-bottom:1px solid #e9edf4}.top-inner{height:80px}.logo{font-size:23px;letter-spacing:-1px}.logo small{letter-spacing:0;margin-left:12px}.dot{width:23px;height:27px;border-radius:5px 10px 5px 5px;box-shadow:none;background:linear-gradient(135deg,#6385ed,#355cdd)}.links{align-items:center;gap:26px}.links .ghost{font-size:13px;padding:8px 18px}.hero{text-align:center;padding:76px 0 36px}.eyebrow{font-size:11px;letter-spacing:3px;color:var(--accent);font-weight:650;margin-bottom:22px}.hero h1{font-size:58px;line-height:1.3;font-weight:600;letter-spacing:-2px;margin-bottom:22px}.hero .sub{margin:auto;font-size:16px;line-height:1.9;color:var(--muted)}.pricing{display:flex;justify-content:center;gap:20px;font-size:12px;margin-top:26px;color:var(--ink-2)}.pricing span:first-child{color:var(--accent)}.uploader{max-width:800px;margin:0 auto 52px;padding:24px;border-radius:20px}.drop{padding:40px 20px;background:#fbfcff;border-color:#cfd9ec}.drop-ico{font-size:32px;margin-bottom:10px}.drop-title{font-size:16px}.drop-title u{text-decoration:none;color:var(--accent)}.drop-hint{margin-top:10px}.account-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;font-size:12px;color:var(--muted)}.account-strip .ghost{font-size:12px;padding:5px 10px}.actions{border-top:1px solid var(--line-2);padding-top:20px;margin-top:18px;justify-content:space-between}.primary,button.primary{background:var(--accent);color:white;padding:12px 28px;border-radius:9px}.primary:hover{background:#254ac9}.features{display:grid;grid-template-columns:repeat(3,1fr);gap:40px;border-top:1px solid var(--line);padding-top:35px;margin-top:60px}.features span{font-size:10px;letter-spacing:2px;color:var(--muted)}.features h3{font-size:17px;font-weight:600;margin:12px 0 8px}.features p{font-size:13px;color:var(--muted);margin:0}.h2{font-size:19px}.jobrow{padding:18px 20px}.jobrow>div:first-child{min-width:0}.jobrow .m{overflow-wrap:anywhere}.rowacts{flex-shrink:0}.foot{padding-top:25px;border-top:1px solid var(--line)}details{margin-top:14px;color:var(--muted);font-size:12px}dialog{border:1px solid var(--line);border-radius:20px;padding:32px;max-width:460px;width:calc(100% - 32px);color:var(--ink);text-align:center;box-shadow:0 30px 100px #15244033}dialog::backdrop{background:#17233b66;backdrop-filter:blur(4px)}dialog h2{font-weight:600}dialog p{font-size:13px;color:var(--muted)}.close{float:right;padding:2px 9px}.payment-methods{display:flex;justify-content:center;gap:12px}#paymentQR{display:block;width:230px;max-width:100%;margin:20px auto}.ghost:disabled{opacity:.4;cursor:not-allowed}:focus-visible{outline:3px solid #93a9f4;outline-offset:4px}
@media(max-width:650px){.hero{padding-top:48px}.hero h1{font-size:39px;letter-spacing:-1px}.logo small{display:none}.top-inner{height:66px}.links{gap:12px}.features{grid-template-columns:1fr;gap:26px}.uploader{padding:18px}.pricing{gap:12px;font-size:11px}.jobrow{align-items:flex-start;flex-direction:column}.actions{gap:10px}.actions .hint{max-width:140px}.account-strip{align-items:flex-start}.drop{padding:28px 10px}.drop-title{font-size:14px}.wrap{padding-left:20px;padding-right:20px}}
