@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/inter/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/fonts/inter/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('/fonts/inter/Inter-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/inter/Inter-ExtraBold.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
}

:root {
  /* ─── Colors (Dark Theme) ─────────────────────────────── */
  --bg:           #0c0f14;
  --bg-elevated:  #12161e;
  --sidebar-bg:   #10141b;
  --card-bg:      rgba(18, 22, 30, 0.85);
  --input-bg:     rgba(255, 255, 255, 0.04);
  --hover-bg:     rgba(255, 255, 255, 0.06);
  --border:       rgba(255, 255, 255, 0.08);

  --text:         #e8ecf4;
  --text-muted:   #7b8498;

  --accent:       #10b981;
  --accent-dark:  #059669;
  --accent-glow:  rgba(16, 185, 129, 0.15);
  --accent-gradient: linear-gradient(135deg, #10b981, #06b6d4);
  --header-bg: rgba(12, 15, 20, 0.85);
  --section-bg: rgba(255, 255, 255, 0.04);

  /* ─── Typography ──────────────────────────────────────── */
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* ─── Layout ──────────────────────────────────────────── */
  --header-h:   64px;
}

:root[data-theme='light'] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --input-bg: rgba(15, 23, 42, 0.04);
  --hover-bg: rgba(15, 23, 42, 0.08);
  --border: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #047857;
  --accent-dark: #065f46;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-gradient: linear-gradient(135deg, #10b981, #06b6d4);
  --header-bg: rgba(255, 255, 255, 0.95);
  --section-bg: rgba(15, 23, 42, 0.04);
}

/* ─── Palette overrides ─────────────────────────────────── */

:root[data-palette='emerald'][data-theme='dark'] {
  --bg: #0b1313;
  --bg-elevated: rgba(4, 20, 15, 0.85);
  --sidebar-bg: #08110f;
  --card-bg: rgba(6, 19, 13, 0.75);
  --input-bg: rgba(16, 185, 129, 0.08);
  --hover-bg: rgba(16, 185, 129, 0.12);
  --border: rgba(16, 185, 129, 0.35);
  --text: #e9fcea;
  --text-muted: #9fdac4;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-gradient: linear-gradient(135deg, #10b981, #0ea5e9);
  --header-bg: rgba(12, 15, 20, 0.85);
}

:root[data-palette='emerald'][data-theme='light'] {
  --bg: #f6fbf9;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --input-bg: #ecf7f1;
  --hover-bg: #d5f0df;
  --border: rgba(4, 120, 87, 0.25);
  --text: #0b2c1f;
  --text-muted: #4a6b5c;
  --accent: #047857;
  --accent-dark: #065f46;
  --accent-glow: rgba(4, 120, 87, 0.2);
  --accent-gradient: linear-gradient(135deg, #047857, #0ea5e9);
  --header-bg: rgba(255, 255, 255, 0.95);
}

:root[data-palette='sunset'][data-theme='dark'] {
  --bg: #0f0505;
  --bg-elevated: rgba(15, 5, 5, 0.85);
  --sidebar-bg: #0c0404;
  --card-bg: rgba(19, 6, 6, 0.7);
  --input-bg: rgba(251, 113, 133, 0.08);
  --hover-bg: rgba(251, 113, 133, 0.14);
  --border: rgba(251, 113, 133, 0.35);
  --text: #ffe7e0;
  --text-muted: #f9a6aa;
  --accent: #fb7185;
  --accent-dark: #be123c;
  --accent-glow: rgba(251, 113, 133, 0.25);
  --accent-gradient: linear-gradient(135deg, #fb7185, #f97316);
  --header-bg: rgba(12, 8, 6, 0.85);
}

:root[data-palette='sunset'][data-theme='light'] {
  --bg: #fff8f2;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #fff4ef;
  --input-bg: #ffe3d8;
  --hover-bg: #ffd3bf;
  --border: rgba(249, 115, 22, 0.25);
  --text: #3d1b0b;
  --text-muted: #7a4a37;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --accent-gradient: linear-gradient(135deg, #f97316, #ec4899);
  --header-bg: rgba(255, 255, 255, 0.96);
}

:root[data-palette='ocean'][data-theme='dark'] {
  --bg: #030b12;
  --bg-elevated: rgba(2, 9, 20, 0.85);
  --sidebar-bg: #050c16;
  --card-bg: rgba(3, 13, 26, 0.75);
  --input-bg: rgba(14, 165, 233, 0.08);
  --hover-bg: rgba(14, 165, 233, 0.15);
  --border: rgba(14, 165, 233, 0.4);
  --text: #e6f6ff;
  --text-muted: #a1c4e8;
  --accent: #38bdf8;
  --accent-dark: #0369a1;
  --accent-glow: rgba(14, 165, 233, 0.35);
  --accent-gradient: linear-gradient(135deg, #38bdf8, #0f172a);
  --header-bg: rgba(6, 15, 30, 0.85);
}

:root[data-palette='ocean'][data-theme='light'] {
  --bg: #f4fbff;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #f0f7ff;
  --input-bg: #dcefff;
  --hover-bg: #cae8ff;
  --border: rgba(14, 165, 233, 0.25);
  --text: #06274e;
  --text-muted: #4d6993;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
  --accent-glow: rgba(14, 165, 233, 0.25);
  --accent-gradient: linear-gradient(135deg, #0ea5e9, #4753ff);
  --header-bg: rgba(255, 255, 255, 0.95);
}

:root[data-palette='orchid'][data-theme='dark'] {
  --bg: #0c0215;
  --bg-elevated: rgba(10, 3, 30, 0.85);
  --sidebar-bg: #090118;
  --card-bg: rgba(12, 2, 25, 0.75);
  --input-bg: rgba(168, 85, 247, 0.08);
  --hover-bg: rgba(168, 85, 247, 0.16);
  --border: rgba(168, 85, 247, 0.35);
  --text: #f5e6ff;
  --text-muted: #c5a3e8;
  --accent: #d946ef;
  --accent-dark: #831843;
  --accent-glow: rgba(217, 70, 239, 0.25);
  --accent-gradient: linear-gradient(135deg, #d946ef, #fb7185);
  --header-bg: rgba(13, 6, 23, 0.95);
}

:root[data-palette='orchid'][data-theme='light'] {
  --bg: #fdf6ff;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #fdf2ff;
  --input-bg: #f5e4ff;
  --hover-bg: #e9d4ff;
  --border: rgba(168, 85, 247, 0.25);
  --text: #2c0a3a;
  --text-muted: #6a5277;
  --accent: #a855f7;
  --accent-dark: #6d28d9;
  --accent-glow: rgba(168, 85, 247, 0.25);
  --accent-gradient: linear-gradient(135deg, #c084fc, #a855f7);
  --header-bg: rgba(255, 255, 255, 0.97);
}

:root[data-palette='citrus'][data-theme='dark'] {
  --bg: #1a1203;
  --bg-elevated: rgba(26, 18, 3, 0.9);
  --sidebar-bg: #130e02;
  --card-bg: rgba(26, 18, 3, 0.75);
  --input-bg: rgba(250, 204, 21, 0.08);
  --hover-bg: rgba(250, 204, 21, 0.14);
  --border: rgba(250, 204, 21, 0.35);
  --text: #fff8e7;
  --text-muted: #f6dea1;
  --accent: #fbbf24;
  --accent-dark: #b45309;
  --accent-glow: rgba(250, 204, 21, 0.25);
  --accent-gradient: linear-gradient(135deg, #fbbf24, #f97316);
  --header-bg: rgba(15, 9, 2, 0.9);
}

:root[data-palette='citrus'][data-theme='light'] {
  --bg: #fffdf5;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ffffff;
  --card-bg: #fffaf0;
  --input-bg: #fff4d8;
  --hover-bg: #ffeec1;
  --border: rgba(250, 204, 21, 0.25);
  --text: #2b2509;
  --text-muted: #6d5f2a;
  --accent: #facc15;
  --accent-dark: #b45309;
  --accent-glow: rgba(250, 204, 21, 0.2);
  --accent-gradient: linear-gradient(135deg, #facc15, #f97316);
  --header-bg: rgba(255, 255, 255, 0.98);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--accent-dark);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 500;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ─── Layout Shell ───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1025px) {
  .site-header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.site-logo .logo-accent {
  color: var(--accent);
}
.site-logo .logo-domain {
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.desktop-header-search {
  width: min(420px, 42vw);
}

.header-icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.header-icon-btn:hover {
  border-color: var(--accent);
}
.header-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.mobile-header-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}
.mobile-header-search[hidden] {
  display: none !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.floating-palette-controls {
  position: fixed;
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 200;
}
.palette-dots {
  display: flex;
  gap: 0.25rem;
  flex: 0 0 auto;
}
.palette-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  padding: 0;
  background-size: 160%;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: center;
}
.palette-dot:hover {
  transform: scale(1.05);
}
.palette-dot.active,
.palette-dot:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.palette-dot:focus-visible {
  outline: none;
}
.floating-palette-controls:not(:hover):not(:focus-within) .palette-dot:not(.active) {
  display: none;
}
@media (max-width: 520px) {
  .floating-palette-controls {
    gap: 0.2rem;
    padding: 0.18rem 0.35rem;
    right: 0.65rem;
  }
  .palette-dot {
    width: 26px;
    height: 26px;
  }
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.hamburger:hover {
  border-color: var(--accent);
}
.hamburger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.site-body {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  width: 100%;
  max-width: none;
  margin: 0;
  gap: clamp(1.25rem, 2vw, 2.5rem);
  padding: 0 clamp(1rem, 2vw, 2rem) 0 0;
  align-items: stretch;
}

.main-content {
  flex: 1;
  padding: clamp(1.5rem, 2vw, 3rem);
  width: 100%;
}
.main-content:focus {
  outline: none;
}

.site-footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ─── Page Utilities ─────────────────────────────────────── */

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}
.breadcrumbs li + li::before {
  content: '›';
  opacity: 0.4;
  margin-right: 0.4rem;
}
.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--accent);
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calculator-page-title {
  margin-bottom: 1.25rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

/* ─── Category Grid ──────────────────────────────────────── */

.category-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2.5rem);
}
.category-section__inner {
  width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.category-section .section-heading {
  text-align: center;
  margin: 0;
  width: 100%;
}
.category-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(132px, auto);
  gap: clamp(0.75rem, 1.3vw, 1.25rem);
}
.category-grid .category-card {
  width: 100%;
  height: 100%;
}

@media (min-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (min-width: 1280px) {
  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ─── Calculator List (category page) ────────────────────── */

.calc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  width: 100%;
  max-width: calc(4 * 360px + 3 * 0.75rem);
  margin: 0 auto;
  gap: 0.75rem;
}
.calc-list-item {
  display: block;
  position: relative;
  --calc-tooltip-left: 50%;
  --calc-tooltip-translate: -0.35rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.calc-list-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  color: var(--accent);
  z-index: 20;
}
.calc-list-item:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  z-index: 20;
}
.calc-list-tooltip {
  position: absolute;
  bottom: var(--calc-tooltip-bottom, calc(100% + 0.4rem));
  top: var(--calc-tooltip-top, auto);
  left: var(--calc-tooltip-left, 50%);
  background: color-mix(in srgb, var(--bg-elevated) 92%, black 8%);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(var(--calc-tooltip-translate, -0.35rem) + 0.15rem));
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  white-space: nowrap;
  z-index: 10;
}
.calc-list-item:hover .calc-list-tooltip,
.calc-list-item:focus-visible .calc-list-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, var(--calc-tooltip-translate, -0.35rem));
}

/* ─── Related Converters ─────────────────────────────────── */

.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.related-chip {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.related-chip:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}
.related-chip:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ─── SEO Content ────────────────────────────────────────── */

.seo-content {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.seo-content h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.seo-content p + p {
  margin-top: 1rem;
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}
.hero .search-center {
  display: flex;
  justify-content: center;
}

/* ─── Stats Row ──────────────────────────────────────────── */

.stats-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}
.stat {
  text-align: center;
}
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .hamburger {
    display: inline-flex;
  }
  .site-body {
    gap: 1rem;
    padding-inline: 1rem;
  }
}

@media (max-width: 960px) {
  .site-header {
    gap: 0.5rem;
  }
  .header-left,
  .header-right {
    min-width: 0;
  }
  .site-logo {
    flex: 1 1 auto;
  }
  .desktop-header-search {
    display: none;
  }
  .header-icon-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0 1rem;
  }
  .site-logo {
    font-size: 1rem;
    gap: 0.4rem;
  }
  .desktop-header-search {
    display: none;
  }
  .header-icon-btn {
    display: inline-flex;
  }
  .mobile-header-search {
    padding: 0.65rem 1rem;
  }
  .main-content {
    padding: 1.25rem;
  }
  .breadcrumbs {
    margin-bottom: 1rem;
  }
  .page-title {
    font-size: 1.5rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .category-section {
    padding: 1.25rem 1rem 2rem;
  }
  .category-section__inner {
    gap: 1rem;
    width: 100%;
  }
  .category-section .section-heading {
    margin-bottom: 0.75rem;
    text-align: center;
  }
  .category-grid {
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: clamp(0.7rem, 3vw, 1rem);
    justify-content: center;
  }
  .category-grid .category-card {
    flex: none;
    min-width: 0;
    max-width: none;
  }
  .stats-row {
    gap: 1.5rem;
  }
  .seo-content {
    padding: 1.25rem;
  }
  .site-body {
    gap: 1rem;
    padding-inline: 1rem;
  }
}
