:root {
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --bg-base: #0a0d13;
  --bg-surface: #111622;
  --bg-surface-raised: #182030;
  --bg-surface-hover: #1f2a3f;
  --border-subtle: #222d42;
  --border-focus: #52e096;
  
  --text-primary: #f2f5fa;
  --text-secondary: #9aa7bc;
  --text-muted: #5e6c82;
  
  --accent-green: #52e096;
  --accent-green-dim: rgba(82, 224, 150, 0.12);
  --accent-blue: #60a5fa;
  --accent-blue-dim: rgba(96, 165, 250, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.12);
  --accent-purple: #c084fc;
  --accent-purple-dim: rgba(192, 132, 252, 0.12);
  --accent-red: #f87171;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --max-width: 1160px;
}

[data-theme="light"] {
  --bg-base: #f7f9fb;
  --bg-surface: #ffffff;
  --bg-surface-raised: #eef2f6;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: #dbe2ea;
  --border-focus: #059669;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-green: #059669;
  --accent-green-dim: rgba(5, 150, 105, 0.1);
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37, 99, 235, 0.1);
  --accent-amber: #d97706;
  --accent-amber-dim: rgba(217, 119, 6, 0.1);
  --accent-purple: #7c3aed;
  --accent-purple-dim: rgba(124, 58, 237, 0.1);
  --accent-red: #dc2626;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.08);
}

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

html {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--bg-base);
  color: var(--text-primary);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 13, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .navbar {
  background-color: rgba(247, 249, 251, 0.88);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}

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

.nav-links {
  display: none;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  white-space: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  white-space: nowrap;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background-color: var(--bg-surface-raised);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-sm:hover {
  background-color: var(--bg-surface-raised);
  border-color: var(--accent-green);
  text-decoration: none;
}

/* UI Showcase Gallery */
.gallery-section {
  padding: 3.5rem 0 2rem;
}

.gallery-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.35rem;
  margin-bottom: 1.25rem;
}

.gallery-tabs::-webkit-scrollbar {
  display: none;
}

.gallery-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.gallery-tab.active {
  background: var(--bg-surface-raised);
  border-color: var(--accent-green);
  color: var(--accent-green);
  font-weight: 600;
}

.gallery-frame {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  max-width: 960px;
  margin: 0 auto;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-caption {
  padding: 0.9rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-screenshot {
  width: 100%;
  max-width: 860px;
  margin: 1.5rem 0 2rem;
  display: block;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Hero Section */
.hero-section {
  padding: 2.5rem 0 2rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* Install Box */
.install-box {
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 3.5rem;
}

.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-raised);
  padding: 0.25rem 0.5rem 0;
  gap: 0.25rem;
  overflow-x: auto;
}

.install-tab {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.install-tab:hover {
  color: var(--text-primary);
}

.install-tab.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
  font-weight: 600;
}

.install-command-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.85rem 1rem;
  background-color: var(--bg-surface);
  gap: 0.75rem;
}

.install-code {
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: nowrap;
  text-align: left;
}

.install-prompt-symbol {
  color: var(--accent-green);
  user-select: none;
  margin-right: 0.4rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-green);
}

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

/* Feature Sections */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3.5rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Grid Layouts - Mobile First */
.grid-3,
.grid-2,
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.grid-3 > *,
.grid-2 > *,
.grid-4 > * {
  min-width: 0;
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  min-width: 0;
}

.card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.icon-green { background-color: var(--accent-green-dim); color: var(--accent-green); }
.icon-blue { background-color: var(--accent-blue-dim); color: var(--accent-blue); }
.icon-purple { background-color: var(--accent-purple-dim); color: var(--accent-purple); }
.icon-amber { background-color: var(--accent-amber-dim); color: var(--accent-amber); }

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.8rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tool Badges */
.tools-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tool-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Page Header Component (Ecosystem, etc.) */
.page-content {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 760px;
  line-height: 1.6;
}

/* Package Catalog Specifics - Mobile First */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.search-input {
  width: 100%;
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-dim);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

.filter-group::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--accent-green-dim);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.select-control {
  width: 100%;
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.select-control:focus {
  outline: none;
  border-color: var(--accent-green);
}

/* Extension Cards */
.extension-card,
.plugin-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.extension-card:hover,
.plugin-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-sm);
}

.extension-header,
.plugin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.extension-title,
.plugin-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.extension-tag,
.plugin-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  font-weight: 600;
}

.tag-extension { background-color: var(--accent-blue-dim); color: var(--accent-blue); border: 1px solid rgba(96, 165, 250, 0.3); }
.tag-mcp { background-color: var(--accent-purple-dim); color: var(--accent-purple); border: 1px solid rgba(192, 132, 252, 0.3); }
.tag-core { background-color: var(--accent-green-dim); color: var(--accent-green); border: 1px solid rgba(82, 224, 150, 0.3); }

.extension-desc,
.plugin-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  flex-grow: 1;
}

.extension-meta,
.plugin-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.extension-meta-item,
.plugin-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.install-bar,
.plugin-install-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  margin-top: 0.4rem;
}

.install-cmd,
.plugin-install-cmd {
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extension-links,
.plugin-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

/* How to publish card */
.publish-banner {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-raised) 100%);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.publish-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.step-card {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.step-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.35rem;
}

/* pirho Callout & Equation - Mobile First */
.pirho-callout {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-surface) 50%, rgba(248, 113, 113, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.pirho-callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-amber), var(--accent-red), transparent);
}

.pirho-content {
  flex: 1;
  max-width: 640px;
}

.pirho-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pirho-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, var(--text-primary) 35%, var(--accent-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pirho-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.pirho-desc strong {
  color: var(--text-primary);
}

.pirho-desc a {
  color: var(--accent-amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pirho-desc a:hover {
  color: var(--accent-red);
}

.pirho-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.pirho-tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pirho-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pirho-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.eq-card {
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.6rem;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.eq-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-amber);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.eq-card-pi .eq-symbol {
  color: var(--accent-blue);
}

.eq-card-rho .eq-symbol {
  color: var(--accent-green);
}

.eq-card.eq-result {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, var(--bg-surface-raised) 0%, rgba(245, 158, 11, 0.08) 100%);
}

.eq-symbol {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.eq-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.eq-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.eq-operator {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 3rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-desc {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-weight: 700;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Documentation styling - Mobile First */
.docs-container {
  max-width: 1380px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.docs-layout {
  display: block;
  padding: 1.5rem 0 4rem;
}

.docs-content {
  min-width: 0;
  max-width: 900px;
}

.docs-sidebar {
  display: none;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
  padding-right: 0.6rem;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

/* Sidebar quick filter search */
.docs-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.docs-search-input {
  width: 100%;
  padding: 0.5rem 0.65rem 0.5rem 2.1rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.15s ease;
}

.docs-search-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-dim);
}

.docs-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.docs-nav-group {
  margin-bottom: 1.6rem;
}

.docs-nav-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.55rem;
  padding-left: 0.4rem;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-nav-item a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none !important;
}

.docs-nav-item a:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-raised);
}

.docs-nav-item.active a {
  color: var(--accent-green);
  background-color: var(--accent-green-dim);
  border-left-color: var(--accent-green);
  font-weight: 600;
}

/* Headings with smooth anchor offset and permalink icons */
h1[id], h2[id], h3[id], section[id] {
  scroll-margin-top: 86px;
}

.heading-anchor {
  display: inline-block;
  color: var(--text-muted);
  margin-left: 0.5rem;
  opacity: 0;
  text-decoration: none !important;
  font-weight: 400;
  font-size: 0.85em;
  transition: opacity 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

h2:hover .heading-anchor, h3:hover .heading-anchor {
  opacity: 0.7;
}

.heading-anchor:hover {
  opacity: 1 !important;
  color: var(--accent-green) !important;
}

.docs-content h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.docs-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.docs-content h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.docs-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.75;
  font-size: 1.01rem;
}

.docs-content ul, .docs-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.docs-content li {
  margin-bottom: 0.4rem;
}

.code-block-wrapper {
  margin: 1.25rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background-color: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-block-wrapper pre {
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Tables and Documentation Components */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 0;
}

.shortcuts-table th, .shortcuts-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.shortcuts-table tbody tr:last-child td {
  border-bottom: none;
}

.shortcuts-table tbody tr:hover td {
  background-color: var(--bg-surface-raised);
}

.shortcuts-table th {
  background-color: var(--bg-surface-raised);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

/* Callouts */
.doc-callout {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border-left: 3.5px solid var(--accent-blue);
  background-color: var(--accent-blue-dim);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.doc-callout-tip {
  border-left-color: var(--accent-green);
  background-color: var(--accent-green-dim);
}

.doc-callout-warning {
  border-left-color: var(--accent-amber);
  background-color: var(--accent-amber-dim);
}

/* Documentation sequential pagination */
.docs-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.docs-pagination-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.docs-pagination-card:hover {
  border-color: var(--accent-green);
  background: var(--bg-surface-raised);
  transform: translateY(-2px);
}

.docs-pagination-card.next {
  text-align: right;
  align-items: flex-end;
}

.pagination-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.pagination-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.docs-pagination-card:hover .pagination-title {
  color: var(--accent-green);
}

.kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  border-radius: 3px;
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--accent-green);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile Navigation */
.mobile-nav-toggle {
  display: none;
}

.mobile-nav-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.mobile-nav-drawer.open {
  max-height: 400px;
  opacity: 1;
}

.mobile-nav-links {
  list-style: none;
  padding: 0.5rem 0 0.75rem;
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none !important;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-green);
  background-color: var(--bg-surface-raised);
  border-left-color: var(--accent-green);
}

/* Mobile Docs TOC */
.docs-mobile-toc-bar {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 0;
  position: sticky;
  top: 64px;
  z-index: 90;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-mobile-toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.docs-mobile-toc-toggle .toc-chevron {
  transition: transform 0.2s ease;
}

.docs-mobile-toc-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  max-height: 0;
  opacity: 0;
  overflow-y: auto;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  position: sticky;
  top: 110px;
  z-index: 89;
  padding: 0;
}

.docs-mobile-toc-drawer.open {
  max-height: 60vh;
  opacity: 1;
  padding: 1rem 0;
}

.docs-mobile-toc-drawer .docs-nav-group {
  margin-bottom: 1.25rem;
  padding: 0 1.25rem;
}

/* =========================================================================
   Responsive Breakpoints (Mobile-First Progressive Enhancement)
   ========================================================================= */

/* Small Tablets & Landscape Phones (min-width: 640px) */
@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .install-command-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .copy-btn {
    justify-content: flex-start;
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-pagination {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets & Small Desktops (min-width: 769px) */
@media (min-width: 769px) {
  .nav-links {
    display: flex;
  }
  .mobile-nav-toggle {
    display: none;
  }
  .mobile-nav-drawer {
    display: none !important;
  }
  .hero-section {
    padding: 3.5rem 0 3rem;
  }
  .gallery-tabs {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .catalog-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }
  .search-field {
    max-width: 380px;
    flex-grow: 1;
  }
  .filter-group {
    width: auto;
  }
  .filter-btn {
    flex: none;
    padding: 0.4rem 0.85rem;
  }
  .select-control {
    width: auto;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .publish-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-links-group {
    flex-direction: row;
    gap: 4rem;
  }
  .pirho-callout {
    flex-direction: row;
    text-align: left;
    padding: 2.5rem 3rem;
  }
  .pirho-tags {
    justify-content: flex-start;
  }
  .pirho-equation {
    justify-content: flex-end;
    gap: 0.75rem;
  }
  .eq-card {
    min-width: 88px;
    padding: 1.25rem 1rem;
  }
  .eq-symbol {
    font-size: 2.2rem;
  }
}

/* Large Screens & Multi-Column Docs (min-width: 1024px) */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 2.9rem;
  }
  .hero-subtitle {
    font-size: 1.18rem;
    margin-bottom: 2.25rem;
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .docs-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    padding: 2.5rem 0 5rem;
  }
  .docs-sidebar {
    display: block;
    position: sticky;
    border-right: 1px solid var(--border-subtle);
    padding-right: 2rem;
  }
  .docs-content {
    padding-left: 3.5rem;
    padding-right: 2rem;
  }
  .docs-mobile-toc-bar {
    display: none !important;
  }
  .docs-mobile-toc-drawer {
    display: none !important;
  }
}

@media (max-width: 859px) {
  .docs-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .docs-content {
    padding: 1rem 0.25rem 4rem;
    max-width: 100%;
  }
}
