/* ==========================================================================
   ToolNest - Geometric Balance Design Theme
   Stylesheet (style.css)
   Clean, modern, balanced layout with Slate neutrals & Blue accents
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables (Geometric Balance Palette)
   -------------------------------------------------------------------------- */
:root {
  /* Slate & Neutral Canvas */
  --bg-page: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;
  --bg-input-focus: #ffffff;

  /* Primary Blue Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.08);
  --primary-focus-ring: rgba(37, 99, 235, 0.25);

  /* Functional Accents */
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-rose: #ef4444;

  /* Typography & Borders (Slate Scales) */
  --text-main: #0f172a;       /* slate-900 */
  --text-body: #334155;       /* slate-700 */
  --text-secondary: #64748b;  /* slate-500 */
  --text-muted: #94a3b8;      /* slate-400 */
  --text-subtle: #cbd5e1;     /* slate-300 */
  
  --border-color: #f1f5f9;    /* slate-100 */
  --border-medium: #e2e8f0;   /* slate-200 */
  --border-hover: #93c5fd;    /* blue-300 */

  /* Geometry & Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --max-width: 1140px;

  /* Geometric Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(37, 99, 235, 0.06), 0 8px 10px -6px rgba(37, 99, 235, 0.04);
  
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   3. Containers & Typography Hierarchy
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-blue {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-green {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-purple {
  background-color: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

/* Geometric Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: #ffffff;
  border-color: var(--border-medium);
  color: var(--text-body);
}

.btn-outline:hover {
  background-color: var(--bg-card-subtle);
  border-color: var(--border-hover);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-xs);
}

/* --------------------------------------------------------------------------
   4. Header (Geometric Balance Nav)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background-color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--primary);
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.85rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* Search Box with Geometric Crispness */
.search-filter-box {
  max-width: 500px;
  margin: 0 auto 1.25rem;
  position: relative;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  font-size: 0.875rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.search-input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.category-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.cat-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Tools Grid Section (Geometric Balance Cards)
   -------------------------------------------------------------------------- */
.tools-grid-section {
  padding: 3.5rem 0 3rem;
  background-color: #ffffff;
}

.section-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.tools-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

/* Clean Geometric Tool Card */
.tool-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.tool-card:hover {
  background-color: #ffffff;
  border-color: var(--border-hover);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.tool-icon-wrapper {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.tool-card:hover .tool-icon-wrapper {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
  transform: scale(1.05);
}

.tool-card-body {
  margin-bottom: 1rem;
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.tool-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.tool-action-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.15s ease;
}

.tool-card:hover .tool-action-link {
  gap: 0.55rem;
}

.no-results-box {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: none;
}

/* --------------------------------------------------------------------------
   7. Functional Interactive Tools Workspace (Featured Box)
   -------------------------------------------------------------------------- */
.workspace-section {
  padding: 3.5rem 0 4.5rem;
  background-color: #fafbfc;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.workspace-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Tool Navigation Tabs */
.tool-nav-tabs-wrapper {
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.tool-nav-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  min-width: 100%;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.tab-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  font-weight: 700;
}

/* Featured Workbench Frame with Live Demo Geometric Pill */
.tool-workbench-card {
  background-color: #ffffff;
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: visible;
}

.tool-workbench-card::before {
  content: "LIVE WORKSPACE";
  position: absolute;
  top: -12px;
  right: 24px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.tool-panel {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.tool-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.workbench-topbar {
  padding: 1.25rem 1.75rem;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: calc(var(--radius-xl) - 2px);
  border-top-right-radius: calc(var(--radius-xl) - 2px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.workbench-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workbench-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workbench-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.workbench-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.workbench-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.workbench-body {
  padding: 1.75rem;
}

/* --------------------------------------------------------------------------
   8. Specific Tool Controls & Layout
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  font-size: 0.875rem;
  color: var(--text-main);
  transition: all 0.15s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.tool-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Word Counter Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.2rem;
  font-family: var(--font-mono);
}

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

/* Case Converter Buttons */
.case-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.case-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.case-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* Result Summary Card */
.result-summary-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}

.result-row:last-child {
  border-bottom: none;
  padding-top: 0.85rem;
}

.result-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.result-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.result-val-lg {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}

/* Sliders & Strength Meter */
.custom-progress {
  width: 100%;
  height: 6px;
  background-color: var(--border-medium);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.85rem 0;
  display: flex;
}

.progress-fill-primary {
  background-color: var(--primary);
  height: 100%;
}

.progress-fill-secondary {
  background-color: var(--accent-emerald);
  height: 100%;
}

.strength-meter {
  height: 5px;
  width: 100%;
  background-color: var(--border-medium);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.45rem;
}

.strength-bar {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
}

.strength-weak { background-color: var(--accent-rose); width: 25%; }
.strength-medium { background-color: var(--accent-amber); width: 50%; }
.strength-strong { background-color: #3b82f6; width: 75%; }
.strength-very-strong { background-color: var(--accent-emerald); width: 100%; }

.range-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.range-input {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.qr-preview-box {
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
}

#qrCanvas {
  background-color: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   9. Features / Why Choose ToolNest Section
   -------------------------------------------------------------------------- */
.features-section {
  padding: 4rem 0;
  background-color: #ffffff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  transition: all 0.2s ease;
}

.feature-item:hover {
  background-color: #ffffff;
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Footer & Modals
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  max-width: 300px;
  margin-top: 0.65rem;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

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

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: var(--text-main);
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.2s ease-out;
  pointer-events: auto;
}

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

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
}

.modal-close:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body h4 {
  color: var(--text-main);
  margin: 1rem 0 0.35rem;
  font-size: 0.9375rem;
}

.modal-body p {
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   11. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .tool-grid-2col {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
    box-shadow: var(--shadow-md);
  }
  .mobile-menu-btn {
    display: block;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .stats-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .workbench-body {
    padding: 1.25rem;
  }
}
