/*
Theme Name: OceanWP Child (hmmnm.in)
Theme URI: https://hmmnm.in/
Description: Child theme of OceanWP for hmmnm.in — exam-prep educational blog. Design system: hmmnm.com DNA (Inter/slate/dark bands) with teal accent on a light-first reading surface. Managed via workspace; edit with care.
Author: hmmnm
Template: oceanwp
Version: 1.7.7
Text Domain: oceanwp-child
*/
/* v1.7.7: archive/search grids — uniform 16:9 featured-image window + equalized card geometry (featured-image alignment fix). */
/* v1.7.6: megamenu badges now count child categories too (Study Abroad was 0 with 15 IELTS posts). */
/* v1.7.5: nav dropdown (megamenu) alignment — panels now center on the page container, not each trigger. */

/* ============================================================
   0. DESIGN TOKENS (hmmnm.in expression of hmmnm.com DNA)
   ============================================================ */
:root {
  /* Neutral ramp — shared with hmmnm.com */
  --hi-bg-deep: #020617;            /* slate-950 — hero/footer bands */
  --hi-header: rgba(15, 23, 42, .95); /* slate-900 — fixed header */
  --hi-text-strong: #f1f5f9;        /* slate-100 — on-dark text */
  --hi-page: #f8fafc;               /* slate-50 — page bg (LIGHT-first, diverges from .com) */
  --hi-surface: #ffffff;            /* cards */
  --hi-text: #334155;               /* slate-700 body text */
  --hi-muted: #64748b;              /* slate-400 */
  --hi-hairline: #e2e8f0;           /* slate-200 */

  /* Accent — TEAL (chosen 2026-08-23; .com uses indigo #a5b4fc) */
  --hi-accent: #14b8a6;             /* teal-500 */
  --hi-accent-strong: #0d9488;      /* teal-600 */
  --hi-accent-soft: #ccfbf1;        /* teal-100 */
  --hi-accent-ink: #134e4a;         /* teal-900 — text on soft */

  /* Semantic chips */
  --hi-chip-amber: #f59e0b;         /* difficulty/featured */
  --hi-chip-amber-soft: #fef3c7;
  --hi-chip-green: #047857;         /* solved/practice */
  --hi-chip-green-soft: #d1fae5;

  /* Type */
  --hi-font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hi-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hi-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  /* Geometry — shared with .com */
  --hi-radius: 12px;
  --hi-content-w: 800px;
  --hi-container-w: 1200px;
  --hi-shadow-card: 0 1px 3px rgba(2, 6, 23, .06);
  --hi-shadow-lift: 0 10px 24px -8px rgba(2, 6, 23, .18);
  --hi-header-h: 66px;
}

/* ============================================================
   1. BASE / TYPOGRAPHY (Inter ramp, 16px base — from Open Sans 14px)
   ============================================================ */
html { font-size: 16px; }
body,
body.oceanwp-theme,
body.wp-custom-logo {
  font-family: var(--hi-font-body);
  color: var(--hi-text);
  background: var(--hi-page);
  font-size: 1.0625rem;           /* 17px */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .page-header .page-title,
.site-heading,
h1 a, h2 a, h3 a {
  font-family: var(--hi-font-head) !important;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
}
h1, .entry-title { font-weight: 800; }

p { line-height: 1.75; }

a { color: var(--hi-accent-strong); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--hi-accent); }

::selection { background: var(--hi-accent-soft); color: var(--hi-accent-ink); }

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

/* Logo lockup — wordmark styled if text logo used */
#site-logo .site-title a,
.site-title a {
  font-family: var(--hi-font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ============================================================
   2. HEADER — dark slate band like hmmnm.com (fixed, 66px)
   ============================================================ */
#site-header,
.site-header,
#site-header.sticky-mobile,
.oceanwp-header {
  background: var(--hi-header) !important;
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

#site-header-inner {
  max-width: var(--hi-container-w);
  margin: 0 auto;
  min-height: var(--hi-header-h);
  display: flex;
  align-items: center;
}

#site-navigation .nav-menu > li > a,
#site-navigation .menu > li > a,
#site-navigation a,
.navigation li a {
  color: #e2e8f0 !important;
  font-family: var(--hi-font-head);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: 0;
}
#site-navigation .nav-menu > li > a:hover,
#site-navigation .menu > li > a:hover,
#site-navigation a:hover {
  color: var(--hi-accent) !important;
}

/* 2b. NAV LINK MOTION (v1.7.0) — sweeping underline + soft glow
   Underline grows from the center out; links get a faint pill wash.
   Applied to top-level items only so dropdown anchors stay calm. */
#site-navigation .menu > li:not(.hi-mega-trigger) > a,
#site-navigation .nav-menu > li:not(.hi-mega-trigger) > a {
  position: relative;
  padding: 10px 2px;
  background-image: linear-gradient(90deg, rgba(20, 184, 166, 0), rgba(20, 184, 166, .12), rgba(20, 184, 166, 0));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 10px;
  transition:
    color .28s var(--hi-ease),
    background-size .32s var(--hi-ease),
    text-shadow .28s var(--hi-ease);
}
#site-navigation .menu > li:not(.hi-mega-trigger) > a::after,
#site-navigation .nav-menu > li:not(.hi-mega-trigger) > a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hi-accent), #5eead4);
  transition: left .3s var(--hi-ease), right .3s var(--hi-ease), opacity .3s var(--hi-ease);
  opacity: 0;
}
#site-navigation .menu > li:not(.hi-mega-trigger) > a:hover,
#site-navigation .nav-menu > li:not(.hi-mega-trigger) > a:hover,
#site-navigation .menu > li:not(.hi-mega-trigger).current-menu-item > a,
#site-navigation .nav-menu > li:not(.hi-mega-trigger).current-menu-item > a,
#site-navigation .menu > li:not(.hi-mega-trigger).current-menu-ancestor > a,
#site-navigation .nav-menu > li:not(.hi-mega-trigger).current-menu-ancestor > a {
  background-size: 100% 100%;
}
#site-navigation .menu > li:not(.hi-mega-trigger) > a:hover::after,
#site-navigation .nav-menu > li:not(.hi-mega-trigger) > a:hover::after,
#site-navigation .menu > li:not(.hi-mega-trigger).current-menu-item > a::after,
#site-navigation .nav-menu > li:not(.hi-mega-trigger).current-menu-item > a::after,
#site-navigation .menu > li:not(.hi-mega-trigger).current-menu-ancestor > a::after,
#site-navigation .nav-menu > li:not(.hi-mega-trigger).current-menu-ancestor > a::after {
  left: 0; right: 0;
  opacity: 1;
}
#site-navigation .menu > li.current-menu-item > a,
#site-navigation .nav-menu > li.current-menu-item > a,
#site-navigation .menu > li.current-menu-ancestor > a,
#site-navigation .nav-menu > li.current-menu-ancestor > a {
  color: #5eead4 !important;
}
/* mega trigger's own hover state: chevron flips + link brightens
   (restyled in §21 — no underline/wash on that item) */

/* nav dropdown panels */
#site-navigation .sub-menu,
.navigation .sub-menu {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--hi-radius);
  box-shadow: var(--hi-shadow-lift);
}
#site-navigation .sub-menu li a { color: #cbd5e1 !important; }
#site-navigation .sub-menu li a:hover { color: var(--hi-accent) !important; background: rgba(20, 184, 166, .08); }

/* Header search toggle */
#search-toggle a,
a[href="#searchform-header-replace"],
.search-header-replace-close {
  color: #e2e8f0 !important;
}
#searchform-header-replace input {
  background: #0f172a;
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, .25);
}

/* ============================================================
   3. HERO (used by child front-page template)
   ============================================================ */
.hi-hero {
  background: var(--hi-bg-deep);
  color: var(--hi-text-strong);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hi-hero::before {           /* subtle glow, teal — .com uses dark only */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(20, 184, 166, .14), transparent 65%),
    radial-gradient(500px 260px at 10% 100%, rgba(20, 184, 166, .10), transparent 60%);
  pointer-events: none;
}
.hi-hero-inner {
  max-width: var(--hi-container-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.hi-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  max-width: 780px;
}
.hi-hero .hi-hero-sub {
  color: #94a3b8;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 640px;
  margin: 0 0 28px;
}
.hi-hero .hi-accent-word { color: var(--hi-accent); }

/* Hero search */
.hi-hero-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: var(--hi-radius);
  padding: 8px;
}
.hi-hero-search input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 1rem;
  padding: 8px 10px;
  outline: none;
}
.hi-hero-search input::placeholder { color: #64748b; }
.hi-hero-search button {
  background: var(--hi-accent);
  color: #022c22;
  border: none;
  border-radius: 9px;
  padding: 10px 22px;
  font-weight: 700;
  font-family: var(--hi-font-head);
  cursor: pointer;
  transition: background .15s ease;
}
.hi-hero-search button:hover { background: #2dd4bf; }

/* Category chips under hero */
.hi-chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hi-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(20, 184, 166, .45);
  color: #99f6e4;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--hi-font-head);
  transition: all .15s ease;
}
.hi-chip:hover { background: rgba(20, 184, 166, .12); color: #5eead4; border-color: var(--hi-accent); }

/* ============================================================
   4. SECTION SHELL (shared container/headings for home blocks)
   ============================================================ */
.hi-section { padding: 48px 0; }
.hi-section--gray { background: var(--hi-page); }
.hi-section--white { background: var(--hi-surface); }
.hi-container { max-width: var(--hi-container-w); margin: 0 auto; padding: 0 24px; }
.hi-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 26px;
}
.hi-section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.hi-section-head h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 26px;
  border-radius: 2px;
  background: var(--hi-accent);
}
.hi-section-more { font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* ============================================================
   5. CARD GRID — blog index / category / search (3-col like .com)
   ============================================================ */
.hi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 1024px) { .hi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .hi-grid { grid-template-columns: 1fr; } }

/* OceanWP blog-entry override → card look */
body.blog .blog-entry,
body.archive .blog-entry,
body.search .blog-entry {
  background: var(--hi-surface);
  border: 1px solid var(--hi-hairline);
  border-radius: var(--hi-radius);
  box-shadow: var(--hi-shadow-card);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  margin-bottom: 0 !important;
}
body.blog ul article, body.archive ul article { list-style: none; }
body.blog .blog-entry:hover,
body.archive .blog-entry:hover,
body.search .blog-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--hi-shadow-lift);
  border-color: rgba(20, 184, 166, .4);
}
.blog-entry-thumbnail img { width: 100%; height: auto; display: block; }
.blog-entry-content { padding: 0 0 8px; }

/* card title + excerpt */
.blog-entry-title, .blog-entry-title a {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}
.blog-entry-title a:hover { color: var(--hi-accent-strong) !important; }
.blog-entry-summary p, .blog-entry-excerpt p {
  color: var(--hi-muted);
  font-size: .95rem;
}

/* category eyebrow on cards (child functions.php injects) */
.hi-card-eyebrow {
  display: inline-block;
  font-family: var(--hi-font-head);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hi-accent-strong);
  background: var(--hi-accent-soft);
  border-radius: 6px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.hi-card-date {
  color: var(--hi-muted);
  font-size: .82rem;
  display: block;
  margin-top: 8px;
}

/* ============================================================
   6. FEATURED CARD (homepage)
   ============================================================ */
.hi-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--hi-surface);
  border: 1px solid var(--hi-hairline);
  border-radius: var(--hi-radius);
  box-shadow: var(--hi-shadow-card);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.hi-featured:hover { box-shadow: var(--hi-shadow-lift); transform: translateY(-2px); }
.hi-featured-media { min-height: 300px; background: var(--hi-bg-deep); }
.hi-featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hi-featured-body { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.hi-featured-body h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hi-featured-body h3 a { color: #0f172a; }
.hi-featured-body h3 a:hover { color: var(--hi-accent-strong); }
.hi-featured-body p { color: var(--hi-muted); margin: 0; }
@media (max-width: 900px) { .hi-featured { grid-template-columns: 1fr; } }

/* ============================================================
   7. SERIES SHELF (unique to hmmnm.in) — horizontal card scroller
   ============================================================ */
.hi-series {
  background: var(--hi-bg-deep);
  color: var(--hi-text-strong);
  padding: 52px 0 56px;
}
.hi-series .hi-section-head h2 { color: #fff; }
.hi-series-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.4) transparent;
}
.hi-series-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--hi-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.hi-series-card:hover {
  border-color: rgba(20, 184, 166, .5);
  background: rgba(20, 184, 166, .07);
  transform: translateY(-2px);
}
.hi-series-card .hi-series-name {
  font-family: var(--hi-font-head);
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.hi-series-meta { color: #94a3b8; font-size: .85rem; }
.hi-progress { height: 6px; border-radius: 3px; background: rgba(148, 163, 184, .2); overflow: hidden; }
.hi-progress span { display: block; height: 100%; background: var(--hi-accent); border-radius: 3px; }
.hi-series-card .hi-series-link {
  margin-top: auto;
  color: #5eead4;
  font-weight: 700;
  font-size: .875rem;
}

/* ============================================================
   8. ARTICLE TEMPLATE — exam reading layer
   ============================================================ */
/* content column */
.single .entry-content,
.page .entry-content {
  max-width: var(--hi-content-w);
  font-size: 1.0625rem;
}
.single-post .entry-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: var(--hi-content-w);
}

/* badge row under h1 (functions.php injects) */
.hi-badge-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 14px 0 22px;
  max-width: var(--hi-content-w);
}
.hi-badge {
  font-family: var(--hi-font-head);
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 13px;
  letter-spacing: .02em;
}
.hi-badge--cat { background: var(--hi-accent-soft); color: var(--hi-accent-ink); }
.hi-badge--diff-basic { background: var(--hi-chip-green-soft); color: #065f46; }
.hi-badge--diff-intermediate { background: var(--hi-chip-amber-soft); color: #92400e; }
.hi-badge--diff-advanced { background: #fee2e2; color: #991b1b; }
.hi-badge--meta { background: #f1f5f9; color: var(--hi-muted); font-weight: 600; }
.hi-badge--updated { background: #e0f2fe; color: #075985; }

/* TOC — inline after intro (choice: same as .com) */
.hi-toc {
  background: var(--hi-page);
  border: 1px solid var(--hi-hairline);
  border-left: 4px solid var(--hi-accent);
  border-radius: var(--hi-radius);
  padding: 18px 22px;
  margin: 28px 0;
}
.hi-toc-title {
  font-family: var(--hi-font-head);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0 0 10px;
}
.hi-toc ol { margin: 0; padding-left: 20px; }
.hi-toc li { margin: 6px 0; font-size: .95rem; }
.hi-toc a { color: var(--hi-text); }
.hi-toc a:hover { color: var(--hi-accent-strong); }

/* Revision card (takeaways) */
.hi-revision {
  background: var(--hi-accent-soft);
  border: 1px solid rgba(13, 148, 136, .25);
  border-left: 4px solid var(--hi-accent-strong);
  border-radius: var(--hi-radius);
  padding: 20px 24px;
  margin: 30px 0;
}
.hi-revision h2, .hi-revision .hi-revision-title {
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--hi-accent-ink);
}
.hi-revision ul { margin: 0; padding-left: 20px; }
.hi-revision li { margin: 7px 0; color: #134e4a; }

/* Card excerpts (homepage rails + series shelf) */
.hi-card-excerpt {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.45;
  margin: 2px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Series navigator — Part x of N pills */
.hi-series-nav {
  border: 1px solid var(--hi-hairline);
  background: var(--hi-surface);
  border-radius: var(--hi-radius);
  padding: 18px 22px;
  margin: 30px 0;
}
.hi-series-nav .hi-series-nav-label {
  font-family: var(--hi-font-head);
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hi-accent-strong);
  margin-bottom: 10px;
}
.hi-series-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hi-pill {
  min-width: 38px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--hi-hairline);
  font-family: var(--hi-font-head);
  font-weight: 700; font-size: .875rem;
  color: var(--hi-text);
  background: var(--hi-page);
  transition: all .12s ease;
}
a.hi-pill:hover { border-color: var(--hi-accent); color: var(--hi-accent-strong); }
.hi-pill--current {
  background: var(--hi-accent);
  border-color: var(--hi-accent);
  color: #022c22;
}

/* content typography details */
.entry-content h2 {
  font-size: 1.5rem;
  margin-top: 2.2em;
  padding-bottom: .3em;
  border-bottom: 1px solid var(--hi-hairline);
}
.entry-content h3 { font-size: 1.2rem; margin-top: 1.8em; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content ul li, .entry-content ol li { margin: .45em 0; }
.entry-content blockquote {
  border-left: 3px solid var(--hi-accent);
  background: var(--hi-page);
  padding: 14px 20px;
  border-radius: 0 var(--hi-radius) var(--hi-radius) 0;
  font-style: normal;
  color: #0f172a;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.entry-content th {
  background: var(--hi-bg-deep); color: #e2e8f0;
  font-family: var(--hi-font-head); text-align: left; padding: 10px 14px;
}
.entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--hi-hairline); }
.entry-content tr:nth-child(even) td { background: var(--hi-page); }
.entry-content code { font-family: var(--hi-mono); background: var(--hi-page); border: 1px solid var(--hi-hairline); border-radius: 5px; padding: .1em .4em; font-size: .9em; }

/* PYQ reference aside */
.hi-pyq {
  border-left: 3px solid var(--hi-chip-amber);
  background: var(--hi-chip-amber-soft);
  color: #78350f;
  border-radius: 0 var(--hi-radius) var(--hi-radius) 0;
  padding: 12px 18px;
  margin: 1.4em 0;
  font-size: .95rem;
}

/* ============================================================
   9. SIDEBAR
   ============================================================ */
#right-sidebar, .sidebar-box, aside.widget {
  background: var(--hi-surface);
  border: 1px solid var(--hi-hairline);
  border-radius: var(--hi-radius);
  padding: 20px;
}
#right-sidebar .widget-title,
aside.widget .widget-title {
  font-family: var(--hi-font-head);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
#right-sidebar ul li a { color: var(--hi-text); }
#right-sidebar ul li a:hover { color: var(--hi-accent-strong); }

/* ============================================================
   10. PAGINATION — must ALWAYS be visible (core defect fix)
   ============================================================ */
nav.pagination, ul.page-numbers, .page-numbers, .oceanwp-pagination {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
ul.page-numbers {
  list-style: none;
  gap: 8px;
  justify-content: center;
  margin: 42px 0 8px;
  padding: 0 !important;
  flex-wrap: wrap;
}
.page-numbers li { display: block; margin: 0 !important; }
.page-numbers a, .page-numbers span {
  display: inline-flex !important;
  align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--hi-hairline);
  background: var(--hi-surface);
  color: var(--hi-text);
  font-family: var(--hi-font-head);
  font-weight: 600;
  font-size: .95rem;
  transition: all .12s ease;
}
.page-numbers a:hover { border-color: var(--hi-accent); color: var(--hi-accent-strong); }
.page-numbers span.current {
  background: var(--hi-accent);
  border-color: var(--hi-accent);
  color: #022c22;
}

/* ============================================================
   11. FOOTER — dark band, family look with .com
   ============================================================ */
#footer, .site-footer, #footer-inner {
  background: var(--hi-bg-deep);
  color: #94a3b8;
}
#footer .widget-title, #footer h2, #footer h3 {
  color: #f1f5f9;
  font-family: var(--hi-font-head);
  font-weight: 700;
  font-size: 1rem;
}
#footer a { color: #99f6e4; }
#footer a:hover { color: #5eead4; }
#footer-bottom {
  background: #020617;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, .12);
  padding: 18px 0;
  font-size: .85rem;
}
#footer-bottom a { color: #94a3b8; }

/* ============================================================
   12. FORMS (contact page)
   ============================================================ */
input[type=text], input[type=email], textarea, select, input[type=search].wpforms-field {
  border: 1px solid var(--hi-hairline);
  border-radius: 9px;
  padding: 11px 14px;
  font-family: var(--hi-font-body);
  font-size: .98rem;
  background: var(--hi-surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=text]:focus, input[type=email]:focus, textarea:focus {
  border-color: var(--hi-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
  outline: none;
}
button[type=submit], input[type=submit], .wpforms-submit, .button {
  background: var(--hi-accent) !important;
  color: #022c22 !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 11px 26px !important;
  font-family: var(--hi-font-head) !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background .15s ease !important;
}
button[type=submit]:hover, input[type=submit]:hover, .wpforms-submit:hover {
  background: #2dd4bf !important;
}

/* ============================================================
   13. BREADCRUMBS
   ============================================================ */
.breadcrumbs, .breadcrumb, .oceanwp-breadcrumbs {
  font-size: .85rem;
  color: var(--hi-muted);
}
.breadcrumbs a { color: var(--hi-muted); }
.breadcrumbs a:hover { color: var(--hi-accent-strong); }
.breadcrumbs .breadcrumb-last { color: var(--hi-text); font-weight: 600; }

/* ============================================================
   14. CONSENT BANNER (child functions.php injects)
   ============================================================ */
.hi-consent {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(2, 6, 23, .97);
  color: #cbd5e1;
  padding: 16px 24px;
  display: none;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  border-top: 2px solid var(--hi-accent);
  font-size: .9rem;
  box-shadow: 0 -8px 30px rgba(2, 6, 23, .4);
}
.hi-consent.hi-consent--show { display: flex; }
.hi-consent p { margin: 0; max-width: 720px; }
.hi-consent a { color: #5eead4; text-decoration: underline; }
.hi-consent-buttons { display: flex; gap: 10px; }
.hi-consent-buttons button {
  border: none; border-radius: 9px; padding: 9px 20px;
  font-family: var(--hi-font-head); font-weight: 700; font-size: .875rem; cursor: pointer;
}
.hi-consent-button--accept { background: var(--hi-accent); color: #022c22; }
.hi-consent-button--accept:hover { background: #2dd4bf; }
.hi-consent-button--essential { background: transparent; color: #cbd5e1; border: 1px solid rgba(148,163,184,.4) !important; }

/* ============================================================
   15. MISC / UTILITIES
   ============================================================ */
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important; }

/* back-to-top */
#scroll-top { background: var(--hi-accent); color: #022c22; border-radius: 9px; }

/* print — revision cards + TOC survive printing for exam study */
@media print {
  #site-header, #footer, .hi-consent, #scroll-top, nav.pagination { display: none !important; }
  body { background: #fff; color: #000; }
  .hi-revision { border: 1px solid #000; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   16. BLOG ISLAND — toolbar (search / category pills / sub-chips /
   sort dropdown / counter) mirroring hmmnm.com v317, teal re-skin.
   Pure DOM filtering over server-rendered cards (REST is blocked .in-side).
   ============================================================ */
#blog-entries.hmmnm-island {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px !important;
  padding: 8px 0 32px !important;
  align-items: stretch !important;
}
#blog-entries.hmmnm-island .blog-entry.hmmnm-hidden { display: none !important; }

/* island card internals */
#blog-entries.hmmnm-island .blog-entry {
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  width: 100% !important;
}
#blog-entries.hmmnm-island .blog-entry-inner {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 20px !important;
}
/* card featured image (16:9, flush to card top edges) */
#blog-entries.hmmnm-island .blog-entry-thumbnail {
  margin: -20px -20px 16px !important;   /* bleed to card edges */
  border-radius: 14px 14px 0 0 !important;
  overflow: hidden !important;
  background: var(--hi-surface) !important;
}
#blog-entries.hmmnm-island .blog-entry-thumbnail a {
  display: block !important;
  line-height: 0 !important;
}
#blog-entries.hmmnm-island .blog-entry-thumbnail img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .35s ease !important;
}
#blog-entries.hmmnm-island .blog-entry:hover .blog-entry-thumbnail img {
  transform: scale(1.04) !important;
}
#blog-entries.hmmnm-island .blog-entry.no-featured-image .blog-entry-thumbnail {
  display: none !important;
}
#blog-entries.hmmnm-island .blog-entry-header { margin-bottom: 8px !important; }
#blog-entries.hmmnm-island .blog-entry-title,
#blog-entries.hmmnm-island .blog-entry-title a {
  font-size: 1.05rem !important;
  line-height: 1.45 !important;
}
#blog-entries.hmmnm-island .blog-entry-summary { flex: 1 !important; }
#blog-entries.hmmnm-island .blog-entry-summary p { margin: 0 !important; }
#blog-entries.hmmnm-island .hmmnm-post-meta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 12px !important;
  color: var(--hi-muted) !important;
  margin-bottom: 12px !important;
}
#blog-entries.hmmnm-island .hmmnm-post-meta .meta-divider {
  width: 3px !important; height: 3px !important; border-radius: 50% !important;
  background: #cbd5e1 !important; display: inline-block !important;
}
#blog-entries.hmmnm-island .blog-entry-bottom {
  display: flex !important;
  align-items: center !important;
  padding-top: 14px !important;
  border-top: 1px solid #f1f5f9 !important;
  margin-top: auto !important;
}
#blog-entries.hmmnm-island .read-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 9px 20px !important;
  background: var(--hi-bg-deep) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font: 600 13px/1 var(--hi-font-body) !important;
  text-decoration: none !important;
  transition: background .2s ease !important;
}
#blog-entries.hmmnm-island .read-more:hover {
  background: var(--hi-accent-strong) !important;
  color: #fff !important;
}

/* --- toolbar strip --- */
.hmmnm-blog-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 14px 16px !important;
  padding: 14px 0 !important;
  margin-bottom: 10px !important;
  position: relative !important;
  z-index: 10 !important;
}

/* search */
.hmmnm-search-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--hi-surface) !important;
  border: 1px solid var(--hi-hairline) !important;
  border-radius: 10px !important;
  padding: 9px 14px !important;
  min-width: 250px !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}
.hmmnm-search-box:focus-within {
  border-color: var(--hi-accent) !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .12) !important;
}
.hmmnm-search-box svg { width: 18px !important; height: 18px !important; flex-shrink: 0 !important; color: var(--hi-muted) !important; }
.hmmnm-search-box:focus-within svg { color: var(--hi-accent-strong) !important; }
.hmmnm-search-box input {
  border: none !important; outline: none !important; background: none !important;
  font: 500 14px/1.4 var(--hi-font-body) !important;
  color: #1e293b !important; width: 100% !important; padding: 0 !important;
}
.hmmnm-search-box input::placeholder { color: var(--hi-muted) !important; }

/* sort dropdown */
.hmmnm-sort-wrap { position: relative !important; flex-shrink: 0 !important; }
.hmmnm-sort-btn {
  display: flex !important; align-items: center !important; gap: 6px !important;
  background: var(--hi-page) !important;
  border: 1.5px solid var(--hi-hairline) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font: 600 13px/1 var(--hi-font-body) !important;
  color: #475569 !important; cursor: pointer !important;
  transition: border-color .2s ease, color .2s ease !important;
  white-space: nowrap !important;
}
.hmmnm-sort-btn:hover, .hmmnm-sort-btn.open { border-color: var(--hi-accent) !important; color: var(--hi-accent-strong) !important; }
.hmmnm-sort-btn svg { width: 14px !important; height: 14px !important; transition: transform .2s ease !important; }
.hmmnm-sort-btn.open svg { transform: rotate(180deg) !important; }
.hmmnm-sort-dropdown {
  display: none !important;
  position: absolute !important;
  top: calc(100% + 6px) !important; right: 0 !important;
  background: var(--hi-surface) !important;
  border: 1px solid var(--hi-hairline) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .1) !important;
  z-index: 100 !important; min-width: 180px !important; overflow: hidden !important;
  padding: 4px !important;
}
.hmmnm-sort-dropdown.open { display: block !important; }
.hmmnm-sort-option {
  display: block !important; width: 100% !important;
  padding: 10px 12px !important; border: none !important; background: none !important;
  text-align: left !important; border-radius: 8px !important;
  font: 500 13px/1.4 var(--hi-font-body) !important;
  color: #475569 !important; cursor: pointer !important;
}
.hmmnm-sort-option:hover { background: var(--hi-accent-soft) !important; color: var(--hi-accent-strong) !important; }
.hmmnm-sort-option.active { color: var(--hi-accent-ink) !important; font-weight: 700 !important; background: var(--hi-accent-soft) !important; }

/* category pills */
.hmmnm-cat-filters { display: flex !important; align-items: center !important; gap: 6px !important; flex-wrap: wrap !important; }
.hmmnm-cat-filter-btn {
  padding: 7px 16px !important;
  border: 1px solid var(--hi-hairline) !important;
  border-radius: 20px !important;
  background: var(--hi-surface) !important;
  color: var(--hi-muted) !important;
  font: 500 13px/1.6 var(--hi-font-body) !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
}
.hmmnm-cat-filter-btn:hover { border-color: var(--hi-accent) !important; color: var(--hi-accent-strong) !important; }
.hmmnm-cat-filter-btn.active {
  background: var(--hi-bg-deep) !important;
  color: var(--hi-text-strong) !important;
  border-color: var(--hi-bg-deep) !important;
}

/* sub-category chips (children of civil-service-exams) */
.hmmnm-subcat-filters {
  display: none !important;
  align-items: center !important; gap: 8px !important;
  flex-wrap: wrap !important;
  padding-top: 4px !important;
  flex-basis: 100% !important;
}
.hmmnm-subcat-filters:not([hidden]) { display: flex !important; }
.hmmnm-subcat-label {
  font: 600 12px/1.6 var(--hi-font-body) !important;
  color: var(--hi-muted) !important;
}
.hmmnm-subcat-btn {
  padding: 5px 12px !important;
  border: 1px dashed var(--hi-hairline) !important;
  border-radius: 16px !important;
  background: transparent !important;
  color: var(--hi-muted) !important;
  font: 500 12px/1.6 var(--hi-font-body) !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
}
.hmmnm-subcat-btn:hover { border-color: var(--hi-accent) !important; color: var(--hi-accent-strong) !important; border-style: solid !important; }
.hmmnm-subcat-btn.active {
  border: 1px solid var(--hi-accent) !important;
  background: var(--hi-accent-soft) !important;
  color: var(--hi-accent-ink) !important;
}

/* counter + empty state */
.hmmnm-post-count {
  font-size: 13px !important;
  color: var(--hi-muted) !important;
  display: block !important;
  padding: 0 0 14px !important;
}
.hmmnm-post-count strong { color: var(--hi-accent-strong) !important; font-weight: 700 !important; }
.hmmnm-blog-empty {
  grid-column: 1 / -1 !important;
  text-align: center !important;
  padding: 48px 20px !important;
  color: var(--hi-muted) !important;
  font-size: 15px !important;
}

/* toolbar responsive */
@media (max-width: 1024px) {
  #blog-entries.hmmnm-island { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
  .hmmnm-blog-toolbar { padding: 12px 0 !important; }
}
@media (max-width: 640px) {
  #blog-entries.hmmnm-island { grid-template-columns: 1fr !important; gap: 16px !important; }
  .hmmnm-blog-toolbar { flex-direction: column !important; align-items: stretch !important; }
  .hmmnm-search-box { min-width: 100% !important; }
  .hmmnm-sort-wrap, .hmmnm-sort-btn { width: 100% !important; justify-content: center !important; }
  .hmmnm-sort-dropdown { left: 0 !important; right: 0 !important; }
  .hmmnm-blog-toolbar, .hmmnm-cat-filters { min-width: 0 !important; max-width: 100% !important; }
  .hmmnm-cat-filters { overflow-x: auto !important; flex-wrap: nowrap !important; padding-bottom: 4px !important; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .hmmnm-cat-filters .hmmnm-cat-filter-btn { flex-shrink: 0 !important; }
}

/* ============================================================
   17. CONTACT FORM (shared hmmnm-contact-form.php)
   ============================================================ */
.hmmnm-cf { max-width: 640px; margin: 0 auto; }
.hmmnm-cf-row { display: flex; gap: 16px; flex-wrap: wrap; }
.hmmnm-cf-row .hmmnm-cf-field { flex: 1 1 220px; }
.hmmnm-cf-field { margin-bottom: 18px; }
.hmmnm-cf-field label { display: block; font-weight: 600; font-size: 14px; color: #0f172a; margin-bottom: 6px; }
.hmmnm-cf-field label .req { color: #dc2626; }
.hmmnm-cf-field input[type="text"],
.hmmnm-cf-field input[type="email"],
.hmmnm-cf-field select,
.hmmnm-cf-field textarea {
  width: 100%; max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--hi-hairline);
  border-radius: 10px;
  background: var(--hi-surface);
  color: #1e293b;
  font: 500 15px/1.5 var(--hi-font-body);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hmmnm-cf-field input:focus,
.hmmnm-cf-field select:focus,
.hmmnm-cf-field textarea:focus {
  outline: none;
  border-color: var(--hi-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
}
.hmmnm-cf-field textarea { min-height: 130px; resize: vertical; }
.hmmnm-cf-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; }
.hmmnm-cf-button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px;
  background: var(--hi-accent-strong);
  color: #fff; border: none; border-radius: 10px;
  font: 700 14px/1 var(--hi-font-body); letter-spacing: .2px;
  cursor: pointer; transition: background .2s ease, transform .15s ease;
}
.hmmnm-cf-button:hover { background: var(--hi-accent); transform: translateY(-1px); }
.hmmnm-cf-success, .hmmnm-cf-error { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }
.hmmnm-cf-success { background: var(--hi-chip-green-soft); color: var(--hi-chip-green); }
.hmmnm-cf-error { background: #fef2f2; color: #dc2626; }

/* contact form responsive */
@media (max-width: 640px) {
  .hmmnm-cf { max-width: 100%; }
}


/* ============================================================
   18. BLOG FILTER BAR (v1.3.0 - server-side chips + sort for category
   archives; /blog/ itself uses the island above - .com/blog parity)
   ============================================================ */
.hi-fbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 28px; padding: 12px 16px;
  background: var(--hi-surface);
  border: 1px solid var(--hi-hairline);
  border-radius: var(--hi-radius);
  box-shadow: var(--hi-shadow-card);
}
.hi-fbar-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.hi-fchip {
  font-family: var(--hi-font-head); font-weight: 600; font-size: .82rem;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--hi-hairline);
  background: var(--hi-page); color: var(--hi-text);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.hi-fchip:hover {
  color: var(--hi-accent-strong); border-color: var(--hi-accent);
  background: var(--hi-accent-soft);
}
.hi-fchip--active,
.hi-fchip--active:hover {
  background: var(--hi-accent-strong); border-color: var(--hi-accent-strong);
  color: #ffffff; cursor: default;
}
.hi-fchip-n { opacity: .65; font-weight: 600; }

/* Sort control */
.hi-fbar-sort { display: flex; align-items: center; gap: 7px; margin: 0; }
.hi-fbar-sort label {
  font-family: var(--hi-font-head); font-weight: 700; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--hi-muted);
}
.hi-fbar-sort select {
  font-family: var(--hi-font-head); font-weight: 600; font-size: .82rem;
  color: var(--hi-text); background: var(--hi-surface);
  border: 1px solid var(--hi-hairline); border-radius: 9px;
  padding: 7px 10px; cursor: pointer;
}
.hi-fbar-sort select:focus { outline: 2px solid var(--hi-accent); outline-offset: 1px; }
.hi-fbar-sort-go {
  font-family: var(--hi-font-head); font-weight: 600; font-size: .8rem;
  color: var(--hi-muted); background: #f1f5f9;
  border: 1px solid var(--hi-hairline); border-radius: 9px;
  padding: 7px 12px; cursor: pointer;
}
.hi-fbar-sort-go:hover { color: var(--hi-accent-strong); border-color: var(--hi-accent); }

@media (max-width: 640px) {
  .hi-fbar { flex-direction: column; align-items: flex-start; padding: 12px; }
  .hi-fbar-sort { align-self: stretch; justify-content: space-between; }
}

/* ============================================================
   19. RESPONSIVE OVERFLOW + A11Y FIXES (v1.5.0 — audit 2026-08-24)
   Fixes: site-wide mobile h-scroll from fixed 1200px header container;
   /blog/ toolbar input overflow; article breadcrumb overflow;
   keyboard focus visibility; small tap targets in footer.
   ============================================================ */

/* 19a. Containment safety net — every custom width-bearing wrapper
   gets border-box + max-width:100% so it can never exceed its parent
   (the root cause of the 1200px header at 375vw). */
.hi-container,
.hi-hero-inner,
#site-header-inner,
.hmmnm-blog-toolbar,
.hmmnm-search-box,
#blog-entries.hmmnm-island,
.hi-fbar {
  box-sizing: border-box;
  max-width: 100%;
}

/* 19b. Header: cap the design container at the viewport. Applies at
   ALL widths (desktop unchanged: 1200px < viewport) and kills the
   mobile blowout without a breakpoint jump. */
#site-header-inner {
  max-width: min(var(--hi-container-w), 100%);
}
#site-header .container,
#site-header-inner.container { width: auto; }

@media (max-width: 1024px) {
  #site-header-inner { padding-left: 16px; padding-right: 16px; }
}

/* 19c. Search toolbar: allow the box AND its input to actually shrink.
   The input carried an intrinsic ~350px size (size=20 + min-width) that
   forced a 408px island inside a 338px parent at 390vw. */
.hmmnm-search-box {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 220px;
  min-height: 44px;          /* tap target */
}
.hmmnm-search-box input {
  width: 100%;
  min-width: 0;
}
@media (max-width: 640px) {
  .hmmnm-search-box { min-width: 0; width: 100%; flex-basis: 100%; }
  .hmmnm-search-box input { width: 100% !important; min-width: 0 !important; }
}

/* 19d. OceanWP page-header + breadcrumbs (single posts, centered-minimal
   style): let long titles/trail items wrap instead of pushing wide. */
.page-header,
.page-header-inner,
.page-header .container {
  box-sizing: border-box;
  max-width: 100%;
}
.page-header-title {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.page-header .breadcrumbs,
.page-header .site-breadcrumbs,
nav[aria-label="Breadcrumbs"] {
  max-width: 100%;
}
.page-header .breadcrumbs ul,
.page-header .site-breadcrumbs ul,
nav[aria-label="Breadcrumbs"] ol,
nav[aria-label="Breadcrumbs"] ul {
  max-width: 100%;
  flex-wrap: wrap;
}
.page-header .breadcrumbs li,
.page-header .breadcrumbs span,
.page-header .site-breadcrumbs li,
.page-header .site-breadcrumbs span,
.page-header .breadcrumbs .trail-item,
nav[aria-label="Breadcrumbs"] li,
nav[aria-label="Breadcrumbs"] li span {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.page-header .breadcrumbs a,
.page-header .site-breadcrumbs a,
nav[aria-label="Breadcrumbs"] a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* 19e. Focus visibility — restore a visible ring on inputs/selects that
   reset outline:none, keep buttons consistent (WCAG 2.4.7). */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.hmmnm-cf-field input:focus-visible,
.hmmnm-cf-field select:focus-visible,
.hmmnm-cf-field textarea:focus-visible,
.hi-hero-search input:focus-visible {
  outline: 2px solid var(--hi-accent);
  outline-offset: 2px;
}

/* 19f. Footer tap targets: footer+bottom-bar links get comfortable
   hit area on touch (min 40px row on small screens). */
#footer-bar a,
#footer-bottom a,
#scroll-top a,
.oceanwp-mobile-menu-icon a {
  display: inline-block;
  min-height: 24px;
}
@media (max-width: 640px) {
  #footer-bar a,
  #footer-bottom a { padding: 6px 0; min-height: 36px; }
}

/* 19g. Content images can never force layout wide (long-table/narrow-img
   post guard — mirrors article body behavior). */
.entry-content img,
.wp-block-image img {
  max-width: 100%;
  height: auto;
}
.entry-content table { max-width: 100%; }

/* ============================================================
   20. RELAXED UI PASS (v1.6.0 — 2026-08-25)
   Goal: a calmer, more breathable feel across the site.
   Softer page tint, gentler shadows, warmer neutrals, rounder
   corners, slower fades, quieter hovers. Nothing removed —
   everything eased.
   ============================================================ */

/* 20a. Calmer token overrides (keep names, soften values) */
:root {
  --hi-page: #fafaf9;                 /* warm stone-50 — softer than slate-50 */
  --hi-radius: 14px;                  /* rounder = friendlier */
  --hi-shadow-card: 0 1px 2px rgba(2, 6, 23, .04), 0 4px 12px -4px rgba(2, 6, 23, .05);
  --hi-shadow-lift: 0 12px 32px -12px rgba(2, 6, 23, .16);
  --hi-ease: cubic-bezier(.25, .5, .3, 1);
  --hi-t: .28s;
}

/* 20b. Gentler global motion — slower, softer, never jumpy */
a { transition: color var(--hi-t) var(--hi-ease); }
.hi-card,
.blog-entry.hi-card,
.hi-featured,
.hi-series-card,
.hi-pill,
.hi-chip {
  transition:
    transform var(--hi-t) var(--hi-ease),
    box-shadow var(--hi-t) var(--hi-ease),
    border-color var(--hi-t) var(--hi-ease),
    background-color var(--hi-t) var(--hi-ease),
    color var(--hi-t) var(--hi-ease);
}
.hi-card:hover,
.blog-entry.hi-card:hover {
  transform: translateY(-3px);        /* was -6px — subtler lift */
  box-shadow: var(--hi-shadow-lift);
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hi-card:hover, .blog-entry.hi-card:hover { transform: none; }
}

/* 20c. Section rhythm — more air between homepage blocks */
.hi-section { padding: 72px 0; }      /* was ~56-60px */
@media (max-width: 768px) { .hi-section { padding: 52px 0; } }
.hi-section-head { margin-bottom: 34px; }
.hi-section-head h2 { letter-spacing: -0.015em; }

/* 20d. Cards — lighter borders, more padding, calmer radius */
.hi-card,
.blog-entry.hi-card {
  border-radius: var(--hi-radius);
  border: 1px solid #eef0f3;          /* fainter hairline */
}
.hi-card-eyebrow {
  letter-spacing: .02em;              /* softer tracking shout */
}

/* 20e. Hero — calmer gradient, softer sub copy */
.hi-hero {
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(20, 184, 166, .12), transparent 60%),
    var(--hi-bg-deep);
}
.hi-hero h1 { line-height: 1.14; letter-spacing: -0.025em; }
.hi-hero-sub { color: #a8b3c4; font-weight: 400; }
.hi-chip {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
}
.hi-chip:hover { background: rgba(20, 184, 166, .18); border-color: rgba(20, 184, 166, .4); }

/* 20f. Pills + chips — pill-ier, quieter */
.hi-pill,
.hi-chip { border-radius: 999px; }
.hi-fchip {
  border-radius: 999px;
  padding: 8px 16px;
  line-height: 1.25;
}
.hi-fchip--active,
.hi-fchip--active:hover {
  background: var(--hi-accent-soft);
  color: var(--hi-accent-ink);
  border-color: transparent;
}

/* 20g. Typography ease — slightly softer heading weight + looser body */
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.015em; }
.entry-content p { line-height: 1.85; }   /* airier reading */

/* 20h. Series cards — float rest */
.hi-series-card {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
}
.hi-series-card:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(20, 184, 166, .35);
  transform: translateY(-3px);
}

/* ============================================================
   21. MEGA MENU — "Exam Streams" taxonomy panel (v1.7.0 redesign)
   Glass surface, per-stream accent colors, staggered reveal,
   live "Next up" dates rail. Hover/focus open on desktop with an
   intent bridge so the panel doesn't vanish mid-travel.
   ============================================================ */
/* v1.7.4 ALIGNMENT FIX — panels used to anchor to their own <li>
   (left:50% of the trigger), so each dropdown opened at a different
   x-offset and hung left of the 1200px page container. Now: trigger
   stays static and the nearest positioned ancestor becomes
   #site-header-inner (the .container, position:relative) — the panel's
   left:50% / translateX(-50%) then centers BOTH dropdowns on the same
   page grid (verified centerDelta 0 at 1440/1280/1080). */
#site-navigation li.hi-mega-trigger,
#site-navigation li.menu-item-hi-mega-trigger { position: static !important; }
#site-header #site-navigation-wrap { position: static !important; }
#site-navigation li.hi-mega-trigger > a::after,
#site-navigation li.menu-item-hi-mega-trigger > a::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .65;
  transition: transform .28s var(--hi-ease);
}
li.hi-mega-trigger:hover > a::after,
li.hi-mega-trigger:focus-within > a::after {
  transform: translateY(1px) rotate(225deg);
  opacity: 1;
}

/* invisible hover bridge: kills the diagonal-mouse-death problem.
   v1.7.4: the <li> is static now (see alignment fix above), so the
   bridge rides on the link itself — a ::before strip spanning the
   14px panel gap, keeping :hover on the <li> alive while the cursor
   travels from link to panel. */
#site-navigation li.hi-mega-trigger > a.menu-link { position: relative; }
#site-navigation li.hi-mega-trigger > a.menu-link::before {
  content: "";
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 14px;
}

.hi-mega-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(14px) scale(.97);
  width: min(980px, calc(100vw - 32px));
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%2314b8a6' fill-opacity='0.025'%3E%3Ccircle cx='20' cy='20' r='1.5'/%3E%3Ccircle cx='70' cy='60' r='1.5'/%3E%3Ccircle cx='50' cy='100' r='1.5'/%3E%3Ccircle cx='100' cy='30' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 20px;
  box-shadow:
    0 32px 80px -20px rgba(2, 6, 23, .28),
    0 8px 24px -8px rgba(2, 6, 23, .10),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  padding: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .3s var(--hi-ease),
    transform .3s var(--hi-ease),
    visibility .3s;
  z-index: 9999;
}
li.hi-mega-trigger:hover > .hi-mega-panel,
li.hi-mega-trigger:focus-within > .hi-mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(4px) scale(1);
}

/* READABILITY GUARD (v1.7.1) — the global header rule
   `#site-navigation a { color:#e2e8f0 !important }` (light text for the
   dark nav bar) also hits every anchor nested inside this LIGHT panel.
   Re-assert dark-on-light panel typography; ID specificity wins even
   over !important via the !important re-assert below. */
#site-navigation .hi-mega-panel a {
  color: var(--hi-text) !important;           /* slate-700 on glass */
  font-family: inherit !important;
  font-weight: 600;
  font-size: .84rem;
  letter-spacing: normal;
  text-transform: none;
}
#site-navigation .hi-mega-panel .hi-mega-head a {
  font-size: .93rem;
  font-weight: 750;
  color: #0f172a !important;
}
#site-navigation .hi-mega-panel a.hi-mega-toplink,
#site-navigation .hi-mega-panel a.hi-mega-rail-cta { font-weight: 700; }
#site-navigation .hi-mega-panel a.hi-mega-toplink { font-size: .84rem; }
#site-navigation .hi-mega-panel a.hi-mega-rail-cta {
  font-size: .82rem;
  color: var(--hi-accent-strong) !important;
}
#site-navigation .hi-mega-panel a.hi-mega-toplink:hover { color: var(--hi-accent-strong) !important; }
#site-navigation .hi-mega-panel .hi-mega-subs li a:hover { color: #0f172a !important; }
#site-navigation .hi-mega-panel a.hi-mega-date { color: #1e293b !important; }

/* header row */
.hi-mega-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px 14px;
  background: linear-gradient(90deg, rgba(20, 184, 166, .07), transparent 65%);
  border-bottom: 1px solid rgba(233, 236, 241, .8);
}
.hi-mega-kicker {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hi-accent-strong);
}
.hi-mega-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.hi-mega-toplink { margin-left: auto; font-size: .84rem; font-weight: 700; color: var(--hi-muted); }
.hi-mega-toplink:hover { color: var(--hi-accent-strong); }

.hi-mega-body {
  display: grid;
  grid-template-columns: 1fr 218px;
  gap: 0;
}

/* streams grid — columns animate in staggered */
.hi-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 10px;
  padding: 16px 18px 18px 24px;
}
.hi-mega-col {
  min-width: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .34s var(--hi-ease), transform .34s var(--hi-ease);
}
li.hi-mega-trigger:hover .hi-mega-col,
li.hi-mega-trigger:focus-within .hi-mega-col {
  opacity: 1;
  transform: translateY(0);
}
li.hi-mega-trigger:hover .hi-mega-col:nth-child(1), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(1),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(2), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(2),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(3), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(3) { transition-delay: 0ms; }
li.hi-mega-trigger:hover .hi-mega-col:nth-child(4), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(4),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(5), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(5),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(6), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(6) { transition-delay: 45ms; }
li.hi-mega-trigger:hover .hi-mega-col:nth-child(7), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(7),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(8), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(8),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(9), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(9) { transition-delay: 90ms; }

/* stream head — icon chip tinted with the stream's own accent */
.hi-mega-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 12px;
  font-weight: 750;
  color: #0f172a;
  font-size: .93rem;
  position: relative;
}
.hi-mega-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  font-size: .95rem;
  border-radius: 9px;
  background: color-mix(in srgb, var(--hc) 10%, transparent);
  transition: transform .28s var(--hi-ease), background-color .28s var(--hi-ease);
}
.hi-mega-head:hover { background: color-mix(in srgb, var(--hc) 7%, transparent); }
.hi-mega-head:hover .hi-mega-ico {
  transform: scale(1.12) rotate(-6deg);
  background: color-mix(in srgb, var(--hc) 18%, transparent);
}
.hi-mega-name { flex: 1 1 auto; min-width: 0; }
.hi-mega-head:hover .hi-mega-name { color: var(--hc); }
.hi-mega-n {
  font-size: .7rem;
  font-weight: 700;
  color: var(--hi-muted);
  background: rgba(241, 245, 249, .8);
  border-radius: 999px;
  padding: 2px 8px;
  transition: background-color .28s var(--hi-ease), color .28s var(--hi-ease);
}
.hi-mega-head:hover .hi-mega-n {
  background: color-mix(in srgb, var(--hc) 16%, transparent);
  color: var(--hc);
}

/* sub links — arrow slides in on hover */
.hi-mega-subs { list-style: none; margin: 2px 0 8px; padding: 0 0 0 39px; }
.hi-mega-subs li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4.5px 10px;
  border-radius: 8px;
  font-size: .84rem;
  color: var(--hi-text);
  position: relative;
}
.hi-mega-subs li a > span:first-child { min-width: 0; }
.hi-mega-arrow {
  font-size: .78rem;
  color: var(--hc);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .24s var(--hi-ease), transform .24s var(--hi-ease);
}
.hi-mega-subs li a:hover { background: color-mix(in srgb, var(--hc) 8%, transparent); color: #0f172a; }
.hi-mega-subs li a:hover .hi-mega-arrow { opacity: 1; transform: translateX(0); }
.hi-mega-subs li a::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 3px; height: 0;
  border-radius: 2px;
  background: var(--hc);
  transition: height .24s var(--hi-ease);
}
.hi-mega-subs li a:hover::before { height: 60%; }

/* "Next up" rail */
.hi-mega-rail {
  border-left: 1px solid rgba(233, 236, 241, .8);
  background: linear-gradient(180deg, rgba(248, 250, 252, .6), rgba(241, 245, 249, .5));
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hi-mega-rail-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hi-muted);
}
.hi-mega-date {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, .7);
  transition: transform .28s var(--hi-ease), box-shadow .28s var(--hi-ease), border-color .28s var(--hi-ease);
}
.hi-mega-date:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, .4);
  box-shadow: 0 8px 20px -8px rgba(2, 6, 23, .16);
}
.hi-mega-date-box {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  background: var(--hi-accent-soft);
  color: var(--hi-accent-ink);
  border-radius: 9px;
  width: 38px;
  padding: 5px 0 4px;
}
.hi-mega-date-box b { font-size: .98rem; font-weight: 800; }
.hi-mega-date-box i { font-size: .56rem; font-style: normal; font-weight: 800; letter-spacing: .08em; }
.hi-mega-date-txt {
  font-size: .8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hi-mega-rail-cta {
  margin-top: auto;
  font-size: .82rem;
  font-weight: 700;
  color: var(--hi-accent-strong);
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(20, 184, 166, .08);
  transition: background-color .28s var(--hi-ease);
}
.hi-mega-rail-cta:hover { background: rgba(20, 184, 166, .16); }

.hi-mega-foot {
  border-top: 1px solid #eef1f5;
  margin-top: 8px;
  padding: 10px 10px 2px;
  font-size: .85rem;
}
.hi-mega-foot a { color: var(--hi-accent-strong); font-weight: 600; }

@media (max-width: 1100px) {
  .hi-mega-panel { width: min(860px, calc(100vw - 24px)); }
  .hi-mega-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hi-mega-panel { display: none; }   /* mobile: plain link, no hover model */
}

/* ============================================================
   21c. CIVIL EXAMS PANEL (v1.7.3) — UPSC subject lanes, denser
        4-col grid (no per-lane subs → heads pack tighter).
   ============================================================ */
.hi-mega-grid--civil {
  grid-template-columns: repeat(4, 1fr);
  gap: 2px 8px;
  padding: 14px 16px 16px 20px;
}
.hi-mega-panel--civil .hi-mega-head { padding: 6px 8px; font-size: .88rem; }
.hi-mega-panel--civil .hi-mega-ico {
  width: 26px; height: 26px;
  font-size: .85rem;
  border-radius: 8px;
}
li.hi-mega-trigger:hover .hi-mega-col:nth-child(10), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(10),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(11), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(11),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(12), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(12) { transition-delay: 120ms; }
li.hi-mega-trigger:hover .hi-mega-col:nth-child(13), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(13),
li.hi-mega-trigger:hover .hi-mega-col:nth-child(14), li.hi-mega-trigger:focus-within .hi-mega-col:nth-child(14) { transition-delay: 150ms; }
@media (max-width: 1100px) {
  .hi-mega-grid--civil { grid-template-columns: repeat(3, 1fr); }
}

/* color-mix fallback: browsers without it keep flat tints */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .hi-mega-ico { background: rgba(226, 232, 240, .55); }
  .hi-mega-head:hover, .hi-mega-subs li a:hover { background: rgba(241, 245, 249, .9); }
}

/* ============================================================
   22. NOTIFICATION TICKER (v1.6.0) — homepage + blog under header
   ============================================================ */
.hi-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--hi-container-w);
  margin: 18px auto 0;
  padding: 0 20px;
}
.hi-ticker-lead {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hi-accent-strong);
}
.hi-ticker-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hi-accent);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, .5);
  animation: hi-ticker-pulse 2.2s ease-out infinite;
}
@keyframes hi-ticker-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(20, 184, 166, .45); }
  70%  { box-shadow: 0 0 0 9px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}
.hi-ticker-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.hi-ticker-track {
  display: inline-flex;
  gap: 34px;
  white-space: nowrap;
  padding: 6px 0;
  animation: hi-ticker-scroll 46s linear infinite;
  will-change: transform;
}
.hi-ticker:hover .hi-ticker-track,
.hi-ticker:focus-within .hi-ticker-track { animation-play-state: paused; }
@keyframes hi-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* duplicate-free marquee: JS-free approach uses enough items; when few
   items exist the track simply loops with a seam — acceptable + calm. */
.hi-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .88rem;
  color: var(--hi-text);
}
.hi-ticker-item a { color: var(--hi-text); font-weight: 600; }
.hi-ticker-item a:hover { color: var(--hi-accent-strong); }
.hi-ticker-type {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 9px;
}
.hi-ticker-type--exam         { background: #fee2e2; color: #991b1b; }
.hi-ticker-type--notification { background: var(--hi-accent-soft); color: var(--hi-accent-ink); }
.hi-ticker-type--result       { background: #e0e7ff; color: #3730a3; }
.hi-ticker-type--news         { background: #fef3c7; color: #92400e; }
.hi-ticker-type--info         { background: #e2e8f0; color: #334155; }
.hi-ticker-date { color: var(--hi-muted); font-size: .8rem; }
.hi-ticker-more {
  flex: 0 0 auto;
  font-size: .84rem;
  font-weight: 700;
  color: var(--hi-accent-strong);
}
@media (max-width: 720px) {
  .hi-ticker { margin-top: 12px; padding: 0 14px; }
  .hi-ticker-more { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hi-ticker-track { animation: none; }
  .hi-ticker-dot { animation: none; }
}

/* ============================================================
   23. NOTIFICATIONS PAGE — calendar + feed (v1.6.0)
   ============================================================ */
.hi-notif-hero {
  background:
    radial-gradient(900px 380px at 25% -20%, rgba(20, 184, 166, .14), transparent 60%),
    var(--hi-bg-deep);
  padding: 74px 0 58px;
}
.hi-notif-hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 12px; }
.hi-notif-hero p { color: #a8b3c4; max-width: 700px; margin: 0; line-height: 1.75; }
.hi-notif-hero em { color: #5eead4; font-style: normal; font-weight: 600; }

.hi-notif-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

/* calendar */
.hi-cal-wrap {
  background: var(--hi-surface);
  border: 1px solid #eef0f3;
  border-radius: 18px;
  box-shadow: var(--hi-shadow-card);
  padding: 26px;
}
.hi-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.hi-cal-month { margin: 0; font-size: 1.35rem; }
.hi-cal-nav {
  font-weight: 600;
  font-size: .9rem;
  color: var(--hi-text);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hi-hairline);
}
.hi-cal-nav:hover { border-color: var(--hi-accent); color: var(--hi-accent-strong); }

.hi-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.hi-cal-dow {
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hi-muted);
  padding: 8px 0;
}
.hi-cal-day {
  min-height: 96px;
  border-radius: 12px;
  background: #fcfcfd;
  border: 1px solid transparent;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  transition: background var(--hi-t) var(--hi-ease), border-color var(--hi-t) var(--hi-ease);
}
.hi-cal-day--pad { visibility: hidden; }
.hi-cal-day--today {
  border-color: var(--hi-accent);
  background: #f0fdfa;
}
.hi-cal-day--has {
  background: #fff;
  border-color: #e8ebf0;
  box-shadow: 0 1px 2px rgba(2, 6, 23, .03);
}
.hi-cal-num { font-size: .8rem; font-weight: 700; color: var(--hi-muted); }
.hi-cal-day--today .hi-cal-num { color: var(--hi-accent-strong); }
.hi-cal-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .76rem;
  line-height: 1.35;
  color: var(--hi-text);
  border-radius: 8px;
  padding: 4px 6px;
  background: #f8fafc;
}
a.hi-cal-item:hover { background: var(--hi-accent-soft); color: var(--hi-accent-ink); }
.hi-cal-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: 4px;
}
.hi-cal-dot--exam         { background: #ef4444; }
.hi-cal-dot--notification { background: #14b8a6; }
.hi-cal-dot--result       { background: #6366f1; }
.hi-cal-dot--news         { background: #f59e0b; }
.hi-cal-dot--info         { background: #94a3b8; }
.hi-cal-txt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hi-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  font-size: .8rem;
  color: var(--hi-muted);
}
.hi-cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* feed */
.hi-notif-count {
  color: var(--hi-muted);
  font-weight: 600;
  font-size: .9rem;
}
.hi-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hi-feed-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--hi-surface);
  border: 1px solid #eef0f3;
  border-radius: var(--hi-radius);
  padding: 16px 20px;
  transition: box-shadow var(--hi-t) var(--hi-ease), border-color var(--hi-t) var(--hi-ease);
}
.hi-feed-item:hover { box-shadow: var(--hi-shadow-card); border-color: #e2e8f0; }
.hi-feed-item--past { opacity: .62; }
.hi-feed-date {
  flex: 0 0 auto;
  width: 58px;
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.hi-feed-day { font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.hi-feed-mon { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--hi-muted); }
.hi-feed-body { min-width: 0; }
.hi-feed-title { margin: 4px 0 6px; font-size: 1.02rem; }
.hi-feed-title a { color: #0f172a; }
.hi-feed-title a:hover { color: var(--hi-accent-strong); }
.hi-feed-ext { color: var(--hi-muted); font-size: .85em; }
.hi-feed-meta { margin: 0; font-size: .84rem; color: var(--hi-muted); }
.hi-feed-when { color: var(--hi-accent-strong); font-weight: 600; }
.hi-feed-empty { color: var(--hi-muted); text-align: center; padding: 40px 0; }

/* front-page notification teaser cards */
.hi-notif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hi-notif-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--hi-surface);
  border: 1px solid #eef0f3;
  border-left: 3px solid var(--hi-accent);
  border-radius: var(--hi-radius);
  padding: 16px 18px;
  transition: transform var(--hi-t) var(--hi-ease), box-shadow var(--hi-t) var(--hi-ease);
}
.hi-notif-card:hover { transform: translateY(-3px); box-shadow: var(--hi-shadow-lift); }
.hi-notif-card--exam         { border-left-color: #ef4444; }
.hi-notif-card--notification { border-left-color: #14b8a6; }
.hi-notif-card--result       { border-left-color: #6366f1; }
.hi-notif-card--news         { border-left-color: #f59e0b; }
.hi-notif-card--info         { border-left-color: #94a3b8; }
.hi-notif-card-title { font-weight: 700; color: #0f172a; font-size: .95rem; line-height: 1.4; }
.hi-notif-card-meta { font-size: .8rem; color: var(--hi-muted); }
@media (max-width: 1024px) { .hi-notif-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .hi-notif-grid { grid-template-columns: 1fr; } }

/* calendar responsive */
@media (max-width: 860px) {
  .hi-cal-day { min-height: 64px; padding: 5px; }
  .hi-cal-txt { -webkit-line-clamp: 1; font-size: .68rem; }
  .hi-cal-wrap { padding: 16px; }
  .hi-cal-month { font-size: 1.1rem; }
  .hi-feed-item { flex-direction: row; }
}
@media (max-width: 560px) {
  .hi-cal-day { min-height: 46px; }
  .hi-cal-txt { display: none; }
  .hi-cal-item { padding: 2px; justify-content: center; }
  .hi-feed-date { width: 48px; }
}

/* ============================================================
   24. ARCHIVE GRID IMAGE ALIGNMENT (v1.7.7 — 2026-08-27)
   Category / tag / search / date archives use the raw OceanWP
   blog-grid whose thumbnails render at native aspect ratios
   (mixed 450x450 squares and 675x450 crops → ragged rows).
   Now every post carries a 1600x840 generated cover, so force
   a uniform 16:9 window on archive thumbs exactly like the
   /blog/ island does, and equalize card geometry.
   ============================================================ */

/* 24a. Uniform 16:9 thumb window on archive/search grids */
body.archive .blog-entry-thumbnail,
body.search .blog-entry-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hi-page);
}
body.archive .blog-entry-thumbnail img,
body.search .blog-entry-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  object-position: center;
  display: block;
}

/* 24b. Equalize card dimensions so rows line up even with
   2-line vs 3-line titles (flex column + clamped excerpt). */
body.archive .blog-entry,
body.search .blog-entry {
  display: flex;
  flex-direction: column;
}
body.archive .blog-entry-thumbnail,
body.search .blog-entry-thumbnail { margin-bottom: 0; }
body.archive .blog-entry-content,
body.search .blog-entry-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 14px;
}
body.archive .blog-entry-summary,
body.search .blog-entry-summary {
  flex: 1;
}
body.archive .blog-entry-summary p,
body.search .blog-entry-summary p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
body.archive .blog-entry-title,
body.search .blog-entry-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* 24c. Legacy square/crop placeholders kept as fallbacks in the
   media library are fully covered by object-fit cropping above;
   no extra handling needed. */

/* ============================================================
   22. RESPONSIVE ALIGNMENT + SIZING PASS (v1.7.5 - 2026-08-27)
   Fixes: hero/section containers lost their 1200px cap (v1.5.0
   safety net max-width:100% overrode it) so bands didn't line up
   with the header on desktop; nav wrapped into a 2-row header at
   961-1200px; edge padding mismatched (header 16 / ticker 20 /
   content 24).
   ============================================================ */

/* 22a. Restore the design container cap on hero + sections without
   re-introducing the mobile blowout (min() keeps it <= parent). */
.hi-hero-inner,
.hi-container {
  max-width: min(var(--hi-container-w), 100%);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* 22b. Standardise horizontal edge padding across all bands:
   24px on desktop, 16px below 1025px (matches existing header). */
@media (min-width: 1025px) {
  .hi-ticker { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 1024px) {
  .hi-ticker,
  .hi-container,
  .hi-hero-inner { padding-left: 16px; padding-right: 16px; }
}

/* 22c. Keep the header on ONE row at 961-1200px: tighten nav link
   metrics instead of letting the menu wrap under the logo. */
@media (min-width: 961px) and (max-width: 1200px) {
  #site-header-inner { flex-wrap: nowrap; align-items: center; }
  #site-logo { flex: 0 0 auto; }
  #site-navigation-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
  }
  #site-navigation .main-menu,
  #site-navigation .dropdown-menu { flex-wrap: nowrap; }
  #site-navigation .main-menu > li > a,
  #site-navigation .menu > li > a {
    font-size: .84rem;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
  }
}

/* 22d. Hero scale-down on small tablets/large phones so the h1,
   sub and search never crowd (481-960px band). */
@media (min-width: 481px) and (max-width: 960px) {
  .hi-hero { padding-top: 48px; padding-bottom: 44px; }
  .hi-hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
  .hi-hero .hi-hero-sub { font-size: clamp(.95rem, 2vw, 1.05rem); }
}

/* 22f. Header logo sizing by band: smaller logo on phones so the
   hamburger + logo never crowd the bar. */
@media (max-width: 480px) {
  #site-logo-inner img.custom-logo { max-width: 150px; height: auto; }
}
@media (min-width: 481px) and (max-width: 1024px) {
  #site-logo-inner img.custom-logo { max-width: 170px; height: auto; }
}

/* ZCODE 20260827: featured card hero on single posts */
img.hmmnm-fi-hero {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 18px 0 26px;
    box-shadow: 0 8px 28px rgba(10, 16, 40, 0.18);
}

/* 22g. v1.7.5 addendum: the main menu is a floated sf-menu; flex-wrap alone cannot stop it wrapping. Make the ul a real flex row on 961-1200px. */
@media (min-width: 961px) and (max-width: 1200px) {
  #site-navigation ul.main-menu {
    display: flex;
    flex-wrap: nowrap;
    float: none;
  }
  #site-navigation ul.main-menu > li { float: none; }
}

/* 22h. v1.7.5: when the 1200px header container fills the viewport (1025-1248px), give it the same 24px side padding as .hi-container so edges line up. */
@media (min-width: 1025px) and (max-width: 1248px) {
  #site-header-inner { padding-left: 24px; padding-right: 24px; }
}

/* zcode-perf-20260827: skip rendering of off-screen blog cards */
#blog-entries .blog-entry {
	content-visibility: auto;
	contain-intrinsic-size: auto 360px;
}
/* zcode-perf-20260827: same for homepage stream sections */
.hmmnm-island article,
.hi-feed-list li {
	content-visibility: auto;
	contain-intrinsic-size: auto 140px;
}
