/* Generated from assets/css/stitch-source.css. Custom CSS only; no Tailwind runtime. */
/*
 * Student Iraqi Stitch Redesign
 * Source: Stitch exported design. This is custom CSS, no Tailwind runtime/CDN required.
 */
:root {
  --inverse-primary: #b4c5ff;
  --tertiary-container: #007d55;
  --on-surface: #0b1c30;
  --inverse-on-surface: #eaf1ff;
  --surface-bright: #f8f9ff;
  --on-tertiary: #ffffff;
  --outline: #737686;
  --tertiary-fixed-dim: #4edea3;
  --surface: #f8f9ff;
  --on-surface-variant: #434655;
  --on-primary-container: #eeefff;
  --tertiary-fixed: #6ffbbe;
  --on-secondary-container: #5c647a;
  --tertiary: #006242;
  --surface-container-high: #dce9ff;
  --on-tertiary-fixed-variant: #005236;
  --on-tertiary-container: #bdffdb;
  --secondary-fixed: #dae2fd;
  --surface-container-lowest: #ffffff;
  --surface-variant: #d3e4fe;
  --primary-fixed-dim: #b4c5ff;
  --surface-container: #e5eeff;
  --secondary-container: #dae2fd;
  --primary: #004ac6;
  --outline-variant: #c3c6d7;
  --surface-tint: #0053db;
  --surface-dim: #cbdbf5;
  --on-primary-fixed-variant: #003ea8;
  --surface-container-low: #eff4ff;
  --on-error: #ffffff;
  --on-tertiary-fixed: #002113;
  --on-background: #0b1c30;
  --on-secondary: #ffffff;
  --on-secondary-fixed: #131b2e;
  --surface-container-highest: #d3e4fe;
  --on-secondary-fixed-variant: #3f465c;
  --on-primary: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --inverse-surface: #213145;
  --on-primary-fixed: #00174b;
  --background: #f8f9ff;
  --error: #ba1a1a;
  --primary-fixed: #dbe1ff;
  --secondary-fixed-dim: #bec6e0;
  --secondary: #565e74;
  --primary-container: #2563eb;
  --font-ar: "IBM Plex Sans Arabic", sans-serif;
  --container: 1280px;
  --margin-mobile: 16px;
  --margin-desktop: 64px;
  --radius-card: 32px;
  --radius-section: 28px;
  --shadow-soft: 0 18px 50px rgba(11, 28, 48, 0.08);
  --shadow-card: 0 10px 26px rgba(11, 28, 48, 0.08);
  --shadow-hover: 0 24px 60px rgba(0, 74, 198, 0.16);
  --topbar-height: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.stitch-body {
  margin: 0;
  direction: rtl;
  overflow-x: hidden;
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font-ar);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.stitch-body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.hidden { display: none !important; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.stitch-container {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin-inline: auto;
}
.stitch-page { padding-top: var(--topbar-height); min-height: 70vh; }
.stitch-section { padding: 64px 0; }
.stitch-section--soft { background: var(--surface-container-low); }
.stitch-section__head { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.stitch-section__eyebrow,
.stitch-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .02em;
}
.stitch-pill--soft { background: var(--surface-container-high); color: var(--primary); }
.stitch-pill--success { background: var(--on-tertiary-container); color: var(--tertiary); }
.stitch-section__title,
.stitch-title-lg {
  margin: 16px 0 0;
  color: var(--on-surface);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.25;
  font-weight: 700;
}
.stitch-section__desc,
.stitch-muted {
  margin: 14px auto 0;
  color: var(--on-surface-variant);
  font-size: 17px;
  line-height: 1.7;
}

/* Header matches Stitch top app bar */
.stitch-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 500;
  height: var(--topbar-height);
  background: rgba(248, 249, 255, .92);
  border-bottom: 1px solid rgba(195, 198, 215, .55);
  box-shadow: 0 2px 12px rgba(11, 28, 48, .06);
  backdrop-filter: blur(16px);
}
.stitch-topbar__inner {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.stitch-brand {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  color: var(--primary);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
}
.stitch-brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 74, 198, .18);
}
.stitch-brand--footer { color: #fff; }
.stitch-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-inline: auto;
}
.stitch-nav a {
  position: relative;
  color: var(--on-surface-variant);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  transition: color .2s ease;
}
.stitch-nav a:hover,
.stitch-nav a.is-active { color: var(--primary); }
.stitch-nav a.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}
.stitch-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stitch-search-mini,
.stitch-search-wide,
.stitch-hero-search {
  position: relative;
  display: flex;
  align-items: center;
}
.stitch-search-mini span,
.stitch-search-wide span,
.stitch-hero-search span {
  position: absolute;
  inset-inline-start: 16px;
  color: var(--outline);
  pointer-events: none;
}
.stitch-search-mini input,
.stitch-search-wide input,
.stitch-hero-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: var(--surface-container-low);
  color: var(--on-surface);
  transition: box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.stitch-search-mini input {
  width: 260px;
  min-height: 44px;
  padding: 10px 48px 10px 18px;
  border-radius: 999px;
}
.stitch-search-wide input {
  min-height: 56px;
  padding: 14px 50px 14px 20px;
  border-radius: 22px;
}
.stitch-hero-search input {
  min-height: 72px;
  padding: 18px 64px 18px 24px;
  border-radius: 28px;
  background: var(--surface-container-lowest);
  border: 2px solid rgba(0, 74, 198, .1);
  box-shadow: var(--shadow-soft);
  font-size: 17px;
}
.stitch-search-mini input:focus,
.stitch-search-wide input:focus,
.stitch-hero-search input:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .16);
}
.stitch-hero-search input:focus { border-color: var(--primary); }

.stitch-button {
  appearance: none;
  border: 0;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.stitch-button:hover { transform: translateY(-2px); }
.stitch-button--compact { min-height: 44px; padding: 10px 22px; border-radius: 999px; }
.stitch-button--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 14px 30px rgba(0, 74, 198, .18);
}
.stitch-button--primary:hover { box-shadow: 0 20px 44px rgba(0, 74, 198, .24); }
.stitch-button--secondary { background: var(--surface-container-highest); color: var(--on-surface); }
.stitch-button--danger { background: var(--error-container); color: var(--on-error-container); }
.stitch-icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-container-low);
  color: var(--primary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stitch-icon-button span { font-size: 32px; }

/* Mobile drawer */
.stitch-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 28, 48, .36);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.stitch-mobile-drawer.is-open { opacity: 1; pointer-events: auto; }
.stitch-mobile-drawer__panel {
  width: min(420px, 92vw);
  height: 100%;
  margin-inline-start: auto;
  padding: 18px;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(11, 28, 48, .22);
  transform: translateX(-100%);
  transition: transform .28s ease;
}
.stitch-mobile-drawer.is-open .stitch-mobile-drawer__panel { transform: translateX(0); }
.stitch-mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.stitch-mobile-nav { display: grid; gap: 10px; margin: 18px 0; }
.stitch-mobile-nav a {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  font-weight: 700;
}

/* Hero mirrors Stitch visual composition */
.stitch-hero {
  position: relative;
  overflow: hidden;
  padding: 94px 0 92px;
  background: radial-gradient(circle at 0% 0%, #eff4ff 0%, #f8f9ff 100%);
}
.stitch-hero::before,
.stitch-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: .65;
}
.stitch-hero::before {
  width: 420px;
  height: 420px;
  background: rgba(0, 74, 198, .08);
  inset-inline-start: -180px;
  top: 40px;
}
.stitch-hero::after {
  width: 360px;
  height: 360px;
  background: rgba(111, 251, 190, .18);
  inset-inline-end: -120px;
  bottom: -80px;
}
.stitch-hero__grid {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 64px;
  align-items: center;
}
.stitch-hero__content { text-align: right; }
.stitch-hero__content h1,
.stitch-hero__content h2 {
  margin: 22px 0 0;
  color: var(--on-surface);
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 700;
}
.stitch-hero__content h1 span,
.stitch-hero__content h2 span { color: var(--primary); }
.stitch-hero__content p {
  margin: 22px 0 0;
  max-width: 650px;
  color: var(--on-surface-variant);
  font-size: 17px;
  line-height: 1.75;
}
.stitch-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 36px;
}
.stitch-hero__visual {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stitch-hero__visual::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 999px;
  background: rgba(0, 74, 198, .05);
  filter: blur(24px);
}
.stitch-floating-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 24px;
  animation: stitch-float 6s ease-in-out infinite;
}
@keyframes stitch-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.stitch-glass-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 32px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(11, 28, 48, .12);
  transform: rotate(3deg);
}
.stitch-glass-card:nth-child(2) { transform: rotate(-6deg) translateY(48px); }
.stitch-glass-card:nth-child(3) { transform: rotate(6deg); }
.stitch-glass-card:nth-child(4) { transform: rotate(-3deg) translateY(32px); }
.stitch-glass-card h3,
.stitch-glass-card h4 { margin: 18px 0 10px; font-size: 20px; line-height: 1.4; font-weight: 700; }
.stitch-glass-card__bar { width: 48px; height: 6px; border-radius: 999px; background: var(--primary); }
.stitch-icon-tile {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  flex: 0 0 auto;
}
.stitch-icon-tile span { font-size: 32px; }
.stitch-icon-tile--green { background: var(--tertiary-container); color: #fff; }
.stitch-icon-tile--soft { background: var(--secondary-container); color: var(--on-secondary-container); }
.stitch-icon-tile--white { background: #fff; color: var(--primary); }

/* Cards and grids */
.stitch-card-grid,
.stitch-stage-grid,
.stitch-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.stitch-card-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stitch-category-card,
.stitch-stage-card,
.stitch-resource-card,
.stitch-panel {
  border-radius: 28px;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(195, 198, 215, .72);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.stitch-category-card:hover,
.stitch-stage-card:hover,
.stitch-resource-card:hover,
.stitch-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 74, 198, .28);
  box-shadow: var(--shadow-hover);
}
.stitch-category-card {
  min-height: 250px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  position: relative;
}
.stitch-category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(0, 74, 198, .06);
  inset-inline-end: -60px;
  bottom: -70px;
}
.stitch-category-card h3 { margin: 0; font-size: 22px; line-height: 1.35; font-weight: 700; color: var(--on-surface); }
.stitch-category-card p { margin: 0; color: var(--on-surface-variant); line-height: 1.7; }
.stitch-inline-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
}
.stitch-inline-link span:last-child { transition: transform .2s ease; }
.stitch-inline-link:hover span:last-child { transform: translateX(-4px); }
.stitch-stage-card { padding: 24px; }
.stitch-stage-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.stitch-stage-card__head strong { display: block; color: var(--on-surface); font-size: 20px; line-height: 1.35; }
.stitch-stage-card__head small { display: block; margin-top: 4px; color: var(--on-surface-variant); font-size: 13px; }
.stitch-stage-card p { margin: 0 0 16px; color: var(--on-surface-variant); line-height: 1.7; }
.stitch-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stitch-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  font-size: 13px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.stitch-chip:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.stitch-resource-card { overflow: hidden; display: flex; flex-direction: column; }
.stitch-resource-card__media {
  display: block;
  height: 220px;
  overflow: hidden;
  background: var(--surface-container-low);
}
.stitch-resource-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.stitch-resource-card:hover .stitch-resource-card__media img { transform: scale(1.06); }
.stitch-resource-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.stitch-resource-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--outline);
  font-size: 13px;
  font-weight: 700;
}
.stitch-resource-card__meta .material-symbols-outlined { color: var(--primary); font-size: 21px; }
.stitch-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--outline-variant); }
.stitch-resource-card__title { margin: 12px 0 0; color: var(--on-surface); font-size: 20px; line-height: 1.45; font-weight: 700; }
.stitch-resource-card__excerpt { margin: 10px 0 18px; color: var(--on-surface-variant); line-height: 1.7; }

/* Archive pages */
.stitch-archive-hero {
  padding: 72px 0 48px;
  background: linear-gradient(135deg, var(--surface-container-low) 0%, var(--background) 100%);
  border-bottom: 1px solid rgba(195, 198, 215, .58);
}
.stitch-archive-hero__grid {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 42px;
  align-items: center;
}
.stitch-archive-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.2;
  color: var(--on-surface);
}
.stitch-archive-hero p { margin: 16px 0 0; color: var(--on-surface-variant); font-size: 17px; line-height: 1.8; max-width: 760px; }
.stitch-archive-hero__visual {
  min-height: 260px;
  border-radius: 32px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-hover);
  position: relative;
  overflow: hidden;
}
.stitch-archive-hero__visual::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  inset-inline-end: -90px;
  top: -90px;
}
.stitch-archive-hero__visual span { position: relative; font-size: 96px; }
.stitch-term-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stitch-term-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 18px;
  border-radius: 22px;
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  font-weight: 700;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.stitch-term-link:hover { transform: translateY(-4px); background: var(--primary); box-shadow: var(--shadow-hover); }
.stitch-term-link .material-symbols-outlined { color: var(--inverse-primary); }

/* Single page */
.stitch-single {
  padding: 48px 0 72px;
  background: var(--background);
}
.stitch-single__grid {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}
.stitch-single__main,
.stitch-single__aside {
  display: grid;
  gap: 24px;
}
.stitch-single-hero {
  overflow: hidden;
  border-radius: 32px;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(195, 198, 215, .72);
  box-shadow: var(--shadow-card);
}
.stitch-single-hero__media {
  min-height: 360px;
  max-height: 520px;
  background: var(--surface-container-low);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stitch-single-hero__media img { width: 100%; height: 100%; object-fit: contain; max-height: 520px; }
.stitch-single-hero__body { padding: 30px; }
.stitch-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--outline);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.stitch-breadcrumbs a { color: var(--primary); }
.stitch-single-hero h1 { margin: 0; font-size: clamp(28px, 4.5vw, 44px); line-height: 1.25; color: var(--on-surface); }
.stitch-single-hero__desc { margin: 18px 0 0; color: var(--on-surface-variant); font-size: 17px; line-height: 1.8; }
.stitch-content-panel,
.stitch-download-panel,
.stitch-info-panel {
  padding: 26px;
  border-radius: 28px;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(195,198,215,.72);
  box-shadow: var(--shadow-card);
}
.stitch-content-panel h2,
.stitch-download-panel h2,
.stitch-info-panel h2 { margin: 0 0 18px; font-size: 24px; line-height: 1.35; color: var(--on-surface); }
.stitch-content-panel .post-content { color: var(--on-surface); line-height: 1.85; font-size: 16px; }
.stitch-content-panel .post-content :where(h1,h2,h3,h4) { color: var(--on-surface); line-height: 1.35; }
.stitch-content-panel .post-content a { color: var(--primary); font-weight: 700; }
.stitch-content-panel .post-content img { border-radius: 20px; margin-inline: auto; }
.stitch-template-cover {
  display: grid;
  place-items: center;
  margin: 18px 0;
}
.stitch-template-cover a {
  display: block;
  width: min(100%, 360px);
}
.stitch-template-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--surface-container-low);
  box-shadow: var(--shadow-card);
}
.stitch-template-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.stitch-template-list li {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-container-low);
  color: var(--on-surface);
}
.stitch-download-list { display: grid; gap: 12px; }
.stitch-download-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-container-low);
  color: var(--on-surface);
  border: 1px solid transparent;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.stitch-download-link:hover { background: #fff; border-color: rgba(0,74,198,.25); transform: translateY(-2px); }
.stitch-download-link .material-symbols-outlined { color: var(--primary); }
.stitch-meta-list { display: grid; gap: 12px; }
.stitch-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-container-low);
}
.stitch-meta-item .material-symbols-outlined { color: var(--primary); }
.stitch-meta-item strong { display: block; color: var(--on-surface); font-size: 14px; }
.stitch-meta-item span:not(.material-symbols-outlined) { display: block; color: var(--on-surface-variant); line-height: 1.5; }
.stitch-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.stitch-related-grid .stitch-resource-card__media { height: 150px; }

/* Modal / form */
.stitch-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.stitch-modal.is-open { opacity: 1; pointer-events: auto; }
.stitch-modal__backdrop { position: absolute; inset: 0; background: rgba(11,28,48,.45); backdrop-filter: blur(10px); }
.stitch-modal__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 32px;
  border-radius: 32px;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 30px 80px rgba(11,28,48,.28);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
}
.stitch-modal.is-open .stitch-modal__panel { transform: translateY(0) scale(1); }
.stitch-modal__close {
  position: absolute;
  inset-inline-end: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-container-low);
  color: var(--primary);
  cursor: pointer;
}
.stitch-modal__panel h2 { margin: 18px 0 0; font-size: 32px; line-height: 1.3; color: var(--on-surface); }
.stitch-modal__panel p { margin: 12px 0 24px; color: var(--on-surface-variant); line-height: 1.7; }
.stitch-form { display: grid; gap: 16px; }
.stitch-field { display: grid; gap: 8px; }
.stitch-field label { color: var(--on-surface); font-weight: 700; }
.stitch-field input,
.stitch-field textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface-container-low);
  color: var(--on-surface);
  padding: 15px 16px;
  outline: 0;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stitch-field input:focus,
.stitch-field textarea:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,74,198,.12); }
.stitch-form__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.stitch-alert { padding: 14px 16px; border-radius: 16px; background: var(--primary-fixed); color: var(--on-primary-fixed); font-weight: 700; }
.stitch-alert.is-error { background: var(--error-container); color: var(--on-error-container); }
.stitch-image-preview { display: grid; gap: 10px; align-items: start; }
.stitch-image-preview img { width: 180px; max-height: 180px; object-fit: cover; border-radius: 18px; border: 1px solid var(--outline-variant); }

/* Footer */
.stitch-footer {
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  padding: 56px 0 24px;
}
.stitch-footer__inner {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.stitch-footer__brand p { margin: 16px 0 0; color: rgba(234,241,255,.78); line-height: 1.8; }
.stitch-footer__heading {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}
.stitch-footer__heading .material-symbols-outlined { display: none; }
.stitch-footer__content { margin-top: 16px; color: rgba(234,241,255,.78); line-height: 1.9; }
.stitch-footer__content a { color: rgba(234,241,255,.86); transition: color .2s ease; }
.stitch-footer__content a:hover { color: #fff; }
.stitch-footer__bottom {
  width: min(var(--container), calc(100% - 2 * var(--margin-mobile)));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(234,241,255,.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(234,241,255,.7);
}

/* Pagination and utility */
.stitch-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.stitch-pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  font-weight: 700;
}
.stitch-pagination .page-numbers.current,
.stitch-pagination .page-numbers:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.scroll-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }
.stitch-empty {
  padding: 32px;
  text-align: center;
  border-radius: 24px;
  background: var(--surface-container-lowest);
  border: 1px dashed var(--outline-variant);
  color: var(--on-surface-variant);
}

@media (max-width: 1120px) {
  .stitch-nav, .stitch-search-mini { display: none; }
  .stitch-icon-button { display: inline-flex; }
  .stitch-card-grid,
  .stitch-stage-grid,
  .stitch-resource-grid,
  .stitch-card-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stitch-hero__grid { grid-template-columns: 1fr; }
  .stitch-hero__visual { display: none; }
  .stitch-archive-hero__grid { grid-template-columns: 1fr; }
  .stitch-archive-hero__visual { min-height: 190px; }
  .stitch-single__grid { grid-template-columns: 1fr; }
  .stitch-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stitch-footer__inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  :root { --topbar-height: 72px; }
  .stitch-topbar__inner { width: min(100% - 24px, var(--container)); }
  .stitch-brand { font-size: 22px; }
  .stitch-brand img { width: 40px; height: 40px; }
  .stitch-button--compact { display: none; }
  .stitch-hero { padding: 62px 0 64px; }
  .stitch-hero__content h1,
  .stitch-hero__content h2 { font-size: 36px; }
  .stitch-hero__actions { flex-direction: column; }
  .stitch-hero__actions .stitch-button { width: 100%; }
  .stitch-hero-search input { min-height: 62px; border-radius: 22px; }
  .stitch-section { padding: 44px 0; }
  .stitch-card-grid,
  .stitch-stage-grid,
  .stitch-resource-grid,
  .stitch-card-grid--four,
  .stitch-term-list,
  .stitch-related-grid { grid-template-columns: 1fr; }
  .stitch-archive-hero { padding: 48px 0 34px; }
  .stitch-archive-hero__visual { display: none; }
  .stitch-single { padding: 28px 0 48px; }
  .stitch-single-hero__media { min-height: 240px; }
  .stitch-single-hero__body,
  .stitch-content-panel,
  .stitch-download-panel,
  .stitch-info-panel { padding: 20px; }
  .stitch-footer__inner { grid-template-columns: 1fr; }
  .stitch-footer__heading .material-symbols-outlined { display: inline-block; transition: transform .2s ease; }
  .stitch-footer__content { display: none; }
  .stitch-footer__group[data-is-open="true"] .stitch-footer__content { display: block; }
  .stitch-footer__group[data-is-open="true"] .stitch-footer__heading .material-symbols-outlined { transform: rotate(180deg); }
  .stitch-footer__bottom { flex-direction: column; align-items: flex-start; }
}
