:root{
  --bg:#ffffff;
  --surface:#f9fafb;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --primary:#2563eb;
  --radius:12px;
  --maxw:980px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Helvetica,Arial,sans-serif;
  font-size:16px;
  line-height:1.6;
}

.container{ max-width:var(--maxw); margin:0 auto; padding:0 20px; }

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}
.header-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration:none;
  display:flex;
  align-items:center;
  gap: 8px;
}

h1{ font-size:34px; line-height:1.15; margin:18px 0 8px; letter-spacing:-.02em; }
h2{ font-size:20px; margin:0 0 10px; letter-spacing:-.01em; }
.subtitle{ margin:0 0 18px; color:var(--muted); max-width:70ch; }
.muted{ color:var(--muted); }

.page-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.06); }

.tool-step{ margin-bottom:16px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  padding:12px 16px;
  font-weight:650;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
}
.btn:disabled{ opacity:.5; cursor:not-allowed; }

.btn-primary{ background:var(--primary); color:#fff; }
.btn-secondary{ background:#fff; color:var(--text); border-color:var(--border); }
.btn-primary:hover{ filter: brightness(1.05); }

.file-drop{
  display:flex;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px dashed var(--border);
  border-radius:12px;
  background:#fff;
  position:relative;
}
.file-drop input{
  width:1px;
  height:1px;
  opacity:0;
  position:absolute;
  inset:0;
  cursor:pointer;
}
.file-drop span{ color:var(--muted); }
.file-drop strong{ color:var(--text); }
.dropzone{
  min-height:180px;
  padding:16px;
  border:2px dashed var(--border, #cfd6df);
  border-radius:14px;
  background:rgba(0, 0, 0, 0.03);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.dropzone.is-dragover{
  background:rgba(0, 0, 0, 0.06);
  border-color:var(--primary, #3b82f6);
  box-shadow:0 0 0 3px rgba(59, 130, 246, 0.18);
}
.file-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:8px;
}
.link-btn{
  display:inline-flex;
  align-items:center;
  font-size:13px;
  color:var(--muted);
  text-decoration:none;
  border:1px solid var(--border);
  border-radius:8px;
  padding:4px 8px;
  background:#fff;
}
.link-btn:hover{
  color:var(--text);
  background:var(--surface);
}
.file-list{
  list-style:none;
  padding:0;
  margin:12px 0 0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.file-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
}

.file-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
}

.file-handle{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  cursor:grab;
  user-select:none;
  flex:0 0 auto;
}

.file-index{
  font-variant-numeric: tabular-nums;
  color:var(--muted);
  width:28px;
  text-align:right;
  flex:0 0 auto;
}

.file-name{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.file-meta{
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
  flex:0 0 auto;
}

.file-remove{
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  color:var(--text);
}
.file-remove:hover{ background:var(--surface); }

.file-item.dragging{ opacity:.6; }
.file-item.drag-over{ outline:2px solid var(--primary); outline-offset:2px; }

.breadcrumbs{ font-size:13px; color:var(--muted); margin:14px 0 10px; }
.breadcrumbs a{ color:var(--muted); text-decoration:none; }
.breadcrumbs a:hover{ color:var(--text); text-decoration:underline; }

.chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  font-size:13px;
  text-decoration:none;
}
.grid{ display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.tool-card{
  list-style:none;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:14px;
}
.tool-card a{ color:var(--text); text-decoration:none; font-weight:600; }
.tool-card:hover{ box-shadow:0 10px 24px rgba(0,0,0,.06); }

.tool-list { padding-left: 18px; }
.tool-list a { text-decoration:none; }
.footer { margin-top:40px; color:var(--muted); padding-top:10px; padding-bottom:20px; }
.logo-mark{
  color: var(--primary);
  font-weight: 900;
}

.btn:focus-visible, a:focus-visible, input:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}
.lang-switch{
  display:flex;
  gap:10px;
  align-items:center;
}
.lang-flag{
  width:22px;
  height:22px;
  border-radius:4px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:14px;
  border:1px solid var(--border);
  background:#fff;
}
.lang-flag.is-active{
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
}
.lang-flag:hover{
  background:var(--surface);
}
.lang-flag:focus-visible{
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 3px;
}

.nav a{
  color: var(--text);
  text-decoration:none;
  font-weight:600;
  font-size: 14px;
  opacity: .85;
  padding: 8px 10px;
  border-radius: 10px;
  margin-left: 0;
}

.nav a:hover{
  opacity: 1;
  background: var(--surface);
  text-decoration:none;
}

.nav a[aria-current="page"]{
  opacity: 1;
  background: var(--surface);
  border: 1px solid var(--border);
}

a:focus-visible{ outline:2px solid var(--primary); outline-offset:2px; border-radius:10px; }

@media (max-width: 720px){
  .page-top{ flex-direction:column; }
  .header-inner{ align-items:flex-start; flex-direction:column; }
  .header-right{ width:100%; justify-content:space-between; }
  .nav{ width:100%; }
}
