/* =====================================================================
   RGS Prompt Library, shared stylesheet
   Visual language: navy + light-blue accent, serif headings, clean cards.
   Sister site to revision-hub.co.uk and rgs-ai-tutor-library.lovable.app.
   ===================================================================== */

:root {
  --navy-900: #1c2a47;
  --navy-800: #243558;
  --navy-700: #2e426d;
  --navy-500: #4a5d83;
  --accent: #7eb2dd;
  --accent-soft: #b7d3eb;
  --accent-tint: #e8f1f8;
  --accent-tint-strong: #d8e7f3;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #f0f4f9;
  --border: #e3e9f0;
  --border-strong: #d3dde8;
  --text: #1c2a47;
  --text-muted: #5b6a82;
  --text-soft: #8190a8;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(28, 42, 71, 0.04), 0 1px 3px rgba(28, 42, 71, 0.06);
  --shadow: 0 1px 3px rgba(28, 42, 71, 0.05), 0 8px 24px rgba(28, 42, 71, 0.06);
  --shadow-lg: 0 4px 12px rgba(28, 42, 71, 0.06), 0 20px 40px rgba(28, 42, 71, 0.08);

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1140px;
  --container-narrow: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-900); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

/* ============= Layout ============= */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: var(--container-narrow); }

section { padding-block: 64px; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head .eyebrow { margin-bottom: 12px; }

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.eyebrow--muted { color: var(--text-soft); }

/* ============= Top nav ============= */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy-900);
}

.site-nav__brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent-tint);
  color: var(--navy-700);
}

.site-nav__links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}

.site-nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background-color 0.15s, color 0.15s;
}

.site-nav__links a:hover {
  background: var(--surface-alt);
  color: var(--navy-900);
}

.site-nav__links a[aria-current="page"] {
  background: var(--accent-tint);
  color: var(--navy-900);
}

.site-nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  color: var(--navy-900);
}

@media (max-width: 720px) {
  .site-nav__toggle { display: grid; place-items: center; }
  .site-nav__links {
    position: absolute;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
  }
  .site-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__links a { padding: 12px 14px; }
}

/* ============= Hero ============= */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: #ffffff;
  padding: 96px 0 140px;
  text-align: center;
  overflow: hidden;
}

.hero h1 { color: #ffffff; margin-bottom: 18px; }

.hero__tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0 auto 18px;
}

.hero__tagline em {
  font-style: normal;
  color: var(--accent);
}

.hero__intro {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 560px;
  margin: 0 auto;
}

.hero__wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 80px;
  display: block;
}

.hero--compact { padding: 72px 0 110px; }

/* ============= Cards: shared base ============= */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

/* ============= Section nav cards (homepage) ============= */

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.section-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
}

.section-card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--navy-700);
  margin-bottom: 20px;
}

.section-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.section-card p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 18px;
  flex: 1;
}

.section-card__cta {
  font-weight: 600;
  color: var(--navy-700);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-card:hover .section-card__cta { color: var(--navy-900); }
.section-card:hover .section-card__cta svg { transform: translateX(3px); }
.section-card__cta svg { transition: transform 0.15s; }

/* ============= Tutor cards (Mindjoy core) ============= */

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.tutor-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  text-align: center;
}

.tutor-card__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--navy-700);
}

.tutor-card h3 { font-size: 1.3rem; margin-bottom: 8px; }

.tutor-card__tagline {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 22px;
}

.tutor-card__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  text-align: left;
  flex: 1;
}

.tutor-card__bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tutor-card__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.tutor-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

/* ============= Additional tutor (compact) ============= */

.tutor-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tutor-card--compact {
  text-align: left;
  padding: 24px 22px;
}

.tutor-card--compact h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.tutor-card--compact .tutor-card__tagline {
  margin-bottom: 18px;
  font-size: 0.93rem;
}

/* ============= Standard prompt cards ============= */

.prompt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 880px) {
  .prompt-grid--two { grid-template-columns: 1fr 1fr; gap: 24px; }
}

.prompt-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.prompt-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.prompt-card h3 {
  font-size: 1.2rem;
  margin: 0;
}

.prompt-card__what {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 16px;
}

.prompt-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.prompt-card__body { margin-bottom: 16px; }

.prompt-card__tweak {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 14px;
}

.prompt-card__tweak strong { color: var(--navy-900); }

/* ============= Chips / tags ============= */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent-tint);
  color: var(--navy-700);
  border: 1px solid var(--accent-tint-strong);
}

.chip--tool { background: var(--navy-900); color: #ffffff; border-color: var(--navy-900); }
.chip--tool[data-tool="copilot"]   { background: #2b6cb0; border-color: #2b6cb0; }
.chip--tool[data-tool="claude"]    { background: #c96a3a; border-color: #c96a3a; }
.chip--tool[data-tool="chatgpt"]   { background: #10a37f; border-color: #10a37f; }
.chip--tool[data-tool="mindjoy"]   { background: var(--navy-800); border-color: var(--navy-800); }

.chip--subtle {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

/* ============= Code block ============= */

.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
  padding: 18px 20px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block::-webkit-scrollbar { width: 8px; }
.code-block::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ============= Buttons ============= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
}
.btn--primary:hover { background: var(--navy-700); border-color: var(--navy-700); color: #ffffff; }

.btn--secondary {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}
.btn--secondary:hover { background: var(--navy-900); color: #ffffff; }

.btn--ghost {
  background: transparent;
  color: var(--navy-700);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--accent-tint); }

.btn--block { width: 100%; }

.btn--copy { font-size: 0.88rem; padding: 8px 14px; }

.btn--copy.is-copied {
  background: #1f8a5c;
  border-color: #1f8a5c;
  color: #ffffff;
}

/* ============= Callout boxes ============= */

.callout {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-strong);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-block: 28px;
}

.callout__title {
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.callout ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.callout ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.callout ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.58em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.callout ul li:last-child { margin-bottom: 0; }

.callout--warn {
  background: #fff7ed;
  border-color: #fed7aa;
}
.callout--warn .callout__title { color: #9a3412; }
.callout--warn ul li::before { background: #f97316; }

.callout--note {
  background: var(--surface-alt);
  border-color: var(--border);
}

/* ============= Tutor detail page ============= */

.detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-hero__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--navy-700);
  flex-shrink: 0;
}

.detail-hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0;
}

.detail-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 36px;
}

.detail-section { margin-top: 40px; }

.detail-section h2 {
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 1rem;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 6px 0 6px 48px;
  font-size: 1rem;
  color: var(--text-muted);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 6px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--navy-900);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy-700);
}

.back-link:hover { color: var(--navy-900); }
.back-link svg { transition: transform 0.15s; }
.back-link:hover svg { transform: translateX(-3px); }

/* ============= How to use block ============= */

.how-to {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.how-to__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.how-to__item .step-num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.how-to__item h4 { margin-bottom: 6px; }
.how-to__item p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ============= Tool guidance ribbon ============= */

.tool-note {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.tool-note strong { color: var(--navy-900); }

/* ============= Footer ============= */

.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
  margin-top: 80px;
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: #ffffff; }

/* ============= Utility ============= */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

.starter-rail {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-strong);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 56px;
}

.starter-rail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.starter-rail h2 {
  font-size: 1.4rem;
  margin: 0;
}

.starter-rail__lede {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.starter-rail .prompt-grid { gap: 20px; }
.starter-rail .prompt-card { background: var(--surface); }

/* ============= Visually hidden ============= */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============= Hero band (Lessons showcase intro) ============= */

.hero-band {
  padding: 56px 0 40px;
  text-align: center;
  background: var(--bg);
}

.hero-band__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--navy-900);
  margin: 0 0 14px;
}

.hero-band__sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto;
}

/* ============= Tool recommendation line ============= */

.tool-recommendation {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.tool-recommendation strong { color: var(--navy-900); }

/* ============= Section divider ============= */

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  max-width: 1140px;
  margin: 16px auto 0;
  width: calc(100% - 48px);
}

.section--more-prompts { padding-top: 36px; }

/* ============= Showcase section ============= */

.section-showcase {
  padding: 0 0 24px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;        /* Each card sized to its own content. */
}

@media (min-width: 640px) {
  .showcase-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .showcase-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
}

/* ============= Showcase card ============= */

.showcase-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.showcase-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.showcase-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-alt);
}

.showcase-card__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-tint) 0%, var(--accent-soft) 55%, var(--accent) 100%);
  z-index: 0;
}

.showcase-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.showcase-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  background: transparent;
}

.showcase-card__body {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.showcase-card__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.2;
}

.showcase-card__what {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin: 0;
  line-height: 1.5;
}

.showcase-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.showcase-card__best-for {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 4px 0 0;
}

.showcase-card__best-for strong {
  color: var(--text-muted);
  font-weight: 600;
}

.showcase-card__cta {
  margin-top: auto;          /* push to bottom of body so CTAs align */
  align-self: stretch;
}

@media (min-width: 640px) {
  /* Lock collapsed card height so the three cards line up.
     Expanding one card still grows only that card (align-items: start
     on the grid keeps siblings at their natural height). */
  .showcase-card { min-height: 590px; }
}

.showcase-card__chev {
  transition: transform 0.2s ease;
}

.showcase-card.is-expanded .showcase-card__chev {
  transform: rotate(180deg);
}

/* ============= Showcase card: inline expand ============= */

.showcase-card__expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  overflow: hidden;
  background: var(--surface-alt);
  border-top: 1px solid transparent;
}

.showcase-card.is-expanded .showcase-card__expand {
  grid-template-rows: 1fr;
  border-top-color: var(--border);
}

.showcase-card__expand-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.showcase-card.is-expanded .showcase-card__expand-inner {
  padding: 16px 22px 22px;
}

.showcase-card__copy-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-alt);
  padding: 8px 0 10px;
  margin-bottom: 4px;
}

.showcase-card__expand .code-block {
  max-height: 280px;
  background: var(--surface);
}

.showcase-card__expand .prompt-card__tweak {
  margin-top: 14px;
}

/* Fallback chain order: placeholder (bottom) ← poster (middle) ← video (top).
   When a video file is missing, JS hides the <video> element and the poster
   image shows. If poster is also missing, the gradient placeholder remains.
   For reduced-motion users, autoplay is removed in JS so the poster shows
   as a still image. */

@media (prefers-reduced-motion: reduce) {
  .showcase-card__video { opacity: 0.95; }
  .showcase-card__chev { transition: none; }
  .showcase-card__expand { transition: none; }
}

/* ============= Compact expandable card (Lessons: More prompts) ============= */

.lessons-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 760px) {
  .lessons-list { grid-template-columns: 1fr 1fr; }
}

.compact-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  gap: 8px;
}

@media (min-width: 760px) {
  /* Lock collapsed card height so cards in a row line up top and bottom.
     `align-items: start` on .lessons-list keeps each card independent
     when one expands, so the CTA below grows only that card. */
  .compact-card { min-height: 400px; }
}

.compact-card__title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.25;
}

.compact-card__what {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin: 0;
  line-height: 1.5;
}

.compact-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.compact-card__cta {
  margin-top: auto;          /* push CTA to the bottom so cards align */
  align-self: flex-start;
}

.compact-card__chev { transition: transform 0.2s ease; }
.compact-card.is-expanded .compact-card__chev { transform: rotate(180deg); }

.compact-card__expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
  margin: 0 -24px -22px;
}

.compact-card.is-expanded .compact-card__expand {
  grid-template-rows: 1fr;
}

.compact-card__expand-inner {
  min-height: 0;
  overflow: hidden;
  background: var(--surface-alt);
  border-top: 1px solid transparent;
}

.compact-card.is-expanded .compact-card__expand-inner {
  border-top-color: var(--border);
  padding: 16px 24px 22px;
}

.compact-card__copy-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-alt);
  padding: 6px 0 10px;
  margin-bottom: 4px;
}

.compact-card__expand .code-block {
  max-height: 280px;
  background: var(--surface);
}

.compact-card__expand .prompt-card__tweak {
  margin-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .compact-card__chev,
  .compact-card__expand { transition: none; }
}

/* ============= "More to explore" heading ============= */

.more-heading {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  margin: 0 0 28px;
  line-height: 1.3;
}

.more-heading__hint {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: normal;
}

/* ============= Source-warning indicator (source_warning: true) ============= */

.source-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #92400e;
  margin: 4px 0 2px;
}

.source-warning svg {
  color: #d97706;
  flex-shrink: 0;
}

.source-warning span { line-height: 1.2; }

/* ============= "Sources first" top-level note ============= */

.sources-note {
  background: #fff7ed;
  border-left: 3px solid #f59e0b;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 0 0 28px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #7c2d12;
}

.sources-note strong { color: #92400e; font-weight: 700; }

/* ============= Showcase section heading ============= */

.showcase-heading {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  margin: 0 0 14px;
  line-height: 1.2;
}

/* ============= Closing note (page-level, quiet, non-interactive) =============
   A small content block sat after the cards on a section page. Visually
   distinct from cards: soft background, no border, more compact. */

.closing-note {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 56px;
}

.closing-note__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--navy-900);
  margin: 0 0 18px;
  line-height: 1.25;
}

.closing-note__list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.closing-note__list li::marker {
  color: var(--text-soft);
  font-weight: 600;
}

.closing-note__list li strong {
  color: var(--navy-900);
  font-weight: 700;
}

@media (max-width: 600px) {
  .closing-note { padding: 22px 22px; }
}

/* ============= Block headings (section dividers) =============
   For the "Quick wins" and "Where to keep humans in the loop" headings
   on the Productivity & Admin page. Reuses the .more-heading rhythm but
   with a bit more breathing room above for the section-divider context. */

.block-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.3;
  color: var(--navy-900);
}

.block-heading__hint {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section--tips { padding-top: 36px; }

/* ============= Tip blocks (Quick wins on Productivity & Admin) =============
   Distinct from prompt cards by design: no border, no card chrome, just
   a numbered indicator + serif title + muted body. Two-column grid on
   desktop, single column on mobile. */

.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 36px;
}

@media (min-width: 760px) {
  .tips-grid { grid-template-columns: 1fr 1fr; }
}

.tip-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0 6px;
}

.tip-block__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--navy-900);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.tip-block__content { min-width: 0; }

.tip-block__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy-900);
  margin: 0 0 4px;
  line-height: 1.3;
}

.tip-block__body {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* ============= Closing-note prose variant =============
   Used on Productivity & Admin's "Where to keep humans in the loop" block.
   Same surface as the standard closing note but with prose paragraphs
   instead of an ordered list. */

.closing-note--prose p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.closing-note--prose p:last-child { margin-bottom: 0; }
.closing-note--prose p strong { color: var(--navy-900); font-weight: 700; }
