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

:root {
  --navy: #0A2540;
  --navy2: #123A5A;
  --navy3: #1d466e;
  --saffron: #FF6B00;
  --saffron2: #e85f00;
  --gold: #f3b51b;
  --green: #16a673;
  --red: #d83f3f;
  --bg: #f6f9fc;
  --bg2: #ffffff;
  --surface: #ffffff;
  --surface2: #f0f5fa;
  --text: #0A2540;
  --text-soft: #233f5d;
  --muted: #5F7388;
  --muted2: #8a9aaa;
  --border: rgba(10,37,64,0.09);
  --border2: rgba(255,107,0,0.28);
  --shadow: 0 16px 38px rgba(10,37,64,0.08);
  --shadow-soft: 0 8px 22px rgba(10,37,64,0.06);
  --saffron-glow: 0 14px 34px rgba(255,107,0,0.12), 0 12px 30px rgba(10,37,64,0.08);
  --header-bg: rgba(255,255,255,0.92);
  --hero-gradient: linear-gradient(145deg, #ffffff 0%, #f4f8fc 58%, #eef5fb 100%);
  --footer-bg: #ffffff;
}

html[data-theme="dark"] {
  --bg: #071b31;
  --bg2: #0b243d;
  --surface: #0f3154;
  --surface2: #123a62;
  --text: #ffffff;
  --text-soft: #eff6ff;
  --muted: #9bb2ca;
  --muted2: #7189a3;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,107,0,0.34);
  --shadow: 0 18px 50px rgba(0,0,0,0.22);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.16);
  --saffron-glow: 0 16px 40px rgba(255,107,0,0.16), 0 16px 44px rgba(0,0,0,0.22);
  --header-bg: rgba(7,27,49,0.92);
  --hero-gradient: linear-gradient(160deg, #071b31 0%, #0f3154 58%, #071b31 100%);
  --footer-bg: #061526;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Hind', sans-serif;
  font-size: 16px;
  line-height: 1.68;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 999px; }

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 78px;
  padding: 0 40px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 31px;
  color: var(--saffron);
  letter-spacing: 1.5px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 34px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--saffron); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-cta,
.btn-primary,
.btn-secondary,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-cta,
.btn-primary {
  background: var(--saffron);
  color: #ffffff !important;
  border: 1px solid var(--saffron);
  padding: 10px 20px;
}

.btn-primary:hover,
.nav-cta:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255,107,0,0.24);
}

.btn-secondary,
.small-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
}

.btn-secondary:hover,
.small-btn:hover {
  color: var(--saffron);
  transform: translateY(-1px);
}

.btn-secondary.disabled {
  opacity: 0.45;
  pointer-events: none;
  color: var(--muted);
}

.small-btn {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.theme-toggle {
  min-height: 36px;
  border: 1px solid var(--border2);
  background: rgba(255,107,0,0.1);
  color: var(--navy);
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--saffron);
  border-radius: 50%;
  box-shadow: inset 6px -3px 0 var(--saffron);
}

html[data-theme="light"] .theme-toggle-icon,
html:not([data-theme="dark"]) .theme-toggle-icon {
  background: var(--saffron);
  box-shadow: 0 0 0 4px rgba(255,107,0,0.14);
}

html[data-theme="dark"] .theme-toggle { color: var(--text); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: 0;
  z-index: 200;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--saffron);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(7,27,49,0.72);
  backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
}

.mobile-overlay.active { display: flex; }

.mobile-panel {
  width: min(88vw, 380px);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: var(--shadow);
}

.mobile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: rgba(255,107,0,0.1);
  color: var(--saffron);
  position: relative;
}

.mobile-close::before,
.mobile-close::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-close::before { transform: rotate(45deg); }
.mobile-close::after { transform: rotate(-45deg); }

.mobile-overlay a {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text);
}

.mobile-overlay a:hover { color: var(--saffron); }
.mobile-overlay .nav-cta { font-family: 'Rajdhani', sans-serif; font-size: 16px; letter-spacing: 2px; }

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 128px 40px 58px;
  background:
    radial-gradient(ellipse 58% 55% at 80% 24%, rgba(255,107,0,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 46% 60% at 8% 72%, rgba(10,37,64,0.05) 0%, transparent 62%),
    var(--hero-gradient);
  border-bottom: 1px solid var(--border);
}

.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.page-hero::before {
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(10,37,64,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,37,64,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(120deg, rgba(0,0,0,0.65), transparent 72%);
}

.page-hero::after {
  width: 168px;
  height: 168px;
  right: clamp(24px, 9vw, 120px);
  top: 112px;
  border: 1px solid rgba(255,107,0,0.16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgba(255,107,0,0.025),
    inset 0 0 0 48px rgba(10,37,64,0.025);
  opacity: 0.55;
}

html[data-theme="dark"] .page-hero::before {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
}

html[data-theme="dark"] .page-hero::after {
  border-color: rgba(255,107,0,0.18);
  box-shadow:
    inset 0 0 0 18px rgba(255,107,0,0.035),
    inset 0 0 0 48px rgba(255,255,255,0.018);
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.topic-bg::after {
  width: min(280px, 36vw);
  height: min(280px, 36vw);
  right: clamp(20px, 8vw, 118px);
  top: 102px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.06;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  animation: topicFloat 16s ease-in-out infinite;
  transform-origin: center;
}

html[data-theme="dark"] .topic-bg::after {
  opacity: 0.09;
  filter: brightness(1.35);
}

.topic-bg-constitution::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M76 58h82c22 0 38 16 38 38v126H99c-13 0-23-10-23-23V58Z'/%3E%3Cpath d='M99 58v141c0 13 10 23 23 23'/%3E%3Cpath d='M122 92h47M122 118h47M122 144h33'/%3E%3Ccircle cx='190' cy='86' r='36'/%3E%3Ccircle cx='190' cy='86' r='9'/%3E%3Cpath d='M190 50v72M154 86h72M164 60l52 52M216 60l-52 52'/%3E%3C/g%3E%3C/svg%3E");
}

.topic-bg-president::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='140' cy='140' r='104'/%3E%3Ccircle cx='140' cy='140' r='82'/%3E%3Cpath d='M74 178h132M88 164V130h104v34M104 130v34M128 130v34M152 130v34M176 130v34'/%3E%3Cpath d='M78 130h124l-62-44-62 44ZM92 190h96M110 86c12-14 48-14 60 0M130 70h20'/%3E%3C/g%3E%3C/svg%3E");
}

.topic-bg-prime-minister::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M138 54l20 18 22-3 15 24 24 8-7 28 14 21-25 15-5 27-29 1-18 23-24-17-27 6-10-27-26-12 12-25-9-26 26-9 13-25 25 8 12-36Z'/%3E%3Cpath d='M100 118h62M100 144h80M100 170h52'/%3E%3Cpath d='M194 70h28c10 0 18 8 18 18v112c0 10-8 18-18 18h-68'/%3E%3Cpath d='M70 70h80c10 0 18 8 18 18v112c0 10-8 18-18 18H70c-10 0-18-8-18-18V88c0-10 8-18 18-18Z'/%3E%3C/g%3E%3C/svg%3E");
}

.topic-bg-parliament::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='140' cy='142' rx='94' ry='66'/%3E%3Cellipse cx='140' cy='142' rx='68' ry='42'/%3E%3Cpath d='M58 180h164M78 198h124M88 140h104M98 118v46M118 112v58M140 108v64M162 112v58M182 118v46'/%3E%3Cpath d='M96 84c26-18 62-18 88 0M104 204c22 12 50 12 72 0'/%3E%3Ccircle cx='112' cy='142' r='16'/%3E%3Ccircle cx='168' cy='142' r='16'/%3E%3C/g%3E%3C/svg%3E");
}

.topic-bg-judiciary::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M140 62v136M96 198h88M116 218h48M78 94h124M140 94l-46 22M140 94l46 22'/%3E%3Cpath d='M76 116l-30 56h60l-30-56ZM204 116l-30 56h60l-30-56Z'/%3E%3Cpath d='M46 172c8 14 52 14 60 0M174 172c8 14 52 14 60 0'/%3E%3Ccircle cx='140' cy='62' r='12'/%3E%3C/g%3E%3C/svg%3E");
}

.topic-bg-emergency::after {
  background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230A2540' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M140 48l82 32v58c0 54-34 87-82 106-48-19-82-52-82-106V80l82-32Z'/%3E%3Cpath d='M140 88v68M140 188v4'/%3E%3Cpath d='M108 160h64M118 116h44'/%3E%3Ccircle cx='140' cy='140' r='82'/%3E%3C/g%3E%3C/svg%3E");
}

@keyframes topicFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(2deg); }
}

.hero-inner,
.section-inner,
.learning-shell,
.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.content-panel .section-inner {
  width: 100%;
  margin: 0;
}

.hero-badge,
.section-tag,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,107,0,0.32);
  background: rgba(255,107,0,0.10);
  color: var(--saffron);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.hero-title,
.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.05;
}

.hero-title {
  font-size: clamp(38px, 5vw, 64px);
  margin: 20px 0 16px;
}

.hero-title span,
.section-title span { color: var(--saffron); }

.hero-subtitle {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.section {
  padding: 70px 40px;
  background: var(--bg);
}

.section.alt { background: var(--bg2); }
.section-title { font-size: clamp(36px, 5vw, 54px); margin: 14px 0 12px; }
.section-desc { max-width: 680px; color: var(--muted); line-height: 1.72; margin-bottom: 30px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  align-items: stretch;
}

.grid.three,
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  border-color: rgba(255,107,0,0.34);
  box-shadow: var(--saffron-glow);
}
.card.compact { box-shadow: none; }

.feature-card,
.part-card,
.schedule-card,
.amendment-card,
.article-mini-card,
.category-block {
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.part-card::before,
.schedule-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), rgba(255,107,0,0.15));
}

.card-kicker {
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-title {
  color: var(--text);
  font-family: 'Hind', sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.card-text { color: var(--muted); font-size: 14px; line-height: 1.62; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.card-actions .small-btn,
.card-actions .btn-primary,
.card-actions .btn-secondary { width: auto; max-width: 100%; }

.part-number {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,107,0,0.10);
  border: 1px solid var(--border2);
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.part-card {
  border-left: 4px solid rgba(255,107,0,0.24);
}

.part-card.change-added {
  border-left-color: var(--green);
}

.part-card.change-deleted {
  border-left-color: var(--red);
  background:
    linear-gradient(135deg, rgba(216,63,63,0.055), transparent 36%),
    var(--surface);
}

.part-card.change-modified {
  border-left-color: var(--gold);
}

.part-amendment-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.meta-line,
.article-range {
  color: var(--navy);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

html[data-theme="dark"] .meta-line,
html[data-theme="dark"] .article-range { color: var(--gold); }

.coming-soon {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245,197,51,0.26);
  color: var(--gold);
  background: rgba(245,197,51,0.09);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 14px;
}

.learning-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding: 38px 0 78px;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 104px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.side-nav a:hover,
.side-nav a.active {
  color: var(--saffron);
  background: rgba(255,107,0,0.08);
}

.content-panel {
  min-width: 0;
  width: 100%;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted2);
  font-size: 13px;
  margin-bottom: 18px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--saffron); }

.search-shell {
  margin-top: 30px;
  width: min(860px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.search-input:focus { border-color: var(--saffron); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid var(--border2);
  background: rgba(255,107,0,0.08);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 13px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--saffron);
  color: var(--navy);
  border-color: var(--saffron);
}

.result-count {
  color: var(--muted2);
  font-size: 13px;
  margin-top: 12px;
}

.search-results-section {
  padding: 4px 0 30px;
}

.search-title {
  font-size: clamp(28px, 3vw, 38px);
  margin: 12px 0 16px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  align-items: stretch;
}

.search-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-result-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  border-color: rgba(255,107,0,0.34);
  box-shadow: var(--saffron-glow);
}

.search-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-type {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255,107,0,0.09);
  border: 1px solid var(--border2);
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.search-result-card h3 {
  color: var(--text);
  font-size: 19px;
  line-height: 1.32;
  margin-bottom: 8px;
}

.search-result-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.amendment-summary-line {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(255,107,0,0.26);
  background: rgba(255,107,0,0.08);
  color: var(--saffron);
  border-radius: 999px;
  padding: 7px 13px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.accordion {
  display: grid;
  gap: 14px;
}

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.accordion-item.open {
  border-color: rgba(255,107,0,0.24);
  box-shadow: var(--shadow);
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 72px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.accordion-title {
  font-family: 'Hind', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.accordion-icon {
  flex: 0 0 auto;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--saffron);
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.accordion-item.open > .accordion-trigger .accordion-icon {
  background: var(--saffron);
  color: #ffffff;
  transform: rotate(45deg);
}
.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 20px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(-4px);
  transition: grid-template-rows 0.25s ease, opacity 0.25s ease, transform 0.25s ease, padding 0.25s ease;
}
.accordion-body > * {
  overflow: hidden;
}
.accordion-item.open > .accordion-body {
  grid-template-rows: 1fr;
  padding: 0 20px 20px;
  opacity: 1;
  transform: translateY(0);
}

.decade-accordion {
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,107,0,0.055), transparent 28%),
    var(--surface);
  border-color: rgba(10,37,64,0.08);
}

html[data-theme="dark"] .decade-accordion {
  background:
    linear-gradient(135deg, rgba(255,107,0,0.09), transparent 32%),
    var(--surface);
}

.decade-trigger {
  min-height: 96px;
  padding: 24px 26px;
  align-items: center;
}

.decade-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.decade-title {
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.decade-range {
  color: var(--muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.decade-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 720px;
}

.decade-accordion .accordion-icon {
  width: 40px;
  height: 40px;
  font-size: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.decade-accordion.open > .decade-trigger .accordion-icon::before {
  content: '';
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: absolute;
}

.decade-accordion.open > .decade-trigger .accordion-icon {
  font-size: 0;
  transform: none;
}

.amendment-grid {
  gap: 16px;
}

.amendment-list {
  display: grid;
  gap: 12px;
}

.amendment-card {
  border-radius: 16px;
  border-color: rgba(10,37,64,0.08);
  padding: 20px;
}

.amendment-accordion {
  border-radius: 16px;
  box-shadow: none;
}

.amendment-trigger {
  min-height: 86px;
  padding: 18px;
}

.amendment-heading {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.amendment-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.amendment-short {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.amendment-detail {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.amendment-detail p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 12px;
}

.amendment-detail ul {
  display: grid;
  gap: 9px;
  padding-left: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  list-style: none;
}

.amendment-detail li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.marker-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.marker-added {
  color: #0d7a55;
  background: rgba(22,166,115,0.10);
  border-color: rgba(22,166,115,0.28);
}

.marker-modified {
  color: #8a6500;
  background: rgba(243,181,27,0.13);
  border-color: rgba(243,181,27,0.34);
}

.marker-removed,
.marker-repealed {
  color: var(--red);
  background: rgba(216,63,63,0.10);
  border-color: rgba(216,63,63,0.28);
}

html[data-theme="dark"] .marker-added { color: #7ee0bd; }
html[data-theme="dark"] .marker-modified { color: #f7d16b; }
}

.amendment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.amendment-card .card-title {
  font-size: 19px;
}

.memory-point {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.schedule-info-block {
  margin-top: 12px;
}

.schedule-info-list {
  display: grid;
  gap: 7px;
}

.schedule-marker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.case-chip {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.detail-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 14px;
}

.detail-label {
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-box ul { padding-left: 18px; }
.detail-box li { margin: 4px 0; }

.part-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
}

.part-nav .btn-secondary {
  flex: 1 1 0;
  text-align: center;
}

.part-nav .all-parts-btn {
  flex: 0 0 auto;
}

.part-heading-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid rgba(255,107,0,0.28);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}

.part-heading-card.change-added {
  border-left-color: var(--green);
}

.part-heading-card.change-deleted {
  border-left-color: var(--red);
  background:
    linear-gradient(135deg, rgba(216,63,63,0.055), transparent 32%),
    var(--surface);
}

.part-heading-card.change-modified {
  border-left-color: var(--gold);
}

.part-page-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  color: var(--text);
  letter-spacing: 0;
  margin: 10px 0 8px;
}

.part-page-subtitle {
  color: var(--muted);
  font-size: 16px;
}

.article-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-badge {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,107,0,0.10);
  border: 1px solid var(--border2);
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.article-card-grid {
  display: grid;
  gap: 14px;
}

.chapter-stack {
  display: grid;
  gap: 20px;
}

.chapter-heading {
  position: sticky;
  top: 84px;
  z-index: 5;
  margin: 8px 0 -4px;
  pointer-events: none;
}

.chapter-heading span {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(10,37,64,0.08);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(246,249,252,0.92);
  color: var(--navy);
  box-shadow: var(--shadow-soft);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .chapter-heading span {
  background: rgba(15,49,84,0.92);
  color: var(--text-soft);
  border-color: var(--border);
}

.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.group-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), rgba(255,107,0,0.12));
}

.group-card-head {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  padding: 20px 22px;
  text-align: left;
}

.group-title-wrap {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.group-title {
  color: var(--text);
  font-family: 'Hind', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.24;
}

.group-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.group-count {
  flex: 0 0 auto;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--surface2);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.group-body {
  padding-left: 22px;
  padding-right: 22px;
}

.group-card.open > .group-body {
  padding-bottom: 22px;
}

.group-card .accordion-icon {
  width: 36px;
  height: 36px;
  font-size: 20px;
  background: var(--surface);
}

.group-card.open > .group-card-head .accordion-icon {
  transform: none;
  font-size: 0;
}

.group-card.open > .group-card-head .accordion-icon::before {
  content: '';
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: absolute;
}

.group-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 16px 0 18px;
}

.group-controls .btn-secondary {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 14px;
}

.mnemonic-panel {
  margin: 0 0 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.mnemonic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mnemonic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: rgba(255,107,0,0.07);
  color: var(--text);
  padding: 7px 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.mnemonic-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255,107,0,0.42);
  background: rgba(255,107,0,0.12);
}

.mnemonic-chip strong {
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  letter-spacing: 0.8px;
}

.mnemonic-chip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.article-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid rgba(255,107,0,0.36);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  border-color: rgba(255,107,0,0.34);
  border-left-color: var(--saffron);
  box-shadow: var(--saffron-glow);
}

.article-card.change-added {
  border-left-color: var(--green);
}

.article-card.change-deleted {
  border-left-color: var(--red);
  background:
    linear-gradient(135deg, rgba(216,63,63,0.055), transparent 35%),
    var(--surface);
}

.article-card.change-modified {
  border-left-color: var(--gold);
}

.article-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.article-title-wrap {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.article-title-wrap h3 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.28;
  font-weight: 700;
}

.revision-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.revision-line {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 12px;
}

.revision-line span {
  display: block;
  color: var(--saffron);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.revision-line.exam {
  background: rgba(255,107,0,0.055);
  border-color: rgba(255,107,0,0.16);
}

.revision-line p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.change-tag,
.amendment-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.change-tag.added,
.amendment-pill.added {
  color: #0d7a55;
  background: rgba(22,166,115,0.10);
  border: 1px solid rgba(22,166,115,0.28);
}

.change-tag.deleted,
.amendment-pill.deleted {
  color: var(--red);
  background: rgba(216,63,63,0.10);
  border: 1px solid rgba(216,63,63,0.28);
}

.change-tag.modified,
.amendment-pill.modified {
  color: #8a6500;
  background: rgba(243,181,27,0.13);
  border: 1px solid rgba(243,181,27,0.34);
}

html[data-theme="dark"] .change-tag.added,
html[data-theme="dark"] .amendment-pill.added { color: #7ee0bd; }

html[data-theme="dark"] .change-tag.modified,
html[data-theme="dark"] .amendment-pill.modified { color: #f7d16b; }

.amendment-pill {
  margin-top: 12px;
}

.importance-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  margin-top: 10px;
  color: var(--saffron);
  border: 1px solid var(--border2);
  background: rgba(255,107,0,0.08);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.empty-state {
  border: 1px dashed var(--border2);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.reveal-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card.reveal-item {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(14px);
}

.card.reveal-item.is-visible {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0);
}

.card.reveal-item.is-visible:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
}

.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  color: var(--muted2);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer span { color: var(--saffron); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(2, 1fr); }
  .nav-right { gap: 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 12px; letter-spacing: 1px; }
}

@media (max-width: 980px) {
  .navbar { height: 76px; padding: 0 20px; }
  .nav-links { display: none; }
  .nav-controls .nav-cta { display: none; }
  .hamburger { display: flex; }
  .theme-toggle-label { display: none; }
  .page-hero { padding: 112px 20px 42px; }
  .hero-inner,
  .section-inner,
  .learning-shell,
  .footer-inner { width: min(100%, calc(100vw - 40px)); }
  .section { padding: 52px 20px; }
  .grid,
  .grid.three,
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-results-grid,
  .revision-lines { grid-template-columns: 1fr; }
  .learning-shell {
    display: block;
    padding: 20px 0 56px;
  }
  .side-nav {
    position: sticky;
    top: 76px;
    z-index: 90;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-radius: 14px;
    margin: 0 0 22px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
  }
  .side-nav a {
    white-space: nowrap;
    flex: 0 0 auto;
    border: 1px solid var(--border);
  }
  .chapter-heading {
    position: static;
    top: auto;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .part-nav { flex-direction: column; align-items: stretch; }
  .part-nav .btn-secondary { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .card,
  .card:hover,
  .article-card,
  .article-card:hover,
  .search-result-card,
  .search-result-card:hover {
    transform: none;
  }
  .page-hero::after {
    width: 120px;
    height: 120px;
    right: -22px;
    top: 98px;
    opacity: 0.32;
  }
  .topic-bg::after {
    width: 150px;
    height: 150px;
    right: -34px;
    top: 108px;
    opacity: 0.045;
    animation: none;
  }
  html[data-theme="dark"] .topic-bg::after {
    opacity: 0.075;
  }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 15px; }
  .card { padding: 17px; }
  .search-shell { padding: 14px; }
  .accordion-title { font-size: 16px; }
  .decade-trigger {
    min-height: 84px;
    padding: 20px 18px;
    gap: 12px;
  }
  .decade-title { font-size: 24px; }
  .decade-range { font-size: 12px; }
  .decade-accordion .accordion-icon {
    width: 36px;
    height: 36px;
  }
  .amendment-card-head {
    align-items: flex-start;
  }
  .amendment-card .importance-tag {
    flex-shrink: 0;
  }
  .grid,
  .grid.three,
  .grid.two { grid-template-columns: 1fr; }
  .search-result-top {
    display: grid;
    justify-items: start;
  }
  .article-heading { align-items: flex-start; }
  .article-card-head {
    display: grid;
    gap: 10px;
  }
  .group-card {
    border-radius: 16px;
  }
  .group-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 18px;
  }
  .group-meta {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }
  .group-count {
    width: fit-content;
  }
  .group-card.open > .group-body {
    padding: 0 18px 18px;
  }
  .mnemonic-panel {
    padding: 14px;
  }
  .mnemonic-chip {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
  }
  .article-badge { min-width: 48px; width: fit-content; }
  .part-heading-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .reveal-item {
    opacity: 1;
    transform: none;
  }
  .card,
  .card:hover,
  .article-card,
  .article-card:hover,
  .search-result-card,
  .search-result-card:hover {
    transform: none !important;
  }
  .topic-bg::after {
    animation: none !important;
  }
}
