@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap");

:root {
  --color-primary: #d64000;
  --color-primary-hover: #bd3800;
  --color-text: #040219;
  --color-text-muted: #4a4a4a;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-border: #dbdbdb;
  --color-link: #3273dc;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--color-link);
}

.docs-header {
  align-items: center;
  background: var(--color-text);
  display: flex;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.docs-header__logo {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.docs-header__logo span {
  color: var(--color-primary);
}

.docs-header__nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.docs-header__nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  text-decoration: none;
}

.docs-body {
  min-height: calc(100vh - 7rem);
}

.docs-body--with-sidebar {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
}

.docs-sidebar {
  background: var(--color-bg-alt);
  border-right: 1px solid var(--color-border);
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 3.5rem;
}

.docs-tree,
.docs-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.docs-tree ul {
  margin-top: 0.35rem;
  padding-left: 1rem;
}

.docs-tree li {
  margin: 0.3rem 0;
}

.docs-tree a,
.docs-tree summary {
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
}

.docs-tree a:hover {
  color: var(--color-primary);
}

.docs-tree a.is-active {
  background: #ffffff;
  border-left: 3px solid var(--color-primary);
  color: var(--color-primary);
  display: block;
  font-weight: 600;
  margin-left: -0.5rem;
  padding: 0.2rem 0.4rem 0.2rem calc(0.5rem - 3px);
}

.docs-main {
  margin: 0 auto;
  max-width: 92rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
  width: 100%;
}

h1, h2, h3 {
  color: var(--color-text);
  line-height: 1.25;
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 0.75rem;
}

h2 {
  border-bottom: 1px solid var(--color-border);
  font-size: 1.45rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.35rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.toc-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.toc-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  display: block;
  min-height: 6rem;
  padding: 1rem;
  text-decoration: none;
}

.toc-card:hover {
  border-color: var(--color-primary);
}

.toc-card__title {
  font-weight: 600;
}

.toc-card__desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.doc-content {
  max-width: 76rem;
}

.doc-content img {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  height: auto;
  max-width: 100%;
}

.doc-content table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  width: 100%;
}

.doc-content th,
.doc-content td {
  border: 1px solid var(--color-border);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.doc-content th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

.doc-content pre {
  background: #0d1117;
  border-radius: 6px;
  color: #e6edf3;
  overflow-x: auto;
  padding: 1rem;
}

.doc-content pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.doc-content :not(pre) > code {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.1rem;
}

.iqdoc-viewer-title-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.iqdoc-viewer-title-copy {
  min-width: 0;
}

.title {
  color: #984806;
  font-size: 2.6rem;
  line-height: 1.1em;
  margin-bottom: 0.05em;
}

.subtitle {
  color: #e36c0a;
  font-size: 2.6rem;
  line-height: 1.1em;
  margin-bottom: 0.05em;
}

#TitleRuler {
  background-color: #000;
  border: none;
  color: #000;
  height: 1px;
  margin-bottom: 1rem;
  margin-top: calc(0.05em + 4px);
  width: 100%;
}

.doc-attachment,
.doc-include-link {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
}

.highlighted-block {
  border-left: 4px solid var(--color-primary);
  margin: 1rem 0;
  padding: 0.75rem 1rem;
}

.more-info {
  display: inline-flex;
  gap: 0.25rem;
}

.more-info sup {
  color: var(--color-primary);
  font-weight: 600;
}

.more-info__text {
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.doc-invalid-component {
  color: var(--color-primary);
  font-size: 0.9em;
}

.docs-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 1rem;
  text-align: center;
}

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

  .docs-header__nav {
    margin-left: 0;
  }

  .docs-body--with-sidebar {
    display: block;
  }

  .docs-sidebar {
    border-bottom: 1px solid var(--color-border);
    border-right: 0;
    max-height: none;
    position: static;
  }
}
