:root {
  --gb-blue: rgb(40 95 150);
  --gb-blue-hover: rgb(32 79 126);
  --gb-blue-rgb: 40 95 150;
  --gb-ink: #18283b;
  --gb-copy: #43566a;
  --gb-muted: #718096;
  --gb-line: #dfe5ec;
  --gb-soft-line: #e8edf2;
  --gb-page: #fbfcfd;
  --gb-focus: #f5a623;
  --md-primary-fg-color: var(--gb-blue);
  --md-primary-fg-color--light: #4c7fab;
  --md-primary-fg-color--dark: var(--gb-blue-hover);
  --md-accent-fg-color: var(--gb-blue);
  --md-typeset-a-color: #25679f;
  --md-default-fg-color: var(--gb-ink);
  --md-default-bg-color: var(--gb-page);
  --md-text-font: "Aptos", "Segoe UI", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  background: var(--gb-page);
  color: var(--gb-ink);
  font-family: var(--md-text-font);
}

/* Gradebird public-site shell */
.gb-help-header {
  position: sticky;
  z-index: 60;
  top: 0;
  height: auto;
  border-bottom: 1px solid #e4e9ef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 12px rgba(24, 40, 59, 0.035);
  color: var(--gb-ink);
  backdrop-filter: blur(16px);
}

.gb-help-nav {
  position: relative;
  width: min(100%, 1440px);
  min-height: 4.25rem;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
}

.gb-help-nav-left,
.gb-help-actions {
  display: flex;
  align-items: center;
}

.gb-help-nav-left {
  min-width: 0;
  gap: 0.8rem;
}

.gb-help-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #1b2d42;
  font-size: 1.2rem;
  font-weight: 720;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.gb-help-brand:hover,
.gb-help-brand:focus {
  color: #1b2d42;
}

.gb-help-brand img {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
}

.gb-help-brand-divider {
  width: 1px;
  height: 1.65rem;
  margin-left: 0.2rem;
  background: #d8e0e8;
}

.gb-help-section {
  color: #506276;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.gb-help-section:hover {
  color: var(--gb-blue);
}

.gb-help-actions {
  justify-self: end;
  gap: 0.45rem;
}

.gb-help-search-trigger {
  min-width: 9.5rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.75rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #dbe3ea;
  border-radius: 0.6rem;
  background: #f6f8fa;
  color: #56687b;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 550;
}

.gb-help-search-trigger:hover {
  border-color: #c3d0dc;
  background: #f1f5f8;
  color: var(--gb-blue);
}

.gb-help-search-trigger svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentcolor;
}

.gb-help-actions > .md-search {
  width: 14.5rem;
}

.gb-help-actions > .md-search .md-search__inner {
  width: 100%;
  padding: 0;
  border: 1px solid #dbe3ea;
  border-radius: 0.6rem;
  box-shadow: none;
}

.gb-help-actions > .md-search .md-search__inner:focus-within {
  border-color: var(--gb-blue);
  box-shadow: 0 0 0 3px rgb(var(--gb-blue-rgb) / 0.18);
}

.gb-help-actions > .md-search .md-search__form {
  height: 2.45rem;
  border-radius: 0.6rem;
  background: #f6f8fa;
}

.gb-help-actions > .md-search .md-search__input {
  font-size: 0.78rem;
}

.gb-help-actions > .md-search .md-search__input:focus-visible {
  outline: none;
}

.gb-help-actions > .md-search .md-search__icon {
  color: #607286;
}

@media screen and (min-width: 60em) {
  [data-md-toggle="search"]:checked ~ .md-header .gb-help-actions > .md-search .md-search__inner {
    width: 30rem;
    border-color: var(--gb-blue);
    border-radius: 0.65rem;
    box-shadow:
      0 0 0 3px rgb(var(--gb-blue-rgb) / 0.18),
      0 16px 36px rgba(24, 40, 59, 0.16);
  }

  [data-md-toggle="search"]:checked ~ .md-header .gb-help-actions > .md-search .md-search__form {
    border-radius: 0.6rem 0.6rem 0 0;
    box-shadow: none;
  }

  [data-md-toggle="search"]:checked ~ .md-header .gb-help-actions > .md-search .md-search__input::placeholder {
    color: #718096;
  }

  [data-md-toggle="search"]:checked ~ .md-header .gb-help-actions > .md-search .md-search__output {
    top: calc(2.45rem - 1px);
    overflow: hidden;
    border: 1px solid #c8d8e6;
    border-top: 1px solid #e2e9ef;
    border-radius: 0 0 0.6rem 0.6rem;
    background: #fff;
    box-shadow: 0 16px 36px rgba(24, 40, 59, 0.16);
  }

  [data-md-toggle="search"]:checked ~ .md-header .gb-help-actions > .md-search .md-search-result__meta {
    min-height: 2.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
  }
}

.gb-help-open-app {
  min-height: 2.5rem;
  padding: 0.68rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gb-blue);
  border-radius: 0.65rem;
  background: var(--gb-blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.gb-help-open-app:hover {
  transform: translateY(-1px);
  border-color: var(--gb-blue-hover);
  background: var(--gb-blue-hover);
  color: #fff;
}

.gb-help-menu {
  display: none;
  color: var(--gb-ink);
}

/* Documentation frame */
.md-container {
  background:
    radial-gradient(circle at 88% 3%, rgb(var(--gb-blue-rgb) / 0.055), transparent 23rem),
    linear-gradient(145deg, #fbfcfd 0%, #f5f8fa 100%);
}

.md-main__inner {
  width: min(100%, 1360px);
  max-width: none;
  margin-top: 0;
  padding: 2.6rem 2rem 4.5rem;
  gap: clamp(1.25rem, 2vw, 2rem);
}

.md-sidebar {
  height: auto;
  padding: 0;
}

.md-sidebar--primary {
  width: 15.25rem;
}

.md-sidebar--secondary {
  width: 12rem;
}

.md-sidebar__scrollwrap {
  margin: 0;
}

.md-sidebar__inner {
  padding: 1rem 0;
}

.md-sidebar--primary .md-sidebar__inner,
.md-sidebar--secondary .md-sidebar__inner {
  border: 1px solid var(--gb-soft-line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(24, 40, 59, 0.04);
}

.md-nav {
  color: #4a5d70;
  font-size: 0.86rem;
}

.md-nav__title {
  padding: 0.45rem 1rem 0.8rem;
  background: transparent;
  box-shadow: none;
  color: var(--gb-ink);
  font-size: 0.8rem;
  font-weight: 720;
  letter-spacing: 0.025em;
}

.md-nav__item {
  padding: 0 0.55rem;
}

.md-nav__link {
  margin: 0.08rem 0;
  padding: 0.52rem 0.68rem;
  border-radius: 0.48rem;
  color: #506276;
  line-height: 1.35;
}

.md-nav__link:hover,
.md-nav__link:focus,
.md-nav__link--active {
  background: #edf3f8;
  color: var(--gb-blue);
}

.md-nav__item--section > .md-nav__link {
  margin-top: 0.65rem;
  background: transparent;
  color: var(--gb-ink);
  font-size: 0.8rem;
  font-weight: 720;
}

.md-content {
  max-width: 58rem;
}

.md-main__inner:has(.md-sidebar--secondary:not([hidden])) .md-content {
  max-width: 52rem;
}

.md-content__inner {
  min-height: 42rem;
  margin: 0;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.8rem, 4.4vw, 4.25rem) 4rem;
  border: 1px solid var(--gb-soft-line);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 18px 48px rgba(24, 40, 59, 0.055);
}

.md-typeset {
  color: #34495e;
  font-size: 1rem;
  line-height: 1.72;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--gb-ink);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.md-typeset h1 {
  margin: 0 0 1.45rem;
  font-size: clamp(2.35rem, 4vw, 3.25rem);
  line-height: 1.02;
}

.md-typeset h1::before {
  content: "GRADEBIRD HELP";
  margin-bottom: 0.8rem;
  display: block;
  color: var(--gb-blue);
  font-family: var(--md-code-font);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.md-typeset h2 {
  margin-top: 2.35rem;
  margin-bottom: 0.8rem;
  padding-top: 0.35rem;
  font-size: 1.55rem;
  line-height: 1.15;
}

.md-typeset h3 {
  font-size: 1.08rem;
}

.md-typeset p,
.md-typeset li {
  color: #43566a;
}

.md-typeset a {
  color: #25679f;
  font-weight: 600;
  text-decoration-color: rgb(var(--gb-blue-rgb) / 0.32);
  text-underline-offset: 0.14em;
}

.md-typeset a:hover {
  color: var(--gb-blue-hover);
  text-decoration: underline;
}

/* Make the heading itself the permalink instead of displaying Material's ¶ marker. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  position: relative;
}

.md-typeset .headerlink {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
  overflow: hidden;
  color: transparent;
  cursor: pointer;
  opacity: 1;
  text-indent: -9999px;
}

.md-typeset .headerlink:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid var(--gb-focus);
  outline-offset: 0.2rem;
}

.md-typeset ul,
.md-typeset ol {
  padding-left: 1.15rem;
}

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid #cbdbe8;
  border-radius: 0.7rem;
  background: #f3f7fa;
  box-shadow: none;
}

.md-typeset .admonition {
  font-size: 0.95rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  border-bottom: 1px solid #dce7ef;
  background: #eaf2f7;
  color: var(--gb-ink);
}

.md-typeset .admonition-title {
  font-size: 1rem;
}

.md-typeset code {
  border-radius: 0.3rem;
  background: #eef3f6;
}

/* Search keeps Material's behavior but uses Gradebird's visual language. */
.md-search__inner {
  border-radius: 0.75rem;
  box-shadow: 0 18px 48px rgba(24, 40, 59, 0.16);
}

.md-search__form {
  border-radius: 0.75rem 0.75rem 0 0;
  background: #f6f8fa;
}

.md-search__input {
  color: var(--gb-ink);
}

.md-search__input::placeholder {
  color: #718096;
}

.md-search-result__meta {
  background: #edf3f8;
  color: #5b6d80;
}

/* Gradebird public footer */
.gb-help-footer {
  border-top: 1px solid var(--gb-line);
  background: #fff;
}

.gb-help-footer-inner {
  width: min(100%, 1360px);
  min-height: auto;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-help-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.gb-help-footer nav a {
  color: #4e6680;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
}

.gb-help-footer nav a:hover {
  color: var(--gb-blue);
}

.gb-help-footer nav span {
  color: #8999a8;
}

.md-typeset a:focus-visible,
.gb-help-header a:focus-visible,
.gb-help-search-trigger:focus-visible,
.md-nav a:focus-visible,
.md-search__input:focus-visible,
.gb-help-footer a:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid var(--gb-focus);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .gb-help-nav {
    padding: 0 1rem;
  }

  .gb-help-menu {
    margin: 0;
    display: inline-flex;
  }

  .gb-help-search-trigger {
    min-width: 0;
    display: inline-flex;
  }

  .gb-help-search-trigger span {
    display: none;
  }

  .gb-help-actions > .md-search {
    width: auto;
  }

  .gb-help-brand-divider,
  .gb-help-section {
    display: none;
  }

  .md-main__inner {
    padding: 1.4rem 1rem 3rem;
  }

  .md-content {
    max-width: none;
  }

  .md-content__inner {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .gb-help-brand {
    gap: 0.5rem;
    font-size: 1.02rem;
  }

  .gb-help-brand img {
    width: 2.15rem;
    height: 2.15rem;
  }

  .gb-help-open-app {
    padding-inline: 0.72rem;
  }

  .md-content__inner {
    padding: 1.8rem 1.2rem 2.6rem;
    border-radius: 0.72rem;
  }

  .md-typeset h1 {
    font-size: 2.2rem;
  }

  .gb-help-footer-inner {
    padding: 1.55rem 1.1rem;
  }

  .gb-help-footer nav {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
