/* ============================================================
   KELMENDI FOUNDATION — website design system
   Modern philanthropic institution. Garnet-led, ivory, gold.
   ============================================================ */

:root {
  --garnet:    #8A1C30;
  --garnet-dk: #6E1626;
  --garnet-wash:#F4E9EA;
  --navy:      #16263F;
  --navy-2:    #1E3454;
  --navy-deep: #0F1B2E;
  --charcoal:  #232220;
  --ink:       #2B2B29;
  --stone:     #8C8276;
  --stone-2:   #CFC8BC;
  --line:      #E2DCD0;
  --ivory:     #F7F3EB;
  --ivory-2:   #EFE9DD;
  --cream:     #FBF9F4;
  --gold:      #B0894F;
  --gold-2:    #CBAC78;
  --white:     #FFFFFF;

  /* tweakable */
  --accent:    var(--garnet);
  --accent-dk: var(--garnet-dk);
  --display:   "Cormorant Garamond", Georgia, serif;
  --sp:        1;

  --body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1280px;
  --gutter: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; font-family: var(--body); color: var(--charcoal);
  background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--garnet-wash); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--body); font-weight: 600; font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin: 0;
}
.eyebrow.on-dark { color: var(--gold-2); }
.eyebrow.muted { color: var(--stone); }
.erow { display: inline-flex; align-items: center; gap: 13px; }
.erow .ln { width: 30px; height: 1px; background: currentColor; opacity: .55; }

.dsp { font-family: var(--display); font-weight: 500; color: var(--navy); line-height: 1.03; letter-spacing: -0.01em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
.d1 { font-size: clamp(44px, 6vw, 86px); }
.d2 { font-size: clamp(34px, 4.4vw, 60px); }
.d3 { font-size: clamp(26px, 2.8vw, 38px); }
.d4 { font-size: clamp(21px, 1.9vw, 26px); }

p { margin: 0; }
.lead { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.1vw, 28px); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.body { font-family: var(--body); font-weight: 300; font-size: 16.5px; line-height: 1.78; color: var(--ink); text-wrap: pretty; }
.body.sm { font-size: 14.5px; line-height: 1.72; }
.body strong { font-weight: 600; color: var(--navy); }
.label { font-family: var(--body); font-weight: 600; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase;
  padding: 15px 28px; border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s, transform .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dk); }
.btn-navy { background: var(--navy); color: var(--ivory); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; border-color: var(--stone-2); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost.on-dark { color: var(--ivory); border-color: rgba(255,255,255,.4); }
.btn-ghost.on-dark:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn .ar { transition: transform .18s; }
.btn:hover .ar { transform: translateX(3px); }
.tlink { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.tlink .ar { transition: transform .18s; }
.tlink:hover .ar { transform: translateX(4px); }

/* ---------- sections ---------- */
section { padding: calc(104px * var(--sp)) 0; }
.sect-ivory { background: var(--ivory); }
.sect-cream { background: var(--cream); }
.sect-navy { background: var(--navy-deep); color: var(--ivory); }
.sect-navy .dsp { color: var(--ivory); }
.sect-navy .body { color: rgba(247,243,235,.82); }
.sect-tight { padding: calc(74px * var(--sp)) 0; }

/* ---------- top bar + nav ---------- */
.topbar { background: var(--navy-deep); color: var(--ivory); font-family: var(--body); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 9px var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.topbar .motto { font-family: var(--display); font-style: italic; font-size: 14px; color: var(--gold-2); }
.topbar .util { display: flex; gap: 20px; align-items: center; }
.topbar .util a { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(247,243,235,.72); transition: color .15s; }
.topbar .util a:hover { color: var(--gold-2); }
.topbar .lang { display: inline-flex; align-items: center; }
.topbar .lang a { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(247,243,235,.6); padding: 0 8px; transition: color .15s; }
.topbar .lang a:first-child { padding-left: 0; }
.topbar .lang a + a { border-left: 1px solid rgba(247,243,235,.22); }
.topbar .lang a.on { color: var(--gold-2); font-weight: 600; }
.topbar .lang a:hover { color: var(--gold-2); }

.nav { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link { font-family: var(--body); font-weight: 500; font-size: 13px; letter-spacing: 0.04em; color: var(--navy); position: relative; padding: 4px 0; transition: color .15s; }
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--navy); display: flex; padding: 4px; }
.burger { display: none; }

/* ---------- wordmark ---------- */
.mark { display: inline-flex; flex-direction: column; line-height: 1; --mk: var(--garnet); }
.mark .mk-n { font-family: var(--display); font-weight: 500; color: var(--mk); letter-spacing: 0.3em; text-indent: 0.3em; white-space: nowrap; }
.mark .mk-s { display: flex; align-items: center; gap: 0.55em; margin-top: 0.4em; }
.mark .mk-s .l { flex: 1; height: 1px; background: var(--mk); opacity: .8; }
.mark .mk-s .t { font-family: var(--body); font-weight: 500; color: var(--mk); text-transform: uppercase; white-space: nowrap; text-indent: 0.28em; }
.mark.light { --mk: var(--ivory); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--navy-deep); color: var(--ivory); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,27,46,.93) 0%, rgba(15,27,46,.78) 42%, rgba(15,27,46,.34) 100%); }
.hero-in { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(96px, 16vh, 188px) var(--gutter) clamp(80px, 12vh, 130px); }
.hero-sub-hero { min-height: 46vh; display: flex; align-items: flex-end; }

/* ---------- image frame (placeholder) ---------- */
.imgf { position: relative; overflow: hidden; background: var(--navy); }
.imgf::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 11px); pointer-events: none; }
.imgf .ic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(247,243,235,.4); }
.imgf .cap { position: absolute; bottom: 12px; left: 14px; font-family: var(--body); font-weight: 600; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247,243,235,.8); z-index: 2; }
.imgf.g1 { background: linear-gradient(140deg, #1f3a5f, #16263F 60%, #0F1B2E); }
.imgf.g2 { background: linear-gradient(140deg, #9d2438, #8A1C30 62%, #6E1626); }
.imgf.g3 { background: linear-gradient(140deg, #b89a6a, #9c7b45 70%, #7d6235); }
.imgf.g4 { background: linear-gradient(140deg, #5a6b6a, #3f4f50 65%, #2c3838); }

/* ---------- cards ---------- */
.grid { display: grid; }
.gap1 { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.fund-row { display: grid; grid-template-columns: 300px 1fr; gap: 30px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 26px var(--gutter); }
.cols { display: grid; gap: 64px; align-items: center; }
.cols-3268 { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
.cols-5050 { grid-template-columns: 1fr 1fr; }
.cols-5545 { grid-template-columns: 1.1fr 0.9fr; align-items: start; }

.pcard { background: var(--white); display: flex; flex-direction: column; text-align: left; transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -28px rgba(22,38,63,.5); }
.pcard .pc-top { height: 168px; position: relative; }
/* Eight-Pillars cards (Option B): no diagonal texture, larger centred icon, no letter */
.imgf.pcard-art::after { display: none; }
.imgf.pcard-art .ic { color: #FFFFFF; }
.pcard .pc-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.pill-letter { position: absolute; top: 14px; left: 16px; z-index: 2; font-family: var(--display); font-weight: 500; font-size: 30px; color: var(--ivory); line-height: 1; }

.scard { background: var(--white); display: flex; flex-direction: column; }
.scard .sc-img { height: 200px; }
.scard .sc-body { padding: 22px 4px 4px; }

.vcard { background: var(--white); border: 1px solid var(--line); padding: 26px 26px 30px; }

/* ---------- stat ---------- */
.stat-n { font-family: var(--display); font-weight: 500; font-size: clamp(42px, 5vw, 66px); color: var(--accent); line-height: 1; }
.sect-navy .stat-n { color: var(--gold-2); }

/* ---------- quote / motto band ---------- */
.qband { background: var(--navy-deep); color: var(--ivory); text-align: center; }
.qband .q { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.18; color: var(--ivory); }

/* ---------- list rows ---------- */
.rowlist { display: flex; flex-direction: column; }
.rowlist .row { display: grid; grid-template-columns: 56px 1fr auto; gap: 22px; align-items: center; padding: 24px 4px; border-top: 1px solid var(--line); }
.rowlist .row:last-child { border-bottom: 1px solid var(--line); }
.rowlist .row .rn { font-family: var(--display); font-size: 22px; color: var(--accent); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: inline-flex; align-items: center; padding: 8px 15px; border: 1px solid var(--stone-2); font-family: var(--body); font-weight: 500; font-size: 11.5px; letter-spacing: 0.06em; color: var(--navy); }
.sect-navy .chip { border-color: rgba(203,172,120,.35); color: var(--ivory); }

/* ---------- newsletter ---------- */
.subscribe { display: flex; gap: 0; max-width: 460px; }
.subscribe input { flex: 1; font-family: var(--body); font-size: 14px; padding: 15px 16px; border: 1px solid var(--stone-2); border-right: 0; background: var(--white); outline: none; }
.subscribe input:focus { border-color: var(--accent); }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field .fl { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--navy); }
.field input, .field select, .field textarea { font-family: var(--body); font-size: 15px; color: var(--charcoal); padding: 13px 15px; border: 1px solid var(--stone-2); background: var(--white); outline: none; border-radius: 0; transition: border-color .15s; width: 100%; max-width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); border-width: 1.5px; }

/* ---------- footer ---------- */
.foot { background: var(--navy-deep); color: var(--ivory); }
.foot-top { padding: 76px 0 52px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot a { color: rgba(247,243,235,.66); transition: color .15s; }
.foot a:hover { color: var(--gold-2); }
.foot .col h4 { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 18px; }
.foot .col a { display: block; font-family: var(--body); font-weight: 300; font-size: 14px; padding: 6px 0; }
.foot-bottom { border-top: 1px solid rgba(203,172,120,.2); padding: 22px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--body); font-size: 12.5px; color: rgba(247,243,235,.5); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- dark-background readability safety net ---------- */
.sect-navy, .qband, .hero { color: var(--ivory); }
.sect-navy p, .qband p, .hero p { color: rgba(247,243,235,.86); }
.sect-navy .dsp, .qband .dsp, .hero .dsp,
.sect-navy h1, .sect-navy h2, .sect-navy h3,
.hero h1, .hero h2, .hero h3 { color: var(--ivory); }
.sect-navy .lead, .hero .lead { color: rgba(247,243,235,.9); }
.sect-navy .label { color: rgba(247,243,235,.72); }
.sect-navy .eyebrow, .qband .eyebrow, .hero .eyebrow { color: var(--gold-2); }
.sect-navy .tlink, .qband .tlink, .hero .tlink { color: var(--gold-2); }
/* keep real white surfaces dark-on-light even inside dark sections */
.sect-navy .on-light, .sect-navy .on-light p, .sect-navy .on-light .dsp { color: var(--charcoal); }
.sect-navy input, .sect-navy select, .sect-navy textarea { color: var(--charcoal); }

/* ---------- donate widget ---------- */
.seg { display: inline-flex; border: 1px solid var(--stone-2); background: var(--white); padding: 4px; }
.seg button { flex: 1; appearance: none; border: 0; background: transparent; cursor: pointer; font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); padding: 11px 22px; transition: background .15s, color .15s; }
.seg button.on { background: var(--accent); color: #fff; }
.amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.amt { appearance: none; cursor: pointer; background: var(--white); border: 1px solid var(--stone-2); padding: 16px 10px; font-family: var(--display); font-size: 24px; color: var(--navy); transition: border-color .15s, background .15s, color .15s; }
.amt:hover { border-color: var(--accent); }
.amt.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- mobile menu ---------- */
.mobile-menu { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cols, .cols-3268, .cols-5050, .cols-5545 { grid-template-columns: 1fr; gap: 44px; }
  .cols > *, .cols-3268 > *, .cols-5050 > *, .cols-5545 > * { min-width: 0; }
}
@media (max-width: 940px) {
  .nav-links, .topbar .motto { display: none; }
  .burger { display: flex; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .g5 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  section { padding: calc(64px * var(--sp)) 0; }
  .rowlist .row { grid-template-columns: 40px 1fr; }
  .rowlist .row .ar { display: none; }

  /* --- horizontal scroll for multi-column card grids on mobile --- */
  /* Card/content grids become swipeable carousels instead of stacking. */
  .grid.g2, .grid.g3, .grid.g4, .grid.g5 {
    grid-template-columns: none;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 16px !important;
    /* let the row bleed to the screen edges, with gutter padding */
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 16px;
    scrollbar-width: thin;
  }
  .grid.g2 > *, .grid.g3 > *, .grid.g4 > *, .grid.g5 > * {
    scroll-snap-align: start;
    flex: 0 0 auto;
  }
  /* per-grid card widths (peek of next card invites scrolling) */
  .grid.g2 > * { width: 82%; }
  .grid.g3 > * { width: 80%; }
  .grid.g4 > * { width: 72%; }
  .grid.g5 > * { width: 56%; }
  /* gap1 grids draw 1px separators that break in flex; use real gap + borders */
  .grid.gap1 { background: transparent; border: 0; }
  .grid.gap1 > * { border: 1px solid var(--line); }

  /* slim scrollbar styling */
  .grid.g2::-webkit-scrollbar, .grid.g3::-webkit-scrollbar,
  .grid.g4::-webkit-scrollbar, .grid.g5::-webkit-scrollbar { height: 5px; }
  .grid.g2::-webkit-scrollbar-thumb, .grid.g3::-webkit-scrollbar-thumb,
  .grid.g4::-webkit-scrollbar-thumb, .grid.g5::-webkit-scrollbar-thumb {
    background: var(--stone-2); border-radius: 4px;
  }

  /* funding rows: stack label over text but keep readable */
  .fund-row { grid-template-columns: 1fr; gap: 8px; }

  /* opt-out: grids that should stack vertically on mobile, not scroll */
  .grid.no-hscroll {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    margin-left: 0; margin-right: 0; padding: 0;
    gap: 1px !important;
  }
  .grid.no-hscroll.gap1 { background: var(--line); border: 1px solid var(--line); }
  .grid.no-hscroll:not(.gap1) { gap: 20px !important; }
  .grid.no-hscroll > * { width: auto; }

  /* swipe hint shown under scrollable rows */
  .swipe-hint { display: flex !important; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Buttons: allow labels to wrap and size to content on very narrow screens */
  .btn { white-space: normal; padding: 14px 22px; text-align: center; max-width: 100%; }

  /* CTA rows (hero and section CTAs) stack full-width so nothing overflows */
  .hero-cta, .cta-row, .btn-row { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .cta-row .btn, .btn-row .btn { justify-content: center; width: 100%; }

  /* Newsletter signup: stack input above button, both full width */
  .subscribe { flex-direction: column; gap: 10px; max-width: 100%; }
  .subscribe input { border-right: 1px solid var(--stone-2); width: 100%; }
  .subscribe .btn { width: 100%; justify-content: center; }
}

/* swipe hint (hidden on desktop, shown on mobile via query above) */
.swipe-hint {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.swipe-hint .sh-line { width: 22px; height: 1px; background: var(--stone-2); }
.sect-navy .swipe-hint { color: rgba(247,243,235,.55); }
.sect-navy .swipe-hint .sh-line { background: rgba(203,172,120,.4); }

/* ============================================================
   PRODUCTION ADDITIONS — Kelmendi Foundation
   Real logo assets, footer socials + NOOX credit, mobile menu,
   favicon-ready, legal pages. (Static build, no React runtime.)
   ============================================================ */

/* ---- real wordmark logo in nav + footer ---- */
.brand-logo { height: 58px; width: auto; display: block; }
.foot-logo  { height: 64px; width: auto; display: block; margin-bottom: 22px; }
@media (max-width: 940px){ .brand-logo { height: 50px; } }
@media (max-width: 520px){ .brand-logo { height: 44px; } }

/* ---- nav: ensure logo link has no underline weirdness ---- */
.nav a.brandlink { display: inline-flex; align-items: center; }

/* ---- mobile menu (static, JS toggles .open on .mobile-panel) ---- */
.mobile-panel { display: none; border-top: 1px solid var(--line); background: var(--white); padding: 8px var(--gutter) 20px; }
.mobile-panel.open { display: block; }
.mobile-panel a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); font-family: var(--body); font-weight: 500; font-size: 15px; color: var(--navy); }
.mobile-panel a.active { color: var(--accent); }
.mobile-panel .m-donate { margin-top: 16px; border-bottom: 0; }

/* ---- footer: social icons below brand block ---- */
.foot-socials { display: flex; gap: 12px; margin-top: 26px; }
.foot-socials a { width: 40px; height: 40px; border: 1px solid rgba(203,172,120,.34); display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.foot-socials a svg { width: 17px; height: 17px; fill: rgba(247,243,235,.74); transition: fill .2s; }
.foot-socials a:hover { background: var(--accent); border-color: var(--accent); }
.foot-socials a:hover svg { fill: #fff; }

/* ---- footer address block ---- */
.foot-addr { font-family: var(--body); font-weight: 300; font-size: 13.5px; line-height: 1.7; color: rgba(247,243,235,.6); margin-top: 18px; }
.foot-addr a { color: rgba(247,243,235,.66); }
.foot-addr a:hover { color: var(--gold-2); }

/* ---- footer bottom: copyright + legal (left) · NOOX (right) ---- */
.foot-bottom { align-items: center; }
.foot-bottom .fb-left { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.foot-bottom .fb-left a:hover { color: var(--gold-2); }
.foot-bottom .sep { opacity: .4; }
.foot-bottom .fb-right { margin-left: auto; }
.foot-bottom .fb-right a { color: rgba(247,243,235,.7); font-weight: 600; letter-spacing: .06em; }
.foot-bottom .fb-right a:hover { color: var(--gold-2); }

/* ---- legal / prose pages ---- */
.prose { max-width: 820px; }
.prose h2 { font-family: var(--display); font-weight: 500; color: var(--navy); font-size: clamp(22px,2.2vw,30px); margin: 40px 0 14px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--body); font-weight: 600; font-size: 15px; color: var(--navy); margin: 26px 0 8px; letter-spacing: .01em; }
.prose p { font-family: var(--body); font-weight: 300; font-size: 16px; line-height: 1.8; color: var(--ink); margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { font-family: var(--body); font-weight: 300; font-size: 16px; line-height: 1.8; color: var(--ink); margin-bottom: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose .note { font-size: 13.5px; color: var(--stone); font-style: italic; }
.legal-toc { background: var(--cream); border: 1px solid var(--line); padding: 22px 26px; margin-bottom: 40px; }
.legal-toc p { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin: 0 0 12px; }
.legal-toc a { display: block; font-family: var(--body); font-size: 14px; color: var(--navy); padding: 5px 0; text-decoration: none; }
.legal-toc a:hover { color: var(--accent); }

/* ---- compliance page layout (sticky TOC + content) ---- */
.compliance-grid { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.compliance-toc { position: sticky; top: 96px; }
.compliance-toc .toc-label { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin: 0 0 14px; }
.compliance-toc a { display: block; font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--navy); padding: 9px 0 9px 16px; border-left: 2px solid var(--line); text-decoration: none; transition: color .15s, border-color .15s; }
.compliance-toc a:hover { color: var(--accent); border-color: var(--accent); }
.compliance-section { scroll-margin-top: 96px; padding-top: 8px; }
.compliance-section + .compliance-section { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.compliance-section .sec-eyebrow { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.policy-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.policy-list .pi { background: var(--white); padding: 22px 24px; }
.policy-list .pi h3 { font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--navy); margin: 0; }
.policy-list .pi p { font-family: var(--body); font-weight: 300; font-size: 14px; line-height: 1.65; color: var(--ink); margin: 8px 0 0; }
@media (max-width: 940px) {
  .compliance-grid { grid-template-columns: 1fr; gap: 32px; }
  .compliance-toc { position: static; }
  .compliance-toc { display: flex; flex-wrap: wrap; gap: 8px; background: var(--cream); border: 1px solid var(--line); padding: 18px 18px 20px; }
  .compliance-toc .toc-label { width: 100%; }
  .compliance-toc a { border-left: 0; padding: 8px 14px; background: var(--white); border: 1px solid var(--line); font-size: 13px; }
}
@media (max-width: 720px) {
  .policy-list { grid-template-columns: 1fr; }
}

/* ---- policy framework grouped by part ---- */
.policy-part + .policy-part { margin-top: 34px; }
.policy-part .pp-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; }
.policy-part .pp-head h3 { font-family: var(--display); font-weight: 500; font-size: 22px; color: var(--navy); margin: 0; }
.policy-part .pp-head .pp-ref { font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.policy-part .pp-intro { font-family: var(--body); font-weight: 300; font-size: 14.5px; line-height: 1.6; color: var(--stone); margin: 0 0 16px; max-width: 720px; }
.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.policy-grid .pg { background: var(--white); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; text-decoration: none; transition: background .15s; }
.policy-grid a.pg:hover { background: var(--cream); }
.policy-grid .pg .pg-ref { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--garnet); background: var(--garnet-wash); border-radius: 3px; padding: 3px 8px; margin-top: 2px; white-space: nowrap; }
.policy-grid .pg .pg-body h4 { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--navy); margin: 0; line-height: 1.2; }
.policy-grid .pg .pg-body p { font-family: var(--body); font-weight: 300; font-size: 13.5px; line-height: 1.55; color: var(--ink); margin: 6px 0 0; }
.policy-grid .pg .pg-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); opacity: 0; transition: opacity .15s; }
.policy-grid a.pg:hover .pg-more { opacity: 1; }
.prose .back-link { margin: 0 0 8px; }
.prose .back-link a { font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
@media (max-width: 860px) {
  .policy-grid { grid-template-columns: 1fr; }
}

/* compliance prose: legal reference list */
.compliance-section .legal-list { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.compliance-section .legal-list li { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-family: var(--body); font-size: 14px; line-height: 1.55; }
.compliance-section .legal-list li .la { color: var(--navy); font-weight: 600; }
.compliance-section .legal-list li .lb { color: var(--ink); font-weight: 300; }
@media (max-width: 720px) {
  .compliance-section .legal-list li { grid-template-columns: 1fr; gap: 3px; }
}

/* ---- apply page: needs checklist ---- */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; margin-top: 18px; }
.checklist .ci { display: flex; gap: 12px; align-items: flex-start; }
.checklist .ci span.k { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 720px){ .checklist { grid-template-columns: 1fr; } }

/* ---- reveal: no-JS safety (show content if JS fails) ---- */
html:not(.js) .rv { opacity: 1; transform: none; }
