:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f4f6f8;
}

.help-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid #d8dee7;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #172033;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: #667085;
  font-size: 11px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 42vw);
  min-height: 38px;
  border: 1px solid #cfd6e1;
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
}

.help-search:focus-within {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.help-search svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.help-search svg {
  flex: 0 0 auto;
  color: #667085;
}

.help-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #172033;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #cfd6e1;
  border-radius: 7px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
}

.icon-button:hover {
  border-color: #9eabbc;
  background: #eef2f7;
}

.theme-sun-icon {
  display: none;
}

:root[data-theme="dark"] .theme-moon-icon {
  display: none;
}

:root[data-theme="dark"] .theme-sun-icon {
  display: block;
}

.help-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 920px);
  justify-content: center;
  gap: 28px;
  padding: 28px clamp(18px, 4vw, 56px) 72px;
}

.help-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  border-right: 1px solid #d8dee7;
  padding-right: 18px;
}

.help-sidebar nav {
  display: grid;
  gap: 3px;
}

.help-sidebar a {
  border-radius: 6px;
  padding: 8px 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.help-sidebar a:hover,
.help-sidebar a.active {
  background: #eaf2ff;
  color: #1d4ed8;
}

.help-content {
  min-width: 0;
}

.help-topic {
  scroll-margin-top: 94px;
  border-bottom: 1px solid #d8dee7;
  padding: 0 0 42px;
  margin-bottom: 42px;
}

.help-topic[hidden] {
  display: none;
}

.help-topic article {
  border-top: 1px solid #e3e8ef;
  padding-top: 24px;
  margin-top: 28px;
}

.eyebrow {
  margin: 0 0 7px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #111827;
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  margin: 8px 0 16px;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin: 22px 0 10px;
  color: #172033;
  font-size: 17px;
  line-height: 1.3;
}

h4 {
  margin: 18px 0 8px;
  color: #344054;
  font-size: 13px;
}

p,
li,
td,
th {
  font-size: 13px;
  line-height: 1.62;
}

p {
  margin: 10px 0;
  color: #475467;
}

.lead {
  max-width: 760px;
  margin: 10px 0 32px;
  color: #475467;
  font-size: 15px;
}

.definition,
.note,
.caution {
  border-left: 3px solid #2563eb;
  padding: 10px 13px;
  background: #eff6ff;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.note {
  margin: 18px 0;
  border-left-color: #0f766e;
  background: #ecfdf5;
}

.caution {
  margin: 16px 0;
  border-left-color: #d97706;
  background: #fffbeb;
}

.steps,
.check-list {
  margin: 10px 0 18px;
  padding-left: 22px;
  color: #344054;
}

.steps li,
.check-list li {
  padding-left: 4px;
  margin: 5px 0;
}

.example-grid,
.before-after {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 20px;
}

.before-after {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contributor-list h3 {
  margin: 0;
  font-size: 16px;
}

.contributor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.contributor-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.contributor-links a:hover {
  text-decoration: underline;
}

.contributor-links svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contributor-links span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  text-transform: none;
}

.example-grid > div,
.before-after > div {
  min-width: 0;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 11px;
  background: #ffffff;
}

.example-grid strong,
.before-after span {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

code {
  border-radius: 4px;
  padding: 2px 4px;
  background: #edf1f6;
  color: #1f2937;
  font-size: 0.92em;
}

pre {
  max-width: 100%;
  margin: 10px 0 16px;
  overflow: auto;
  border-radius: 7px;
  padding: 12px;
  background: #111827;
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.example-grid pre,
.before-after pre {
  margin: 0;
}

table {
  width: 100%;
  margin: 12px 0 22px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border-bottom: 1px solid #dfe4eb;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
  text-transform: uppercase;
}

td {
  color: #475467;
}

td a {
  color: #1d4ed8;
  font-weight: 650;
}

.no-results {
  border: 1px dashed #b8c3d1;
  border-radius: 8px;
  padding: 32px;
  background: #ffffff;
  text-align: center;
}

.no-results h2 {
  margin-top: 0;
}

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

:root[data-theme="dark"] {
  color-scheme: dark;
  color: #f3f4f6;
  background: #101214;
}

:root[data-theme="dark"] body {
  background: #101214;
}

:root[data-theme="dark"] .help-header {
  border-color: #343a40;
  background: rgba(26, 29, 33, 0.97);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .brand {
  color: #f3f4f6;
}

:root[data-theme="dark"] .brand small,
:root[data-theme="dark"] p,
:root[data-theme="dark"] td {
  color: #aeb4bc;
}

:root[data-theme="dark"] .help-search,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .example-grid > div,
:root[data-theme="dark"] .before-after > div,
:root[data-theme="dark"] table,
:root[data-theme="dark"] .no-results {
  border-color: #3d444d;
  background: #1a1d21;
  color: #edf0f3;
}

:root[data-theme="dark"] .help-search:focus-within {
  border-color: #60a5fa;
  outline-color: rgba(96, 165, 250, 0.2);
}

:root[data-theme="dark"] .help-search input {
  color: #edf0f3;
}

:root[data-theme="dark"] .help-search input::placeholder {
  color: #7f8995;
}

:root[data-theme="dark"] .icon-button:hover {
  border-color: #59636f;
  background: #2a2f35;
}

:root[data-theme="dark"] .help-sidebar {
  border-color: #343a40;
}

:root[data-theme="dark"] .help-sidebar a {
  color: #b9c0c8;
}

:root[data-theme="dark"] .help-sidebar a:hover,
:root[data-theme="dark"] .help-sidebar a.active {
  background: #17263a;
  color: #7db4f4;
}

:root[data-theme="dark"] .help-topic,
:root[data-theme="dark"] .help-topic article {
  border-color: #343a40;
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
  color: #f3f4f6;
}

:root[data-theme="dark"] .lead,
:root[data-theme="dark"] .steps,
:root[data-theme="dark"] .check-list,
:root[data-theme="dark"] .definition {
  color: #c7cdd4;
}

:root[data-theme="dark"] .definition {
  border-left-color: #60a5fa;
  background: #17263a;
}

:root[data-theme="dark"] .note {
  border-left-color: #34d399;
  background: #13281f;
  color: #b7e4cf;
}

:root[data-theme="dark"] .caution {
  border-left-color: #f59e0b;
  background: #302318;
  color: #e8d2b5;
}

:root[data-theme="dark"] .example-grid strong,
:root[data-theme="dark"] .before-after span {
  color: #c7cdd4;
}

:root[data-theme="dark"] .contributor-links a,
:root[data-theme="dark"] .contributor-links span {
  color: #7db4f4;
}

:root[data-theme="dark"] code {
  background: #292e34;
  color: #e5e7eb;
}

:root[data-theme="dark"] pre {
  background: #0c0f12;
  color: #e5e7eb;
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: #343a40;
}

:root[data-theme="dark"] th {
  background: #292e34;
  color: #d5dae0;
}

:root[data-theme="dark"] td a {
  color: #7db4f4;
}

:root[data-theme="dark"] * {
  scrollbar-color: #4b545f #1a1d21;
}

@media (max-width: 860px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
    max-height: none;
    border: 0;
    border-bottom: 1px solid #d8dee7;
    padding: 0 0 14px;
  }

  .help-sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .help-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .header-actions,
  .help-search {
    width: 100%;
  }

  .help-sidebar nav,
  .before-after {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 27px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  .help-header,
  .help-sidebar {
    display: none;
  }

  body {
    background: #ffffff;
  }

  :root[data-theme="dark"],
  :root[data-theme="dark"] body {
    color: #172033;
    background: #ffffff;
  }

  .help-layout {
    display: block;
    padding: 0;
  }

  .help-topic {
    break-before: page;
  }

  .help-topic:first-child {
    break-before: auto;
  }

  pre,
  .example-grid > div,
  .before-after > div,
  table {
    break-inside: avoid;
  }
}
