@font-face { font-family: Figtree; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/figtree-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/newsreader-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/newsreader-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/newsreader-latin-700-normal.woff2') format('woff2'); }

:root {
  --ink: #0a0908;
  --ink-2: #14110e;
  --ink-3: #1c1813;
  --paper: #f3ead8;
  --paper-dim: #cfc3aa;
  --amber: #e8a14a;
  --amber-hot: #ffb65a;
  --rose: #e07a6a;
  --sage: #9db7a8;
  --line: rgba(243, 234, 216, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --sans: Figtree, "Segoe UI", sans-serif;
  --serif: Newsreader, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--ink); }
body {
  font-family: var(--sans);
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(232, 161, 74, 0.16), transparent 55%),
    var(--ink);
  line-height: 1.5;
}

#atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  -webkit-user-select: none;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.no-select, canvas, svg, .drop, .samples, .well, .findings, .thumb-row, #rangefinder, #redact, #photo, .privacy-pill {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.top, main { position: relative; z-index: 2; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px 8px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: 0.01em;
}
.tag { margin: 0; color: var(--paper-dim); font-size: 0.85rem; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.privacy-pill {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(20, 17, 14, 0.7);
  color: var(--sage);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

button, .tool {
  font: inherit;
  color: var(--paper);
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
button:hover, .tool:hover { border-color: var(--amber); }
button:active, .tool:active { transform: translateY(1px); }
button:focus-visible, .tool:focus-visible, .drop:focus-visible, .sample:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
button.primary {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
  font-weight: 700;
  padding: 12px 20px;
  font-size: 1rem;
}
button.primary:hover { background: var(--amber-hot); }
.tool.is-on { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 700; }
#mute-btn[aria-pressed="true"] { color: var(--paper-dim); }

main { padding: 0 28px 80px; max-width: 1240px; margin: 0 auto; }

.hero { padding-top: 12px; max-width: 920px; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin: 0 0 10px;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.lede { margin: 0 0 28px; font-size: 1.12rem; color: var(--paper-dim); max-width: 46rem; }

.drop {
  position: relative;
  border: 1px dashed rgba(232, 161, 74, 0.55);
  background: rgba(20, 17, 14, 0.72);
  border-radius: 18px;
  padding: 36px 20px 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.drop.is-over, .drop:hover {
  border-color: var(--amber-hot);
  background: rgba(40, 24, 10, 0.82);
  transform: translateY(-1px);
}
.film-corners::before, .film-corners::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(232, 161, 74, 0.6);
}
.film-corners::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.film-corners::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.drop-kicker { margin: 0; color: var(--amber); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }
.drop-title { font-family: var(--serif); font-size: 1.8rem; margin: 8px 0 4px; }
.drop-hint { margin: 0; color: var(--paper-dim); }

.sample-label { margin: 28px 0 12px; color: var(--paper-dim); font-size: 0.95rem; }
.samples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.sample {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: inherit;
}
.sample img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}
.sample .copy { padding: 10px 12px 12px; }
.sample strong { display: block; font-size: 0.92rem; }
.sample span { display: block; color: var(--paper-dim); font-size: 0.8rem; margin-top: 2px; }
.sample:hover { border-color: var(--amber); }

.stage { margin-top: 36px; }
.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}
.well {
  background: rgba(20, 17, 14, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
}
.well-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  align-items: center;
}
.file-chip { margin: 0; font-size: 0.8rem; color: var(--paper-dim); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools button, .tools .tool { padding: 6px 10px; font-size: 0.8rem; }
.frame {
  position: relative;
  background: #050403;
  border-radius: 12px;
  overflow: hidden;
  min-height: 280px;
  display: grid;
  place-items: center;
}
.frame img, #photo {
  max-width: 100%;
  max-height: min(62vh, 640px);
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}
#redact {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.develop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(232, 161, 74, 0.28), rgba(8, 4, 2, 0.82));
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.9s ease;
}
.frame.is-developing #photo {
  filter: contrast(0.7) brightness(0.55) sepia(0.45);
}
.frame.is-developing .develop { opacity: 1; }
.frame.is-ready #photo {
  filter: none;
  transition: filter 0.9s ease;
}
.frame.is-ready .develop { opacity: 0; }
.well-note { margin: 10px 8px 4px; color: var(--paper-dim); font-size: 0.82rem; }

.report h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 10px;
}
.summary { color: var(--paper-dim); margin: 0 0 8px; }
.sample-note {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.84rem;
}
.trace-count {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trace-count.is-hot { color: var(--rose); border-color: rgba(224, 122, 106, 0.4); }
.trace-count.is-ok { color: var(--sage); border-color: rgba(157, 183, 168, 0.4); }

.findings { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.finding {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 12px;
  padding: 12px 14px;
  animation: rise 0.45s ease both;
}
.finding[data-severity="hidden_location"] { border-left-color: var(--rose); }
.finding[data-severity="hidden_preview"] { border-left-color: var(--amber-hot); }
.finding[data-severity="identity_trace"] { border-left-color: #d8b07a; }
.finding[data-severity="device_trace"] { border-left-color: var(--sage); }
.finding h3 { margin: 0 0 4px; font-size: 1rem; }
.finding p { margin: 0; color: var(--paper-dim); font-size: 0.92rem; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.map-block, .thumb-block, .export-block, .clean-check {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}
.map-block h3, .thumb-block h3, .clean-check h3 { margin: 0 0 6px; font-size: 1.05rem; }
.map-block { overflow: visible; }
.rangefinder-wrap {
  width: min(340px, 100%);
  margin: 14px auto 10px;
  padding: 12px;
  overflow: visible;
}
#rangefinder {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
.coord, .map-copy { color: var(--paper-dim); font-size: 0.9rem; }
.coord { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.thumb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumb-row figure { margin: 0; background: var(--ink-2); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.thumb-row img { width: 100%; height: 160px; object-fit: cover; display: block; }
.thumb-row figcaption { padding: 6px 8px 8px; font-size: 0.78rem; color: var(--paper-dim); }

.export-note { color: var(--paper-dim); font-size: 0.86rem; }
.clean-check { background: rgba(157, 183, 168, 0.08); border: 1px solid rgba(157, 183, 168, 0.25); border-radius: 12px; padding: 12px 14px; }
.clean-check.is-hot { background: rgba(224, 122, 106, 0.08); border-color: rgba(224, 122, 106, 0.3); }

.trust { margin-top: 72px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust article {
  background: rgba(20, 17, 14, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.trust h2 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 10px; }
.trust p, .trust li { color: var(--paper-dim); }
.trust ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; }
.trust a { color: var(--amber); }

.verdict-hidden_location #headline { color: #ffc1b5; }
.verdict-clean #headline { color: var(--sage); }

@media (max-width: 980px) {
  .samples { grid-template-columns: repeat(2, 1fr); }
  .stage-grid, .trust-grid { grid-template-columns: 1fr; }
  .well { position: static; }
  main, .top { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 2.1rem; }
}
@media (max-width: 560px) {
  .samples { grid-template-columns: 1fr 1fr; }
  .top { flex-wrap: wrap; }
  .drop-title { font-size: 1.4rem; }
  .frame img, #photo { max-height: 50vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-height: 800px) and (min-width: 981px) {
  .top { padding-top: 10px; padding-bottom: 0; }
  .hero { padding-top: 2px; }
  h1 { font-size: 2.35rem; margin-bottom: 8px; }
  .lede { margin-bottom: 14px; font-size: 1rem; }
  .drop { padding: 16px 16px 14px; }
  .drop-title { font-size: 1.35rem; margin: 4px 0 2px; }
  .sample-label { margin: 14px 0 8px; }
  .sample img { height: 84px; object-position: center 60%; }
}
