:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-strong: #eceff1;
  --text: #202428;
  --muted: #626970;
  --border: #d9dde1;
  --accent: #c73e2f;
  --accent-dark: #972b20;
  --green: #16734a;
  --code-bg: #191d21;
  --code-text: #f4f6f8;
  --header-height: 64px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  overflow-wrap: anywhere;
}

:not(pre) > code {
  padding: 0.12em 0.34em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.9em;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 96%);
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 6px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9rem;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--text);
}

.docs-layout {
  display: grid;
  width: min(1180px, 100%);
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 64px;
  padding: 48px 32px 80px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  align-self: start;
  font-size: 0.9rem;
}

.sidebar-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar nav + .sidebar-title {
  margin-top: 30px;
}

.sidebar .on-page {
  margin-top: 28px;
}

.sidebar a {
  display: block;
  border-left: 2px solid transparent;
  padding: 7px 10px;
  color: var(--muted);
  text-decoration: none;
}

.sidebar a:hover {
  color: var(--text);
}

.sidebar a[aria-current="page"] {
  border-left-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

main {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 8vw, 4.7rem);
}

.doc-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h2 {
  margin: 58px 0 14px;
  font-size: 1.65rem;
}

h3 {
  margin: 32px 0 10px;
  font-size: 1.15rem;
}

p,
li,
dd {
  color: var(--muted);
}

.lede {
  max-width: 680px;
  margin: 16px 0 0;
  color: #3d444a;
  font-size: 1.16rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.action:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.action.primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

pre {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: 6px;
  background: var(--code-bg);
  padding: 20px 22px;
  color: var(--code-text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.diff-remove {
  color: #ff9a91;
}

.diff-add {
  color: #8de0b3;
}

.hljs-comment,
.hljs-quote {
  color: #9ba6ae;
}

.hljs-keyword,
.hljs-literal,
.hljs-meta,
.hljs-selector-tag {
  color: #ff9a91;
}

.hljs-attr,
.hljs-attribute,
.hljs-name,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-title {
  color: #8fc8ff;
}

.hljs-number,
.hljs-regexp,
.hljs-symbol,
.hljs-variable {
  color: #e4b8ff;
}

.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-string {
  color: #a8ddb5;
}

.hljs-addition {
  color: #8de0b3;
}

.hljs-deletion {
  color: #ff9a91;
}

.feature-grid {
  display: grid;
  margin-top: 38px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.feature {
  border-top: 3px solid var(--surface-strong);
  padding-top: 16px;
}

.feature:first-child {
  border-color: var(--accent);
}

.feature:nth-child(2) {
  border-color: var(--green);
}

.feature h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
}

.callout {
  margin: 28px 0;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 18px;
}

.callout p {
  margin: 0;
}

.option-list {
  margin: 22px 0 0;
}

.option {
  display: grid;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.5fr);
  gap: 28px;
}

.option:last-child {
  border-bottom: 1px solid var(--border);
}

.option dt,
.option dd {
  margin: 0;
}

.option dt code {
  font-weight: 700;
}

.meta {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.option dd p:first-child {
  margin-top: 0;
}

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

.rule-name {
  color: var(--text);
  font-weight: 700;
}

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 18px;
  }

  .topnav a.optional {
    display: none;
  }

  .docs-layout {
    display: block;
    padding: 28px 20px 64px;
  }

  .sidebar {
    position: static;
    margin-bottom: 38px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
  }

  .sidebar .on-page {
    display: none;
  }

  .sidebar nav:first-of-type {
    display: flex;
    gap: 6px;
  }

  .sidebar a {
    border: 0;
    padding: 6px 10px;
  }

  .sidebar a[aria-current="page"] {
    background: var(--surface-strong);
  }

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

  .option {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141719;
    --surface: #1d2124;
    --surface-strong: #282d31;
    --text: #f1f3f4;
    --muted: #aab0b5;
    --border: #353b40;
    --accent: #f06a5a;
    --accent-dark: #ff8b7e;
    --green: #55bc87;
    --code-bg: #0d0f10;
    --code-text: #f4f6f8;
  }

  .topbar {
    background: rgb(20 23 25 / 96%);
  }

  .lede {
    color: #d3d7da;
  }
}
