/* DocKit — shared design system */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15,23,42,.07), 0 4px 16px rgba(15,23,42,.05);
  --shadow-md: 0 4px 24px rgba(15,23,42,.10);

  /* tool accent colors */
  --c-blue: #2563eb;
  --c-violet: #7c3aed;
  --c-rose: #e11d48;
  --c-amber: #d97706;
  --c-teal: #0d9488;
  --c-indigo: #4f46e5;
  --c-pink: #db2777;
  --c-green: #16a34a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  flex-shrink: 0;
}
.logo span { color: var(--brand); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--ink);
  background: var(--surface);
}

.header-cta {
  margin-left: auto;
  flex-shrink: 0;
}
.btn-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand);
  transition: background .15s;
}
.btn-tools:hover { background: var(--brand-light); }

/* ── HERO (landing) ── */
.hero {
  background: linear-gradient(160deg, #f0f7ff 0%, #f8fafc 60%);
  border-bottom: 1px solid var(--line);
  padding: 64px 24px 52px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.08;
  max-width: 640px;
  margin: 0 auto 16px;
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 32px;
}
.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.hero-badge svg { color: var(--brand); }

/* ── TOOL FILTERS ── */
.filters-bar {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-btn {
  appearance: none;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  background: var(--white);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

/* ── TOOL GRID ── */
.tool-grid-wrap {
  max-width: 1200px;
  margin: 24px auto 64px;
  padding: 0 24px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card.planned { opacity: .55; pointer-events: none; }

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tool-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.tool-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.planned-tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  margin-top: auto;
}

/* ── TOOL PAGE HERO ── */
.tool-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 48px 24px 40px;
}
.tool-hero-inner {
  max-width: 760px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.tool-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 4px;
}
.tool-hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.tool-hero-desc {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; }

/* ── TOOL WORKSPACE ── */
.tool-workspace {
  max-width: 760px;
  margin: 40px auto 64px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* dropzone */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}
.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.dropzone-hint {
  font-size: 13px;
  color: var(--muted);
}
.dropzone-hint strong { color: var(--brand); }

/* file list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.file-item-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item-size { color: var(--muted); font-size: 12px; }
.file-remove {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  transition: color .15s;
}
.file-remove:hover { color: var(--rose, #e11d48); }

/* options panel */
.options-panel {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.options-panel h3 {
  font-size: 15px;
  font-weight: 700;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input[type=text],
.field input[type=number],
.field select {
  appearance: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s;
  width: 100%;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
}

/* range input */
.range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-wrap input[type=range] {
  flex: 1;
  accent-color: var(--brand);
}
.range-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  min-width: 36px;
  text-align: right;
}

/* submit */
.btn-run {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-run:hover { background: var(--brand-dark); }
.btn-run:active { transform: scale(.98); }
.btn-run:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

/* worker note */
.worker-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fefce8;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: #713f12;
  line-height: 1.5;
}

/* ── HOW IT WORKS ── */
.how-section {
  border-top: 1px solid var(--line);
  padding: 48px 24px;
}
.how-inner {
  max-width: 760px;
  margin: auto;
}
.how-inner h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body strong { font-size: 15px; }
.step-body p { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ── RELATED TOOLS ── */
.related-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 48px 24px;
}
.related-inner {
  max-width: 1200px;
  margin: auto;
}
.related-inner h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s;
}
.footer-links a:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .header-nav { display: none; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 16px 32px; }
}
