/* =========================================================
   Simple Kerala — Content-page styles
   ========================================================= */

/* ---------- Extras (content pages only) ---------- */
html {
    overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
body {
    overflow-x: hidden;
    max-width: 100%;
    font-optical-sizing: auto;
    background-image:
        radial-gradient(circle at 12% -5%, rgba(28, 90, 77, 0.06), transparent 42%),
        radial-gradient(circle at 92% 8%, rgba(156, 50, 20, 0.05), transparent 40%);
    transition:
        background-color 0.35s ease,
        color 0.35s ease;
}
.stat,
.chartcard,
.scheme-card,
.takeaway,
details.deep,
header.bar {
    transition:
        background-color 0.35s ease,
        border-color 0.35s ease,
        color 0.35s ease;
}
.wrap {
    min-width: 0;
}
.read {
    max-width: var(--read);
}
section {
    scroll-margin-top: 84px;
}

/* ---------- Design tokens (content extras) ---------- */
:root {
    --rule: #c6baa0;
    --green-soft: #dde8e1;
    --alarm-2: #bd4524;
    --alarm-soft: #f0ddd2;
    --gold-soft: #efe4c7;
    --dark-2: #1c2c27;
    --shadow: 0 1px 2px rgba(30, 27, 22, 0.05), 0 10px 34px rgba(30, 27, 22, 0.09);
    --shadow-lg: 0 24px 60px rgba(21, 32, 28, 0.22);
    --read: 760px;
    --disp: "Fraunces", Georgia, serif;
}
[data-theme="dark"] {
    --rule: #494032;
    --green-soft: #1d3a33;
    --alarm-2: #ea9069;
    --alarm-soft: #3a2118;
    --gold-soft: #3a2f17;
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- Accessibility ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    transform: translateY(-140%);
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 800;
    color: var(--paper);
    background: var(--ink);
    border: 2px solid var(--gold);
    border-radius: 999px;
    padding: 9px 14px;
    text-decoration: none;
    transition: transform 0.16s ease;
}
.skip-link:focus-visible {
    transform: none;
    outline: none;
}

/* ---------- Footer element defaults (moved up) ----------
   Footer's bare element selectors (h3/p/a/b) are low specificity; declared
   before the higher-specificity component rules they would otherwise follow
   (satisfies Biome noDescendingSpecificity; targets are disjoint so cascade-neutral). */
footer h3 {
    font-family: var(--disp);
    color: #efe9dc;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 16px;
}
footer p {
    margin: 0 0 12px;
    line-height: 1.7;
    color: #bcccc4;
}
footer a {
    color: #8fd0bd;
}
footer b,
footer strong {
    color: #efe9dc;
}

/* ---------- Progress bar ---------- */
#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 120;
    background: linear-gradient(90deg, var(--green), var(--gold), var(--alarm));
    transition: width 0.12s linear;
}

/* ---------- Jump-to-section dropdown ---------- */
.jump {
    margin-left: auto;
    flex: none;
    position: relative;
}
.jump select {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}
.jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: linear-gradient(180deg, var(--panel), var(--paper-2));
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 9px 6px 7px;
    min-height: 44px;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
    white-space: nowrap;
    max-width: 42vw;
}
.jump-label {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    flex: none;
    background: var(--green);
    color: #fff;
    font-size: 8px;
    letter-spacing: 0.04em;
}
.jump-short {
    display: none;
}
.jump-btn .jump-cur {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 22ch;
}
.jump-btn:hover,
.jump-btn:focus-visible,
.jump.open .jump-btn,
.jump:hover .jump-btn {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 10px 22px rgba(28, 90, 77, 0.13);
}
.jump-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}
.jump-caret {
    flex: none;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    color: var(--muted);
}
.jump:hover .jump-caret,
.jump.open .jump-caret {
    transform: rotate(180deg);
    color: var(--green);
}
.jump-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 36px));
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(0.98);
    transform-origin: top right;
    transition:
        opacity 0.16s ease,
        transform 0.16s ease,
        visibility 0.16s;
    z-index: 130;
}
.jump-menu::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 0;
    right: 0;
    height: 9px;
}
.jump:hover .jump-menu,
.jump.open .jump-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.jump-menu a {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 10px;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background-color 0.12s ease,
        color 0.12s ease;
}
.jump-menu a span:first-child {
    font-size: 10px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.08em;
}
.jump-menu a span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jump-menu a:hover,
.jump-menu a:focus-visible {
    background: var(--green-soft);
    color: var(--green);
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.jump-menu a.on {
    background: var(--ink);
    color: var(--paper);
}
.jump-menu a.on span:first-child {
    color: var(--gold);
}

/* ---------- Scroll helper ---------- */
.scroll-helper {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 115;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s;
}
.scroll-helper-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid rgba(198, 186, 160, 0.72);
    background: rgba(251, 248, 241, 0.94);
    color: #1e1b16;
    box-shadow: 0 14px 36px rgba(30, 27, 22, 0.18);
    backdrop-filter: saturate(140%) blur(10px);
    font-family: var(--ui);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}
.scroll-sections {
    border-radius: 999px;
    padding: 0 14px;
}
.scroll-helper-btn:hover,
.scroll-helper-btn:focus-visible,
.scroll-helper.open .scroll-sections {
    background: #1e1b16;
    border-color: #1e1b16;
    color: #f4efe4;
    transform: translateY(-2px);
    outline: none;
}
.scroll-top {
    width: 44px;
    border-radius: 50%;
}
.scroll-top svg,
.scroll-sections svg {
    width: 16px;
    height: 16px;
    flex: none;
}
.scroll-helper-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(310px, calc(100vw - 36px));
    max-height: min(420px, calc(100vh - 120px));
    overflow: auto;
    padding: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transform-origin: bottom right;
    transition:
        opacity 0.16s ease,
        transform 0.16s ease,
        visibility 0.16s;
}
.scroll-helper.open .scroll-helper-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.scroll-helper-menu a {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 10px;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
}
.scroll-helper-menu a span:first-child {
    font-size: 10px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.08em;
}
.scroll-helper-menu a span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scroll-helper-menu a:hover,
.scroll-helper-menu a:focus-visible {
    background: var(--green-soft);
    color: var(--green);
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.scroll-helper-menu a.on {
    background: var(--ink);
    color: var(--paper);
}
.scroll-helper-menu a.on span:first-child {
    color: var(--gold);
}

/* ---------- Stat strip ---------- */
.strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: #1b1813;
    border-radius: 16px;
    overflow: hidden;
    margin: -46px auto 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}
.strip .cell {
    padding: 26px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.strip .cell:last-child {
    border-right: 0;
}
.strip .num {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(26px, 3.4vw, 38px);
    letter-spacing: -1px;
    color: #f0a07f;
    line-height: 1;
}
.strip .lab {
    font-family: var(--ui);
    font-size: 12px;
    color: #b9b2a4;
    margin-top: 10px;
    line-height: 1.4;
}

/* ---------- Bottom line / verdict ---------- */
.verdict {
    padding: 84px 0 30px;
}
.verdict .wrap {
    max-width: 920px;
}
.verdict .kicker {
    color: var(--alarm);
    display: block;
    margin-bottom: 18px;
}
.verdict h2 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.06;
    letter-spacing: -0.8px;
    margin: 0 0 26px;
    max-width: 18ch;
}
.verdict .intro {
    font-size: 21px;
    color: var(--ink-soft);
    margin: 0 0 38px;
    max-width: 62ch;
}
.verdict .intro::first-letter {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 3.4em;
    line-height: 0.72;
    float: left;
    padding: 8px 12px 0 0;
    color: var(--green);
}
ol.findings {
    list-style: none;
    counter-reset: f;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
}
ol.findings li {
    counter-increment: f;
    position: relative;
    padding: 22px 0 22px 56px;
    border-top: 1px solid var(--rule);
}
ol.findings li::before {
    content: counter(f, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 20px;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 26px;
    color: var(--alarm);
    letter-spacing: -1px;
}
ol.findings li .ftag {
    display: block;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 8px;
}

/* ---------- Chapters ---------- */
.chapter {
    padding: 30px 0 14px;
}
.chapter .wrap {
    max-width: 920px;
}
.chap-divider {
    height: 1px;
    background: var(--rule);
    max-width: var(--maxw);
    margin: 34px auto 0;
    background-image: linear-gradient(
        90deg,
        transparent,
        var(--rule) 12%,
        var(--rule) 88%,
        transparent
    );
}
.chap-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
    padding-top: 52px;
}
.chap-num {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(62px, 10vw, 128px);
    line-height: 0.8;
    letter-spacing: -3px;
    color: transparent;
    -webkit-text-stroke: 1.4px var(--green);
    margin-top: -6px;
}
.chap-head .label {
    display: block;
    margin-bottom: 12px;
    color: var(--green);
    letter-spacing: 0.2em;
}
.chap-head h2 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(28px, 4.3vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.8px;
    margin: 0 0 6px;
}
.chap-head .sub {
    font-family: var(--ui);
    color: var(--muted);
    font-size: 13.5px;
    margin: 0;
    line-height: 1.5;
}

/* ---------- Takeaway ---------- */
.takeaway {
    margin: 32px 0 8px;
    padding: 24px 30px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 5px solid var(--alarm);
    border-radius: 6px;
    position: relative;
    box-shadow: var(--shadow);
}
.takeaway .kicker {
    color: var(--alarm);
    display: block;
    margin-bottom: 9px;
}
.takeaway p {
    font-family: var(--disp);
    font-weight: 500;
    font-size: clamp(20px, 2.6vw, 27px);
    line-height: 1.28;
    letter-spacing: -0.3px;
    margin: 0;
    color: var(--ink);
}
/* In the closing, the Nehru pullquote is the visual climax — keep the
   core-point quote restrained so the two don't compete. */
#closing .takeaway p {
    font-size: clamp(18px, 1.9vw, 21px);
    line-height: 1.42;
    letter-spacing: -0.1px;
}

/* ---------- Stat cards ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 14px;
    margin: 30px 0 8px;
}
.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 18px 16px;
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(30, 27, 22, 0.13);
}
.stat .v {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 27px;
    letter-spacing: -0.8px;
    line-height: 1;
    color: var(--green);
}
.stat.warn .v {
    color: var(--alarm);
}
.stat .l {
    font-family: var(--ui);
    font-size: 12px;
    color: var(--muted);
    margin-top: 9px;
    line-height: 1.42;
}

/* ---------- Chart cards ---------- */
.chartcard {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px 22px 18px;
    box-shadow: var(--shadow);
    margin: 28px 0 8px;
    min-width: 0;
    overflow: hidden;
}
.chartcard .ct {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.3px;
    margin: 0 0 3px;
    color: var(--ink);
}
.chartcard .cs {
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.45;
}
.chartbox {
    position: relative;
    height: 340px;
    min-width: 0;
    max-width: 100%;
}
.chartbox.tall {
    height: 380px;
}
.chartgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.chartgrid .chartbox {
    height: 300px;
}
.chartnote {
    font-family: var(--ui);
    font-size: 11px;
    color: var(--muted);
    margin: 13px 0 0;
    line-height: 1.4;
}

/* ---------- Deep disclosure ---------- */
details.deep {
    margin: 26px 0 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel);
}
details.deep > summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding: 17px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    background: linear-gradient(180deg, var(--panel), var(--paper-2));
}
details.deep > summary::-webkit-details-marker {
    display: none;
}
details.deep > summary .tw {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--rule);
    display: grid;
    place-items: center;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
    color: var(--green);
    background: rgba(28, 90, 77, 0.05);
    flex: none;
}
details.deep > summary .tw::before {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}
details.deep > summary:hover .tw,
details.deep > summary:focus-visible .tw {
    background: var(--green-soft);
    border-color: var(--green);
}
details.deep > summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}
details.deep[open] > summary .tw {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
details.deep[open] > summary .tw::before {
    transform: translateY(2px) rotate(225deg);
}
details.deep > summary .pill {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-soft);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    flex: none;
}
details.deep > summary .stxt {
    min-width: 0;
}
.deepbody {
    padding: 6px 24px 22px;
}

/* ---------- Subheads, points, recs ---------- */
h4.subhead {
    font-family: var(--ui);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--alarm);
    margin: 24px 0 12px;
    font-weight: 800;
}
h4.subhead:first-child {
    margin-top: 8px;
}
ul.points {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
}
ul.points li {
    position: relative;
    padding: 11px 0 11px 28px;
    border-bottom: 1px dashed var(--line);
    font-size: 17px;
    color: var(--ink-soft);
    line-height: 1.5;
}
ul.points li:last-child {
    border-bottom: none;
}
ul.points li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 19px;
    width: 8px;
    height: 8px;
    background: var(--green);
    transform: rotate(45deg);
}
ul.recs {
    list-style: none;
    counter-reset: r;
    margin: 6px 0 0;
    padding: 0;
}
ul.recs li {
    counter-increment: r;
    position: relative;
    padding: 14px 0 14px 46px;
    font-size: 16.5px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    line-height: 1.5;
}
ul.recs li:last-child {
    border-bottom: none;
}
ul.recs li::before {
    content: counter(r);
    position: absolute;
    left: 0;
    top: 13px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
}
.callout {
    background: var(--alarm-soft);
    border: 1px solid #e6c3b2;
    border-left: 5px solid var(--alarm);
    border-radius: 8px;
    padding: 18px 22px;
    margin: 26px 0 4px;
    font-size: 16.5px;
    color: #6e2410;
    line-height: 1.5;
}
.callout b {
    color: #511a0b;
}

/* ---------- Ledep ---------- */
.ledep {
    font-size: 17px;
    color: var(--ink-soft);
    margin: 0 0 18px;
    padding-left: 18px;
    border-left: 3px solid var(--green);
}

/* ---------- Appendix block ---------- */
.appendix-block {
    padding-top: 8px;
}
.appendix-block + .appendix-block {
    margin-top: 34px;
    border-top: 1px solid var(--rule);
    padding-top: 30px;
}
.appendix-block h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 25px;
    letter-spacing: -0.4px;
    margin: 0 0 4px;
}
.appendix-block .axsub {
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 14px;
}

/* ---------- Pullquote ---------- */
.pullquote {
    margin: 38px 0 0;
    padding: 34px 38px;
    border-radius: 12px;
    color: #efe9dc;
    background: linear-gradient(140deg, rgba(28, 90, 77, 0.96), rgba(21, 32, 28, 0.98));
    border-left: 5px solid var(--gold);
    box-shadow: var(--shadow-lg);
}
.pullquote .kicker {
    color: #91cfbd;
    display: block;
    margin-bottom: 14px;
}
.pullquote p {
    margin: 0;
    font-family: var(--disp);
    font-weight: 500;
    font-size: clamp(24px, 3.4vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.4px;
}
.pullquote span {
    display: block;
    margin-top: 16px;
    color: rgba(207, 216, 209, 0.82);
    font-family: var(--ui);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Schemes grid ---------- */
.schemes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 30px 0 8px;
}
.scheme-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 18px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}
.scheme-card:hover {
    transform: translateY(-3px);
    border-color: var(--green);
    box-shadow: 0 16px 34px rgba(30, 27, 22, 0.13);
}
.scheme-card .tag {
    font-family: var(--ui);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-soft);
    padding: 5px 10px;
    border-radius: 999px;
    width: fit-content;
}
.scheme-card .tag.red {
    color: var(--alarm);
    background: var(--alarm-soft);
}
.scheme-card .tag.gold {
    color: #71520e;
    background: var(--gold-soft);
}
.scheme-card h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.4px;
    line-height: 1.04;
    margin: 0;
    color: var(--ink);
}
.scheme-card p {
    margin: 0;
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ---------- Table card ---------- */
.tablecard {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px 22px 18px;
    box-shadow: var(--shadow);
    margin: 28px 0 8px;
    min-width: 0;
    overflow: hidden;
}
.tablecard .tcap {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.3px;
    margin: 0 0 3px;
    color: var(--ink);
}
.tablecard .tsub {
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.45;
}
.tablecard .scroll-x {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.tablecard table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-family: var(--ui);
    font-size: 14px;
}
.tablecard table th,
.tablecard table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.tablecard table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.tablecard table tr:last-child td {
    border-bottom: 0;
}
.tablecard table td:last-child,
.tablecard table th:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tablecard table tbody tr:hover td {
    background: var(--green-soft);
}
.tablecard table td.neg {
    color: var(--alarm);
    font-weight: 600;
}

/* ---------- Work promo ---------- */
.work-promo {
    margin-top: 68px;
    padding: 58px 0 62px;
    background: var(--dark);
    color: #e9e1d0;
    border-top: 3px solid var(--gold);
}
.work-promo .wrap {
    max-width: 920px;
}
.work-promo .kicker {
    color: #91cfbd;
    display: block;
    margin-bottom: 12px;
}
.work-promo h2 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(30px, 4.2vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.7px;
    margin: 0;
    max-width: 13ch;
    color: #f4efe4;
}
.work-promo .intro {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 36px;
    align-items: end;
    margin-bottom: 28px;
}
.work-promo .dek {
    font-family: var(--body);
    font-size: 20px;
    line-height: 1.55;
    color: #c6d4cc;
    margin: 0;
    max-width: 34ch;
}
.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.work-card {
    display: flex;
    flex-direction: column;
    min-height: 232px;
    padding: 24px;
    border: 1px solid rgba(214, 169, 74, 0.42);
    border-radius: 8px;
    background: #f5efe3;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
    text-decoration: none;
    color: #1e1b16;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
}
.work-card:hover,
.work-card:focus-visible {
    transform: translateY(-4px);
    border-color: #d6a94a;
    background: #fff8e9;
    outline: none;
}
.work-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.work-mark {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 18px;
    background: #f5efe3;
    border: 1px solid rgba(30, 27, 22, 0.12);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
.work-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.work-mark.zeta-logo {
    background: #fff;
}
.work-card .tag {
    font-family: var(--ui);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9c3214;
    margin-bottom: 18px;
}
.work-card-head .tag {
    margin-bottom: 0;
}
.work-card h3 {
    font-family: var(--disp);
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.4px;
    margin: 0 0 12px;
    color: #1e1b16;
}
.work-card p {
    font-family: var(--ui);
    font-size: 14px;
    line-height: 1.6;
    color: #4d463b;
    margin: 0 0 24px;
}
.work-card .go {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 800;
    color: #1c5a4d;
}
.work-card .go::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}
.work-card:hover .go::after,
.work-card:focus-visible .go::after {
    transform: translateX(3px) rotate(45deg);
}
.work-promo .related {
    margin-top: 26px;
    font-family: var(--ui);
    font-size: 13px;
    color: #bcccc4;
}
.work-promo .related a {
    color: #8fd0bd;
    font-weight: 700;
}

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    *,
    *::before,
    *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------- Footer (content page dark) ---------- */
footer {
    background: var(--dark);
    color: #a9bbb2;
    padding: 64px 0 48px;
    margin-top: 64px;
    font-family: var(--ui);
    font-size: 14px;
}
footer .wrap {
    max-width: 920px;
}
footer .src {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 8px 0 0;
}
footer .src b {
    color: #efe9dc;
}
.disc {
    font-size: 12px;
    color: #7f938a;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    margin-top: 26px;
    line-height: 1.6;
}
.socials {
    margin-top: 22px;
}
.work-promo .socials {
    justify-content: center;
    margin-top: 32px;
}
.socials a,
.socials button {
    color: #efe9dc;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.socials a:hover,
.socials a:focus-visible,
.socials button:hover,
.socials button:focus-visible {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    outline: none;
}
.socials svg {
    width: 18px;
    height: 18px;
}

/* ---------- Content hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 76px;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}
.hero .eyebrow {
    color: #86c7b4;
    margin: 0 0 20px;
}
.hero h1 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(38px, 6.6vw, 80px);
    line-height: 0.98;
    letter-spacing: -1.5px;
    margin: 0 0 22px;
    overflow-wrap: break-word;
}
.hero h1 em {
    font-style: italic;
    font-weight: 500;
    color: #e7c878;
}
.hero .dek {
    font-size: clamp(19px, 2.3vw, 24px);
    line-height: 1.5;
    color: #cfd8d1;
    max-width: 740px;
    margin: 0 0 34px;
    font-weight: 400;
}
.hero .meta {
    font-family: var(--ui);
    font-size: 12.5px;
    color: #9bb0a8;
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
}
.hero .meta b {
    color: #efe9dc;
    font-weight: 700;
}
.hero .meta a {
    color: #9ad2c1;
}
.hero-share {
    margin-top: 24px;
}
.hero-share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-family: var(--ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.16s ease;
}
.hero-share a:hover {
    color: #fff;
}
.hero-share svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.scrollcue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    font-family: var(--ui);
    font-size: 10.5px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #7fa093;
    animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(6px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .scrollcue {
        animation: none;
    }
}

/* ---------- Content responsive ---------- */
@media (max-width: 820px) {
    .strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .strip .cell:nth-child(2) {
        border-right: 0;
    }
    .strip .cell:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    ol.findings {
        grid-template-columns: 1fr;
    }
    .schemes {
        grid-template-columns: repeat(2, 1fr);
    }
    .chartgrid {
        grid-template-columns: 1fr;
    }
    .chap-head {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .chap-num {
        font-size: 64px;
    }
}
@media (max-width: 680px) {
    .hamburger {
        display: inline-flex;
    }
    .mobile-nav {
        display: block;
    }
    .mobile-close {
        display: inline-flex;
    }
    .site-nav {
        display: none;
    }
    .bar .wrap {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto auto auto;
        gap: 8px;
        padding: 0 18px;
    }
    .logo {
        font-size: 15px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .jump {
        min-width: 0;
    }
    .jump-btn {
        gap: 6px;
        max-width: none;
        min-width: 64px;
        justify-content: center;
        padding: 7px 8px;
    }
    .jump-label {
        display: none;
    }
    /* biome-ignore lint/style/noDescendingSpecificity: earlier .jump-btn .jump-cur sets only overflow/text-overflow/white-space/max-width; this sets display — no property overlap, so order is irrelevant. */
    .jump-cur {
        display: none;
    }
    .jump-short {
        display: inline;
        font-size: 12px;
        letter-spacing: 0.08em;
    }
    .jump-menu {
        right: -104px;
        top: calc(100% + 12px);
        width: calc(100vw - 28px);
        max-height: calc(100vh - 92px);
        overflow: auto;
    }
    .scroll-helper {
        right: 14px;
        bottom: 14px;
    }
    .scroll-sections {
        padding: 0 12px;
    }
    .scroll-helper-menu {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 104px);
    }
    .langctl {
        padding: 2px;
    }
    .langctl button {
        font-size: 10.5px;
        padding: 6px 9px;
    }
    .themebtn {
        width: 44px;
        height: 44px;
    }
    .hero {
        padding: 74px 0 70px;
    }
    .hero .wrap {
        padding: 0 22px;
    }
    .hero h1 {
        font-size: clamp(34px, 10vw, 46px);
        line-height: 1.04;
        letter-spacing: -0.5px;
        max-width: 100%;
    }
    .hero .dek {
        font-size: 20px;
        line-height: 1.46;
    }
    .hero .meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .hero .meta span,
    .hero .meta a {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .chartcard {
        padding: 18px 14px 16px;
    }
    .chartbox,
    .chartbox.tall,
    .chartgrid .chartbox {
        height: 300px;
    }
    .tablecard {
        padding: 18px 14px 16px;
    }
    .deepbody {
        padding: 6px 18px 20px;
    }
    .work-promo {
        margin-top: 52px;
        padding: 46px 0 50px;
    }
    .work-promo .intro {
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
    }
    .work-promo .dek {
        max-width: none;
    }
    .work-grid {
        grid-template-columns: 1fr;
    }
    .schemes {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 520px) {
    .strip {
        grid-template-columns: 1fr;
    }
    .strip .cell {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}
@media (max-width: 430px) {
    .wrap {
        width: min(100% - 36px, var(--maxw));
    }
    .bar .wrap {
        height: 58px;
        gap: 6px;
        padding: 0 14px;
    }
    .logo {
        font-size: 14px;
    }
    .jump-btn {
        min-width: 54px;
        padding: 6px 7px;
    }
    .jump-short {
        font-size: 11px;
    }
    .jump-caret {
        width: 12px;
        height: 12px;
    }
    .jump-menu {
        right: -98px;
        width: calc(100vw - 24px);
    }
    .scroll-helper {
        right: 12px;
        bottom: 12px;
    }
    .scroll-helper-btn {
        height: 42px;
    }
    .scroll-top {
        width: 42px;
    }
    .scroll-sections span {
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .langctl button {
        padding: 6px 8px;
    }
    .themebtn {
        width: 38px;
        height: 38px;
    }
    details.deep > summary {
        padding: 15px 16px;
        gap: 10px;
    }
    details.deep > summary .pill {
        font-size: 9.5px;
        letter-spacing: 0.05em;
        padding: 4px 8px;
    }
    details.deep > summary .stxt {
        font-size: 12.5px;
        line-height: 1.35;
    }
    details.deep > summary .tw {
        width: 30px;
        height: 30px;
    }
    /* biome-ignore lint/style/noDescendingSpecificity: earlier .verdict .kicker sets color/display/margin; this sets font-size/letter-spacing for all kickers at this breakpoint — no property overlap, and .kicker is general so it must not be scoped. */
    .kicker {
        font-size: 10.5px;
        letter-spacing: 0.16em;
    }
    .hero {
        padding-top: 68px;
    }
    .hero h1 {
        font-size: clamp(32px, 9.2vw, 40px);
    }
    .hero .dek {
        font-size: 19px;
    }
    .takeaway {
        padding: 20px 20px;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .stat {
        padding: 16px 16px 14px;
    }
    .chartbox,
    .chartbox.tall,
    .chartgrid .chartbox {
        height: 280px;
    }
}

/* ---------- Inline glossary tooltips ---------- */
/* A ".term" is a jargon word or abbreviation a normal reader may not know.
   Hover (desktop), tap (touch) or focus (keyboard) reveals a plain-English note. */
.term {
    position: relative;
    border-bottom: 1.5px dotted var(--green-2);
    cursor: help;
    text-underline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
}
.term:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Single shared tooltip bubble, positioned & viewport-clamped by tooltip.js */
.term-tip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    max-width: min(290px, calc(100vw - 24px));
    padding: 11px 13px;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    color: var(--paper);
    background: var(--ink);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease;
    will-change: transform;
}
.term-tip.is-visible {
    opacity: 1;
    visibility: visible;
}
.term-tip__arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--ink);
    transform: rotate(45deg);
}
.term-tip[data-placement="top"] .term-tip__arrow {
    bottom: -5px;
}
.term-tip[data-placement="bottom"] .term-tip__arrow {
    top: -5px;
}
@media (prefers-reduced-motion: reduce) {
    .term-tip {
        transition: none;
    }
}

/* findings list item heading/body — placed after later base h3/p rules
   for Biome noDescendingSpecificity; cascade-neutral (specificities differ). */
ol.findings li h3 {
    font-family: var(--ui);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
    color: var(--ink);
}
ol.findings li p {
    margin: 0;
    font-size: 16.5px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ---------- Dark theme element overrides ----------
   Placed after base rules so lower-specificity base selectors precede their
   higher-specificity [data-theme="dark"] counterparts
   (satisfies Biome noDescendingSpecificity; cascade-neutral as specificities differ). */
[data-theme="dark"] .chartcard {
    background: #fbf8f1;
    border-color: #e2dac8;
}
[data-theme="dark"] .chartcard .ct {
    color: #1e1b16;
}
[data-theme="dark"] .chartcard .cs,
[data-theme="dark"] .chartnote {
    color: #6f685a;
}
[data-theme="dark"] .callout {
    color: #f0c4ad;
}
[data-theme="dark"] .callout b {
    color: #f6dccb;
}
[data-theme="dark"] .tablecard {
    background: #fbf8f1;
    border-color: #e2dac8;
}
[data-theme="dark"] .tablecard .tcap {
    color: #1e1b16;
}
[data-theme="dark"] .tablecard .tsub,
[data-theme="dark"] .chartnote {
    color: #6f685a;
}
[data-theme="dark"] .tablecard table {
    color: #1e1b16;
}
[data-theme="dark"] .tablecard table th {
    color: #6f685a;
}
[data-theme="dark"] .tablecard table td {
    border-color: #e2dac8;
}
[data-theme="dark"] .scroll-helper-btn {
    background: rgba(34, 29, 21, 0.94);
    border-color: var(--line);
    color: var(--ink);
}
[data-theme="dark"] .scroll-helper-btn:hover,
[data-theme="dark"] .scroll-helper-btn:focus-visible,
[data-theme="dark"] .scroll-helper.open .scroll-sections {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}
[data-theme="dark"] .scroll-helper-menu {
    background: var(--panel);
    border-color: var(--line);
}
[data-theme="dark"] .scroll-helper-menu a {
    color: var(--ink-soft);
}
[data-theme="dark"] .scroll-helper-menu a:hover,
[data-theme="dark"] .scroll-helper-menu a:focus-visible {
    background: var(--green-soft);
    color: var(--green);
}
[data-theme="dark"] .scroll-helper-menu a.on {
    background: var(--ink);
    color: var(--paper);
}

/* ---------- Malayalam typography overrides ----------
   Placed after base rules so lower-specificity base selectors precede their
   higher-specificity html[lang="ml"] counterparts
   (satisfies Biome noDescendingSpecificity; cascade-neutral as specificities differ). */
/* ---------- Malayalam typography ---------- */
html[lang="ml"] {
    --disp: "Noto Serif Malayalam", "Fraunces", serif;
    --body: "Noto Sans Malayalam", "Newsreader", serif;
    --ui: "Noto Sans Malayalam", "Archivo", sans-serif;
}
html[lang="ml"] body {
    line-height: 1.74;
}
html[lang="ml"] .hero h1 {
    letter-spacing: 0;
    line-height: 1.16;
}
html[lang="ml"] .chap-head h2,
html[lang="ml"] .verdict h2,
html[lang="ml"] .takeaway p,
html[lang="ml"] .strip .num {
    letter-spacing: 0;
    line-height: 1.32;
}
html[lang="ml"] .kicker {
    letter-spacing: 0.03em;
    text-transform: none;
}
html[lang="ml"] ul.points li,
html[lang="ml"] ul.recs li,
html[lang="ml"] ol.findings li p {
    line-height: 1.65;
}
html[lang="ml"] .verdict .intro::first-letter {
    font-size: 2.6em;
    padding: 6px 10px 0 0;
}
