:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4fbf7;
  color: #123728;
  --help-blue: #218a58;
  --help-blue-soft: #edf9f2;
  --help-border: #cfded5;
  --help-muted: #5a6472;
  --help-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.help-center {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4fbf7 42%, #edf9f2 100%);
  color: #123728;
}

.help-center-modal {
  min-height: 0;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 10px;
  background: #f6f8fb;
}

.help-center-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--help-border);
  background: rgba(249, 250, 251, 0.96);
  backdrop-filter: blur(12px);
}

.help-center-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-center-logo {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.help-center-title-text {
  display: grid;
  gap: 2px;
}

.help-center-title span {
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-center-title strong {
  color: #123728;
  font-size: 22px;
}

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

.help-secondary-action,
.help-return-link,
.help-primary-action,
.help-close-button {
  min-height: 32px;
  border: 1px solid var(--help-border);
  border-radius: 6px;
  background: #ffffff;
  color: #123728;
  cursor: pointer;
  text-decoration: none;
}

.help-secondary-action,
.help-return-link,
.help-primary-action {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 700;
}

.help-primary-action {
  width: max-content;
  border-color: var(--help-blue);
  background: var(--help-blue-soft);
  color: var(--help-blue);
}

.help-close-button {
  width: 34px;
  font-size: 22px;
  line-height: 1;
}

.help-center-body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.help-center-modal .help-center-body {
  min-height: 0;
  height: calc(min(820px, 100vh - 48px) - 64px);
}

.help-topic-rail {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 16px;
  border-right: 1px solid var(--help-border);
  overflow: auto;
}

.help-search {
  display: grid;
  gap: 6px;
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-search-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--help-border);
  border-radius: 7px;
  background: #ffffff;
  color: #123728;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.help-search-error,
.help-search-count,
.help-search-empty {
  margin: 0;
  color: var(--help-muted);
  font-size: 13px;
  line-height: 1.35;
}

.help-search-error {
  color: #a53b29;
}

.help-topic-group {
  display: grid;
  gap: 8px;
}

.help-topic-group h2 {
  margin: 0;
  color: var(--help-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.help-topic-list {
  display: grid;
  gap: 6px;
}

.help-topic-link {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
}

.help-topic-link[data-active="true"] {
  border-color: var(--help-blue);
  background: var(--help-blue-soft);
}

.help-topic-link:hover {
  border-color: #b5bfcc;
  background: #ffffff;
}

.help-topic-link-title {
  font-size: 14px;
  font-weight: 800;
}

.help-topic-link-summary {
  color: var(--help-muted);
  font-size: 12px;
  line-height: 1.35;
}

.help-topic-content {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 26px clamp(20px, 4vw, 48px) 42px;
  overflow: auto;
}

.help-topic-header {
  display: grid;
  gap: 8px;
  max-width: 780px;
}

.help-topic-eyebrow {
  margin: 0;
  color: var(--help-blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.help-topic-header h1,
.help-section h1,
.help-section h2,
.help-related h2 {
  margin: 0;
}

.help-topic-header h1,
.help-section h1 {
  font-size: 34px;
  line-height: 1.1;
}

.help-topic-summary {
  margin: 0;
  color: #394251;
  font-size: 16px;
  line-height: 1.45;
}

.help-section,
.help-related {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.help-section h2,
.help-related h2 {
  color: #123728;
  font-size: 19px;
}

.help-section p {
  margin: 0;
  color: #394251;
  font-size: 14px;
  line-height: 1.55;
}

.help-steps,
.help-bullets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.help-steps li,
.help-bullets li {
  color: #394251;
  font-size: 14px;
  line-height: 1.5;
}

.help-steps li p,
.help-term-list dd p {
  margin: 0;
}

.help-term-list {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.help-term-list dt {
  color: #123728;
  font-size: 14px;
  font-weight: 800;
}

.help-term-list dd {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #394251;
  font-size: 14px;
  line-height: 1.5;
}

.help-command-block {
  position: relative;
  max-width: 760px;
  overflow-x: hidden;
  border: 1px solid #b8c2cf;
  border-radius: 8px;
  background: #101722;
  color: #f4f7fb;
  font-family: "JetBrains Mono", "Courier New", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.help-command-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(190, 203, 222, 0.42);
  border-radius: 6px;
  background: rgba(244, 247, 251, 0.1);
  color: #f4f7fb;
  cursor: pointer;
}

.help-command-copy:hover,
.help-command-copy:focus-visible {
  background: rgba(244, 247, 251, 0.18);
}

.help-command-copy[data-copy-state="copied"] {
  border-color: #7dd8a6;
  color: #b6ffd3;
}

.help-command-copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.help-command-lines {
  margin: 0;
  padding: 14px 54px 14px 48px;
}

.help-command-lines li {
  padding: 0 0 0 10px;
  color: #8da2c0;
  font-variant-numeric: tabular-nums;
}

.help-command-lines code {
  display: inline;
  color: #f4f7fb;
  font-family: inherit;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.help-copy-fallback {
  position: fixed;
  left: -100vw;
  top: 0;
}

.help-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--help-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--help-blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.help-script-viewer {
  display: grid;
  gap: 10px;
  max-width: 880px;
}

.help-script-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.help-script-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--help-border);
  border-radius: 6px;
  background: #ffffff;
  color: #123728;
  cursor: pointer;
  font-weight: 800;
}

.help-script-tabs button[aria-selected="true"] {
  border-color: var(--help-blue);
  background: var(--help-blue-soft);
  color: var(--help-blue);
}

.help-script-source {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #b8c2cf;
  border-radius: 8px;
  background: #101722;
  color: #f4f7fb;
  font-size: 12px;
}

.help-code-lines {
  margin: 0;
  padding: 12px 0 12px 54px;
  counter-reset: item;
}

.help-code-lines li {
  padding: 0 14px 0 12px;
  color: #8da2c0;
  font-variant-numeric: tabular-nums;
}

.help-code-lines code {
  display: inline-block;
  min-width: 100%;
  padding-left: 10px;
  color: #f4f7fb;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  white-space: pre;
}

@media (max-width: 760px) {
  .help-center-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .help-center-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .help-center-body,
  .help-center-modal .help-center-body {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .help-topic-rail {
    max-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--help-border);
  }

  .help-topic-content {
    padding: 22px 18px 34px;
  }

  .help-topic-header h1,
  .help-section h1 {
    font-size: 28px;
  }

  .help-term-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .help-secondary-action,
  .help-return-link,
  .help-primary-action {
    width: 100%;
    justify-content: center;
  }
}
