:root {
  --primary-accent: #e53e3e;
  --primary-accent-dark: #c53030;
  --primary-dark: #1a365d;
  --secondary-accent: #3182ce;
  --secondary-accent-dark: #2b6cb0;
  --secondary-tint: #e7f1fa;
  --secondary-tint-border: #b8d8ee;
  --secondary-tint-hover: #d6eaf7;
  --bg-light: #f7fafc;
  --bg-dark: #2d3748;
  --text: #2d3748;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #b91c1c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.55;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

a { color: var(--secondary-accent); text-decoration: none; }
a:hover { color: var(--secondary-accent-dark); text-decoration: underline; }

h1, h2, h3 { color: var(--primary-dark); line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 12px; }
h2 { font-size: 1.4rem; margin: 32px 0 12px; }

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.main-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--secondary-accent); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-accent));
  color: #fff;
  padding: 56px 0 48px;
  text-align: center;
}
.hero h1 { color: #fff; max-width: 760px; margin: 0 auto 14px; }
.hero .lede { max-width: 640px; margin: 0 auto; color: #cfe2f5; font-size: 1.05rem; }

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: -28px auto 0;
  position: relative;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(26, 54, 93, 0.12);
  text-decoration: none;
}
.tool-card .tool-icon { font-size: 1.8rem; }
.tool-card h2 { margin: 8px 0 6px; font-size: 1.15rem; }
.tool-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* Why / FAQ */
.why-list { padding-left: 20px; }
.why-list li { margin-bottom: 8px; }

.faq { margin-bottom: 48px; }
.faq details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--text-muted); }

/* Tool pages */
.tool-page { padding: 40px 0 8px; }
.tool-page .lede { color: var(--text-muted); max-width: 640px; }
.tool-info { padding-bottom: 48px; color: var(--text-muted); }
.tool-info ol { padding-left: 20px; }
.static-page { padding: 40px 0 56px; max-width: 760px; }
.static-page p, .static-page li { color: var(--text-muted); }

/* Forms */
.tool-form { max-width: 640px; margin-top: 18px; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  border: 2px dashed var(--secondary-tint-border);
  border-radius: var(--radius);
  background: var(--secondary-tint);
  padding: 36px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--secondary-accent); background: var(--secondary-tint-hover); }
.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
}
.dropzone-label { font-weight: 700; color: var(--primary-dark); }
.dropzone-hint { font-size: 0.85rem; color: var(--text-muted); }

.file-list { list-style: none; padding: 0; margin: 14px 0 0; }
.file-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.file-list .file-size { color: var(--text-muted); white-space: nowrap; }

.mode-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 18px;
}
.mode-fieldset legend { font-weight: 700; padding: 0 6px; }
.radio-option { display: block; margin-bottom: 8px; font-size: 0.95rem; }
.radio-option input { margin-right: 8px; }

.field-label { display: block; font-weight: 700; margin-top: 18px; margin-bottom: 6px; }
.range-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: 10px;
}
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
}
.btn-primary { background: var(--primary-accent); color: #fff; }
.btn-primary:hover { background: var(--primary-accent-dark); text-decoration: none; }

.alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.92rem;
}
.alert-error { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  margin-top: 40px;
  padding-top: 36px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding-bottom: 24px;
}
.site-footer strong { display: block; color: #fff; margin-bottom: 10px; }
.site-footer a { display: block; color: #cbd5e1; font-size: 0.92rem; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 0.85rem; color: #94a3b8; }
.copyright {
  border-top: 1px solid #3f4a5c;
  padding: 16px 20px;
  font-size: 0.8rem;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 36px; }
  h1 { font-size: 1.5rem; }
}
