/* =========================================================================
   Open-Source Geospatial Portal Deployment & Scaling
   Light, professional, geospatial-inspired design system.
   ========================================================================= */

:root {
  /* Palette */
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-050: #ecfdf8;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --sky-500: #0ea5e9;
  --green-700: #047857;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --amber-600: #d97706;
  --amber-500: #f59e0b;

  /* Neutrals */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f6f9fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;

  /* Roles */
  --primary: var(--teal-700);
  --primary-strong: #0b5d56;
  --link: #0e7490;
  --link-hover: #0f766e;
  --code-bg: #f5f8fa;
  --code-border: #e6edf2;
  --inline-code-bg: #eef3f6;
  --inline-code-ink: #115e59;

  /* Accents (overridden per .accent-* block) */
  --accent: var(--teal-600);
  --accent-soft: var(--teal-050);

  /* Metrics */
  --header-h: 64px;
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1320px;
  --container-wide: 1600px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.accent-teal { --accent: var(--teal-600); --accent-soft: #e6fbf6; --accent-ink: #0b5d56; }
.accent-blue { --accent: var(--blue-600); --accent-soft: #e8f0ff; --accent-ink: #1e40af; }
.accent-green { --accent: var(--green-600); --accent-soft: #e8f8ee; --accent-ink: #166534; }
.accent-amber { --accent: var(--amber-500); --accent-soft: #fdf3e2; --accent-ink: #b45309; }

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
.site-main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
img { height: auto; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

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

.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: absolute; left: 0.5rem; top: -3rem;
  background: var(--primary); color: #fff; padding: 0.5rem 0.9rem;
  border-radius: 8px; z-index: 100; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.5rem; color: #fff; }

:focus-visible { outline: 3px solid var(--sky-500); outline-offset: 2px; border-radius: 4px; }

/* ===================== Header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; flex: none; }
.brand-logo { width: 38px; height: 38px; transition: transform 0.4s var(--ease); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
.brand-name { font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: var(--primary); }

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.8rem; border-radius: 999px;
  color: var(--ink-2); font-weight: 600; font-size: 0.95rem;
  line-height: 1.2; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link .icon { width: 1.15em; height: 1.15em; color: var(--muted); transition: color 0.2s var(--ease); }
.nav-link:hover { background: var(--surface-2); color: var(--primary); }
.nav-link:hover .icon { color: var(--primary); }
.nav-link.is-active { color: var(--primary); background: var(--teal-050); }
.nav-link.is-active .icon { color: var(--primary); }
.nav-link span { white-space: nowrap; }

.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line-2); border-radius: 10px; padding: 0.4rem; color: var(--ink-2); cursor: pointer; }
.nav-toggle:hover { color: var(--primary); border-color: var(--accent); }
.nav-toggle .icon { width: 1.5em; height: 1.5em; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

/* ===================== Hero ===================== */
.hero {
  background:
    radial-gradient(1100px 380px at 78% -8%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(900px 360px at 12% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-main { text-align: center; }
.hero-logo {
  width: clamp(116px, 16vw, 168px); height: auto; display: block; margin: 0 auto 1.4rem;
  filter: drop-shadow(0 12px 24px rgba(13, 148, 136, 0.22));
  transition: transform 0.5s var(--ease);
}
.hero-logo:hover { transform: translateY(-4px) rotate(-3deg); }
.hero-title {
  margin: 0 0 0.5rem; color: var(--ink);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800;
}
.hero-title-accent {
  background: linear-gradient(100deg, var(--teal-600), var(--sky-500) 55%, var(--blue-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline { margin: 0 auto 1.6rem; max-width: 46ch; color: var(--muted); font-size: 1.15rem; font-weight: 500; }
.hero-body { max-width: 72ch; margin: 1.75rem auto 0; text-align: left; }
.hero-body p { margin: 0 0 1rem; }
.hero-body p:last-child { margin-bottom: 0; }
.hero-body strong { color: var(--ink); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 2rem; }

@media (min-width: 980px) {
  .hero-inner {
    display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center;
  }
  .hero-main { text-align: left; }
  .hero-logo { margin: 0 0 1.5rem; }
  .hero-tagline { margin: 0 0 1.8rem; }
  .hero-cta { justify-content: flex-start; }
  .hero-body {
    max-width: none; margin: 0; align-self: center;
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--teal-500);
    border-radius: var(--radius); padding: 1.75rem 2rem; box-shadow: var(--shadow-md);
    font-size: 1.02rem;
  }
}

/* ===================== Buttons ===================== */
.cta-button {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.25rem; border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 700;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cta-button .cta-icon { width: 1.45em; height: 1.45em; color: var(--accent); }
.cta-button .cta-arrow { width: 1.1em; height: 1.1em; color: var(--muted); transition: transform 0.2s var(--ease); }
.cta-button:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink); }
.cta-button:hover .cta-arrow { transform: translateX(4px); color: var(--accent); }
.cta-button { max-width: 100%; }
.cta-button .cta-text { text-align: left; }

/* ===================== Section overview (home) ===================== */
.sections { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-overview-heading {
  text-align: center; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink);
  margin: 0 0 2rem; letter-spacing: -0.02em;
}
.section-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.section-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.section-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); opacity: 0.9; }
.section-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.section-card-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.75rem; }
.section-card-icon {
  display: inline-flex; padding: 0.6rem; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.section-card-icon .icon { width: 1.6em; height: 1.6em; }
.section-card-title { margin: 0; font-size: 1.18rem; line-height: 1.3; color: var(--ink); }
.section-card-title a { color: inherit; }
.section-card-title a:hover { color: var(--accent); }
.section-card-desc { margin: 0 0 1rem; color: var(--muted); font-size: 0.97rem; }
.section-card-links { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: 0.3rem; }
.section-card-links a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; padding: 0.2rem 0; }
.section-card-links a:hover { color: var(--accent); }
.section-card-links .link-chevron { width: 1em; height: 1em; color: var(--accent); flex: none; }
.section-card-more { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--accent); }
.section-card-more .more-arrow { width: 1.05em; height: 1.05em; transition: transform 0.2s var(--ease); }
.section-card-more:hover { color: var(--accent-ink); }
.section-card-more:hover .more-arrow { transform: translateX(4px); }

/* ===================== Content / prose ===================== */
.content { padding-block: 2rem 3.5rem; }
.prose { color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }

.prose h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.025em;
  font-weight: 800; margin: 0 0 1.1rem;
  background: linear-gradient(100deg, var(--teal-700), var(--sky-500) 60%, var(--blue-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.prose h2 { font-size: 1.6rem; line-height: 1.25; color: var(--ink); margin: 2.4rem 0 0.9rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); letter-spacing: -0.018em; }
.prose h3 { font-size: 1.28rem; color: var(--ink); margin: 1.9rem 0 0.7rem; letter-spacing: -0.012em; }
.prose h4 { font-size: 1.08rem; color: var(--ink); margin: 1.5rem 0 0.6rem; text-transform: none; }
.prose h2, .prose h3, .prose h4, .prose h5 { scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote {
  margin: 1.4rem 0; padding: 0.6rem 1.2rem; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Prose links */
.prose a { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 0.18em; transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease); }
.prose a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

/* Heading anchors */
.heading-anchor { margin-left: 0.4rem; color: var(--line-2); font-weight: 700; opacity: 0; transition: opacity 0.15s var(--ease), color 0.15s var(--ease); text-decoration: none; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .prose h4:hover .heading-anchor, .heading-anchor:focus { opacity: 1; color: var(--accent); }

/* Inline code */
.prose :not(pre) > code {
  background: var(--inline-code-bg); color: var(--inline-code-ink);
  padding: 0.12em 0.42em; border-radius: 0.4em; font-family: var(--font-mono);
  font-size: 0.875em; border: 0; white-space: break-spaces;
}

/* ===================== Code blocks ===================== */
.code-block { position: relative; margin: 0 0 1.4rem; }
.prose pre {
  margin: 0 0 1.4rem; padding: 1rem 1.1rem; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.6; color: #1f2937;
  -webkit-overflow-scrolling: touch;
}
.code-block > pre { margin: 0; }
.prose pre code { background: none; padding: 0; border: 0; font-size: inherit; color: inherit; white-space: pre; }

.copy-button {
  position: absolute; top: 0.55rem; right: 0.55rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.6rem; font: inherit; font-size: 0.78rem; font-weight: 700;
  color: var(--ink-2); background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line-2);
  border-radius: 7px; cursor: pointer; opacity: 0; transition: opacity 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.code-block:hover .copy-button, .copy-button:focus-visible { opacity: 1; }
.copy-button:hover { color: var(--primary); border-color: var(--teal-500); }
.code-block.is-copied .copy-button { color: #fff; background: var(--green-600); border-color: var(--green-600); opacity: 1; }

/* Prism light theme tokens (palette-aligned) */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #6b7280; font-style: italic; }
.token.punctuation { color: #475569; }
.token.operator, .token.entity, .token.url { color: #475569; }
.token.keyword, .token.selector, .token.important, .token.atrule { color: var(--blue-700); }
.token.string, .token.attr-value, .token.char, .token.inserted { color: var(--green-700); }
.token.number, .token.boolean, .token.constant, .token.symbol { color: var(--amber-600); }
.token.function, .token.class-name { color: #0e7490; }
.token.tag, .token.property, .token.attr-name, .token.builtin { color: var(--teal-700); }
.token.regex, .token.variable, .token.deleted { color: #be123c; }
.token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* ===================== Tables ===================== */
.table-scroll { width: 100%; overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.95rem; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--surface-2); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--line-2); white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: #fafcfd; }
.prose tbody tr:hover { background: var(--teal-050); }

/* ===================== Task lists ===================== */
.prose .contains-task-list { list-style: none; padding-left: 0.2rem; }
.prose .task-list-item { display: flex; align-items: baseline; gap: 0.6rem; }
.prose .task-list-item::marker { content: ""; }
.task-list-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 1.15em; height: 1.15em; margin: 0; transform: translateY(0.15em);
  border: 2px solid var(--line-2); border-radius: 5px; background: var(--surface); cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.task-list-item input[type="checkbox"]:hover { border-color: var(--accent); }
.task-list-item input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.task-list-item input[type="checkbox"]:checked::after {
  content: ""; display: block; width: 0.32em; height: 0.6em; margin: 0.04em auto 0;
  border: solid #fff; border-width: 0 0.16em 0.16em 0; transform: rotate(45deg);
}
.task-list-item.is-checked { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }

/* ===================== FAQ accordions ===================== */
.faq { margin: 1.2rem 0 1.6rem; display: grid; gap: 0.7rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: 0.95rem 1.1rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: ""; width: 0.6em; height: 0.6em; flex: none; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.faq-item[open] > summary::after { transform: rotate(-135deg); }
.faq-item > summary:hover { color: var(--accent); }
.faq-item > :not(summary) { padding: 0 1.1rem; }
.faq-item > :last-child { padding-bottom: 1rem; }

/* ===================== Breadcrumbs ===================== */
.breadcrumbs { margin-bottom: 1.4rem; font-size: 0.9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb-item { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--line-2); font-weight: 700; }
.breadcrumb-item a { color: var(--muted); font-weight: 600; }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item span[aria-current] { color: var(--ink); font-weight: 700; }

/* ===================== Related ===================== */
.related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related-group + .related-group { margin-top: 2rem; }
.related-heading { font-size: 1.25rem; color: var(--ink); margin: 0 0 1rem; }
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; }
.card-link {
  display: flex; flex-direction: column; gap: 0.4rem; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.card-title { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink); }
.card-title .card-arrow { width: 1em; height: 1em; color: var(--primary); transition: transform 0.2s var(--ease); }
.card-link:hover .card-arrow { transform: translateX(4px); }
.card-desc { color: var(--muted); font-size: 0.92rem; }
.related-up { margin-top: 1.8rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--primary); }
.back-link .back-arrow { transform: rotate(180deg); width: 1.05em; height: 1.05em; }
.back-link:hover { color: var(--primary-strong); }

/* ===================== 404 ===================== */
.error-page { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.error-code { font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; margin: 0; background: linear-gradient(100deg, var(--teal-600), var(--blue-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-title { font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--ink); margin: 0.5rem 0 0.75rem; }
.error-text { max-width: 50ch; margin: 0 auto 1.6rem; color: var(--muted); }
.error-actions { margin-bottom: 2rem; }
.error-links { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; list-style: none; padding: 0; margin: 0; }
.error-links a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; color: var(--ink-2); }
.error-links a:hover { color: var(--primary); border-color: var(--teal-500); }
.error-links .icon { color: var(--muted); }
.error-links a:hover .icon { color: var(--primary); }

/* ===================== Footer ===================== */
.site-footer { flex-shrink: 0; margin-top: 3rem; background: #0c2b30; color: #cbe7e3; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; padding-block: 2.5rem; }
.footer-brand { display: flex; align-items: flex-start; gap: 0.9rem; max-width: 42ch; }
.footer-logo { width: 40px; height: 40px; }
.footer-name { margin: 0 0 0.25rem; font-weight: 700; color: #fff; }
.footer-tagline { margin: 0; color: #9fc6c1; font-size: 0.95rem; }
.footer-heading { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: #7fb3ad; margin: 0 0 0.8rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-nav a { display: inline-flex; align-items: center; gap: 0.5rem; color: #cbe7e3; font-weight: 600; }
.footer-nav a .icon { color: #5fa39c; transition: color 0.2s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-nav a:hover .icon { color: var(--teal-500); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 1.1rem; }
.footer-bottom p { margin: 0; color: #80a8a3; font-size: 0.88rem; }

/* ===================== KaTeX ===================== */
.katex-display { overflow-x: auto; overflow-y: hidden; padding-block: 0.4rem; }

/* ===================== Responsive ===================== */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); transform-origin: top;
    display: none; padding: 0.6rem clamp(1rem, 4vw, 2rem) 1rem;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .nav-link { padding: 0.75rem 0.85rem; border-radius: 10px; font-size: 1rem; }
  .nav-link span { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
