:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --accent:#2563eb;
  --radius:14px;
  --shadow:0 10px 28px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width:980px;
  margin:0 auto;
  padding:22px 16px 72px;
}

.header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(246,247,251,.85);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:980px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}
.logo{
  width:34px;height:34px;border-radius:10px;
  background:linear-gradient(135deg,#111827,#374151);
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-size:14px;
  box-shadow:0 8px 18px rgba(0,0,0,.12);
}
.badge{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  background:#fff;
  padding:2px 8px;
  border-radius:999px;
}

.nav{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav a{
  color:var(--muted);
  font-size:14px;
}
.nav a:hover{color:var(--accent);text-decoration:none}

.hero{
  margin-top:18px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
}
.hero h1{
  margin:0 0 10px;
  font-size:32px;
  line-height:1.2;
}
.hero p{
  margin:0;
  color:var(--muted);
  font-size:15px;
}

.grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:14px;
}

.card{
  grid-column:span 12;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card h2{
  margin:0 0 10px;
  font-size:18px;
}
.card p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.section-title .hint{
  color:var(--muted);
  font-size:13px;
}

.tool-list{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:12px;
}
.tool{
  grid-column:span 12;
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff;
}
.tool .left{
  min-width:0;
}
.tool .name{
  font-weight:700;
  margin:0;
}
.tool .desc{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.btn{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(37,99,235,.25);
  background:rgba(37,99,235,.08);
  color:var(--accent);
  font-weight:700;
  font-size:14px;
  text-decoration:none;
}
.btn:hover{
  background:rgba(37,99,235,.12);
  text-decoration:none;
}
.btn.primary{
  background:var(--accent);
  color:#fff;
  border:1px solid var(--accent);
}
.btn.primary:hover{filter:brightness(.97)}

.note{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}

.ad-slot{
  border:1px dashed #d1d5db;
  border-radius:12px;
  padding:16px;
  color:var(--muted);
  font-size:13px;
  background:rgba(255,255,255,.6);
}

.footer{
  margin-top:18px;
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.65);
}
.footer-inner{
  max-width:980px;
  margin:0 auto;
  padding:16px 16px;
  color:var(--muted);
  font-size:13px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--accent);text-decoration:none}

@media (min-width:720px){
  .card.half{grid-column:span 6}
  .tool{grid-column:span 6}
}

/* ===== Tool UI (Merge PDF etc.) ===== */
.dropzone{
  border:2px dashed #d1d5db;
  border-radius:12px;
  padding:18px;
  background:rgba(255,255,255,.7);
}
.dropzone.dragover{
  border-color: rgba(37,99,235,.7);
  background: rgba(37,99,235,.06);
}
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.btn.secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--border);
  font-weight:700;
}
.btn.secondary:hover{background:#f9fafb}
.filelist{
  margin-top:12px;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.fileitem{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  background:#fff;
}
.fileitem .meta{
  min-width:0;
}
.fileitem .meta .name{
  font-weight:700;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.fileitem .meta .sub{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.fileitem .actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.smallbtn{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
}
.smallbtn:hover{background:#f9fafb}
.status{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
}
.progress{
  height:10px;
  background:#eef2ff;
  border-radius:999px;
  overflow:hidden;
  margin-top:10px;
  border:1px solid rgba(37,99,235,.15);
}
.progress > div{
  height:100%;
  width:0%;
  background:var(--accent);
}
