/* ============================================================
   Automated Coastal & Marine Spatial Analysis Pipelines
   Light, elegant marine theme.
   ============================================================ */

:root {
  /* Palette */
  --c-deep: #0a3a52;
  --c-primary: #0d7d8a;
  --c-primary-600: #0a626d;
  --c-primary-700: #084f58;
  --c-cyan: #22b8e6;
  --c-teal-soft: #43e0c4;
  --c-coral: #ff7a52;
  --c-coral-600: #ef5f37;
  --c-violet: #5b6bff;

  /* Surfaces & text */
  --bg: #f4fafb;
  --surface: #ffffff;
  --surface-2: #eaf4f6;
  --surface-3: #def0f3;
  --border: #d3e5ea;
  --border-strong: #b9d6dd;
  --text: #14303d;
  --text-soft: #4c6672;
  --text-faint: #6f8893;

  /* Code */
  --code-bg: #f0f7f9;
  --code-border: #d8e8ec;
  --inline-code-bg: #e4f1f3;
  --inline-code-text: #0a626d;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(10, 58, 82, 0.06), 0 1px 3px rgba(10, 58, 82, 0.08);
  --shadow-md: 0 4px 14px rgba(10, 58, 82, 0.10);
  --shadow-lg: 0 18px 48px rgba(10, 58, 82, 0.16);
  --radius: 14px;
  --radius-sm: 9px;

  /* Layout */
  --header-h: 66px;
  --max-page: 1360px;
  /* Document/content width matches the header & footer width so content
     fills the same container as the app bar (not a narrower column). */
  --max-doc: var(--max-page);
  --gutter: clamp(1rem, 4vw, 3rem);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --grad-brand: linear-gradient(120deg, var(--c-primary) 0%, var(--c-cyan) 100%);
  --grad-title: linear-gradient(100deg, var(--c-deep) 0%, var(--c-primary) 55%, var(--c-cyan) 100%);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(60rem 30rem at 105% -10%, rgba(34, 184, 230, 0.10), transparent 60%),
    radial-gradient(50rem 30rem at -10% 0%, rgba(13, 125, 138, 0.08), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.22; font-weight: 700; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-700); }

::selection { background: rgba(34, 184, 230, 0.28); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 200;
  background: var(--c-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--c-deep);
  font-weight: 700;
  flex: 0 0 auto;
  margin-right: auto;
}
.brand-logo {
  width: 40px; height: 40px;
  filter: drop-shadow(0 2px 5px rgba(10, 58, 82, 0.25));
  transition: transform 0.25s ease;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.74rem; font-weight: 600; color: var(--c-primary); letter-spacing: 0.02em; text-transform: uppercase; }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  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(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.nav-link .icon { width: 19px; height: 19px; }
.nav-link:hover {
  color: var(--c-primary-700);
  background: var(--surface-2);
}
.nav-link.is-active {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(13, 125, 138, 0.35);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 11px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-box { position: relative; width: 20px; height: 14px; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute;
  left: 0; width: 20px; height: 2.4px;
  background: var(--c-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle-bar { top: 6px; }
.nav-toggle-bar::before { content: ""; top: -6px; }
.nav-toggle-bar::after { content: ""; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Main / sticky footer ---------- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-page);
  margin: 0 auto;
  padding: var(--gutter);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.hero-logo {
  width: clamp(96px, 14vw, 140px);
  height: auto;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 12px 30px rgba(10, 58, 82, 0.28));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-title {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  letter-spacing: -0.02em;
  margin: 0 auto 1rem;
  max-width: 18ch;
  overflow-wrap: break-word;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  max-width: 60ch;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--text-soft);
}

.hero-actions {
  margin-top: clamp(1.8rem, 4vw, 2.8rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  text-align: left;
}
.cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cta:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  color: var(--text);
}
.cta-icon { flex: 0 0 auto; }
.cta-icon svg {
  width: 52px; height: 52px;
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease;
}
.cta:hover .cta-icon svg { transform: rotate(-6deg) scale(1.07); }
.cta-text { display: flex; flex-direction: column; min-width: 0; }
.cta-title, .cta-sub { overflow-wrap: break-word; }
.cta-title { font-weight: 700; font-size: 1.06rem; color: var(--c-deep); }
.cta-sub { font-size: 0.86rem; color: var(--text-soft); }
.cta-ais:hover { border-color: var(--c-coral); }
.cta-bathy:hover { border-color: var(--c-cyan); }
.cta-data:hover { border-color: var(--c-violet); }

/* ---------- Home sections ---------- */
.home-intro, .home-pillars {
  max-width: var(--max-doc);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}
.section-title {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  color: var(--c-deep);
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 4px;
  border-radius: 4px;
  background: var(--grad-brand);
}
.home-intro p { color: var(--text-soft); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--c-primary);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar-ship { border-top-color: var(--c-coral); }
.pillar-depth { border-top-color: var(--c-cyan); }
.pillar-layers { border-top-color: var(--c-violet); }
.pillar-card-title { font-size: 1.16rem; margin: 0 0 0.5rem; }
.pillar-card-title a { color: var(--c-deep); }
.pillar-card-title a:hover { color: var(--c-primary); }
.pillar-card-blurb { color: var(--text-soft); margin: 0 0 0.9rem; font-size: 0.95rem; }
.pillar-card-links { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.3rem; }
.pillar-card-links a {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pillar-card-links a:hover { color: var(--c-primary); border-bottom-color: var(--c-cyan); }
.pillar-card-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.92rem;
}
.pillar-card-more span { transition: transform 0.2s ease; display: inline-block; }
.pillar-card-more:hover span { transform: translateX(4px); }

/* ---------- Document pages ---------- */
.doc {
  max-width: var(--max-doc);
  margin: 0 auto;
}
.doc-body { font-size: 1.04rem; }

.breadcrumbs { margin-bottom: 1.4rem; font-size: 0.86rem; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  margin: 0; padding: 0;
  color: var(--text-faint);
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.55rem;
  color: var(--border-strong);
}
.breadcrumbs a { color: var(--text-soft); font-weight: 600; }
.breadcrumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--c-deep); font-weight: 700; }
.breadcrumbs .crumb-plain { color: var(--text-faint); }

/* Content typography */
.doc-body h1 {
  font-size: clamp(1.85rem, 1.4rem + 1.8vw, 2.7rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.doc-body h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem);
  color: var(--c-deep);
  margin: 2.4rem 0 0.9rem;
  padding-top: 0.4rem;
}
.doc-body h2::before {
  content: "";
  display: block;
  width: 52px; height: 4px;
  border-radius: 4px;
  background: var(--grad-brand);
  margin-bottom: 0.7rem;
}
.doc-body h3 {
  font-size: clamp(1.18rem, 1.05rem + 0.5vw, 1.4rem);
  color: var(--c-primary-700);
  margin: 1.9rem 0 0.7rem;
}
.doc-body h4 {
  font-size: 1.08rem;
  color: var(--c-primary-600);
  margin: 1.5rem 0 0.5rem;
}
.doc-body p { margin: 0 0 1.15rem; }
.doc-body strong { color: var(--c-deep); font-weight: 700; }

/* In-page anchor offset under sticky header */
.doc-body :is(h1, h2, h3, h4, h5, h6)[id],
[id] { scroll-margin-top: calc(var(--header-h) + 1.2rem); }

.heading-anchor {
  opacity: 0;
  margin-left: 0.4rem;
  color: var(--c-cyan);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.doc-body :is(h2, h3, h4):hover .heading-anchor { opacity: 1; }

/* Content links */
.doc-body a {
  color: var(--c-primary);
  font-weight: 500;
  border-bottom: 1px solid rgba(13, 125, 138, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.doc-body a:hover {
  color: var(--c-primary-700);
  border-bottom-color: var(--c-primary);
  background: rgba(34, 184, 230, 0.10);
}

/* Lists */
.doc-body ul, .doc-body ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.doc-body li { margin: 0.35rem 0; }
.doc-body li::marker { color: var(--c-primary); }

/* Blockquote */
.doc-body blockquote {
  margin: 1.4rem 0;
  padding: 0.6rem 1.2rem;
  border-left: 4px solid var(--c-cyan);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}

/* Inline code */
.doc-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--inline-code-bg);
  color: var(--inline-code-text);
  padding: 0.12em 0.42em;
  border-radius: 5px;
  border: 0;
  word-break: break-word;
}

/* ---------- Code blocks ---------- */
.code-block {
  position: relative;
  margin: 1.5rem 0;
}
.code-block .code-lang {
  position: absolute;
  top: 0; left: 1rem;
  transform: translateY(-50%);
  font: 600 0.68rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary-700);
  background: var(--surface-3);
  border: 1px solid var(--code-border);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
}
pre[class*="language-"] {
  margin: 0;
  padding: 1.25rem 1.2rem;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
  -moz-tab-size: 4; tab-size: 4;
}
code[class*="language-"] { font-family: var(--font-mono); color: var(--text); white-space: pre; }

.copy-btn {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  font: 600 0.74rem/1 var(--font-sans);
  color: var(--c-primary-700);
  background: var(--surface);
  border: 1px solid var(--code-border);
  border-radius: 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.code-block:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { background: #0f9d6b; color: #fff; border-color: #0f9d6b; opacity: 1; }

/* Prism light token theme (matched to palette) */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #6e8d97; font-style: italic; }
.token.punctuation { color: #4c6672; }
.token.keyword, .token.boolean, .token.atrule, .token.important { color: #b8472b; font-weight: 600; }
.token.operator, .token.entity, .token.url { color: #1a7d86; }
.token.string, .token.char, .token.attr-value, .token.regex { color: #0f7a5e; }
.token.number, .token.constant, .token.symbol { color: #b06a00; }
.token.function, .token.class-name { color: #0a5e8c; }
.token.builtin, .token.tag, .token.selector { color: #7c4dd1; }
.token.property, .token.attr-name { color: #0a626d; }
.token.deleted { color: #c0392b; }
.token.inserted { color: #0f9d6b; }
.token.namespace { opacity: 0.7; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.94rem;
}
.table-wrap th, .table-wrap td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table-wrap thead th {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: none;
}
.table-wrap tbody tr:nth-child(even) { background: var(--surface-2); }
.table-wrap tbody tr:hover { background: var(--surface-3); }
.table-wrap tbody tr:last-child td { border-bottom: none; }

/* ---------- Task lists ---------- */
.doc-body .contains-task-list {
  list-style: none;
  padding-left: 0;
}
.doc-body .contains-task-list .contains-task-list { padding-left: 1.4rem; }
.task-list-item {
  list-style: none;
  padding: 0.15rem 0;
}
.task-list-item::marker { content: ""; }
.task-list-item > label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}
.task-list-item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 1.2em; height: 1.2em;
  margin-top: 0.28em;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task-list-item-checkbox::before {
  content: "";
  width: 0.62em; height: 0.62em;
  transform: scale(0);
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 43% 100%, 100% 16%, 80% 0%, 41% 64%);
  background: #fff;
  transition: transform 0.15s ease;
}
.task-list-item-checkbox:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.task-list-item-checkbox:checked::before { transform: scale(1); }
.task-list-item-checkbox:hover { border-color: var(--c-primary); }
.tl-text { transition: color 0.15s ease, opacity 0.15s ease; }
.task-list-item-checkbox:checked ~ .tl-text {
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
  color: var(--text-faint);
}
/* Fallback dimming when JS has not wrapped the label text */
.task-list-item:has(> label > .task-list-item-checkbox:checked) > label { color: var(--text-faint); }

/* ---------- Accordion (FAQ) ---------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 0.7rem 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--c-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--c-primary);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-answer { padding: 1rem 1.2rem; color: var(--text-soft); }

/* ---------- KaTeX ---------- */
.katex { font-size: 1.04em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.4rem 0; }

/* ---------- Mermaid diagrams ---------- */
.mermaid {
  margin: 1.8rem 0;
  text-align: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Hide raw source until the diagram is rendered to SVG */
.mermaid:not([data-processed="true"]) {
  min-height: 3rem;
  font-size: 0;
  color: transparent;
  user-select: none;
}
.mermaid[data-processed="true"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1rem;
  box-shadow: var(--shadow-sm);
}
.mermaid svg { display: block; margin-inline: auto; max-width: 100%; height: auto; }

/* ---------- Related navigation ---------- */
.related {
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.related-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--c-primary);
  margin: 0 0 0.7rem;
}
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.related-list a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.55rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.related-list a:hover {
  color: var(--c-primary-700);
  border-color: var(--c-cyan);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.related-arrow { color: var(--c-cyan); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: 3.5rem;
  background: var(--c-deep);
  color: #cfe6ec;
  background-image: linear-gradient(180deg, #0a3a52 0%, #082c40 100%);
}
.footer-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 2.6rem var(--gutter) 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
}
.footer-brand { display: flex; gap: 1rem; max-width: 42ch; }
.footer-logo { width: 44px; height: 44px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }
.footer-name { font-weight: 700; color: #fff; margin: 0 0 0.3rem; font-size: 1.02rem; }
.footer-tag { margin: 0; color: #9fc2cd; font-size: 0.92rem; }
.footer-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7fb3c1;
  margin: 0 0 0.8rem;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-nav a {
  color: #cfe6ec;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-nav a:hover { color: #fff; border-bottom-color: var(--c-cyan); }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 1rem var(--gutter);
  text-align: center;
  font-size: 0.84rem;
  color: #7fb3c1;
}
.footer-base p { margin: 0; max-width: var(--max-page); margin-inline: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.7rem var(--gutter) 1rem;
    display: none;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .nav-link { padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 1rem; }
  .hero-actions { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .footer-inner { flex-direction: column; gap: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
