/* MatrixLink SEO hub — editorial noir */
:root {
  color-scheme: dark;
  --seo-bg: #050505;
  --seo-panel: #0c0d0c;
  --seo-panel-raised: #111312;
  --seo-text: #f2f4f2;
  --seo-copy: #d6ddd8;
  --seo-muted: #a8b0aa;
  --seo-dim: #8b948d;
  --seo-accent: #00e57f;
  --seo-accent-ink: #032117;
  --seo-line: rgba(255, 255, 255, 0.1);
  --seo-accent-line: rgba(0, 229, 127, 0.34);
  --seo-display: "Unbounded", "Inter Tight", system-ui, sans-serif;
  --seo-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --seo-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --seo-shell: 1280px;
  --seo-reading: 720px;
  --seo-header-height: 65px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--seo-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.018) 50%, transparent calc(50% + 1px)),
    var(--seo-bg);
  color: var(--seo-text);
  font-family: var(--seo-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
a,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 229, 127, 0.2);
}

:focus-visible {
  outline: 2px solid var(--seo-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: var(--seo-accent);
  color: var(--seo-accent-ink);
}

.seo-skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--seo-accent);
  color: var(--seo-accent-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease-out;
}

.seo-skip-link:focus {
  transform: translateY(0);
}

.seo-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: var(--seo-header-height);
  border-bottom: 1px solid var(--seo-line);
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.seo-header__inner {
  display: flex;
  align-items: center;
  width: min(100% - 32px, var(--seo-shell));
  min-height: var(--seo-header-height);
  margin-inline: auto;
  gap: 24px;
}

.seo-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.seo-brand__name {
  font-family: var(--seo-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.seo-brand__name::after {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--seo-accent);
  content: "";
}

.seo-brand__tagline {
  max-width: 24ch;
  overflow: hidden;
  color: var(--seo-dim);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
  margin-left: auto;
}

.seo-primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--seo-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease;
}

.seo-primary-nav a:hover {
  color: var(--seo-text);
}

.seo-lang-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--seo-line);
  border-radius: 999px;
  background: var(--seo-panel);
}

.seo-lang-switch a,
.seo-lang-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--seo-muted);
  font: 700 12px/1 var(--seo-body);
  text-decoration: none;
  cursor: pointer;
}

.seo-lang-switch :is(.is-active, [aria-current="page"]) {
  background: var(--seo-accent);
  color: var(--seo-accent-ink);
}

.seo-lang-menu {
  position: relative;
}

.seo-lang-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--seo-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.seo-lang-menu summary::-webkit-details-marker {
  display: none;
}

.seo-lang-menu summary::after {
  content: "▾";
  margin-left: 6px;
  font-size: 10px;
  color: var(--seo-dim);
}

.seo-lang-menu[open] summary::after {
  content: "▴";
}

.seo-lang-menu__list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--seo-line);
  border-radius: 16px;
  background: var(--seo-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.seo-lang-menu__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  color: var(--seo-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.seo-lang-menu__list a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.seo-lang-menu__list :is(.is-active, [aria-current="page"]) {
  background: var(--seo-accent);
  color: var(--seo-accent-ink);
}

.seo-shell {
  width: min(100% - 32px, var(--seo-shell));
  margin-inline: auto;
}

.seo-breadcrumbs {
  min-width: 0;
  padding: 22px 0 0;
  overflow-x: auto;
  color: var(--seo-dim);
  font-size: 13px;
  scrollbar-width: none;
  white-space: nowrap;
}

.seo-breadcrumbs::-webkit-scrollbar {
  display: none;
}

.seo-breadcrumbs :is(ol, ul) {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.seo-breadcrumbs li + li::before {
  color: var(--seo-accent);
  content: "/";
}

.seo-breadcrumbs a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--seo-muted);
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.seo-breadcrumbs a:hover {
  color: var(--seo-text);
  text-decoration-color: var(--seo-accent);
}

.seo-hero {
  position: relative;
  max-width: 1040px;
  padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 7vw, 96px);
}

.seo-hero::before {
  position: absolute;
  top: clamp(68px, 9.4vw, 134px);
  left: -24px;
  width: 2px;
  height: clamp(72px, 9vw, 120px);
  background: var(--seo-accent);
  content: "";
}

.seo-eyebrow {
  margin: 0 0 24px;
  color: var(--seo-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.seo-hero h1 {
  max-width: 19ch;
  margin: 0;
  font-family: var(--seo-display);
  font-size: clamp(34px, 5.3vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.seo-lead {
  max-width: 65ch;
  margin: 30px 0 0;
  color: var(--seo-muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  text-wrap: pretty;
}

.seo-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: clamp(80px, 10vw, 144px);
  border-top: 1px solid var(--seo-line);
}

.seo-toc {
  display: none;
}

.seo-article {
  width: min(100%, var(--seo-reading));
  min-width: 0;
}

.seo-prose,
.seo-faq,
.seo-related {
  min-width: 0;
}

.seo-prose > :first-child,
.seo-faq > :first-child,
.seo-related > :first-child {
  margin-top: 0;
}

.seo-prose :is(h2, h3, h4),
.seo-faq :is(h2, h3),
.seo-related :is(h2, h3) {
  scroll-margin-top: calc(var(--seo-header-height) + 24px);
  color: var(--seo-text);
  font-family: var(--seo-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.seo-prose h2,
.seo-faq h2,
.seo-related h2 {
  margin: 80px 0 24px;
  padding-top: 2px;
  font-size: clamp(25px, 3.4vw, 36px);
}

.seo-prose h2::before,
.seo-faq h2::before,
.seo-related h2::before {
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 18px;
  background: var(--seo-accent);
  content: "";
}

.seo-prose h3,
.seo-faq h3,
.seo-related h3 {
  margin: 48px 0 16px;
  font-size: clamp(20px, 2.6vw, 25px);
}

.seo-prose h4 {
  margin: 36px 0 12px;
  font-size: 17px;
}

.seo-prose p,
.seo-faq p,
.seo-related p {
  margin: 0 0 24px;
  color: var(--seo-copy);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.seo-prose strong {
  color: var(--seo-text);
  font-weight: 700;
}

.seo-prose a,
.seo-faq a,
.seo-related a {
  color: var(--seo-accent);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.seo-prose a:hover,
.seo-faq a:hover,
.seo-related a:hover {
  text-decoration-thickness: 2px;
}

.seo-prose :is(ul, ol) {
  margin: 0 0 28px;
  padding-left: 1.35em;
  color: var(--seo-copy);
}

.seo-prose li {
  margin-bottom: 10px;
  padding-left: 6px;
}

.seo-prose li::marker {
  color: var(--seo-accent);
  font-weight: 700;
}

.seo-prose :is(blockquote, .formula-callout, .seo-formula, .callout) {
  position: relative;
  margin: 40px 0;
  padding: 26px clamp(22px, 4vw, 34px);
  border: 1px solid var(--seo-accent-line);
  border-left: 4px solid var(--seo-accent);
  border-radius: 0 14px 14px 0;
  background: var(--seo-panel);
  color: var(--seo-text);
}

.seo-prose :is(blockquote, .formula-callout, .seo-formula, .callout) > :last-child {
  margin-bottom: 0;
}

.seo-prose :is(code, kbd, samp) {
  border: 1px solid var(--seo-line);
  border-radius: 5px;
  background: var(--seo-panel-raised);
  color: var(--seo-accent);
  font-family: var(--seo-mono);
  font-size: 0.86em;
}

.seo-prose code {
  padding: 2px 6px;
}

.seo-prose pre {
  max-width: 100%;
  margin: 32px 0;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--seo-line);
  border-radius: 12px;
  background: var(--seo-panel);
}

.seo-prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre;
}

.seo-prose .formula,
.seo-prose .equation {
  display: block;
  margin: 16px 0;
  color: var(--seo-accent);
  font-family: var(--seo-mono);
  font-size: clamp(15px, 2vw, 18px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.seo-prose table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.seo-prose :is(th, td) {
  padding: 12px 14px;
  border-bottom: 1px solid var(--seo-line);
  text-align: left;
  vertical-align: top;
}

.seo-prose th {
  background: var(--seo-panel);
  color: var(--seo-text);
  font-weight: 700;
}

.seo-prose hr {
  height: 1px;
  margin: 64px 0;
  border: 0;
  background: var(--seo-line);
}

.seo-faq {
  margin-top: 88px;
}

.seo-faq details {
  border-top: 1px solid var(--seo-line);
}

.seo-faq details:last-child {
  border-bottom: 1px solid var(--seo-line);
}

.seo-faq summary {
  position: relative;
  min-height: 64px;
  padding: 20px 48px 20px 0;
  color: var(--seo-text);
  font-weight: 700;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.seo-faq summary::-webkit-details-marker {
  display: none;
}

.seo-faq summary::after {
  position: absolute;
  top: 21px;
  right: 4px;
  color: var(--seo-accent);
  font-family: var(--seo-mono);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  content: "+";
  transition: transform 160ms ease-out;
}

.seo-faq details[open] summary::after {
  transform: rotate(45deg);
}

.seo-faq details > :not(summary) {
  max-width: 64ch;
}

.seo-faq details > :last-child {
  margin-bottom: 24px;
}

.seo-related {
  margin-top: 88px;
}

.seo-related :is(.seo-related__grid, .related-grid, ul) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.seo-related :is(.seo-related__card, .related-card, li) {
  min-width: 0;
}

.seo-related :is(.seo-related__card, .related-card, li) > a,
.seo-related > a {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--seo-line);
  border-radius: 12px;
  background: var(--seo-panel);
  color: var(--seo-text);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
  overflow-wrap: anywhere;
}

.seo-related :is(.seo-related__card, .related-card, li) > a:hover,
.seo-related > a:hover {
  border-color: var(--seo-accent-line);
  transform: translateY(-2px);
}

.seo-related a :is(p, span) {
  margin: 6px 0 0;
  color: var(--seo-muted);
  font-size: 14px;
  font-weight: 500;
}

.seo-cta {
  padding: clamp(64px, 8vw, 104px) 0;
  border-block: 1px solid var(--seo-accent-line);
  background: var(--seo-panel);
}

.seo-cta__inner {
  display: flex;
  width: min(100% - 32px, var(--seo-shell));
  margin-inline: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.seo-cta h2 {
  max-width: 21ch;
  margin: 0;
  font-family: var(--seo-display);
  font-size: clamp(27px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.seo-cta p {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--seo-muted);
  font-size: 18px;
}

.seo-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--seo-accent);
  color: var(--seo-accent-ink);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.seo-button:hover {
  box-shadow: 0 8px 30px rgba(0, 229, 127, 0.22);
  transform: translateY(-2px);
}

.seo-button--header {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  white-space: nowrap;
}

.seo-button--ghost {
  background: transparent;
  border: 1px solid var(--seo-accent);
  color: var(--seo-accent);
}

.seo-button--ghost:hover {
  box-shadow: 0 8px 30px rgba(0, 229, 127, 0.14);
}

.seo-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.seo-footer__contact {
  color: var(--seo-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.seo-footer__contact:hover {
  text-decoration: underline;
}

.seo-footer {
  background: var(--seo-bg);
}

.seo-footer__inner {
  display: flex;
  width: min(100% - 32px, var(--seo-shell));
  min-height: 144px;
  margin-inline: auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding-block: 32px max(32px, env(safe-area-inset-bottom));
}

.seo-footer p {
  max-width: 62ch;
  margin: 0;
  color: var(--seo-dim);
  font-size: 13px;
}

.seo-brand--footer .seo-brand__tagline {
  white-space: normal;
}

@media (min-width: 640px) {
  .seo-shell,
  .seo-header__inner,
  .seo-cta__inner,
  .seo-footer__inner {
    width: min(100% - 64px, var(--seo-shell));
  }

  .seo-related :is(.seo-related__grid, .related-grid, ul) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .seo-footer p {
    text-align: right;
  }
}

@media (max-width: 959.98px) {
  .seo-primary-nav {
    display: none;
  }

  .seo-lang-switch {
    margin-left: auto;
  }
}

@media (max-width: 519.98px) {
  body {
    font-size: 16.5px;
  }

  .seo-header__inner {
    gap: 10px;
  }

  .seo-brand__tagline {
    display: none;
  }

  .seo-button--header {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .seo-hero::before {
    left: -16px;
  }

  .seo-prose h2,
  .seo-faq h2,
  .seo-related h2 {
    margin-top: 64px;
  }

  .seo-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  .seo-hero {
    padding-left: 7vw;
  }

  .seo-hero::before {
    left: calc(7vw - 24px);
  }

  .seo-cta__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .seo-button {
    flex: 0 0 auto;
  }
}

@media (min-width: 1100px) {
  .seo-reading-grid {
    grid-template-columns: 220px minmax(0, var(--seo-reading));
    gap: clamp(72px, 8vw, 128px);
    justify-content: start;
  }

  .seo-toc {
    display: block;
    min-width: 0;
    padding-top: 72px;
  }

  .seo-toc nav {
    position: sticky;
    top: calc(var(--seo-header-height) + 32px);
  }

  .seo-toc :is(ol, ul) {
    margin: 0;
    padding: 0 0 0 16px;
    border-left: 1px solid var(--seo-line);
    list-style: none;
  }

  .seo-toc li + li {
    margin-top: 5px;
  }

  .seo-toc a {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 7px 0;
    color: var(--seo-dim);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: color 150ms ease;
    overflow-wrap: anywhere;
  }

  .seo-toc a:hover,
  .seo-toc a[aria-current="true"] {
    color: var(--seo-accent);
  }

  .seo-article {
    padding-top: 72px;
  }
}

@media (min-width: 1440px) {
  .seo-reading-grid {
    grid-template-columns: 240px minmax(0, var(--seo-reading));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #ffffff;
    color: #111111;
  }

  .seo-header,
  .seo-toc,
  .seo-cta,
  .seo-footer,
  .seo-skip-link {
    display: none;
  }

  .seo-shell,
  .seo-article {
    width: 100%;
    max-width: none;
  }

  .seo-reading-grid {
    display: block;
  }

  .seo-prose p,
  .seo-faq p,
  .seo-related p,
  .seo-prose :is(h2, h3, h4),
  .seo-faq :is(h2, h3),
  .seo-related :is(h2, h3) {
    color: #111111;
  }
}
