/* Karelia Image: the free image metadata remover on karelialabs.com.
   The look is the Karelia Labs site's: near-black, one green, Space Grotesk and IBM Plex Mono, square pixels.
   Fonts are this folder's own copies (see fonts/LICENSES.txt), so the page loads nothing from another site. */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/space-grotesk-400.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/space-grotesk-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format("woff2"); }

:root {
  --bg: #050706;
  --bg-2: #080b09;
  --panel: #0b100d;
  --panel-2: #101713;
  --line: #80ffa81f;
  --line-strong: #80ffa842;
  --text: #edf3ee;
  --muted: #a3b1a9;
  --faint: #73837a;
  --accent: #00ff41;
  --accent-ink: #03130a;
  --mint: #b9ffcc;
  --amber: #ffc24a;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(18px, 4.4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --p: 4px; /* one "pixel" of the stepped corners */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* A faint square grid and one green glow behind the top of the page. */
body::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 880px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, #00ff4118, transparent 70%),
    linear-gradient(#80ffa80b 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, #80ffa80b 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}
img, canvas { display: block; max-width: 100%; }
a { color: var(--mint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Stepped corners, two pixels deep. .px is the line colour; .px-in sits one line inside it. */
.px, .px-in {
  clip-path: polygon(
    0 calc(2 * var(--p)), var(--p) calc(2 * var(--p)), var(--p) var(--p), calc(2 * var(--p)) var(--p), calc(2 * var(--p)) 0,
    calc(100% - 2 * var(--p)) 0, calc(100% - 2 * var(--p)) var(--p), calc(100% - var(--p)) var(--p), calc(100% - var(--p)) calc(2 * var(--p)), 100% calc(2 * var(--p)),
    100% calc(100% - 2 * var(--p)), calc(100% - var(--p)) calc(100% - 2 * var(--p)), calc(100% - var(--p)) calc(100% - var(--p)), calc(100% - 2 * var(--p)) calc(100% - var(--p)), calc(100% - 2 * var(--p)) 100%,
    calc(2 * var(--p)) 100%, calc(2 * var(--p)) calc(100% - var(--p)), var(--p) calc(100% - var(--p)), var(--p) calc(100% - 2 * var(--p)), 0 calc(100% - 2 * var(--p)));
}
.px { background: var(--line-strong); padding: 2px; }
.px-in { background: var(--panel); height: 100%; }

.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }

/* ------------------------------------------------------------------ header */
.top { padding: 22px 0; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: clamp(14px, 2.6vw, 30px); font-weight: 600; font-size: .98rem; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(26px, 5vw, 64px) 0 clamp(40px, 6vw, 84px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); margin-bottom: 22px; }
.kicker::before { content: ""; width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.kicker b { font-weight: 400; color: var(--muted); }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px #00ff4166; }
.lede { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 1.14rem; }
.lede strong { color: var(--text); font-weight: 600; }
.removes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.removes li { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--mint); border: 1px solid var(--line-strong); padding: 5px 9px; background: #00ff410b; }

/* ------------------------------------------------------------------ the drop stage */
.stage-col { display: grid; gap: 14px; justify-items: stretch; }
.stage { --p: 6px; display: block; width: 100%; border: 0; cursor: pointer; text-align: center; transition: background .2s; }
.stage:hover, body.dragging .stage { background: var(--accent); }
.stage:focus-visible { outline: none; background: var(--accent); }
.stage[aria-disabled="true"] { cursor: progress; }
.stage .px-in { --p: 6px; position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(70% 70% at 50% 45%, #0d1a12, var(--panel) 75%); }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.stage-text { position: relative; display: grid; gap: 6px; padding: 20px; }
.stage-text .t1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.02em; text-shadow: 0 2px 18px #000; }
.stage-text .t2 { color: var(--muted); text-shadow: 0 1px 10px #000; }
.stage-foot { position: absolute; left: 0; right: 0; bottom: 12px; color: var(--faint); }
body.is-busy .stage-text .t1::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: .25em; background: var(--accent); vertical-align: -.15em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.under-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; color: var(--muted); font-size: .95rem; }
.textbtn { background: none; border: 0; padding: 4px 0; color: var(--mint); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.textbtn:hover { color: var(--accent); }
.status { min-height: 1.6em; color: var(--mint); font-family: var(--mono); font-size: .85rem; }

/* The whole page takes a drop. */
.drop-veil { position: fixed; inset: 0; z-index: 30; display: none; place-items: center; background: #050706d9; border: 6px solid var(--accent); color: var(--accent); font: 600 clamp(1.6rem, 5vw, 3rem) var(--sans); pointer-events: none; }
body.dragging .drop-veil { display: grid; }

/* ------------------------------------------------------------------ buttons */
.btn { --p: 3px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 22px; border: 0; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .15s, color .15s, transform .15s var(--ease); }
.btn:hover { background: #17221b; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 34px #00ff4140; clip-path: polygon(0 var(--p), var(--p) var(--p), var(--p) 0, calc(100% - var(--p)) 0, calc(100% - var(--p)) var(--p), 100% var(--p), 100% calc(100% - var(--p)), calc(100% - var(--p)) calc(100% - var(--p)), calc(100% - var(--p)) 100%, var(--p) 100%, var(--p) calc(100% - var(--p)), 0 calc(100% - var(--p))); }
.btn-primary:hover { background: var(--mint); color: var(--accent-ink); }
.btn-primary:focus-visible { outline: none; background: #fff; }
.btn-block { width: 100%; }
.btn svg, .textbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; flex: none; }

/* ------------------------------------------------------------------ result */
.result { padding: clamp(18px, 4vw, 44px) 0 clamp(40px, 6vw, 80px); }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.result h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin-bottom: 22px; text-wrap: balance; }
.result h2 em { font-style: normal; color: var(--accent); }
.preview { --p: 6px; }
.preview .px-in { --p: 6px; display: grid; place-items: center; aspect-ratio: 4 / 3; background:
  linear-gradient(45deg, #0f1612 25%, transparent 25%, transparent 75%, #0f1612 75%) 0 0 / 16px 16px,
  linear-gradient(45deg, #0f1612 25%, transparent 25%, transparent 75%, #0f1612 75%) 8px 8px / 16px 16px, var(--panel); }
.preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.preview-cap { margin-top: 10px; color: var(--faint); font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }
.actions { display: grid; gap: 12px; margin-top: 18px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice { --p: 3px; margin-top: 18px; max-width: 46em; }
.notice .px-in { padding: 14px 16px; color: var(--muted); font-size: .98rem; }
.notice strong { color: var(--text); font-weight: 600; }
.notice + .actions { max-width: 20em; }

/* The receipt: a mono print-out. */
.receipt { --p: 6px; }
.receipt > .px-in { --p: 6px; padding: clamp(18px, 3vw, 28px); font-family: var(--mono); font-size: .86rem; line-height: 1.55; }
.r-head, .r-meta { display: flex; justify-content: space-between; gap: 12px; }
.r-head { letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.r-head .r-kind { color: var(--muted); }
.r-meta { color: var(--faint); margin-top: 2px; }
.r-rule { border: 0; height: 2px; margin: 14px 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px); }
.r-file { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.r-thumb { width: 56px; height: 56px; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--line-strong); }
.r-name { color: var(--text); overflow-wrap: anywhere; }
.r-fmt { color: var(--faint); }
.r-verdict-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.r-verdict { font-family: var(--sans); font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.r-ai { color: var(--accent-ink); background: var(--amber); padding: 2px 8px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.r-lines { margin-top: 6px; }
.r-group h3 { margin: 14px 0 4px; font: inherit; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.r-line { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.r-line .k { color: var(--muted); }
.r-line .v { color: var(--text); overflow-wrap: anywhere; text-decoration: line-through; text-decoration-color: #00ff4199; white-space: pre-wrap; }
.r-line .m { color: var(--accent); }
.r-line.sens .k { color: var(--amber); }
.r-more { margin-top: 10px; background: none; border: 0; padding: 4px 0; color: var(--mint); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.r-more:hover { color: var(--accent); }
.r-note, .r-kept { margin-top: 12px; color: var(--muted); }
.r-totals { display: grid; gap: 3px; }
.r-total { display: flex; justify-content: space-between; gap: 12px; color: var(--text); }
.r-total .k { color: var(--muted); }
.r-total.note .v::before { content: "■ "; color: var(--accent); }
.r-foot { margin-top: 14px; color: var(--faint); }
.stamp { display: inline-block; margin-top: 16px; padding: 6px 12px; border: 2px solid var(--accent); color: var(--accent); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; box-shadow: 0 0 22px #00ff4126, inset 0 0 14px #00ff4114; }
.r-notes li + li { margin-top: 12px; }
.r-why { color: var(--muted); }
.receipt.printing .px-in > * { animation: print .34s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes print { from { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------------ the offline edition, after a result and lower down */
.offline { --p: 6px; margin-top: clamp(26px, 4vw, 44px); }
.offline > .px-in { --p: 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; padding: clamp(18px, 3vw, 30px); background: linear-gradient(120deg, #0b100d, #0d1a12); }
.offline h3 { font-size: 1.3rem; letter-spacing: -.015em; font-weight: 600; }
.offline p { margin-top: 6px; color: var(--muted); max-width: 46em; }
.offline .side { display: grid; gap: 10px; justify-items: start; }
.offline .side a.more { font-size: .95rem; }

/* ------------------------------------------------------------------ the reading part of the page */
.section { padding: clamp(40px, 6vw, 84px) 0; border-top: 1px solid var(--line); }
.section > .wrap > h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; max-width: 20em; text-wrap: balance; }
.section > .wrap > .sub { margin-top: 14px; color: var(--muted); max-width: 44em; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.card .px-in { padding: clamp(18px, 3vw, 28px); }
.card h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.card li { position: relative; padding-left: 20px; color: var(--muted); }
.card li + li { margin-top: 8px; }
.card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--accent); }
.card.not li::before { background: none; box-shadow: inset 0 0 0 1px var(--faint); }
.card .card-note { margin-top: 14px; color: var(--faint); font-size: .95rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--line-strong); padding-top: 16px; }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; color: var(--accent); margin-bottom: 8px; }
.steps h3 { font-size: 1.14rem; font-weight: 600; margin-bottom: 6px; }
.steps p { color: var(--muted); }
.faq { margin-top: 26px; max-width: 54em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 46em; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 24px; }
.links a { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.links a::after { content: "→"; color: var(--accent); font-family: var(--mono); }
.links a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: .95rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 30px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 40px #000; padding: 12px 18px; max-width: min(92vw, 460px); transition: opacity .2s, transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero, .result-grid { grid-template-columns: minmax(0, 1fr); }
  .cards, .links { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .offline > .px-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .nav a.wide { display: none; }
  .brand img { height: 26px; }
  .actions .row { grid-template-columns: minmax(0, 1fr); }
  .r-line { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) auto; }
  .receipt > .px-in { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
