:root {
  --ink: #12263a;
  --muted: #5b6b7a;
  --bg: #eaf6fc;
  --bg-soft: #ffffff;
  --border: #d8e8f2;
  --saffron: #ff9933;
  --green: #138808;
  --accent: #0b3d91;
  --purple: #7c3aed;
  --teal: #0f766e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f6;
    --muted: #a3b0bd;
    --bg: #0d1b26;
    --bg-soft: #16242f;
    --border: #24343f;
    --accent: #6db3ff;
    --purple: #b794f6;
    --teal: #2dd4bf;
  }
}

.flag-bar {
  height: 5px;
  background: linear-gradient(
    to right,
    var(--saffron) 0%,
    var(--saffron) 33.33%,
    #ffffff 33.33%,
    #ffffff 66.66%,
    var(--green) 66.66%,
    var(--green) 100%
  );
  border-bottom: 1px solid var(--border);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 0;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--saffron);
}

.hero {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2.4rem;
}

.hero h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--saffron) 0%,
    var(--saffron) 33.33%,
    #ffffff 33.33%,
    #ffffff 66.66%,
    var(--green) 66.66%,
    var(--green) 100%
  );
}

.hero .lede {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
}

.home-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 153, 51, 0.16), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(19, 136, 8, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.home-hero h1 {
  background: linear-gradient(90deg, var(--saffron), var(--accent) 55%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about {
  padding: 48px 0;
}

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

.about-card {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 20px 24px;
}

.about-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.about-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.about-card.accent-saffron {
  border-top: 3px solid var(--saffron);
}

.about-card.accent-saffron h2 {
  color: var(--saffron);
}

.about-card.accent-green {
  border-top: 3px solid var(--green);
}

.about-card.accent-green h2 {
  color: var(--green);
}

.about-card.accent-blue {
  border-top: 3px solid var(--accent);
}

.about-card.accent-blue h2 {
  color: var(--accent);
}

.about-card.accent-purple {
  border-top: 3px solid var(--purple);
}

.about-card.accent-purple h2 {
  color: var(--purple);
}

.about-card h3 {
  margin: 20px 0 4px;
  font-size: 0.95rem;
  color: var(--ink);
}

.about-card.accent-teal {
  border-top: 3px solid var(--teal);
}

.about-card.accent-teal h2 {
  color: var(--teal);
}

.symbols-section {
  padding: 0 0 48px;
}

.symbols-list {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px 32px;
}

.symbol-link {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.symbol-link:hover {
  text-decoration: underline;
}

.symbol-item dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.symbol-item dd {
  margin: 2px 0 0 54px;
  color: var(--muted);
}

.symbol-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  flex-shrink: 0;
  position: relative;
  cursor: zoom-in;
  transform-origin: top left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.symbol-img:hover,
.symbol-img:focus-visible {
  transform: scale(4);
  z-index: 20;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.symbol-attribution {
  margin-top: 16px;
}

.map-section {
  padding: 24px 0 64px;
  text-align: center;
}

.map-section h2 {
  margin-bottom: 4px;
}

.map-hint {
  color: var(--muted);
  margin-top: 0;
}

.map-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.capital-swatch {
  background: #d7263d;
}

.park-swatch {
  background: #2e8b47;
}

.map-container {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.india-map,
.district-map {
  width: 100%;
  height: auto;
  display: block;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  transform: translate(0, -100%);
  z-index: 10;
}

.map-attribution {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.map-attribution a {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.data-disclaimer {
  max-width: 700px;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.breadcrumb {
  margin: 0 0 12px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.state-index {
  padding: 40px 0 64px;
}

.state-index h2 {
  margin-top: 32px;
}

.state-index h2:first-child {
  margin-top: 0;
}

.state-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.state-grid a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.state-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.state-name {
  font-weight: 600;
}

.state-capital {
  color: var(--muted);
  font-size: 0.85rem;
}

.state-detail {
  padding: 40px 0 64px;
}

.collapsible-section,
.population-section,
.state-symbols-section {
  margin: 24px 0;
}

.collapsible-section summary {
  cursor: pointer;
  list-style: none;
}

.collapsible-section summary::-webkit-details-marker {
  display: none;
}

.collapsible-section summary h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.collapsible-section summary h2::before {
  content: "\25B8";
  color: var(--accent);
  transition: transform 0.15s ease;
}

.collapsible-section[open] summary h2::before {
  transform: rotate(90deg);
}

.collapsible-section h3 {
  margin-top: 32px;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.parks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 24px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.parks-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
}

.parks-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e8b47;
}

.no-parks {
  color: var(--muted);
}

.leader-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0;
}

.symbol-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.symbol-card-head h2 {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

.ministers-table {
  width: 100%;
  border-collapse: collapse;
}

.ministers-table th,
.ministers-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.ministers-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
