/* ==========================================================================
   bók Marketing Website — Tactile Neumorphism Design System
   Source of Truth: styleguide.md & Figma Web Design Trend 8
   ========================================================================== */

:root {
  /* Core Architectural Color Tokens (Classic Novel Light default) */
  --bg-page: #f1eee9;
  --bg-surface: #ffffff;
  --bg-card: #f1eee9;
  --bg-sidebar: #e7e2da;
  --border: #d7d1c7;
  --border-subtle: rgba(215, 209, 199, 0.6);

  --txt-main: #3c3c3c;
  --txt-muted: #686868;
  --txt-subtle: #8a847d;

  --accent: #3c3c3c;
  --accent-hover: #cdc0b0;
  --accent-subtle: rgba(60, 60, 60, 0.08);
  --btn-pm-bg: #3c3c3c;
  --btn-pm-txt: #ffffff;

  --code-bg: #e7e2da;
  --code-txt: #3c3c3c;
  --green: #49a86b;

  /* Typography */
  --font-sans:
    'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', 'Georgia', 'Cambria', serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Tactile Neumorphic Dual Shadows (Plane Hierarchy) */
  --shadow-raised-sm: 2px 2px 6px rgba(60, 60, 60, 0.06), -2px -2px 6px rgba(255, 255, 255, 0.9);
  --shadow-raised: 5px 5px 14px rgba(60, 60, 60, 0.07), -5px -5px 14px rgba(255, 255, 255, 0.95);
  --shadow-raised-lg: 10px 10px 28px rgba(60, 60, 60, 0.1), -10px -10px 28px rgba(255, 255, 255, 1);
  --shadow-inset-sm:
    inset 1px 1px 3px rgba(60, 60, 60, 0.06), inset -1px -1px 3px rgba(255, 255, 255, 0.7);
  --shadow-inset:
    inset 2px 2px 6px rgba(60, 60, 60, 0.08), inset -2px -2px 6px rgba(255, 255, 255, 0.75);
}

[data-theme='dark'] {
  --bg-page: #2e241c;
  --bg-surface: #362920;
  --bg-card: #2e241c;
  --bg-sidebar: #362920;
  --border: #584537;
  --border-subtle: rgba(88, 69, 55, 0.6);

  --txt-main: #f0e9e4;
  --txt-muted: #b8a496;
  --txt-subtle: #8e7c6e;

  --accent: #ecdfd6;
  --accent-hover: #715946;
  --accent-subtle: rgba(236, 223, 214, 0.12);
  --btn-pm-bg: #ecdfd6;
  --btn-pm-txt: #2e241c;

  --code-bg: #362920;
  --code-txt: #ecdfd6;
  --green: #6bc98c;

  --shadow-raised-sm: 2px 2px 6px rgba(0, 0, 0, 0.4), -2px -2px 6px rgba(65, 52, 42, 0.35);
  --shadow-raised: 5px 5px 14px rgba(0, 0, 0, 0.45), -5px -5px 14px rgba(65, 52, 42, 0.4);
  --shadow-raised-lg: 10px 10px 28px rgba(0, 0, 0, 0.55), -10px -10px 28px rgba(65, 52, 42, 0.45);
  --shadow-inset-sm:
    inset 1px 1px 3px rgba(0, 0, 0, 0.4), inset -1px -1px 3px rgba(65, 52, 42, 0.25);
  --shadow-inset: inset 2px 2px 6px rgba(0, 0, 0, 0.45), inset -2px -2px 6px rgba(65, 52, 42, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg-page: #2e241c;
    --bg-surface: #362920;
    --bg-card: #2e241c;
    --bg-sidebar: #362920;
    --border: #584537;
    --border-subtle: rgba(88, 69, 55, 0.6);

    --txt-main: #f0e9e4;
    --txt-muted: #b8a496;
    --txt-subtle: #8e7c6e;

    --accent: #ecdfd6;
    --accent-hover: #715946;
    --accent-subtle: rgba(236, 223, 214, 0.12);
    --btn-pm-bg: #ecdfd6;
    --btn-pm-txt: #2e241c;

    --code-bg: #362920;
    --code-txt: #ecdfd6;
    --green: #6bc98c;

    --shadow-raised-sm: 2px 2px 6px rgba(0, 0, 0, 0.4), -2px -2px 6px rgba(65, 52, 42, 0.35);
    --shadow-raised: 5px 5px 14px rgba(0, 0, 0, 0.45), -5px -5px 14px rgba(65, 52, 42, 0.4);
    --shadow-raised-lg: 10px 10px 28px rgba(0, 0, 0, 0.55), -10px -10px 28px rgba(65, 52, 42, 0.45);
    --shadow-inset-sm:
      inset 1px 1px 3px rgba(0, 0, 0, 0.4), inset -1px -1px 3px rgba(65, 52, 42, 0.25);
    --shadow-inset:
      inset 2px 2px 6px rgba(0, 0, 0, 0.45), inset -2px -2px 6px rgba(65, 52, 42, 0.3);
  }
}

/* ==========================================================================
   Base Elements & Reset
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--txt-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  display: inline-block;
  height: 28px;
  width: 28px;
  flex-shrink: 0;
}

.brand-icon .bok-fg {
  fill: var(--txt-main);
  transition: fill 0.2s ease;
}

.brand-icon .bok-dot {
  fill: var(--accent-hover);
  transition: fill 0.2s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--txt-muted);
}

.nav-link:hover {
  color: var(--txt-main);
}

/* Tactile Theme Switcher */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
  color: var(--txt-main);
}

.theme-toggle-btn:hover {
  box-shadow: var(--shadow-inset-sm);
}

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

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txt-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--txt-main);
  max-width: 820px;
  margin: 0 auto 20px;
}

.hero-desc {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--txt-muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* Call to Action Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary {
  background-color: var(--btn-pm-bg);
  color: var(--btn-pm-txt);
  box-shadow: var(--shadow-raised-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised);
}

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

.btn-tactile {
  background-color: var(--bg-page);
  color: var(--txt-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
}

.btn-tactile:hover {
  box-shadow: var(--shadow-inset-sm);
}

/* Quick Install Terminal Box */
.install-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--txt-main);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.install-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.install-prompt {
  color: var(--txt-subtle);
  user-select: none;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--txt-muted);
}

.copy-btn:hover {
  color: var(--txt-main);
  box-shadow: var(--shadow-inset-sm);
}

.copy-btn.copied {
  background-color: var(--accent-subtle);
  color: var(--green);
}

/* ==========================================================================
   Visual Window Mockup (Plane 4 Floating Sanctuary)
   ========================================================================== */

.demo-switcher-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 36px;
  margin-bottom: -16px;
}

.demo-switcher {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset-sm);
  gap: 4px;
}

.demo-tab-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.demo-tab-btn:hover {
  color: var(--txt-main);
}

.demo-tab-btn:focus-visible {
  outline: 2px solid var(--txt-main);
  outline-offset: 2px;
}

.demo-tab-btn.active {
  background-color: var(--bg-page);
  color: var(--txt-main);
  box-shadow: var(--shadow-raised-sm);
  font-weight: 600;
}

.sanctuary-preview-wrapper {
  margin: 40px auto 100px;
  max-width: 960px;
}

.window-frame {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised-lg);
  overflow: hidden;
  text-align: left;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 16px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}

.window-titlebar-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.titlebar-view-switcher {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset-sm);
  gap: 2px;
}

.titlebar-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--txt-muted);
  cursor: pointer;
  transition: all 0.16s ease;
}

.titlebar-view-btn:hover {
  color: var(--txt-main);
}

.titlebar-view-btn.active {
  background-color: var(--bg-card);
  color: var(--txt-main);
  box-shadow: var(--shadow-raised-sm);
  font-weight: 600;
}

.titlebar-view-btn svg {
  color: var(--txt-muted);
}

.titlebar-view-btn.active svg {
  color: var(--accent);
}

.window-titlebar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-status {
  font-size: 11px;
  color: var(--txt-subtle);
}

.titlebar-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--txt-muted);
  cursor: pointer;
  box-shadow: var(--shadow-raised-sm);
  transition: all 0.18s ease;
}

.titlebar-ai-btn:hover {
  color: var(--txt-main);
}

.titlebar-ai-btn.active {
  background-color: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--txt-main);
  box-shadow: var(--shadow-inset-sm);
  font-weight: 600;
}

.titlebar-ai-btn svg {
  color: var(--accent);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border);
}

.window-workspace {
  display: none;
  grid-template-columns: 220px 1fr;
  min-height: 400px;
  background-color: var(--bg-page);
}

.window-workspace.active {
  display: grid;
}

.window-binder {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}

.binder-item {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--txt-muted);
}

.binder-item.active {
  background-color: var(--bg-page);
  color: var(--txt-main);
  box-shadow: var(--shadow-raised-sm);
  font-weight: 500;
}

.window-canvas {
  padding: 48px 40px;
  max-width: 640px;
  margin: 0 auto;
}

.prose-title {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 18px;
  color: var(--txt-main);
}

.prose-body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.85;
  color: var(--txt-main);
  margin-bottom: 18px;
}

.prose-mention {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--accent-subtle);
  color: var(--txt-main);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-inset-sm);
}

/* ==========================================================================
   Demo AI Scene / Citation Expander Card (Plane 3 Raised Element)
   ========================================================================== */

.demo-ai-card {
  margin-top: 28px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.demo-ai-card.hidden {
  display: none;
}

.demo-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-ai-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txt-main);
}

.demo-ai-title svg {
  color: var(--accent);
}

.demo-ai-shortcut {
  font-size: 10px;
  font-family: var(--font-mono);
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--txt-muted);
}

.demo-ai-badge {
  font-size: 11px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--txt-muted);
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset-sm);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.demo-ai-prompt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--txt-muted);
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset-sm);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.demo-ai-prompt-label {
  font-weight: 600;
  color: var(--txt-main);
  margin-right: 4px;
}

.demo-ai-body {
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--txt-main);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset-sm);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s ease;
}

.demo-ai-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.demo-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.demo-ai-btn-primary {
  background-color: var(--txt-main);
  color: var(--bg-page);
  border: 1px solid var(--txt-main);
  box-shadow: var(--shadow-raised-sm);
}

.demo-ai-btn-primary:hover {
  opacity: 0.9;
}

.demo-ai-btn-secondary {
  background-color: var(--bg-card);
  color: var(--txt-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
}

.demo-ai-btn-secondary:hover {
  background-color: var(--bg-sidebar);
}

.inserted-prose {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.binder-item-graph {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-top: 4px;
  border: 1px dashed var(--border);
  transition: all 0.15s ease;
}

.binder-item-graph:hover {
  background-color: var(--bg-page);
  color: var(--txt-main);
  border-color: var(--accent);
}

.binder-item-graph.active {
  background-color: var(--bg-page);
  color: var(--txt-main);
  border-style: solid;
  border-color: var(--accent);
  box-shadow: var(--shadow-raised-sm);
  font-weight: 500;
}

/* ==========================================================================
   Interactive Graph Views (Fiction Story Bible & Non-Fiction Citations)
   ========================================================================== */

.window-graph-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 480px;
  background-color: var(--bg-page);
  overflow: hidden;
  position: relative;
  animation: fadeIn 0.25s ease forwards;
}

.graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.graph-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.graph-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--txt-main);
  cursor: pointer;
  box-shadow: var(--shadow-raised-sm);
  transition: all 0.15s ease;
}

.graph-back-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--accent);
}

.graph-view-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-main);
}

.graph-filters {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset-sm);
  gap: 2px;
}

.graph-filter-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--txt-muted);
  cursor: pointer;
  transition: all 0.16s ease;
}

.graph-filter-btn:hover {
  color: var(--txt-main);
}

.graph-filter-btn.active {
  background-color: var(--bg-card);
  color: var(--txt-main);
  box-shadow: var(--shadow-raised-sm);
  font-weight: 600;
}

.graph-stage-wrapper {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background-color: var(--bg-page);
}

.graph-svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}

.graph-edge-group {
  transition: opacity 0.2s ease;
}

.graph-edge-line {
  stroke: var(--border);
  stroke-width: 1.5;
  fill: none;
  transition:
    stroke 0.2s ease,
    stroke-width 0.2s ease,
    opacity 0.2s ease;
}

.graph-edge-line.dashed {
  stroke-dasharray: 4 4;
}

.graph-edge-text {
  font-family: var(--font-sans);
  font-size: 9.5px;
  fill: var(--txt-muted);
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
  transition:
    fill 0.2s ease,
    opacity 0.2s ease;
}

.graph-node {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.2s ease;
}

.graph-node .node-box {
  fill: var(--bg-card);
  stroke: var(--border);
  stroke-width: 1.25;
  filter: drop-shadow(0 2px 5px rgba(60, 60, 60, 0.08));
  transition: all 0.2s ease;
}

.graph-node .node-title {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--txt-main);
  pointer-events: none;
}

.graph-node .node-sub {
  font-family: var(--font-sans);
  font-size: 9.5px;
  fill: var(--txt-muted);
  pointer-events: none;
}

.node-indicator.color-character {
  fill: #3b82f6;
}
.node-indicator.color-location {
  fill: #10b981;
}
.node-indicator.color-faction {
  fill: #8b5cf6;
}
.node-indicator.color-chapter {
  fill: #6366f1;
}
.node-indicator.color-source-book {
  fill: var(--accent);
}
.node-indicator.color-source-journal {
  fill: #8b5cf6;
}
.node-indicator.color-source-primary {
  fill: #10b981;
}

.graph-node:hover .node-box,
.graph-node.active .node-box {
  stroke: var(--accent);
  stroke-width: 2;
  fill: var(--bg-page);
}

.graph-node.dimmed {
  opacity: 0.25;
}

.graph-edge-group.highlighted .graph-edge-line {
  stroke: var(--accent);
  stroke-width: 2.2;
}

.graph-edge-group.highlighted .graph-edge-text {
  fill: var(--txt-main);
  font-weight: 600;
}

.graph-edge-group.dimmed {
  opacity: 0.12;
}

.graph-inspector {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 270px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  z-index: 5;
  pointer-events: none;
  transition: all 0.2s ease;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inspector-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-subtle);
  padding: 1px 6px;
  border-radius: 4px;
}

.inspector-hint {
  font-size: 10px;
  color: var(--txt-subtle);
}

.inspector-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-main);
  margin-top: 2px;
}

.inspector-desc {
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt-main);
}

.inspector-meta {
  font-size: 10.5px;
  color: var(--txt-muted);
  line-height: 1.4;
  border-top: 1px solid var(--border);
  padding-top: 4px;
  margin-top: 2px;
}

/* ==========================================================================
   Feature Showcases (Grid of Raised Planes)
   ========================================================================== */

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-subtle);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  color: var(--txt-main);
  line-height: 1.25;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 28px;
}

.feature-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--txt-main);
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 14.5px;
  color: var(--txt-muted);
  line-height: 1.6;
}

/* Card Mockup Visuals */
.card-preview-inset {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
  font-size: 13px;
  color: var(--txt-muted);
}

/* ==========================================================================
   Philosophy / Sanctuary Manifesto Table
   ========================================================================== */

.sanctuary-table-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
  margin-top: 40px;
}

.manifesto-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: baseline;
}

.manifesto-row:last-child {
  border-bottom: none;
}

.manifesto-header {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--txt-main);
}

.manifesto-desc {
  font-size: 14.5px;
  color: var(--txt-muted);
}

/* ==========================================================================
   Downloads & Package Managers
   ========================================================================== */

.download-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.download-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.platform-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--txt-main);
}

.download-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.download-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-raised-sm);
  font-size: 13px;
  font-weight: 500;
}

.download-link-btn:hover {
  box-shadow: var(--shadow-inset-sm);
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  background-color: var(--bg-sidebar);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--txt-muted);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a:hover {
  color: var(--txt-main);
}

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .window-workspace {
    grid-template-columns: 1fr;
  }

  .window-binder {
    display: none;
  }

  .manifesto-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px;
  }

  .nav-links {
    gap: 14px;
  }
}
