/* RemoveAITag — "photo-lab receipt" design language.
   Paper, ink, ruled hairlines, monospace data labels, one stamp-red accent.
   Fonts are bundled locally (fonts/) — the site makes zero external requests.
   All #id / .class hooks used by js/app.js are preserved. */

/* ---------- Fonts (local, latin subset) ---------- */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('../fonts/ibm-plex-sans-condensed-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('../fonts/ibm-plex-sans-condensed-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f4f2ec;      /* page */
  --card: #fdfcf8;       /* receipt / panels */
  --ink: #1c1b18;
  --ink-2: #565248;
  --muted: #85806f;
  --rule: #d9d4c6;
  --rule-strong: #b3ac99;
  --red: #c2412f;        /* stamp red: struck data, accents */
  --red-wash: #f9e9e6;
  --green: #20713f;      /* CLEANED stamp */
  --green-wash: #ebf3ec;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --maxw: 740px;
  --r: 4px;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3 { color: var(--ink); line-height: 1.1; }
strong { color: var(--ink); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.icon { width: 1em; height: 1em; flex-shrink: 0; stroke: currentColor; fill: none; }

/* Mono utility voice: eyebrows, tags, buttons, fine print */
.eyebrow, .section-eyebrow, .spec-tag, .btn, .stamp, .footer-fine, .updated {
  font-family: var(--mono);
}

/* ---------- Header (letterhead) ---------- */
/* Skip link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--red); outline-offset: 2px; }

/* Breadcrumb (legal / sub-pages) */
.breadcrumb { padding: 22px 0 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: var(--rule-strong); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--cond);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo-box {
  display: inline-block;
  margin: 0 3px;
  padding: 0 5px;
  border: 2px solid var(--red);
  border-radius: 3px;
  color: var(--red);
  line-height: 1.25;
}
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--red); }
.nav-hide-sm { display: none; }
@media (min-width: 560px) { .nav-hide-sm { display: inline; } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 46px 0 6px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 6px 12px;
  margin-bottom: 22px;
  background: var(--card);
}
.eyebrow .icon { width: 13px; height: 13px; color: var(--red); }
.hero h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  max-width: 17ch;
  margin: 0 auto;
}
.hero .lead {
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  max-width: 48ch;
  margin: 16px auto 0;
}

/* ---------- Drop zone (crop-marked paper) ---------- */
.tool { margin: 32px 0 0; }

#drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 52px 24px;
  cursor: pointer;
  background:
    /* corner crop marks, drawn in ink */
    linear-gradient(var(--ink), var(--ink)) 14px 14px / 14px 1.5px,
    linear-gradient(var(--ink), var(--ink)) 14px 14px / 1.5px 14px,
    linear-gradient(var(--ink), var(--ink)) calc(100% - 14px) 14px / 14px 1.5px,
    linear-gradient(var(--ink), var(--ink)) calc(100% - 14px) 14px / 1.5px 14px,
    linear-gradient(var(--ink), var(--ink)) 14px calc(100% - 14px) / 14px 1.5px,
    linear-gradient(var(--ink), var(--ink)) 14px calc(100% - 14px) / 1.5px 14px,
    linear-gradient(var(--ink), var(--ink)) calc(100% - 14px) calc(100% - 14px) / 14px 1.5px,
    linear-gradient(var(--ink), var(--ink)) calc(100% - 14px) calc(100% - 14px) / 1.5px 14px,
    var(--card);
  background-repeat: no-repeat;
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--r);
  transition: border-color .15s ease, background-color .15s ease;
}
#drop-zone:hover { border-color: var(--ink); }
#drop-zone:focus-visible {
  outline: none;
  border-color: var(--red);
  border-style: solid;
}
#drop-zone.dragover {
  border-color: var(--red);
  border-style: solid;
  background-color: var(--red-wash);
}
.dz-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.dz-badge .icon { width: 26px; height: 26px; stroke-width: 1.5; }
#drop-zone.dragover .dz-badge { color: var(--red); border-color: var(--red); }
.dz-main {
  font-family: var(--cond);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.dz-sub { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.dz-sub::first-letter { text-transform: uppercase; }
.desktop-only { display: none; }
@media (min-width: 620px) { .desktop-only { display: inline; } }

.trust-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
}
.trust-pill .icon { width: 16px; height: 16px; color: var(--green); stroke-width: 2.2; }

/* ---------- Results: the receipt ---------- */
#results { margin-top: 30px; filter: drop-shadow(0 6px 14px rgba(28, 27, 24, .10)); }
#results[hidden] { display: none; }

.receipt {
  background: var(--card);
  border: 1px solid var(--rule);
  border-bottom: none;
  border-radius: var(--r) var(--r) 0 0;
  padding: 20px 20px 24px;
}
/* torn receipt edge */
.tear {
  height: 9px;
  background:
    linear-gradient(135deg, var(--card) 50%, transparent 50%) 0 0 / 16px 100% repeat-x,
    linear-gradient(225deg, var(--card) 50%, transparent 50%) 8px 0 / 16px 100% repeat-x;
}

.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule-strong);
  margin-bottom: 14px;
}
.results-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 30px;
}
.results-head .spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.results-head.done .spinner { display: none; }
.results-head .done-check { display: none; width: 16px; height: 16px; color: var(--green); stroke-width: 2.6; }
.results-head.done .done-check { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.stamp {
  align-self: center;
  flex-shrink: 0;
  padding: 5px 12px;
  border: 2px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  background: var(--green-wash);
}
.stamp[hidden] { display: none; }

#file-list { list-style: none; padding: 0; display: grid; gap: 0; }
#file-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule);
  animation: rise .2s ease both;
}
#file-list li:last-child { border-bottom: none; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#file-list img {
  width: 58px; height: 58px;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 3px;
  background: #fff;
  flex-shrink: 0;
}
.file-meta { min-width: 0; flex: 1; }
.file-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-removed { margin-top: 4px; font-size: 0.84rem; color: var(--muted); }
.strike-list {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
}
.strike-list li {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.file-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--red);
  line-height: 1.45;
}
.file-error::before {
  content: "";
  flex-shrink: 0;
  width: 14px; height: 14px;
  margin-top: 2px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2412f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r);
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary { background: var(--ink); color: var(--card); }
.btn-primary:hover { background: #33312b; color: var(--card); }
#file-list .btn { flex-shrink: 0; padding: 9px 14px; align-self: center; }
#download-all { margin-top: 18px; width: 100%; }
@media (min-width: 620px) { #download-all { width: auto; } }

/* ---------- Sections ---------- */
.section { padding: 44px 0 0; }
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.section-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.section > p { margin-top: 8px; max-width: 60ch; }

/* Spec table: what gets removed */
.spec { margin-top: 18px; border-top: 1.5px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
@media (min-width: 620px) {
  .spec-row { grid-template-columns: 64px 190px 1fr; }
}
.spec-tag {
  display: inline-block;
  justify-self: start;
  padding: 2px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  background: var(--card);
}
.spec-name { font-weight: 600; color: var(--ink); }
.spec-desc { font-size: 0.92rem; color: var(--ink-2); grid-column: 2; }
@media (min-width: 620px) { .spec-desc { grid-column: auto; } }

/* Steps */
.steps { display: grid; gap: 0; margin-top: 18px; border-top: 1.5px solid var(--ink); counter-reset: step; }
@media (min-width: 620px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 0 28px; } }
.step { padding: 18px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 620px) { .step { border-bottom: none; } }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 10px;
}
.step h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 0.92rem; }

/* Privacy panel */
.privacy-panel {
  margin-top: 18px;
  padding: 22px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
}
.privacy-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.privacy-list li { display: flex; gap: 12px; align-items: flex-start; }
.privacy-list .icon { width: 18px; height: 18px; color: var(--green); stroke-width: 2.4; margin-top: 3px; }
.privacy-list p { font-size: 0.94rem; }
.privacy-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 0.85rem;
  color: var(--muted);
}

/* FAQ: ruled list */
.faq { margin-top: 14px; border-top: 1.5px solid var(--ink); }
details { border-bottom: 1px solid var(--rule); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 2px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}
details[open] summary::after { content: "–"; }
details > p { padding: 0 2px 16px; font-size: 0.94rem; max-width: 62ch; }

/* ---------- Ads ---------- */
.ad-slot { min-height: 90px; margin: 40px 0 0; }
.ad-slot:empty { display: none; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 60px; border-top: 3px double var(--ink); background: var(--paper); }
.site-footer .wrap { padding-top: 26px; padding-bottom: 32px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 10px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.footer-links a:hover { color: var(--red); }
.footer-fine { font-size: 0.75rem; letter-spacing: 0.03em; color: var(--muted); }

/* ---------- Consent banner (paper slip) ---------- */
#consent-banner {
  position: fixed;
  inset: auto 12px 12px;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 10px 30px rgba(28, 27, 24, .18);
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-2);
  z-index: 40;
}
#consent-banner[hidden] { display: none; }
#consent-banner p { flex: 1 1 300px; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions .btn { padding: 9px 14px; }

/* ---------- Legal pages ---------- */
.legal { padding: 44px 0 0; }
.legal h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  text-transform: uppercase;
}
.legal h2 { font-size: 1.1rem; font-weight: 600; margin: 30px 0 4px; }
.legal p { margin-top: 10px; max-width: 66ch; }
.legal .updated { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 10px; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

/* ---------- Motion & small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 560px) {
  #file-list li { flex-wrap: wrap; }
  #file-list .file-meta { flex: 1 1 calc(100% - 72px); }
  #file-list .btn { flex: 1 1 100%; margin-top: 12px; }
}
@media (max-width: 400px) {
  #file-list li { gap: 10px; }
  #file-list img { width: 48px; height: 48px; }
}
