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

:root {
  --bg: #0c1017;
  --bg-elevated: #121824;
  --surface: #1a2332;
  --surface-hover: #222d3f;
  --text: #eef2f7;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-dim: rgba(59, 130, 246, 0.12);
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --error: #ef4444;
  --error-dim: rgba(239, 68, 68, 0.12);
  --border: #2a3544;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --max-content: 720px;
  --max-wide: 960px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Main layout */
main {
  flex: 1;
}

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero .lead {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 1.5rem;
}

.privacy-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
}

.privacy-banner::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* Tool card */
.tool-section {
  padding: 0 0 3rem;
}

.tool-card {
  max-width: var(--max-content);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dropzone {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin: 1.25rem;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.dropzone p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.dropzone .hint {
  font-size: 0.8125rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(1.08);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tool-body {
  padding: 0 1.25rem 1.25rem;
}

.tool-body[hidden] {
  display: none !important;
}

.file-info {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.file-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}

.file-info dt {
  color: var(--muted);
  font-weight: 500;
}

.file-info dd {
  word-break: break-all;
}

.dropzone.is-minimized {
  padding: 1rem 1.25rem;
  margin-bottom: 0;
}

.dropzone.is-minimized .dropzone-icon,
.dropzone.is-minimized p:not(.hint) {
  display: none;
}

.dropzone.is-minimized .hint {
  margin: 0;
}

/* Tool step indicator */
.tool-steps {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem 0;
  list-style: none;
  counter-reset: none;
}

.tool-step {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.5rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  line-height: 1.3;
}

.tool-step.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
}

.tool-step.is-complete {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--success-dim);
}

.tool-step-num {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-bottom: 0.15rem;
}

/* Previews */
.preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .preview-row {
    grid-template-columns: 1fr;
  }
}

.preview-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.preview-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.preview-card img {
  max-height: 140px;
  width: auto;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: contain;
}

/* Metadata check panel */
.metadata-check {
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.metadata-check.is-clear {
  background: var(--success-dim);
  border-color: rgba(34, 197, 94, 0.25);
}

.metadata-check.is-found {
  background: var(--accent-dim);
}

.metadata-check h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.metadata-check-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.metadata-check ul {
  list-style: none;
}

.metadata-check li {
  padding: 0.25rem 0 0.25rem 1.1rem;
  position: relative;
  color: var(--muted);
}

.metadata-check li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.metadata-check.is-clear li::before {
  color: var(--success);
}

/* Before / after compare */
.compare-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.compare-panel h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 560px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.compare-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.compare-col dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.65rem;
}

.compare-col dt {
  color: var(--muted);
}

.compare-col dd {
  word-break: break-all;
}

.compare-diff {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.compare-after {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.compare-after-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.compare-after-result {
  font-weight: 600;
}

.compare-after-result.is-clear {
  color: var(--success);
}

.compare-after-result.is-warn {
  color: var(--warning);
}

.compare-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.65rem;
  margin-bottom: 0;
}

/* SEO page CTA */
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
}

.cta-box p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--error-dim);
  border: 1px solid var(--error);
  color: #fecaca;
}

.alert-info {
  background: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-msg {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.status-msg.success {
  color: var(--success);
}

.trust-micro {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1rem;
  padding: 0 1.25rem 1.25rem;
}

/* Content sections */
.content-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.content-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.content-section p,
.content-section li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.content-section ul,
.content-section ol {
  margin: 0 0 1rem 1.25rem;
  color: var(--muted);
}

.content-section li {
  margin-bottom: 0.35rem;
}

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.step-card p {
  font-size: 0.875rem;
  margin: 0;
}

.note-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.note-box strong {
  color: var(--text);
}

/* FAQ */
.faq-list {
  margin-top: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--muted);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 0 1rem;
  font-size: 0.9375rem;
}

/* Trust pages */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--muted);
}

.prose {
  padding-bottom: 3rem;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.prose ul {
  margin: 0 0 1rem 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.sitemap-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.sitemap-list > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.sitemap-list > li:last-child {
  border-bottom: none;
}

.sitemap-list p {
  font-size: 0.875rem;
  margin: 0.35rem 0 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--muted);
}
