/* ==========================================================================
   TNCPDA & FMCG TV — Editorial theme layer (paper, ink, brass)
   Loads after style.css. Remaps legacy tokens and overrides the dark
   gradient / boxed-card patterns. Bilingual .lang-en / .lang-ta is untouched.
   ========================================================================== */

:root {
  /* Paper & ink */
  --ink: #17150f;
  --ink-2: #3b372d;
  --ink-3: #6b6557;
  --paper: #f2ede1;
  --paper-2: #e9e2d1;
  --paper-3: #ddd4bd;
  --rule: #cbc2a9;
  --rule-strong: #17150f;
  --brass: #8a6420;
  --brass-hover: #6f4f15;
  --brass-subtle: #ece0c4;
  --brass-border: #b89a5c;
  --oxblood: #7a2e22;
  --moss: #3f5a34;

  /* Legacy token remap — existing components re-theme automatically */
  --color-primary-dark: var(--ink);
  --color-primary: var(--ink);
  --color-primary-light: var(--ink-2);
  --color-dark-popover: #221f17;
  --color-bg: var(--paper);
  --color-surface: #f8f4ea;
  --color-surface-subtle: var(--paper-2);
  --color-text: var(--ink);
  --color-text-body: var(--ink-2);
  --color-text-muted: var(--ink-3);
  --color-text-light: var(--paper);
  --color-text-light-muted: #c9c0a8;
  --color-accent: var(--brass);
  --color-accent-hover: var(--brass-hover);
  --color-accent-light: var(--brass-border);
  --color-accent-subtle: var(--brass-subtle);
  --color-accent-border: var(--brass-border);
  --color-gold: var(--brass);
  --color-gold-subtle: var(--brass-subtle);
  --color-gold-border: var(--brass-border);
  --color-border: var(--rule);
  --color-border-hover: var(--ink-3);
  --color-border-dark: rgba(242, 237, 225, 0.16);
  --color-border-dark-hover: rgba(242, 237, 225, 0.32);
  --color-success: var(--moss);
  --color-success-subtle: #e4ead8;
  --color-danger: var(--oxblood);
  --color-danger-subtle: #f1ddd8;

  /* Tokens the legacy markup references but style.css never defined. Those
     inline declarations were invalid and dropped, so the elements inherited
     whatever colour they landed in. Alias them onto the palette. */
  --color-secondary: var(--brass);
  --color-secondary-hover: var(--brass-hover);
  --color-warning: var(--brass);
  --color-warning-light: var(--brass-subtle);
  --color-info: var(--ink-3);
  --color-text-subtle: var(--ink-3);
  --color-text-main: var(--ink);
  --color-gold-hover: var(--brass-hover);
  --color-gold-light: var(--brass-border);

  --font-heading: 'Fraunces', 'Noto Serif Tamil', Georgia, serif;
  --font-body: 'Instrument Sans', 'Noto Sans Tamil', system-ui, sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Instrument Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-xs: 2px;
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 4px;
  --radius-full: 999px;

  --shadow-sm: none;
  --shadow-md: 0 1px 0 rgba(23, 21, 15, 0.06);
  --shadow-lg: 0 18px 40px -28px rgba(23, 21, 15, 0.35);
  --shadow-popover: 0 16px 36px -20px rgba(23, 21, 15, 0.4);
}

html { background: var(--paper); }

body {
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper grain — pure SVG noise, fixed, never intercepts input */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.01em;
}

a { color: var(--ink); text-decoration-color: var(--brass-border); text-underline-offset: 3px; }
a:hover { color: var(--brass); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

::selection { background: var(--brass-subtle); color: var(--ink); }

/* Mono micro-label used for eyebrows and counters */
.section-tag,
.hero-pill,
.badge,
.top-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-strong);
  padding: 0.5rem 0 0;
  box-shadow: none;
  color: var(--ink-2);
}

/* Dark bands: legacy forces a blue eyebrow here, and the ink rule above it
   disappears on an ink ground. Keep both in brass. */
.section-dark .section-tag,
.section-dark .section-eyebrow {
  color: var(--brass-border);
  border-top-color: rgba(184, 154, 92, 0.55);
}

/* ---- Part 2: hero, sections, cards, buttons ---- */

/* Legacy style.css forces white, gradient-clipped hero text with !important.
   Override at the same specificity so the headline stays ink on paper. */
.hero-title,
.page-hero-title,
.hero-title > span,
.page-hero-title > span,
.hero-title > span,
.page-hero-title > span,
.hero-title > .lang-en,
.hero-title > .lang-ta,
.page-hero-title > .lang-en,
.page-hero-title > .lang-ta {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  background: none !important;
}
.hero-title .highlight,
.page-hero-title .highlight,
.hero-title > span > span,
.page-hero-title > span > span,
.gradient-text,
.hero-title .gradient-text {
  color: var(--brass) !important;
  -webkit-text-fill-color: var(--brass) !important;
  background: none !important;
  font-style: italic;
}

/* Hero: paper ground, asymmetric split, no glow */
/* The band below always opens on .section's border-top (all eight pages put a
   .section straight after the hero), so the hero's own closing rule printed a
   second hairline in the adjacent pixel — the seam read as one heavy doubled
   line. Let the section's rule own the boundary. */
.hero {
  background: var(--paper);
  border-bottom: 0;
  min-height: 0;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero::before, .hero::after { display: none !important; }

/* Tighten the band above the headline. The legacy grid centres the short text
   column against the tall visual column, and legacy media queries re-assert a
   large top padding with !important, so both are pinned here. */
.hero { padding-top: clamp(1.5rem, 2.6vw, 2.5rem) !important; }
/* The split hero sizes to its content. The 100dvh floor that framed it left a
   few hundred pixels of bare paper under the CTA row on a laptop screen. */
.hero:has(.hero-grid) { min-height: 0; }
.hero-grid { align-items: start; }
/* style.css puts .hero-grid in a group with max-width: 100%, which cancels the
   .container measure and ran the hero edge to edge while every section below it
   sat on 1240px. Put the hero back on the page's own measure. */
.hero-grid.container { max-width: 1240px; }
.hero-pill, .hero-badge { margin-bottom: 1rem; }

/* Wide screens: the hero closed on a 5rem floor and the first band opened on a
   7rem one. Trim both sides of that seam to a deliberate 7.5rem in total;
   tablets and phones keep their own tuned rhythm. */
@media (min-width: 1024px) {
  .hero { padding-bottom: 3rem; }
  .hero + .section { padding-top: 4.5rem; }
}

/* ---- About: commemorative plate (replaces the old gradient plaque) ---- */
.plaque-svg, .plate-svg { display: block; width: 100%; height: auto; background: var(--ink); }
.plaque-field { fill: var(--ink); }
.plaque-rule { fill: none; stroke: var(--brass-border); stroke-width: 1; }
.plaque-rule.faint { stroke: rgba(242, 237, 225, 0.16); }
.plaque-seal circle { fill: none; stroke: var(--brass); stroke-width: 1.5; }
.plaque-seal circle.faint { stroke: rgba(184, 154, 92, 0.5); stroke-width: 1; }
.seal-year {
  fill: var(--paper);
  font-family: var(--font-heading);
  font-size: 38px;
  letter-spacing: -0.02em;
  text-anchor: middle;
}
.seal-label {
  fill: var(--brass-border);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 5px;
  text-anchor: middle;
}
.plaque-ta {
  fill: var(--brass-border);
  font-family: var(--font-tamil);
  font-size: 18px;
}
.plaque-en {
  fill: var(--paper);
  font-family: var(--font-heading);
  font-size: 34px;
  letter-spacing: -0.015em;
}
.plaque-hair { stroke: var(--brass); stroke-width: 1; opacity: 0.55; }
.plaque-meta {
  fill: #c9c0a8;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.1px;
}
.plaque-tl { stroke: rgba(242, 237, 225, 0.2); stroke-width: 1; }
.plaque-tl-dot { fill: var(--paper); }
.plaque-tl-dot.key { fill: var(--brass); }
.plaque-tl-label {
  fill: #c9c0a8;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-anchor: middle;
}

/* ---- About: Women's Wing crest plate ---- */
.wing-crest .ring { fill: none; stroke: var(--brass); stroke-width: 1.5; }
.wing-crest .ring.faint { stroke: rgba(184, 154, 92, 0.45); stroke-width: 1; }
.wing-crest .petals path { fill: none; stroke: var(--paper); stroke-width: 1; opacity: 0.85; }
.wing-crest .core { fill: var(--brass); }
.wing-pillar {
  fill: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.3px;
}
.wing-pillar .num { fill: var(--brass-border); }
.wing-ta {
  fill: #c9c0a8;
  font-family: var(--font-tamil);
  font-size: 11px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2.1rem, 3.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.hero-title .highlight,
.hero-title span span {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--brass);
  font-style: italic;
}

.hero-desc { color: var(--ink-2); font-size: 1.125rem; max-width: 58ch; }
.hero-desc.hero-desc-bold { font-weight: 700; }

/* Hero visual column: ink panel instead of floating dark card */
.hero-visual-frame {
  border: 1px solid var(--rule-strong);
  background: var(--ink);
  border-radius: 0;
  box-shadow: none;
}
.hero-visual-frame img { display: block; width: 100%; height: auto; }

.hero-card {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}
.hero-card h3, .hero-card h5, .hero-card-header h3 { color: var(--paper); }
.hero-card p { color: #c9c0a8; }
/* CTA row → ledger rule: .hero-cta-row carried 36px of its own while the strip
   pulled another 40px on top (flex children don't collapse margins), leaving
   76px of air above a hairline that kept only 24px below it. One shared step —
   1.5rem each side of the rule — so the strip's padding and the CTA gap match
   and the hairline reads as a deliberate divider. The !important outranks the
   2rem style.css pins on this row in its mobile blocks. */
.hero-cta-row { margin-bottom: 1.5rem !important; }

/* Stats strip as a ruled ledger */
.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-strong);
  margin-top: 0;
}
.stat-item {
  padding: 1rem 1rem 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.stat-item h4 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 400;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-item p { font-size: 0.8rem; color: var(--ink-3); }
.stat-item.stat-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}
.stat-item.stat-wide p { margin-top: 0; }

/* Sections: hairline-ruled, left-aligned */
.section { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--paper); border-top: 1px solid var(--rule-strong); }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--paper); }
.section-dark p { color: #c9c0a8; }

.section-header {
  text-align: left;
  max-width: 52rem;
  margin: 0 0 3rem;
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}
.section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--ink);
}
.section-subtitle { color: var(--ink-3); font-size: 1.05rem; max-width: 60ch; }

/* Cards: no boxes, ruled columns */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.grid-3 > .card {
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 2rem 2rem 2.25rem 0;
  margin-left: 0;
  transform: none;
}
.grid-3 > .card:nth-child(3n) { border-right: 0; }
.grid-3 > .card:nth-child(3n+2) { padding-left: 2rem; }
.grid-3 > .card:nth-child(3n+3) { padding-left: 2rem; }
.grid-3 > .card:hover { transform: none; box-shadow: none; background: transparent; }
.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.card-title { font-size: 1.4rem; font-weight: 400; margin-bottom: 0.6rem; }
.card-desc { color: var(--ink-2); }

/* Buttons: square, ink and brass */
.btn {
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--brass); border-color: var(--brass); color: var(--paper); }
.btn-secondary, .btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover, .btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--brass); border-color: var(--brass); color: var(--paper); }
.btn-accent:hover { background: var(--brass-hover); border-color: var(--brass-hover); }

/* ---- Part 3: districts, alerts, leaders, media, forms, dialogs, footer ---- */

.district-chip {
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9rem;
  padding: 0.55rem 0.2rem;
  box-shadow: none;
}
.district-chip:hover {
  background: var(--brass) !important;
  color: var(--paper) !important;
  border-color: var(--brass) !important;
  border-bottom-color: var(--brass) !important;
}

/* Dark bands: chips are paper text on a brass hairline, not translucent pills */
.section-dark .district-chip {
  color: var(--paper);
  border-bottom-color: rgba(184, 154, 92, 0.5);
}
.section-dark .district-chip:hover { border-bottom-color: var(--brass-border); }

/* Active nav: pale brass tint, so the label must be ink, not white */
.nav-link.active,
.nav-item-btn.active {
  color: var(--ink) !important;
  background: var(--brass-subtle) !important;
  border-color: var(--brass-border) !important;
}

.alert-card, .badge-danger {
  border-radius: 0;
}
.alert-card { background: transparent; border: 0; border-top: 1px solid var(--rule-strong); box-shadow: none; }

.leader-card, .media-showcase, .video-catalog-card, .calc-widget, .data-table, .custom-dialog {
  border-radius: 0;
  box-shadow: none;
}
.leader-card { background: transparent; border: 0; border-top: 1px solid var(--rule-strong); padding-top: 1.5rem; }
.leader-name { font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem; color: var(--ink); }
.leader-portrait-img { width: 180px; height: 180px; object-fit: cover; object-position: top center; border-radius: 0; filter: grayscale(0.35) contrast(1.02); }
.leader-role-badge { line-height: 1.55; display: inline-block; }
.leader-tel-pill { border-radius: 0; background: transparent; border: 1px solid var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 0.8rem; }

.calc-widget { background: var(--paper-2); border: 1px solid var(--ink); }
.calc-result-value { font-family: var(--font-heading); color: var(--ink); font-weight: 400; }

/* Component shells in style.css that still paint their own light surfaces.
   The accordion becomes a ruled list, and the focus state keeps the field
   transparent instead of flashing white on paper. */
.accordion-item {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-strong, rgba(23, 21, 15, 0.55));
  border-radius: 0;
  margin-bottom: 0;
}
.accordion-item .accordion-trigger { background: transparent !important; padding-left: 0; padding-right: 0; }
.accordion-trigger::after { color: var(--brass); }
.accordion-item .accordion-body { background: transparent !important; padding-left: 0; padding-right: 0; color: var(--ink-2); }
/* The legacy hero was a white-on-navy band; its background is paper now, so the
   inherited text colour has to follow or unclassed children turn invisible. */
.hero { color: var(--ink-2); }
.form-control:focus { background: transparent; }
dialog.custom-dialog::backdrop { background: rgba(23, 21, 15, 0.82); }
.card:hover .card-icon { background: var(--ink); color: var(--paper); }

.form-control {
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
  box-shadow: none;
}
.form-control:focus { border-bottom-color: var(--brass); box-shadow: 0 2px 0 -1px var(--brass); }
.form-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

.custom-dialog {
  background: var(--paper);
  color: var(--ink-2);
  border: 1px solid var(--ink);
}
.dialog-header { border-bottom: 1px solid var(--rule-strong); }
.dialog-header h3 { color: var(--ink); }

.data-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); border-bottom: 1px solid var(--ink); }
.data-table td { border-bottom: 1px solid var(--rule); }

/* Footer: ink ground, paper type */
.site-footer {
  background: var(--ink);
  color: #c9c0a8;
  border-top: 0;
}
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4,
.footer-heading, .footer-title { color: var(--paper); font-family: var(--font-heading); font-weight: 400; }
.footer-links a, .footer-col a { color: #c9c0a8; }
.footer-links a:hover, .footer-col a:hover { color: var(--brass-border); }
.footer-bottom { border-top: 1px solid rgba(242, 237, 225, 0.14); color: #a39a84; font-family: var(--font-mono); font-size: 0.75rem; }
.footer-bank-card, .footer-badge { border-radius: 0; background: transparent; border: 1px solid rgba(242, 237, 225, 0.2); }

/* Inline-style neutralisers: legacy pages hardcode light gradients and white text */
/* Any inline gradient is a legacy light wash -- the pages write it in hex, in
   rgb() and with or without spaces, so key on the function itself. The dark
   band is re-asserted immediately after, which wins on source order. */
[style*="linear-gradient"] { background: var(--paper-2) !important; }
[style*="linear-gradient(135deg, var(--color-primary-dark)"] { background: var(--ink) !important; }
/* Each rule carries both spellings -- "background:#x" and "background: #x" --
   because the pages mix them and a single form silently misses the other. */
[style*="background:#ffffff"], [style*="background: #ffffff"],
[style*="background:#f8fafc"], [style*="background: #f8fafc"],
[style*="background:#f1f5f9"], [style*="background: #f1f5f9"] { background: var(--color-surface) !important; }

/* Pastel alert tints → the palette's subtle tokens */
[style*="background:#fef2f2"], [style*="background: #fef2f2"] { background: var(--color-danger-subtle) !important; }
[style*="background:#ecfdf5"], [style*="background: #ecfdf5"] { background: var(--color-success-subtle) !important; }
[style*="background:#fffbeb"], [style*="background: #fffbeb"] { background: var(--color-accent-subtle) !important; }

/* Hardcoded legacy type colours → theme tokens */
[style*="color:#ffffff"], [style*="color: #ffffff"],
[style*="color:#fff"], [style*="color: #fff"] { color: var(--paper) !important; }
[style*="color:#cbd5e1"], [style*="color: #cbd5e1"],
[style*="color:#94a3b8"], [style*="color: #94a3b8"] { color: #c9c0a8 !important; }
[style*="color:#64748b"], [style*="color: #64748b"] { color: var(--ink-3) !important; }
[style*="color:#b45309"], [style*="color: #b45309"] { color: var(--brass) !important; }
[style*="color:#9a3412"], [style*="color: #9a3412"] { color: var(--color-danger) !important; }

/* ---- Header chrome: the last of the legacy blue and emerald accents ---- */

/* On wide screens the header sat on a 1360px track while the page content ran
   on 1240px, so the brand floated ~60px left of every headline. Put the header
   on the page's own measure so the nav and the copy share one left edge. Gated
   at 1280 because the row needs that track: at 1264px the actions landed exactly
   on the content edge with nothing spare, and the nav row has been wider than
   its track between 1041 and 1240 long before this rule. */
@media (min-width: 1280px) {
  .header-container {
    max-width: 1240px;
    padding-inline: 1.5rem;
  }
}

/* The row's floor — brand 304 + nav 670 + actions 220 + gaps — sits ~26px wider
   than that 1192px lane, and the actions cannot move: the nav links are nowrap
   and .header-actions is flex-shrink 0. Only the brand can yield, and its
   subtitle already ellipsises, so let the text block trim instead of the actions
   spilling into the right-hand gutter. */
.brand-identity { flex-shrink: 1; min-width: 0; }
.brand-text-wrap { min-width: 0; overflow: hidden; }

/* Below 1320 the header row's three poles — brand, nowrap nav (670px) and
   actions — fight for less track than they need (the full row is ~1180px and
   the uncapped lane bottom is 977px at 1041). Move the nav out: the drawer
   carries every link, so the burger rises to this whole band (.mobile-menu-btn
   otherwise appears only at 1040 and below), and with 670px gone the language
   switcher takes its old place in the actions with room to spare. Above 1320
   all three show as before. */
@media (max-width: 1319.98px) {
  .site-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* At 1320 the Tamil row tiles its lane: space-between only has 9.6px of
   surplus to distribute, so both joints sit at 16.8px against EN's ~44 and
   brand, nav and switcher read as one crowded band. TA labels run ~50px
   wider than EN, so take one more pixel of side padding per link (style.css
   already runs 8px against EN's 11px); the 16px recovered lifts each joint
   to ~25px. Nav is hidden below 1320, so this is moot there. */
html[lang="ta"] .nav-link {
  padding: 6px 7px;
}

/* The subtitle band returns at 1381 and immediately overfills the row: the
   lane is 1192px against demands of ~1201 (EN, subtitle unclipped) and ~1251
   (TA, subtitle wrapped) — the brand gets squeezed and both the subtitle and,
   in Tamil, the title ellipsise. Two moves, scoped to this band only:

   (a) the subtitle wraps instead of ellipsising. Tamil's single-line subtitle
       runs 357px and can never fit the 250px cap, so nowrap is the bug here;
       the longest word is 115px, so at a 260px cap it breaks to two clean
       lines inside the 70px header (EN's 257px side stays on one line).

   (b) the header track grows — but only to the right. The container's left
       edge is pinned back to the page's 1240px measure (what the auto margin
       was giving it at this width), so the brand keeps sharing its left edge
       with every headline below; the extra track beyond 1336px lands between
       nav and actions, where the slack belongs. At the very bottom of the band
       the viewport only offers a ~1262px track, so the list sheds its 2px gap
       (each link's own padding still separates the labels) and Tamil — which
       already runs 6px tighter — takes 6px side padding: +30px of clearance
       there, joints ~16px EN / ~34px TA by 1600. */
@media (min-width: 1381px) {
  .brand-subtitle {
    max-width: 260px;
    white-space: normal;
  }
  .nav-list {
    gap: 0;
  }
  html[lang="ta"] .nav-link {
    padding: 6px 6px;
  }
  .header-container {
    max-width: 1336px;
    margin-left: calc((100% - 1240px) / 2);
    margin-right: 0;
  }
}

/* The status dot beside "ESTD. 1992" was an emerald glow */
.top-badge-dot { background: var(--brass); box-shadow: none; }

/* Brand wordmark and the "& FMCG TV" badge sat in pure white and sky blue */
.site-header .brand-title { color: var(--paper); }
.site-header .brand-badge {
  background: transparent;
  color: var(--brass-border);
  border: 1px solid rgba(184, 154, 92, 0.45);
}

/* Dropdown popover icons and the footer link were blue on ink */
.nav-popover-icon {
  background: transparent;
  color: var(--brass-border);
  border: 1px solid rgba(184, 154, 92, 0.3);
}
.nav-popover-icon svg { color: inherit; }
.nav-popover-footer,
.nav-popover-footer .lang-en,
.nav-popover-footer .lang-ta { color: var(--brass-border); }
.nav-popover-footer:hover,
.nav-popover-footer:hover .lang-en,
.nav-popover-footer:hover .lang-ta { color: var(--paper); }

/* Flat chrome: no legacy drop shadows on the switcher or header CTA */
.lang-btn.active,
.btn-header-cta { box-shadow: none; }

/* ---- Header, dialog, footer and media band: the last blue, slate and white ---- */

/* Header pills were translucent white on ink */
.lang-switcher,
.lang-switch-wrap { background: transparent; border: 1px solid rgba(184, 154, 92, 0.4); border-radius: 0; }
.mobile-menu-btn { background: transparent; border: 1px solid rgba(184, 154, 92, 0.4); color: var(--paper); }
.burger-bar,
.mm-burger span { background: var(--paper); }

/* Header nav triggers: hover was pure white type on a translucent white pill,
   and the caret turned white too */
.nav-link:hover,
.nav-item-btn:hover,
.nav-item:hover > .nav-link,
.nav-item:hover > .nav-item-btn { background: rgba(242, 237, 225, 0.06); color: var(--paper); }
.nav-item:hover .nav-caret { color: var(--brass-border); }

/* Language switcher: the active pill was a blue chip with white type */
.lang-btn { color: #c9c0a8; border-radius: 0; }
.lang-btn:hover { color: var(--paper); }
.lang-btn.active { background: var(--brass); color: var(--paper); }

/* Header CTA was a solid blue button; make it a brass-outlined one that fills */
.btn-header-cta {
  background: transparent;
  border: 1px solid rgba(184, 154, 92, 0.55);
  border-radius: 0;
  color: var(--paper);
}
.btn-header-cta:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--paper);
  box-shadow: none;
  transform: none;
}

/* Dropdown popovers: rounded ink card with white-wash hovers and a blue icon
   that filled solid on hover */
.nav-popover,
.nav-mega,
.nav-mega-menu {
  background: var(--ink);
  border: 1px solid rgba(184, 154, 92, 0.4);
  border-radius: 0;
  box-shadow: none;
}
.nav-popover-item,
.nav-mega-link { border-radius: 0; }
.nav-popover-item:hover,
.nav-mega-link:hover { background: rgba(242, 237, 225, 0.06); }
.nav-popover-text strong,
.nav-mega-link strong,
.nav-popover-item:hover strong,
.nav-mega-link:hover strong { color: var(--paper); }
.nav-popover-text small,
.nav-mega-link small { color: #c9c0a8; }
/* The same descriptions laid out on a single nowrap line and ellipsised the
   longer ones; let them wrap to two lines (clamped) instead */
.nav-popover-text small,
.nav-mega-link small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow: hidden;
}
.nav-popover-item:hover .nav-popover-icon,
.nav-mega-link:hover .nav-mega-ico {
  background: transparent;
  border-color: var(--brass-border);
  color: var(--paper);
  transform: none;
}
.nav-popover-footer,
.nav-mega-feature {
  border-top-color: rgba(242, 237, 225, 0.16);
  border-radius: 0;
}
.nav-popover-footer:hover,
.nav-mega-feature:hover { background: rgba(184, 154, 92, 0.18); color: var(--paper); }
.nav-mega-feature .feature-btn { color: var(--brass-border); }

/* Mobile drawer: a #090d16 slab with white-wash hovers, fully unthemed */
.mobile-drawer,
.mm-mobile-drawer {
  background: var(--ink);
  border-left: 1px solid rgba(184, 154, 92, 0.45);
  border-radius: 0;
  box-shadow: none;
}
.drawer-header,
.drawer-footer { border-color: rgba(242, 237, 225, 0.16); }
.drawer-close-btn { color: var(--brass-border); border-radius: 0; }
.drawer-close-btn:hover { color: var(--paper); }
.drawer-link-item a,
.drawer-link,
.drawer-accordion-btn { color: var(--paper); border-radius: 0; }
.drawer-link-item a:hover,
.drawer-link:hover,
.drawer-accordion-btn:hover { background: rgba(242, 237, 225, 0.06); color: var(--paper); }
.drawer-link.active { background: rgba(184, 154, 92, 0.18); color: var(--paper); }
.drawer-accordion-content a { color: #c9c0a8; border-radius: 0; }
.drawer-accordion-content a:hover { color: var(--paper); background: rgba(242, 237, 225, 0.06); }
.drawer-contact-info { color: #c9c0a8; }

/* Ink bands and ink panels: the CTAs invert — filled buttons take a paper ground
   with an ink label, outlined ones a brass rule with paper type. Matched by class
   for dark sections, the media band and the mobile drawer, and by inline dark
   background for the subscribe and viewer cards on blog and media, which are ink
   without a .section-dark ancestor. !important because the legacy inline colours
   on these buttons and the neutralisers that replaced them both carry it. */
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-primary,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-accent,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-danger {
  background: var(--paper) !important;
  border-color: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: none;
}
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-primary:hover,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-accent:hover,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-danger:hover {
  background: var(--brass-subtle) !important;
  border-color: var(--brass-subtle) !important;
  color: var(--ink) !important;
}
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-secondary,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-outline {
  background: transparent !important;
  border-color: rgba(184, 154, 92, 0.55) !important;
  color: var(--paper) !important;
}
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-secondary:hover,
:is(.section-dark, .media-showcase, .mobile-drawer, [style*="var(--color-primary-dark)"]) .btn-outline:hover {
  background: var(--brass) !important;
  border-color: var(--brass) !important;
  color: var(--paper) !important;
}

/* Top utility bar: near-black slate with white-wash hovers, and the shared
   eyebrow rule dropped a dark top border plus top padding onto the ESTD badge,
   which pushed it off the bar's centre line. */
.top-bar {
  background: var(--ink);
  border-bottom: 1px solid rgba(184, 154, 92, 0.35);
  color: #c9c0a8;
}
.top-bar .top-badge {
  background: transparent;
  border: 0;
  padding: 0;
  color: #c9c0a8;
  font-size: 0.68rem;
  line-height: 1;
}
.top-link,
.top-bar-contact a { color: #c9c0a8; }
.top-link:hover,
.top-bar-contact a:hover { color: var(--paper); }
.top-action-btn { color: #c9c0a8; border-color: rgba(184, 154, 92, 0.4); border-radius: 0; }
.top-action-btn:hover {
  color: var(--paper);
  background: rgba(242, 237, 225, 0.06);
  border-color: var(--brass-border);
}

/* Grievance dialog: a white panel with white headings and white fields */
.dialog-content { background: var(--paper-2); color: var(--ink-2); }
.dialog-header { color: var(--ink); }
.dialog-header h2,
.dialog-header h3 { color: var(--ink); }
.dialog-content input,
.dialog-content select,
.dialog-content textarea {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}
.search-input {
  background: transparent;
  color: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--brass-border);
  border-radius: 0;
}
.search-input::placeholder { color: rgba(242, 237, 225, 0.55); }

/* Footer body copy: slate → muted paper */
.footer-desc,
.footer-address,
.footer-powered,
.footer-text-btn,
.bank-details,
.footer-badge { color: #c9c0a8; }
.site-footer a,
.site-footer code,
.footer-title span { color: var(--brass-border); }

/* Dark bands: white type and translucent white rows → paper and brass tint */
.media-showcase,
.video-player-box,
.video-list,
.video-meta,
.aicpdf-card-box { color: var(--paper); }
.section-dark .section-title { color: var(--paper); }
.video-list-item { background: transparent; border-bottom: 1px solid rgba(184, 154, 92, 0.25); }
.video-list-item.active { background: rgba(184, 154, 92, 0.18); color: var(--paper); }

/* Remaining translucent-white edges sitting on ink → brass */
.btn-header-cta { border-color: var(--brass); }
.leader-portrait-img { border-color: var(--rule-strong); }
.media-showcase .btn,
.video-playlist-column .btn,
.video-player-box .btn { border-color: rgba(184, 154, 92, 0.55); color: var(--paper); }
.media-showcase h5,
.video-playlist-column h5 { color: var(--paper); }

/* The media band's outline buttons carry a translucent-white border inline, so
   only !important can reach it */
[style*="border-color: rgba(255, 255, 255"],
[style*="border-color:rgba(255, 255, 255"],
[style*="border-color: rgba(255,255,255"],
[style*="border-color:rgba(255,255,255"] { border-color: rgba(184, 154, 92, 0.55) !important; }

/* Phone widths: the legacy inline grids keep their column count no matter how
   narrow the screen, so the membership term row and the calculator's two
   figures end up squeezed into ~90px and ~120px tracks. Stack them. */
@media (max-width: 560px) {
  [style*="repeat(3, 1fr)"],
  [style*="repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  .calc-widget [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Engraved plates (the 1994 plaque and the Women's Wing crest) are 720- and
   640-unit artworks scaled to the column width. On a phone that shrinks their
   timeline and pillar labels to 4–8px, so the plate reads as an empty dark
   panel. Hold a legible width and let the plate scroll, as the data table does. */
@media (max-width: 680px) {
  div:has(> .plaque-svg),
  div:has(> .plate-svg) { overflow-x: auto; }
  .plaque-svg,
  .plate-svg { min-width: 600px; }
}

/* Oversized legacy shadows and accent bars, flattened to the theme's rules */
[style*="box-shadow: 0 8px 24px"],
[style*="box-shadow: 0 8px 30px"],
[style*="box-shadow: var(--shadow-lg)"],
[style*="box-shadow: var(--shadow-xl)"] { box-shadow: none !important; }
[style*="border-top: 4px solid"] { border-top-width: 1px !important; }
[style*="border-left: 4px solid"],
[style*="border-left: 5px solid"] { border-left-width: 3px !important; }
[style*="background: var(--color-primary-dark)"] { background: var(--ink) !important; color: var(--paper) !important; }
.district-chip[style*="rgba(255,255,255"] { background: transparent !important; color: var(--paper) !important; border-bottom: 1px solid rgba(242, 237, 225, 0.25) !important; border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.section-dark .section-header h2, .section-dark h2[style*="color: #ffffff"] { color: var(--paper) !important; }
[style*="border-left: 6px solid"] { border-left: 3px solid var(--brass) !important; }
[style*="border: 2px solid var(--color-accent)"] { border-color: var(--ink) !important; }

/* Motion: reveal only when JS adds .reveal and motion is allowed */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Responsive: re-declared because style.css mobile rules load first */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 3rem; }
  .hero-stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > .card:nth-child(3n) { border-right: 1px solid var(--rule); }
  .grid-3 > .card:nth-child(2n) { border-right: 0; padding-left: 2rem; }
}
@media (max-width: 680px) {
  .container { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  .hero-title { font-size: clamp(1.42rem, 6.5vw, 2.2rem) !important; }
  .section-title { font-size: 2rem !important; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr !important; }
  .grid-3 > .card { padding-left: 0 !important; border-right: 0; border-bottom: 1px solid var(--rule); }
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   Grievance dialog — compact editorial form panel
   The markup ships .form-grid / .dialog-actions / .dialog-intro, but none of
   them had any rules, and the inputs carried no class at all: the form fell
   back to raw browser widgets inside a 640px card. This block gives the panel
   a fixed frame (header + scrolling body + sticky actions) and the fields a
   consistent control style.
   ========================================================================== */
dialog.custom-dialog {
  max-width: 720px;
  width: min(720px, 94vw);
  background: var(--paper);
  color: var(--ink-2);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 860px);
  background: var(--paper);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.dialog-header {
  flex: 0 0 auto;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.85rem 1.35rem;
  gap: 1rem;
  align-items: center;
}

.dialog-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  gap: 0.5rem;
}

.dialog-header h3 svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--brass);
}

.dialog-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.dialog-close:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.05rem 1.35rem 1.25rem;
}

.dialog-intro {
  max-width: 66ch;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-3);
}

/* paired fields get two columns instead of a 7-row tower */
.grievance-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1.15rem;
}

.grievance-form .form-group {
  margin: 0;
  gap: 0.3rem;
}

.grievance-form label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

/* only the full-width fields sit outside a row; a + rule would also push the
   second column of every grid row down by the same amount */
.grievance-form > .form-group {
  margin-top: 0.95rem;
}

/* the amount field is numeric; native spinners fight the 36px control height */
.grievance-form input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.grievance-form input[type="number"]::-webkit-outer-spin-button,
.grievance-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* one control style for every field, whatever element it is */
.dialog-content input,
.dialog-content select,
.dialog-content textarea {
  width: 100%;
  min-height: 36px;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.dialog-content textarea {
  min-height: 84px;
  resize: vertical;
}

.dialog-content input::placeholder,
.dialog-content textarea::placeholder {
  color: #9b9382;
}

.dialog-content input:focus,
.dialog-content select:focus,
.dialog-content textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(138, 100, 32, 0.16);
}

.dialog-content input:user-invalid,
.dialog-content textarea:user-invalid,
.dialog-content select:user-invalid {
  border-color: var(--oxblood);
}

.dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding: 0.8rem 0 0.15rem;
  background: linear-gradient(to bottom, rgba(242, 237, 225, 0) 0, var(--paper) 30%);
  border-top: 1px solid var(--rule);
}

.dialog-actions .btn {
  min-height: 36px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

/* Tamil needs a little more leading than Latin at this size */
.lang-ta .dialog-intro,
.lang-ta .grievance-form label {
  line-height: 1.65;
}

@media (max-width: 640px) {
  .grievance-form .form-grid { grid-template-columns: 1fr; }
  dialog.custom-dialog { width: 96vw; }
  .dialog-header { padding: 0.75rem 1rem; }
  .dialog-body { padding: 0.9rem 1rem 1.1rem; }
  .dialog-actions { gap: 0.45rem; }
  .dialog-actions .btn { flex: 1 1 auto; }
}

/* WhatsApp + Phone paired links for +91 98840 63063 */
.icon-whatsapp {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.top-phone-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-wa-link {
  color: #25d366 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.top-wa-link:hover {
  color: #4ade80 !important;
  transform: scale(1.08);
}

.leader-contact-links {
  flex-wrap: wrap;
}

.leader-tel-group {
  display: inline-flex;
  align-items: stretch;
}

.leader-tel-group .leader-wa-pill {
  border-left: 0;
  padding: 4px 8px;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leader-tel-group .leader-wa-pill:hover {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.footer-phone-row,
.drawer-hotline-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wa-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #16a34a !important;
  vertical-align: middle;
  transition: transform 0.15s ease, color 0.15s ease;
}

.footer-phone-row .wa-inline-link {
  color: #25d366 !important;
}

.wa-inline-link:hover {
  color: #15803d !important;
  transform: scale(1.1);
}

.footer-phone-row .wa-inline-link:hover {
  color: #4ade80 !important;
}
