﻿/* ===================================================
   style.css  —  Alpha Toolkit
   Modular CSS inlined for performance (1 HTTP request)
   Generated: 2026-03-08
   =================================================== */

/* ── Self-hosted Fonts ───────────────────────────────────────── */
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/SpaceGrotesk.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono.ttf') format('truetype');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono-Italic.ttf') format('truetype');
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

/* ── core.css ────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════
   ALPHA TOOLKIT — core.css
   CSS Custom Properties · Reset · Base · Background FX
   ═══════════════════════════════════════════════════════════ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:     #05070f;
  --bg-surface:  #0b0f1e;
  --bg-elevated: #111829;
  --bg-card:     rgba(15, 20, 40, 0.55);

  /* Brand colours */
  --cyan:       #00d4ff;
  --cyan-dim:   rgba(0, 212, 255, 0.15);
  --cyan-glow:  rgba(0, 212, 255, 0.35);
  --purple:     #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.15);

  /* Status */
  --green:  #10d97e;
  --yellow: #f5c542;
  --red:    #ff4d6a;

  /* Text */
  --text-primary:   #e8efff;
  --text-secondary: #8892a4;
  --text-muted:     #4a5568;
  --text-code:      #a5f3fc;

  /* Borders */
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);

  /* Typography */
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-ui:   var(--font-sans);

  /* Layout */
  --nav-h:     68px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius:    var(--radius-md);

  /* Motion */
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-card: 0 8px 40px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol   { list-style: none; }
a        { color: inherit; text-decoration: none; }
button   { font-family: inherit; }

/* ── 3. Screen-reader only ────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ── 4. Background FX ─────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  animation: glowPulse 8s ease-in-out infinite;
}

.bg-glow--1 {
  width: 600px; height: 600px;
  top: -200px; left: -200px;
  background: rgba(124, 58, 237, 0.12);
}

.bg-glow--2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -150px;
  background: rgba(0, 212, 255, 0.08);
  animation-delay: -4s;
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.1); }
}

/* ── 5. Selection ─────────────────────────────────────────── */
::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}

/* ── 6. Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

/* ── 7. Focus & Accessibility ─────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible { outline-radius: var(--radius-sm); }


/* ── components.css ──────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════
   ALPHA TOOLKIT — components.css
   Navigation · Buttons · Cards · Forms · Toasts · Animations
   ═══════════════════════════════════════════════════════════ */

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.inline-flex { display: inline-flex; align-items: center; }
.gap-6 { gap: 6px; }

/* ── Navigation ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(5, 7, 15, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 2rem;
  max-width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name { display: flex; align-items: center; }
.brand-accent { color: var(--cyan); margin-left: 1px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.nav-toggle:hover { border-color: var(--border-hover); }

.hamburger-line {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: background var(--transition);
}

.nav-toggle:hover .hamburger-line { background: var(--text-primary); }

/* Mobile nav */
.nav-mobile {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  background: rgba(5, 7, 15, 0.96);
}

.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }

.nav-mobile-link {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-mobile-link:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
}

.mobile-cat-label {
  padding: 0.7rem 1rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.75;
}

/* Mega Nav Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown-btn svg {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-mega {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 200;
  background: rgba(8, 11, 24, 0.97);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  animation: megaIn 0.2s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.nav-mega[hidden] { display: none; }

@keyframes megaIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mega-col {
  padding: 0 0.85rem;
  border-right: 1px solid var(--border);
}

.mega-col:last-child { border-right: none; }

.mega-cat {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}

.mega-link {
  display: block;
  padding: 0.28rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition), padding-left var(--transition);
}

.mega-link:hover {
  color: var(--text-primary);
  padding-left: 5px;
  white-space: normal;
  overflow: visible;
}

.mega-link.active { color: var(--cyan); }

/* ── Cards & Glass ────────────────────────────────────────── */
.card {
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.4rem;
  position: relative;
  overflow: hidden;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.glass:hover {
  border-color: rgba(0,212,255,0.15);
  box-shadow: var(--shadow-card), 0 0 50px rgba(0,212,255,0.06);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition:
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,212,255,0.28);
}

.btn--primary:hover {
  box-shadow: 0 6px 30px rgba(0,212,255,0.45);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(124,58,237,0.18);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.35);
}

.btn--secondary:hover {
  background: rgba(124,58,237,0.28);
  border-color: rgba(124,58,237,0.55);
}

.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.btn--coffee {
  background: linear-gradient(135deg, #ffdd00 0%, #ffa500 100%);
  color: #1a1200;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 186, 0, 0.3);
}

.btn--coffee:hover {
  box-shadow: 0 6px 30px rgba(255, 186, 0, 0.5);
  transform: translateY(-1px);
}

.btn--full { width: 100%; margin-top: 1.4rem; }
.btn--sm   { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* Icon Button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: rgba(0,212,255,0.35);
}

.icon-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Btn row */
.btn-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ── Form Controls ────────────────────────────────────────── */
.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.control-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0;
  text-transform: none;
  background: var(--cyan-dim);
  padding: 0.1rem 0.55rem;
  border-radius: 6px;
}

.control-row { margin-bottom: 1.2rem; }

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--cyan) 0%, var(--cyan) var(--val, 12.5%), rgba(255,255,255,0.1) var(--val, 12.5%));
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  cursor: pointer;
}

.slider:hover::-webkit-slider-thumb,
.slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: scale(1.15);
}

/* Textarea */
.textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 120px;
}

.textarea::placeholder { color: var(--text-muted); }

.textarea:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.textarea--output {
  color: var(--text-code);
  background: rgba(0,212,255,0.03);
  border-color: rgba(0,212,255,0.12);
  cursor: default;
}

/* Input field */
.input-field {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

/* Select field */
.select-field {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238892a4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  transition: border-color var(--transition);
}

.select-field:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

/* Input with button */
.input-with-btn {
  display: flex;
  gap: 0.5rem;
}

.input-with-btn .input-field { flex: 1; }

/* ── Global checkbox reset — replaces native OS appearance ───── */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: background var(--transition), border-color var(--transition);
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-color: transparent;
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -65%) rotate(45deg);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ── Global Select ─────────────────────────────────────────── */
select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-2, #161b22);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d8590' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  border: 1px solid var(--border, #30363d);
  border-radius: var(--radius, 8px);
  color: var(--text-primary, #f0f6fc);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
select:hover {
  border-color: var(--border-hover, #484f58);
}
select:focus {
  outline: none;
  border-color: var(--cyan, #00d4ff);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}
select option {
  background-color: var(--surface-2, #161b22);
  color: var(--text-primary, #f0f6fc);
}

/* ── Global Range Slider ───────────────────────────────────── */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--cyan, #00d4ff) 0%,
    var(--cyan, #00d4ff) var(--val, 50%),
    var(--surface-3, #21262d) var(--val, 50%),
    var(--surface-3, #21262d) 100%
  );
  cursor: pointer;
  outline: none;
  border: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan, #00d4ff);
  border: 2px solid var(--bg, #0d1117);
  box-shadow: 0 0 0 2px var(--cyan, #00d4ff);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan, #00d4ff);
  border: 2px solid var(--bg, #0d1117);
  box-shadow: 0 0 0 2px var(--cyan, #00d4ff);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.25);
}
input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:focus::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.25);
}
input[type="range"]:focus {
  outline: none;
}

/* Options Grid (checkboxes) */
.options-grid {
  border: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}

.checkbox-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-indicator {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.checkbox-card input:checked + .checkbox-indicator {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-color: transparent;
}

.checkbox-card input:checked + .checkbox-indicator::after {
  content: '';
  width: 5px; height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-card input:focus-visible + .checkbox-indicator {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.checkbox-card input:checked ~ .checkbox-text { color: var(--text-primary); }

.checkbox-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.checkbox-text em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Radio cards */
.radio-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  user-select: none;
}

.radio-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

.radio-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.radio-indicator {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.radio-indicator::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  transition: opacity var(--transition);
}

.radio-card input:checked + .radio-indicator { border-color: var(--cyan); }
.radio-card input:checked + .radio-indicator::after { opacity: 1; }
.radio-card:has(input:checked) { background: var(--cyan-dim); border-color: rgba(0,212,255,0.3); color: var(--text-primary); }

/* ── Status Badges ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-badge--valid {
  background: rgba(16,217,126,0.1);
  border: 1px solid rgba(16,217,126,0.3);
  color: var(--green);
}

.status-badge--invalid {
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.3);
  color: var(--red);
}

/* ── Warning Banner ───────────────────────────────────────── */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: rgba(245, 197, 66, 0.07);
  border: 1px solid rgba(245, 197, 66, 0.25);
  border-radius: var(--radius-md);
  color: var(--yellow);
  font-size: 0.84rem;
  line-height: 1.55;
}

.warning-banner svg { flex-shrink: 0; margin-top: 1px; }
.warning-banner strong { font-weight: 700; }

/* ── Error Message ────────────────────────────────────────── */
.error-msg {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.error-msg::before { content: '⚠'; }

/* ── Toast Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 500;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.2rem;
  background: rgba(15, 20, 40, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  min-width: 220px;
  max-width: 340px;
}

.toast.toast--exit {
  animation: toastOut 0.25s ease forwards;
}

.toast--success {
  border-color: rgba(16, 217, 126, 0.35);
  background: rgba(16, 217, 126, 0.07);
}

.toast--success .toast-icon { color: var(--green); }

.toast--error {
  border-color: rgba(255, 77, 106, 0.35);
  background: rgba(255, 77, 106, 0.07);
}

.toast--error .toast-icon { color: var(--red); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  to   { opacity: 0; transform: translateX(20px) scale(0.92); }
}

/* ── Reveal Animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.18s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.34s; }

/* ── Misc Animations ──────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tool Split Layout ────────────────────────────────────── */
.tool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.tool-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tool-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.tool-col-header .control-label { margin-bottom: 0; }

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, #a78bfa 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .nav-mega { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 860px) {
  .nav-mega { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile[hidden] { display: none; }
  .nav-mobile:not([hidden]) { display: block; }

  .tool-split { grid-template-columns: 1fr; }
  .card { padding: 1.5rem 1.4rem; }
  .options-grid { grid-template-columns: 1fr; }
  .nav-mega { grid-template-columns: 1fr 1fr; padding: 1.2rem; }
  .mega-col { padding: 0.75rem; }
  #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { min-width: unset; max-width: unset; width: 100%; }
}

@media (max-width: 480px) {
  .nav-mega { grid-template-columns: 1fr; }
  .nav-container { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .card { padding: 1.2rem 1rem; }
}


/* ── pages/home.css ──────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════
   ALPHA TOOLKIT — pages/home.css
   Hero · Search · Hub Grid · Section Shared
   ═══════════════════════════════════════════════════════════ */

/* ── Section Styles ───────────────────────────────────────── */
.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section:nth-child(even) {
  background: linear-gradient(180deg, transparent 0%, rgba(124,58,237,0.03) 50%, transparent 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.97rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { max-width: 820px; width: 100%; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.22);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.8rem;
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: blinkDot 2s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.4rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.br-hide { display: block; }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.6rem 2.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.stat-divider {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

/* ── Search Bar ───────────────────────────────────────────── */
.hub-search-wrap {
  max-width: 500px;
  margin: 1.5rem auto 0;
  position: relative;
}

.hub-search {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hub-search::placeholder { color: var(--text-muted); }

.hub-search:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.hub-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.hub-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Hub Section ──────────────────────────────────────────── */
.hub-section { padding: 4rem 0 7rem; }

.hub-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hub-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.hub-subtitle {
  color: var(--text-muted);
  font-size: .95rem;
}

/* Category filter tabs */
.hub-filter {
  display: flex;
  justify-content: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.hub-filter-btn {
  padding: .35rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .79rem;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.hub-filter-btn:hover,
.hub-filter-btn.active {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.5);
  color: var(--cyan);
}

/* Tool card grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.15rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,.05), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.hub-card:hover {
  border-color: rgba(0,212,255,.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,212,255,.07);
}

.hub-card:hover::before { opacity: 1; }
.hub-card[hidden] { display: none; }

.hub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
}

.hub-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.15);
  color: var(--cyan);
  flex-shrink: 0;
}

.hub-card-cat {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .55rem;
  border-radius: 4px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.2);
  color: #a78bfa;
  white-space: nowrap;
}

.hub-card-title {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.hub-card-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 500;
  gap: .3rem;
  transition: color 200ms ease, gap 200ms ease;
}

.hub-card:hover .hub-card-footer {
  color: var(--cyan);
  gap: .5rem;
}

/* New badge for recently added tools */

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-stats { gap: 1.2rem; padding: 1.2rem 1.5rem; flex-wrap: wrap; }
  .br-hide { display: none; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 220px; }
}

@media (max-width: 600px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .section { padding: 4rem 0; }
  .hero-title { font-size: 2.2rem; }
  .section-title { font-size: 1.6rem; }
  .hero-stats { justify-content: space-around; }
}

@media (max-width: 360px) {
  .hub-grid { grid-template-columns: 1fr; }
}


/* ── pages/tool.css ──────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════
   ALPHA TOOLKIT — pages/tool.css
   Tool Page Layout · Footer · All Tool-Specific Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Tool Page Layout ─────────────────────────────────────── */
.tool-page-main { padding-top: 1rem; }
.tool-page-main .section:first-of-type { padding-top: 2.5rem; }

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.97rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 0 0;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: -1rem;
}

.tool-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.tool-breadcrumb a:hover { color: var(--cyan); }
.tool-breadcrumb-sep { opacity: .35; }

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, #a78bfa 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover { color: var(--cyan); }

.footer-nav--cols {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 0.5rem 2rem;
  align-items: start;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav-cat {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
  margin-left: auto;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.social-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.social-link--coffee {
  background: rgba(255, 186, 0, 0.07);
  border-color: rgba(255, 186, 0, 0.25);
  color: #ffc940;
}

.social-link--coffee:hover {
  background: rgba(255, 186, 0, 0.15);
  border-color: rgba(255, 186, 0, 0.45);
  color: #ffdd00;
  box-shadow: 0 4px 20px rgba(255, 186, 0, 0.2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.7;
}

/* ── Password Section ─────────────────────────────────────── */
.pwd-output-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  min-height: 58px;
}

.pwd-output {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.strength-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.strength-bars {
  display: flex;
  gap: 5px;
  flex: 1;
}

.strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  transition: background 0.4s ease;
}

.strength-bar.active-0 { background: var(--red); }
.strength-bar.active-1 { background: var(--yellow); }
.strength-bar.active-2 { background: #f59e0b; }
.strength-bar.active-3 { background: var(--green); }

.strength-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 70px;
  text-align: right;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.strength-label.s-weak    { color: var(--red); }
.strength-label.s-fair    { color: var(--yellow); }
.strength-label.s-good    { color: #f59e0b; }
.strength-label.s-strong  { color: var(--green); }

/* ── Hash Section ─────────────────────────────────────────── */
.hash-results {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.hash-card {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  transition: border-color var(--transition);
  animation: fadeSlideUp 0.35s ease forwards;
}

.hash-card:hover { border-color: rgba(0,212,255,0.2); }

.hash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.hash-algo {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hash-algo-badge {
  padding: 0.15rem 0.5rem;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
}

.hash-legacy-note {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--yellow);
  letter-spacing: 0;
  text-transform: none;
  background: rgba(245,197,66,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(245,197,66,0.2);
}

.hash-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-code);
  word-break: break-all;
  line-height: 1.7;
  user-select: all;
}

/* ── Base64 Section ───────────────────────────────────────── */
.b64-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}

.b64-col {
  display: flex;
  flex-direction: column;
}

.b64-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.b64-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.b64-output-header .control-label { margin-bottom: 0; }

/* ── UUID Section ─────────────────────────────────────────── */
.uuid-btn-row {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.uuid-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.uuid-list::-webkit-scrollbar { width: 4px; }
.uuid-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 4px; }
.uuid-list::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.25); border-radius: 4px; }

.uuid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition);
  animation: fadeSlideUp 0.25s ease forwards;
}

.uuid-item:hover {
  background: rgba(0,212,255,0.03);
  border-color: rgba(0,212,255,0.2);
}

.uuid-value {
  font-family: var(--font-mono);
  font-size: 0.87rem;
  color: var(--cyan);
  letter-spacing: 0.03em;
  user-select: all;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uuid-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 20px;
  flex-shrink: 0;
}

/* ── JWT Decoder ──────────────────────────────────────────── */
#jwtResults { margin-top: 1.4rem; }

.jwt-panel {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
  animation: fadeSlideUp 0.3s ease;
}

.jwt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.jwt-part-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jwt-part-label--header  { color: var(--cyan); }
.jwt-part-label--payload { color: #a78bfa; }
.jwt-part-label--sig     { color: var(--text-muted); }

.jwt-body {
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-code);
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.65;
}

.jwt-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.jwt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.jwt-badge--ok {
  background: rgba(16,217,126,0.1);
  border: 1px solid rgba(16,217,126,0.3);
  color: var(--green);
}

.jwt-badge--expired {
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.3);
  color: var(--red);
}

.jwt-badge--info {
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--cyan);
}

/* ── Regex Tester ─────────────────────────────────────────── */
.regex-pattern-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  transition: border-color var(--transition);
}

.regex-pattern-row:focus-within {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.regex-slash {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.regex-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.35rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--cyan);
  outline: none;
  min-width: 0;
}

.regex-flags {
  width: 72px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0.35rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--yellow);
  outline: none;
}

.regex-test-wrap { position: relative; margin-top: 0; }
.regex-test-wrap .textarea { position: relative; z-index: 2; background: transparent; }

.regex-highlight {
  position: absolute;
  inset: 0;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  pointer-events: none;
  z-index: 1;
  border-radius: var(--radius-md);
  color: transparent;
  overflow: hidden;
}

.regex-match {
  background: rgba(245,197,66,0.3);
  border-radius: 3px;
  color: transparent;
}

.regex-stats {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.65rem;
  background: rgba(245,197,66,0.12);
  border: 1px solid rgba(245,197,66,0.3);
  border-radius: 20px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 600;
}

.group-card {
  display: inline-flex;
  flex-direction: column;
  padding: 0.4rem 0.75rem;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--radius-sm);
  margin: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.group-label { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 2px; }
.group-value { color: var(--cyan); }

/* ── Timestamp Converter ──────────────────────────────────── */
.ts-now-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: rgba(0,212,255,0.04);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: var(--radius-md);
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ts-live {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
}

.ts-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.ts-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  align-self: stretch;
  margin-top: 2.5rem;
}

.ts-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.ts-unit-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}

.unit-btn {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.unit-btn.active { background: var(--cyan-dim); color: var(--cyan); }

.ts-result {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ts-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 0.5rem;
}

.ts-result-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.ts-result-val {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-code);
  text-align: right;
  flex: 1;
}

/* ── Case Converter ───────────────────────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.case-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  transition: border-color var(--transition);
  animation: fadeSlideUp 0.25s ease;
}

.case-card:hover { border-color: rgba(0,212,255,0.2); }

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.case-type-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
}

.case-value {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.5;
}

/* ── Markdown Previewer ───────────────────────────────────── */
.md-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.md-toolbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.md-toolbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  min-height: 420px;
}

.md-editor { height: 100%; min-height: 400px; resize: none; font-size: 0.88rem; }

.md-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  overflow-y: auto;
  line-height: 1.75;
  font-size: 0.92rem;
  color: var(--text-primary);
  min-height: 400px;
}

.md-preview h1 { font-size: 1.7rem; font-weight: 700; margin: 0.5rem 0 0.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.md-preview h2 { font-size: 1.3rem; font-weight: 700; margin: 1.2rem 0 0.6rem; }
.md-preview h3 { font-size: 1.05rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.md-preview h4,.md-preview h5,.md-preview h6 { font-size: 0.95rem; font-weight: 600; margin: 0.8rem 0 0.4rem; }
.md-preview p { margin: 0.6em 0; }
.md-preview strong { font-weight: 700; }
.md-preview em { font-style: italic; color: #c4b5fd; }
.md-preview a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.md-preview code { font-family: var(--font-mono); font-size: 0.85em; background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.15); border-radius: 4px; padding: 0.1em 0.4em; color: var(--text-code); }
.md-preview pre { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; overflow-x: auto; margin: 0.8rem 0; }
.md-preview pre code { background: none; border: none; padding: 0; font-size: 0.86rem; }
.md-preview blockquote { border-left: 3px solid var(--purple); margin: 0.8rem 0; padding: 0.5rem 1rem; color: var(--text-secondary); background: rgba(124,58,237,0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.md-preview ul,.md-preview ol { margin: 0.5rem 0 0.5rem 1.5rem; }
.md-preview li { margin: 0.25rem 0; }
.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.md-preview table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.88rem; }
.md-preview th { background: rgba(0,212,255,0.06); padding: 0.5rem 0.75rem; text-align: left; border: 1px solid var(--border); font-weight: 600; }
.md-preview td { padding: 0.45rem 0.75rem; border: 1px solid var(--border); }
.md-preview tr:hover td { background: rgba(255,255,255,0.02); }

/* ── QR Generator ─────────────────────────────────────────── */
.qr-layout { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: start; }
.qr-controls { min-width: 0; }
.qr-form-group { margin-bottom: 0.85rem; }
.qr-form-group label { display: block; margin-bottom: 0.45rem; }
.qr-opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.qr-opt .control-label { margin-bottom: 0.5rem; }
.qr-color-opt { display: flex; flex-direction: column; gap: 0.45rem; }
.qr-color-opt .control-label { margin-bottom: 0; }
.color-input { width: 42px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; cursor: pointer; padding: 2px; }
.qr-hint { margin-top: 0.85rem; font-size: 0.77rem; color: var(--text-muted); line-height: 1.55; }
.qr-preview-col { display: flex; flex-direction: column; align-items: center; gap: 1rem; flex-shrink: 0; }
.qr-canvas-wrap { width: 264px; height: 264px; background: rgba(0,0,0,0.4); border: 2px dashed rgba(255,255,255,0.1); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-color var(--transition); }
.qr-canvas-wrap:has(#qrOutput canvas) { border-style: solid; border-color: rgba(0,212,255,0.2); background: #fff; padding: 8px; }
.qr-placeholder { text-align: center; color: var(--text-muted); padding: 1rem; }
.qr-placeholder p { font-size: 0.82rem; margin-top: 0.65rem; }
#qrOutput canvas, #qrOutput img { display: block; width: 100% !important; height: auto !important; border-radius: 4px; }
.qr-actions { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }

/* ── QR Reader ────────────────────────────────────────────── */
.qr-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.65rem; padding: 3rem 2rem; background: rgba(0,0,0,0.3); border: 2px dashed rgba(255,255,255,0.12); border-radius: var(--radius-lg); cursor: pointer; text-align: center; transition: border-color var(--transition), background var(--transition); color: var(--text-secondary); }
.qr-dropzone:hover,.qr-dropzone:focus-visible { border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.04); color: var(--text-primary); outline: none; }
.qr-dropzone.drag-over { border-color: var(--cyan); background: rgba(0,212,255,0.08); }
.dropzone-title { font-size: 1rem; font-weight: 600; }
.dropzone-sub { font-size: 0.8rem; color: var(--text-muted); }
.qr-read-result { margin-top: 1.4rem; animation: fadeSlideUp 0.3s ease; }
.qr-read-value { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.1rem; background: rgba(16,217,126,0.05); border: 1px solid rgba(16,217,126,0.2); border-radius: var(--radius-md); margin-bottom: 0.75rem; }
.qr-read-text { font-family: var(--font-mono); font-size: 0.9rem; color: var(--green); word-break: break-all; line-height: 1.65; flex: 1; }
.qr-read-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.wifi-row { display: flex; gap: 0.5rem; padding: 0.3rem 0; }
.wifi-label { font-weight: 600; color: var(--text-secondary); min-width: 80px; }
.wifi-val { font-family: var(--font-mono); color: var(--cyan); }

/* ── Color Converter ──────────────────────────────────────── */
.color-layout { display: flex; gap: 2rem; align-items: flex-start; }
.color-swatch-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.color-swatch { width: 120px; height: 120px; border-radius: var(--radius-lg); border: 2px solid rgba(255,255,255,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.4); transition: background 0.15s ease; }
.color-picker-input { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; cursor: pointer; padding: 2px; }
.color-inputs-col { flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }
.color-input-group { display: flex; flex-direction: column; gap: 0.4rem; }
.color-fmt-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.color-input-row { display: flex; gap: 0.5rem; align-items: center; }
.color-input-row .input-field { flex: 1; }

/* ── Gradient Generator ───────────────────────────────────── */
.grad-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.grad-stops { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.grad-stop-row { display: flex; align-items: center; gap: 0.6rem; }
.grad-stop-row .color-input { flex-shrink: 0; }
.grad-stop-row .slider { flex: 1; }
.grad-pos-val { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); min-width: 34px; text-align: right; }
.grad-preview-col { display: flex; flex-direction: column; gap: 1rem; }
.grad-preview { width: 100%; height: 180px; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.35); transition: background 0.25s ease; background: linear-gradient(135deg, #00d4ff, #7c3aed); }
.grad-css-output { display: block; padding: 0.85rem 1rem; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-code); word-break: break-all; line-height: 1.6; cursor: text; user-select: all; min-height: 48px; }

/* ── Lorem Ipsum ──────────────────────────────────────────── */
.lorem-type-group { border: none; display: flex; gap: 0.65rem; flex-wrap: wrap; }
.lorem-output { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem 1.2rem; font-size: 0.92rem; line-height: 1.75; color: var(--text-secondary); min-height: 120px; white-space: pre-wrap; }

/* ── Text Diff ────────────────────────────────────────────── */
.diff-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.diff-summary { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0; padding: 0.75rem 1rem; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: var(--radius-md); }
.diff-stat { font-size: 0.82rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.diff-stat--add { color: var(--green); }
.diff-stat--del { color: var(--red); }
.diff-stat--same { color: var(--text-muted); }
.diff-output { margin-top: 0.85rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.65; }
.diff-line { display: flex; align-items: baseline; padding: 0.2rem 1rem; min-height: 26px; }
.diff-line--add { background: rgba(16,217,126,0.08); }
.diff-line--del { background: rgba(255,77,106,0.08); }
.diff-sign { min-width: 18px; font-weight: 700; flex-shrink: 0; margin-right: 0.5rem; }
.diff-line--add .diff-sign { color: var(--green); }
.diff-line--del .diff-sign { color: var(--red); }
.diff-line--same .diff-sign { color: var(--text-muted); }
.diff-text { word-break: break-all; white-space: pre-wrap; color: var(--text-secondary); }
.diff-line--add .diff-text { color: #a7f3d0; }
.diff-line--del .diff-text { color: #fca5a5; }

/* ── Responsive Tool Overrides ────────────────────────────── */
@media (max-width: 768px) {
  .ts-grid { grid-template-columns: 1fr; }
  .ts-divider { display: none; }
  .md-split { grid-template-columns: 1fr; }
  .md-editor,.md-preview { min-height: 280px; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview-col { align-items: flex-start; }
  .qr-canvas-wrap { width: 220px; height: 220px; }
  .grad-layout { grid-template-columns: 1fr; }
  .color-layout { flex-direction: column; }
  .color-swatch { width: 80px; height: 80px; }
  .diff-input-grid { grid-template-columns: 1fr; }
  .footer-nav--cols { grid-template-columns: repeat(3, auto); gap: 1.5rem 1.2rem; }
  .footer-inner { flex-direction: column; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-social { flex-direction: row; flex-wrap: wrap; }
  .b64-grid { grid-template-columns: 1fr; }
  .qr-opt-row { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .case-grid { grid-template-columns: 1fr; }
  .ts-now-bar { flex-direction: column; align-items: flex-start; }
  .footer-nav--cols { grid-template-columns: repeat(2, auto); }
}

/* ── Performance: content-visibility ─────────────────────── */
/* Skips rendering / layout for off-screen sections → fast LCP */
.section,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* Reduce paint cost: blur only on devices that handle it well  */
@media (prefers-reduced-motion: reduce),
       (max-width: 600px) {
  .card.glass,
  .navbar,
  .toast,
  .nav-mobile {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 14, 30, 0.97);
  }
}
/* ────────────────────────────────────────────────────────── */

/* ── CSS Aliases — new tools use Bootstrap-style class names ─
   Maps .form-control / .form-label / .btn-primary etc. to our
   design system so all 61 generated tools render correctly
   without modifying each HTML file individually.
   ─────────────────────────────────────────────────────────── */

/* Utility */
.font-mono { font-family: var(--font-mono) !important; }

/* Form controls */
.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
textarea.form-control { min-height: 120px; line-height: 1.65; }
.form-control[readonly] {
  color: var(--text-code);
  background: rgba(0,212,255,0.03);
  border-color: rgba(0,212,255,0.12);
  cursor: default;
}

/* Labels */
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Form group spacing */
.form-group { margin-bottom: 1.2rem; }

/* Button aliases: btn-primary → btn--primary */
.btn.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0099cc 100%);
  color: #000;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn.btn-primary:hover,
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(0,212,255,0.45);
  transform: translateY(-1px);
}

.btn.btn-secondary,
.btn-secondary {
  background: rgba(124,58,237,0.18);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}
.btn.btn-secondary:hover,
.btn-secondary:hover {
  background: rgba(124,58,237,0.28);
  border-color: rgba(124,58,237,0.55);
}

.btn.btn-ghost,
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}
.btn.btn-ghost:hover,
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

/* Result / output boxes */
.result-box {
  padding: 1rem 1.2rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.87rem;
  color: var(--text-code);
  word-break: break-all;
  line-height: 1.65;
  min-height: 48px;
}

/* Info / value row */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-weight: 500; }
.info-value { font-family: var(--font-mono); color: var(--cyan); }

/* btn-sm alias */
.btn.btn-sm,
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  min-height: unset;
  letter-spacing: 0.02em;
}

/* form-select alias (= .select-field) */
.form-select {
  width: 100%;
  padding: 0.65rem 2.4rem 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-select:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.form-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* drop-zone alias */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 3rem 2rem;
  background: rgba(0,0,0,0.3);
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.drop-zone:hover,
.drop-zone.drag-over,
.drop-zone.dragover {
  border-color: rgba(0,212,255,0.45);
  background: rgba(0,212,255,0.04);
  color: var(--text-primary);
}
.drop-zone svg,
.drop-zone i {
  opacity: 0.5;
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

/* text-muted alias */
.text-muted { color: var(--text-muted) !important; }

/* badge alias */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(0,212,255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.2);
}
.badge-success {
  background: rgba(16,217,126,0.12);
  color: var(--green);
  border-color: rgba(16,217,126,0.2);
}
.badge-warning {
  background: rgba(245,197,66,0.12);
  color: var(--yellow);
  border-color: rgba(245,197,66,0.2);
}
.badge-danger {
  background: rgba(255,77,106,0.12);
  color: var(--red);
  border-color: rgba(255,77,106,0.2);
}

/* alert alias */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  line-height: 1.55;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.alert-warning {
  background: rgba(245,197,66,0.07);
  border-color: rgba(245,197,66,0.25);
  color: var(--yellow);
}
.alert-success {
  background: rgba(16,217,126,0.07);
  border-color: rgba(16,217,126,0.25);
  color: var(--green);
}
.alert-danger {
  background: rgba(255,77,106,0.07);
  border-color: rgba(255,77,106,0.25);
  color: var(--red);
}
.alert-info {
  background: rgba(0,212,255,0.07);
  border-color: rgba(0,212,255,0.22);
  color: var(--cyan);
}

/* ────────────────────────────────────────────────────────── */

/* ── legacy styles (backward compat) ─────────────────────── */
/* ═══════════════════════════════════════════════════════════════
   Alpha Toolkit — Stylesheet Entry Point
   Imports all modular CSS files. This file exists for backward
   compatibility so that the 17 existing tool pages that reference
   "../style.css" continue to work without modification.
═══════════════════════════════════════════════════════════════ */

/* ── Legacy fallback: kept below so the @imports above take
   priority; all canonical styles now live in assets/css/ ── */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  --bg-base:       #05070f;
  --bg-surface:    #0b0f1e;
  --bg-elevated:   #111829;
  --bg-card:       rgba(15, 20, 40, 0.55);

  --cyan:          #00d4ff;
  --cyan-dim:      rgba(0, 212, 255, 0.15);
  --cyan-glow:     rgba(0, 212, 255, 0.35);
  --purple:        #7c3aed;
  --purple-dim:    rgba(124, 58, 237, 0.15);
  --purple-glow:   rgba(124, 58, 237, 0.35);
  --green:         #10d97e;
  --yellow:        #f5c542;
  --red:           #ff4d6a;

  --text-primary:  #e8efff;
  --text-secondary:#8892a4;
  --text-muted:    #4a5568;
  --text-code:     #a8d8ea;

  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(0, 212, 255, 0.3);

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow:   0 0 30px rgba(0, 212, 255, 0.18);

  --font-sans:     'Space Grotesk', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --nav-h:         68px;

  --transition:    0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 3. Screen-reader utility ─────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── 4. Background Effects ────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.32;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.bg-glow--1 {
  width: 680px; height: 680px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  top: -200px; right: -180px;
}

.bg-glow--2 {
  width: 540px; height: 540px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  bottom: 10%; left: -160px;
  animation-delay: -4s;
}

@keyframes glowPulse {
  from { opacity: 0.22; transform: scale(0.95); }
  to   { opacity: 0.40; transform: scale(1.05); }
}

/* ── 5. Navigation ────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.navbar.scrolled {
  background: rgba(5, 7, 15, 0.92);
  border-color: rgba(255,255,255,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 8px var(--cyan));
}

.brand-name {
  color: var(--text-primary);
}

.brand-accent {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.nav-toggle:hover { border-color: var(--border-hover); }

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: background var(--transition);
}

.nav-toggle:hover .hamburger-line { background: var(--text-primary); }

.nav-mobile {
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  background: rgba(5, 7, 15, 0.96);
}

.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }

.nav-mobile-link {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-mobile-link:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ── 6. Layout Utilities ──────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── 7. Hero Section ──────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { max-width: 820px; width: 100%; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.22);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.8rem;
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: blinkDot 2s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, #a78bfa 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.4rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.br-hide { display: block; }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.6rem 2.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.stat-divider {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

/* ── 8. Section Styles ────────────────────────────────────── */
.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section:nth-child(even) {
  background: linear-gradient(180deg, transparent 0%, rgba(124,58,237,0.03) 50%, transparent 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.97rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── 9. Cards & Glass ─────────────────────────────────────── */
.card {
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.4rem;
  position: relative;
  overflow: hidden;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.glass:hover {
  border-color: rgba(0,212,255,0.15);
  box-shadow: var(--shadow-card), 0 0 50px rgba(0,212,255,0.06);
}

/* ── 10. Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition:
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,212,255,0.28);
}

.btn--primary:hover {
  box-shadow: 0 6px 30px rgba(0,212,255,0.45);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(124,58,237,0.18);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.35);
}

.btn--secondary:hover {
  background: rgba(124,58,237,0.28);
  border-color: rgba(124,58,237,0.55);
}

.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.btn--coffee {
  background: linear-gradient(135deg, #ffdd00 0%, #ffa500 100%);
  color: #1a1200;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 186, 0, 0.3);
}

.btn--coffee:hover {
  box-shadow: 0 6px 30px rgba(255, 186, 0, 0.5);
  transform: translateY(-1px);
}

.btn--full { width: 100%; margin-top: 1.4rem; }

/* Icon Button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: rgba(0,212,255,0.35);
}

.icon-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── 11. Form Controls ────────────────────────────────────── */
.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.control-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0;
  text-transform: none;
  background: var(--cyan-dim);
  padding: 0.1rem 0.55rem;
  border-radius: 6px;
}

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--cyan) 0%, var(--cyan) var(--val, 12.5%), rgba(255,255,255,0.1) var(--val, 12.5%));
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  cursor: pointer;
}

.slider:hover::-webkit-slider-thumb,
.slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: scale(1.15);
}

/* Textarea */
.textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 120px;
}

.textarea::placeholder { color: var(--text-muted); }

.textarea:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.textarea--output {
  color: var(--text-code);
  background: rgba(0,212,255,0.03);
  border-color: rgba(0,212,255,0.12);
  cursor: default;
}

/* Options Grid (checkboxes) */
.options-grid {
  border: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}

.checkbox-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-indicator {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.checkbox-card input:checked + .checkbox-indicator {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-color: transparent;
}

.checkbox-card input:checked + .checkbox-indicator::after {
  content: '';
  width: 5px; height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-card input:focus-visible + .checkbox-indicator {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.checkbox-card input:checked ~ .checkbox-text { color: var(--text-primary); }

.checkbox-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.checkbox-text em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.control-row { margin-bottom: 1.2rem; }

/* ── 12. Password Section ─────────────────────────────────── */
.pwd-output-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  min-height: 58px;
}

.pwd-output {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* Strength Meter */
.strength-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.strength-bars {
  display: flex;
  gap: 5px;
  flex: 1;
}

.strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  transition: background 0.4s ease;
}

.strength-bar.active-0 { background: var(--red); }
.strength-bar.active-1 { background: var(--yellow); }
.strength-bar.active-2 { background: #f59e0b; }
.strength-bar.active-3 { background: var(--green); }

.strength-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 70px;
  text-align: right;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.strength-label.s-weak    { color: var(--red); }
.strength-label.s-fair    { color: var(--yellow); }
.strength-label.s-good    { color: #f59e0b; }
.strength-label.s-strong  { color: var(--green); }

/* ── 13. Hash Section ─────────────────────────────────────── */
.hash-results {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.hash-card {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  transition: border-color var(--transition);
  animation: fadeSlideUp 0.35s ease forwards;
}

.hash-card:hover { border-color: rgba(0,212,255,0.2); }

.hash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.hash-algo {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hash-algo-badge {
  padding: 0.15rem 0.5rem;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
}

.hash-legacy-note {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--yellow);
  letter-spacing: 0;
  text-transform: none;
  background: rgba(245,197,66,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(245,197,66,0.2);
}

.hash-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-code);
  word-break: break-all;
  line-height: 1.7;
  user-select: all;
}

/* ── 14. Base64 Section ───────────────────────────────────── */
.b64-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}

.b64-col {
  display: flex;
  flex-direction: column;
}

.b64-col .textarea {
  flex: 1;
}

.b64-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.b64-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.b64-output-header .control-label { margin-bottom: 0; }

.error-msg {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.error-msg::before { content: '⚠'; }

/* ── 15. UUID Section ─────────────────────────────────────── */
.uuid-controls {
  margin-bottom: 1.6rem;
}

.uuid-btn-row {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.uuid-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.uuid-list::-webkit-scrollbar { width: 4px; }
.uuid-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 4px; }
.uuid-list::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.25); border-radius: 4px; }

.uuid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition);
  animation: fadeSlideUp 0.25s ease forwards;
}

.uuid-item:hover {
  background: rgba(0,212,255,0.03);
  border-color: rgba(0,212,255,0.2);
}

.uuid-value {
  font-family: var(--font-mono);
  font-size: 0.87rem;
  color: var(--cyan);
  letter-spacing: 0.03em;
  user-select: all;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uuid-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 20px;
  flex-shrink: 0;
}

/* ── 16. Footer ───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover { color: var(--cyan); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
  margin-left: auto;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.social-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.social-link--coffee {
  background: rgba(255, 186, 0, 0.07);
  border-color: rgba(255, 186, 0, 0.25);
  color: #ffc940;
}

.social-link--coffee:hover {
  background: rgba(255, 186, 0, 0.15);
  border-color: rgba(255, 186, 0, 0.45);
  color: #ffdd00;
  box-shadow: 0 4px 20px rgba(255, 186, 0, 0.2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(var(--text-muted), 0.6);
  opacity: 0.7;
}

/* ── 17. Toast Notifications ──────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 500;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.2rem;
  background: rgba(15, 20, 40, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  min-width: 220px;
  max-width: 340px;
}

.toast.toast--exit {
  animation: toastOut 0.25s ease forwards;
}

.toast--success {
  border-color: rgba(16, 217, 126, 0.35);
  background: rgba(16, 217, 126, 0.07);
}

.toast--success .toast-icon { color: var(--green); }

.toast--error {
  border-color: rgba(255, 77, 106, 0.35);
  background: rgba(255, 77, 106, 0.07);
}

.toast--error .toast-icon { color: var(--red); }

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  to   { opacity: 0; transform: translateX(20px) scale(0.92); }
}

/* ── 18. Scroll Reveal Animations ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.18s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.34s; }

/* ── 19. Misc Animations ──────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 20. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile[hidden] { display: none; }
  .nav-mobile:not([hidden]) { display: block; }

  .hero-stats { gap: 1.2rem; padding: 1.2rem 1.5rem; flex-wrap: wrap; }
  .br-hide { display: none; }

  .b64-grid { grid-template-columns: 1fr; }

  .options-grid { grid-template-columns: 1fr; }

  .card { padding: 1.5rem 1.4rem; }

  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 220px; }

  .footer-inner { flex-direction: column; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-social { flex-direction: row; flex-wrap: wrap; }

  #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { min-width: unset; max-width: unset; width: 100%; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 0; }
  .hero-title { font-size: 2.2rem; }
  .section-title { font-size: 1.6rem; }
  .nav-container { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .card { padding: 1.2rem 1rem; }
  .hero-stats { justify-content: space-around; }
}

/* ── 21. Focus & Accessibility ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible { outline-radius: var(--radius-sm); }

/* ── 22. Selection ────────────────────────────────────────── */
::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}

/* ── 23. Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

/* ═══════════════════════════════════════════════════════════════
   EXTENDED — Alpha Toolkit v2 (new tools)
═══════════════════════════════════════════════════════════════ */

/* ── Z1. Utility helpers ──────────────────────────────────────── */
.inline-flex { display: inline-flex; align-items: center; }
.gap-6 { gap: 6px; }
.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── Z2. Mega nav dropdown ──────────────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown-btn svg {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-mega {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 200;
  background: rgba(8, 11, 24, 0.97);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  animation: megaIn 0.2s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.nav-mega[hidden] { display: none; }

@keyframes megaIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mega-col {
  padding: 0 0.85rem;
  border-right: 1px solid var(--border);
}

.mega-col:last-child { border-right: none; }

.mega-cat {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}

.mega-link {
  display: block;
  padding: 0.28rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition), padding-left var(--transition);
}

.mega-link:hover {
  color: var(--text-primary);
  padding-left: 5px;
  white-space: normal;
  overflow: visible;
}

.mega-link.active { color: var(--cyan); }

/* ── Z3. Mobile nav categories ──────────────────────────────── */
.mobile-cat-label {
  padding: 0.7rem 1rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.75;
}

/* ── Z4. Input field (text/number/datetime) ────────────────── */
.input-field {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

/* ── Z5. Select field ────────────────────────────────────────── */
.select-field {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238892a4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  transition: border-color var(--transition);
}

.select-field:focus {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

/* ── Z6. Tool split layout (generic two-col) ─────────────────── */
.tool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.tool-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tool-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.tool-col-header .control-label { margin-bottom: 0; }

/* ── Z7. Btn row ─────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ── Z8. Status badge ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-badge--valid {
  background: rgba(16,217,126,0.1);
  border: 1px solid rgba(16,217,126,0.3);
  color: var(--green);
}

.status-badge--invalid {
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.3);
  color: var(--red);
}

/* ── Z9. Warning banner ──────────────────────────────────────── */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: rgba(245, 197, 66, 0.07);
  border: 1px solid rgba(245, 197, 66, 0.25);
  border-radius: var(--radius-md);
  color: var(--yellow);
  font-size: 0.84rem;
  line-height: 1.55;
}

.warning-banner svg { flex-shrink: 0; margin-top: 1px; }

.warning-banner strong { font-weight: 700; }

/* ── Z10. JWT results ────────────────────────────────────────── */
#jwtResults { margin-top: 1.4rem; }

.jwt-panel {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
  animation: fadeSlideUp 0.3s ease;
}

.jwt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.jwt-part-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jwt-part-label--header  { color: var(--cyan); }
.jwt-part-label--payload { color: #a78bfa; }
.jwt-part-label--sig     { color: var(--text-muted); }

.jwt-body {
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-code);
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.65;
}

.jwt-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.jwt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.jwt-badge--ok {
  background: rgba(16,217,126,0.1);
  border: 1px solid rgba(16,217,126,0.3);
  color: var(--green);
}

.jwt-badge--expired {
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.3);
  color: var(--red);
}

.jwt-badge--info {
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--cyan);
}

/* ── Z11. Regex tester ───────────────────────────────────────── */
.regex-pattern-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  transition: border-color var(--transition);
}

.regex-pattern-row:focus-within {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.regex-slash {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
}

.regex-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.35rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--cyan);
  outline: none;
  min-width: 0;
  box-shadow: none;
}

.regex-flags {
  width: 72px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0.35rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--yellow);
  outline: none;
  box-shadow: none;
}

.regex-test-wrap {
  position: relative;
  margin-top: 0;
}

.regex-test-wrap .textarea { position: relative; z-index: 2; background: transparent; }

.regex-highlight {
  position: absolute;
  inset: 0;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  pointer-events: none;
  z-index: 1;
  border-radius: var(--radius-md);
  color: transparent;
  overflow: hidden;
}

.regex-match {
  background: rgba(245,197,66,0.3);
  border-radius: 3px;
  color: transparent;
}

.regex-stats {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.65rem;
  background: rgba(245,197,66,0.12);
  border: 1px solid rgba(245,197,66,0.3);
  border-radius: 20px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 600;
}

.regex-groups {
  margin-top: 0.75rem;
}

.group-card {
  display: inline-flex;
  flex-direction: column;
  padding: 0.4rem 0.75rem;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--radius-sm);
  margin: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.group-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.group-value { color: var(--cyan); }

/* ── Z12. Timestamp converter ────────────────────────────────── */
.ts-now-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: rgba(0,212,255,0.04);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: var(--radius-md);
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ts-live {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
}

.ts-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.ts-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  align-self: stretch;
  margin-top: 2.5rem;
}

.ts-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.input-with-btn {
  display: flex;
  gap: 0.5rem;
}

.input-with-btn .input-field { flex: 1; }

.ts-unit-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}

.unit-btn {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.unit-btn.active {
  background: var(--cyan-dim);
  color: var(--cyan);
}

.ts-result {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ts-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 0.5rem;
}

.ts-result-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.ts-result-val {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-code);
  text-align: right;
  flex: 1;
}

/* ── Z13. Case converter ─────────────────────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.case-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  transition: border-color var(--transition);
  animation: fadeSlideUp 0.25s ease;
}

.case-card:hover { border-color: rgba(0,212,255,0.2); }

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.case-type-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
}

.case-value {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.5;
}

/* ── Z14. Markdown split ─────────────────────────────────────── */
.md-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.md-toolbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.md-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  min-height: 420px;
}

.md-editor {
  height: 100%;
  min-height: 400px;
  resize: none;
  font-size: 0.88rem;
}

.md-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  overflow-y: auto;
  line-height: 1.75;
  font-size: 0.92rem;
  color: var(--text-primary);
  min-height: 400px;
}

/* Markdown preview content styles */
.md-preview h1 { font-size: 1.7rem; font-weight: 700; margin: 0.5rem 0 0.8rem; letter-spacing: -0.02em; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.md-preview h2 { font-size: 1.3rem; font-weight: 700; margin: 1.2rem 0 0.6rem; letter-spacing: -0.01em; }
.md-preview h3 { font-size: 1.05rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.md-preview h4, .md-preview h5, .md-preview h6 { font-size: 0.95rem; font-weight: 600; margin: 0.8rem 0 0.4rem; }
.md-preview p { margin: 0.6em 0; }
.md-preview strong { font-weight: 700; color: var(--text-primary); }
.md-preview em { font-style: italic; color: #c4b5fd; }
.md-preview a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.md-preview code { font-family: var(--font-mono); font-size: 0.85em; background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.15); border-radius: 4px; padding: 0.1em 0.4em; color: var(--text-code); }
.md-preview pre { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; overflow-x: auto; margin: 0.8rem 0; }
.md-preview pre code { background: none; border: none; padding: 0; font-size: 0.86rem; }
.md-preview blockquote { border-left: 3px solid var(--purple); margin: 0.8rem 0; padding: 0.5rem 1rem; color: var(--text-secondary); background: rgba(124,58,237,0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.md-preview ul, .md-preview ol { margin: 0.5rem 0 0.5rem 1.5rem; }
.md-preview li { margin: 0.25rem 0; }
.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.md-preview table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.88rem; }
.md-preview th { background: rgba(0,212,255,0.06); padding: 0.5rem 0.75rem; text-align: left; border: 1px solid var(--border); font-weight: 600; }
.md-preview td { padding: 0.45rem 0.75rem; border: 1px solid var(--border); }
.md-preview tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Z15. QR Generator ────────────────────────────────────────── */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

.qr-controls { min-width: 0; }

.qr-form-group { margin-bottom: 0.85rem; }
.qr-form-group label { display: block; margin-bottom: 0.45rem; }

.qr-options { margin-top: 1.2rem; }

.qr-opt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.qr-opt .control-label { margin-bottom: 0.5rem; }

.qr-color-opt { display: flex; flex-direction: column; gap: 0.45rem; }
.qr-color-opt .control-label { margin-bottom: 0; }

.color-input {
  width: 42px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 2px;
}

.qr-hint {
  margin-top: 0.85rem;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.qr-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.qr-canvas-wrap {
  width: 264px;
  height: 264px;
  background: rgba(0,0,0,0.4);
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--transition);
}

.qr-canvas-wrap:has(#qrOutput canvas) {
  border-style: solid;
  border-color: rgba(0,212,255,0.2);
  background: #fff;
  padding: 8px;
}

.qr-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.qr-placeholder p { font-size: 0.82rem; margin-top: 0.65rem; }

#qrOutput canvas, #qrOutput img {
  display: block;
  width: 100% !important;
  height: auto !important;
  border-radius: 4px;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.qr-actions.visible, .qr-actions:not([hidden]) {
  display: flex;
}

/* ── Z16. QR Reader dropzone ──────────────────────────────────── */
.qr-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 3rem 2rem;
  background: rgba(0,0,0,0.3);
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text-secondary);
}

.qr-dropzone:hover,
.qr-dropzone:focus-visible {
  border-color: rgba(0,212,255,0.4);
  background: rgba(0,212,255,0.04);
  color: var(--text-primary);
  outline: none;
}

.qr-dropzone.drag-over {
  border-color: var(--cyan);
  background: rgba(0,212,255,0.08);
}

.dropzone-title { font-size: 1rem; font-weight: 600; }
.dropzone-sub { font-size: 0.8rem; color: var(--text-muted); }

.qr-read-result {
  margin-top: 1.4rem;
  animation: fadeSlideUp 0.3s ease;
}

.qr-read-value {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(16,217,126,0.05);
  border: 1px solid rgba(16,217,126,0.2);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.qr-read-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--green);
  word-break: break-all;
  line-height: 1.65;
  flex: 1;
}

.qr-read-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.qr-wifi-details {
  padding: 0.85rem 1rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.wifi-row { display: flex; gap: 0.5rem; padding: 0.3rem 0; }
.wifi-label { font-weight: 600; color: var(--text-secondary); min-width: 80px; }
.wifi-val { font-family: var(--font-mono); color: var(--cyan); }

/* ── Z17. Color converter ──────────────────────────────────────── */
.color-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.color-swatch-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.color-swatch {
  width: 120px; height: 120px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: background 0.15s ease;
}

.color-picker-input {
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 2px;
}

.color-inputs-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.color-input-group { display: flex; flex-direction: column; gap: 0.4rem; }

.color-fmt-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.color-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-input-row .input-field { flex: 1; }

/* ── Z18. Gradient generator ──────────────────────────────────── */
.grad-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.grad-stops { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }

.grad-stop-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.grad-stop-row .color-input { flex-shrink: 0; }
.grad-stop-row .slider { flex: 1; }

.grad-pos-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  min-width: 34px;
  text-align: right;
}

.grad-preview-col { display: flex; flex-direction: column; gap: 1rem; }

.grad-preview {
  width: 100%; height: 180px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: background 0.25s ease;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
}

.grad-css-output {
  display: block;
  padding: 0.85rem 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-code);
  word-break: break-all;
  line-height: 1.6;
  cursor: text;
  user-select: all;
  min-height: 48px;
}

/* ── Z19. Lorem ipsum ─────────────────────────────────────────── */
.lorem-controls { margin-bottom: 1.4rem; }

.lorem-type-group {
  border: none;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  user-select: none;
}

.radio-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

.radio-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.radio-indicator {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.radio-indicator::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  transition: opacity var(--transition);
}

.radio-card input:checked + .radio-indicator { border-color: var(--cyan); }
.radio-card input:checked + .radio-indicator::after { opacity: 1; }
.radio-card:has(input:checked) { background: var(--cyan-dim); border-color: rgba(0,212,255,0.3); color: var(--text-primary); }

.lorem-output {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  min-height: 120px;
  white-space: pre-wrap;
}

/* ── Z20. Text diff ───────────────────────────────────────────── */
.diff-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.diff-summary {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.diff-stat {
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.diff-stat--add { color: var(--green); }
.diff-stat--del { color: var(--red); }
.diff-stat--same { color: var(--text-muted); }

.diff-output {
  margin-top: 0.85rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
}

.diff-line {
  display: flex;
  align-items: baseline;
  padding: 0.2rem 1rem;
  min-height: 26px;
}

.diff-line--add { background: rgba(16,217,126,0.08); }
.diff-line--del { background: rgba(255,77,106,0.08); }
.diff-line--same { background: transparent; }

.diff-sign {
  min-width: 18px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.diff-line--add .diff-sign { color: var(--green); }
.diff-line--del .diff-sign { color: var(--red); }
.diff-line--same .diff-sign { color: var(--text-muted); }

.diff-text {
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

.diff-line--add .diff-text { color: #a7f3d0; }
.diff-line--del .diff-text { color: #fca5a5; }

/* ── Z21. Footer nav columns ─────────────────────────────────── */
.footer-nav--cols {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 0.5rem 2rem;
  align-items: start;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav-cat {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* ── Z22. Responsive overrides for new tools ─────────────────── */
@media (max-width: 1200px) {
  .nav-mega { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 860px) {
  .nav-mega { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .tool-split { grid-template-columns: 1fr; }
  .ts-grid { grid-template-columns: 1fr; }
  .ts-divider { display: none; }
  .md-split { grid-template-columns: 1fr; }
  .md-editor, .md-preview { min-height: 280px; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview-col { align-items: flex-start; }
  .qr-canvas-wrap { width: 220px; height: 220px; }
  .grad-layout { grid-template-columns: 1fr; }
  .color-layout { flex-direction: column; }
  .color-swatch { width: 80px; height: 80px; }
  .diff-input-grid { grid-template-columns: 1fr; }
  .footer-nav--cols { grid-template-columns: repeat(3, auto); gap: 1.5rem 1.2rem; }
  .nav-mega { grid-template-columns: 1fr 1fr; padding: 1.2rem; }
  .mega-col { padding: 0.75rem; }
  .qr-opt-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-mega { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .ts-now-bar { flex-direction: column; align-items: flex-start; }
  .footer-nav--cols { grid-template-columns: repeat(2, auto); }
}


/* ══════════════════════════════════════════════════════════════
   HUB LANDING PAGE
══════════════════════════════════════════════════════════════ */
.hub-section { padding: 4rem 0 7rem; }

.hub-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hub-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.hub-subtitle {
  color: var(--text-muted);
  font-size: .95rem;
}

/* Category filter tabs */
.hub-filter {
  display: flex;
  justify-content: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.hub-filter-btn {
  padding: .35rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .79rem;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.hub-filter-btn:hover,
.hub-filter-btn.active {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.5);
  color: var(--cyan);
}

/* Tool card grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.15rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.3rem 1.4rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,.05), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.hub-card:hover {
  border-color: rgba(0,212,255,.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,212,255,.07);
}

.hub-card:hover::before { opacity: 1; }

.hub-card[hidden] { display: none; }

.hub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
}

.hub-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.15);
  color: var(--cyan);
  flex-shrink: 0;
}

.hub-card-cat {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .55rem;
  border-radius: 4px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.2);
  color: #a78bfa;
  white-space: nowrap;
}

.hub-card-title {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.hub-card-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 500;
  gap: .3rem;
  transition: color 200ms ease, gap 200ms ease;
}

.hub-card:hover .hub-card-footer {
  color: var(--cyan);
  gap: .5rem;
}

/* ══════════════════════════════════════════════════════════════
   INDIVIDUAL TOOL PAGES
══════════════════════════════════════════════════════════════ */
.tool-page-main { padding-top: 1rem; }

.tool-page-main .section:first-of-type { padding-top: 2.5rem; }

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 0 0;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: -1rem;
}

.tool-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.tool-breadcrumb a:hover { color: var(--cyan); }
.tool-breadcrumb-sep { opacity: .35; }

/* responsive hub grid */
@media (max-width: 600px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
  .hub-grid { grid-template-columns: 1fr; }
}
