/* ============================================================
   ADI VRANCEAQUA v2 — "Accessible & Ethical" Design System
   UI/UX Pro Max: Government/Public Service, WCAG AAA
   ============================================================ */

/* === Self-hosted fonts ====================================================
   Google Fonts subsets `latin` + `latin-ext` per family. Two @font-face per
   family with matching unicode-range so the browser fetches whichever subset
   covers each character. `latin` includes â Â î Î (U+00E2, U+00C2, U+00EE,
   U+00CE); `latin-ext` includes ă Ă ș Ș ț Ț. Together they give complete
   Romanian coverage with no fallback flash on words like "Hotărâre". */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/public-sans-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/public-sans-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- 1. DESIGN TOKENS --- */
:root {
  /* Primary — institutional navy */
  --primary:       #0F172A;
  --primary-600:   #1E293B;
  --primary-500:   #334155;
  --primary-400:   #475569;

  /* Water — brand blues */
  --water:         #0284C7;
  --water-dark:    #0369A1;
  --water-light:   #38BDF8;
  --water-50:      #F0F9FF;

  /* Cyan accent */
  --cyan:          #06B6D4;
  --cyan-light:    #67E8F9;
  --cyan-50:       #ECFEFF;

  /* Institutional gold */
  --gold:          #B45309;
  --gold-light:    #D97706;
  --gold-50:       #FFFBEB;
  --gold-badge:    #F59E0B;

  /* Semantic */
  --success:       #059669;
  --success-bg:    #D1FAE5;
  --danger:        #DC2626;
  --danger-bg:     #FEE2E2;

  /* Surfaces */
  --bg:            #F8FAFC;
  --bg-alt:        #F1F5F9;
  --bg-card:       #FFFFFF;
  --white:         #FFFFFF;

  /* Borders */
  --border:        #E2E8F0;
  --border-light:  #F1F5F9;
  --border-focus:  #0284C7;

  /* Text — high contrast for WCAG AAA */
  --ink:           #020617;
  --text:          #0F172A;
  --text-mid:      #475569;
  --text-light:    #64748B;
  --text-on-dark:  #F8FAFC;

  /* Typography */
  --font-display: 'Newsreader', 'Georgia', serif;
  --font-body:    'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing — 4px/8px system */
  --sp-2xs: 0.125rem;
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Sizing */
  --container: 1200px;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows — subtle, layered */
  --shadow-xs:   0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm:   0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:   0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-lg:   0 10px 15px -3px rgba(15,23,42,0.06), 0 4px 6px -4px rgba(15,23,42,0.04);
  --shadow-xl:   0 20px 25px -5px rgba(15,23,42,0.08), 0 8px 10px -6px rgba(15,23,42,0.04);

  /* Transitions */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --duration: 200ms;
  --duration-slow: 300ms;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

a {
  color: var(--water);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--water-dark); }
a:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link — accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus {
  top: var(--sp-md);
  outline: 3px solid var(--water);
}

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.0625rem; }

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

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--water-dark);  /* #0369A1 on #F8FAFC = 5.1:1 — WCAG AA ✓ */
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
}
.label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--water-dark);
  border-radius: 1px;
}

.text-gold { color: var(--gold); }
.text-water { color: var(--water); }

/* --- 4. LAYOUT --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.section {
  padding: var(--sp-4xl) 0;
}
.section--alt {
  background: var(--bg-alt);
}

.grid {
  display: grid;
  gap: var(--sp-lg);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}

/* --- 5. HEADER --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration) var(--ease);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.logo:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 4px;
  border-radius: 4px;
}

.logo svg {
  width: 38px;
  height: 38px;
}

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

.logo-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 0.625rem;
  color: var(--text-mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Navigation */
.nav-main {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-main a {
  padding: var(--sp-sm) var(--sp-md);
  color: var(--text-mid);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
  position: relative;
  white-space: nowrap;
}
.nav-main a:hover {
  color: var(--text);
  background: var(--bg-alt);
}
.nav-main a:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: -1px;
}
.nav-main a.active {
  color: var(--water);
  font-weight: 600;
}
.nav-main a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--sp-md);
  right: var(--sp-md);
  height: 2px;
  background: var(--water);
  border-radius: 2px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: var(--sp-sm);
  color: var(--text);
  border-radius: var(--radius);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}
.menu-toggle:hover {
  background: var(--bg-alt);
  border-color: var(--text-light);
}
.menu-toggle:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* --- 6. HERO --- */
.hero {
  position: relative;
  background: var(--primary);
  overflow: hidden;
  padding: var(--sp-4xl) 0 var(--sp-3xl);
}
/* Geometric water pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 75% 30%, rgba(2,132,199,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 600px 500px at 20% 80%, rgba(6,182,212,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-contour {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px var(--sp-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: var(--cyan-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-xl);
  backdrop-filter: blur(8px);
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-light);
  animation: pulse-dot 2s ease infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  max-width: 680px;
  margin-bottom: var(--sp-lg);
  font-weight: 700;
  line-height: 1.15;
}
.hero h1 span {
  color: var(--water-light);
}

.hero-desc {
  color: rgba(255,255,255,0.7);
  font-size: 1.0625rem;
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: var(--sp-2xl);
}

.hero-stats {
  display: flex;
  gap: var(--sp-3xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Inner page hero */
.hero--inner {
  padding: var(--sp-3xl) 0 var(--sp-2xl);
}
.hero--inner h1 {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  margin-bottom: var(--sp-sm);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: rgba(255,255,255,0.45);
  font-size: 0.875rem;
}
.breadcrumb a {
  color: var(--water-light);
  font-weight: 500;
}
.breadcrumb a:hover { color: var(--white); }
.breadcrumb a:focus-visible {
  outline: 2px solid var(--water-light);
  outline-offset: 2px;
  border-radius: 2px;
}
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* --- 7. CARDS --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--sp-xl);
  transition: all var(--duration) var(--ease);
  position: relative;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
  background: var(--water-50);
  color: var(--water);
}

.card h3 {
  margin-bottom: var(--sp-sm);
}
.card p {
  color: var(--text-mid);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Card variants */
.card--info {
  border-left: 3px solid var(--water);
}
.card--info .card-icon {
  background: var(--water-50);
  color: var(--water);
}

.card--gold {
  border-left: 3px solid var(--gold-light);
}
.card--gold .card-icon {
  background: var(--gold-50);
  color: var(--gold);
}

.card--accent {
  border-left: 3px solid var(--cyan);
}

/* --- 8. DOCUMENT LINKS --- */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  color: var(--text);
  min-height: 52px;
}
.doc-item:hover {
  border-color: var(--water);
  background: var(--water-50);
  color: var(--text);
  transform: translateX(4px);
}
.doc-item:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: -1px;
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Contrast-compliant doc icons: ratio ≥ 4.5:1 at 40×40 */
.doc-icon--pdf { background: #FCA5A5; color: #7F1D1D; }  /* #7F1D1D on #FCA5A5 = 6.2:1 */
.doc-icon--doc { background: #BFDBFE; color: #1E3A8A; }  /* #1E3A8A on #BFDBFE = 6.1:1 */
.doc-icon--xls { background: #A7F3D0; color: #064E3B; }  /* #064E3B on #A7F3D0 = 6.8:1 */

.doc-title {
  flex: 1;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.doc-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.doc-arrow {
  color: var(--text-light);
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}
.doc-item:hover .doc-arrow {
  color: var(--water);
  transform: translateX(3px);
}

/* --- 9. YEAR SECTIONS (Hotarari) --- */
.year-nav {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.year-btn {
  padding: var(--sp-sm) var(--sp-md);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-500);  /* #334155 on #F8FAFC = 8.1:1 — WCAG AA ✓ */
  text-align: left;
  transition: all var(--duration) var(--ease);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.year-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
}
.year-btn:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: -1px;
}
.year-btn.active {
  color: var(--water-dark);  /* #0369A1 on #F0F9FF = 4.9:1 — WCAG AA ✓ */
  background: var(--water-50);
  border-color: rgba(3,105,161,0.2);
  font-weight: 700;
}

.year-section {
  margin-bottom: var(--sp-3xl);
  scroll-margin-top: 100px;
}

.year-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 2px solid var(--primary);
}
.year-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.year-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 100px;
}

.year-sub {
  margin-bottom: var(--sp-xl);
}
.year-sub-title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--water-dark);  /* #0369A1 on #F8FAFC = 5.1:1 — WCAG AA ✓ */
  margin-bottom: var(--sp-md);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.year-sub-title::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--water);
  flex-shrink: 0;
}

/* --- 10. MEMBER CARDS --- */
.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  text-align: center;
  transition: all var(--duration) var(--ease);
}
.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-md);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.member-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}
.member-role {
  font-size: 0.8125rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.member-role strong {
  display: block;
  color: var(--water-dark);  /* #0369A1 on #FFFFFF = 4.94:1 — WCAG AA ✓ */
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  font-weight: 700;
}

/* UAT grid */
.uat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-sm);
}
.uat-item {
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  transition: all var(--duration) var(--ease);
  min-height: 44px;
}
.uat-item:hover {
  border-color: var(--water);
  background: var(--water-50);
}

.uat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--water);
  flex-shrink: 0;
}
.uat-item--city .uat-dot {
  background: var(--gold-badge);
  width: 8px;
  height: 8px;
}

/* --- 11. CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-3xl);
  align-items: start;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-md);
  transition: all var(--duration) var(--ease);
}
.contact-info-card:hover {
  border-color: var(--water);
  box-shadow: var(--shadow-sm);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--water-50);
  color: var(--water);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-text h4 {
  font-size: 0.9375rem;
  margin-bottom: var(--sp-xs);
  font-family: var(--font-body);
  font-weight: 600;
}
.contact-info-text p {
  font-size: 0.875rem;
  color: var(--primary-500);  /* #334155 on #FFFFFF = 7.7:1 — WCAG AAA ✓ */
  margin: 0;
  line-height: 1.6;
}
.contact-info-text a {
  color: var(--water-dark);  /* #0369A1 on #FFFFFF = 4.94:1 — WCAG AA ✓ */
  font-weight: 500;
}

/* Form */
.form-group {
  margin-bottom: var(--sp-lg);
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: var(--sp-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  transition: all var(--duration) var(--ease);
  min-height: 44px;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--water);
  box-shadow: 0 0 0 3px rgba(2,132,199,0.15);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* Form error states */
.form-input--error,
.form-textarea--error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12) !important;
}
.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 4px;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 12px var(--sp-xl);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  min-height: 44px;
}
.btn:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--water-dark);  /* #0369A1 on white = 5.1:1 — WCAG AA ✓ */
  color: var(--white);
}
.btn--primary:hover {
  background: var(--water);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
}
.btn--gold:hover {
  background: var(--gold-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn--outline:hover {
  border-color: var(--water);
  color: var(--water);
  background: var(--water-50);
}

/* --- 12. FOOTER --- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--sp-3xl);
  margin-bottom: var(--sp-3xl);
}

.footer-brand .logo-name { font-size: 1.1rem; color: var(--white); }
.footer-brand .logo-sub { color: rgba(255,255,255,0.72); }  /* ≈ #B8C7D6 equiv, ≥ 4.5:1 on #0F172A */

.footer-desc {
  font-size: 0.875rem;
  margin-top: var(--sp-md);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);  /* ≥ 4.5:1 on #0F172A dark footer */
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--water-light);
  margin-bottom: var(--sp-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  transition: color var(--duration) var(--ease);
}
.footer-links a:hover { color: var(--water-light); }
.footer-links a:focus-visible {
  outline: 2px solid var(--water-light);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--sp-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

/* --- 13. ACCORDION --- */
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--duration) var(--ease);
  min-height: 52px;
  text-align: left;
}
.accordion-trigger:hover {
  border-color: var(--water);
  background: var(--water-50);
}
.accordion-trigger:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: -1px;
}
.accordion-trigger.open {
  border-color: var(--water);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--primary);
  color: var(--white);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--duration) var(--ease);
  flex-shrink: 0;
}
.accordion-trigger.open .accordion-icon {
  transform: rotate(180deg);
}
.accordion-trigger.open .accordion-icon path {
  stroke: var(--water-light);
}

.accordion-body {
  display: none;
  padding: var(--sp-lg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-card);
}
.accordion-body.open { display: block; }

/* --- 14. ANIMATIONS --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s 0s;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Staggered children */
/* Staggered children — ALWAYS visible by default. Animation overlays on .visible.*/
.stagger > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.stagger.visible > * {
  visibility: visible;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s 0s;
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.28s; }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- 15. SECTION DIVIDER --- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin: var(--sp-xl) 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-icon {
  color: var(--water);
  display: flex;
}

/* --- 16. SECTION INTRO --- */
.section-intro {
  max-width: 640px;
  margin-bottom: var(--sp-2xl);
}
.section-intro .label {
  margin-bottom: var(--sp-sm);
  display: block;
}
.section-intro h2 {
  margin-bottom: var(--sp-md);
}
.section-intro p {
  color: var(--primary-500);  /* #334155 on #F8FAFC = 8.1:1 — WCAG AAA ✓ */
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* --- 17. TWO COLUMN LAYOUT --- */
.layout-sidebar {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-3xl);
}

/* --- 18. TABLES --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
thead {
  background: var(--primary);
  color: var(--white);
}
th {
  padding: var(--sp-md) var(--sp-lg);
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
td {
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--border);
}
tbody tr:hover {
  background: var(--water-50);
}
tbody tr:last-child td {
  border-bottom: none;
}

/* --- 19. FORM STATUS --- */
.form-status {
  padding: var(--sp-md);
  margin-top: var(--sp-md);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
}
.form-status--success {
  background: var(--success-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.form-status--error {
  background: var(--danger-bg);
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* --- 20. RESPONSIVE --- */

/* Tablet landscape */
@media (max-width: 1024px) {
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
  .year-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-xs);
    margin-bottom: var(--sp-xl);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 20b. DRAWER BACKDROP (always rendered, hidden on desktop) --- */
.nav-backdrop {
  display: none;
}

/* --- 20c. FOCUS STATES — always visible, not just keyboard --- */
*:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 2px;
  border-radius: 2px;
}
.btn:focus-visible,
.card:focus-visible { outline-offset: 4px; }
a:focus-visible { outline-offset: 3px; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 0;
  border-color: var(--water);
}

/* --- 20d. TABLE SCROLL wrapper — horizontal scroll on narrow viewports --- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--text-mid) transparent;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--text-mid); border-radius: 3px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }

/* Tablet portrait + Mobile */
@media (max-width: 768px) {
  :root {
    --sp-4xl: 3rem;
    --sp-3xl: 2.5rem;
  }

  /* === Slide-in drawer nav === */
  .nav-main {
    /* Drawer: positioned off-screen to the right */
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    /* top padding reserves space above the toggle button */
    padding: calc(64px + var(--sp-lg)) var(--sp-lg) var(--sp-2xl);
    gap: var(--sp-xs);
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
    /* Smooth slide transition */
    transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    /* Respect reduced motion — overridden below */
    will-change: right;
  }
  .nav-main.is-open { right: 0; }

  /* Nav links in drawer */
  .nav-main a {
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--radius);
    font-size: 1.0625rem;
    color: var(--text);
    min-height: 48px;
    display: flex;
    align-items: center;
    width: 100%;
    transition: background var(--duration) var(--ease);
  }
  .nav-main a:hover,
  .nav-main a:focus-visible { background: var(--bg-alt); }
  .nav-main a.active,
  .nav-main a[aria-current="page"] {
    background: var(--water-50);
    color: var(--water);
    font-weight: 600;
  }
  .nav-main a.active::after { display: none; }

  /* Mobile toggle — always 44×44 */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  /* Body scroll lock */
  body.nav-locked { overflow: hidden; }

  /* === Backdrop === */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
    z-index: 99;
  }
  .nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Hero */
  .hero { padding: var(--sp-2xl) 0; }
  .hero h1 { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .hero--inner { padding: var(--sp-xl) 0; }
  .hero--inner h1 { font-size: clamp(1.375rem, 5vw, 1.875rem); }

  .hero-stats {
    gap: var(--sp-xl);
    flex-wrap: wrap;
  }
  .hero-stat-num { font-size: 2rem; }
  .hero-badge { font-size: 0.75rem; }

  /* Grid */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .uat-grid { grid-template-columns: 1fr 1fr; }

  /* Cards */
  .card { padding: var(--sp-lg); }
  .member-card { padding: var(--sp-lg); }

  /* Documents */
  .doc-item { padding: var(--sp-sm) var(--sp-md); }
  .doc-title { font-size: 0.875rem; }
  .doc-icon { width: 36px; height: 36px; font-size: 0.625rem; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-sm);
    text-align: center;
  }

  /* Section intro */
  .section-intro h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }

  /* Year nav */
  .year-header { flex-wrap: wrap; }
  .year-number { font-size: 1.5rem; }

  /* Table — always horizontal-scroll on mobile */
  .table-wrap, .table-scroll { font-size: 0.8125rem; }
  .table-scroll { margin-inline: calc(-1 * var(--sp-md)); padding-inline: var(--sp-md); }
  .table-scroll table { min-width: 560px; }
  th, td { padding: var(--sp-sm) var(--sp-md); }

  /* Member cards horizontal */
  .member-card[style*="display: flex"] {
    flex-direction: column;
    text-align: center;
  }
  .member-card[style*="display: flex"] .member-avatar {
    margin: 0 auto var(--sp-sm) !important;
  }

  /* Touch targets — minimum 44×44 */
  .btn,
  .nav-main a,
  .menu-toggle,
  button { min-height: 44px; }
}

/* Desktop — hide mobile-only elements */
@media (min-width: 769px) {
  .menu-toggle { display: none; }
  .nav-backdrop { display: none !important; }
  body.nav-locked { overflow: auto; }
}

/* Small mobile */
@media (max-width: 480px) {
  .container,
  .hero-content { padding: 0 var(--sp-md); }
  .header-inner { padding: 0 var(--sp-md); }

  .uat-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .hero-stats {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .breadcrumb { font-size: 0.8125rem; }
  .logo-name { font-size: 1.05rem; }
  .logo-sub { font-size: 0.5625rem; }
  .logo svg { width: 32px; height: 32px; }
}

/* --- 21. PRINT --- */
@media print {
  .site-header, .site-footer, .menu-toggle, .skip-link { display: none; }
  .hero { background: var(--primary) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .section { padding: var(--sp-lg) 0; }
  .card { break-inside: avoid; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* === Phase 3: Filter UI (hotarari) === */

.filter-bar {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.filter-bar__row {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar__search {
  flex: 1;
  min-width: 200px;
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.filter-bar__search:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-bar__sort {
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
}

.filter-bar__sort:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-bar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2xs) var(--sp-sm);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  background: var(--bg);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
  user-select: none;
  -webkit-user-select: none;
}

.chip:hover {
  border-color: var(--water);
  color: var(--water-dark);
}

.chip:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

.chip[aria-pressed="true"] {
  background: var(--water);
  border-color: var(--water-dark);
  color: var(--white);
}

.chip[aria-pressed="true"]:hover {
  background: var(--water-dark);
  border-color: var(--water-dark);
}

.filter-status {
  font-size: 0.875rem;
  color: var(--text-mid);
  min-height: 1.4em;
}

.filter-empty {
  text-align: center;
  color: var(--text-light);
  padding: var(--sp-xl) 0;
  font-style: italic;
}

.hotarari-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hotarari-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  color: var(--text);
}

.hotarari-table th {
  background: var(--primary);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  white-space: nowrap;
}

.hotarari-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

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

.hotarari-table tr:hover td {
  background: var(--bg-alt);
}

.hotarari-table .size-col {
  white-space: nowrap;
  color: var(--text-light);
  font-size: 0.8125rem;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  color: var(--water-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}

.doc-link:hover {
  color: var(--water);
  text-decoration: underline;
}

.doc-link:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125em 0.5em;
  border-radius: 9999px;
  background: var(--water-50);
  color: var(--water-dark);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.4;
  white-space: nowrap;
}

.badge--tip {
  background: var(--gold-50);
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Filter UI — mobile adjustments */
@media (max-width: 600px) {
  .filter-bar__search {
    min-width: unset;
    width: 100%;
  }

  .filter-bar__sort {
    width: 100%;
  }

  .hotarari-table th,
  .hotarari-table td {
    padding: var(--sp-xs) var(--sp-sm);
    font-size: 0.875rem;
  }

  .hotarari-table .size-col {
    display: none; /* hide size on very small screens */
  }
}

/* === Phase 4: Legal pages === */
.page-header { margin-bottom: var(--sp-2xl); }
.page-header h1 { font-size: 2.5rem; margin-bottom: var(--sp-sm); }
.page-header .lead { font-size: 1.125rem; color: var(--text-mid); }
.page-header .last-updated { font-size: 0.875rem; color: var(--text-mid); margin-top: var(--sp-md); font-style: italic; }
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.5rem; margin-top: var(--sp-2xl); margin-bottom: var(--sp-sm); }
.legal-content p, .legal-content li { line-height: 1.7; color: var(--text-mid); }
.legal-content ul, .legal-content ol { padding-left: var(--sp-lg); margin-bottom: var(--sp-md); }
.legal-content strong { color: var(--text); }
.legal-content a { color: var(--primary); text-decoration: underline; }

.cookies-table {
  width: 100%; border-collapse: collapse; margin: var(--sp-md) 0;
  font-size: 0.9375rem;
}
.cookies-table th, .cookies-table td {
  padding: var(--sp-sm); text-align: left;
  border-bottom: 1px solid var(--border);
}
.cookies-table th { background: var(--bg-alt); font-weight: 600; }
.cookies-table code {
  background: var(--bg-alt); padding: 0.1rem 0.3rem;
  border-radius: 3px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
}

/* === Phase 4: Cookie banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--primary-600);
  color: var(--text-on-dark);
  border-top: 2px solid var(--water);
  padding: var(--sp-md) var(--sp-xl);
  box-shadow: 0 -4px 24px rgba(15,23,42,0.18);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
}
.cookie-banner.cookie-banner--visible {
  transform: translateY(0);
}
.cookie-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}
.cookie-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(2,132,199,0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--water-light);
}
.cookie-banner__text {
  flex: 1;
  min-width: 200px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(248,250,252,0.9);
}
.cookie-banner__text a {
  color: var(--water-light);
  text-decoration: underline;
}
.cookie-banner__text a:hover {
  color: var(--cyan-light);
}
.cookie-banner__actions {
  display: flex;
  gap: var(--sp-sm);
  flex-shrink: 0;
}
.cookie-banner__btn-ok {
  padding: 10px var(--sp-xl);
  background: var(--water-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background var(--duration) var(--ease);
}
.cookie-banner__btn-ok:hover {
  background: var(--water-dark);
}
.cookie-banner__btn-ok:focus-visible {
  outline: 3px solid var(--cyan-light);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .cookie-banner { padding: var(--sp-md); }
  .cookie-banner__inner { gap: var(--sp-md); }
  .cookie-banner__icon { display: none; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__btn-ok { flex: 1; }
}

/* === Phase 5: Form hardening === */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.form-checkbox {
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--text-mid);
  margin: var(--sp-md) 0;
  cursor: pointer;
  line-height: 1.5;
}
.form-checkbox input {
  margin-top: 0.25rem;
  flex-shrink: 0;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
}
.form-checkbox a {
  color: var(--primary);
  text-decoration: underline;
}
.form-checkbox:hover input,
.form-checkbox input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* === Documente filter (Phase 7B) === */
.filter-bar.filter-bar--multi { flex-direction: column; align-items: stretch; }
.filter-row { display: flex; flex-wrap: wrap; gap: var(--sp-sm); align-items: center; }
.filter-row-label { font-size: 0.875rem; color: var(--text-mid); font-weight: 600; min-width: 80px; }

/* Tip-specific badge colours — document categories */
.badge--tip-document      { background: #DBEAFE; color: #1E3A8A; }
.badge--tip-contract      { background: #D1FAE5; color: #064E3B; }
.badge--tip-aglomerare    { background: #FEF3C7; color: #78350F; }
.badge--tip-convocator    { background: #EDE9FE; color: #3B0764; }
.badge--tip-proces-verbal { background: #FCE7F3; color: #831843; }
.badge--tip-formular      { background: #ECFEFF; color: #164E63; }
.badge--tip-statut        { background: #FEE2E2; color: #7F1D1D; }
.badge--tip-organigrama   { background: #F0FDF4; color: #14532D; }

@media (max-width: 600px) {
  .filter-row-label { min-width: 60px; font-size: 0.8125rem; }
}

/* === Phase 7C: Legal TOC sidebar + table contrast fix === */

/* Cookies table header contrast — was inheriting --text-mid faded; force --text */
.cookies-table th {
  color: var(--text);
  background: var(--bg-alt);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.cookies-table td {
  color: var(--text);
  font-size: 0.9375rem;
}

/* Legal layout: 2-col with sticky TOC on desktop, stacked on mobile */
.legal-layout {
  display: block;
  max-width: 1200px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: var(--sp-2xl);
    align-items: start;
  }
  .legal-layout .legal-content {
    max-width: 760px;
    grid-column: 1;
  }
  .legal-toc {
    grid-column: 2;
    position: sticky;
    top: calc(var(--sp-2xl) + 60px);
    align-self: start;
  }
}

@media (max-width: 1023px) {
  .legal-toc {
    margin-bottom: var(--sp-xl);
    padding: var(--sp-md) var(--sp-lg);
    background: var(--bg-alt);
    border-left: 3px solid var(--water);
    border-radius: 6px;
  }
}

.legal-toc nav {
  font-size: 0.9375rem;
}
.legal-toc__title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  margin: 0 0 var(--sp-md);
  padding-bottom: var(--sp-xs);
  border-bottom: 1px solid var(--border);
}
.legal-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}
.legal-toc__list li {
  counter-increment: toc;
}
.legal-toc__list a {
  display: block;
  padding: 0.4rem 0.6rem;
  color: var(--text-mid);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.legal-toc__list a:hover,
.legal-toc__list a:focus-visible {
  background: var(--bg-alt);
  color: var(--water-dark);
  border-left-color: var(--water);
}
.legal-toc__list a.is-active {
  color: var(--water-dark);
  background: var(--water-50);
  border-left-color: var(--water);
  font-weight: 600;
}

/* Anchor scroll-margin so sticky header doesn't cover h2 */
.legal-content h2 {
  scroll-margin-top: calc(var(--sp-xl) + 60px);
}

/* === Phase 7D: Mobile UX polish — filter pages === */

@media (max-width: 600px) {
  /* Filter bar — stack vertically, give each row full width */
  .filter-bar {
    padding: var(--sp-sm);
    gap: var(--sp-md);
  }
  .filter-bar.filter-bar--multi { gap: var(--sp-md); }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-xs);
  }
  .filter-row-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-mid);
    min-width: 0;
    padding-left: 0.25rem;
  }
  /* Chip strip — horizontal scroll if too many */
  .filter-row .chip-list,
  .filter-row > div:not(.filter-row-label) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
  }
  .chip {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 36px;
  }

  /* Search input + sort full width */
  .filter-bar input[type="search"],
  .filter-bar select {
    width: 100%;
    min-width: 0;
    font-size: 1rem; /* 16px prevents iOS zoom-on-focus */
  }

  /* Cards-instead-of-table layout on very small screens */
  .hotarari-table,
  .documente-table {
    display: block;
  }
  .hotarari-table thead,
  .documente-table thead { display: none; }
  .hotarari-table tbody,
  .documente-table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
  }
  .hotarari-table tr,
  .documente-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem var(--sp-sm);
    padding: var(--sp-md);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  }
  .hotarari-table td,
  .documente-table td {
    padding: 0;
    border: none;
    font-size: 0.9375rem;
  }
  .hotarari-table .col-data,
  .documente-table .col-data {
    grid-row: 1;
    grid-column: 1;
    font-size: 0.75rem;
    color: var(--text-mid);
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .hotarari-table .col-tip,
  .documente-table .col-tip {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
  }
  .hotarari-table .col-titlu,
  .documente-table .col-titlu {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 1rem;
    line-height: 1.4;
  }
  .hotarari-table .col-titlu a,
  .documente-table .col-titlu a {
    color: var(--water-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(2,132,199,0.3);
    text-underline-offset: 3px;
  }
  .hotarari-table .col-marime,
  .documente-table .col-marime {
    grid-row: 3;
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--text-mid);
  }
  .table-scroll {
    overflow-x: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .table-scroll table { min-width: 0; }

  /* Filter status pill */
  .filter-status {
    font-size: 0.8125rem;
    padding: var(--sp-xs) var(--sp-sm);
    background: var(--bg-alt);
    border-radius: 999px;
    display: inline-block;
    margin-bottom: var(--sp-sm);
  }

  /* Hero on filter pages — tighter */
  .hero--inner .hero-content { padding-block: var(--sp-xl) var(--sp-md); }
  .hero--inner h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .breadcrumb { font-size: 0.875rem; }
}

/* iOS — prevent zoom on input focus when font < 16px */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; }
}

/* === Phase 7E: Anexe inline pe hotărâri === */
.doc-anexe {
  margin-top: var(--sp-xs);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  padding-left: var(--sp-md);
}
.doc-anexa-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: var(--bg-alt);
  color: var(--water-dark);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.doc-anexa-link:hover, .doc-anexa-link:focus-visible {
  background: var(--water-50);
  border-color: var(--water);
}
.doc-icon--anexa {
  font-size: 0.875rem;
}

/* === Phase 7F: AGA session grouping === */

/* AGA session block within a year */
.aga-session {
  margin-bottom: var(--sp-2xl);
}

.aga-session + .aga-session {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-xl);
}

/* AGA session label (date heading) */
.aga-label {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-500);
  margin: 0 0 var(--sp-md) 0;
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--border-light);
}

.aga-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--water);
  border-radius: 2px;
  flex-shrink: 0;
}

/* List of items within an AGA session */
.aga-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual hotărâre row */
.hotarare-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease);
}

.hotarare-row:hover {
  background: var(--bg-alt);
}

.hotarare-row .doc-link {
  flex: 1;
  min-width: 0;
}

.hotarare-row .doc-link span.doc-icon--pdf {
  flex-shrink: 0;
}

.hotarare-row .hot-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  align-self: center;
}

.hotarare-row .doc-anexe {
  padding-left: 0;
  margin-top: 4px;
}

/* Generic AGA label for sessions without a specific date */
.aga-label--generic {
  color: var(--text-mid);
  font-style: italic;
}

/* Mobile: stack meta below title */
@media (max-width: 600px) {
  .hotarare-row {
    flex-wrap: wrap;
  }
  .hotarare-row .hot-meta {
    width: 100%;
    padding-left: calc(var(--sp-xs) + 1.5rem); /* align with text after icon */
  }
}

/* === Documente: category groups (reuse AGA-session aesthetics) === */

.doc-groups {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.doc-group {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg) var(--sp-xl);
}

.doc-group__header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-sm);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary-500);
  margin: 0 0 var(--sp-md) 0;
  padding-bottom: var(--sp-xs);
  border-bottom: 1px solid var(--border-light);
}

.doc-group__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 2px 8px;
}

.doc-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease);
}

.doc-row:hover {
  background: var(--bg-alt);
}

.doc-row .doc-link {
  flex: 1;
  min-width: 0;
}

.doc-year {
  font-size: 0.75rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .doc-group {
    padding: var(--sp-md) var(--sp-lg);
  }
  .doc-row {
    flex-wrap: wrap;
  }
  .doc-year {
    width: 100%;
    padding-left: calc(var(--sp-xs) + 1.5rem);
  }
}

/* === Phase 7G: variant badges === */

.variant-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-left: var(--sp-xs);
  white-space: nowrap;
  align-self: center;
}

.variant-badge--proiect {
  background: #FEF3C7;
  color: #92400E;
}

.variant-badge--bis {
  background: #DBEAFE;
  color: #1E3A8A;
}

