:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --line: #e7eaf2;
  --text: #1f2430;
  --muted: #6c7384;
  --brand: #3461ff;
  --brand-soft: #edf2ff;
}

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

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 0 1rem 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 1rem 0.75rem;
  overflow: auto;
}

.sidebar-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.2rem 0.6rem 0.85rem;
}

#sidebar-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#sidebar-nav li {
  margin: 0;
}

#sidebar-nav a {
  display: block;
  text-decoration: none;
  color: #2f3648;
  padding: 0.34rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

#sidebar-nav a.nav-h2 {
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: #4f5668;
}

#sidebar-nav a.nav-h1 {
  font-size: 0.95rem;
}

#sidebar-nav a:hover {
  background: #eef2fb;
}

#sidebar-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.sidebar-subtitle {
  margin-top: 1.1rem;
}

.content-wrap {
  overflow: auto;
}

.content {
  max-width: 850px;
  margin: 0 auto;
  padding: 2.2rem 1.6rem 4rem;
}

.loading {
  color: var(--muted);
}

.content h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.content h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 0.65rem;
}

.content p {
  margin: 0.45rem 0 1rem;
}

.content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.content ul {
  margin: 0.35rem 0 1.1rem;
  padding-left: 1.2rem;
}

.content li {
  margin-bottom: 0.3rem;
}

.content a {
  color: var(--brand);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  margin: 0 0 0.7rem;
}

.faq-item summary {
  cursor: pointer;
  padding: 0.65rem 0.8rem;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  color: var(--brand);
  margin-right: 0.45rem;
}

.faq-item[open] summary::before {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 0.8rem 0.75rem 2rem;
}

.audit-cards {
  margin: 0.6rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.audit-card {
  border: 1px solid #d2d9e8;
  border-radius: 12px;
  background: #fbfcff;
  box-shadow: 0 1px 2px rgba(31, 36, 48, 0.06);
  padding: 0.95rem 1rem;
}

.audit-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.audit-card-subtitle {
  margin: 0.35rem 0 0.9rem;
  color: var(--muted);
}

.audit-card-button {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #d8e2ff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
}

.audit-card-button:hover {
  background: #e3ebff;
}

.page-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.next-page-button {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #d8e2ff;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
}

.next-page-button:hover {
  background: #e3ebff;
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 40vh;
  }
}
