/* ============================================================
   BlackBox Scripter — Documentation Site Design System
   Adapted from Animator docs, accent: #7B68EE (Medium Slate Blue)
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #141414;
  --bg-tertiary:   #1e1e1e;
  --bg-hover:      #252525;

  /* Text */
  --text-heading:  #ffffff;
  --text-primary:  #d4d4d4;
  --text-muted:    #999999;
  --text-dim:      #666666;

  /* Borders */
  --border-subtle:  #1e1e1e;
  --border-medium:  #2a2a2a;
  --border-strong:  #3a3a3a;

  /* Accent — Scripter Purple */
  --accent-scripter:      #7B68EE;
  --accent-scripter-dim:  #6558CC;
  --accent-scripter-glow: rgba(123, 104, 238, 0.3);

  /* Semantic Accents */
  --accent-cyan:       #00d4ff;
  --accent-blue:       #1a73e8;
  --accent-blue-hover: #1557b0;
  --accent-info:       #2196F3;

  /* Status Colors */
  --color-success:  #4caf50;
  --color-warning:  #ff9800;
  --color-error:    #f44336;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Layout */
  --sidebar-width:     260px;
  --header-height:     56px;
  --content-max-width: 900px;

  /* Timing */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-scripter);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-cyan);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.2;
}

h1 {
  font-weight: 900;
  font-size: 2.25rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

h1 .accent {
  color: var(--accent-scripter);
  text-shadow: 0 0 20px var(--accent-scripter-glow);
}

h2 {
  font-weight: 900;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-medium);
}

h3 {
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: var(--text-heading);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-scripter);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

blockquote {
  border-left: 3px solid var(--accent-scripter);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: var(--bg-secondary);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border-medium);
  margin: 2rem 0;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  gap: 1rem;
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .logo-link img {
  width: 32px;
  height: 32px;
}

.site-header .logo-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text-heading);
  white-space: nowrap;
}

.site-header .logo-text .docs-label {
  color: var(--accent-scripter);
  margin-left: 0.4rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.header-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.header-nav a:hover {
  color: var(--text-heading);
  background: var(--bg-hover);
}

.header-nav .launch-btn {
  background: var(--accent-blue);
  color: white !important;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.header-nav .launch-btn:hover {
  background: var(--accent-blue-hover);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --- Page Layout (sidebar + content) --- */
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  padding-top: var(--header-height);
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 900;
}

.sidebar-group {
  margin-bottom: 1.5rem;
}

.sidebar-group-label {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 1.25rem;
  margin-bottom: 0.4rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.sidebar a:hover {
  color: var(--text-heading);
  background: var(--bg-secondary);
}

.sidebar a.active {
  color: var(--text-heading);
  background: rgba(123, 104, 238, 0.05);
  border-left-color: var(--accent-scripter);
  font-weight: 600;
}

.sidebar a .nav-icon {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar a .star-badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: var(--accent-scripter);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Content Area --- */
.content-area {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  width: 100%;
}

.content-area > *:first-child {
  margin-top: 0;
}

/* --- Full-Width Layout (landing page, no sidebar) --- */
.full-width-layout {
  padding-top: var(--header-height);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  filter: blur(2px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-normal);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent-scripter);
  color: white;
  box-shadow: 0 0 20px var(--accent-scripter-glow);
}

.btn-primary:hover {
  background: var(--accent-scripter-dim);
  color: white;
  box-shadow: 0 0 30px rgba(123, 104, 238, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-heading);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: white;
  border-color: var(--accent-scripter);
  transform: translateY(-1px);
}

/* --- Feature Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-scripter);
  border-radius: 0 10px 10px 0;
  padding: 1.75rem;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--accent-scripter);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.feature-card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.feature-card .card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-scripter);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.feature-card .card-link:hover {
  color: var(--accent-cyan);
}

/* --- Callout Boxes --- */
.callout {
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  background: var(--bg-secondary);
}

.callout-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.callout-tip {
  border-left-color: var(--color-success);
}

.callout-tip .callout-title {
  color: var(--color-success);
}

.callout-warning {
  border-left-color: var(--color-warning);
}

.callout-warning .callout-title {
  color: var(--color-warning);
}

.callout-info {
  border-left-color: var(--accent-info);
}

.callout-info .callout-title {
  color: var(--accent-info);
}

.callout-danger {
  border-left-color: var(--color-error);
}

.callout-danger .callout-title {
  color: var(--color-error);
}

/* --- Keyboard Keys --- */
kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.45em;
  color: var(--accent-scripter);
  white-space: nowrap;
  vertical-align: baseline;
}

/* --- Step Lists --- */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.75rem;
  min-height: 2.25rem;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--accent-scripter);
  color: white;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.steps li strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-scripter);
  background: var(--bg-tertiary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-medium);
}

td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

tr:hover td {
  background: var(--bg-secondary);
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: var(--accent-info);
}

.breadcrumb .separator {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* --- Quick Start Section --- */
.quick-start {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 3rem auto;
  max-width: 850px;
}

.quick-start h2 {
  text-align: center;
  border-bottom: none;
  margin-top: 0;
}

/* --- Ecosystem Banner --- */
.ecosystem-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-top: 1px solid var(--border-medium);
  padding: 3rem 2rem;
  text-align: center;
}

.ecosystem-banner h2 {
  border-bottom: none;
  margin-top: 0;
}

.ecosystem-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.ecosystem-item {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ecosystem-item a {
  display: block;
  font-weight: 600;
}

/* --- Section Container (landing page) --- */
.section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Site Footer --- */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem;
  text-align: center;
}

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.site-footer .footer-brand img {
  width: 24px;
  height: 24px;
}

.site-footer .footer-brand span {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-footer .footer-links a {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.site-footer .footer-links a:hover {
  color: var(--accent-scripter);
}

.site-footer .footer-copy {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ============================================================
   Function Reference (auto-generated pages)
   ============================================================ */

/* --- Function Search --- */
.fn-search-container {
  margin-bottom: 1.5rem;
}

.fn-search {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.fn-search::placeholder {
  color: var(--text-dim);
}

.fn-search:focus {
  border-color: var(--accent-scripter);
  box-shadow: 0 0 0 3px var(--accent-scripter-glow);
}

/* --- Function Summary --- */
.fn-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* --- Function TOC --- */
.fn-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.fn-toc a {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.fn-toc a:hover {
  border-color: var(--accent-scripter);
  color: var(--text-heading);
  background: var(--bg-hover);
}

.fn-toc-count {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* --- Category Section --- */
.category-section {
  margin-bottom: 3rem;
}

.category-section h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-medium);
}

.category-description {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* --- Function Table --- */
.fn-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.85rem;
}

.fn-table th {
  font-size: 0.7rem;
  padding: 0.6rem 0.75rem;
}

.fn-table td {
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}

/* --- Function Row --- */
.fn-row {
  transition: background var(--transition-fast);
}

.fn-row:hover td {
  background: var(--bg-secondary);
}

/* --- Function Name (LSL) --- */
.fn-name {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--color-warning);
  white-space: nowrap;
}

/* --- Function API (poqpoq equivalent) --- */
.fn-api {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-scripter);
  white-space: nowrap;
}

/* --- Function Return Type --- */
.fn-return code {
  font-size: 0.8em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--text-muted);
}

/* --- Function Notes --- */
.fn-notes {
  font-size: 0.8em;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Clickable Function Rows (expandable detail) --- */
.fn-row-clickable {
  cursor: pointer;
}

.fn-row-clickable:hover td {
  background: var(--bg-hover);
}

.fn-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-dim);
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

.fn-row-expanded .fn-chevron {
  transform: rotate(180deg);
}

/* --- Function Detail Row (expandable) --- */
.fn-detail td {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-scripter);
  border-bottom: 1px solid var(--border-medium);
  padding: 0 !important;
}

.fn-detail:hover td {
  background: var(--bg-secondary);
}

.fn-detail-content {
  padding: 1rem 1.25rem;
  max-width: 700px;
}

.fn-description {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.fn-example-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.fn-detail-content .fn-example {
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  margin-bottom: 0;
  overflow-x: auto;
  line-height: 1.5;
}

.fn-detail-content .fn-example code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: inherit;
}

/* --- Deprecated --- */
.deprecated-badge {
  background: #d32f2f22;
  color: #ef5350;
  border-color: #ef535044;
}

.fn-row-deprecated td {
  opacity: 0.6;
}

.fn-row-deprecated:hover td {
  opacity: 1;
}

/* --- Text Dim (for em-dashes and placeholders) --- */
.text-dim {
  color: var(--text-dim);
}

/* --- Status Badges --- */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  color: white;
  white-space: nowrap;
}

.status-mapped {
  background: #4caf50;
}

.status-partial {
  background: #ff9800;
}

.status-unmapped {
  background: #f44336;
}

.status-deprecated {
  background: #666666;
}

/* --- Async Badge --- */
.async-badge {
  background: var(--accent-scripter);
}

/* --- Detected Badge (for events) --- */
.detected-badge {
  background: var(--accent-info);
}

/* --- Origin Badges --- */
.origin-sl {
  background: #607d8b;
}
.origin-ossl {
  background: #ff9800;
}
.origin-poqpoq {
  background: var(--accent-scripter);
}

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

@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 999;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open {
    display: block;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .fn-table {
    font-size: 0.8rem;
  }

  .fn-table th,
  .fn-table td {
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: 1.5rem 1rem 3rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }

  .hero { min-height: 360px; padding: 2rem 1rem; }
  .hero h1 { font-size: 2rem; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .header-nav a:not(.launch-btn) {
    display: none;
  }

  .site-header .logo-text {
    font-size: 0.8rem;
  }

  .fn-name,
  .fn-api {
    font-size: 0.75em;
  }
}
