/* Tamil Nadu Forest Academy — site stylesheet */
:root {
  --m1: #4a1018;
  --m2: #7b2430;
  --m3: #a3414b;
  --brand: #7b2430;
  --brand-dark: #4a1018;
  --gold: #e8b84a;
  --tint: #f8f3ee;
  --paper: #ffffff;
  --ink: #221a1a;
  --muted: #5a5050;
  --line: #e8dfd8;
  --footer: #ececec;
  --focus: #0b57d0;
  --grad: linear-gradient(100deg, var(--m1) 0%, var(--m2) 55%, var(--m3) 100%);
  --shadow: 0 6px 22px rgba(60, 20, 24, .12);
  --radius: 16px;
  --wrap: 78rem;
  --serif: Cambria, "Hoefler Text", Georgia, "Times New Roman", "Noto Serif", "Noto Serif Tamil", "Nirmala UI", Latha, serif;
}
html[data-contrast="high"] {
  --m1: #000; --m2: #000; --m3: #000; --brand: #000; --brand-dark: #000; --gold: #ffe600;
  --tint: #fff; --ink: #000; --muted: #000; --line: #000; --footer: #fff; --focus: #c00000;
  --grad: #000; --shadow: 0 0 0 2px #000;
}
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
html[data-text="small"] { font-size: 95%; }
html[data-text="large"] { font-size: 120%; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--m3); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0 0 .5em; line-height: 1.2; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); font-variant-caps: small-caps; letter-spacing: .06em; color: var(--brand); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: .5rem; top: -4rem; z-index: 100; background: var(--paper); color: var(--ink); padding: .6rem 1rem; border: 2px solid var(--focus); }
.skip:focus { top: .5rem; }

/* Buttons */
.btn { display: inline-block; font-weight: 700; font-size: .9rem; letter-spacing: .02em; text-decoration: none; color: #fff; background: var(--brand); border: 2px solid var(--brand); border-radius: 8px; padding: .45rem 1.1rem; margin: 0 .4rem .4rem 0; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--m1); border-color: var(--m1); color: #fff; }
.btn-line { background: transparent; color: var(--brand); }

/* Top bar */
.topbar { background: var(--paper); font-size: .8rem; color: var(--ink); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; min-height: 2.4rem; }
.topbar-gov { font-weight: 700; }
.tools { display: flex; align-items: center; gap: .35rem; }
.tools a { margin-right: .5rem; color: var(--ink); }
.tools button { font-size: .8rem; font-weight: 700; color: var(--ink); background: #eeeaea; border: 0; border-radius: 6px; min-width: 2rem; min-height: 1.75rem; padding: 0 .45rem; cursor: pointer; }
.tools button:hover, .tools button[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* Header */
.head { background: var(--grad); color: #fff; position: relative; z-index: 30; }
.head > .wrap { position: relative; z-index: 3; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand > img { flex: none; width: 4.4rem; height: 4.4rem; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-ta { font-size: 1rem; font-weight: 700; color: var(--gold); }
.brand-en { font-size: clamp(1.15rem, .95rem + 1.2vw, 1.8rem); font-variant-caps: small-caps; letter-spacing: .09em; }
.brand-side { display: flex; align-items: center; gap: .9rem; flex: none; }
.cm { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.35); }

/* Navigation */
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .5rem; padding-block: .5rem .6rem; }
.nav > ul > li { position: relative; }
.nav a { display: block; color: #fff; text-decoration: none; }
.nav > ul > li > a { padding: .55rem .85rem; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid transparent; }
.nav .has-sub > a::after { content: ""; display: inline-block; width: .38rem; height: .38rem; margin-left: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2rem) rotate(45deg); }
.nav > ul > li > a:hover, .nav > ul > li:focus-within > a, .nav > ul > li > a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.nav .sub { position: absolute; left: 0; top: 100%; min-width: 15.5rem; background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); padding: .4rem; display: none; z-index: 40; }
.nav li:last-child .sub, .nav li:nth-last-child(2) .sub, .nav li:nth-last-child(3) .sub { left: auto; right: 0; }
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { display: block; }
.nav .sub a { color: var(--ink); padding: .5rem .75rem; font-size: .92rem; border-radius: 6px; }
.nav .sub a:hover, .nav .sub a:focus-visible { background: var(--tint); color: var(--brand); }
.nav-toggle { display: none; font-size: .9rem; font-weight: 700; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.7); border-radius: 8px; padding: .5rem .8rem; cursor: pointer; white-space: nowrap; }
@media (min-width: 62em) and (max-width: 76em) {
  .nav > ul { gap: 0; }
  .nav > ul > li > a { padding: .55rem .5rem; font-size: .74rem; letter-spacing: .05em; }
}
@media (max-width: 61.99em) {
  .js .nav-toggle { display: inline-block; }
  .js .nav { display: none; }
  .js .head.open .nav { display: block; }
  .nav > ul { flex-direction: column; padding-bottom: 1rem; }
  .nav .sub { position: static; display: block; background: transparent; box-shadow: none; padding: 0 0 .25rem 1rem; min-width: 0; }
  .nav .sub a { color: #fff; opacity: .92; padding: .35rem .75rem; }
  .nav .sub a:hover, .nav .sub a:focus-visible { background: rgba(255,255,255,.16); color: #fff; }
  .brand > img { width: 3rem; height: 3rem; }
  .brand { gap: .5rem; }
  .brand-ta { font-size: .78rem; }
  .cm { width: 3.6rem; height: 3.6rem; border-width: 2px; }
  .brand-side { gap: .5rem; }
}
@media (max-width: 34em) {
  .brand > img:nth-of-type(2) { display: none; }
  .brand-en { font-size: 1rem; letter-spacing: .05em; }
  .brand-ta { display: none; }
}

/* Hero (home): the photograph only */
.hero { background: var(--m1); }
.hero picture { display: block; }
.hero img { width: 100%; height: auto; }

/* Boards (home) */
.boards { padding-block: 0 2.5rem; margin-top: -3rem; position: relative; z-index: 31; }
.board-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr)); }
.board { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.board-head { background: var(--grad); color: #fff; font-size: 1.4rem; margin: 0; padding: .65rem 1.25rem; }
.news { list-style: none; margin: 0; padding: .4rem 1.25rem; }
.news li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.news li:last-child { border-bottom: 0; }
.news a { display: block; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.4; }
.news a:hover { color: var(--brand); text-decoration: underline; }
.news time, .news span { display: block; font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.news.dots li { padding-left: 1.1rem; position: relative; }
.news.dots li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--brand); }
.status { font-size: .95rem; font-weight: 400; font-variant-caps: small-caps; letter-spacing: .1em; color: var(--brand); margin: 1rem 1.25rem 0; padding-bottom: .2rem; border-bottom: 1px solid var(--brand); }
.board-foot { margin: auto 0 0; padding: .9rem 1.25rem 1rem; background: #fbf9f7; border-top: 1px solid var(--line); }
.board-foot .btn { margin: 0; }

/* Leaders (home) */
.leaders { padding-block: 1rem 0; }
.leader-row { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); max-width: 52rem; margin-inline: auto; }
.leader { display: flex; align-items: center; gap: 1.1rem; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; }
.leader img { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--brand); }
.leader b { display: block; font-size: 1.1rem; color: var(--brand-dark); }
.leader span { display: block; font-size: .9rem; color: var(--muted); }

/* Page banner (inner pages) */
.banner { background: var(--grad); color: #fff; padding-block: 1.5rem 2.25rem; margin-top: -1px; }
.banner h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); font-variant-caps: small-caps; letter-spacing: .07em; color: #fff; margin: 0 0 .2em; }
.banner p { margin: 0; max-width: 50rem; color: #f6e9e6; }
.banner .crumbs { font-size: .82rem; margin-bottom: .6rem; color: #ecd6d2; }
.crumbs a { color: #fff; }
.banner .eyebrow { color: var(--gold); }

/* Sections */
section { padding-block: 3rem; }
section.alt, section.tint { background: var(--tint); }
.sec-head { text-align: center; margin-bottom: 1.75rem; }
.sec-head::after { content: ""; display: block; width: 4.5rem; height: 2px; background: var(--gold); margin: .5rem auto 0; }
.eyebrow { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: .35rem; }
.lead { font-size: 1.06rem; max-width: 50rem; }
.prose { max-width: 50rem; }
.cols { display: grid; gap: 2.25rem; }
@media (min-width: 52em) { .cols { grid-template-columns: 1fr 1.15fr; align-items: center; } .cols.even { grid-template-columns: 1fr 1fr; align-items: start; } }
.cols .sec-head { text-align: left; }
.cols .sec-head::after { margin-left: 0; }
.more { font-weight: 700; }
.plain { margin: 0 0 1.1rem; }

/* Figures */
figure { margin: 0; }
figure img { width: 100%; border-radius: var(--radius); background: var(--tint); }
figcaption { font-size: .88rem; color: var(--muted); padding-top: .5rem; font-style: italic; }
.framed img { box-shadow: var(--shadow); }

/* Key figures */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 2rem 0 0; }
@media (min-width: 48em) { .stats { grid-template-columns: repeat(4, 1fr); } }
.cols .stats { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.stats li { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; text-align: center; border-top: 3px solid var(--gold); }
.stats b { display: block; font-weight: 400; font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.6rem); color: var(--brand); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stats span { display: block; font-size: .9rem; color: var(--muted); margin-top: .3rem; }

/* Cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr)); }
@media (min-width: 44em) { .grid.two { grid-template-columns: 1fr 1fr; } }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(60, 20, 24, .18); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.card-body { padding: 1rem 1.2rem 1.2rem; }
.card h3 { margin-bottom: .3em; }
.card h3 a { text-decoration: none; color: var(--brand); }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: .95rem; color: var(--muted); }
.card .meta { display: block; font-size: .9rem; font-variant-caps: small-caps; letter-spacing: .14em; color: var(--muted); margin-bottom: .15rem; }
.numbered { counter-reset: n; }
.numbered .card-body::before { counter-increment: n; content: counter(n, upper-roman); display: block; font-size: 1.6rem; color: var(--gold); line-height: 1.2; }
.tile { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.3rem 1.1rem; border-top: 3px solid var(--gold); }
.tile h3 a { color: var(--brand); text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

/* People */
.people { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.person { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 1.4rem .9rem 1.2rem; }
.person img[src*="director"], .leader img[src*="director"] { object-position: center; }
.person img, .avatar { display: block; width: 8rem; height: 8rem; margin: 0 auto .9rem; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--brand); overflow: hidden; }
.avatar svg { width: 100%; height: auto; }
.person b { display: block; font-size: 1.05rem; color: var(--brand-dark); }
.person span:not(.avatar) { display: block; font-size: .87rem; color: var(--muted); margin-top: .3rem; line-height: 1.4; }
.officer-line { margin: 1.5rem auto 0; max-width: 34rem; text-align: center; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1.25rem; }
.officer-line b { display: block; color: var(--brand-dark); }
.officer-line span { display: block; font-size: .9rem; color: var(--muted); }

/* Story (animated carousel) */
.story-sec { padding-bottom: 2.5rem; overflow: hidden; }
.story { --w: 17rem; --gap: 1.25rem; --h: 25rem; --detail: 0rem; margin-bottom: 1.5rem; }
.story:focus-visible { outline-offset: -3px; }
.story-view { overflow-x: auto; padding: 1rem 1.25rem 1.5rem; }
.story-track { display: flex; gap: var(--gap); list-style: none; margin: 0; padding: 0; align-items: flex-start; }
.story-card { flex: none; width: var(--w); }
.story-media { position: relative; width: var(--w); max-width: 100%; height: var(--h); border-radius: 28px; overflow: hidden; background: #2a2223; box-shadow: var(--shadow); }
.story-media picture { display: block; }
.story-media picture, .story-media img { width: 100%; height: 100%; }
.story-media img { object-fit: cover; border-radius: 0; -webkit-user-drag: none; user-select: none; }
.story-media::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; }
.story-plain .story-media::after { content: none; }
.js .story-plain .story-track { align-items: center; }
.story-year { position: absolute; left: 1.25rem; bottom: .9rem; z-index: 2; color: #fff; font-size: 2.6rem; line-height: 1; letter-spacing: .04em; font-variant-numeric: lining-nums; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.story-cap { text-align: center; padding: .9rem .25rem 0; }
.story-cap h3 { font-weight: 400; font-size: 1.15rem; margin: 0 0 .15rem; }
.story-cap p { margin: 0; color: var(--muted); font-size: .95rem; }
.story-detail { padding: .75rem .25rem 0; }
.story-detail h3, .story-detail .story-chapter, .story-detail .story-when, .story-count { display: none; }
.story-detail p { font-size: .95rem; margin: 0; }

.js .story-view { overflow: hidden; perspective: 1800px; touch-action: pan-y; cursor: grab; }
.js .story-view.is-dragging { cursor: grabbing; }
.js .story-track { transition: transform .8s cubic-bezier(.22, .75, .2, 1); will-change: transform; }
.js .story-card { overflow: hidden; cursor: pointer; transform: scale(.92); transition: width .8s cubic-bezier(.22, .75, .2, 1), transform .8s cubic-bezier(.22, .75, .2, 1); }
.js .story-media { transition: width .8s cubic-bezier(.22, .75, .2, 1), height .8s cubic-bezier(.22, .75, .2, 1); }
.js .story-card.is-before { transform: scale(.92) rotateY(7deg); }
.js .story-card.is-after { transform: scale(.92) rotateY(-7deg); }
.js .story-card.is-active { cursor: inherit; transform: none; }
.js .story-detail { display: none; }
.js .story-media.is-fit img { object-fit: contain; }
/* Cards out of focus are shown in a single tone of the site's maroon */
.js .story-media img { transition: filter .6s; }
.js .story-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--m2); mix-blend-mode: color; opacity: 0; transition: opacity .6s; pointer-events: none; }
.js .story-card:not(.is-active) .story-media img { filter: grayscale(1) contrast(1.05); }
.js .story-card:not(.is-active) .story-media::before { opacity: .5; }
.js .story-card:not(.is-active) .story-cap { opacity: .7; }
@media (min-width: 60em) {
  .story { --w: 19rem; --h: 29rem; --gap: 1.5rem; --detail: 27rem; }
  .story-plain { --detail: 0rem; }
  .js .story:not(.story-plain) .story-card.is-active { display: grid; grid-template-columns: auto minmax(0, 1fr); background: #2b2526; border-radius: 28px; box-shadow: 0 18px 44px rgba(40, 14, 18, .32); }
  .js .story:not(.story-plain) .is-active .story-media { box-shadow: none; }
  .js .story:not(.story-plain) .is-active .story-cap { display: none; }
  .js .story:not(.story-plain) .is-active .story-detail { display: flex; flex-direction: column; height: var(--h); padding: 2rem 2rem 1.5rem; color: #f3ecea; animation: story-in .6s .2s both; }
  .js .is-active .story-detail .story-chapter { display: block; font-variant-caps: small-caps; letter-spacing: .14em; color: #cbbdb9; font-size: .95rem; margin: 0 0 1.1rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(255,255,255,.14); }
  .js .is-active .story-detail .story-when { display: block; font-size: 3.4rem; line-height: 1; color: var(--gold); margin: 0 0 .5rem; font-variant-numeric: lining-nums; }
  .js .is-active .story-detail h3 { display: block; color: #fff; font-weight: 400; font-size: 1.6rem; margin: 0 0 .8rem; }
  .js .is-active .story-detail p { font-size: 1rem; line-height: 1.6; }
  .js .is-active .story-detail .story-count { display: block; margin-top: auto; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.14); color: #cbbdb9; font-size: .85rem; letter-spacing: .1em; }
  .js .story:not(.story-plain) .is-active .story-year, .js .story:not(.story-plain) .is-active .story-media::after { display: none; }
}
@media (max-width: 59.99em) {
  .js .story:not(.story-plain) .is-active .story-detail { display: block; text-align: center; animation: story-in .6s .2s both; }
}
@keyframes story-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Landscape panels: text one side, photograph the other */
.feature { display: grid; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.5rem; }
.feature-text { padding: 1.6rem 1.75rem; align-self: center; }
.feature-kicker { font-variant-caps: small-caps; letter-spacing: .14em; color: var(--muted); margin: 0 0 .3rem; }
.feature h3 { font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); color: var(--brand); margin-bottom: .8rem; }
.feature dl.facts { margin: 0; }
.feature dd b { font-size: 1.5rem; font-weight: 400; color: var(--brand); font-variant-numeric: lining-nums tabular-nums; }
.feature figure, .feature picture { display: block; height: 100%; }
.feature img { width: 100%; height: 100%; min-height: 15rem; max-height: 24rem; object-fit: cover; border-radius: 0; }
@media (min-width: 52em) {
  .feature { grid-template-columns: 1fr 1.25fr; }
  .feature.flip { grid-template-columns: 1.25fr 1fr; }
  .feature.flip .feature-text { order: 2; }
}

/* Map of sending States */
.flow-fig { margin: 0; }
.flowmap { display: block; width: 100%; height: auto; max-width: 34rem; margin-inline: auto; font-family: var(--serif); }
.flow-lines path { stroke-dasharray: 7 6; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -13; } }
.flow-home .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.flow-fig figcaption, .legend { font-style: normal; font-size: .85rem; color: var(--muted); text-align: center; }
.key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin: 0 .3rem 0 .9rem; vertical-align: -1px; }
.key:first-child { margin-left: 0; }
.key-on { background: var(--brand); } .key-home { background: var(--gold); } .key-off { background: #e8dbd2; }
.st-code { display: inline-block; min-width: 2.1rem; color: var(--brand); font-variant-numeric: lining-nums; }
@media (min-width: 52em) { .flow-cols { grid-template-columns: 1.15fr 1fr; align-items: center; } }
.hl { background: linear-gradient(transparent 55%, var(--gold) 55%); color: var(--brand-dark); font-weight: 700; padding: 0 .15em; }

/* Batch ledger */
.ledger td, .ledger th { vertical-align: middle; padding-block: .85rem; }
.ledger-no { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 400; font-size: 1.05rem; letter-spacing: .04em; }
.ledger-when { white-space: nowrap; color: var(--muted); font-variant-numeric: lining-nums; }
.ledger-total { font-size: 1.7rem; color: var(--brand); line-height: 1; }
.ledger-states { min-width: 16rem; font-size: .92rem; }
.split { display: flex; gap: 2px; width: 11rem; height: .8rem; }
.split-m { background: var(--brand); border-radius: 5px 0 0 5px; }
.split-f { background: var(--gold); border-radius: 0 5px 5px 0; }
.split-note { display: block; font-size: .82rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; }
.ledger tbody tr { transition: background-color .15s; }
.ledger tbody tr:hover { background: #f6ece6; }
.legend { text-align: left; margin: .8rem 0 0; }

/* Notes from the course reports */
.sub-head { font-weight: 400; font-variant-caps: small-caps; letter-spacing: .1em; font-size: 1.25rem; color: var(--brand); margin: 2rem 0 1rem; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.notes li { position: relative; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem 1.1rem 4.6rem; min-height: 5rem; }
.notes b { position: absolute; left: 1rem; top: 1rem; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 400; letter-spacing: .04em; }
.note-when { display: block; font-variant-caps: small-caps; letter-spacing: .12em; color: var(--muted); font-variant-numeric: lining-nums; }
.notes p { margin: .2rem 0 0; font-size: .95rem; }
.two-col { columns: 2 22rem; column-gap: 2.5rem; }
.two-col li { break-inside: avoid; margin-bottom: .5rem; }
.feature + .grid { margin-top: .5rem; }
.feature-stack { margin-top: 2rem; }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pub { display: grid; grid-template-columns: 8.5rem 1fr auto; align-items: stretch; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.pub:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(60, 20, 24, .18); }
.pub-spine { background: var(--grad); color: #fff; padding: 1.1rem .9rem; display: flex; flex-direction: column; justify-content: center; text-align: center; border-right: 3px solid var(--gold); }
.pub-spine span { font-variant-caps: small-caps; letter-spacing: .1em; font-size: .85rem; color: #f3dfdb; line-height: 1.3; }
.pub-spine b { font-weight: 400; font-size: 1.35rem; font-variant-numeric: lining-nums; margin-top: .2rem; }
.pub-body { padding: 1.1rem 1.4rem; align-self: center; }
.pub-body h3 { font-weight: 400; font-size: 1.25rem; color: var(--brand); margin-bottom: .3rem; }
.pub-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.pub-get { padding: 1.1rem 1.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-width: 11.5rem; border-left: 1px solid var(--line); text-align: center; }
.pub-get .btn { margin: 0; white-space: nowrap; }
.pub-get span { font-size: .82rem; color: var(--muted); font-variant-numeric: lining-nums; }
@media (max-width: 44em) {
  .pub { grid-template-columns: 1fr; }
  .pub-spine { flex-direction: row; justify-content: space-between; align-items: baseline; padding: .6rem 1.2rem; border-right: 0; border-bottom: 3px solid var(--gold); }
  .pub-spine b { margin: 0; font-size: 1.1rem; }
  .pub-get { flex-direction: row; justify-content: flex-start; gap: .9rem; border-left: 0; border-top: 1px solid var(--line); padding: .8rem 1.2rem; }
}

/* Officers named without a photograph */
.people.solo { grid-template-columns: minmax(12rem, 18rem); justify-content: center; }
.officers { list-style: none; margin: 1.25rem auto 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); max-width: 60rem; }
.officers li { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--gold); padding: 1rem 1.2rem; text-align: center; }
.officers b { display: block; font-size: 1.05rem; color: var(--brand-dark); }
.officers span { display: block; font-size: .88rem; color: var(--muted); margin-top: .2rem; }

/* Bars */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 10.5rem 1fr 2rem; align-items: center; gap: .75rem; padding: .3rem 0; font-size: .92rem; }
.bar-track { background: var(--line); border-radius: 6px; height: .7rem; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.bars b { font-weight: 400; text-align: right; font-variant-numeric: lining-nums tabular-nums; color: var(--brand-dark); }
.w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
@media (max-width: 30em) { .bars li { grid-template-columns: 8rem 1fr 1.6rem; font-size: .85rem; } }

/* Organisation structure */
.org { display: grid; gap: 1.5rem; }
.org-top { display: grid; justify-items: center; gap: 1.5rem; }
.org-node { position: relative; background: var(--grad); color: #fff; border-radius: 12px; padding: .8rem 1.5rem; text-align: center; width: min(24rem, 100%); box-shadow: var(--shadow); }
.org-node b { display: block; font-size: 1.1rem; }
.org-node span { display: block; font-size: .88rem; color: #f3dfdb; }
.org-top .org-node::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 1.5rem; background: var(--gold); }
.org-node.lead { width: 100%; background: var(--m2); box-shadow: none; }
.org-cols { display: grid; gap: 1.5rem; align-items: stretch; }
@media (min-width: 60em) { .org-cols { grid-template-columns: 1fr 1fr; } .org-unit h3 { white-space: nowrap; } }
.org-unit { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--gold); padding: 1.4rem; }
.org-unit h3 { font-weight: 400; font-size: 1.25rem; color: var(--brand); margin-bottom: .1rem; }
.org-place { color: var(--muted); margin-bottom: 1rem; }
.org-label { font-variant-caps: small-caps; letter-spacing: .14em; color: var(--brand); margin: 1.1rem 0 .5rem; }
.org-cells { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 40em) { .org-cells { grid-auto-flow: row; } }
.org-cell { background: var(--tint); border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; text-align: center; min-height: 8.75rem; display: flex; flex-direction: column; justify-content: center; }
.org-cell b { display: block; color: var(--brand-dark); }
.org-cell span { display: block; font-size: .88rem; color: var(--muted); margin-top: .15rem; }
.org-force { border: 1px dashed var(--brand); border-top: 3px solid var(--gold); }
.org-force > p:not(.org-label) { margin-bottom: 0; }
.org-source { font-size: .85rem; color: var(--muted); margin: 0; }
.center { text-align: center; margin-top: 1.5rem; }

/* Tables */
.table-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .65rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--brand); color: #fff; border-top: 0; white-space: nowrap; font-weight: 400; font-variant-caps: small-caps; letter-spacing: .08em; }
tbody tr:nth-child(even) { background: #fbf8f5; }
tfoot td, tfoot th { font-weight: 700; background: var(--tint); }
.num { text-align: right; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
html[data-contrast="high"] tbody tr:nth-child(even), html[data-contrast="high"] tfoot td, html[data-contrast="high"] tfoot th { background: #fff; }

/* Notice */
.notice { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--gold); padding: 1.25rem 1.4rem; }
.notice h2 { font-size: 1.5rem; }
.notice p:last-child, .notice dl:last-child { margin-bottom: 0; }

/* Gallery */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); list-style: none; padding: 0; margin: 0 0 2.5rem; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
dialog.viewer { border: 0; padding: 0; background: #111; color: #fff; max-width: min(96vw, 90rem); max-height: 96vh; border-radius: var(--radius); overflow: hidden; }
dialog.viewer::backdrop { background: rgba(0,0,0,.82); }
dialog.viewer img { max-width: 96vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; }
dialog.viewer p { margin: 0; padding: .6rem 3.5rem .7rem 1rem; font-size: .95rem; }
dialog.viewer button { position: absolute; top: .5rem; right: .5rem; font-size: 1.1rem; width: 2.5rem; height: 2.5rem; background: #fff; color: #111; border: 0; border-radius: 50%; cursor: pointer; }

/* Contact */
.contact-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--gold); padding: 1.4rem; }
.contact-card h2 { font-size: 1.4rem; }
address { font-style: normal; margin-bottom: 1rem; }
dl.facts { display: grid; grid-template-columns: minmax(7.5rem, auto) 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
dl.facts dt { font-weight: 700; color: var(--brand-dark); }
dl.facts dd { margin: 0; }

/* Footer */
.footer { background: var(--footer); color: var(--ink); font-size: .92rem; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding-block: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }
.footer-brand { text-align: center; }
.footer-brand img { width: 5.5rem; margin: 0 auto .75rem; mix-blend-mode: multiply; }
.footer-brand b { color: var(--brand); }
.footer h2 { font-size: 1.1rem; letter-spacing: .1em; color: var(--ink); margin-bottom: .8rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .55rem; }
.chev li { padding-left: 1rem; position: relative; }
.chev li::before { content: ""; position: absolute; left: 0; top: .6em; width: .35rem; height: .35rem; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.contact-list li { display: flex; gap: .6rem; align-items: flex-start; }
.contact-list svg { flex: none; margin-top: .25rem; color: var(--brand); }
.footer-base { background: var(--m1); color: #fff; padding-block: .8rem; font-size: .82rem; }
.footer-base .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .gallery img, .btn, .js .story-track, .js .story-card { transition: none; }
  .card:hover { transform: none; }
  .js .is-active .story-detail, .flow-lines path, .flow-home .pulse { animation: none; }
  .js .story-media, .js .story-media img, .js .story-media::before { transition: none; }
}
@media print {
  .topbar, .nav, .nav-toggle, .footer, .skip, .hero, .cm { display: none; }
  .head, .banner { background: #fff; color: #000; }
  .banner h1, .brand, .brand-ta { color: #000; text-shadow: none; }
  section { padding-block: 1rem; }
}

/* Language choice (English / Tamil) */
.tools .lang { display: inline-flex; margin-right: .5rem; border: 1px solid var(--brand); border-radius: 6px; overflow: hidden; }
.tools .lang a { display: inline-flex; align-items: center; min-height: 1.75rem; margin: 0; padding: 0 .65rem; font-weight: 700; color: var(--brand); text-decoration: none; }
.tools .lang a:hover { background: var(--tint); }
.tools .lang a[aria-current="true"] { background: var(--brand); color: #fff; }

/* Tamil edition: Tamil type does not take letter-spacing, capitals or small capitals */
html[lang="ta"] body { line-height: 1.75; }
:lang(ta) { letter-spacing: normal !important; text-transform: none !important; font-variant-caps: normal !important; }
html[lang="ta"] h1, html[lang="ta"] h2, html[lang="ta"] h3 { line-height: 1.4; }
html[lang="ta"] .brand-ta { font-size: clamp(1.1rem, .95rem + 1vw, 1.6rem); }
html[lang="ta"] .brand-en { font-size: clamp(.85rem, .8rem + .3vw, 1rem); }
@media (max-width: 34em) {
  html[lang="ta"] .brand-ta { display: block; font-size: 1rem; }
  html[lang="ta"] .brand-en { display: none; }
}
.tools .lang, .tools .lang a { flex: none; white-space: nowrap; }
@media (max-width: 40em) { .tools { flex-wrap: wrap; row-gap: .35rem; padding-bottom: .35rem; } }

/* Publications: view button and flip-book viewer */
.pub-get button.btn { cursor: pointer; font-family: inherit; }
.book { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: #1c0c0e; color: #fff; overflow: hidden; }
.book::backdrop { background: rgba(0, 0, 0, .6); }
.book[open] { display: flex; flex-direction: column; }
.book-bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: rgba(0, 0, 0, .35); }
.book-title { flex: 1; margin: 0; font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-count { font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .85; }
.book-close { font-size: 1.6rem; line-height: 1; width: 2.4rem; height: 2.4rem; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.book-stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem .5rem; min-height: 0; }
.book-nav { flex: none; width: 2.8rem; height: 2.8rem; font-size: 2rem; line-height: 1; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.book-nav:hover:not(:disabled) { background: rgba(255,255,255,.28); }
.book-nav:disabled { opacity: .25; cursor: default; }
.book-spread { --pw: 20rem; --ph: 26.6rem; position: relative; display: flex; width: calc(var(--pw) * 2); height: var(--ph); perspective: 2600px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.book-spread.is-single { width: var(--pw); }
.book-spread.is-single .book-left { display: none; }
.book-page { position: relative; width: var(--pw); height: var(--ph); background: #fff; overflow: hidden; }
.book-left { box-shadow: inset -18px 0 24px -18px rgba(0,0,0,.45); }
.book-right { box-shadow: inset 18px 0 24px -18px rgba(0,0,0,.45); }
.book-spread.is-single .book-right { box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.book-page.is-blank { background: transparent; box-shadow: none; }
.book img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.book-leaf { display: none; position: absolute; top: 0; width: var(--pw); height: var(--ph); transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45, .05, .25, 1); z-index: 3; }
.book-leaf.on-right { display: block; left: var(--pw); transform-origin: left center; }
.book-leaf.on-left { display: block; left: 0; transform-origin: right center; }
.book-leaf.on-single { display: block; left: 0; transform-origin: left center; }
.book-leaf.on-right.turn-next, .book-leaf.on-single.turn-next { transform: rotateY(-180deg); }
.book-leaf.on-left.turn-prev { transform: rotateY(180deg); }
.book-leaf.on-single.turn-prev { transform-origin: right center; transform: rotateY(180deg); }
.leaf-face { position: absolute; inset: 0; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 24px rgba(0,0,0,.35); }
.leaf-back { transform: rotateY(180deg); }
.leaf-face.is-blank { background: #fff; }
@media (max-width: 47.49em) { .book-nav { width: 2.2rem; height: 2.2rem; font-size: 1.5rem; } .book-stage { gap: .4rem; } }
@media print { .book { display: none; } }

/* Story carousel: period treatments for early photographs */
.story-card .story-media { position: relative; }
.fx-retro .story-media img { filter: sepia(.85) saturate(.5) contrast(1.22) brightness(.88) blur(.3px); }
.fx-retro .story-media::after { inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 45%), radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(40, 22, 6, .75) 100%); }
.fx-sepia .story-media img { filter: sepia(1) saturate(1.05) contrast(1.04) brightness(.97); }

/* Home: officials' names on one line */
.leader b { white-space: nowrap; }
html[lang="ta"] .leader-row { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); max-width: 58rem; }
html[lang="ta"] .leader b { font-size: 1.02rem; }

/* Tamil edition: keep the main menu on one line */
@media (min-width: 62em) {
  html[lang="ta"] .nav > ul { flex-wrap: nowrap; gap: 0; }
  html[lang="ta"] .nav > ul > li > a { white-space: nowrap; font-size: .86rem; padding: .55rem .6rem; }
  html[lang="ta"] .nav .has-sub > a::after { margin-left: .35rem; }
}
@media (min-width: 62em) and (max-width: 80em) {
  html[lang="ta"] .nav > ul > li > a { font-size: .78rem; padding: .55rem .42rem; }
}

/* Fact lists: keep the label column from crowding out the values (long Tamil labels) */
dl.facts { grid-template-columns: minmax(6.5rem, 38%) 1fr; }
/* Feature cards: the photograph fills the full height of the text beside it */
@media (min-width: 52em) {
  .feature figure, .feature picture { min-height: 100%; }
  .feature img { max-height: none; min-height: 100%; }
}
.stats b small { font-size: .45em; font-weight: 400; }
@media (min-width: 52em) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .feature.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  html[lang="ta"] .feature, html[lang="ta"] .feature.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.mag-intro { margin-bottom: 1.5rem; align-items: center; }
.mag-intro figure { max-width: 20rem; margin-inline: auto; }
@media (min-width: 52em) { .mag-intro { grid-template-columns: 20rem 1fr; } }
/* Tamil edition: story text is longer, so the detail panel uses a smaller scale and never clips */
@media (min-width: 60em) {
  html.js[lang="ta"] .is-active .story-detail .story-chapter { font-size: .85rem; margin-bottom: .7rem; padding-bottom: .6rem; }
  html.js[lang="ta"] .is-active .story-detail .story-when { font-size: 2.6rem; }
  html.js[lang="ta"] .is-active .story-detail h3 { font-size: 1.3rem; line-height: 1.35; margin-bottom: .5rem; }
  html.js[lang="ta"] .is-active .story-detail p { font-size: .86rem; line-height: 1.6; }
  html.js[lang="ta"] .story:not(.story-plain) .is-active .story-detail { padding: 1.5rem 1.6rem 1.2rem; overflow-y: auto; }
}
