/*
 * PSD3 Shared Styling
 * Common theme and components for all PSD3 projects
 *
 * Design: Clean, minimal "data viz book" aesthetic
 * Inspired by Tufte's principles - content-focused, paper-like
 *
 * Usage: @import or <link> this file, then add project-local overrides
 */

/* ==========================================================================
   CSS Custom Properties (Theme)
   ========================================================================== */

:root {
  /* Brand colors */
  --psd3-gold: #b8860b;           /* Logo/accent color - dark goldenrod */
  --psd3-gold-light: #daa520;     /* Lighter gold for highlights */
  --psd3-gold-dark: #8b6508;      /* Darker gold for hover states */

  /* Background colors */
  --psd3-bg-page: #f8f8f8;        /* Main page background - off-white/cream */
  --psd3-bg-card: #ffffff;        /* Card backgrounds - pure white */
  --psd3-bg-subtle: #f0f0f0;      /* Subtle backgrounds */

  /* Text colors */
  --psd3-text-primary: #1a1a1a;   /* Near-black for headings */
  --psd3-text-body: #333333;      /* Dark gray for body text */
  --psd3-text-muted: #666666;     /* Muted text */
  --psd3-text-light: #888888;     /* Light text for captions */

  /* Border colors */
  --psd3-border: #e0e0e0;         /* Subtle borders */
  --psd3-border-light: #eeeeee;   /* Very subtle borders */

  /* Semantic colors */
  --psd3-link: #2563eb;           /* Link blue */
  --psd3-link-hover: #1d4ed8;     /* Darker link on hover */

  /* Tech badge colors (for Python demos) */
  --psd3-pure: #00a8cc;           /* PureScript/Halogen - teal */
  --psd3-python: #e91e8c;         /* Python - magenta/pink */

  /* Diagram/SVG accent colors (for architecture diagrams) */
  --psd3-accent: var(--psd3-gold);  /* Primary accent - alias to gold */
  --psd3-purple: #7b2ff7;           /* Purple for middleware layers */
  --psd3-pink: var(--psd3-python);  /* Pink - alias to python color */

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Borders */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.375rem;
  --radius-xl: 0.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
}

/* ==========================================================================
   Base Reset
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--psd3-bg-page);
  color: var(--psd3-text-body);
  min-height: 100vh;
}

a {
  color: var(--psd3-link);
  text-decoration: none;
}

a:hover {
  color: var(--psd3-link-hover);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--psd3-text-primary);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

code, pre {
  font-family: var(--font-mono);
}

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

ul, ol {
  list-style: none;
}

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

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app__main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Site Navigation
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: var(--psd3-bg-card);
  border-bottom: 1px solid var(--psd3-border-light);
}

/* Spacer for fixed nav */
.home-page,
.app {
  padding-top: 72px; /* Height of nav */
}

.site-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.site-nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav-logo-link {
  display: flex;
  align-items: center;
}

.site-nav-logo {
  height: 40px;
  width: auto;
}

.site-nav-logo--large {
  height: 48px;
}

.site-nav-logo--normal {
  height: 40px;
}

.site-nav-title-container {
  border-left: 1px solid var(--psd3-border);
  padding-left: var(--space-4);
}

.site-nav-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--psd3-text-primary);
}

.site-nav-center {
  display: flex;
  align-items: center;
}

.site-nav-quadrant {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.site-nav-quadrant-box {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid var(--psd3-border);
  border-radius: 2px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.site-nav-quadrant-box--inactive {
  background: var(--psd3-bg-card);
  border-color: #ccc;
}

.site-nav-quadrant-box--inactive:hover {
  background: var(--psd3-gold-light);
  border-color: var(--psd3-gold);
}

.site-nav-quadrant-box--active {
  background: var(--psd3-gold);
  border-color: var(--psd3-gold);
}

.site-nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav-links {
  display: flex;
  gap: var(--space-6);
}

.site-nav-link {
  color: var(--psd3-text-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-nav-link:hover {
  color: var(--psd3-text-primary);
  text-decoration: none;
}

.site-nav-prevnext {
  display: flex;
  gap: var(--space-2);
}

.site-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: var(--text-lg);
  color: var(--psd3-text-muted);
  background: var(--psd3-bg-subtle);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.site-nav-button:hover {
  background: var(--psd3-bg-card);
  color: var(--psd3-text-primary);
  border-color: var(--psd3-gold);
  text-decoration: none;
}

.site-nav-button--disabled {
  color: var(--psd3-border);
  cursor: not-allowed;
}

.site-nav-button--disabled:hover {
  background: var(--psd3-bg-subtle);
  border-color: var(--psd3-border);
  color: var(--psd3-border);
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.breadcrumb {
  background: var(--psd3-bg-page);
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--psd3-border-light);
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 1400px;
  margin: 0 auto;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--psd3-text-muted);
}

.breadcrumb__item::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--psd3-border);
}

.breadcrumb__item:last-child::after {
  content: none;
}

.breadcrumb__link {
  color: var(--psd3-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb__link:hover {
  color: var(--psd3-link-hover);
  text-decoration: underline;
}

.breadcrumb__item--current .breadcrumb__text {
  color: var(--psd3-text-body);
  font-weight: 500;
}

/* ==========================================================================
   Home Page
   ========================================================================== */

.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--psd3-bg-page);
}

.home-hero {
  padding: var(--space-16) var(--space-6);
  text-align: center;
  background: var(--psd3-bg-card);
  border-bottom: 1px solid var(--psd3-border-light);
}

.home-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.home-hero-title {
  font-size: var(--text-4xl);
  font-weight: 400;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-6);
  line-height: 1.2;
}

.home-hero-image {
  margin-top: var(--space-8);
}

.home-hero-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.home-hero-caption {
  margin-top: var(--space-4);
  color: var(--psd3-text-muted);
  font-size: var(--text-sm);
}

.home-hero-link {
  color: var(--psd3-link);
  font-weight: 500;
}

/* Architecture diagram */
.home-architecture {
  max-width: 900px;
  margin: var(--space-8) auto var(--space-12);
  padding: 0 var(--space-4);
}

.home-architecture__diagram {
  width: 100%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.home-architecture__diagram:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .home-architecture {
    margin: var(--space-6) auto var(--space-8);
    overflow-x: auto;
  }

  .home-architecture__diagram {
    min-width: 600px;
  }
}

.home-section-title {
  font-size: var(--text-3xl);
  font-weight: 400;
  text-align: center;
  margin-bottom: var(--space-8);
  color: var(--psd3-text-primary);
}

/* ==========================================================================
   Showcase Section (4 rectangular boxes, typography-forward, hover screenshot)
   ========================================================================== */

.home-showcases {
  padding: var(--space-12) var(--space-6);
  background: var(--psd3-bg-page);
}

.home-showcases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.home-showcase-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: var(--space-8);
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.home-showcase-box:hover {
  border-color: var(--psd3-gold);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Typography layer (hidden by default, shown on hover) */
.home-showcase-box__text {
  position: relative;
  z-index: 2;
  text-align: center;
  transition: opacity var(--transition-normal);
  opacity: 0;
}

.home-showcase-box:hover .home-showcase-box__text {
  opacity: 1;
}

.home-showcase-box__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.home-showcase-box__subtitle {
  font-size: var(--text-sm);
  color: var(--psd3-text-muted);
}

/* Screenshot layer (visible by default, hidden on hover) */
.home-showcase-box__screenshot {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.home-showcase-box:hover .home-showcase-box__screenshot {
  opacity: 0;
}

.home-showcase-box__screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Showcase badge */
.home-showcase-box__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  background: var(--psd3-gold);
  border: none;
  border-radius: var(--radius-sm);
  z-index: 3;
}

/* Backend-specific badge colors */
.home-showcase-box__badge--js { background: #f7df1e; color: #000; }
.home-showcase-box__badge--python { background: #3776ab; }
.home-showcase-box__badge--erlang { background: #a90533; }
.home-showcase-box__badge--lua { background: #000080; }
.home-showcase-box__badge--wasm { background: #654ff0; }
.home-showcase-box__badge--nodejs { background: #339933; }
.home-showcase-box__badge--purescript { background: #14161a; }

/* Take the Tour CTA box */
.home-tour-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: var(--space-8);
  background: var(--psd3-gold);
  border: 2px solid var(--psd3-gold);
  border-radius: var(--radius-md);
  text-decoration: none;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.home-tour-box:hover {
  background: var(--psd3-gold-dark);
  border-color: var(--psd3-gold-dark);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transform: translateY(-2px);
}

.home-tour-box__content {
  text-align: center;
}

.home-tour-box__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--psd3-bg-page);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-tour-box__subtitle {
  font-size: var(--text-sm);
  color: var(--psd3-bg-page);
  opacity: 0.9;
}

/* ==========================================================================
   Documentation Section (2x2 grid, square-ish, responsive)
   ========================================================================== */

.home-docs {
  padding: var(--space-12) var(--space-6);
  background: var(--psd3-bg-subtle);
}

.home-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .home-docs-grid {
    grid-template-columns: 1fr;
  }
}

/* Doc box - horizontal layout with LHS bookmark image */
.home-doc-box {
  display: flex;
  flex-direction: row;
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  text-decoration: none;
  aspect-ratio: 1;
}

.home-doc-box:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--psd3-gold);
  text-decoration: none;
}

.home-doc-box__image-container {
  width: 100px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--psd3-bg-subtle);
}

.home-doc-box__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-doc-box__content {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-doc-box-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-doc-box-description {
  color: var(--psd3-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Tutorial cards */
.home-tutorial-card {
  display: block;
  padding: var(--space-6);
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.home-tutorial-card:hover {
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.home-tutorial-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-2);
}

.home-tutorial-card-description {
  color: var(--psd3-text-muted);
  font-size: var(--text-sm);
}

/* Gallery sections */
.home-gallery-category {
  margin-bottom: var(--space-8);
}

.home-gallery-category-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--psd3-border);
}

.home-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}

.home-example-card {
  display: flex;
  flex-direction: column;
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.home-example-card:hover {
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.home-example-thumbnail {
  height: 150px;
  background: var(--psd3-bg-subtle);
  overflow: hidden;
}

.home-example-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-example-content {
  padding: var(--space-4);
}

.home-example-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-1);
}

.home-example-description {
  font-size: var(--text-xs);
  color: var(--psd3-text-muted);
}

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

.site-footer {
  padding: var(--space-8) var(--space-6);
  background: var(--psd3-bg-card);
  border-top: 1px solid var(--psd3-border-light);
}

.site-footer__rule {
  border: none;
  border-top: 1px solid var(--psd3-border);
  margin-bottom: var(--space-6);
}

.site-footer__content {
  text-align: center;
}

.site-footer__link {
  color: var(--psd3-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--psd3-text-body);
}

/* ==========================================================================
   Layout Components (psd3-* utility classes)
   ========================================================================== */

.psd3-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.psd3-section {
  padding: var(--space-12) var(--space-6);
}

.psd3-flex {
  display: flex;
}

.psd3-flex-col {
  flex-direction: column;
}

.psd3-flex-center {
  align-items: center;
  justify-content: center;
}

.psd3-flex-between {
  justify-content: space-between;
}

.psd3-flex-wrap {
  flex-wrap: wrap;
}

.psd3-gap-2 { gap: var(--space-2); }
.psd3-gap-4 { gap: var(--space-4); }
.psd3-gap-6 { gap: var(--space-6); }
.psd3-gap-8 { gap: var(--space-8); }

/* ==========================================================================
   Card Components
   ========================================================================== */

.psd3-card {
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.psd3-card:hover {
  box-shadow: var(--shadow-card);
}

.psd3-card-body {
  padding: var(--space-6);
}

.psd3-card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--psd3-border);
  background: var(--psd3-bg-subtle);
}

/* ==========================================================================
   Badge Components (for tech tags)
   ========================================================================== */

.psd3-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
}

.psd3-badge-pure {
  background: rgba(0, 168, 204, 0.1);
  color: var(--psd3-pure);
  border: 1px solid rgba(0, 168, 204, 0.3);
}

.psd3-badge-python {
  background: rgba(233, 30, 140, 0.1);
  color: var(--psd3-python);
  border: 1px solid rgba(233, 30, 140, 0.3);
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.psd3-btn {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.psd3-btn:hover {
  text-decoration: none;
}

.psd3-btn-primary {
  background: var(--psd3-gold);
  color: white;
  border-color: var(--psd3-gold);
}

.psd3-btn-primary:hover {
  background: var(--psd3-gold-light);
  border-color: var(--psd3-gold-light);
}

.psd3-btn-secondary {
  background: var(--psd3-bg-card);
  color: var(--psd3-text-body);
  border-color: var(--psd3-border);
}

.psd3-btn-secondary:hover {
  background: var(--psd3-bg-subtle);
  border-color: var(--psd3-text-muted);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

.psd3-text-center { text-align: center; }
.psd3-text-muted { color: var(--psd3-text-muted); }
.psd3-text-accent { color: var(--psd3-gold); }
.psd3-text-sm { font-size: var(--text-sm); }
.psd3-text-lg { font-size: var(--text-lg); }
.psd3-text-xl { font-size: var(--text-xl); }
.psd3-text-2xl { font-size: var(--text-2xl); }
.psd3-text-3xl { font-size: var(--text-3xl); }
.psd3-text-5xl { font-size: var(--text-5xl); }
.psd3-font-bold { font-weight: 700; }

/* ==========================================================================
   Spacing Utilities
   ========================================================================== */

.psd3-mb-2 { margin-bottom: var(--space-2); }
.psd3-mb-4 { margin-bottom: var(--space-4); }
.psd3-mb-6 { margin-bottom: var(--space-6); }
.psd3-mb-8 { margin-bottom: var(--space-8); }
.psd3-p-4 { padding: var(--space-4); }
.psd3-p-6 { padding: var(--space-6); }
.psd3-py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.psd3-py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* ==========================================================================
   Special Effects
   ========================================================================== */

.psd3-gradient-text {
  background: linear-gradient(90deg, var(--psd3-gold), var(--psd3-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.psd3-glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--psd3-border);
}

.psd3-border-b {
  border-bottom: 1px solid var(--psd3-border);
}

.psd3-border-t {
  border-top: 1px solid var(--psd3-border);
}

/* ==========================================================================
   SVG/Diagram Styling (for architecture diagrams etc)
   ========================================================================== */

.psd3-diagram-box {
  fill: var(--psd3-bg-subtle);
  stroke: var(--psd3-border);
  stroke-width: 1;
}

.psd3-diagram-box-accent {
  fill: rgba(184, 134, 11, 0.1);
  stroke: var(--psd3-gold);
}

.psd3-diagram-box-purple {
  fill: rgba(123, 47, 247, 0.1);
  stroke: #7b2ff7;
}

.psd3-diagram-box-pink {
  fill: rgba(233, 30, 140, 0.1);
  stroke: var(--psd3-python);
}

.psd3-diagram-label {
  fill: var(--psd3-text-primary);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}

.psd3-diagram-sublabel {
  fill: var(--psd3-text-muted);
  font-size: 11px;
  text-anchor: middle;
}

.psd3-diagram-arrow {
  stroke: var(--psd3-gold);
  stroke-width: 2;
  fill: none;
}

/* ==========================================================================
   404 Not Found
   ========================================================================== */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--space-8);
}

.not-found h1 {
  font-size: var(--text-4xl);
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-4);
}

.not-found p {
  color: var(--psd3-text-muted);
  margin-bottom: var(--space-6);
}

/* ==========================================================================
   Code Blocks
   ========================================================================== */

pre {
  background: var(--psd3-bg-subtle);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.6;
}

code {
  background: var(--psd3-bg-subtle);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

input, select, textarea {
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  color: var(--psd3-text-body);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--psd3-gold);
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15);
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .site-nav-content {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .site-nav-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .site-nav-right {
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
  }

  .home-hero-title {
    font-size: var(--text-2xl);
  }

  .home-docs-grid {
    grid-template-columns: 1fr;
  }

  .home-doc-box__image-container {
    width: 80px;
  }
}

/* ==========================================================================
   Scrollytelling Tour
   ========================================================================== */

.tour-scrolly {
  min-height: 100vh;
  background: var(--psd3-bg-page);
}

.scrolly-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 80px);
}

/* Fixed visualization panel */
.scrolly-fixed-panel {
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--psd3-bg-card);
  border-right: 1px solid var(--psd3-border);
  padding: var(--space-6);
}

.scrolly-viz {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4 / 3;
  background: white;
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scrolly-viz svg {
  width: 100%;
  height: 100%;
}

/* Axis typography - lighter weight */
.scrolly-viz .tick text,
.scrolly-viz .axis text {
  font-size: 10px;
  font-weight: 300;
  fill: #666;
}

.scrolly-viz .tick line,
.scrolly-viz .domain {
  stroke: #999;
  stroke-width: 1;
}

.scrolly-viz .plot-title,
.scrolly-viz text.title {
  font-size: 12px;
  font-weight: 500;
}

/* Anscombe quartet - extra light typography for small multiples */
.scrolly-viz .anscombe-plot .tick text {
  font-size: 8px;
  font-weight: 200;
  fill: #888;
}

.scrolly-viz .anscombe-plot .tick line,
.scrolly-viz .anscombe-plot .domain {
  stroke: #bbb;
  stroke-width: 0.5;
}

.scrolly-viz-placeholder {
  color: var(--psd3-text-muted);
  font-size: var(--text-sm);
}

/* Multi-line chart hover interaction */
.multi-line-chart .line {
  transition: stroke 0.15s ease, stroke-opacity 0.15s ease;
  cursor: pointer;
}

.multi-line-chart:hover .line {
  stroke: #ddd;
  stroke-opacity: 0.5;
}

.multi-line-chart .line:hover {
  stroke: #333;
  stroke-opacity: 1;
  stroke-width: 1.5;
}

/* PSD3 Tooltip */
.psd3-tooltip {
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 250px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.psd3-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

/* Step indicator dots */
.scrolly-step-indicator {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.scrolly-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--psd3-border);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.scrolly-step-dot:hover {
  border-color: var(--psd3-gold);
}

.scrolly-step-dot.active {
  background: var(--psd3-gold);
  border-color: var(--psd3-gold);
}

/* Scrolling content panel */
.scrolly-scroll-panel {
  padding: var(--space-8);
  height: calc(100vh - 80px);  /* Constrain to viewport so it scrolls internally */
  overflow-y: auto;
}

/* Individual steps */
.scrolly-step {
  min-height: 80vh;
  padding: var(--space-8) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--psd3-border-light);
}

.scrolly-step:last-child {
  border-bottom: none;
  margin-bottom: 40vh; /* Extra scroll space at end */
}

.scrolly-step-number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--psd3-gold);
  opacity: 0.3;
  margin-bottom: var(--space-2);
}

.scrolly-step-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.3;
}

.scrolly-step-narrative {
  margin-bottom: var(--space-6);
}

.scrolly-step-narrative p {
  color: var(--psd3-text-body);
  line-height: 1.7;
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
}

/* Code display */
.scrolly-step-code {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.scrolly-step-code .code-line {
  padding: 2px 0;
  transition: background 0.2s ease;
}

.scrolly-step-code .code-line.highlight {
  background: rgba(184, 134, 11, 0.2);
  border-left: 3px solid var(--psd3-gold);
  padding-left: var(--space-2);
  margin-left: -var(--space-2);
}

/* Insight callout */
.scrolly-step-insight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid var(--psd3-gold);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-weight: 500;
  color: var(--psd3-text-primary);
  font-size: var(--text-sm);
}

/* Mobile: stack panels */
@media (max-width: 900px) {
  .scrolly-container {
    grid-template-columns: 1fr;
  }

  .scrolly-fixed-panel {
    position: relative;
    top: 0;
    height: auto;
    min-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--psd3-border);
  }

  .scrolly-step {
    min-height: auto;
    padding: var(--space-6) 0;
  }
}

/* ==========================================================================
   Motion Scrollytelling Tour
   ========================================================================== */

.motion-tour-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 80px);
}

/* Fixed visualization panel */
.motion-viz-panel {
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  border-right: 1px solid var(--psd3-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--psd3-bg-secondary);
  padding: var(--space-6);
}

.motion-viz-content {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--psd3-bg-page);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.motion-viz-content svg {
  width: 100%;
  height: 100%;
}

/* Scrolling narrative panel */
.motion-scroll-panel {
  padding: var(--space-8);
  height: calc(100vh - 80px);
  overflow-y: auto;
}

/* Individual steps */
.motion-step {
  min-height: 80vh;
  padding: var(--space-8) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--psd3-border-light);
}

.motion-step:last-child {
  border-bottom: none;
  margin-bottom: 40vh; /* Extra scroll space at end */
}

.motion-step-content h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.3;
}

.motion-step-narrative {
  margin-bottom: var(--space-6);
}

.motion-step-narrative p {
  color: var(--psd3-text-body);
  line-height: 1.7;
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
}

/* Motion scrolly visualization styles */
.motion-scrolly-viz circle {
  transition: opacity 0.3s ease;
}

/* Mobile: stack panels */
@media (max-width: 900px) {
  .motion-tour-container {
    grid-template-columns: 1fr;
  }

  .motion-viz-panel {
    position: relative;
    top: 0;
    height: auto;
    min-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--psd3-border);
  }

  .motion-step {
    min-height: auto;
    padding: var(--space-6) 0;
  }
}

/* ==========================================================================
   Tour Index - Card Grid
   ========================================================================== */

.howto-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.howto-card {
  display: block;
  background: var(--psd3-bg-card);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.howto-card:hover {
  border-color: var(--psd3-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.howto-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-2);
}

.howto-card__description {
  font-size: var(--text-sm);
  color: var(--psd3-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Featured card variant */
.howto-card--featured {
  position: relative;
  border-color: var(--psd3-gold-light);
  background: linear-gradient(135deg, var(--psd3-bg-card) 0%, #fffcf5 100%);
}

.howto-card--featured:hover {
  border-color: var(--psd3-gold);
}

.howto-card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--psd3-gold-dark);
  background: rgba(184, 134, 11, 0.1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

/* Section intro text */
.docs-section-intro {
  color: var(--psd3-text-muted);
  font-size: var(--text-base);
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Force Playground Controls
   ========================================================================== */

.floating-panel {
  position: absolute;
  background: var(--psd3-bg-card, rgba(30, 30, 30, 0.95));
  border: 1px solid var(--psd3-border, #404040);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-4, 1rem);
  z-index: 1000;
  max-width: 280px;
  backdrop-filter: blur(8px);
}

.floating-panel--top-right {
  top: 1rem;
  right: 1rem;
}

.floating-panel--medium {
  min-width: 220px;
}

.floating-panel__title {
  font-size: var(--text-lg, 1.1rem);
  font-weight: 600;
  color: var(--psd3-text-primary, #f0f0f0);
  margin: 0 0 var(--space-3, 0.75rem) 0;
  border-bottom: 1px solid var(--psd3-border, #404040);
  padding-bottom: var(--space-2, 0.5rem);
}

.control-group {
  margin-bottom: var(--space-3, 0.75rem);
}

.control-group h4 {
  font-size: var(--text-sm, 0.85rem);
  font-weight: 500;
  color: var(--psd3-text-muted, #a0a0a0);
  margin: 0 0 var(--space-2, 0.5rem) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-info-box {
  background: var(--psd3-bg-subtle, rgba(255, 255, 255, 0.05));
  border-radius: var(--radius-sm, 4px);
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  font-size: var(--text-sm, 0.85rem);
  color: var(--psd3-text-muted, #a0a0a0);
}

.panel-info-box p {
  margin: 0;
}

.panel-info-box p + p {
  margin-top: var(--space-1, 0.25rem);
}

.control-button {
  display: inline-block;
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  font-size: var(--text-sm, 0.85rem);
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--psd3-border, #404040);
  background: var(--psd3-bg-subtle, rgba(255, 255, 255, 0.05));
  color: var(--psd3-text-primary, #f0f0f0);
  cursor: pointer;
  transition: all 0.15s ease;
}

.control-button:hover {
  background: var(--psd3-bg-card, rgba(50, 50, 50, 0.95));
  border-color: var(--psd3-gold, #b8860b);
}

.control-button--secondary {
  background: transparent;
}

.control-button--link {
  background: transparent;
  border: none;
  color: var(--psd3-gold, #b8860b);
  padding: var(--space-1, 0.25rem) 0;
  text-decoration: underline;
}

.control-button--link:hover {
  color: var(--psd3-gold-light, #daa520);
}

/* Category filter buttons */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
}

.category-button {
  padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  border: 2px solid;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-button--active {
  color: white;
}

.category-button--inactive {
  background: transparent;
  color: var(--psd3-text-muted, #a0a0a0);
  opacity: 0.7;
}

.category-button--inactive:hover {
  opacity: 1;
}

/* Force toggle buttons */
.force-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
}

.force-toggle {
  padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--psd3-border, #404040);
  cursor: pointer;
  transition: all 0.15s ease;
}

.force-toggle--active {
  background: var(--psd3-gold, #b8860b);
  color: white;
  border-color: var(--psd3-gold, #b8860b);
}

.force-toggle--inactive {
  background: transparent;
  color: var(--psd3-text-muted, #a0a0a0);
}

.force-toggle--inactive:hover {
  border-color: var(--psd3-gold, #b8860b);
  color: var(--psd3-text-primary, #f0f0f0);
}

/* ==========================================================================
   Lua Edge Showcase Page
   ========================================================================== */

.showcase-lua-edge {
  background: var(--psd3-bg-page);
  min-height: 100vh;
}

.showcase-lua-edge .docs-section {
  padding: var(--space-8) var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

.showcase-lua-edge .docs-section-title {
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--psd3-text-primary);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--psd3-border);
  padding-bottom: var(--space-3);
}

.showcase-lua-edge .docs-content {
  color: var(--psd3-text-secondary);
  line-height: 1.7;
}

.showcase-lua-edge .docs-content p {
  margin-bottom: var(--space-4);
}

.showcase-lua-edge .docs-content ul {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.showcase-lua-edge .docs-content li {
  margin-bottom: var(--space-2);
}

.showcase-lua-edge .docs-content code {
  background: var(--psd3-bg-elevated);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--psd3-gold);
}

/* Code blocks */
.showcase-lua-edge .code-block {
  background: var(--psd3-bg-elevated);
  border: 1px solid var(--psd3-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--psd3-text-primary);
  margin: var(--space-4) 0;
}

.showcase-lua-edge .code-block.ascii-diagram {
  background: #0d1117;
  color: #58a6ff;
  font-size: var(--text-xs);
  line-height: 1.4;
}

/* Table styles */
.showcase-lua-edge .docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.showcase-lua-edge .docs-table th,
.showcase-lua-edge .docs-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--psd3-border);
}

.showcase-lua-edge .docs-table th {
  background: var(--psd3-bg-elevated);
  color: var(--psd3-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

.showcase-lua-edge .docs-table td code {
  background: transparent;
  color: var(--psd3-gold);
}

/* Technology badges in table */
.showcase-lua-edge .badge-js { color: #f7df1e; }
.showcase-lua-edge .badge-python { color: #3776ab; }
.showcase-lua-edge .badge-erlang { color: #a90533; }
.showcase-lua-edge .badge-nodejs { color: #339933; }
.showcase-lua-edge .badge-wasm { color: #654ff0; }

/* Diagram container */
.showcase-lua-edge .lua-edge-diagram {
  margin: var(--space-6) 0;
}

/* ==========================================================================
   POLYGLOT Acrostic Hero - Revolutionary Poster Layout
   ========================================================================== */

/* No nav on home page */
.home-page--no-nav {
  padding-top: var(--space-4);
}

/* Poster-style hero: two columns */
.home-hero--poster {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
  gap: var(--space-4);
  min-height: 50vh;
  padding: var(--space-4);
}

.home-hero__acrostic-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.home-hero__image-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero__image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: var(--psd3-bg-elevated);
  border: 2px dashed var(--psd3-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--psd3-text-muted);
  font-size: var(--text-xl);
}

/* Showcases span full width below */
.home-hero--poster .home-showcases-grid {
  grid-column: 1 / -1;
}

.home-acrostic {
  font-family: 'Futura', 'Futura PT', 'Century Gothic', 'Arial', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  transform: rotate(-12deg);
  transform-origin: top left;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: var(--space-8);
  margin-left: var(--space-4);
}

/* Acrostic is a 3-column CSS grid */
.home-acrostic {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  white-space: nowrap;
}

/* Word wrapper uses display:contents so children participate in parent grid */
.acrostic-word {
  display: contents;
}

/* Left-hand side: right-aligned to kiss the letter */
.acrostic-lhs {
  justify-self: end;
  text-align: right;
}

/* Center letter column: the POLYGLOT spine with border */
.acrostic-letter {
  text-align: center;
  justify-self: center;
  padding: 0 0.15em;
  background: rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(26, 26, 26, 0.12);
  border-right: 1px solid rgba(26, 26, 26, 0.12);
  /* Styling */
  color: #c23b22;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acrostic-letter:hover {
  color: #1e5aa8;  /* Byrne blue on hover */
}

/* First and last letters get top/bottom borders */
.acrostic-word:first-child .acrostic-letter {
  border-top: 1px solid rgba(26, 26, 26, 0.12);
  padding-top: 0.1em;
}

.acrostic-word:last-child .acrostic-letter {
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  padding-bottom: 0.1em;
}

/* Right-hand side: left-aligned from the letter */
.acrostic-rhs {
  justify-self: start;
  text-align: left;
}

/* Primary words: purescript, graphical, exploration - Byrne red */
.acrostic-word--primary {
  color: #c23b22;
}

/* Backend words: node, erlang, python, lua, rust - black */
.acrostic-word--backend {
  color: #1a1a1a;
}


/* When hovering acrostic letter, highlight corresponding showcase box */
.acrostic-letter:hover ~ .home-showcases-grid .home-showcase-box[data-backend],
.acrostic-letter[data-backend="js"]:hover ~ .home-showcases-grid .home-showcase-box__badge--js,
.acrostic-letter[data-backend="python"]:hover ~ .home-showcases-grid .home-showcase-box__badge--python,
.acrostic-letter[data-backend="erlang"]:hover ~ .home-showcases-grid .home-showcase-box__badge--erlang,
.acrostic-letter[data-backend="lua"]:hover ~ .home-showcases-grid .home-showcase-box__badge--lua,
.acrostic-letter[data-backend="wasm"]:hover ~ .home-showcases-grid .home-showcase-box__badge--wasm,
.acrostic-letter[data-backend="nodejs"]:hover ~ .home-showcases-grid .home-showcase-box__badge--nodejs {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(184, 134, 11, 0.3);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .home-acrostic {
    font-size: 0.9rem;
    padding: var(--space-4);
  }
}

/* =============================================================================
   Concept Graph (Hero Image)
   ============================================================================= */

.concept-graph {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

/* Links */
.concept-graph__link {
  stroke: rgba(0, 0, 0, 0.15);
  stroke-width: 1;
}

/* Node circles by category */
.concept-graph__circle {
  fill: #666;
  stroke: #fff;
  stroke-width: 1.5;
  cursor: grab;
  transition: fill 0.2s ease;
}

.concept-graph__circle:active {
  cursor: grabbing;
}

/* Category colors */
/* Byrne's Euclid palette - primary colors */
.concept-graph__node--core .concept-graph__circle {
  fill: #c23b22;  /* Byrne red - PureScript */
}

.concept-graph__node--backend .concept-graph__circle {
  fill: #1a1a1a;  /* Black - compile targets */
}

.concept-graph__node--runtime .concept-graph__circle {
  fill: #1e5aa8;  /* Byrne blue - runtimes */
}

.concept-graph__node--concept .concept-graph__circle {
  fill: #f4c430;  /* Byrne yellow - concepts */
}

.concept-graph__node--library .concept-graph__circle {
  fill: #c23b22;  /* Byrne red - PSD3 libraries */
}

.concept-graph__node--ext-library .concept-graph__circle {
  fill: #1e5aa8;  /* Byrne blue - external libraries */
}

.concept-graph__node--showcase .concept-graph__circle {
  fill: #f4c430;  /* Byrne yellow - showcases */
}

.concept-graph__node--domain .concept-graph__circle {
  fill: #1a1a1a;  /* Black - domains */
}

/* Node labels - rotated to match acrostic, right-aligned under node */
.concept-graph__label {
  font-family: 'Futura', 'Futura PT', 'Century Gothic', 'Arial', sans-serif;
  font-size: 7px;
  fill: #1a1a1a;
  pointer-events: none;
  user-select: none;
  /* Rotation done via SVG transform attribute */
}

.concept-graph__node--core .concept-graph__label {
  font-size: 9px;
  font-weight: bold;
  fill: #c23b22;
}

/* Hover states */
.concept-graph__node:hover .concept-graph__circle {
  filter: brightness(1.2);
}

/* Updated concept graph styles for tighter layout */

/* Smaller label font */
.concept-graph__label {
  font-size: 6px;
}

.concept-graph__node--core .concept-graph__label {
  font-size: 8px;
}

/* Link type colors */
/* Link types - Byrne palette, subtle */
.concept-graph__link--builds-to {
  stroke: rgba(26, 26, 26, 0.4);  /* Black - structural */
  stroke-width: 1.5;
}

.concept-graph__link--runs-on {
  stroke: rgba(30, 90, 168, 0.4);  /* Blue - runtime */
  stroke-width: 1.5;
}

.concept-graph__link--enables {
  stroke: rgba(244, 196, 48, 0.3);  /* Yellow - conceptual (fainter) */
  stroke-width: 1;
}

.concept-graph__link--uses-library {
  stroke: rgba(194, 59, 34, 0.4);  /* Red - library */
  stroke-width: 1.5;
}
