/* Shared design system — matches arahimx.com's live dark theme
   (Inter + IBM Plex Mono, blue accent, dark obsidian background).
   Every tool page on tools.arahimx.com imports this file. */

:root {
  --bg: #111318;
  --surface: #181a21;
  --surface-hover: #1e212a;
  --border: #2b2e36;
  --border-hover: #3a3d47;
  --text: #e8ebee;
  --text-dim: #949ca8;
  --primary: #5593f7;
  --primary-foreground: #0c1420;
  --critical: #f26565;
  --warning: #f7b955;
  --info: #5aa9f7;
  --good: #4ade80;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 0.9rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
header.site-header .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); font-size: 14px; font-family: var(--mono);
}
.brand .name { font-weight: 600; font-size: 15px; }
.brand .name span { color: var(--primary); }
nav.top-links { display: flex; gap: 22px; font-size: 13.5px; }
nav.top-links a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
nav.top-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 10px; padding: 11px 22px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: filter 0.15s, transform 0.1s, border-color 0.15s;
  font-family: var(--sans);
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--surface-hover); }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- Form elements ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
label .optional { font-weight: 400; color: var(--text-dim); }
textarea, input[type="text"], input[type="email"], select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 12px 14px;
}
textarea { resize: vertical; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--primary); }
textarea::placeholder, input::placeholder { color: #55606e; }

/* ---------- Footer ---------- */
footer.site-footer {
  margin-top: 56px; padding: 28px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-dim);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
footer.site-footer a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
footer.site-footer a:hover { color: var(--text); }

/* ---------- CTA band (shared across tool result pages) ---------- */
.cta-band {
  margin-top: 40px; padding: 28px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), var(--surface));
  border: 1px solid var(--border); text-align: center;
}
.cta-band h2 { font-size: 1.3rem; margin: 0 0 8px; }
.cta-band p { color: var(--text-dim); font-size: 14px; max-width: 50ch; margin: 0 auto 18px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--primary); margin-bottom: 12px;
}

/* ---------- Badges ---------- */
.badge {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 999px; font-weight: 700;
}
.badge.critical { background: color-mix(in srgb, var(--critical) 15%, transparent); color: var(--critical); }
.badge.warning { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.badge.info { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.badge.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }

.spinner {
  width: 14px; height: 14px; border: 2px solid color-mix(in srgb, var(--primary-foreground) 30%, transparent);
  border-top-color: var(--primary-foreground);
  border-radius: 50%; display: inline-block; animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .cta-buttons { flex-direction: column; }
  nav.top-links { display: none; }
}
