/* ==========================================================================
   Microsite design system — one stylesheet for every generated institute site.
   Brand: deep walnut + gold, matching the main portal.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  --font-primary: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;

  --brand-dark: #2a1409;
  --brand-primary: #6f3f1b;
  --brand-mid: #8c5226;
  --brand-accent: #d9b45b;
  --brand-light: #faf3ea;

  --color-text: #1f1c17;
  --color-text-muted: #5c5348;
  --color-bg: #ffffff;
  --color-bg-muted: #f8f4ee;
  --color-border: #e7ddd0;

  --structure-primary: var(--brand-primary);
  --structure-secondary: var(--brand-accent);

  --shadow-sm: 0 1px 3px rgba(42, 20, 9, 0.1);
  --shadow-md: 0 8px 22px rgba(42, 20, 9, 0.12);
  --shadow-lg: 0 18px 40px rgba(42, 20, 9, 0.16);
  --radius-md: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg-muted);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  cursor: url("/static/feather.cur"), auto;
}
a, button { cursor: url("/static/feather.cur"), pointer; }
main { flex: 1; }

a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.4; }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 10000;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-primary);
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---- Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 2rem; }
.grid--1-col { grid-template-columns: 1fr; }
.grid--2-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar-right { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1024px) {
  .grid--3-cols, .grid--4-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--sidebar-right { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid--2-cols, .grid--3-cols, .grid--4-cols { grid-template-columns: 1fr; }
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.7rem 0;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 4px solid var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.header-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.brand__link { display: flex; align-items: center; gap: 0.9rem; }
.brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-overline { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; }
.brand-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--brand-primary); }
.menu-toggle { display: none; }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav__list a {
  display: block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  white-space: nowrap;
}
.site-nav__list a:hover,
.site-nav__list a.is-active { background: var(--brand-light); color: var(--brand-primary); }

/* ---- Buttons / badges ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: all 0.2s;
}
.btn--primary { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--outline { border-color: var(--brand-primary); color: var(--brand-primary); background: transparent; }
.btn--outline:hover { background: var(--brand-primary); color: #fff; }
.btn--ghost { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.28); }
.hero .btn--primary { background: #fff; color: var(--brand-dark); border-color: #fff; }
.hero .btn--primary:hover { background: var(--brand-accent); border-color: var(--brand-accent); }
.btn--text { padding: 0; border: 0; border-radius: 0; background: none; color: var(--brand-primary); }
.btn--text:hover { text-decoration: underline; }
.btn--sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn--icon { padding: 0.45rem 0.9rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}
.badge--soft, .badge--filter { background: var(--brand-light); color: var(--brand-primary); }
.badge--outline { border: 1px solid var(--brand-primary); color: var(--brand-primary); }
.badge--filter:hover { background: var(--brand-primary); color: #fff; }

/* ---- Hero (subpages + legacy markup) ------------------------------------- */
.hero {
  position: relative;
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
  color: #fff;
  overflow: hidden;
}
.hero--sm { padding: 3.5rem 0; }
.hero__bg, .hero__overlay { position: absolute; inset: 0; z-index: 0; }
.hero__overlay { background: radial-gradient(60% 90% at 90% 0%, rgba(217, 180, 91, 0.25), transparent 70%); }
.hero__content, .hero__container { position: relative; z-index: 2; }
.hero__content { max-width: 800px; }
.hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  font-weight: 600;
}
.hero__title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; margin-bottom: 1rem; color: #fff; }
.hero__lead { max-width: 650px; font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, 0.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.stat-card {
  display: grid;
  min-width: 9rem;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}
.stat-card__value { font-size: 1.8rem; font-weight: 800; color: var(--brand-accent); }
.stat-card__label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); }

/* ---- Sections ------------------------------------------------------------ */
.section { position: relative; padding: clamp(3rem, 6vw, 5rem) 0; background: var(--color-bg); }
.section--muted { background: var(--color-bg-muted); border-block: 1px solid var(--color-border); }
.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
}
.section__title { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; color: var(--brand-dark); }
.section__subtitle { flex-basis: 100%; color: var(--color-text-muted); }
.section__eyebrow { display: block; margin-bottom: 0.4rem; color: var(--brand-primary); font-weight: 700; font-size: 0.9rem; }
.section__lead { margin-bottom: 1.5rem; color: var(--color-text-muted); font-size: 1.1rem; }

/* ---- Cards --------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-accent); }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 0.5rem; padding: 1.4rem; }
.card__footer { padding: 0 1.4rem 1.2rem; }
.card__title { font-size: 1.3rem; color: var(--brand-primary); }
.card--sm .card__body { padding: 1.1rem; }
.card--row { flex-direction: row; align-items: stretch; }
.card--row .card__body { justify-content: center; }
.card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 1rem;
  background: var(--brand-light);
  color: var(--brand-primary);
  border-inline-end: 1px solid var(--color-border);
}
.card__actions { display: flex; align-items: center; padding: 1rem; }
.card__media { position: relative; overflow: hidden; background: var(--color-bg-muted); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card--media .card__media { aspect-ratio: 16 / 9; }
.card--primary { background: var(--brand-primary); color: #fff; border: 0; }
.card--primary .card__title, .card--primary p { color: #fff; }
.card--secondary { background: var(--brand-dark); color: #fff; border: 0; }
.card--secondary .card__title, .card--secondary p { color: #fff; }
@media (max-width: 680px) {
  .card--row { flex-direction: column; }
  .card__date { flex-direction: row; gap: 0.5rem; justify-content: flex-start; border-inline-end: 0; border-bottom: 1px solid var(--color-border); }
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.news-card__link { display: flex; flex-direction: column; height: 100%; }
.news-card__media { display: block; height: 200px; overflow: hidden; background: var(--color-bg-muted); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-card:hover .news-card__media img { transform: scale(1.05); }
.news-card__body { padding: 1.4rem; }
.news-card__header { margin-bottom: 0.4rem; font-size: 0.8rem; color: var(--color-text-muted); }
.news-card__title { margin-bottom: 0.6rem; font-size: 1.15rem; font-weight: 700; }
.news-card__title a:hover { color: var(--brand-primary); }
.news-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 12px;
  background: var(--brand-light);
  font-size: 1.3rem;
}
.prose p { margin-bottom: 1rem; color: var(--color-text-muted); }
.sidebar { position: sticky; top: 6rem; }

/* ---- Home page (nx-*) ---------------------------------------------------- */
.nx-main { display: block; }
.nx-hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 5% 3rem;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 36px 36px;
}
.nx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 80% at 85% 0%, rgba(217, 180, 91, 0.28), transparent 70%);
  pointer-events: none;
}
.nx-hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; text-align: center; }
.nx-badge {
  display: inline-flex;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  font-weight: 600;
}
.nx-title { margin-bottom: 1.2rem; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.25; color: #fff; }
.nx-subtitle { max-width: 760px; margin: 0 auto; font-size: clamp(1rem, 1.8vw, 1.25rem); color: rgba(255, 255, 255, 0.88); }
.nx-stats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 900px;
  margin: 2.5rem auto 0;
}
.nx-stat-item {
  display: grid;
  flex: 1 1 10rem;
  max-width: 16rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-align: center;
}
.nx-stat-val { font-size: 2.2rem; font-weight: 800; line-height: 1.2; color: var(--brand-accent); }
.nx-stat-label { font-size: 0.92rem; font-weight: 600; color: rgba(255, 255, 255, 0.88); }

.nx-section { padding: clamp(3rem, 6vw, 5rem) 5%; }
.nx-container { max-width: 1200px; margin: 0 auto; }
.nx-sec-title {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 0.9rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  text-align: center;
  color: var(--brand-dark);
}
.nx-sec-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3.5rem;
  height: 4px;
  border-radius: 2px;
  background: var(--brand-accent);
  transform: translateX(-50%);
}
.nx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; align-items: stretch; }
.nx-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; }
@media (max-width: 800px) { .nx-grid-2 { grid-template-columns: 1fr; } }
.nx-card {
  position: relative;
  overflow: hidden;
  padding: 2rem 2.2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.nx-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--brand-primary); }
.nx-card h3 { margin-bottom: 0.8rem; font-size: 1.4rem; color: var(--brand-dark); }
.nx-card h4 { color: var(--brand-dark); }
.nx-card p { color: var(--color-text-muted); line-height: 1.9; }
.nx-card--dark { background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary)); border: 0; }
.nx-card--dark::before { background: var(--brand-accent); }
.nx-card--dark h3 { color: var(--brand-accent); }
.nx-card--dark p { color: rgba(255, 255, 255, 0.92); }
.nx-card--axis { padding: 1.6rem; border-top: 4px solid var(--brand-accent); }
.nx-card--axis::before { display: none; }
.nx-card__loc { margin-top: 1rem; font-weight: 700; color: var(--brand-primary); }
.nx-highlight { padding: 1.6rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--brand-light); }
.nx-highlight h3 { margin-bottom: 0.6rem; font-size: 1.2rem; color: var(--brand-dark); }
.nx-highlight p { color: var(--color-text-muted); }
.nx-section--white { background: #fff; }
.nx-section--dark { background: var(--brand-dark); color: #fff; }
.nx-section--dark .nx-sec-title { color: #fff; }

.nx-news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.nx-news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.nx-news-img { width: 100%; height: 210px; object-fit: cover; }
.nx-news-img--empty { background: linear-gradient(135deg, var(--brand-light), #efe1d0); }
.nx-news-body { display: flex; flex: 1; flex-direction: column; padding: 1.5rem; }
.nx-news-date { margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 700; color: var(--brand-mid); }
.nx-news-title { margin-bottom: 1rem; font-size: 1.15rem; font-weight: 700; line-height: 1.6; color: var(--brand-dark); }
.nx-news-btn { margin-top: auto; font-weight: 700; color: var(--brand-primary); }

.nx-slider { display: flex; gap: 2rem; overflow-x: auto; padding: 1rem 0 2rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.nx-book { min-width: 220px; text-align: center; scroll-snap-align: start; }
.nx-book-img { width: 180px; height: 252px; margin: 0 auto 1.2rem; object-fit: cover; border-radius: 6px; box-shadow: -8px 8px 26px rgba(0, 0, 0, 0.4); }
.nx-book-img--empty {
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-primary));
  color: #fff;
  font-weight: 700;
}
.nx-book-title { color: #fff; font-size: 1rem; font-weight: 700; }
.nx-book-cat { margin-top: 0.4rem; font-size: 0.85rem; color: var(--brand-accent); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { margin-top: auto; padding: 3.5rem 0 1.5rem; background: linear-gradient(180deg, #3a1c0c, var(--brand-dark)); color: #eadfd6; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer__brand img { height: 60px; margin-bottom: 1rem; }
.footer__brand p { line-height: 1.9; color: #d8cbbf; }
.footer__links h3, .footer__social h3 { margin-bottom: 1rem; font-size: 1.15rem; color: #fff; }
.footer__links ul, .footer__social ul { display: grid; gap: 0.6rem; }
.footer__links a, .footer__social a { color: #eadfd6; }
.footer__links a:hover, .footer__social a:hover { color: var(--brand-accent); }
.footer__contact { display: grid; gap: 0.4rem; margin-top: 1rem; font-size: 0.92rem; color: #cbbfb4; }
.footer__bottom { padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; text-align: center; color: #bfb1a4; }

/* ---- Utilities used by the templates -------------------------------------- */
.text-primary { color: var(--brand-primary) !important; }
.text-primary-700, .text-primary-800 { color: var(--brand-primary); }
.text-muted { color: var(--color-text-muted) !important; }
.text-center { text-align: center; }
.text-xs { font-size: 0.78rem; }
.text-sm { font-size: 0.88rem; }
.text-2xl { font-size: 1.6rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 600; }
.bg-primary-50 { background: var(--brand-light); }
.border-primary-100 { border-color: #ecd9bf; }
.bg-surface-muted { background: var(--color-bg-muted); }
.border { border: 1px solid var(--color-border); }
.border-soft { border-color: var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-r-lg { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.rounded { border-radius: 6px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.block { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }
.bottom-2 { bottom: 0.5rem; }
.left-2 { left: 0.5rem; }
.bg-black\/70 { background: rgba(0, 0, 0, 0.7); }
.text-white { color: #fff; }
.px-2 { padding-inline: 0.5rem; }
.py-1 { padding-block: 0.25rem; }
.p-4 { padding: 1rem; }
.py-12 { padding-block: 3rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-inline: auto; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.list-none { list-style: none; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-w-\[200px\] { min-width: 200px; }
.min-w-\[80px\] { min-width: 5rem; }
.max-w-3xl { max-width: 48rem; }
.aspect-video { aspect-ratio: 16 / 9; }
.object-cover { object-fit: cover; }
.line-clamp-2, .line-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.h2 { font-size: 1.9rem; font-family: var(--font-heading); }
.h4 { font-size: 1.3rem; font-family: var(--font-heading); }
.h5 { font-size: 1.15rem; font-family: var(--font-heading); }
.h6 { font-size: 1rem; font-family: var(--font-heading); }
.link-subtle:hover { color: var(--brand-primary); text-decoration: underline; }
.icon { display: inline-block; width: 1.25em; height: 1.25em; fill: currentColor; vertical-align: middle; }
.card__media.w-1\/3 { width: 33.333%; min-width: 200px; }

/* ---- Decorations --------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f5ede3; }
::-webkit-scrollbar-thumb { background: var(--brand-mid); border-radius: 10px; border: 2px solid #f5ede3; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-accent); }
#reading-progress { position: fixed; top: 0; left: 0; z-index: 9999; width: 0; height: 4px; background: linear-gradient(90deg, var(--brand-accent), var(--brand-mid)); transition: width 0.1s ease-out; }
.bg-shape { position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.12; pointer-events: none; }
.bg-shape-1 { width: 400px; height: 400px; top: -100px; right: -100px; background: var(--brand-accent); }
.bg-shape-2 { width: 500px; height: 500px; bottom: -150px; left: -100px; background: var(--brand-mid); }
#transition-overlay { display: none !important; }

@media (max-width: 768px) {
  .brand img { height: 42px; }
  .brand-title { font-size: 1.05rem; }
  .site-nav__list a { padding: 0.35rem 0.7rem; font-size: 0.9rem; }
  .nx-card { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, #reading-progress, .bg-shape { display: none !important; }
}

/* ---- Final tweaks -------------------------------------------------------- */
.grid--4-cols { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
@media (max-width: 768px) {
  .header-content { gap: 0.4rem; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav__list { flex-wrap: nowrap; }
}
