/* diagrams.love Design System — shared across all pages */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300..700&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- VARIABLES with FALLBACKS ---- */
/* Fallbacks for older browsers that don't support CSS custom properties */
:root {
  /* Primary Colors */
  --ice: #f1f5fb;
  --blue: #1a6ddb;
  --blue-hover: #1558b8;
  --blue-light: #5b9cf5;
  --blue-shadow: rgba(26,109,219,0.3);
  --blue-glow: rgba(91,156,245,0.06);

  /* Text Colors */
  --text-dark: #0f1729;
  --text-muted: #6b7b8e;
  --text-subtle: #8a96a8;

  /* Glass Effects */
  --glass-bg: rgba(255,255,255,0.55);
  --glass-border: rgba(255,255,255,0.35);
  --glass-strong: rgba(255,255,255,0.7);

  /* Borders & Spacing */
  --border-light: rgba(91,156,245,0.08);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-btn: 10px;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #dc2626;

  /* Scale Factor */
  --scale: 1.12;

  /* Font Sizes */
  --fs-2xs:    calc(10px * var(--scale));
  --fs-xs:     calc(11px * var(--scale));
  --fs-sm:     calc(12px * var(--scale));
  --fs-base:   calc(13px * var(--scale));
  --fs-md:     calc(14px * var(--scale));
  --fs-lg:     calc(15px * var(--scale));
  --fs-xl:     calc(16px * var(--scale));
  --fs-2xl:    calc(18px * var(--scale));
  --fs-3xl:    calc(20px * var(--scale));
  --fs-4xl:    calc(24px * var(--scale));

  /* Icon Sizes */
  --icon-sm:   calc(16px * var(--scale));
  --icon-base: calc(20px * var(--scale));
  --icon-lg:   calc(24px * var(--scale));

  /* Button Heights */
  --btn-sm:    calc(32px * var(--scale));
  --btn-md:    calc(40px * var(--scale));
  --btn-lg:    calc(44px * var(--scale));
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Fallback for browsers without CSS variable support */
  color: #0f1729;
  color: var(--text-dark);
  line-height: 1.6;
  background: #f8f9fb;
  background: linear-gradient(160deg, #f8f9fb 0%, #fafbfc 50%, #f5f7f9 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Links with fallbacks */
a { color: #1a6ddb; color: var(--blue); text-decoration: none; }
a:hover { color: #1558b8; color: var(--blue-hover); }

/* ---- NAVBAR ---- */
.brand-nav {
  position: fixed; top: 12px; left: 24px; right: 24px; z-index: 9999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; border-radius: 14px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.14);
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}
.brand-nav.scrolled {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 4px 24px var(--blue-glow);
  border-color: rgba(255,255,255,0.22);
}
.brand-nav:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(91,156,245,0.04);
}

/* Nav logo */
.brand-nav .nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; color: #111;
  text-decoration: none; transition: opacity 0.2s;
}
.brand-nav .nav-logo:hover { opacity: 0.8; }
.brand-nav .nav-logo svg { flex-shrink: 0; }

/* Nav links */
.brand-nav .nav-links {
  display: flex; gap: 28px; font-size: 14px; font-weight: 500;
  list-style: none; margin: 0; padding: 0;
  flex: 1; /* Take available space to center the nav */
  justify-content: center; /* Center links when present */
}
/* When nav-links is empty, don't stretch */
.brand-nav .nav-links:empty {
  flex: 0;
}
.brand-nav .nav-links a {
  text-decoration: none; color: #555;
  transition: color 0.2s; position: relative;
}
.brand-nav .nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1.5px; background: var(--blue);
  transition: width 0.25s ease;
}
.brand-nav .nav-links a:hover::after { width: 100%; }
.brand-nav .nav-links a:hover { color: var(--blue); }

/* Nav CTA button */
.brand-nav .nav-cta {
  padding: 9px 22px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-btn); border: none; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  background: var(--blue); color: #fff;
  text-decoration: none;
  transition: all 0.22s ease;
}
.brand-nav .nav-cta:hover {
  background: var(--blue-hover); color: #fff;
  box-shadow: 0 4px 18px rgba(26,109,219,0.28);
  transform: translateY(-1px);
}

/* My Schemas button (for logged-in users) */
.brand-nav .nav-my-schemas {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(91,156,245,0.1);
  border: 1px solid rgba(91,156,245,0.2);
  border-radius: var(--radius-btn);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  transition: all 0.2s;
}
.brand-nav .nav-my-schemas:hover {
  background: rgba(91,156,245,0.15);
  border-color: rgba(91,156,245,0.3);
}
.brand-nav .nav-my-schemas svg {
  width: 14px;
  height: 14px;
}

/* Nav right group (CTA + lang) */
.brand-nav .nav-right {
  display: flex; align-items: center; gap: 12px;
}

/* Language switcher */
.brand-nav .lang-switcher { position: relative; }
.brand-nav .lang-current {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.5);
  cursor: pointer; font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 600; color: #4a5568;
  transition: all 0.2s;
}
.brand-nav .lang-current:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(91,156,245,0.2);
}
.brand-nav .lang-current svg { transition: transform 0.2s; }
.brand-nav .lang-switcher.open .lang-current svg { transform: rotate(180deg); }
.brand-nav .lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 120px; padding: 4px;
  border-radius: 10px; background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all 0.2s; z-index: 200;
}
.brand-nav .lang-switcher.open .lang-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.brand-nav .lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 12px; border-radius: 7px;
  border: none; background: transparent; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  color: #333; text-align: left; transition: all 0.15s;
}
.brand-nav .lang-option:hover {
  background: rgba(91,156,245,0.08); color: var(--blue);
}
.brand-nav .lang-option.active {
  background: rgba(91,156,245,0.12); color: var(--blue); font-weight: 600;
}

/* ---- NEW NAV COMPONENT v2.0 ---- */

/* Nav links with icons */
.brand-nav .nav-link {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; color: #555;
  font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px;
  transition: all 0.2s;
}
.brand-nav .nav-link:hover {
  color: var(--blue);
  background: rgba(26,109,219,0.06);
}
.brand-nav .nav-link svg {
  opacity: 0.7;
}
.brand-nav .nav-link:hover svg {
  opacity: 1;
}

/* Language switcher v2 */
.brand-nav .nav-lang-switcher {
  position: relative;
}
.brand-nav .nav-lang-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.5);
  cursor: pointer; font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 600; color: #4a5568;
  transition: all 0.2s;
}
.brand-nav .nav-lang-btn:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(91,156,245,0.2);
}
.brand-nav .nav-lang-btn svg {
  transition: transform 0.2s;
}
.brand-nav .nav-lang-switcher.open .nav-lang-btn svg {
  transform: rotate(180deg);
}
.brand-nav .nav-lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 120px; padding: 4px;
  border-radius: 10px; background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all 0.2s; z-index: 200;
}
.brand-nav .nav-lang-switcher.open .nav-lang-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.brand-nav .nav-lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border-radius: 7px;
  border: none; background: transparent; cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  color: #333; text-align: left; transition: all 0.15s;
}
.brand-nav .nav-lang-option:hover {
  background: rgba(91,156,245,0.08); color: var(--blue);
}
.brand-nav .nav-lang-option.active {
  background: rgba(91,156,245,0.12); color: var(--blue); font-weight: 600;
}

/* Profile avatar */
.brand-nav .nav-profile {
  position: relative;
}
.brand-nav .nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(26,109,219,0.2);
}
.brand-nav .nav-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(26,109,219,0.3);
}
.brand-nav .nav-avatar-initials {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
}

/* Profile dropdown */
.brand-nav .nav-profile-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px; padding: 8px;
  border-radius: 12px; background: rgba(255,255,255,0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.2s ease; z-index: 200;
}
.brand-nav .nav-profile.open .nav-profile-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.brand-nav .nav-profile-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
}
.brand-nav .nav-profile-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-nav .nav-profile-avatar span {
  color: #fff; font-size: 15px; font-weight: 600;
  font-family: 'Outfit', sans-serif;
}
.brand-nav .nav-profile-info {
  flex: 1; min-width: 0;
}
.brand-nav .nav-profile-email {
  font-size: 13px; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}

.brand-nav .nav-profile-divider {
  height: 1px;
  background: rgba(0,0,0,0.06);
  margin: 6px 0;
}

.brand-nav .nav-profile-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border-radius: 8px;
  border: none; background: transparent;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: #333;
  text-decoration: none;
  text-align: left;
  transition: all 0.15s;
}
.brand-nav .nav-profile-item:hover {
  background: rgba(91,156,245,0.08);
  color: var(--blue);
}
.brand-nav .nav-profile-item svg {
  opacity: 0.6;
}
.brand-nav .nav-profile-item:hover svg {
  opacity: 1;
}
.brand-nav .nav-profile-logout {
  color: #dc2626;
}
.brand-nav .nav-profile-logout:hover {
  background: rgba(220,38,38,0.08);
  color: #dc2626;
}
.brand-nav .nav-profile-logout svg {
  stroke: #dc2626;
}

/* Sign In link (separate from CTA) */
.brand-nav .nav-signin {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  border-radius: 8px;
  border: 1.5px solid rgba(26,109,219,0.3);
  color: var(--blue);
  background: transparent;
  text-decoration: none;
  transition: all 0.2s;
}
.brand-nav .nav-signin:hover {
  background: rgba(26,109,219,0.06);
  border-color: var(--blue);
  color: var(--blue);
}

/* Body padding for fixed nav */
.brand-page { padding-top: 80px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  font-family: 'Outfit', sans-serif;
  border: none; border-radius: 10px; cursor: pointer;
  transition: all 0.22s ease; text-decoration: none;
}
.btn-primary, .btn.primary {
  background: #1a6ddb; background: var(--blue); color: #fff;
}
.btn-primary:hover, .btn.primary:hover {
  background: #1558b8; background: var(--blue-hover); color: #fff;
  box-shadow: 0 6px 24px rgba(26,109,219,0.3); box-shadow: 0 6px 24px var(--blue-shadow);
  transform: translateY(-2px);
}
.btn-primary:active, .btn.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(26,109,219,0.2);
}

.btn-ghost, .btn.ghost {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  color: #4a5568;
  border: 1.5px solid rgba(255,255,255,0.15);
}
.btn-ghost:hover, .btn.ghost:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(91,156,245,0.25);
  color: var(--blue);
  box-shadow: 0 4px 16px rgba(91,156,245,0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent; color: #1a6ddb; color: var(--blue);
  border: 1.5px solid #1a6ddb; border-color: var(--blue);
}
.btn-outline:hover {
  background: #1a6ddb; background: var(--blue); color: #fff;
  box-shadow: 0 4px 16px rgba(26,109,219,0.3); box-shadow: 0 4px 16px var(--blue-shadow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 18px; font-size: 13px; border-radius: 8px;
}
.btn-lg {
  padding: 16px 36px; font-size: 16px; border-radius: 12px;
}

/* ---- GLASS CARDS ---- */
.glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.glass-strong {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(91,156,245,0.08), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ---- FORM ELEMENTS ---- */
.form-input {
  width: 100%; padding: 12px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  border: 1.5px solid rgba(91,156,245,0.15);
  border-radius: 12px; border-radius: var(--radius);
  background: rgba(255,255,255,0.6);
  color: #0f1729; color: var(--text-dark);
  transition: all 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: #1a6ddb; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,109,219,0.1);
  background: rgba(255,255,255,0.9);
}
.form-input::placeholder { color: #8a96a8; color: var(--text-subtle); }

.form-label {
  display: block; margin-bottom: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600;
  color: #0f1729; color: var(--text-dark);
}

textarea.form-input {
  resize: vertical; min-height: 120px;
}

/* ---- FOOTER ---- */
.brand-footer {
  max-width: 1060px; margin: 0 auto;
  padding: 60px 48px 40px;
  border-top: 1px solid var(--border-light);
}
.brand-footer .footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; flex-wrap: wrap;
}
.brand-footer .footer-brand {
  display: flex; flex-direction: column; gap: 12px;
}
.brand-footer .footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 600; color: #111;
  text-decoration: none; transition: opacity 0.2s;
  font-family: 'Outfit', sans-serif;
}
.brand-footer .footer-logo:hover { opacity: 0.8; }
.brand-footer .footer-tagline {
  font-size: 14px; color: var(--text-muted); max-width: 250px;
}
.brand-footer .footer-cols {
  display: flex; gap: 56px;
}
.brand-footer .footer-col h4 {
  font-size: 13px; font-weight: 600; color: var(--text-dark);
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}
.brand-footer .footer-col ul { list-style: none; padding: 0; margin: 0; }
.brand-footer .footer-col li { margin-bottom: 8px; }
.brand-footer .footer-col a {
  font-size: 14px; color: var(--text-muted); text-decoration: none;
  transition: color 0.2s;
}
.brand-footer .footer-col a:hover { color: var(--blue); }
.brand-footer .footer-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(91,156,245,0.06);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-subtle);
}

/* ---- SECTION HEADINGS ---- */
.section-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
  color: #0f1729; color: var(--text-dark); margin-bottom: 12px;
}
.section-sub {
  font-size: 16px; color: #6b7b8e; color: var(--text-muted); max-width: 560px;
}

/* ---- CHIP / BADGE ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--blue);
  padding: 6px 14px;
  background: rgba(26,109,219,0.06);
  border: 1px solid rgba(26,109,219,0.12);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ---- CODE BLOCKS ---- */
pre {
  background: #1a1a2e; color: #e2e8f0;
  padding: 20px 24px; border-radius: var(--radius);
  overflow-x: auto; font-size: 13px; line-height: 1.6;
}
p code, li code {
  background: rgba(26,109,219,0.06);
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.9em; color: var(--blue);
}

/* ---- ALERTS ---- */
.alert {
  padding: 16px 20px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.5;
}
.alert-info {
  background: rgba(26,109,219,0.06);
  border-left: 3px solid var(--blue);
  color: var(--text-dark);
}
.alert-warning {
  background: rgba(245,158,11,0.08);
  border-left: 3px solid #f59e0b;
  color: var(--text-dark);
}
.alert-success {
  background: rgba(16,185,129,0.08);
  border-left: 3px solid #10b981;
  color: var(--text-dark);
}

/* ---- TABLES ---- */
.brand-table {
  width: 100%; border-collapse: collapse;
}
.brand-table th {
  text-align: left; padding: 12px 16px;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-light);
}
.brand-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.brand-table tr:hover td {
  background: rgba(26,109,219,0.02);
}

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.text-muted { color: #6b7b8e; color: var(--text-muted); }
.text-subtle { color: #8a96a8; color: var(--text-subtle); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ---- HAMBURGER BUTTON ---- */
/* Hidden by default on desktop, shown on mobile/tablet via media query */
.brand-nav .nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid rgba(26,109,219,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.brand-nav .nav-hamburger:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(26,109,219,0.35);
}

.brand-nav .nav-hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Hamburger → X animation when open */
.brand-nav .nav-hamburger.open .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.brand-nav .nav-hamburger.open .nav-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.brand-nav .nav-hamburger.open .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- MOBILE MENU DRAWER ---- */
.brand-nav .nav-mobile-menu {
  display: none; /* Hidden on desktop */
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .brand-nav {
    left: 12px; right: 12px; padding: 10px 16px;
    flex-wrap: wrap;
    row-gap: 0;
  }
  .brand-nav .nav-links { display: none; }
  .brand-nav .lang-switcher { margin-left: 0; }

  /* Mobile header optimization (BUG-009) */
  .brand-nav .nav-right { gap: 8px; }

  /* Profile avatar visible on mobile */
  .brand-nav .nav-avatar { width: 30px; height: 30px; }
  .brand-nav .nav-avatar-initials { font-size: 11px; }

  /* Smaller language switcher */
  .brand-nav .nav-lang-btn {
    padding: 4px 8px;
    font-size: 11px;
    gap: 3px;
  }
  .brand-nav .nav-lang-code { font-size: 11px; }
  .brand-nav .nav-lang-btn svg { width: 8px; height: 8px; }

  /* Compact "My Diagrams" button - no icon, shorter text */
  .brand-nav .nav-my-schemas {
    padding: 6px 12px;
    font-size: 12px;
    gap: 0;
  }
  .brand-nav .nav-my-schemas svg { display: none; }

  /* BUG-029: Prevent nav-cta from overflowing at 375px */
  .brand-nav .nav-cta {
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* BUG-022: Show hamburger on tablet/mobile, hide Sign In + CTA from top bar */
  .brand-nav .nav-hamburger {
    display: flex;
  }
  .brand-nav .nav-signin,
  .brand-nav .nav-cta {
    display: none;
  }

  /* Mobile menu drawer */
  .brand-nav .nav-mobile-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(26,109,219,0.08);
    margin-top: 8px;
    gap: 2px;
  }
  .brand-nav .nav-mobile-menu.open {
    display: flex;
  }
  .brand-nav .nav-mobile-link {
    display: block;
    padding: 11px 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
  }
  .brand-nav .nav-mobile-link:hover {
    background: rgba(26,109,219,0.06);
    color: var(--blue);
  }
  .brand-nav .nav-mobile-signin {
    color: var(--blue);
    font-weight: 500;
    border: 1.5px solid rgba(26,109,219,0.25);
    text-align: center;
    margin-top: 4px;
  }
  .brand-nav .nav-mobile-signin:hover {
    background: rgba(26,109,219,0.06);
    border-color: var(--blue);
  }
  .brand-nav .nav-mobile-cta {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
    border-radius: 8px;
  }
  .brand-nav .nav-mobile-cta:hover {
    background: var(--blue-hover);
    color: #fff;
  }

  .brand-footer .footer-inner { flex-direction: column; }
  .brand-footer .footer-cols { flex-direction: column; gap: 24px; }
  .brand-footer .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .container, .container-sm, .container-md { padding: 0 16px; }
}

/* Extra small screens: further compress nav-cta if it somehow appears */
@media (max-width: 400px) {
  .brand-nav .nav-right { gap: 6px; }
}
