/* ============================================================
   hiConstitution.com — Main Stylesheet
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --saffron:      #FF6B00;
  --saffron-light:#FF8C38;
  --navy:         #1a237e;
  --navy-dark:    #0d1257;
  --navy-light:   #283593;
  --white:        #FFFFFF;
  --bg-light:     #F8F9FA;
  --bg-subtle:    #EFF1F5;
  --dark-text:    #1a1a2e;
  --body-text:    #3d3d5c;
  --muted:        #6b7280;
  --green:        #2e7d32;
  --green-light:  #43a047;
  --red:          #c62828;
  --border:       #e2e6ea;
  --border-light: #f0f2f5;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
  --shadow-xl:    0 16px 48px rgba(0,0,0,0.18);

  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --transition:   0.25s ease;
  --transition-fast: 0.15s ease;

  --navbar-h:     68px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { color: var(--body-text); }

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 48px 0; }

.text-saffron { color: var(--saffron); }
.text-navy { color: var(--navy); }
.text-green { color: var(--green); }
.text-muted { color: var(--muted); }

.bg-navy { background: var(--navy); }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--white); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-saffron { background: #FFF3E8; color: var(--saffron); }
.badge-navy    { background: #E8EAFF; color: var(--navy); }
.badge-green   { background: #E8F5E9; color: var(--green); }
.badge-red     { background: #FFEBEE; color: var(--red); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--saffron);
  color: var(--white);
  border-color: var(--saffron);
}
.btn-primary:hover {
  background: #e55e00;
  border-color: #e55e00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,0,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.98);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark-text);
}
.logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--saffron);
  font-size: 1rem;
  font-weight: 900;
  font-style: italic;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.logo-text { color: var(--dark-text); }
.logo-text span { color: var(--saffron); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--body-text);
  transition: all var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--navy);
  background: var(--bg-subtle);
}
.nav-link.active { font-weight: 600; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--body-text);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}
.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--navy);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--dark-text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--navbar-h); left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { padding: 12px 16px; font-size: 1rem; }

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1e2d8a 100%);
  display: flex;
  align-items: center;
  padding-top: var(--navbar-h);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,0,0.18);
  border: 1px solid rgba(255,107,0,0.35);
  color: var(--saffron-light);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-badge::before { content: '🇮🇳'; font-size: 1em; }

.hero-headline {
  color: var(--white);
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-headline span { color: var(--saffron); }

.hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero Article 21 card */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.art21-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 400px;
  width: 100%;
  position: relative;
}
.art21-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 30px; right: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), transparent);
  border-radius: 0 0 3px 3px;
}
.art21-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--saffron);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.art21-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,107,0,0.3);
}
.art21-number {
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255,255,255,0.08);
  line-height: 1;
  margin-bottom: -20px;
  letter-spacing: -0.04em;
}
.art21-title {
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.art21-quote {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  line-height: 1.75;
  font-style: italic;
  border-left: 3px solid var(--saffron);
  padding-left: 16px;
  margin-bottom: 20px;
}
.art21-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,107,0,0.2);
  color: var(--saffron-light);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { color: var(--dark-text); margin-bottom: 12px; }
.section-header p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 10px;
}

/* ── Timeline ── */
.timeline-section { background: var(--bg-light); overflow: hidden; }
.timeline-scroll-wrap {
  overflow-x: auto;
  padding: 20px 0 40px;
  cursor: grab;
}
.timeline-scroll-wrap:active { cursor: grabbing; }
.timeline-track {
  display: flex;
  gap: 0;
  min-width: max-content;
  padding: 0 60px;
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
}
.timeline-dot-wrap {
  position: relative;
  z-index: 1;
}
.timeline-dot {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--muted);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.timeline-item:hover .timeline-dot,
.timeline-item.active .timeline-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(26,35,126,0.3);
  transform: scale(1.1);
}
.timeline-item.active .timeline-dot {
  background: var(--saffron);
  border-color: var(--saffron);
  box-shadow: 0 4px 16px rgba(255,107,0,0.35);
}
.timeline-year {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark-text);
}
.timeline-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  max-width: 120px;
}
.timeline-details-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin: 16px 60px 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.timeline-details-panel.open {
  max-height: 300px;
  opacity: 1;
}
.timeline-details-inner {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.timeline-details-year {
  font-size: 3rem;
  font-weight: 900;
  color: var(--bg-subtle);
  line-height: 1;
  letter-spacing: -0.04em;
  min-width: 100px;
  color: var(--saffron);
  opacity: 0.3;
}
.timeline-details-content h3 { color: var(--dark-text); margin-bottom: 8px; }
.timeline-details-content p { color: var(--body-text); font-size: 0.95rem; line-height: 1.7; }

/* ── Article of the Day ── */
.aotd-section { background: var(--white); }
.aotd-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.aotd-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.aotd-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 200px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,107,0,0.08);
}
.aotd-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.aotd-meta .badge { font-size: 0.7rem; }
.aotd-date { color: rgba(255,255,255,0.5); font-size: 0.82rem; }
.aotd-title { color: var(--white); font-size: 1.6rem; margin-bottom: 16px; }
.aotd-snippet { color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 28px; max-width: 600px; }
.aotd-number {
  font-size: 7rem;
  font-weight: 900;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* ── Feature Cards ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  display: block;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}
.feature-card:nth-child(1) .feature-icon { background: #FFF3E8; }
.feature-card:nth-child(2) .feature-icon { background: #E8EAFF; }
.feature-card:nth-child(3) .feature-icon { background: #E8F5E9; }
.feature-card:nth-child(4) .feature-icon { background: #FCE4EC; }
.feature-card:nth-child(5) .feature-icon { background: #FFF8D8; }
.feature-card:nth-child(6) .feature-icon { background: #EAF7F3; }
.feature-card h3 { color: var(--dark-text); margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }
.feature-card-static .feature-link { color: var(--muted); }
.feature-link {
  color: var(--saffron);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--transition-fast);
}
.feature-card:hover .feature-link { gap: 10px; }

/* ── Cards (general) ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

/* ── Library Page ── */
.library-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding-top: calc(var(--navbar-h) + 32px);
  padding-bottom: 64px;
  min-height: 100vh;
}

.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: calc(var(--navbar-h) + 16px);
  max-height: calc(100vh - var(--navbar-h) - 32px);
  overflow-y: auto;
}
.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.part-filter-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}
.part-filter-item:hover { background: var(--bg-subtle); }
.part-filter-item.active {
  background: #E8EAFF;
  color: var(--navy);
}
.part-filter-item input[type="checkbox"] {
  accent-color: var(--navy);
  margin-top: 3px;
  flex-shrink: 0;
}
.part-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--body-text);
  line-height: 1.4;
}
.part-filter-item.active .part-name { color: var(--navy); font-weight: 600; }

/* Library main area */
.library-main {}
.library-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.search-box svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--dark-text);
  background: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}
.search-input::placeholder { color: var(--muted); }

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  padding: 6px 8px;
  border-radius: var(--radius-md);
  white-space: nowrap;
}
.toggle-label { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 99px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--navy); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Article cards grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26,35,126,0.15);
}
.article-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.article-number {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--saffron);
  letter-spacing: 0.06em;
  background: #FFF3E8;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.article-part-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.article-title {
  color: var(--dark-text);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.article-preview {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.article-preview.simplified { color: var(--body-text); }
.article-card .btn { align-self: flex-start; margin-top: auto; }

/* no results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.no-results h3 { margin-bottom: 8px; color: var(--body-text); }

/* ── Library Article Page ── */
.article-page {
  padding-top: var(--navbar-h);
  min-height: 100vh;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0 80px;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.article-breadcrumb a { color: var(--navy); }
.article-breadcrumb a:hover { text-decoration: underline; }

.article-header { margin-bottom: 32px; }
.article-header .article-number {
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.article-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--dark-text);
  margin-bottom: 8px;
}
.article-header .part-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: 28px;
}
.view-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}
.view-tab.active {
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.article-body { line-height: 1.8; color: var(--body-text); }
.article-body p { margin-bottom: 16px; }
.article-body .clause {
  border-left: 3px solid var(--bg-subtle);
  padding: 12px 16px;
  margin: 12px 0;
  background: var(--bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body .clause:hover { border-left-color: var(--navy); }

/* Vocab sidebar */
.vocab-sidebar {
  height: fit-content;
  position: sticky;
  top: calc(var(--navbar-h) + 16px);
}
.vocab-sidebar-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.vocab-sidebar-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.vocab-term {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.vocab-term:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.vocab-word {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.vocab-def { font-size: 0.83rem; color: var(--muted); line-height: 1.5; }

/* Article nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.article-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
  max-width: 45%;
}
.article-nav-btn:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
  background: var(--bg-light);
}
.article-nav-btn.next { margin-left: auto; text-align: right; flex-direction: row-reverse; }
.article-nav-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.article-nav-title { font-size: 0.88rem; font-weight: 600; color: var(--dark-text); }

/* Tooltip */
.vocab-highlight {
  border-bottom: 2px dashed var(--navy);
  color: var(--navy);
  cursor: help;
  position: relative;
}
.vocab-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-text);
  color: var(--white);
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 220px;
  line-height: 1.5;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  text-align: left;
}
.vocab-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--dark-text);
}
.vocab-highlight:hover .vocab-tooltip { opacity: 1; }

/* ── Study Page ── */
.study-page { padding-top: var(--navbar-h); min-height: 100vh; }
.study-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 48px 0;
  text-align: center;
  color: var(--white);
}
.study-header h1 { color: var(--white); margin-bottom: 10px; }
.study-header p { color: rgba(255,255,255,0.72); max-width: 500px; margin: 0 auto; }

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 40px;
  overflow-x: auto;
}
.tab-btn {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Notes */
.notes-category { margin-bottom: 40px; }
.notes-category-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notes-category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.note-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.note-card:hover { box-shadow: var(--shadow-sm); }
.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.note-title { font-weight: 600; color: var(--dark-text); font-size: 0.95rem; }
.note-chevron {
  color: var(--muted);
  transition: transform var(--transition);
  font-size: 0.85rem;
}
.note-card.open .note-chevron { transform: rotate(180deg); }
.note-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.note-card.open .note-body { max-height: 600px; }
.note-content {
  padding: 0 20px 20px;
  color: var(--body-text);
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.note-content ul { list-style: disc; padding-left: 20px; margin-top: 8px; }
.note-content li { margin-bottom: 6px; }
.note-content strong { color: var(--dark-text); }

/* Glossary */
.glossary-search { margin-bottom: 24px; }
.alpha-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.alpha-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.alpha-btn:hover { border-color: var(--navy); color: var(--navy); }
.alpha-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.glossary-group { margin-bottom: 32px; }
.glossary-group-letter {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--saffron);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}
.glossary-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.glossary-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition-fast);
}
.glossary-entry:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.glossary-term {
  font-weight: 700;
  color: var(--dark-text);
  font-size: 0.98rem;
  margin-bottom: 2px;
}
.glossary-pronunciation {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 8px;
}
.glossary-definition {
  font-size: 0.87rem;
  color: var(--body-text);
  line-height: 1.6;
  margin-bottom: 8px;
}
.glossary-usage {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--saffron);
  line-height: 1.5;
  font-style: italic;
}

/* ── Pulse Page ── */
.pulse-page { padding-top: var(--navbar-h); min-height: 100vh; }
.pulse-header {
  background: linear-gradient(135deg, #0d1257 0%, var(--navy) 100%);
  padding: 56px 0;
  color: var(--white);
}
.pulse-header h1 { color: var(--white); margin-bottom: 8px; }
.pulse-header p { color: rgba(255,255,255,0.65); font-size: 1.05rem; }

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  margin-top: 32px;
}
.filter-tab {
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-tab:hover { border-color: var(--navy); color: var(--navy); }
.filter-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.news-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.news-date { font-size: 0.8rem; color: var(--muted); }
.news-headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 10px;
  line-height: 1.35;
}
.news-summary {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.news-article-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--navy);
  font-weight: 600;
}

/* Constitution Connect */
.connect-section {
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  padding: 48px;
  margin-bottom: 64px;
}
.connect-section h2 { margin-bottom: 8px; }
.connect-section > p { color: var(--muted); margin-bottom: 32px; }
.connect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.connect-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
}
.connect-card:hover { box-shadow: var(--shadow-sm); }
.connect-arrow {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.connect-content h4 { color: var(--dark-text); font-size: 0.92rem; margin-bottom: 4px; }
.connect-content p { font-size: 0.83rem; color: var(--muted); line-height: 1.5; }
.connect-art {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  background: #E8EAFF;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 6px;
}

/* ── Footer ── */
.footer {
  background: var(--dark-text);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo-circle { margin-bottom: 14px; }
.footer-tagline { font-size: 0.9rem; line-height: 1.6; max-width: 240px; }
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  padding: 5px 0;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.45); }
.footer-bottom-links a:hover { color: var(--white); }

/* ── Loading skeleton ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

/* ── Responsive Breakpoints ── */

/* Tablet 768–1024 */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  body > footer > .container > div:first-child {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }
  .aotd-card { grid-template-columns: 1fr; }
  .aotd-number { display: none; }
  .library-layout { grid-template-columns: 220px 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .vocab-sidebar { position: static; }
}

/* Mobile <768 */
@media (max-width: 767px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: 60px 0;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-visual { order: -1; }
  .art21-card { max-width: 100%; }

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

  .library-layout {
    grid-template-columns: 1fr;
    padding-top: calc(var(--navbar-h) + 20px);
  }
  .sidebar {
    position: static;
    max-height: none;
  }
  .articles-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  body > footer > .container > div:first-child {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  body > footer > .container > div:last-child {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  body > footer p,
  body > footer a,
  body > footer h4 {
    word-break: break-word;
  }

  .aotd-card { padding: 28px; }
  .connect-section { padding: 28px; }

  .timeline-details-inner {
    grid-template-columns: 1fr;
  }
  .timeline-details-year { font-size: 2rem; }

  .section-pad { padding: 56px 0; }

  .news-grid { grid-template-columns: 1fr; }
  .glossary-entries { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .navbar, .footer { display: none; }
  body { padding-top: 0; }
}
