/* ==========================================================================
   MetadataRemover — design system
   Light editorial theme: warm paper background, ink text, pine-green accent.
   ========================================================================== */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f4ef;
  --ink: #182019;
  --ink-soft: #2c362e;
  --muted: #5d6862;
  --line: #e4e7df;
  --line-strong: #d3d8cd;
  --accent: #0e7c66;
  --accent-strong: #0a5f4f;
  --accent-soft: #e2f1ec;
  --accent-ink: #083f35;
  --dark: #101815;
  --dark-2: #1a2420;
  --dark-line: #2b3833;
  --dark-muted: #9db0a7;
  --ok: #15803d;
  --ok-soft: #e4f4ea;
  --warn: #b45309;
  --warn-soft: #fdf0df;
  --danger: #b91c1c;
  --danger-soft: #fdeaea;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 21, .05), 0 8px 24px -12px rgba(16, 24, 21, .12);
  --shadow-lg: 0 2px 6px rgba(16, 24, 21, .06), 0 24px 48px -16px rgba(16, 24, 21, .18);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}
pre { padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; }

::selection { background: var(--accent-soft); }

/* ---------- layout ---------- */

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 22px; }

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-dark { background: var(--dark); color: #e8efea; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #f4f8f5; }
.section-dark p { color: var(--dark-muted); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-dark .kicker { color: #4fd1b2; }

.lead { font-size: 1.15rem; color: var(--muted); }
.section-dark .lead { color: var(--dark-muted); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand svg { display: block; }
.brand .brand-dot { color: var(--accent); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a.nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.main-nav a.nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.main-nav a.nav-link.active { color: var(--accent-strong); font-weight: 600; }

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-dropdown > button:hover { background: var(--surface-2); color: var(--ink); }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink);
}
.dropdown-menu a:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu a .dd-title { font-weight: 600; font-size: .95rem; }
.dropdown-menu a .dd-desc { font-size: .82rem; color: var(--muted); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 18px 18px;
    gap: 2px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a.nav-link, .nav-dropdown > button { width: 100%; text-align: left; }
  .nav-dropdown .dropdown-menu {
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .nav-dropdown .dropdown-menu { display: block; }
  .nav-cta { margin: 8px 0 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }

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

.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); color: #fff; }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

.btn-sm { padding: 9px 14px; font-size: .88rem; border-radius: 9px; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; border-radius: 13px; }

.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ---------- hero / dropzone ---------- */

.hero { padding: 40px 0 34px; text-align: center; }
.hero h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  max-width: 880px;
  margin: 0 auto .45em;
}
.hero .lead { max-width: 640px; margin: 0 auto 1.5em; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #cfe7e0;
  border-radius: 999px;
  padding: 5px 12px;
}
.badge svg { flex: none; }

.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: #f2faf7; }
.dropzone .dz-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.dropzone .dz-title { font-weight: 700; font-size: 1.06rem; margin-bottom: 3px; }
.dropzone .dz-sub { color: var(--muted); font-size: .92rem; }
.dropzone .dz-sub kbd { font-size: .78rem; }

/* ---------- trust bar ---------- */

.trustbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  padding: 14px 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.trustbar span { display: inline-flex; align-items: center; gap: 7px; }
.trustbar svg { color: var(--accent); flex: none; }

/* ---------- mode toggle (shared: homepage + AI metadata remover) ---------- */

.mode-toggle { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 18px; text-align: left; }
.mode-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; background: var(--surface); }
.mode-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mode-name { display: block; font-weight: 600; margin-bottom: 4px; }
.mode-name input { margin-right: 6px; }
.mode-desc { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.mode-list { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 640px) { .mode-toggle { grid-template-columns: 1fr; } }

/* ---------- cards & grids ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card .card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- steps ---------- */

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  padding: 24px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: .3em; }
.step p { font-size: .92rem; margin: 0; }

/* ---------- table ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--surface-2); font-size: .85rem; letter-spacing: .03em; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { text-align: center; }
.table td.col-check, .table th.col-check { text-align: center; }
.check-yes { color: var(--ok); font-weight: 700; }
.check-no { color: #b7bdb5; }
.table .brand-col { color: var(--accent-strong); font-weight: 700; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .18s ease;
  margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details .faq-body { padding: 0 22px 18px; color: var(--muted); }
.faq details .faq-body p:last-child { margin-bottom: 0; }

/* ---------- tool UI: file list & reports ---------- */

.tool-shell { max-width: 860px; margin: 0 auto; }

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 16px 0;
  font-size: .93rem;
}
.tool-options .opt { display: flex; align-items: center; gap: 9px; }
.tool-options label { font-weight: 600; color: var(--ink-soft); }
.tool-options select, .tool-options input[type="number"], .tool-options input[type="text"] {
  font: inherit;
  font-size: .92rem;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}
.tool-options input[type="range"] { accent-color: var(--accent); }
.tool-options input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }

.file-list { display: flex; flex-direction: column; gap: 12px; margin: 22px 0; }

.file-card {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  align-items: flex-start;
}
.file-card .fc-thumb {
  flex: none;
  width: 74px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.file-card .fc-main { flex: 1; min-width: 0; }
.file-card .fc-name {
  font-weight: 600;
  font-size: .96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-card .fc-meta { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.file-card .fc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
}
.status-scan { background: var(--warn-soft); color: var(--warn); }
.status-found { background: var(--warn-soft); color: var(--warn); }
.status-clean { background: var(--ok-soft); color: var(--ok); }
.status-error { background: var(--danger-soft); color: var(--danger); }
.status-idle { background: var(--surface-2); color: var(--muted); }

.report { margin-top: 10px; }
.report details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.report summary {
  cursor: pointer;
  padding: 9px 14px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
}
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--accent-strong); }
.report .report-body { padding: 4px 14px 12px; }

.report-group { margin-top: 8px; }
.report-group .rg-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 4px;
}
.report-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.report-table td { padding: 4px 8px 4px 0; vertical-align: top; border-bottom: 1px dashed var(--line); }
.report-table tr:last-child td { border-bottom: 0; }
.report-table td.rt-label { color: var(--muted); white-space: nowrap; width: 1%; padding-right: 14px; }
.report-table td.rt-value { word-break: break-word; font-family: var(--font-mono); font-size: .8rem; }

.empty-note {
  text-align: center;
  color: var(--muted);
  font-size: .93rem;
  padding: 26px 0 8px;
}

.progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width .2s ease;
}

/* ---------- toast ---------- */

.toast-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--dark);
  color: #eef5f0;
  font-size: .9rem;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease;
}
.toast.toast-error { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- blog ---------- */

.post-list { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .post-list { grid-template-columns: 1fr; } }
.post-card .post-tag {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card .post-date { font-size: .82rem; color: var(--muted); }

.prose { max-width: 740px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }

.callout {
  border: 1px solid #cfe7e0;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: .95rem;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--dark);
  color: var(--dark-muted);
  padding: 56px 0 28px;
  margin-top: 40px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--dark-line);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin: 12px 0 0; max-width: 300px; }
.site-footer h4 {
  color: #eef5f0;
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--dark-muted); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: .84rem;
}

/* ---------- misc ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 26px 0 22px; }
  .file-card { flex-direction: row; }
  .tool-actions .btn { flex: 1 1 auto; }
}

@media print {
  .site-header, .site-footer, .tool-actions, .nav-cta { display: none; }
}
