:root {
  --bg: #f7f7f9;
  --panel: #ffffff;
  --ink: #20222a;
  --muted: #69707d;
  --line: #e7e9ef;
  --accent: #315cff;
  --accent-deep: #2446c8;
  --shadow: 0 18px 56px rgba(32, 34, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
}

.help-shell {
  width: min(1560px, calc(100vw - 32px));
  margin: 16px auto 40px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

.help-sidebar,
.help-overview-card,
.article-card,
.help-section-group {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.help-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.help-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.help-logo {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.help-brand strong,
.help-brand span { display: block; }
.help-brand span { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

.help-controls {
  display: grid;
  gap: 12px;
  margin: 16px 0 20px;
}

.help-language {
  display: inline-flex;
  gap: 8px;
}

.lang-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

.lang-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

#help-search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
}

.back-link {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 600;
}

.help-sections {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding-right: 4px;
}

.help-section-group {
  border-radius: var(--radius-md);
  padding: 14px;
}

.help-section-group h2,
.article-card h2,
.results-head h2 {
  margin: 0;
  font-family: var(--serif);
}

.help-section-group p,
.article-summary,
.article-body p,
.result-card p,
.empty-copy,
#overview-body {
  color: var(--muted);
  line-height: 1.55;
}

.help-section-links,
.related-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.help-link-button,
.result-card {
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}

.help-link-button.is-active,
.result-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 92, 255, 0.12);
}

.help-main {
  display: grid;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.help-overview-card,
.article-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.eyebrow,
.result-section {
  margin: 0 0 8px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.results-groups {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.results-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
}

.results-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.results-group-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.results-group-count {
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(49, 92, 255, 0.08);
  color: var(--accent-deep);
  font-weight: 700;
}

.result-row {
  display: block;
  align-items: start;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.result-row:hover,
.result-row:focus-visible,
.result-row.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 92, 255, 0.12);
  outline: none;
}

.result-row-main strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.result-row-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.article-components ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.article-nav {
  display: flex;
  align-items: center;
}

.back-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.back-button:hover,
.back-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.related-links a {
  color: var(--accent-deep);
  text-decoration: none;
}

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

  .help-sidebar {
    position: static;
  }

  .results-group-head {
    flex-direction: column;
    align-items: stretch;
  }
}
