/* ==========================================================================
   HashForge design tokens
   Palette: deep teal-ink background, brass/copper signature accent (keys &
   locks, not another blue SaaS gradient), mint highlight for computed data.
   Type: JetBrains Mono for anything that is *data* or a heading (this is a
   tool about digests — the monospace grid is the point, not a decoration),
   Inter for reading copy.
   ========================================================================== */

:root {
  --ink: #0c1416;
  --ink-raised: #121d20;
  --ink-card: #162326;
  --line: #24373b;
  --line-soft: #1c2c2f;
  --text: #e7eeee;
  --text-dim: #9db0b1;
  --text-faint: #6b8082;
  --brass: #c9793b;
  --brass-bright: #e59a5a;
  --mint: #7fe0c2;
  --mint-dim: #4fa98d;
  --red: #e0665a;
  --amber: #e0b34f;
  --radius: 14px;
  --font-display: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Faint scanline / grid texture on the body — the one atmospheric flourish */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(127, 224, 194, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 224, 194, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

main, header, footer { position: relative; z-index: 1; }

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
}

a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--brass-bright); }

code, .mono, input[type='text'], input[type='password'], .hash-output, textarea {
  font-family: var(--font-display);
}

/* ---------- Layout shells ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(12, 20, 22, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-raised);
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Brand mark ---------- */

.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(155deg, var(--brass) 0%, #9a5522 100%);
  display: flex; align-items: center; justify-content: center;
  color: #150c05; font-size: 1.05rem; box-shadow: 0 6px 18px rgba(201, 121, 59, 0.35);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand-name .accent { color: var(--mint); }

/* ---------- Nav ---------- */

.nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: 0.9rem; color: var(--text-dim); }
.nav-links a:hover { color: var(--brass-bright); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--ink-raised);
    border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start;
    padding: 1rem 1.25rem; gap: 0.9rem; display: none;
  }
  .nav-links.nav-open { display: flex; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Cards & widgets ---------- */

.card {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.eyebrow {
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mint-dim);
}

.field-label {
  font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
}

.text-input {
  width: 100%; background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.85rem 1rem; color: var(--text); font-size: 0.92rem;
  transition: border-color 0.15s ease;
}
.text-input:focus { outline: none; border-color: var(--brass); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  border-radius: 10px; padding: 0.7rem 1.1rem; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.1s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brass); color: #150c05; }
.btn-primary:hover { background: var(--brass-bright); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--mint-dim); color: var(--mint); }
.btn-icon {
  width: 42px; height: 42px; padding: 0; border-radius: 10px;
  background: var(--ink-raised); border: 1px solid var(--line); color: var(--text-dim);
}
.btn-icon:hover { color: var(--mint); border-color: var(--mint-dim); }
.btn-icon.copied { color: var(--mint); border-color: var(--mint); }

/* ---------- Hash output readout ---------- */

.hash-row {
  background: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.hash-row .hash-label { color: var(--brass-bright); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; display: block; margin-bottom: 0.25rem; }
.hash-output {
  color: var(--mint); font-size: 0.82rem; word-break: break-all; display: block;
}

/* ---------- Strength meter ---------- */

.strength-bar-track {
  width: 100%; height: 8px; border-radius: 999px; background: var(--ink);
  border: 1px solid var(--line); overflow: hidden;
}
.strength-bar-fill { height: 100%; width: 0%; transition: width 0.25s ease, background 0.25s ease; }
.strength-idle { background: var(--line); }
.strength-weak { background: var(--red); }
.strength-medium { background: var(--amber); }
.strength-strong { background: var(--mint); }

.strength-label-idle { color: var(--text-faint); }
.strength-label-weak { color: var(--red); }
.strength-label-medium { color: var(--amber); }
.strength-label-strong { color: var(--mint); }

.rule-chip {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem;
  padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid var(--line-soft);
  background: var(--ink); color: var(--text-faint);
}
.rule-chip.rule-ok { color: var(--mint); border-color: rgba(127, 224, 194, 0.35); background: rgba(127, 224, 194, 0.06); }
.rule-chip.rule-fail i { color: var(--red); }
.rule-chip.rule-ok i { color: var(--mint); }

/* ---------- Verify / lookup result banners ---------- */

.verify-result, .lookup-result {
  margin-top: 0.9rem; padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.88rem;
  border: 1px solid var(--line-soft); background: var(--ink);
}
.verify-ok, .lookup-ok { color: var(--mint); border-color: rgba(127, 224, 194, 0.35); }
.verify-fail, .lookup-fail { color: var(--red); border-color: rgba(224, 102, 90, 0.35); }
.verify-neutral, .lookup-neutral { color: var(--text-dim); }

/* ---------- Prose (long-form article content) ---------- */

.prose { color: var(--text-dim); font-size: 1rem; }
.prose h2 {
  color: var(--text); font-size: 1.4rem; margin-top: 2.4rem; margin-bottom: 0.9rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line-soft);
}
.prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.prose h3 { color: var(--text); font-size: 1.1rem; margin-top: 1.6rem; margin-bottom: 0.6rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose code {
  background: var(--ink-raised); border: 1px solid var(--line-soft); border-radius: 5px;
  padding: 0.1rem 0.4rem; font-size: 0.85em; color: var(--mint);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.88rem; }
.prose th, .prose td { border: 1px solid var(--line-soft); padding: 0.55rem 0.7rem; text-align: left; }
.prose th { background: var(--ink-raised); color: var(--text); font-family: var(--font-display); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

.faq-item { border-bottom: 1px solid var(--line-soft); padding: 1.1rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--brass); font-family: var(--font-display); }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin-top: 0.7rem; color: var(--text-dim); }

/* ---------- Related tools grid ---------- */

.tool-card {
  display: block; background: var(--ink-card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.1rem; transition: border-color 0.15s ease, transform 0.1s ease;
}
.tool-card:hover { border-color: var(--brass); transform: translateY(-2px); }
.tool-card .tool-card-title { color: var(--text); font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 0.35rem; }
.tool-card .tool-card-desc { color: var(--text-faint); font-size: 0.82rem; }

/* ---------- Badge ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem;
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-dim); font-family: var(--font-display); letter-spacing: 0.03em;
}
.badge i { color: var(--mint); }

/* ---------- Utility ---------- */

.text-brass { color: var(--brass-bright); }
.text-mint { color: var(--mint); }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
