/* ==========================================================================
   PavilionEnd — main stylesheet
   Teal + ink. Anek Malayalam for headlines, Noto Sans Malayalam for copy.
   Soft cards, generous whitespace, one column of tokens drives everything.
   ========================================================================== */

:root {
  --pe-teal: #0fb5a6;
  --pe-teal-600: #06968b;
  --pe-teal-700: #0a786f;
  --pe-teal-100: #cff9f1;
  --pe-teal-50: #ecfdfa;
  --pe-accent: var(--pe-teal);

  --pe-ink: #0a1416;
  --pe-ink-soft: #4a5856;
  --pe-ink-faint: #5f6f6c;   /* 5.28:1 on white — was #7c8a87 at 3.59:1, below WCAG AA */
  --pe-surface: #ffffff;
  --pe-surface-2: #f4f8f7;
  --pe-line: #e7edeb;
  --pe-live: #e5484d;

  --pe-display: "Anek Malayalam", "Noto Sans Malayalam", system-ui, sans-serif;
  --pe-body: "Noto Sans Malayalam", system-ui, -apple-system, sans-serif;

  --pe-radius: 16px;
  --pe-radius-sm: 10px;
  --pe-pill: 999px;
  --pe-shadow: 0 1px 2px rgba(10, 20, 22, .05), 0 6px 20px rgba(10, 20, 22, .07);
  --pe-shadow-hover: 0 4px 10px rgba(10, 20, 22, .08), 0 16px 40px rgba(10, 20, 22, .13);

  --pe-wrap: 1280px;
  --pe-gutter: 20px;
  --pe-header-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--pe-header-h) + 12px); }
body {
  margin: 0;
  background: var(--pe-surface);
  color: var(--pe-ink);
  font-family: var(--pe-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--pe-display); line-height: 1.3;  /* Malayalam glyphs are tall — 1.25 clipped descenders */ letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }
::selection { background: var(--pe-teal); color: #fff; }
:focus-visible { outline: 2px solid var(--pe-teal); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pe-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--pe-ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.pe-skip:focus { top: 12px; }

.pe-wrap { max-width: var(--pe-wrap); margin: 0 auto; padding-left: var(--pe-gutter); padding-right: var(--pe-gutter); }

/* ---------- Header ---------- */
.pe-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--pe-line);
  transition: box-shadow .2s ease;
}
.pe-header.is-scrolled { box-shadow: 0 6px 24px rgba(10, 20, 22, .08); }
/* Logged-in editors get WordPress's fixed admin bar over the top of the page.
   The sticky header was pinning to top:0 underneath it, so the logo and nav
   were sliced in half for anyone signed in. The bar is 32px wide-screen, 46px
   on tablets, and below 600px it scrolls away with the page instead. */
.admin-bar .pe-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .pe-header { top: 46px; }
}
@media screen and (max-width: 600px) {
  .admin-bar .pe-header { top: 0; }
}
.pe-header__bar { display: flex; align-items: center; gap: 14px; height: var(--pe-header-h); }
.pe-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.pe-brand__img, .pe-brand .custom-logo { height: 22px; width: auto; display: block; }
/* Icons carry width/height attributes, but as flex items they are shrinkable by
   default — at 320px a long Malayalam label crushed the section-head arrow to 0. */
.pe-ico { flex-shrink: 0; }
.pe-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--pe-ink); }
.pe-iconbtn:hover { background: var(--pe-surface-2); }

/* desktop nav */
.pe-nav { flex: 1 1 auto; min-width: 0; margin-left: 6px; }
.pe-nav__list { display: flex; align-items: center; gap: 2px; }
.pe-nav__item { position: relative; }
.pe-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: var(--pe-pill);
  font-family: var(--pe-display); font-weight: 700; font-size: 15.5px; color: var(--pe-ink-soft);
  white-space: nowrap; transition: background .15s, color .15s;
}
.pe-nav__link .pe-ico { opacity: .6; transition: transform .15s; }
.pe-nav__item:hover > .pe-nav__link, .pe-nav__item.is-open > .pe-nav__link, .pe-nav__item.is-current > .pe-nav__link { background: var(--pe-surface-2); color: var(--pe-ink); }
.pe-nav__item.is-current > .pe-nav__link { color: var(--pe-teal-700); }
.pe-nav__item.is-open > .pe-nav__link .pe-ico, .pe-nav__item:hover > .pe-nav__link .pe-ico { transform: rotate(180deg); }
.pe-dd {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 120;
  min-width: 220px; padding: 8px;
  background: var(--pe-surface); border: 1px solid var(--pe-line); border-radius: 14px; box-shadow: var(--pe-shadow-hover);
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.pe-nav__item:hover > .pe-dd, .pe-nav__item:focus-within > .pe-dd, .pe-nav__item.is-open > .pe-dd { opacity: 1; transform: none; pointer-events: auto; }
.pe-dd__link { display: block; padding: 9px 12px; border-radius: 9px; font-weight: 400; font-size: 14.5px; color: var(--pe-ink-soft); }
.pe-dd__link:hover, .pe-dd__link.is-current { background: var(--pe-surface-2); color: var(--pe-teal-700); }

/* search */
.pe-header__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pe-search { display: flex; align-items: center; background: var(--pe-surface-2); border: 1px solid transparent; border-radius: var(--pe-pill); padding: 0 6px 0 14px; height: 40px; width: 240px; transition: width .2s, border-color .15s; }
.pe-search:focus-within { border-color: var(--pe-teal); background: #fff; width: 300px; }
.pe-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 14.5px; color: var(--pe-ink); }
.pe-search input::placeholder { color: var(--pe-ink-faint); }
.pe-search button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--pe-ink-soft); }
.pe-search button:hover { background: var(--pe-teal-100); color: var(--pe-teal-700); }
.pe-search--block { width: 100%; height: 48px; margin: 0; }
.pe-search__toggle { display: none; }

/* mobile nav (details, no JS) */
.pe-mnav { display: none; position: relative; }
.pe-mnav > summary { list-style: none; }
.pe-mnav > summary::-webkit-details-marker { display: none; }
.pe-mnav__panel {
  position: absolute; left: 0; top: 48px; z-index: 130; width: min(320px, calc(100vw - 32px));
  background: var(--pe-surface); border: 1px solid var(--pe-line); border-radius: 16px; box-shadow: var(--pe-shadow-hover); padding: 10px;
  max-height: calc(100vh - 90px); overflow-y: auto;
}
.pe-mnav__list > li { padding: 6px 0; border-bottom: 1px solid var(--pe-line); }
.pe-mnav__list > li:last-child { border-bottom: 0; }
.pe-mnav__top { display: block; padding: 8px 10px; font-family: var(--pe-display); font-weight: 700; font-size: 16px; }
.pe-mnav__sub { padding: 0 0 4px 10px; }
.pe-mnav__link { display: block; padding: 6px 10px; border-radius: 8px; color: var(--pe-ink-soft); font-size: 14.5px; }
.pe-mnav__link:hover { background: var(--pe-surface-2); color: var(--pe-teal-700); }
.pe-mnav__search { display: flex; gap: 6px; margin-top: 10px; }
.pe-mnav__search input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--pe-line); border-radius: var(--pe-pill); padding: 0 14px; }
.pe-mnav__search .pe-btn { width: 42px; height: 42px; padding: 0; }

/* ---------- Buttons, pills, kickers ---------- */
.pe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--pe-pill); background: var(--pe-ink); color: #fff; font-family: var(--pe-display); font-weight: 700; font-size: 15px; transition: background .15s, transform .15s; }
.pe-btn:hover { background: var(--pe-teal-700); }
.pe-btn--ghost { background: transparent; color: var(--pe-ink); border: 1.5px solid var(--pe-line); }
.pe-btn--ghost:hover { background: var(--pe-surface-2); border-color: var(--pe-teal); color: var(--pe-teal-700); }

.pe-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-pill { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--pe-pill); border: 1px solid var(--pe-line); background: var(--pe-surface); font-weight: 600; font-size: 14px; color: var(--pe-ink-soft); transition: border-color .15s, color .15s, background .15s; }
.pe-pill:hover { border-color: var(--pe-teal); color: var(--pe-teal-700); }
.pe-pill.is-active { background: var(--pe-ink); border-color: var(--pe-ink); color: #fff; }
.pe-pill--tag { height: 32px; font-size: 13.5px; }

.pe-kicker { display: inline-block; padding: 6px 0; margin: -6px 0;  /* bigger tap area, same visual size */
  font-family: var(--pe-display); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--pe-teal-700); }  /* 5.34:1 — brand teal on white is only 2.57:1 */
.pe-kicker:hover { text-decoration: underline; }
.pe-kicker--sm { font-size: 11.5px; }
.pe-live { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-family: var(--pe-display); font-weight: 700; font-size: 12px; color: var(--pe-live); text-transform: uppercase; letter-spacing: .04em; }
.pe-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pe-live); box-shadow: 0 0 0 0 rgba(229, 72, 77, .6); animation: pe-pulse 1.6s infinite; }
@keyframes pe-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); } 70% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.pe-eyebrow { font-family: var(--pe-display); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--pe-teal-700); margin-bottom: 6px; }

/* ---------- Cards ---------- */
.pe-card { position: relative; display: flex; flex-direction: column; background: var(--pe-surface); border: 1px solid var(--pe-line); border-radius: var(--pe-radius); box-shadow: var(--pe-shadow); overflow: hidden; transition: box-shadow .25s ease, transform .25s ease; }
@media (hover: hover) { .pe-card:hover { box-shadow: var(--pe-shadow-hover); transform: translateY(-2px); } }
.pe-media { position: relative; display: block; overflow: hidden; background: var(--pe-surface-2); aspect-ratio: 16 / 9; }
.pe-media--lead { aspect-ratio: 1200 / 630; }
.pe-media--thumb { aspect-ratio: 4 / 3; }
.pe-media__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
@media (hover: hover) { .pe-card:hover .pe-media__img { transform: scale(1.03); } }
.pe-media__ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--pe-teal-100), var(--pe-surface-2)); color: var(--pe-teal-700); }
.pe-media__ph .pe-ico { width: 34%; height: 34%; max-width: 72px; max-height: 72px; }
.pe-media--dark { background: var(--pe-ink); }
.pe-media--dark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 22, 0) 40%, rgba(10, 20, 22, .55)); }
.pe-play { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--pe-ink); box-shadow: 0 4px 14px rgba(10, 20, 22, .25); }
.pe-play--sm { width: 28px; height: 28px; left: 8px; bottom: 8px; }
.pe-play--lg { left: 50%; top: 50%; bottom: auto; width: 60px; height: 60px; transform: translate(-50%, -50%); background: var(--pe-teal); color: #fff; }
.pe-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.pe-card__meta { display: flex; align-items: center; flex-wrap: wrap; min-height: 18px; }
.pe-card__title { font-weight: 700; font-size: 19px; line-height: 1.32; }
.pe-card__title a:hover { color: var(--pe-teal-700); }
.pe-card__title--lead { font-size: 30px; font-weight: 700; line-height: 1.32; }
.pe-card__title--sm { font-size: 15.5px; font-weight: 700; }
.pe-card__sum { color: var(--pe-ink-soft); font-size: 14.5px; line-height: 1.6; }
.pe-time { display: block; margin-top: 2px; font-size: 12.5px; color: var(--pe-ink-faint); }

.pe-card--lead .pe-card__body { padding: 20px 24px 24px; gap: 8px; }
.pe-card--lead .pe-card__sum { font-size: 15.5px; }
.pe-card--compact { flex-direction: row; align-items: stretch; }
.pe-card--compact .pe-media { flex: 0 0 128px; }
.pe-card--compact .pe-card__body { padding: 12px 14px; gap: 4px; justify-content: center; }
.pe-card--big .pe-card__title { font-size: 24px; font-weight: 700; }
.pe-card--list { flex-direction: row; }
.pe-card--list .pe-media { flex: 0 0 300px; }
.pe-card--list .pe-card__title { font-size: 22px; }
.pe-card--railitem { flex: 0 0 340px; scroll-snap-align: start; }

/* ---------- Hero ---------- */
.pe-hero { padding: 22px 0 10px; }
.pe-hero__event { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pe-hero__pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: var(--pe-pill); background: var(--pe-accent); color: #fff; font-family: var(--pe-display); font-weight: 700; font-size: 13.5px; }
.pe-hero__pilldot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.pe-hero--takeover .pe-hero__grid { border-radius: 22px; padding: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--pe-accent) 12%, #fff), var(--pe-surface-2)); }
.pe-hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: stretch; }
.pe-hero__side { display: flex; flex-direction: column; gap: 12px; }
.pe-hero__side .pe-card--compact { flex: 1 1 0; }
.pe-hero__quick { margin-top: 14px; }
.pe-hero__top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }

/* ---------- Sections ---------- */
.pe-section { padding: 34px 0; }
.pe-section--tint { background: var(--pe-surface-2); padding: 42px 0; }
.pe-section--tint .pe-card { border-color: transparent; }
.pe-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pe-sechead__title { font-size: 26px; font-weight: 700; position: relative; padding-left: 14px; }
.pe-sechead__title::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .12em; width: 4px; border-radius: 4px; background: var(--pe-accent); }
.pe-sechead__all { display: inline-flex; align-items: center; gap: 6px; font-family: var(--pe-display); font-weight: 700; font-size: 14px; color: var(--pe-teal-700); white-space: nowrap; }
.pe-sechead__all:hover { text-decoration: underline; }

.pe-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
/* A quiet section with two stories should fill its row, not sit in a 3-up
   grid with an empty cell where a third story would have gone. */
.pe-list2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.pe-spotlight { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; }
.pe-editors { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.pe-editors .pe-card--standard { grid-row: span 4; }
.pe-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 10px; margin: 0 calc(-1 * var(--pe-gutter)); padding-left: var(--pe-gutter); padding-right: var(--pe-gutter); scrollbar-width: none; }
.pe-rail::-webkit-scrollbar { display: none; }
.pe-rail--cards .pe-card { flex: 0 0 320px; scroll-snap-align: start; }
.pe-rail .pe-card--railitem .pe-media { flex-basis: 110px; }

/* --- Reels -----------------------------------------------------------------
   A swipe rail of 9:16 posters. Reels are shot vertical, so the tile is
   vertical: cropping them into a 16:9 news card threw away most of the frame
   and left faces half out of shot. Each tile is a click-to-play facade — the
   player iframe is built on press (main.js), never on page load.
   -------------------------------------------------------------------------- */
.pe-reels {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding: 4px 0 12px;
  margin: 0 calc(-1 * var(--pe-gutter));
  padding-left: var(--pe-gutter);
  padding-right: var(--pe-gutter);
  scrollbar-width: none;
}
.pe-reels::-webkit-scrollbar { display: none; }

.pe-reel {
  flex: 0 0 200px;
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The frame owns the 9:16 box so swapping the poster for an iframe cannot
   shift the rest of the rail. */
.pe-reel__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--pe-radius);
  overflow: hidden;
  background: #07100f;
}
.pe-reel__media {
  position: absolute;
  inset: 0;
  display: block;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.pe-reel__media .pe-media__img,
.pe-reel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.pe-reel__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Bottom scrim so the views pill stays legible on a bright frame. */
.pe-reel__scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(7, 16, 15, .72), rgba(7, 16, 15, 0));
  pointer-events: none;
}

.pe-reel__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--pe-ink);
  box-shadow: 0 6px 20px rgba(7, 16, 15, .35);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
  pointer-events: none;
}
.pe-reel__views {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font: 600 12px/1 var(--pe-body);
  color: #fff;
  letter-spacing: .02em;
  pointer-events: none;
}

.pe-reel__title {
  margin: 0;
  font: 600 14px/1.45 var(--pe-display);
  color: var(--pe-ink);
  /* Reel captions are long by design; three lines keeps every tile the same
     height without cutting a word in half. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}
.pe-reel__title a { color: inherit; text-decoration: none; }

@media (hover: hover) {
  .pe-reel:hover .pe-reel__media img { transform: scale(1.04); }
  .pe-reel:hover .pe-reel__play { background: var(--pe-teal); color: #fff; transform: translate(-50%, -50%) scale(1.06); }
  .pe-reel__title a:hover { color: var(--pe-teal-700); }
}
.pe-reel__media:focus-visible {
  outline: 3px solid var(--pe-teal);
  outline-offset: -3px;
}
@media (prefers-reduced-motion: reduce) {
  .pe-reel__media img,
  .pe-reel__play { transition: none; }
  .pe-reel:hover .pe-reel__media img { transform: none; }
}

/* --- Reel lightbox ---------------------------------------------------------
   Reels used to swap a Facebook player into the 200px tile itself. At that
   size Facebook stacks its own chrome (page avatar, Share, a second play
   button) over the video and blocks autoplay, so the tile showed two play
   buttons and the first press did nothing. The player now opens in a dialog at
   a real reel size, where it has room for its own UI and actually starts.
   -------------------------------------------------------------------------- */
.pe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 70px 24px 24px;
  background: rgba(7, 16, 15, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.pe-lightbox.is-open { opacity: 1; visibility: visible; }
.pe-lightbox__stage { position: relative; }
.pe-lightbox__inner {
  position: relative;
  width: min(380px, 92vw);
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 170px);
  border-radius: var(--pe-radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.pe-lightbox__inner iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Sits above the player, not on top of it: Facebook puts its own Share button
   in the top-right corner of the frame and the two were overlapping. */
.pe-lightbox__close {
  position: absolute;
  top: -54px;
  right: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, .92);
  color: var(--pe-ink);
  font: 400 24px/1 var(--pe-body);
}
.pe-lightbox__close:hover { background: #fff; }
.pe-lightbox__close:focus-visible { outline: 3px solid var(--pe-teal); outline-offset: 2px; }
.pe-lightbox__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 16px 16px;
  background: linear-gradient(to top, rgba(7, 16, 15, .9), rgba(7, 16, 15, 0));
  color: #fff;
  font: 600 14px/1.45 var(--pe-display);
  pointer-events: none;
}
.pe-lightbox__cap a { color: #fff; pointer-events: auto; }
.pe-lightbox__fb {
  display: inline-block;
  margin-top: 8px;
  font: 600 13px/1 var(--pe-body);
  color: var(--pe-teal-100);
  pointer-events: auto;
}
body.pe-noscroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .pe-lightbox { transition: none; }
}

/* Phones: two tiles in view so the rail reads as swipeable. */
@media (max-width: 560px) {
  .pe-reel { flex-basis: 44vw; }
  .pe-reel__play { width: 44px; height: 44px; }
  .pe-reel__title { font-size: 13px; }
}


/* ---------- Page header, archive ---------- */
.pe-pagehead { padding: 34px 0 22px; border-bottom: 1px solid var(--pe-line); background: linear-gradient(180deg, var(--pe-surface-2), var(--pe-surface)); }
.pe-pagehead__title { font-size: 38px; font-weight: 700; line-height: 1.4; }  /* tall Malayalam glyphs at display sizes */
.pe-pagehead__desc { margin-top: 8px; max-width: 64ch; color: var(--pe-ink-soft); }
.pe-pagehead .pe-pills { margin-top: 16px; }
.pe-pagehead__row { display: flex; gap: 22px; align-items: center; }
.pe-pagehead__row img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pe-archive { padding: 26px 0 50px; }
.pe-more { display: flex; justify-content: center; margin-top: 26px; }
.pe-pagination { margin-top: 18px; }
.pe-pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pe-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--pe-pill); border: 1px solid var(--pe-line); font-weight: 600; font-size: 14px; color: var(--pe-ink-soft); }
.pe-pagination .page-numbers.current { background: var(--pe-ink); border-color: var(--pe-ink); color: #fff; }
.pe-pagination .page-numbers:hover { border-color: var(--pe-teal); color: var(--pe-teal-700); }
.pe-pagination .screen-reader-text + .nav-links { margin: 0; }
.pe-empty { padding: 40px 0; color: var(--pe-ink-soft); }
.pe-404 { padding: 60px 0 80px; text-align: center; }
.pe-404 .pe-pagehead__desc { margin: 8px auto 20px; }
.pe-404__search { max-width: 440px; margin: 0 auto 22px; }
.pe-404 .pe-pills { justify-content: center; }

/* ---------- Single ---------- */
.pe-article { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-top: 30px; padding-bottom: 60px; }
.pe-article__head { max-width: 760px; }
.pe-article__title { font-size: 40px; font-weight: 700; line-height: 1.35; margin-top: 10px; }  /* tall Malayalam glyphs */
.pe-article__standfirst { margin-top: 14px; font-size: 19px; line-height: 1.6; color: var(--pe-ink-soft); }
.pe-article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--pe-ink-faint); }
.pe-article__meta .pe-time { margin: 0; font-size: 14px; }
.pe-article__by a { font-weight: 700; color: var(--pe-ink); }
.pe-article__by a:hover { color: var(--pe-teal-700); }
.pe-article__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--pe-line); }
.pe-article__read { display: inline-flex; align-items: center; gap: 5px; }
.pe-article__hero { margin: 26px 0 0; border-radius: var(--pe-radius); overflow: hidden; background: var(--pe-surface-2); aspect-ratio: 1200 / 630; }
.pe-article__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-article__hero figcaption { padding: 8px 2px 0; font-size: 12.5px; color: var(--pe-ink-faint); }
.pe-embed { aspect-ratio: 16 / 9; background: var(--pe-ink); }
.pe-embed iframe { width: 100%; height: 100%; display: block; }
/* A vertical reel in a 16:9 box is mostly black bars. Give it its own ratio
   and cap the width so the player does not tower over the article column. */
.pe-embed--reel {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin-inline: auto;
  border-radius: var(--pe-radius);
  overflow: hidden;
}
.pe-prose { max-width: 720px; margin-top: 28px; font-size: 18.5px; line-height: 1.95; color: #1c2624; }
.pe-prose > * + * { margin-top: 1.1em; }
.pe-prose h2, .pe-prose h3 { margin-top: 1.6em; line-height: 1.3; }
.pe-prose h2 { font-size: 26px; }
.pe-prose h3 { font-size: 22px; }
.pe-prose a { color: var(--pe-teal-700); text-decoration: underline; text-underline-offset: 3px; }
.pe-prose img { border-radius: var(--pe-radius-sm); }
.pe-prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--pe-teal); font-family: var(--pe-display); font-weight: 700; font-size: 22px; line-height: 1.5; }
.pe-prose ul, .pe-prose ol { padding-left: 1.4em; }
.pe-prose ul { list-style: disc; }
.pe-prose ol { list-style: decimal; }
.pe-prose figure, .pe-prose .wp-block-embed { margin: 1.4em 0; }
.pe-prose figcaption { font-size: 13px; color: var(--pe-ink-faint); }
.pe-prose .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; border-radius: var(--pe-radius-sm); overflow: hidden; }
.pe-prose .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-prose--page { margin-top: 24px; margin-bottom: 60px; }

.pe-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--pe-line); max-width: 720px; }
.pe-share__lbl { font-family: var(--pe-display); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--pe-ink-faint); margin-right: 6px; }
.pe-share__btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--pe-pill); border: 1px solid var(--pe-line); font-weight: 600; font-size: 14px; color: var(--pe-ink-soft); transition: background .15s, color .15s, border-color .15s; }
.pe-share__btn:hover { border-color: transparent; color: #fff; }
.pe-share__btn--whatsapp:hover { background: #25d366; }
.pe-share__btn--facebook:hover { background: #1877f2; }
.pe-share__btn--x:hover { background: #000; }
.pe-share__btn--copy:hover { background: var(--pe-teal); }
.pe-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pe-authorbox { display: flex; gap: 16px; align-items: flex-start; margin-top: 30px; padding: 20px 22px; border-radius: var(--pe-radius); background: var(--pe-surface-2); max-width: 720px; }
.pe-authorbox img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pe-authorbox__name { font-family: var(--pe-display); font-weight: 700; font-size: 18px; }
.pe-authorbox__bio { margin-top: 4px; font-size: 14.5px; color: var(--pe-ink-soft); }
.pe-related { margin-top: 44px; }
.pe-related .pe-sechead__title { margin-bottom: 16px; }
.pe-article__side { min-width: 0; }
.pe-side { position: sticky; top: calc(var(--pe-header-h) + 20px); }
.pe-side__h { font-size: 20px; font-weight: 700; margin-bottom: 12px; padding-left: 14px; position: relative; }
.pe-side__h::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .15em; width: 4px; border-radius: 4px; background: var(--pe-accent); }
.pe-side__list { display: flex; flex-direction: column; gap: 10px; }
.pe-side .pe-card--compact .pe-media { flex-basis: 104px; }

/* ---------- Footer ---------- */
.pe-footer { margin-top: 40px; background: var(--pe-ink); color: #c9d6d3; }
.pe-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 36px; }
.pe-footer__brand img { height: 24px; width: auto; }
.pe-footer__tag { margin-top: 12px; font-family: var(--pe-display); font-weight: 700; font-size: 17px; color: #fff; }
.pe-footer__social { display: flex; gap: 8px; margin-top: 18px; }
.pe-footer__social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #e6f0ee; transition: background .15s; }
.pe-footer__social a:hover { background: var(--pe-teal); color: #fff; }
.pe-footer__h { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pe-teal); margin-bottom: 12px; }
.pe-footer__col li { padding: 5px 0; }
.pe-footer__col a { color: #c9d6d3; font-size: 14.5px; }
.pe-footer__col a:hover { color: #fff; }
.pe-footer__legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #8ea09c; }

/* ---------- Toast ---------- */
.pe-toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translateX(-50%) translateY(12px); background: var(--pe-ink); color: #fff; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: var(--pe-pill); box-shadow: var(--pe-shadow-hover); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.pe-toast.is-on { opacity: 1; transform: translateX(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .pe-nav { display: none; }
  .pe-mnav { display: block; }
}
@media (max-width: 1080px) {
  .pe-nav__link { padding: 8px 10px; font-size: 14.5px; }
  .pe-search { width: 200px; }
  .pe-hero__grid { grid-template-columns: 1.3fr 1fr; }
  .pe-spotlight { grid-template-columns: 1fr 1fr; }
  .pe-spotlight .pe-card--big { grid-column: span 2; }
  .pe-article { grid-template-columns: 1fr; gap: 30px; }
  .pe-side { position: static; }
  .pe-side__list { display: grid; grid-template-columns: 1fr 1fr; }
  .pe-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --pe-gutter: 16px; --pe-header-h: 58px; }
  .pe-search { display: none; position: absolute; left: var(--pe-gutter); right: var(--pe-gutter); top: calc(var(--pe-header-h) + 8px); width: auto; height: 46px; background: #fff; border-color: var(--pe-line); box-shadow: var(--pe-shadow-hover); }
  .pe-search.is-open { display: flex; }
  .pe-search__toggle { display: inline-grid; }
  .pe-hero__grid { grid-template-columns: 1fr; }
  .pe-hero__side .pe-card--compact { flex: 0 0 auto; } /* no row stretch to share on one column */
  .pe-hero__top, .pe-grid3, .pe-editors { grid-template-columns: 1fr 1fr; }
  .pe-editors .pe-card--standard { grid-column: span 2; grid-row: auto; }
  .pe-list2 { grid-template-columns: 1fr; }
  .pe-spotlight { grid-template-columns: 1fr; }
  .pe-spotlight .pe-card--big { grid-column: auto; }
  .pe-card__title--lead { font-size: 24px; }
  .pe-article__title { font-size: 30px; }
  .pe-pagehead__title { font-size: 30px; }
  .pe-prose { font-size: 17.5px; line-height: 1.9; }
  .pe-card--list { flex-direction: column; }
  .pe-card--list .pe-media { flex-basis: auto; }
  .pe-side__list { grid-template-columns: 1fr; }
  .pe-share__btn span { display: none; }
  .pe-share__btn { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  .pe-hero__top, .pe-grid3, .pe-editors { grid-template-columns: 1fr; }
  .pe-editors .pe-card--standard { grid-column: auto; }
  .pe-card--compact .pe-media { flex-basis: 112px; }
  .pe-sechead__title { font-size: 22px; }
  .pe-footer__grid { grid-template-columns: 1fr; gap: 22px; }
  .pe-pagehead__row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- PWA: mobile tab bar, install, offline ---------- */
.pe-tabbar { display: none; }
.pe-install { width: 100%; margin: 6px 0 4px; }
.pe-offline__recent { max-width: 560px; margin: 28px auto 0; text-align: left; }
.pe-offline__list li { border-bottom: 1px solid var(--pe-line); }
.pe-offline__list a { display: block; padding: 11px 0; color: var(--pe-teal-700); font-weight: 600; }
@media (max-width: 768px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .pe-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--pe-line);
  }
  .pe-tabbar__tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--pe-ink-faint); font-family: var(--pe-display); font-weight: 700; font-size: 11.5px; line-height: 1; padding: 0; }
  .pe-tabbar__tab .pe-ico { transition: transform .15s; }
  .pe-tabbar__tab.is-active { color: var(--pe-teal-700); }
  .pe-tabbar__tab.is-active .pe-ico { transform: translateY(-1px); }
  .pe-tabbar__tab:active .pe-ico { transform: scale(.92); }
  .pe-footer { margin-bottom: 0; }
  .pe-footer__legal { padding-bottom: 20px; }
  /* Cookie notice sits above the tab bar. */
  #pe-cookie { bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Article meta row: keep byline and time together. */
  .pe-article__meta { row-gap: 4px; }
}
/* Installed app: no browser chrome, so give the top bar a little more air. */
.pe-standalone .pe-header__bar { height: calc(var(--pe-header-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }

/* ---------- Small phones (≤380px: iPhone SE, budget Android) ---------- */
@media (max-width: 380px) {
  :root { --pe-gutter: 12px; }
  .pe-header__bar { gap: 6px; }
  .pe-brand__img, .pe-brand .custom-logo { height: 17px; }   /* 10:1 wordmark → 170px, fits beside both icons */
  .pe-iconbtn { width: 36px; height: 36px; }
  .pe-card__title--lead { font-size: 22px; }
  .pe-tabbar__tab { font-size: 10.5px; }
}


/* ---------- Touch-target sizing (WCAG 2.5.8 AA = 24px; 44px is the AAA guidance) ---------- */
.pe-brand { min-height: 44px; }
.pe-share__btn { min-width: 44px; }
.pe-footer__col a { display: inline-block; padding: 6px 0; }
.pe-authorbox__name { display: inline-block; padding: 8px 0; margin: -8px 0; }
.pe-footer__brand a { display: inline-block; padding: 12px 0; }        /* logo link was 20px tall */
.pe-article__by a { display: inline-block; padding: 4px 0; }           /* byline link was 17px tall */
#pe-cookie a { display: inline-block; padding: 6px 0; }                /* privacy link in the notice */
.pe-sechead__all { min-height: 44px; align-items: center; }
.pe-share__btn { min-height: 44px; }
.pe-mnav__link { padding: 11px 10px; }
.pe-pagination .page-numbers { min-width: 44px; height: 44px; }
.pe-tabbar__tab { min-height: 44px; }
@media (max-width: 768px) {
  .pe-pill { min-height: 44px; }
  .pe-footer__col li { padding: 7px 0; }
}
