:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #5b6b82;
  --line: #d7e0ee;
  --brand: #0f6e7c;
  --brand-dark: #0b5560;
  --brand-soft: #e6f5f7;
  --accent: #c45c26;
  --ok: #1f7a45;
  --warn: #9a6700;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(20, 32, 51, 0.08);
  --radius: 16px;
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9f1f4 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #ffe8d8 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 247, 251, 0.88);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 760; letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), #168ea0);
  color: #fff; display: grid; place-items: center; font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(15, 110, 124, 0.28);
}
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a.active { color: var(--brand-dark); }
.privacy-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1px solid #b7dfe5; border-radius: 999px;
  padding: 0.25rem 0.7rem; font-size: 0.8rem; font-weight: 700;
}
.hero {
  padding: 2.4rem 0 1.2rem;
}
.hero h1 {
  margin: 0 0 0.7rem; font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.03em; line-height: 1.15;
}
.lede { color: var(--muted); font-size: 1.08rem; max-width: 48rem; margin: 0 0 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.2rem; }
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: 12px; padding: 0.72rem 1.05rem;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(15,110,124,.25); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-dark); border: 1px dashed #9ecad2; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem;
}
.tool-grid {
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: 1.2rem 0 2rem;
}
.tool-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem 1rem 1.05rem;
  box-shadow: 0 4px 14px rgba(20,32,51,.04);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tool-card:hover {
  border-color: #9ecad2; transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15,110,124,.12);
}
.tool-card .icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 0.7rem;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 1.2rem;
}
.tool-card h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.section-title { margin: 1.8rem 0 0.7rem; font-size: 1.25rem; }
.points {
  display: grid; gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}
.point { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.point h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.point p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.site-footer {
  margin-top: 2.5rem; border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem; color: var(--muted); font-size: 0.9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--brand-dark); }

/* Tool page */
.tool-hero { padding: 1.6rem 0 0.6rem; }
.tool-hero h1 { margin: 0 0 0.45rem; font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.crumb { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.55rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--brand-dark); }
.workspace { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 900px) {
  .workspace.split-layout { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}
.dropzone {
  border: 2px dashed #9eb4cb; border-radius: 16px; background: #f8fbfe;
  min-height: 180px; padding: 1.2rem; text-align: center;
  display: grid; place-items: center; gap: 0.4rem; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone strong { font-size: 1.05rem; }
.dropzone span { color: var(--muted); font-size: 0.92rem; }
.file-list { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.file-list li {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: center;
  padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 0.92rem;
}
.file-list .meta { color: var(--muted); font-size: 0.82rem; }
.controls { display: grid; gap: 0.8rem; }
.control-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
label.field { display: grid; gap: 0.25rem; font-size: 0.88rem; font-weight: 650; color: var(--muted); }
label.field input, label.field select, label.field textarea {
  font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.7rem; background: #fff; min-width: 140px;
}
.status {
  min-height: 1.3rem; font-size: 0.92rem; color: var(--muted);
}
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }
.status.warn { color: var(--warn); }
.preview-grid {
  display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  max-height: 420px; overflow: auto; padding: 0.2rem;
}
.thumb {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0.4rem;
  display: grid; gap: 0.35rem; cursor: grab; user-select: none;
}
.thumb.selected { outline: 2px solid var(--brand); }
.thumb canvas, .thumb img { width: 100%; height: auto; border-radius: 8px; background: #eef2f7; }
.thumb .caption { font-size: 0.75rem; color: var(--muted); text-align: center; }
.note {
  background: #fff8eb; border: 1px solid #f0d7a3; color: #6b4e10;
  border-radius: 12px; padding: 0.8rem 0.9rem; font-size: 0.9rem;
}
.related { margin: 1.5rem 0 2rem; }
.related .chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; padding: 0.4rem 0.7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  color: var(--ink); font-size: 0.88rem; font-weight: 600;
}
.chip:hover { border-color: #9ecad2; color: var(--brand-dark); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
