/* ==========================================================================
   luauengine.org
   Design tokens sampled from luau.org so the two sites read as one family:
     primary #335efd · dark bg #000 · body #d5d7dd · border #202227
     code surface #272930 · light bg #f7f7f8 · light nav #e6e7ea
   ========================================================================== */

:root {
  --primary: #335efd;
  --primary-hover: #2549d8;
  --primary-soft: rgba(51, 94, 253, 0.12);

  --radius: 8px;
  --radius-lg: 14px;
  --nav-h: 64px;

  --font-sans: 'Builder Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --maxw: 1180px;
}

html[data-theme='dark'] {
  --bg: #000000;
  --bg-alt: #08090b;
  --surface: #0e0f13;
  --surface-2: #16171c;
  --text: #d5d7dd;
  --text-dim: #9a9daa;
  --heading: #ffffff;
  --border: #202227;
  --border-soft: #17181c;
  --code-bg: #272930;
  --code-border: rgba(53, 55, 65, 0.75);
  --inline-code-bg: #353741;
  --inline-code-text: #d5d7dd;
  --nav-bg: rgba(0, 0, 0, 0.86);
  --link: #8fb4ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.6);

  --hl-keyword: #ff7bb0;
  --hl-string: #a8e6a1;
  --hl-comment: #7c8091;
  --hl-number: #f5c77e;
  --hl-builtin: #79b8ff;
}

html[data-theme='light'] {
  --bg: #f7f7f8;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #353741;
  --text-dim: #62656f;
  --heading: #0c0d11;
  --border: #d5d7dd;
  --border-soft: #e3e5ea;
  --code-bg: #f1f2f5;
  --code-border: #dcdee5;
  --inline-code-bg: #e6e7ea;
  --inline-code-text: #353741;
  --nav-bg: rgba(230, 231, 234, 0.9);
  --link: #2549d8;
  --shadow: 0 18px 48px rgba(15, 20, 40, 0.14);

  --hl-keyword: #b3009c;
  --hl-string: #1f7a3d;
  --hl-comment: #71757f;
  --hl-number: #9a5b00;
  --hl-builtin: #1c56c9;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  padding-top: var(--nav-h);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}

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

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

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

kbd {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-dim);
  background: var(--surface-2);
  white-space: nowrap;
}

::selection {
  background: var(--primary);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.nav-link {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius);
}
.nav-link:hover {
  color: var(--heading);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-link.active {
  color: var(--primary);
}

.search-trigger {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.search-trigger:hover {
  border-color: var(--primary);
}
.search-trigger span {
  flex: 1;
  text-align: left;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.icon-link,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.icon-link:hover,
.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--heading);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0 8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn-sm {
  padding: 11px 20px;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--heading);
}
.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-link {
  background: none;
  color: var(--heading);
  padding-left: 6px;
  padding-right: 6px;
}
.btn-link:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.hero {
  padding: 72px 0 40px;
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(46px, 7vw, 74px);
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}

.hero-tagline {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 18px;
  max-width: 34ch;
}
.hero-tagline strong {
  color: var(--heading);
  font-weight: 700;
}

.hero-official {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 30px;
  padding: 7px 14px 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--primary-soft);
  border: 1px solid rgba(51, 94, 253, 0.35);
  border-radius: 999px;
  line-height: 1.3;
}
.hero-official .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-art {
  display: flex;
  justify-content: center;
}
.hero-art img {
  width: min(100%, 440px);
  filter: drop-shadow(0 24px 60px rgba(51, 94, 253, 0.25));
}

/* --------------------------------------------------------------------------
   Home — sections
   -------------------------------------------------------------------------- */

.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section h2 {
  font-size: clamp(30px, 4vw, 38px);
  margin-bottom: 12px;
}
.section-lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 68ch;
  margin: 0 0 34px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.65;
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.target-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.target-name {
  font-weight: 700;
  color: var(--heading);
}
.target-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-stable {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.3);
}
.badge-beta {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
}
.badge-experimental {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}
html[data-theme='light'] .badge-stable {
  color: #15803d;
}
html[data-theme='light'] .badge-beta {
  color: #1d4ed8;
}
html[data-theme='light'] .badge-experimental {
  color: #92610a;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}
.home-split-copy h3 {
  font-size: 20px;
}
.home-split-copy p {
  color: var(--text-dim);
  font-size: 15px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}
.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text-dim);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.section-cta {
  text-align: center;
  border-top: 1px solid var(--border-soft);
}
.cta-inner .hero-actions {
  justify-content: center;
}
.cta-inner p {
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Code blocks
   -------------------------------------------------------------------------- */

.codeblock {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  margin: 1.4rem 0;
  overflow: hidden;
}
.codeblock-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 9px 14px;
  border-bottom: 1px solid var(--code-border);
  background: rgba(0, 0, 0, 0.16);
}
html[data-theme='light'] .codeblock-title {
  background: rgba(0, 0, 0, 0.03);
}
.codeblock pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
}
.codeblock code {
  font-family: var(--font-mono);
  font-size: 13.6px;
  line-height: 1.7;
  tab-size: 4;
  white-space: pre;
  color: var(--text);
}
.codeblock-terminal {
  max-width: 760px;
}

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.codeblock:hover .copy,
.copy:focus-visible {
  opacity: 1;
}
.codeblock:has(.codeblock-title) .copy {
  top: 6px;
}
.copy.copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}

.hl-k {
  color: var(--hl-keyword);
}
.hl-s {
  color: var(--hl-string);
}
.hl-c {
  color: var(--hl-comment);
  font-style: italic;
}
.hl-n {
  color: var(--hl-number);
}
.hl-b {
  color: var(--hl-builtin);
}

/* --------------------------------------------------------------------------
   Docs layout
   -------------------------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 232px;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 30px 12px 60px 0;
  border-right: 1px solid var(--border-soft);
  scrollbar-width: thin;
}
.sidebar-group {
  margin-bottom: 22px;
}
.sidebar-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 8px;
}
.docs-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-sidebar li a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 5px 8px;
  border-radius: 4px;
  line-height: 1.45;
}
.docs-sidebar li a:hover {
  background: var(--surface-2);
  color: var(--heading);
  text-decoration: none;
}
.docs-sidebar li a.active {
  background: var(--primary);
  color: #fff;
}

.docs-main {
  min-width: 0;
  padding: 30px 0 72px;
}
.docs-main h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.breadcrumbs a {
  color: var(--text-dim);
}

.page-lead {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 28px;
}

.docs-toc {
  position: sticky;
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 34px 0 40px;
  font-size: 13.5px;
}
.toc-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.docs-toc li a {
  display: block;
  color: var(--text-dim);
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  line-height: 1.45;
}
.docs-toc li a:hover {
  color: var(--heading);
  text-decoration: none;
}
.docs-toc li a.active {
  color: var(--primary);
  border-left-color: var(--primary);
}
.docs-toc .toc-l3 a {
  padding-left: 24px;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Markdown content
   -------------------------------------------------------------------------- */

.markdown > *:first-child {
  margin-top: 0;
}
.markdown h2 {
  font-size: 30px;
  margin-top: 2.4em;
  padding-top: 0.2em;
}
.markdown h3 {
  font-size: 21px;
  margin-top: 2em;
}
.markdown h4 {
  font-size: 17px;
  margin-top: 1.8em;
}
.markdown p {
  margin: 0 0 1.15rem;
}
.markdown ul,
.markdown ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
}
.markdown li {
  margin-bottom: 0.4rem;
}
.markdown li > ul,
.markdown li > ol {
  margin: 0.4rem 0 0;
}
.markdown img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.markdown code {
  font-family: var(--font-mono);
  font-size: 13.6px;
  background: var(--inline-code-bg);
  color: var(--inline-code-text);
  padding: 2px 6px;
  border-radius: 4px;
}
.markdown pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.markdown blockquote {
  margin: 1.4rem 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--primary);
  color: var(--text-dim);
}
.markdown blockquote p:last-child {
  margin-bottom: 0;
}

.anchor {
  opacity: 0;
  margin-left: 0.4em;
  color: var(--primary);
  font-weight: 400;
  text-decoration: none;
}
h1:hover > .anchor,
h2:hover > .anchor,
h3:hover > .anchor,
h4:hover > .anchor {
  opacity: 1;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--heading);
  font-weight: 700;
  background: var(--surface);
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}

/* Admonitions */
.admonition {
  margin: 1.5rem 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left-width: 3px;
  background: var(--surface);
}
.admonition-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.admonition-body > *:last-child {
  margin-bottom: 0;
}
.adm-note,
.adm-info {
  border-left-color: #60a5fa;
}
.adm-note .admonition-title,
.adm-info .admonition-title {
  color: #60a5fa;
}
.adm-tip {
  border-left-color: #4ade80;
}
.adm-tip .admonition-title {
  color: #4ade80;
}
.adm-warning,
.adm-caution {
  border-left-color: #fbbf24;
}
.adm-warning .admonition-title,
.adm-caution .admonition-title {
  color: #fbbf24;
}
.adm-danger {
  border-left-color: #f87171;
}
.adm-danger .admonition-title {
  color: #f87171;
}
.adm-official {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}
.adm-official .admonition-title {
  color: var(--primary);
}
html[data-theme='light'] .adm-tip .admonition-title {
  color: #15803d;
}
html[data-theme='light'] .adm-warning .admonition-title,
html[data-theme='light'] .adm-caution .admonition-title {
  color: #92610a;
}
html[data-theme='light'] .adm-note .admonition-title,
html[data-theme='light'] .adm-info .admonition-title {
  color: #1d4ed8;
}

/* Docs footer + pager */
.doc-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.edit-link {
  font-size: 14px;
  font-weight: 600;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.pager-link:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.pager-next {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}
.pager-dir {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.pager-title {
  font-weight: 700;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Standalone pages / news
   -------------------------------------------------------------------------- */

.page-head {
  padding: 56px 24px 8px;
}
.page-head h1 {
  font-size: clamp(34px, 5vw, 44px);
}
.page-standalone .markdown,
.page-news .markdown {
  padding-bottom: 72px;
}

.post {
  padding: 48px 24px 72px;
}
.post h1 {
  font-size: clamp(32px, 5vw, 44px);
}
.post-meta {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.news-list {
  padding-bottom: 72px;
  display: grid;
  gap: 14px;
}
.news-item {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
}
.news-item:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.news-item h2 {
  font-size: 22px;
  margin: 0 0 6px;
}
.news-item p {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 15px;
}
.news-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.notfound {
  padding: 96px 24px 120px;
  text-align: center;
}
.notfound-code {
  font-size: 84px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 0 0 8px;
}
.notfound .hero-actions {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Search modal
   -------------------------------------------------------------------------- */

.search-modal[hidden] {
  display: none;
}
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: center;
  padding: 12vh 20px 20px;
}
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.search-panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.search-field input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--heading);
}
.search-results {
  overflow-y: auto;
  padding: 8px;
}
.search-empty {
  padding: 26px 18px 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
}
.search-result:hover,
.search-result.active {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.search-result:hover .sr-section,
.search-result.active .sr-section,
.search-result:hover .sr-snippet,
.search-result.active .sr-snippet {
  color: rgba(255, 255, 255, 0.82);
}
.sr-section {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-dim);
}
.sr-title {
  display: block;
  font-weight: 700;
  color: inherit;
}
.sr-snippet {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result mark {
  background: rgba(51, 94, 253, 0.35);
  color: inherit;
  border-radius: 2px;
}
.search-result.active mark,
.search-result:hover mark {
  background: rgba(255, 255, 255, 0.28);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 0;
  font-size: 14.5px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 40px;
}
.footer-brand img {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}
.footer-statement {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--heading);
  max-width: 30ch;
}
.footer-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  max-width: 40ch;
  line-height: 1.6;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li {
  margin-bottom: 7px;
}
.footer-col a {
  color: var(--text);
}
.footer-col a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 18px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 32px;
  }
  .docs-toc {
    display: none;
  }
  .home-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 940px) {
  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }
  .search-trigger {
    max-width: 40px;
    justify-content: center;
    padding: 9px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy {
    order: 2;
  }
  .hero-art {
    order: 1;
  }
  .hero-tagline {
    max-width: none;
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  body.nav-open .nav-links {
    display: flex;
  }
  .brand span {
    font-size: 17px;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    margin-bottom: 8px;
  }
  .docs-main {
    padding-top: 12px;
  }
  .docs-main h1 {
    font-size: 34px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager-next {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .theme-toggle .theme-label {
    display: none;
  }
  .btn {
    padding: 13px 20px;
    font-size: 15px;
  }
  .section {
    padding: 48px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
