/* ═══════════════════════════════════════════════════════════════
   Kisan Door Step — Compliance Hub
   Brand system sampled from the live kisandoorstep storefront.

   Tokens taken directly from the site screenshots:
     #0B5934  deep green   — top strip, chips, buttons, footer base
     #0B753B  green        — footer panel
     #16A34A  bright green — tags, accents
     #B3D380  lime         — hero gradient
     #EAB308  gold         — panel eyebrow text
     #F0FDF4  green wash   — tag + card tints
     #F7FAF8  canvas       — page background (dot-textured)

   Conventions carried over from the storefront:
     · Bilingual labels (English over Marathi)
     · Centred section heads with an outlined icon tile
     · White cards with a green header strip
     · Fully-rounded green pill buttons with a trailing arrow
     · Wave divider into a deep-green footer
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Brand */
    --green-deep:   #0B5934;
    --green:        #0B753B;
    --green-bright: #16A34A;
    --green-dark:   #084025;
    --lime:         #B3D380;
    --gold:         #EAB308;
    --wash:         #F0FDF4;

    /* Surfaces */
    --canvas:       #F7FAF8;
    --card:         #FFFFFF;
    --line:         #DCE9E0;
    --line-soft:    #EAF2EC;
    --dot:          #DEEAE1;

    /* Text */
    --ink:          #12261B;   /* 14.6:1 on white */
    --ink-body:     #3A4A40;   /*  8.7:1 */
    --ink-muted:    #64756B;   /*  4.9:1 */
    --on-green:     #FFFFFF;
    --on-green-dim: #C7DED1;   /*  8.1:1 on --green-deep */

    /* Space */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
    --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 96px;

    --r-sm:  8px;
    --r:    14px;
    --r-lg: 20px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(11, 89, 52, 0.05);
    --shadow:    0 4px 14px rgba(11, 89, 52, 0.07);
    --shadow-lg: 0 14px 34px rgba(11, 89, 52, 0.11);

    --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-in: "Noto Sans Devanagari", var(--font);

    --header-h: 110px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background-color: var(--canvas);
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--ink-body);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-deep); }

::selection { background: var(--wash); color: var(--green-deep); }

:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 3px; border-radius: 4px; }

.mr { font-family: var(--font-in); font-weight: 400; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: #fff; color: var(--green-deep);
    border: 1px solid var(--green-deep); border-radius: var(--r-pill);
    padding: 12px 22px; font-size: 14px; font-weight: 600;
}
.skip-link:focus { left: 16px; top: 16px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.shell { max-width: 1240px; margin: 0 auto; padding: 0 var(--s5); }

/* ═══ ANNOUNCEMENT STRIP ════════════════════════════════════ */
.topbar {
    background: var(--green-deep);
    color: var(--on-green-dim);
    font-size: 12.5px;
    padding: 9px 0;
}

.topbar-inner {
    display: flex; align-items: center; justify-content: center;
    gap: var(--s5); flex-wrap: wrap;
}

.topbar-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar-item i { color: var(--lime); font-size: 13px; }
.topbar-sep { color: var(--lime); opacity: 0.6; }

/* ═══ HEADER ════════════════════════════════════════════════ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
}

.header-inner {
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
}

.brand { display: flex; align-items: center; gap: var(--s3); }

.brand-logo {
    height: 100px; width: auto;
    display: block;
    mix-blend-mode: multiply;    /* logo ships on white — drops the box */
}

.brand-divider { width: 1px; height: 48px; background: var(--line); }

.brand-label { display: flex; flex-direction: column; line-height: 1.2; }
.brand-label .en { font-size: 15px; font-weight: 700; color: var(--green-deep); letter-spacing: -0.01em; }
.brand-label .mr { font-size: 12px; color: var(--ink-muted); }

.header-nav { display: flex; align-items: center; gap: var(--s5); }

.header-link {
    font-size: 14px; font-weight: 600; color: var(--ink-body);
    display: inline-flex; align-items: center; gap: 7px;
    transition: color 0.15s ease;
}
.header-link:hover { color: var(--green); }
.header-link i { font-size: 15px; color: var(--green); }

/* ═══ BUTTONS ═══════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: var(--s2);
    height: 44px; padding: 0 22px;
    border: 1px solid transparent; border-radius: var(--r-pill);
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn i { font-size: 15px; }

.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }

.btn-outline { background: #fff; border-color: var(--line); color: var(--ink-body); }
.btn-outline:hover { border-color: var(--green); color: var(--green-deep); }

.btn-ghost-light { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.btn-sm { height: 38px; padding: 0 18px; font-size: 13px; }

/* ═══ HERO ══════════════════════════════════════════════════ */
.hero {
    position: relative;
    background: var(--green-deep);
    background-image:
        radial-gradient(circle at 88% 12%, rgba(179, 211, 128, 0.20), transparent 46%),
        radial-gradient(circle at 8% 92%, rgba(22, 163, 74, 0.28), transparent 52%);
    color: #fff;
    padding: var(--s9) 0 var(--s8);
    overflow: hidden;
}

.hero-inner { text-align: center; position: relative; z-index: 2; }

.hero-eyebrow {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 0 var(--s2);
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: var(--s4);
}
.hero-eyebrow .dot { color: var(--lime); }

.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: var(--s3);
}

.hero-title-mr {
    font-family: var(--font-in);
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    font-weight: 500;
    color: var(--lime);
    margin-bottom: var(--s4);
}

.hero-sub {
    font-size: 16px;
    color: var(--on-green-dim);
    max-width: 62ch;
    margin: 0 auto;
    line-height: 1.7;
}

/* Search pill */
.hero-search { position: relative; max-width: 620px; margin: var(--s7) auto 0; text-align: left; }

.hero-search .search-icon {
    position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
    color: var(--green); font-size: 16px; pointer-events: none; z-index: 2;
}

.hero-search input {
    width: 100%; height: 58px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--r-pill);
    padding: 0 24px 0 52px;
    color: var(--ink);
    font-family: inherit; font-size: 15px;
    box-shadow: var(--shadow);
    transition: border-color 0.18s ease;
}
.hero-search input::placeholder { color: var(--ink-muted); }
.hero-search input:focus { border-color: var(--lime); outline: none; }
.hero-search input:focus-visible { outline: none; }

.search-results {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); box-shadow: var(--shadow-lg);
    max-height: 380px; overflow-y: auto; display: none; z-index: 60;
    padding: var(--s2); text-align: left;
}
.search-results.show { display: block; }

.search-result-item {
    display: flex; align-items: flex-start; gap: var(--s3);
    padding: var(--s3); border-radius: var(--r-sm);
    color: var(--ink-body); transition: background-color 0.15s ease;
}
.search-result-item:hover, .search-result-item:focus-visible { background: var(--wash); }
.search-result-item i { color: var(--green); font-size: 16px; margin-top: 3px; flex-shrink: 0; }
.search-result-title { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.4; }
.search-result-snippet {
    font-size: 12.5px; color: var(--ink-muted); line-height: 1.55; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-result-snippet mark { background: #FEF9C3; color: var(--ink); border-radius: 2px; padding: 0 2px; }
.search-no-results { padding: var(--s5); text-align: center; color: var(--ink-muted); font-size: 14px; }

/* ═══ FEATURE CHIPS (storefront pattern) ════════════════════ */
.chip-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s4);
    margin-top: calc(-1 * var(--s7));
    margin-bottom: var(--s8);
    position: relative; z-index: 5;
}

.chip {
    display: flex; align-items: center; gap: var(--s3);
    background: var(--green-deep);
    border-radius: var(--r);
    padding: var(--s4) var(--s5);
    min-height: 82px;
    color: #fff;
    box-shadow: var(--shadow);
}

.chip-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    background: #fff; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--green-deep); font-size: 18px;
}

.chip-text { min-width: 0; }

.chip-value {
    display: block;
    font-size: 17px; font-weight: 700; color: #fff;
    line-height: 1.25; white-space: nowrap;
}
.chip-label {
    display: block;
    font-size: 12px; color: var(--on-green-dim); line-height: 1.4;
}
.chip-label .mr { font-size: 11.5px; }

/* ═══ SECTION HEAD ══════════════════════════════════════════ */
.section { padding: var(--s8) 0; }

.section-head { text-align: center; margin-bottom: var(--s7); }

.section-icon {
    width: 44px; height: 44px; margin: 0 auto var(--s4);
    border: 1.5px solid var(--green-bright);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--green); font-size: 18px;
}

.section-head h2 { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.section-head .mr { font-size: 14px; color: var(--ink-muted); }
.section-head .lead {
    font-size: 14.5px; color: var(--ink-muted);
    max-width: 66ch; margin: var(--s3) auto 0;
}

.section-divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ═══ FRAMEWORK CARDS ═══════════════════════════════════════ */
.framework-grid {
    display: grid;
    /* auto-fit so three cards stay on one row as long as they fit —
       a fixed 3/2/1 ladder strands an orphan at tablet widths */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--s5);
}

.framework-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.framework-strip {
    background: var(--green-deep);
    color: #fff;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 8px var(--s5);
    text-align: center;
}

.framework-body { padding: var(--s5); }

.framework-card h3 { font-size: 17px; font-weight: 700; margin-bottom: var(--s3); }

.framework-card p { font-size: 14px; color: var(--ink-muted); line-height: 1.65; }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--wash);
    color: var(--green);
    border: 1px solid #C6EBD4;
    border-radius: var(--r-pill);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 3px 12px;
    margin-bottom: var(--s3);
}

/* ═══ DOCUMENT GROUPS ═══════════════════════════════════════ */
/* One section holds all three categories; each group gets a compact
   left-aligned header rather than a second full centred section head. */
.doc-group { scroll-margin-top: calc(var(--header-h) + var(--s4)); }
.doc-group + .doc-group { margin-top: var(--s7); }

.group-head {
    display: flex; align-items: center; gap: var(--s3);
    margin-bottom: var(--s5);
}

.group-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    border: 1.5px solid var(--green-bright);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--green); font-size: 15px;
    background: var(--wash);
}

.group-titles { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.group-titles h3 { font-size: 18px; font-weight: 700; }
.group-titles .mr { font-size: 13px; color: var(--ink-muted); }

.group-rule { flex: 1; height: 1px; background: var(--line); min-width: 24px; }

.group-count {
    flex-shrink: 0;
    background: var(--wash); color: var(--green);
    border: 1px solid #C6EBD4; border-radius: var(--r-pill);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    padding: 3px 12px;
}

/* Full-width rows — a register reads better as a list than a grid,
   and no count ever leaves a half-empty row. */
.doc-list { display: flex; flex-direction: column; gap: var(--s3); }

.doc-row {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: var(--s5);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: var(--s4) var(--s5);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Green spine that fills in on hover */
.doc-row::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--green-bright);
    transform: scaleY(0); transform-origin: center;
    transition: transform 0.2s ease;
}

.doc-row:hover, .doc-row:focus-within {
    border-color: #BFDCC9;
    box-shadow: var(--shadow);
    transform: translateX(2px);
}
.doc-row:hover::before, .doc-row:focus-within::before { transform: scaleY(1); }

.doc-icon {
    width: 50px; height: 50px; flex-shrink: 0;
    border: 1.5px solid var(--green-bright);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--green); font-size: 21px;
    background: var(--wash);
}

.doc-row-main { min-width: 0; }

.doc-row-title { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.doc-row-title h3 { font-size: 17px; font-weight: 700; }
.doc-row-title .doc-title-mr { font-family: var(--font-in); font-size: 13px; color: var(--ink-muted); }

.doc-row-main p {
    font-size: 13.5px; color: var(--ink-muted);
    line-height: 1.55; margin-top: 2px;
    max-width: 72ch;
}

/* Meta rail */
.doc-meta {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 12px; color: var(--ink-muted);
    padding-left: var(--s5);
    border-left: 1px solid var(--line-soft);
    white-space: nowrap;
}
.doc-meta i { color: var(--green-bright); margin-right: 6px; }

.doc-row .btn { flex-shrink: 0; }

/* Whole row is clickable; the button stays the visible affordance */
.doc-row .btn::after { content: ''; position: absolute; inset: 0; }

/* ═══ GREEN CTA PANEL ═══════════════════════════════════════ */
.cta-panel {
    position: relative;
    background: var(--green-deep);
    /* Glow sits behind the seal, not in the corner — an off-axis highlight
       was tilting the whole block visually. */
    background-image: radial-gradient(circle at 87% 50%, rgba(179, 211, 128, 0.16), transparent 45%);
    border-radius: var(--r-lg);
    padding: var(--s7);
    /* Right gutter = 64 optical gap + 220 disc + 56 edge inset (the 8px ring
       then lands on the same 48px as the other three sides). A circle needs a
       slightly wider gap than a flat edge, hence 64 rather than 48. */
    padding-right: 340px;
    color: #fff;
    overflow: hidden;
}

.cta-eyebrow {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: var(--s3);
}
.cta-eyebrow .dot { color: var(--lime); }

.cta-panel h2 { font-size: 24px; color: #fff; margin-bottom: var(--s2); max-width: 34ch; }
.cta-panel .cta-title-mr {
    font-family: var(--font-in); font-size: 16px; font-weight: 500;
    color: var(--lime); margin-bottom: var(--s4);
}

.cta-panel p {
    font-size: 14.5px; color: var(--on-green-dim);
    /* No ch cap: the copy fills its column so the ragged right edge lands
       near the gutter instead of stopping short of the seal. */
    line-height: 1.75;
}
.cta-panel p + p { margin-top: var(--s3); }

/* Inline links in the body copy underline; buttons never do. */
.cta-panel p a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.cta-panel p a:hover { color: #fff; }
.cta-panel .btn { text-decoration: none; }

.cta-actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }

/* Logo seal */
.cta-logo {
    /* +8px so the outer glow ring — not the disc — lands on the 48px inset */
    position: absolute; right: calc(var(--s7) + 8px); top: 50%;
    transform: translateY(-50%);
    width: 220px; height: 220px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

/* 78% keeps the mark inside the disc's inscribed square; the -2% lift
   corrects the logo's own bottom-heavy weight (wordmark + badge strip). */
.cta-logo img {
    width: 78%; height: 78%;
    object-fit: contain;
    display: block;
    transform: translateY(-2%);
}

/* ═══ DOCUMENT PAGE ═════════════════════════════════════════ */
.doc-hero {
    background: var(--green-deep);
    background-image: radial-gradient(circle at 90% 15%, rgba(179, 211, 128, 0.16), transparent 46%);
    color: #fff;
    padding: var(--s7) 0;
}

.crumbs { font-size: 13px; color: var(--on-green-dim); margin-bottom: var(--s4); }
.crumbs a { color: var(--on-green-dim); }
.crumbs a:hover { color: #fff; }
.crumbs .sep { opacity: 0.5; margin: 0 8px; }
.crumbs .current { color: #fff; font-weight: 500; }

.doc-hero-head { display: flex; align-items: flex-start; gap: var(--s5); }

.doc-hero-icon {
    width: 60px; height: 60px; flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--lime); font-size: 24px;
    background: rgba(255, 255, 255, 0.06);
}

.doc-hero h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); color: #fff; letter-spacing: -0.03em; margin-bottom: 2px; }
.doc-hero .doc-hero-mr { font-family: var(--font-in); font-size: 15px; color: var(--lime); margin-bottom: var(--s3); }
.doc-hero p.desc { font-size: 15px; color: var(--on-green-dim); max-width: 70ch; }

.doc-hero-meta {
    display: flex; gap: var(--s5); flex-wrap: wrap;
    margin-top: var(--s5); padding-top: var(--s4);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12.5px; color: var(--on-green-dim);
}
.doc-hero-meta i { color: var(--lime); margin-right: 6px; }
.doc-hero-meta strong { color: #fff; font-weight: 600; }

/* Layout */
.doc-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: var(--s6);
    align-items: start;
    padding: var(--s7) 0 var(--s8);
}

.doc-rail { position: sticky; top: calc(var(--header-h) + var(--s4)); max-height: calc(100vh - var(--header-h) - var(--s6)); display: flex; flex-direction: column; }

.rail-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); padding: var(--s4);
    overflow-y: auto;
}
.rail-card + .rail-card { margin-top: var(--s4); flex-shrink: 0; }

.rail-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-muted);
    padding-bottom: var(--s3); margin-bottom: var(--s2);
    border-bottom: 1px solid var(--line-soft);
}

.rail-card ul { list-style: none; }

.rail-card a {
    display: block; padding: 7px var(--s3);
    font-size: 13px; color: var(--ink-muted); line-height: 1.45;
    border-radius: var(--r-sm);
    border-left: 2px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rail-card a:hover { background: var(--wash); color: var(--green-deep); }
.rail-card a.active {
    background: var(--wash); color: var(--green-deep);
    font-weight: 600; border-left-color: var(--green-bright);
}
.rail-card .nav-level-3 { padding-left: var(--s5); font-size: 12.5px; }

/* Collapsible structure nav for small screens — the sticky rail is hidden
   below 1024px, and a 9-section legal document needs navigation there too. */
.mobile-toc {
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    margin-bottom: var(--s4);
    overflow: hidden;
}

.mobile-toc > summary {
    display: flex; align-items: center; gap: var(--s2);
    padding: var(--s4);
    min-height: 52px;
    font-size: 14px; font-weight: 700; color: var(--ink);
    cursor: pointer;
    list-style: none;
}
.mobile-toc > summary::-webkit-details-marker { display: none; }

.mobile-toc > summary .chev {
    margin-left: auto; color: var(--green);
    transition: transform 0.2s ease;
}
.mobile-toc[open] > summary .chev { transform: rotate(180deg); }
.mobile-toc > summary .count { color: var(--ink-muted); font-weight: 500; font-size: 13px; }

.mobile-toc ul { list-style: none; border-top: 1px solid var(--line-soft); padding: var(--s2); }

.mobile-toc a {
    display: block;
    padding: 10px var(--s3);
    min-height: 44px;
    font-size: 13.5px; color: var(--ink-body); line-height: 1.5;
    border-radius: var(--r-sm);
}
.mobile-toc a:hover, .mobile-toc a.active { background: var(--wash); color: var(--green-deep); font-weight: 600; }
.mobile-toc .nav-level-3 { padding-left: var(--s5); }

/* Sheet */
.doc-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: var(--s7);
    min-width: 0;
    box-shadow: var(--shadow-sm);
}

.doc-toolbar {
    display: flex; gap: var(--s2); flex-wrap: wrap;
    padding-bottom: var(--s5); margin-bottom: var(--s6);
    border-bottom: 1px solid var(--line-soft);
}

/* ── Rendered markdown ─────────────────────────────────────── */
.policy-h1 { display: none; }
.policy-heading { scroll-margin-top: calc(var(--header-h) + var(--s5)); }

.policy-h2 {
    font-size: 20px; font-weight: 700; color: var(--ink);
    margin: var(--s8) 0 var(--s4);
    padding-bottom: var(--s3);
    border-bottom: 2px solid var(--wash);
    position: relative;
}
.policy-h2::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    width: 56px; height: 2px; background: var(--green-bright);
}
.doc-sheet .policy-h2:first-child { margin-top: 0; }

.policy-h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: var(--s6) 0 var(--s2); }
.policy-h4 { font-size: 14.5px; font-weight: 600; color: var(--ink-body); margin: var(--s5) 0 var(--s2); }

.policy-text {
    margin-bottom: var(--s4);
    color: var(--ink-body); font-size: 15px; line-height: 1.85;
    max-width: 74ch;
}
.policy-text strong, .policy-list strong { color: var(--ink); font-weight: 600; }

.policy-list { margin-bottom: var(--s5); padding-left: var(--s5); max-width: 74ch; }
.policy-list li { margin-bottom: var(--s2); color: var(--ink-body); font-size: 15px; line-height: 1.8; }
.policy-list li::marker { color: var(--green-bright); }
.policy-list-ordered li::marker { color: var(--green); font-weight: 700; }

.policy-code {
    background: var(--wash); border: 1px solid #D6EEDF;
    padding: 1px 6px; border-radius: 4px;
    font-size: 13.5px; color: var(--green-deep);
}

.policy-link { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.policy-link:hover { color: var(--green-deep); }

.policy-divider { border: none; border-top: 1px solid var(--line-soft); margin: var(--s7) 0; }

.target-flash {
    background: var(--wash);
    box-shadow: -8px 0 0 var(--wash), 8px 0 0 var(--wash);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.doc-colophon {
    margin-top: var(--s8); padding-top: var(--s4);
    border-top: 1px solid var(--line-soft);
    font-size: 12.5px; color: var(--ink-muted);
    display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
}
.doc-colophon strong { color: var(--ink-body); }

/* Prev / next */
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding-bottom: var(--s8); }

.pager-link {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); padding: var(--s4) var(--s5);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pager-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #BFDCC9; }
.pager-link.next { text-align: right; }

.pager-dir {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--green-bright); font-weight: 700; margin-bottom: 2px;
}
.pager-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }

/* ═══ EMPTY STATE ═══════════════════════════════════════════ */
.empty-state {
    max-width: 560px; margin: var(--s9) auto; text-align: center;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--r); padding: var(--s8) var(--s5);
    box-shadow: var(--shadow-sm);
}
.empty-state i { font-size: 40px; color: var(--line); display: block; margin-bottom: var(--s4); }
.empty-state h2 { font-size: 22px; margin-bottom: var(--s2); }
.empty-state p { color: var(--ink-muted); margin-bottom: var(--s5); }

/* ═══ FOOTER ════════════════════════════════════════════════ */
.footer-wave { display: block; width: 100%; height: 64px; margin-bottom: -1px; }
.footer-wave path { fill: var(--green); }

.site-footer { background: var(--green); color: var(--on-green-dim); padding: var(--s8) 0 0; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: var(--s7);
    padding-bottom: var(--s7);
}

.footer-brand .brand-logo { height: 64px; background: #fff; border-radius: var(--r-sm); padding: 6px 10px; mix-blend-mode: normal; }
.footer-brand p { font-size: 13.5px; color: var(--on-green-dim); line-height: 1.7; margin-top: var(--s4); max-width: 34ch; }

.footer-col h4 {
    font-size: 12px; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 0.11em;
    margin-bottom: var(--s4);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a, .footer-col span {
    font-size: 13.5px; color: var(--on-green-dim);
    display: inline-flex; align-items: flex-start; gap: 9px; line-height: 1.6;
    transition: color 0.15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-col i { color: var(--lime); font-size: 14px; margin-top: 3px; flex-shrink: 0; }

/* Social icons sit on their own rule, right-aligned above the credit line */
.footer-social-row {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: var(--s5) 0;
    display: flex; justify-content: flex-end;
}

/* Copyright left, "Powered by" right — always one line on desktop */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: var(--s4) 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s4); flex-wrap: wrap;
    font-size: 12.5px;
}

.footer-social { display: flex; gap: var(--s3); }
.footer-social a {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); }

.footer-credit strong { color: #fff; font-weight: 600; }

/* ═══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 1023.98px) {
    .doc-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
    .doc-rail { display: none; }
    .mobile-toc { display: block; }
    .doc-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); }
    .doc-meta { display: none; }
    .chip-row { grid-template-columns: repeat(2, 1fr); }
    /* Narrower panel — shrink the seal so the copy column keeps its measure */
    .cta-panel { padding-right: 236px; }
    .cta-logo { width: 140px; height: 140px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}

@media (max-width: 767.98px) {
    /* Header collapses to ~92px — keep anchor scroll offsets honest */
    :root { --header-h: 92px; }

    .shell { padding: 0 var(--s4); }
    .topbar-inner { gap: var(--s3); font-size: 11.5px; }
    .topbar-sep { display: none; }

    .header-inner { height: auto; padding: var(--s3) 0; gap: var(--s3); }
    .brand-logo { height: 60px; }
    .brand-divider, .brand-label { display: none; }
    /* Icon-only nav on mobile — keep the 44px touch target */
    .header-nav { gap: var(--s2); }
    .header-link span { display: none; }
    .header-link {
        min-width: 44px; min-height: 44px;
        justify-content: center; gap: 0;
    }
    .header-link i { font-size: 19px; }

    /* Comfortable touch targets for every control below md */
    .btn-sm { height: 44px; padding: 0 20px; }
    .doc-btn { min-height: 44px; }
    .footer-col li { margin-bottom: 2px; }
    .footer-col a { padding: 11px 0; min-height: 44px; align-items: center; }
    .crumbs a { display: inline-block; padding: 3px 0; }
    .footer-social a { width: 44px; height: 44px; }
    .footer-social { gap: var(--s2); }

    .hero { padding: var(--s7) 0 var(--s6); }
    .hero-eyebrow { font-size: 11px; letter-spacing: 0.08em; }
    .hero-sub { font-size: 15px; }
    .hero-search { margin-top: var(--s5); }
    .hero-search input { height: 52px; font-size: 14px; padding-left: 46px; }
    .hero-search .search-icon { left: 18px; }

    /* Chips sit fully below the hero on small screens — the negative pull
       left the first chip straddling the green edge. */
    .chip-row { grid-template-columns: 1fr; margin-top: var(--s5); margin-bottom: var(--s7); gap: var(--s3); }
    .chip { min-height: 0; padding: var(--s3) var(--s4); }

    .section { padding: var(--s7) 0; }
    .section-head { margin-bottom: var(--s5); }
    .section-head h2 { font-size: 21px; }

    .framework-grid { grid-template-columns: 1fr; gap: var(--s4); }
    .doc-row {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start; gap: var(--s3);
        padding: var(--s4);
    }
    .doc-row:hover { transform: none; }
    .doc-icon { width: 42px; height: 42px; font-size: 18px; }
    .doc-row-title h3 { font-size: 15.5px; }
    .doc-row .btn { grid-column: 1 / -1; justify-content: center; margin-top: var(--s2); }
    .doc-group + .doc-group { margin-top: var(--s6); }
    .group-titles { gap: 6px; }
    .group-titles h3 { font-size: 16px; }
    .group-rule { display: none; }
    .group-count { margin-left: auto; }

    .cta-panel { padding: var(--s5); }
    .cta-logo {
        position: static; transform: none;
        width: 104px; height: 104px;
        margin: 0 0 var(--s4);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
    }
    .cta-panel h2 { font-size: 20px; }

    .doc-hero { padding: var(--s6) 0; }
    .doc-hero-head { gap: var(--s4); }
    .doc-hero-icon { width: 46px; height: 46px; font-size: 19px; }
    .doc-layout { padding: var(--s5) 0 var(--s7); }
    .doc-sheet { padding: var(--s5) var(--s4); }
    .doc-pager { grid-template-columns: 1fr; }
    .pager-link.next { text-align: left; }

    .footer-grid { grid-template-columns: 1fr; gap: var(--s6); }
    .footer-social-row { justify-content: center; }
    .footer-bottom { justify-content: center; text-align: center; gap: var(--s2); }
}

/* ═══ MOTION ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .doc-row:hover, .pager-link:hover, .btn-primary:hover { transform: none; }
    .doc-row::before { transition: none; }
}

/* ═══ PRINT ═════════════════════════════════════════════════ */
@media print {
    .topbar, .site-header, .doc-rail, .doc-toolbar, .doc-pager,
    .site-footer, .footer-wave, .hero-search, .skip-link, .doc-hero-meta { display: none !important; }

    .doc-hero { background: none !important; color: #000; padding: 0 0 1rem; }
    .doc-hero h1, .doc-hero p.desc, .crumbs { color: #000 !important; }
    .doc-hero-icon { display: none; }

    .doc-layout { display: block; padding: 0; }
    .doc-sheet { border: none; box-shadow: none; padding: 0; }
    .policy-h1 { display: block !important; font-size: 20pt; margin-bottom: 1rem; }
    .policy-h2, .policy-h3 { break-after: avoid; }
    .policy-h2::after { display: none; }
    .policy-text, .policy-list { break-inside: avoid; max-width: none; }
    .policy-link { color: #000 !important; }
    .policy-link::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #444; }

    body { background: #fff !important; background-image: none !important; font-size: 11pt; color: #000; }
}
