:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6878;
  --accent: #2563eb;
  --success: #059669;
  --danger: #dc2626;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 700; font-size: 1.1rem; }
.nav-badge { font-size: .75rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.container { max-width: 900px; margin: 0 auto; padding: 24px 20px; }

/* INPUT */
.input-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.input-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.section-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.btn-sm { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 4px 10px; border-radius: 5px; cursor: pointer; font-size: .78rem; transition: background .15s; }
.btn-sm:hover { background: var(--border); }
.hash-textarea { width: 100%; height: 100px; background: var(--surface); border: none; color: var(--text); font-family: 'Consolas', monospace; font-size: .9rem; padding: 12px 14px; outline: none; resize: vertical; }
.input-footer { display: flex; align-items: center; gap: 16px; padding: 8px 14px; background: var(--surface2); border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.checkbox-label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: .82rem; }
.checkbox-label input { accent-color: var(--accent); }

/* HASH GRID */
.hash-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hc-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.hc-algo { font-size: .8rem; font-weight: 700; color: var(--muted); }
.hc-bits { font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 2px 6px; border-radius: 3px; }
.hc-copy { background: none; border: 1px solid var(--border); color: var(--muted); padding: 3px 8px; border-radius: 4px; cursor: pointer; font-size: .72rem; transition: color .15s, border-color .15s; }
.hc-copy:hover { color: var(--accent); border-color: var(--accent); }
.hc-copy.copied { color: var(--success); border-color: var(--success); }
.hc-value { padding: 10px 14px; font-family: 'Consolas', 'Monaco', monospace; font-size: .875rem; color: var(--success); word-break: break-all; line-height: 1.5; }
.hc-value.empty { color: var(--muted); }

/* COMPARE */
.compare-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.compare-label { font-size: .75rem; color: var(--muted); margin-bottom: 6px; }
.cmp-area { width: 100%; height: 70px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Consolas', monospace; font-size: .82rem; padding: 8px; border-radius: 6px; outline: none; resize: vertical; }
.cmp-area:focus { border-color: var(--accent); }
.compare-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.algo-select { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: 6px; font-size: .875rem; outline: none; cursor: pointer; }
.btn-primary { background: var(--accent); border: none; color: #fff; padding: 8px 20px; border-radius: var(--radius); cursor: pointer; font-size: .875rem; font-weight: 600; transition: opacity .15s; }
.btn-primary:hover { opacity: .85; }
.cmp-result { font-size: .875rem; font-weight: 600; }
.cmp-result.match { color: var(--success); }
.cmp-result.nomatch { color: var(--danger); }

.tip-row { padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: .85rem; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 600px) {
  .compare-grid { grid-template-columns: 1fr; }
}
