/* =====================================================================
   ravishankarayyanar.com — modern light theme
   Fonts: Sora (display) + Inter (body). Palette: ink navy + restrained gold.
   ===================================================================== */

:root {
  /* Official IPS palette */
  --navy: #0B1F3A;        /* primary — deep navy blue */
  --navy-2: #16315c;      /* derived lighter navy for gradients */
  --khaki: #B8A06A;       /* secondary — police khaki */
  --khaki-soft: #f3eede;
  --gold: #C9A227;        /* highlight — antique gold */
  --gold-2: #dbb84a;
  --gold-soft: #f7f1dd;
  --red: #B3261E;         /* emergency / action */
  --bg: #FFFFFF;          /* background */
  --bg-soft: #F4F6F8;     /* light background */
  --ink: #0B1F3A;         /* headings in navy */
  --ink-2: #222831;       /* body text — charcoal */
  --muted: #5b6572;
  --line: #e6e9ee;
  --accent: #16406e;      /* link / hover blue within navy family */
  --accent-2: #0B1F3A;
  --grad-brand: linear-gradient(120deg, #0B1F3A, #16315c);
  --grad-gold: linear-gradient(120deg, #C9A227, #dbb84a);
  --radius: 1rem;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06);
  --shadow: 0 8px 28px -6px rgba(11, 31, 58, .16);
  --shadow-lg: 0 18px 48px -12px rgba(11, 31, 58, .22);
}

html { scroll-behavior: smooth; }
/* older Safari/WebView doesn't know `clip` — plain hidden fallback first */
html, body { overflow-x: hidden; overflow-x: clip; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink-2);
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: .001em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

h1, h2, h3, h4, h5, h6, .display-font {
  font-family: 'Marcellus', 'Sora', serif;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: .01em;
}
h1 strong, h2 strong { font-weight: 400; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--navy-2); }

.section { padding: 5rem 0; }
.section-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.section-title { font-size: clamp(1.65rem, 3.1vw, 2.4rem); margin-bottom: .6rem; line-height: 1.25; }
.section-sub { color: var(--muted); max-width: 640px; }

/* gold keyline under page titles — the signature detail */
.page-hero h1, .hero-intro h1 {
  position: relative;
  padding-bottom: .9rem;
}
.page-hero h1::after, .hero-intro h1::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 72px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), #e3c06a);
}

/* ------------------------------------------- 3-tier bureaucrat header */
/* tier 1: top strip — light police blue, soft gradient */
.topbar {
  background: linear-gradient(90deg, #F4F6F8, #FFFFFF 55%, #F1F3F6);
  color: var(--ink-2);
  font-size: .8rem;
  padding-block: .45rem;
  border-top: 3px solid var(--gold);
  border-bottom: 1px solid var(--line);
}
.topbar a { color: var(--ink-2); }
.topbar a:hover { color: var(--accent); }
.topbar .org { letter-spacing: .04em; font-weight: 500; color: var(--gold); }

/* announcement rotation ticker (left side of topbar) */
.ticker { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.ticker-label {
  flex-shrink: 0;
  background: linear-gradient(120deg, #B3261E, #d13c2f);
  color: #fff;
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .22rem .7rem;
  border-radius: 2rem;
}
.ticker-rotator { position: relative; flex: 1; min-width: 0; height: 1.3em; }
.ticker-item {
  position: absolute; left: 0; top: 0;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink-2); font-weight: 500;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease;
}
.ticker-item.active { opacity: 1; visibility: visible; }
.ticker-item:hover { color: var(--accent); text-decoration: underline; }

/* tier 2: masthead */
.masthead { background: linear-gradient(180deg, #FFFFFF, #F7F8FA); border-bottom: 1px solid var(--line); padding-block: 1rem; }
.masthead-logo {
  width: 74px; height: 74px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--gold-2);
  box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(16,24,40,.18);
}
.masthead-name { display: block; font-family: 'Marcellus', serif; font-weight: 400; font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--ink); line-height: 1.15; letter-spacing: .01em; }
.masthead-desig { display: block; font-weight: 600; font-size: .85rem; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-top: .15rem; }
.masthead-creds { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.masthead-badge {
  background: var(--khaki-soft); color: #8a7443;
  border: 1px solid #e0d5b8;
  font-size: .82rem; border-radius: 2rem; padding: .5rem 1rem; white-space: nowrap;
}

/* tier 3: menu bar with mega menus — light gradient */
.menubar {
  background: linear-gradient(120deg, #F4F6F8, #FFFFFF 50%, #EFF2F5);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px -10px rgba(11, 31, 58, .18);
}
.menu { gap: .25rem; justify-content: center; width: 70%; margin-inline: auto; }
.menu > li { position: static; }
.m-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--ink-2); font-weight: 600; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .9rem 1.05rem;
  border-bottom: 3px solid transparent;
}
.m-link i.bi-chevron-down { font-size: .65rem; transition: transform .2s; }
.m-link:hover, .m-link.active { color: var(--accent); border-bottom-color: var(--gold-2); }
.has-mega:hover .m-link i.bi-chevron-down { transform: rotate(180deg); }

.mega {
  position: absolute; left: 50%; top: 100%;
  width: min(70vw, 1240px);                     /* 70% of the SCREEN, centered */
  background:
    radial-gradient(420px 180px at 92% 0%, rgba(201, 162, 39, .10), transparent 60%),
    radial-gradient(420px 200px at 4% 100%, rgba(184, 160, 106, .08), transparent 60%),
    linear-gradient(180deg, #ffffff, #fbfcfd);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--gold), var(--khaki), var(--gold)) 1;
  border-radius: 0 0 1.1rem 1.1rem;
  box-shadow: 0 30px 60px -18px rgba(11, 31, 58, .35);
  padding: 2rem 2.4rem;
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 1050;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* column separators inside the panel */
.mega .row > [class*="col-"] + [class*="col-"] { border-left: 1px solid var(--line); padding-left: 2rem; }

.mega-h {
  display: flex; align-items: center; gap: .55rem;
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--navy);
  margin-bottom: .9rem; padding-bottom: .55rem;
  border-bottom: 1px solid var(--gold-soft);
}
.mega-h::before {
  content: "";
  width: 9px; height: 9px; border-radius: 2px;
  transform: rotate(45deg);
  background: var(--grad-gold);
  flex-shrink: 0;
}
.mega a {
  display: flex; align-items: center; gap: .5rem;
  color: var(--ink-2); font-size: .92rem; padding: .34rem 0;
  transition: color .15s, padding-left .15s;
}
.mega a::before {
  content: "›";
  color: var(--khaki);
  font-weight: 700;
  transition: color .15s;
}
.mega a:hover { color: var(--accent); padding-left: .3rem; }
.mega a:hover::before { color: var(--gold); }
.mega-p { font-size: .9rem; color: var(--muted); line-height: 1.7; }

/* news drawer */
.news-drawer { width: min(480px, 92vw); }
.news-drawer .offcanvas-header {
  background: linear-gradient(120deg, var(--bg-soft), var(--khaki-soft));  /* light police khaki tint */
  border-bottom: 3px solid var(--gold);
  padding: 1.1rem 1.4rem;
}
.news-drawer .offcanvas-title { color: var(--navy); font-family: 'Marcellus', serif; font-size: 1.05rem; line-height: 1.4; }
.news-drawer .btn-close { opacity: .7; }
.news-drawer .btn-close:hover { opacity: 1; }
.news-drawer .offcanvas-body { padding: 1.4rem; }

/* mobile offcanvas */
.oc-menu a { color: var(--ink-2); font-weight: 500; display: block; padding: .3rem 0; }
.oc-menu a:hover { color: var(--accent); }
.oc-h { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--gold); margin-top: .8rem; }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative;
  background:
    radial-gradient(800px 340px at 92% 8%, rgba(201, 162, 39, .14), transparent 55%),
    radial-gradient(900px 420px at 4% 90%, rgba(184, 160, 106, .12), transparent 60%),
    linear-gradient(180deg, #F4F6F8 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero .carousel-item img {
  width: 100%;
  height: clamp(340px, 56vw, 620px);
  object-fit: cover;
  object-position: center top;
}
.hero .carousel-item::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(16,24,40,0) 45%, rgba(16,24,40,.55) 100%);
}
.hero .carousel-caption {
  z-index: 2;
  text-align: left;
  left: 8%; right: auto; bottom: 2.2rem;
  max-width: 560px;
}
.hero .carousel-caption .cap {
  display: inline-block;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  padding: .6rem 1.1rem;
  border-radius: .45rem;
  border-left: 4px solid var(--gold);
  box-shadow: 0 8px 24px -8px rgba(11, 31, 58, .35);
}
.hero .carousel-indicators [data-bs-target] { width: 26px; height: 3px; border-radius: 2px; }
.hero-intro { padding: 3.2rem 0 3.6rem; }
.hero-intro h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.hero-intro .lead { color: var(--muted); font-size: 1.06rem; }
.badge-role {
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
  border-radius: 2rem;
  padding: .45rem 1rem;
  font-size: .82rem;
  letter-spacing: .04em;
}

/* ------------------------------------------------------------ stats */
.stat-strip {
  border-block: 1px solid var(--line);
  background: linear-gradient(120deg, #0B1F3A, #16315c 55%, #1c3a66);
}
.stat { padding: 1.9rem 1rem; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px; background: rgba(255,255,255,.14); }
.stat .num {
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 2.2rem;
  background: linear-gradient(120deg, #eccc6e, #C9A227);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { color: #b5c0d1; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }

/* ------------------------------------------------------------ cards */
.card-rs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
/* link-cards inside grids equalise height; content cards size naturally */
a.card-rs { height: 100%; }
.card-rs:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-rs .card-img-wrap { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.card-rs .card-img-wrap.tall { aspect-ratio: 3 / 4; }
.card-rs .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s ease; }
.card-rs:hover .card-img-wrap img { transform: scale(1.045); }
.card-rs .card-body { padding: 1.25rem 1.35rem; }
.card-rs .card-title { font-size: .98rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.chip {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  background: transparent;
  border: 1px solid #c3ccd9;
  padding: .26rem .75rem;
  border-radius: 2rem;
}
.chip.gold { color: #9d8020; border-color: #dcc98e; background: transparent; }
.meta-line { color: var(--muted); font-size: .85rem; }

/* --------------------------------------------------------- timeline */
.timeline { position: relative; margin-left: .4rem; }
.timeline::before {
  content: "";
  position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--line));
  border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 1.9rem 2.4rem; }
.tl-item::before {
  content: "";
  position: absolute; left: 2px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 4px #eceff3;
}
.tl-item.current::before { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.tl-dates { font-size: .82rem; font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.tl-role { font-family: 'Marcellus', serif; font-weight: 400; color: var(--ink); font-size: 1.08rem; }
.tl-item .tl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .9rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tl-item:hover .tl-card { transform: translateX(4px); box-shadow: var(--shadow); border-color: #d9e2f2; }
.tl-item.current .tl-card { border-color: #ecd9a8; background: linear-gradient(180deg, #fffdf6, #fff); }

/* ---------------------------------------------------------- gallery */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.g-item {
  position: relative;
  border-radius: .8rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  display: block;
}
.g-item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .35s ease; }
.g-item:hover img { transform: scale(1.05); }
.g-item .g-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem .9rem .7rem;
  background: linear-gradient(transparent, rgba(16,24,40,.72));
  color: #fff; font-size: .84rem; font-weight: 500;
  opacity: 0; transition: opacity .25s;
}
.g-item:hover .g-cap { opacity: 1; }

/* ------------------------------------------------------------ misc */
.pdf-frame { width: 100%; height: min(85vh, 1000px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
/* inline fullscreen: covers the whole viewport; floating close button on top */
.pdf-frame.fs {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  border-radius: 0;
  border: 0;
}
.pdf-fs-close {
  display: none;
  position: fixed;
  top: 14px; right: 18px;
  z-index: 2010;
  align-items: center; gap: .5rem;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 2rem;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .6rem 1.2rem;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .5);
}
.pdf-fs-close:hover { background: #99201a; color: #fff; }
body.pdf-fs-active .pdf-fs-close { display: inline-flex; }
body.pdf-fs-active { overflow: hidden; }
.btn-rs {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: #fff;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .75rem 1.7rem;
  border: 0;
  transition: box-shadow .2s, transform .2s;
}
.btn-rs:hover { color: #fff; box-shadow: 0 10px 22px -10px rgba(20, 38, 74, .55); transform: translateY(-1px); }
.btn-rs-outline {
  border: 1px solid #cdd8ea;
  color: var(--ink-2);
  border-radius: .5rem;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .7rem 1.5rem;
  background: #fff;
}
.btn-rs-outline:hover { border-color: var(--gold); color: var(--gold); background: #fff; }
.filter-bar .btn { border-radius: 2rem; font-size: .88rem; font-weight: 500; padding: .45rem 1.15rem; }
.filter-bar .btn-check:checked + .btn, .filter-bar .btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.breadcrumb { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.breadcrumb .breadcrumb-item.active { color: var(--khaki); }
.page-hero {
  position: relative;
  background:
    radial-gradient(700px 300px at 88% 0%, rgba(201, 162, 39, .13), transparent 60%),
    radial-gradient(900px 380px at 5% 100%, rgba(184, 160, 106, .10), transparent 60%),
    linear-gradient(180deg, #F4F6F8, var(--bg));
  padding: 1.3rem 0 1.2rem;
}
.page-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); display: flex; align-items: center; gap: .8rem; padding-bottom: .7rem; margin-bottom: .4rem; }
.hero-search { max-width: 560px; }
.hero-search .input-group-text { border-radius: .5rem 0 0 .5rem; }
.hero-search .form-control { box-shadow: none; }
.hero-search .form-control:focus { box-shadow: none; }
.hero-search .input-group { box-shadow: var(--shadow-sm); border-radius: .55rem; }
.page-hero .breadcrumb { margin-bottom: 0; font-size: .82rem; }
.page-hero .eyebrow { margin-bottom: .35rem; }
.page-hero .section-sub { font-size: .95rem; margin-bottom: 0; }
.hero-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--grad-gold);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 6px 16px -6px rgba(185, 138, 47, .55);
}

.prose { overflow-x: auto; }
.prose p, .prose li { text-align: left !important; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { margin-top: 1.6rem; font-size: 1.15rem; }
.prose h3 u, .prose h4 u, .prose b u, .prose strong u { text-decoration: none; }
.prose ul { list-style: none; padding-left: 0; margin: .8rem 0 1.2rem; display: grid; gap: .55rem; }
.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.65;
}
.prose ul li::before {
  content: "";
  position: absolute; left: 2px; top: .58em;
  width: 8px; height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--grad-gold);
}
.prose table { width: 100%; font-size: .9rem; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: .7rem; overflow: hidden; }
.prose table td { padding: .65rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose table tr:last-child td { border-bottom: 0; }
.prose table tr:nth-child(odd) td { background: #f8fafd; }
.prose table td:first-child { font-weight: 600; color: var(--ink); }
.prose figure { margin: 0; }
.prose img { max-width: 100%; height: auto; border-radius: .75rem; }
.table-scroll { overflow-x: auto; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ----------------------------------------------------------- footer */
.footer {
  background: var(--navy);
  color: #c6d2e6;
  padding: 3.6rem 0 1.6rem;
  margin-top: 5rem;
}
.footer h6 {
  color: var(--gold-2);
  font-family: 'Inter', sans-serif;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer a { color: #c6d2e6; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer { background: linear-gradient(150deg, #081729, #0B1F3A 70%, #122a4d); }
.footer .brand { font-family: 'Marcellus', serif; font-weight: 400; color: #fff; font-size: 1.3rem; letter-spacing: .02em; }
.footer .fine { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.4rem; padding-top: 1.4rem; font-size: .82rem; color: #8fa2c4; }

/* pagination */
.pagination .page-link { color: var(--ink-2); border-color: var(--line); border-radius: .5rem; margin: 0 .15rem; }
.pagination .page-item.active .page-link { background: var(--navy); border-color: var(--navy); }

/* ------------------------------------------- aesthetic finishing layer */
::selection { background: var(--gold-soft); color: var(--navy); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #c3ccd9; border-radius: 6px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--khaki); }

.card-rs:hover { border-color: #dcc98e; }

.g-item { border-radius: .6rem; }
.g-item .g-cap { background: linear-gradient(transparent, rgba(11, 31, 58, .78)); }

blockquote, .prose blockquote {
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 1rem 1.4rem;
  border-radius: 0 .6rem .6rem 0;
  font-style: italic;
  color: var(--ink);
}

.section-title { position: relative; }

img { user-select: none; }

/* --------- fallback for browsers without aspect-ratio (iOS < 15) --------- */
@supports not (aspect-ratio: 1) {
  .card-rs .card-img-wrap, .g-item {
    position: relative;
    height: 0;
    padding-top: 75%;                 /* 4:3 */
  }
  .card-rs .card-img-wrap.tall { padding-top: 133%; }   /* 3:4 */
  .card-rs .card-img-wrap img, .g-item img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
  }
}

/* ------------------------------------------------ mobile refinements */
@media (max-width: 991px) {
  .masthead { padding-block: .7rem; }
  .masthead-logo { width: 54px; height: 54px; }
  .masthead-creds { display: none; }
}

@media (max-width: 767px) {
  .section { padding: 3rem 0; }
  .page-hero { padding: 1rem 0 1rem; }
  .page-hero .breadcrumb { display: none; }           /* save space; nav covers it */
  .hero-ic { width: 40px; height: 40px; font-size: 1.05rem; border-radius: 11px; }
  .hero .carousel-item img { height: clamp(240px, 62vw, 420px); }
  .hero .carousel-caption { left: 4%; right: 4%; bottom: .9rem; }
  .hero .carousel-caption .cap { font-size: .74rem; padding: .45rem .8rem; display: block; white-space: normal; }
  .hero-intro { padding: 2rem 0 2.4rem; }
  .stat .num { font-size: 1.55rem; }
  .stat { padding: 1.2rem .5rem; }
  .stat .lbl { font-size: .68rem; }
  .g-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
  .tl-item { padding-left: 1.9rem; padding-bottom: 1.2rem; }
  .footer { padding: 2.6rem 0 1.2rem; margin-top: 3rem; }
  .pdf-frame { height: 70vh; }
  .filter-bar .btn { font-size: .78rem; padding: .35rem .85rem; }
  .card-rs .card-body { padding: 1rem 1.1rem; }
}
