/* Telangana Caste Census — Design System */
:root {
  /* Canvas — Apple-like cool neutrals */
  --bg: #fbfbfd;
  --bg-tint: #f5f5f7;
  --bg-sunk: #ededf1;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --ink-muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-soft: #2997ff;

  /* Caste group palette — cooler, cleaner, more Apple-adjacent */
  --c-bc: #0071e3;
  --c-sc: #5e5ce6;
  --c-st: #30b0c7;
  --c-oc: #ff9f0a;
  --c-mus: #bf5af2;
  --c-nc: #8e8e93;

  /* Theme palette (for metric categories) */
  --c-dem: #8e8e93;
  --c-liv: #ff9f0a;
  --c-edu: #0071e3;
  --c-hh: #30b0c7;
  --c-ast: #5e5ce6;
  --c-land: #34c759;
  --c-mig: #bf5af2;
  --c-res: #ff375f;
  --c-wel: #bf5af2;

  /* Typography */
  --ff-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ff-serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ff-mono: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Scale */
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 24px;
  --fs-2xl: 36px;
  --fs-3xl: 56px;
  --fs-4xl: 88px;

  /* Layout */
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.03);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 28%, var(--bg-tint) 100%);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum';
}

.mono { font-family: var(--ff-mono); font-feature-settings: 'tnum','zero'; }
.serif { font-family: var(--ff-serif); }

.num { font-family: var(--ff-mono); font-feature-settings: 'tnum','zero'; font-variant-numeric: tabular-nums; }

.kicker {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.rule { height: 1px; background: var(--line); border: none; }
.rule-thick { height: 2px; background: var(--ink); border: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }

/* Group swatches */
.swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  vertical-align: baseline;
  position: relative; top: 0px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: oklch(0.85 0.01 85); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* Section plate */
.section {
  border-top: 1px solid var(--line);
  padding: 96px 0;
}
.section-title {
  font-family: var(--ff-serif);
  font-weight: 600;
  font-size: var(--fs-2xl);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 12px;
}
.section-dek {
  font-size: var(--fs-lg);
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 40px;
  line-height: 1.5;
}

/* Buttons / chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  transition: 120ms ease;
}
.chip:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); color: var(--ink); }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }

.card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 900px) {
  :root { --fs-2xl: 28px; --fs-3xl: 40px; --fs-4xl: 56px; }
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
}
@media (max-width: 600px) {
  :root { --fs-2xl: 24px; --fs-3xl: 32px; --fs-4xl: 44px; }
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
}
