:root{
  --accent:#3B5BDB;
  --accent-dk:#2F49AF;
  --accent-lt:#EAEEFC;
  --ink:#1A1A1A;
  --sub:#8A8F98;
  --line:#ECECEE;
  --bg:#F4F4F5;
  --green:#2F9E58;
  --green-lt:#E7F6EC;
  --red:#D64545;
  --red-lt:#FBEAEA;
  --amber:#C98A1F;
  --amber-lt:#FCF3E3;
  --nav:#6741D9;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
*{box-sizing:border-box;}
body{
  margin:0; min-height:100vh; background:var(--bg); color:var(--ink);
  font-family:var(--sans); padding:60px 20px;
}
.card{
  max-width:720px; margin:0 auto; background:#fff; border-radius:20px;
  box-shadow:0 1px 3px rgba(0,0,0,.04), 0 10px 30px rgba(20,20,30,.06);
  padding:40px 44px 34px;
}

.back-link{
  display:inline-flex; align-items:center; gap:5px;
  font-size:13.5px; font-weight:600; color:var(--nav);
  text-decoration:none; margin-bottom:22px;
}
.back-link:hover{text-decoration:underline;}

.head{display:flex; align-items:center; gap:16px; margin-bottom:22px;}
.tool-logo{
  width:42px; height:42px; flex:none; border-radius:12px;
  background:var(--accent-lt); display:flex; align-items:center; justify-content:center;
}
.logo{width:22px;height:22px;flex:none;}
.head h1{font-size:26px; font-weight:800; margin:0; letter-spacing:-0.01em;}

.keywarn{
  background:var(--amber-lt); color:#8a5c10; border-radius:10px;
  padding:10px 14px; font-size:12.5px; margin-bottom:20px; line-height:1.5;
}
.keywarn code{font-family:var(--mono); background:rgba(0,0,0,.06); padding:1px 5px; border-radius:4px;}

.runrow{display:flex; gap:10px;}
.filebox{
  flex:1; display:flex; align-items:center; padding:0 16px; height:52px;
  background:var(--accent-lt); border-radius:12px; cursor:pointer;
  font-size:14.5px; color:var(--accent-dk); font-weight:500;
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  border:1px solid transparent; transition:border-color .15s;
}
.filebox:hover{border-color:var(--accent);}
.filebox.has-file{color:var(--ink);}
.filebox input{display:none;}
.filebox .ph{color:#6b7fd6;}

button.run{
  flex:none; height:52px; padding:0 26px; border:none; border-radius:12px;
  background:var(--green); color:#fff; font-size:14.5px; font-weight:700;
  cursor:pointer; display:flex; align-items:center; gap:9px;
  font-family:var(--sans); transition:background .15s;
}
button.run:hover{background:#278a4b;}
button.run:disabled{background:#c7ccd6; cursor:not-allowed;}
button.run.stop{
  background:#1B1F27; border:1.5px solid #E8952C; color:#E8952C;
  text-transform:uppercase; letter-spacing:.04em; font-weight:800;
}
button.run.stop:hover{background:#252A35;}
button.run.stop:disabled{background:#1B1F27; color:#a9793a; border-color:#a9793a; opacity:.7; cursor:not-allowed;}
button.run.stop .spinner{
  border-color:rgba(232,149,44,.35); border-top-color:#E8952C;
}
.spinner{
  width:15px;height:15px;border-radius:50%;
  border:2px solid rgba(255,255,255,.45); border-top-color:#fff;
  animation:spin .8s linear infinite; display:none;
}
.spinner.on{display:inline-block;}

.progwrap{display:flex; align-items:center; gap:14px; margin-top:22px;}
.progdot{width:9px;height:9px;border-radius:50%;background:#d5d8dd;flex:none;transition:background .2s;}
.progdot.live{background:var(--green);}
.progtrack{flex:1; height:8px; background:var(--line); border-radius:20px; overflow:hidden;}
.progfill{height:100%; width:0%; background:var(--green); border-radius:20px; transition:width .3s;}
.progtext{font-size:13px; color:var(--sub); white-space:nowrap; font-variant-numeric:tabular-nums;}

details.adv{margin-top:22px;}
details.adv summary{
  font-size:12.5px; color:var(--sub); cursor:pointer; user-select:none;
  list-style:none; display:inline-flex; align-items:center; gap:5px;
}
details.adv summary::-webkit-details-marker{display:none;}
details.adv summary .car{transition:transform .15s; font-size:10px;}
details.adv[open] summary .car{transform:rotate(90deg);}
.adv-body{
  margin-top:16px; padding-top:16px; border-top:1px solid var(--line);
  display:grid; grid-template-columns:1fr 1fr; gap:14px 16px;
}
@media (max-width:560px){.adv-body{grid-template-columns:1fr;}}
.adv-body .full{grid-column:1/-1;}
.adv-field label{display:block; font-size:11.5px; color:var(--sub); margin-bottom:6px; font-weight:600;}
.adv-filebox{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:9px 12px; background:#FAFAFA; border:1px solid var(--line); border-radius:9px;
  font-size:12.5px; color:var(--sub); cursor:pointer;
}
.adv-filebox input{display:none;}
.adv-filebox span.fn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.adv-filebox b{color:var(--accent-dk); font-weight:700; flex:none;}
select{
  width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:9px;
  font-size:13px; background:#FAFAFA; color:var(--ink); font-family:var(--sans);
}
.note{font-size:11px; color:#a8adb5; margin-top:14px; line-height:1.5;}

.single-check{margin-top:14px;}
.single-body{display:flex; gap:8px; margin-top:14px; flex-wrap:wrap;}
.single-body input[type=text]{
  padding:9px 11px; border:1px solid var(--line); border-radius:9px;
  font-size:13px; background:#FAFAFA; color:var(--ink); font-family:var(--sans);
}
.single-body input#singleUrl{flex:2; min-width:220px;}
.single-body input#singleThreshold{flex:1; min-width:120px;}
button.run.small{height:auto; padding:9px 18px; font-size:13px; flex:none;}
.single-result{margin-top:12px; font-size:13.5px;}
.single-result .sr-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.single-result .sr-url{color:var(--sub); font-family:var(--mono); font-size:12px; word-break:break-all;}
.single-result .sr-speed{font-family:var(--mono); font-weight:700;}
.single-result .sr-err{color:var(--red); font-size:12.5px;}

.results{margin-top:24px;}
.results.empty{display:none;}
.rrow{
  display:flex; align-items:center; gap:12px; padding:10px 0;
  border-bottom:1px solid var(--line); font-size:13.5px;
}
.rrow:last-child{border-bottom:none;}
.rrow .brand{flex:1; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.rrow .url{flex:1.4; color:var(--sub); font-size:12px; font-family:var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.rrow .speed{width:56px; text-align:right; font-family:var(--mono); font-weight:700; color:var(--ink); flex:none;}
.pill{
  flex:none; font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px;
  display:inline-flex; align-items:center; gap:5px; min-width:78px; justify-content:center;
}
.pill.queued{background:#F2F2F3; color:#9a9fa8;}
.pill.testing, .pill.retry{background:var(--amber-lt); color:var(--amber);}
.pill.pass{background:var(--green-lt); color:var(--green);}
.pill.fail{background:var(--red-lt); color:var(--red);}
.pill.error{background:#F2F2F3; color:#a33;}
.pilldot{width:5px;height:5px;border-radius:50%;background:currentColor;}
.pilldot.spin{animation:spin 1s linear infinite;}

.summary{display:flex; gap:18px; margin-top:6px; font-size:12.5px; color:var(--sub);}
.summary b{color:var(--ink);}

.footrow{display:flex; justify-content:flex-end; margin-top:18px;}
a.dl{
  font-size:13px; font-weight:700; color:var(--accent-dk); text-decoration:none;
  display:inline-flex; align-items:center; gap:6px; cursor:pointer;
}
a.dl.disabled{color:#c7ccd6; pointer-events:none;}

@keyframes spin{to{transform:rotate(360deg);}}
