/* ============================================
   BRINK'S IA TOOLBOX V3
   Design System: "Vault Precision"
   ============================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
  /* Brand */
  --brand-navy: #063080;
  --brand-navy-deep: #041e52;
  --brand-navy-dark: #021236;
  --brand-navy-90: rgba(6, 48, 128, 0.9);
  --brand-navy-60: rgba(6, 48, 128, 0.6);
  --brand-navy-20: rgba(6, 48, 128, 0.2);
  --brand-navy-10: rgba(6, 48, 128, 0.1);
  --brand-navy-05: rgba(6, 48, 128, 0.05);
  --brand-orange: #F58025;
  --brand-orange-hot: #FF9540;
  --brand-orange-glow: rgba(245, 128, 37, 0.15);
  --brand-orange-faint: rgba(245, 128, 37, 0.08);

  /* Neutral */
  --white: #ffffff;
  --gray-50: #f8f9fb;
  --gray-100: #f0f2f6;
  --gray-200: #e2e6ed;
  --gray-300: #c8ced9;
  --gray-400: #9aa2b3;
  --gray-500: #6b7589;
  --gray-600: #4a5568;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --color-primary: var(--brand-navy);
  --color-accent: var(--brand-orange);
  --color-accent-hover: var(--brand-orange-hot);
  --color-bg: var(--white);
  --color-bg-alt: var(--gray-50);
  --color-bg-dark: var(--gray-100);
  --color-text: var(--gray-800);
  --color-text-light: var(--gray-500);
  --color-text-muted: var(--gray-400);
  --color-border: var(--gray-200);
  --color-border-light: var(--gray-100);
  --color-success: #059669;
  --color-error: #dc2626;
  --color-white: var(--white);

  /* Typography Scale */
  --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-4xl: 2.625rem;
  --text-5xl: 3.25rem;

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.06em;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  /* Shadows — layered for depth */
  --shadow-xs: 0 1px 2px rgba(6, 48, 128, 0.04);
  --shadow-sm: 0 1px 3px rgba(6, 48, 128, 0.06), 0 1px 2px rgba(6, 48, 128, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(6, 48, 128, 0.06), 0 2px 4px -1px rgba(6, 48, 128, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(6, 48, 128, 0.08), 0 4px 6px -2px rgba(6, 48, 128, 0.04);
  --shadow-xl: 0 20px 40px -10px rgba(6, 48, 128, 0.12), 0 8px 16px -4px rgba(6, 48, 128, 0.06);
  --shadow-2xl: 0 25px 60px -12px rgba(6, 48, 128, 0.18);
  --shadow-inner: inset 0 2px 4px rgba(6, 48, 128, 0.04);
  --shadow-glow-orange: 0 0 20px rgba(245, 128, 37, 0.25), 0 0 40px rgba(245, 128, 37, 0.1);
  --shadow-glow-blue: 0 0 20px rgba(6, 48, 128, 0.2), 0 0 40px rgba(6, 48, 128, 0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --header-height: 72px;
  --container-max: 1200px;
  --container-narrow: 800px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  padding-top: var(--header-height);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--gray-900);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-weight: var(--weight-semibold); }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

ul, ol { list-style: none; }

strong { font-weight: var(--weight-semibold); }

::selection {
  background: var(--brand-orange);
  color: var(--white);
}

/* Subtle noise texture overlay for sections */
.section--primary::before,
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.main-content {
  min-height: 100vh;
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(6, 48, 128, 0.06);
  transition: all var(--duration-normal) var(--ease-out);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(6, 48, 128, 0.06), var(--shadow-md);
}

.header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.header__logo img {
  height: 36px;
  width: auto;
  border-radius: var(--radius-sm);
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header__logo-title {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--brand-navy);
  letter-spacing: var(--tracking-tight);
}

.header__logo-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-600);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  position: relative;
}

.nav__link:hover {
  color: var(--brand-navy);
  background: var(--brand-navy-05);
}

.nav__link.active {
  color: var(--brand-navy);
  background: var(--brand-navy-10);
  font-weight: var(--weight-semibold);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

.nav-toggle:hover {
  background: var(--gray-100);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 1px;
  transition: all var(--duration-normal) var(--ease-out);
  transform-origin: center;
}

.nav-toggle.active .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- HERO --- */
.hero {
  position: relative;
  padding: var(--space-5xl) 0;
  background: linear-gradient(
    135deg,
    var(--brand-navy-dark) 0%,
    var(--brand-navy-deep) 30%,
    var(--brand-navy) 60%,
    #0a4296 100%
  );
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

/* Geometric accent — diagonal slice */
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
}

.hero h1 {
  color: var(--white);
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
  letter-spacing: -0.03em;
}

.hero__accent {
  color: var(--brand-orange);
  position: relative;
}

.hero__accent::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-orange);
  border-radius: 2px;
  opacity: 0.5;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: var(--leading-normal);
  position: relative;
  z-index: 1;
  font-weight: var(--weight-regular);
}

/* --- SECTIONS --- */
.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section--primary {
  background: linear-gradient(
    135deg,
    var(--brand-navy-deep) 0%,
    var(--brand-navy) 100%
  );
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.section--primary h2,
.section--primary h3,
.section--primary h4 {
  color: var(--white);
}

.section--alt {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

/* --- GRID SYSTEM --- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn:hover::before { opacity: 1; }

.btn--primary {
  background: var(--brand-navy);
  color: var(--white);
  border-color: var(--brand-navy);
}

.btn--primary:hover {
  background: var(--brand-navy-deep);
  border-color: var(--brand-navy-deep);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

.btn--accent {
  background: var(--brand-orange);
  color: var(--white);
  border-color: var(--brand-orange);
}

.btn--accent:hover {
  background: var(--brand-orange-hot);
  border-color: var(--brand-orange-hot);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-orange);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-navy);
  border-color: transparent;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.btn--ghost:hover {
  background: var(--brand-navy-05);
  color: var(--brand-navy);
}

.btn--sm {
  padding: 0.375rem 0.875rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--full {
  width: 100%;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* --- CARDS --- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.card:hover {
  border-color: var(--brand-navy-20);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-sm);
  color: var(--gray-900);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--leading-normal);
}

/* --- STATS --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.stat {
  padding: var(--space-lg) 0;
}

.stat__number {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: var(--brand-orange);
  line-height: 1;
  margin-bottom: var(--space-sm);
  letter-spacing: var(--tracking-tight);
}

.stat__label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* Non-primary context stats */
.section:not(.section--primary) .stat__label {
  color: var(--gray-500);
}

/* --- FILTERS --- */
.filters {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.filters__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-lg);
  color: var(--gray-900);
}

.filters__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filters__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.filters__select,
.filters__search {
  width: 100%;
  padding: 0.625rem 1rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--gray-800);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.filters__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236b7589' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}

.filters__select:focus,
.filters__search:focus {
  border-color: var(--brand-navy);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--brand-navy-10);
}

.filters__search::placeholder {
  color: var(--gray-400);
}

.filters__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-100);
}

.filters__count {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.filters__count strong {
  color: var(--brand-navy);
  font-weight: var(--weight-bold);
}

/* --- PROMPT CARDS --- */
.prompt-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.prompt-card:hover {
  border-color: var(--brand-navy-20);
  box-shadow: var(--shadow-lg);
}

.prompt-card__header {
  padding: var(--space-lg) var(--space-lg) 0;
}

.prompt-card__title {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  line-height: var(--leading-snug);
}

.prompt-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg) 0;
}

.prompt-card__tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-pill);
  letter-spacing: var(--tracking-wide);
}

.prompt-card__tag--population {
  background: var(--brand-navy-10);
  color: var(--brand-navy);
}

.prompt-card__tag--categorie {
  background: var(--brand-orange-faint);
  color: var(--brand-orange);
}

.prompt-card__objectif {
  padding: var(--space-sm) var(--space-lg) 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--leading-normal);
}

.prompt-card__content {
  margin: var(--space-md) var(--space-lg);
  padding: var(--space-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gray-700);
  line-height: var(--leading-normal);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  position: relative;
}

.prompt-card__content::-webkit-scrollbar {
  width: 6px;
}

.prompt-card__content::-webkit-scrollbar-track {
  background: transparent;
}

.prompt-card__content::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.prompt-card__content::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.prompt-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  margin-top: auto;
  border-top: 1px solid var(--gray-100);
}

.prompt-card__expand-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.prompt-card__expand-btn:hover {
  color: var(--brand-navy);
  background: var(--brand-navy-05);
}

.prompt-card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.prompt-card__details.visible {
  max-height: 500px;
}

.prompt-card__detail-section {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--gray-100);
}

.prompt-card__detail-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-xs);
}

.prompt-card__detail-text {
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: var(--leading-normal);
}

/* --- COPY BUTTON --- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.375rem 0.875rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--brand-navy);
  background: var(--brand-navy-05);
  border: 1px solid var(--brand-navy-10);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--brand-navy-10);
  border-color: var(--brand-navy-20);
  color: var(--brand-navy);
}

.copy-btn.copied {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.2);
  color: var(--color-success);
}

/* --- ACCORDION --- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.accordion__item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.accordion__item:hover {
  border-color: var(--gray-300);
}

.accordion__item.open {
  border-color: var(--brand-navy-20);
  box-shadow: var(--shadow-md);
}

.accordion__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: background var(--duration-fast) var(--ease-out);
}

.accordion__header:hover {
  background: var(--gray-50);
}

.accordion__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--gray-900);
}

.accordion__icon {
  font-size: var(--text-lg);
  color: var(--gray-400);
  font-weight: var(--weight-medium);
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.accordion__item.open .accordion__icon {
  transform: rotate(45deg);
  color: var(--brand-orange);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.accordion__item.open .accordion__content {
  max-height: 600px;
}

.accordion__body {
  padding: 0 var(--space-xl) var(--space-xl);
  color: var(--gray-600);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* --- HIGHLIGHT BOX --- */
.highlight-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--brand-navy);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
}

.highlight-box--accent {
  border-left-color: var(--brand-orange);
  background: var(--brand-orange-faint);
}

.highlight-box__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--brand-navy);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-sm);
}

.highlight-box--accent .highlight-box__title {
  color: var(--brand-orange);
}

/* --- TABLES --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead {
  background: var(--gray-50);
}

.table th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-bottom: 1px solid var(--gray-200);
}

.table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--brand-navy-05);
}

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-pill);
  letter-spacing: var(--tracking-wide);
  line-height: 1.6;
}

.badge--primary {
  background: var(--brand-navy-10);
  color: var(--brand-navy);
}

.badge--accent {
  background: var(--brand-orange-glow);
  color: var(--brand-orange);
}

/* --- CTA BANNER --- */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  padding: var(--space-2xl) var(--space-2xl);
  background: linear-gradient(135deg, var(--brand-navy-deep), var(--brand-navy));
  border-radius: var(--radius-xl);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Geometric decoration */
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 128, 37, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner__content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.cta-banner__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-sm);
}

.cta-banner__text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

.cta-banner .btn {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* --- FOOTER --- */
.footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer__brand-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--white);
}

.footer__brand-sub {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: var(--tracking-wide);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-lg);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--brand-orange);
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.3);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  text-align: center;
}

/* --- PASSWORD PAGE --- */
.password-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  background: linear-gradient(
    160deg,
    var(--brand-navy-dark) 0%,
    var(--brand-navy-deep) 40%,
    var(--brand-navy) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Background pattern for password page */
.password-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(245, 128, 37, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 128, 37, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.password-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-2xl);
  box-shadow: var(--shadow-2xl);
  text-align: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.password-box__logo {
  margin-bottom: var(--space-xl);
}

.password-box__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--brand-navy);
  margin-bottom: var(--space-sm);
}

.password-box__subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: var(--leading-normal);
}

.password-box__input-group {
  margin-bottom: var(--space-lg);
}

.password-box__input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--gray-800);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: center;
  letter-spacing: 0.1em;
}

.password-box__input:focus {
  border-color: var(--brand-navy);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--brand-navy-10);
}

.password-box__input.error {
  border-color: var(--color-error);
  animation: shake 0.4s var(--ease-out);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.password-box__error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--duration-fast) var(--ease-out);
}

.password-box__error.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --- UTILITY CLASSES --- */
.text-center { text-align: center; }
.text-light { color: var(--gray-500); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mt-md { margin-top: var(--space-md); }
.mt-2xl { margin-top: var(--space-2xl); }

.flex { display: flex; }
.flex--center { justify-content: center; align-items: center; }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* --- CONTENT BLOCK (for code examples) --- */
.content-block {
  position: relative;
}

/* --- ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .hero {
    padding: var(--space-3xl) 0 var(--space-4xl);
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stat__number {
    font-size: var(--text-2xl);
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xl);
    transform: translateY(-110%);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-out);
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
  }

  /* Filters responsive */
  .filters__grid {
    grid-template-columns: 1fr;
  }

  .filters__grid > .filters__group[style*="grid-column"] {
    grid-column: auto !important;
  }

  /* CTA Banner responsive */
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-xl);
    gap: var(--space-lg);
  }

  /* Prompt grid mobile */
  .grid.grid--2 {
    grid-template-columns: 1fr;
  }

  /* Footer responsive */
  .footer__links {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-2xl); }

  .hero h1 { font-size: var(--text-2xl); }
  .hero__subtitle { font-size: var(--text-base); }

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

  .password-box {
    padding: var(--space-xl);
  }
}

/* --- PRINT STYLES --- */
@media print {
  .header,
  .nav-toggle,
  .footer,
  .copy-btn,
  .btn { display: none !important; }

  body { padding-top: 0; }

  .hero {
    background: white !important;
    color: black !important;
    padding: 1rem 0 !important;
  }

  .hero h1,
  .hero__subtitle {
    color: black !important;
  }

  .section {
    padding: 1rem 0 !important;
    break-inside: avoid;
  }

  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}
