/* Examples (programmatic SEO) pages.
   Shared stylesheet for /examples and /examples/* pages.
   Mirrors the design language of the existing static content pages
   (lesson-planning-with-picrat.html, what-is-picrat.html, etc.). */

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

:root {
  --blue: #3b82f6;
  --blue-dark: #1e40af;
  --green: #10b981;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --red: #ef4444;
  --text: #1a1a2e;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg: #ffffff;
  --line: #e2e8f0;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }

.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Top bar */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}
.top-bar.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }
.top-bar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.top-bar-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.top-bar-grid { display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; }
.top-bar-grid span { width: 10px; height: 10px; border-radius: 3px; }
.top-bar-grid span:nth-child(1) { background: #3b82f6; }
.top-bar-grid span:nth-child(2) { background: #4a8df7; }
.top-bar-grid span:nth-child(3) { background: #5898f8; }
.top-bar-grid span:nth-child(4) { background: #60a5fa; }
.top-bar-grid span:nth-child(5) { background: #6db0fb; }
.top-bar-grid span:nth-child(6) { background: #7abbfb; }
.top-bar-grid span:nth-child(7) { background: #8bc5fc; }
.top-bar-grid span:nth-child(8) { background: #9bcffd; }
.top-bar-grid span:nth-child(9) { background: #aed8fe; }
.top-bar-name { font-size: 1rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.top-bar-actions { display: flex; align-items: center; gap: 0.75rem; }
.top-bar-login {
  display: inline-block; padding: 0.5rem 1.25rem;
  font-size: 0.85rem; font-weight: 600; color: var(--blue);
  background: transparent; border: 1.5px solid var(--blue);
  border-radius: 10px; text-decoration: none; transition: all 0.2s ease;
}
.top-bar-login:hover { background: rgba(59, 130, 246, 0.06); }
.top-bar-register {
  display: inline-block; padding: 0.5rem 1.25rem;
  font-size: 0.85rem; font-weight: 600; color: white;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none; border-radius: 10px; text-decoration: none;
  transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.top-bar-register:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3); }

/* Article hero */
.article-hero { padding: 9rem 1.5rem 3rem; background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 90%); }
.article-hero-inner { max-width: 720px; margin: 0 auto; }
.article-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #3b82f6; margin-bottom: 1rem; }
.article-h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2.25rem, 4.5vw, 3.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1.25rem; color: var(--text); }
.article-dek { font-size: 1.2rem; line-height: 1.55; color: var(--text-secondary); max-width: 620px; margin-bottom: 1.75rem; }
.article-byline { display: flex; align-items: center; gap: 0.75rem; font-size: 0.92rem; color: var(--text-muted); padding-top: 1.25rem; border-top: 1px solid var(--line); }
.byline-dot { width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; }

/* Article body */
.article-body { padding: 2rem 0 4rem; font-size: 1.12rem; line-height: 1.75; color: #25253b; }
.article-body p { margin-bottom: 1.5rem; }
.article-body h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.85rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 3rem 0 1.25rem; color: var(--text); }
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.85rem; color: var(--text); }
.article-body a { color: var(--blue-dark); text-decoration: underline; text-decoration-color: #93c5fd; text-underline-offset: 3px; text-decoration-thickness: 2px; transition: text-decoration-color 0.15s ease; }
.article-body a:hover { text-decoration-color: var(--blue-dark); }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 0.25rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.6rem; }
.article-body em { font-style: italic; }
.article-body strong { font-weight: 700; color: var(--text); }

/* Lesson examples -flowing prose, no card boxes.
   Each lesson is separated by a thin top border (except the first in a group).
   Matches the design language of the rest of the site (what-is-picrat, lesson-planning-with-picrat). */
.lesson-example {
  padding-top: 2rem;
  margin-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.lesson-example:first-of-type,
h2 + .lesson-example,
h2 + p + .lesson-example {
  border-top: none;
  padding-top: 0;
  margin-top: 0.75rem;
}
.article-body .lesson-example h3 { margin-top: 0; margin-bottom: 0.4rem; }

.lesson-meta {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-style: italic;
}

/* "Why this is X" - quiet blue left bar, italic, with bold inline prefix. */
.lesson-why {
  display: block;
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid #93c5fd;
  font-style: italic;
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
}
.lesson-why strong {
  font-style: normal;
  color: var(--text);
}

/* Tools -inline italic line, links underlined. No chips. */
.lesson-tools {
  margin-top: 1rem;
  font-size: 0.94rem;
  color: var(--text-muted);
}
.lesson-tools-label {
  font-style: italic;
  margin-right: 0.35rem;
}
.lesson-tools a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-decoration-color: #93c5fd;
  text-underline-offset: 3px;
}

/* Anti-example - straight amber left bar (no border-radius, no full border).
   Matches the blockquote pattern used elsewhere on the site. */
.anti-example {
  padding: 0.75rem 0 0.75rem 1.5rem;
  margin: 3rem 0;
  border-left: 4px solid var(--amber);
}
.anti-example .anti-flag {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.4rem;
}
.article-body .anti-example h3 { margin-top: 0; margin-bottom: 0.4rem; }
.anti-why {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.65;
}
.anti-why strong {
  font-style: normal;
  color: var(--text);
}

/* Catalogue grid (used on /examples) */
.cat-section { margin-top: 2.25rem; }
.cat-section h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.85rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }

/* Catalogue PICRAT cell grid: 3x3 in classic PICRAT order with axis labels.
   Mirrors the editorial picrat-figure component on what-is-picrat. */
.cat-picrat-figure {
  margin: 1rem 0 2.5rem;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border: 1px solid #dbeafe;
}
.cat-picrat-grid {
  display: grid;
  grid-template-columns: 24px auto repeat(3, 1fr);
  grid-template-rows: auto auto auto auto auto;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.cat-picrat-yaxis {
  grid-column: 1;
  grid-row: 1 / 4;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.5rem;
}
.cat-picrat-row-label {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.cat-picrat-row-label--creative { grid-row: 1; }
.cat-picrat-row-label--interactive { grid-row: 2; }
.cat-picrat-row-label--passive { grid-row: 3; }
.cat-picrat-col-header {
  grid-row: 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.55rem;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.cat-picrat-col-header--replace { grid-column: 3; }
.cat-picrat-col-header--amplify { grid-column: 4; }
.cat-picrat-col-header--transform { grid-column: 5; }
.cat-picrat-xaxis {
  grid-column: 3 / 6;
  grid-row: 5;
  text-align: center;
  padding-top: 0.65rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cat-picrat-cell {
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1e3a8a;
  border: 1px solid rgba(30, 64, 175, 0.06);
  padding: 0.5rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.cat-picrat-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12);
  border-color: rgba(30, 64, 175, 0.18);
}
.cat-picrat-cell-code {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
  line-height: 1;
}
.cat-picrat-cell-name {
  font-size: 0.7rem;
  color: #1e3a8a;
  opacity: 0.85;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  font-weight: 600;
}
.cat-picrat-cell-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e3a8a;
  opacity: 0.75;
}
.cat-picrat-cell--empty {
  background: #f8fafc;
  color: #94a3b8;
  pointer-events: none;
  cursor: default;
  border: 1px dashed #cbd5e1;
}
.cat-picrat-cell--empty .cat-picrat-cell-code,
.cat-picrat-cell--empty .cat-picrat-cell-name,
.cat-picrat-cell--empty .cat-picrat-cell-meta { color: #94a3b8; }

/* Cell colours match the editorial picrat-figure component */
.cat-picrat-cell--pr { grid-row: 3; grid-column: 3; background: #F2F7FC; }
.cat-picrat-cell--pa { grid-row: 3; grid-column: 4; background: #E3EEF9; }
.cat-picrat-cell--pt { grid-row: 3; grid-column: 5; background: #D5E6F6; }
.cat-picrat-cell--ir { grid-row: 2; grid-column: 3; background: #C7DDF3; }
.cat-picrat-cell--ia { grid-row: 2; grid-column: 4; background: #B8D4F0; }
.cat-picrat-cell--it { grid-row: 2; grid-column: 5; background: #AAC9EB; }
.cat-picrat-cell--cr { grid-row: 1; grid-column: 3; background: #9CC0E8; }
.cat-picrat-cell--ca { grid-row: 1; grid-column: 4; background: #8EB7E5; }
.cat-picrat-cell--ct { grid-row: 1; grid-column: 5; background: #80AEE2; }

@media (max-width: 600px) {
  .cat-picrat-figure { padding: 1.25rem 0.75rem 1rem; margin: 1rem 0 2rem; }
  .cat-picrat-grid { gap: 5px; }
  .cat-picrat-yaxis { font-size: 0.58rem; letter-spacing: 0.18em; }
  .cat-picrat-row-label { font-size: 0.82rem; padding-right: 0.45rem; }
  .cat-picrat-col-header { font-size: 0.82rem; padding-top: 0.35rem; }
  .cat-picrat-cell { padding: 0.35rem; border-radius: 10px; }
  .cat-picrat-cell-code { font-size: 1.35rem; }
  .cat-picrat-cell-name { font-size: 0.6rem; }
  .cat-picrat-cell-meta { font-size: 0.65rem; }
  .cat-picrat-xaxis { font-size: 0.58rem; letter-spacing: 0.18em; }
}
.cat-card { display: block; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: all 0.15s ease; background: #fff; }
.cat-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.cat-card-label { font-size: 0.7rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.35rem; }
.cat-card-title { font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.cat-card-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.cat-card-empty { padding: 1rem 1.15rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--text-muted); font-size: 0.9rem; }

/* Related links */
.related { background: #f8fafc; padding: 4rem 0; border-top: 1px solid var(--line); }
.related h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.75rem; font-weight: 600; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
.related-sub { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 900px; margin: 0 auto; }
.related-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; text-decoration: none; color: var(--text); transition: all 0.2s ease; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); border-color: #cbd5e1; }
.related-card-label { font-size: 0.72rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.related-card-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.35rem; }
.related-card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* CTA */
.cta-section { padding: 5rem 0; text-align: center; background: linear-gradient(180deg, #ffffff, #f0f7ff); }
.cta-title { font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.9rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; }
.cta-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto 2rem; line-height: 1.6; }
.cta-btn { display: inline-block; padding: 1rem 2.5rem; font-size: 1.05rem; font-weight: 600; color: white; background: linear-gradient(135deg, #3b82f6, #2563eb); border-radius: 14px; text-decoration: none; box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25); transition: all 0.2s ease; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35); }

/* Footer */
.footer { padding: 2rem 0; text-align: center; font-size: 0.82rem; color: var(--text-muted); border-top: 1px solid var(--line); }
.footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Empty state */
.empty-state { padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); border: 1px dashed var(--line); border-radius: 14px; margin: 2rem 0; }

/* Responsive */
@media (max-width: 768px) {
  .article-hero { padding: 7rem 1.25rem 2.5rem; }
  .article-body { font-size: 1.05rem; }
  .related-grid { grid-template-columns: 1fr; }
}
