/* BharatInfo — INTERACTIVE visuals: Chakra wheel, Your Route, Two Pillars, Follow the Rupee.
 * Built on the tokens in style.css; each visual's section is added as it is built.
 * Rules: identity = glyph + colour (never colour alone); a selection keeps branch colours and
 * everything else dims; hover details are also reachable by keyboard focus and in a List view. */

/* ---------- Shared: glyph legend ---------- */
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.viz-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend .icon { width: 15px; height: 15px; }
.inline-icon { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }

/* =====================================================================
   Landing hero: the Chakra of Responsibility
   ===================================================================== */
.hero-chakra { padding: 14px 0 6px; }
.hero-copy { text-align: center; max-width: 820px; margin: 0 auto 22px; }
.hero-copy .eyebrow .icon { width: 16px; height: 16px; }
.hero-copy h1 { font-size: clamp(34px, 5.8vw, 62px); letter-spacing: -.045em; line-height: 1.04; margin: 10px 0 12px; }
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--elected), var(--admin) 55%, var(--body));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy .lede { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 18px); margin: 0 auto; max-width: 60ch; }

/* search + area toggle */
.chakra-ask {
  display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto;
  padding: 7px 7px 7px 18px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; box-shadow: var(--shadow-2);
}
.chakra-ask:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent), var(--shadow-2);
}
.ask-icon { display: grid; place-items: center; color: var(--ink-3); }
.chakra-ask input[type="search"] {
  flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 10px 2px; font-size: 16.5px;
}
.chakra-ask input[type="search"]:focus { outline: none; background: transparent; }
.seg { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: var(--surface-3); }
.seg button {
  border: 0; background: transparent; color: var(--ink-2); padding: 7px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 650; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.chakra-quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 14px auto 0; font-size: 13px; }
@media (max-width: 560px) {
  .chakra-ask { flex-wrap: wrap; border-radius: 22px; padding: 8px 10px 10px 14px; }
  .chakra-ask input[type="search"] { flex-basis: calc(100% - 40px); }
  .seg { width: 100%; justify-content: center; }
  .seg button { flex: 1; }
}

/* wheel + panel */
.chakra-stage {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: clamp(18px, 3vw, 36px); align-items: start; margin-top: 18px;   /* the wheel never moves when the route grows */
}
.chakra-wheel { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.chakra-wheel::before {               /* soft glow behind the wheel */
  content: ""; position: absolute; inset: 8%; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--admin) 12%, transparent), transparent 72%);
}
.ck-svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; touch-action: manipulation; }
.ck-svg:focus { outline: none; }
.ck-svg:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: 50%; }
.chakra-panel {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-2); padding: 20px 20px 18px; min-height: 320px;
}
.chakra-panel::before {               /* beak pointing at the selected spoke, turned to 3 o-clock */
  content: ""; position: absolute; left: -9px; top: var(--beak-top, 50%); width: 16px; height: 16px; background: var(--surface);
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 900px) {
  .chakra-stage { grid-template-columns: 1fr; }
  .chakra-wheel { max-width: 560px; margin: 0 auto; }
  .chakra-panel::before { left: 50%; top: -9px; transform: translateX(-50%) rotate(135deg); }  /* spoke turned to 6 o-clock */
}

/* SVG parts */
.ck-sector { fill: transparent; }
.ck-sector.alt { fill: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.ck-rim { fill: none; stroke: var(--wheel-line-2); stroke-width: 2.5; }
.ck-ring { fill: none; stroke: var(--wheel-line); stroke-width: 1.3; }
.ck-ringnum {
  font-size: 14px; font-weight: 800; fill: var(--ink-3); text-anchor: middle;
  paint-order: stroke; stroke: var(--page); stroke-width: 5px; stroke-linejoin: round;
}
.ck-labelpath { fill: none; stroke: none; }
.ck-seclabel { font-size: 15px; font-weight: 750; letter-spacing: .1em; fill: var(--ink-3); transition: fill var(--dur-fast); }
.ck-seclabel.on { fill: var(--ink); }
.ck-spoke { stroke: var(--wheel-line-2); stroke-width: 1.3; transition: stroke var(--dur-fast), stroke-width var(--dur-fast); }
.ck-spoke.hv, .ck-spoke.tied { stroke: var(--ink-2); stroke-width: 2.2; }
.ck-spoke.sel { stroke: var(--ink); stroke-width: 3.5; }
.ck-halo { fill: none; stroke: var(--ink-2); stroke-width: 1.4; opacity: .35; transition: opacity var(--dur); }
.ck-halo.on { opacity: .95; stroke: var(--ink); }
.ck-breadth { fill: none; stroke-width: 9; stroke-linecap: round; opacity: .3; pointer-events: none; }
.ck-breadth.b-elected { stroke: var(--elected); }
.ck-breadth.b-admin { stroke: var(--admin); }
.ck-breadth.b-body { stroke: var(--body); }
.ck-dot { transition: opacity var(--dur) var(--ease); }
.ck-dot .pop { transform-box: fill-box; transform-origin: center; }
.ck-dot .mk { stroke: var(--page); stroke-width: 2.5; paint-order: stroke; }
.ck-elected .mk { fill: var(--elected); }
.ck-admin .mk { fill: var(--admin); }
.ck-body .mk { fill: var(--body); }
.ck-svg.has-sel .ck-dot:not(.on):not(.tied) { opacity: .16; }
.ck-svg.has-sel .ck-dot.tied:not(.on) { opacity: .55; }
.ck-svg.has-hover .ck-dot:not(.hv) { opacity: .16; }
.ck-svg.has-hover .ck-dot.hv { opacity: 1; }
.ck-dot.lit .pop { animation: ck-pop .55s var(--ease) both; animation-delay: calc(var(--lvl) * 95ms); }
@keyframes ck-pop { 0% { transform: scale(.3); } 55% { transform: scale(1.5); } 100% { transform: scale(1); } }
.ck-ripple {
  fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0; pointer-events: none;
  transform-box: fill-box; transform-origin: center;
  animation: ck-ripple .9s var(--ease) both; animation-delay: calc(var(--lvl) * 95ms);
}
@keyframes ck-ripple { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
.ck-hubdisc { fill: url(#ckHubGrad); stroke: var(--line-2); stroke-width: 1.5; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .14)); }
.hub-stop-a { stop-color: var(--surface); }
.hub-stop-b { stop-color: var(--surface-3); }
.ck-hub-you { font-size: 21px; font-weight: 800; letter-spacing: .32em; fill: var(--ink-2); text-anchor: middle; }
.ck-hub-you.small { font-size: 17px; }
.ck-hub-label { font-size: 26px; font-weight: 800; letter-spacing: -.01em; fill: var(--ink); text-anchor: middle; }
.ck-hub-sub { font-size: 16px; font-weight: 600; fill: var(--ink-2); text-anchor: middle; }
@media (max-width: 620px) {            /* too small to read on a phone: the chips below carry the names */
  .ck-seclabel, .ck-ringnum { display: none; }
}

/* "the wheel assembles" — once, skipped under reduced motion */
.chakra.intro .ck-spoke { stroke-dasharray: 365; stroke-dashoffset: 365; animation: ck-draw .9s var(--ease) forwards; animation-delay: calc(var(--i) * 22ms); }
@keyframes ck-draw { to { stroke-dashoffset: 0; } }
.chakra.intro .ck-dot, .chakra.intro .ck-halo { opacity: 0; animation: ck-in .45s var(--ease) forwards; animation-delay: calc(380ms + var(--lvl) * 110ms); }
.chakra.intro .ck-halo { animation-name: ck-in-halo; }
@keyframes ck-in { to { opacity: 1; } }
@keyframes ck-in-halo { to { opacity: .35; } }

/* domain chips (always-readable names) */
.chakra-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 22px;
  margin-top: 22px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.strip-group { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 6px; }
.strip-label { flex-basis: 100%; font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.chakra-strip .chip.tied { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.chakra-legend { justify-content: center; margin: 14px 0 0; }

/* table view */
.chakra-table { margin-top: 14px; }
.chakra-table summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; color: var(--ink-2); padding: 8px 4px; }
.chakra-table summary .icon { width: 16px; height: 16px; }
.chakra-table[open] summary { color: var(--ink); margin-bottom: 8px; }
.ck-table { font-size: 13px; min-width: 880px; }
.ck-table th[scope="row"] { white-space: nowrap; font-size: 13.5px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; background: var(--surface); }
.tbl-group { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tbl-office { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; }
.tbl-ov { display: inline-flex; color: var(--ink-2); margin-top: 3px; }
.tbl-ov .icon { width: 15px; height: 15px; }

/* =====================================================================
   Your Route — the two-track escalation ladder
   ===================================================================== */
.route .eyebrow .icon { width: 15px; height: 15px; }
.route-head { margin-bottom: 12px; }
.route-title { margin: 4px 0; font-size: 24px; letter-spacing: -.02em; }
.route-idle .route-title { font-size: 21px; }
.route-sub { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.ov-inline .icon, .ov-mark .icon { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }
.ov-mark { color: var(--ink); }
.route-tied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.route-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 4px 42px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.route-cols span { display: inline-flex; align-items: center; gap: 5px; }
.route-cols .glyph { width: 8px; height: 8px; }
.route-steps { position: relative; list-style: none; margin: 0; padding: 0; }
.route-steps::before {                 /* the ladder's spine */
  content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--line-2);
}
.rstep { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 6px 0; }
.rstep-num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2); font-size: 13.5px; font-weight: 800; color: var(--ink);
}
.rstep.is-overlap .rstep-num { border-color: var(--ink); }
.rstep-body { min-width: 0; }
.rstep-label {
  display: flex; align-items: center; gap: 6px; margin: 6px 0 6px; font-size: 11.5px; font-weight: 750;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.rstep-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.track { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.station {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 9px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 12px; padding: 9px 11px;
  cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.station:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.station .glyph { margin-top: 5px; }
.st-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.st-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.st-meta { font-size: 12px; color: var(--ink-2); }
.st-reach { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.station.is-first { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.st-badge {
  align-self: flex-start; margin: 0 0 5px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--surface);
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5;
}
.station.flash { animation: st-flash 1.6s var(--ease); }
@keyframes st-flash { 0%, 100% { box-shadow: none; } 20%, 60% { box-shadow: 0 0 0 3px var(--focus); } }
.route-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.route-note p { margin: 0; }
.route-note p + p { margin-top: 4px; font-size: 13.5px; color: var(--ink); }
.route-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.route-foot .icon { width: 16px; height: 16px; }
.idle-list { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.idle-list li { margin: 7px 0; }
.idle-list strong { color: var(--ink); }
@media (max-width: 480px) {
  .rstep-tracks { grid-template-columns: 1fr; }
  .route-cols { display: none; }
}

/* office drawer */
.office-kind { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 650; color: var(--ink-2); }
.office-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.office-facts div { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.office-facts dt { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.office-facts dd { margin: 2px 0 0; font-weight: 650; }
.office-h { margin: 18px 0 6px; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.office-reach { margin: 0; }
.office-note { margin-top: 20px; font-size: 12.5px; color: var(--ink-3); }

/* =====================================================================
   Landing: stats + doorways
   ===================================================================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 30px 0 0; }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.stat-value { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-label { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.doorways { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.doorways > :first-child { grid-column: span 2; }
@media (max-width: 900px) {
  .doorways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doorways > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .doorways { grid-template-columns: 1fr; } }
.door-art { display: block; width: 100%; max-width: 360px; height: 66px; margin-bottom: 14px; }
.office { font-size: 14.5px; }
.route-empty .route-title { font-size: 21px; }
.track-official:empty, .track-elected:empty { min-height: 1px; }   /* keep both columns in place */
.door-art .a-line { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; }
.door-art .a-ink { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.door-art .a-elected { fill: var(--elected); }
.door-art .a-admin { fill: var(--admin); }
.door-art .a-body { fill: var(--body); }
.door-art .a-tier1 { fill: none; stroke: var(--tier-union); stroke-width: 2.5; stroke-linecap: round; }
.door-art .a-tier2 { fill: none; stroke: var(--tier-state); stroke-width: 2.5; stroke-linecap: round; }
.door-art .a-tier3 { fill: none; stroke: var(--tier-local); stroke-width: 2.5; stroke-linecap: round; }
.door-art .a-venn { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.door-art .a-venn-e { fill: color-mix(in srgb, var(--elected) 16%, transparent); stroke: var(--elected); stroke-width: 2; }
.door-art .a-venn-a { fill: color-mix(in srgb, var(--admin) 16%, transparent); stroke: var(--admin); stroke-width: 2; }
