/* checksum.name — industrial verification console */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  --bg: #0c0e0a;
  --bg-raise: #12150e;
  --surface: #161a11;
  --line: #2a2f20;
  --line-soft: #202517;
  --text: #e9edde;
  --muted: #9aa389;
  --faint: #6a7259;
  --accent: #cdf24d;
  --accent-hi: #e0ff6e;
  --accent-ink: #171c05;
  --ok: #7ee787;
  --bad: #ff7b72;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Archivo', system-ui, sans-serif;
  --radius: 6px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f2f4ea;
  --bg-raise: #fafbf3;
  --surface: #ffffff;
  --line: #d4d9c2;
  --line-soft: #e2e6d2;
  --text: #191d10;
  --muted: #5b6349;
  --faint: #8b9377;
  --accent: #3f5d00;
  --accent-hi: #4d7000;
  --accent-ink: #f4ffd6;
  --ok: #1a7f37;
  --bad: #c93c37;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* faint blueprint grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .28;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ============ header ============ */
.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand .tld { color: var(--accent); }
.brand:hover { color: var(--text); }
.main-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-left: auto;
}
.main-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 4px;
}
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a[aria-current="page"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 4px;
  padding: 5px 9px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--faint); }

/* ============ hero ============ */
.hero { padding: 34px 0 10px; }
.hero .kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.hero h1 {
  font-size: clamp(30px, 5.5vw, 46px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0 0 10px;
}
.hero .lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
  font-size: 16px;
}
.privacy-note {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ok);
  border: 1px dashed color-mix(in srgb, var(--ok) 45%, transparent);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--ok) 6%, transparent);
}
.privacy-note::before { content: '⏻'; content: '✓'; font-weight: 700; }

/* ============ tool panel ============ */
.tool {
  margin: 26px 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
  box-shadow: 0 18px 50px -30px rgba(0,0,0,.55);
  overflow: hidden;
}
.tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tool-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tool-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-body { padding: 18px 16px 20px; display: grid; gap: 16px; }

.field label, .fieldset-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 11px 12px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
select { cursor: pointer; }

.controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.controls .field { flex: 1 1 180px; }

.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .06s ease, background .12s ease;
}
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* dropzone */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--line) 32%, transparent) 14px 15px);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.dropzone strong { color: var(--text); font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.dropzone .hint { display: block; font-family: var(--mono); font-size: 11.5px; margin-top: 5px; color: var(--faint); }
.dropzone input[type="file"] { display: none; }

.file-meta {
  display: none;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.file-meta.show { display: block; }
.file-meta b { color: var(--text); font-weight: 600; }

/* algorithm checkboxes */
.algo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.algo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  user-select: none;
}
.algo-chip input { accent-color: var(--accent); margin: 0; }
.algo-chip:has(input:checked) {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* progress */
.progress { display: none; gap: 8px; align-items: center; }
.progress.show { display: flex; }
.progress .bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line-soft);
  overflow: hidden;
}
.progress .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .1s linear;
}
.progress .pct { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 8ch; text-align: right; }

/* ============ results ============ */
.results { display: grid; gap: 10px; }
.result-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  animation: rowIn .22s ease both;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.result-row .algo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.result-row .algo .name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.copy-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--faint); }
.copy-btn.copied { color: var(--ok); border-color: var(--ok); }
.digest {
  font-family: var(--mono);
  font-size: 13.5px;
  word-break: break-all;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.verdict {
  display: none;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid;
}
.verdict.show { display: block; }
.verdict.match { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.verdict.mismatch { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.verdict .detail { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ============ article / faq ============ */
.content { padding: 34px 0 8px; }
.content h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}
.content h2::before { content: '§ '; color: var(--accent); font-family: var(--mono); font-weight: 400; }
.content p { color: var(--muted); max-width: 72ch; margin: 0 0 14px; }
.content p strong { color: var(--text); }
.content ul { color: var(--muted); max-width: 72ch; padding-left: 22px; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--accent); }

.also-try {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
.also-try a { margin-right: 4px; }

.sec-h { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 14px; }
.sec-h.tight { margin: 0; }
.sec-h .mark { color: var(--accent); font-family: var(--mono); font-weight: 400; }
.hash-field { min-height: 64px; }

.faq { padding: 26px 0 8px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  margin-bottom: 8px;
}
.faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 16px 14px; color: var(--muted); max-width: 72ch; }

/* why block (home) */
.why { padding: 26px 0 8px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.why-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); padding: 16px; }
.why-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.why-card h3::before { content: '// '; color: var(--accent); font-family: var(--mono); font-weight: 400; }
.why-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ============ other tools + footer ============ */
.other-tools { padding: 26px 0 34px; }
.other-tools h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.tool-links { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.tool-links a:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  background: var(--bg-raise);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.site-footer a { color: var(--muted); }
.site-footer .foot-privacy { color: var(--ok); }

/* privacy page prose */
.prose { padding: 30px 0 40px; }
.prose h2 { font-size: 20px; margin: 26px 0 10px; letter-spacing: -.02em; }
.prose p, .prose li { color: var(--muted); max-width: 72ch; }

@media (max-width: 640px) {
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 30px; }
  .tool-body { padding: 14px 12px 16px; }
  .site-header .wrap { gap: 8px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; padding-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
