:root {
  --kromatic-shell-banner-height: 40px;
  --kromatic-shell-header-height: 65px;
  --kromatic-shell-total-height: calc(var(--kromatic-shell-banner-height) + var(--kromatic-shell-header-height));
  --kromatic-shell-container: 1200px;
  --kromatic-shell-ribbon: #deddd4;
  --kromatic-shell-ribbon-ink: #171716;
  --kromatic-shell-surface: #ffffff;
  --kromatic-shell-gold: #fde6ba;
  --kromatic-shell-gold-soft: #fff2d5;
  --kromatic-shell-gold-shadow: rgba(0, 0, 0, 0.25);
  --kromatic-shell-ink: #000000;
  --kromatic-shell-border: #deddd4;
  --kromatic-shell-outline: rgba(0, 0, 0, 0.12);
  --kromatic-shell-copy: #162038;
}

@media (max-width: 956px) {
  :root {
    --kromatic-shell-header-height: 50px;
  }
}

body.kromatic-book-shell-page {
  background: linear-gradient(180deg, #f5f2ea 0, #ffffff 320px);
  color: var(--kromatic-shell-copy);
}

.book > .header,
.book > .footer,
.book-body .book-header,
.book-summary .gitbook-link,
.book-summary .divider:last-of-type {
  display: none !important;
}

.kromatic-book-shell {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 40;
}

.kromatic-book-shell__announcement {
  background: var(--kromatic-shell-ribbon);
  color: var(--kromatic-shell-ribbon-ink);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  padding: 11px 16px;
  text-align: center;
}

.kromatic-book-shell__bar {
  background: var(--kromatic-shell-gold);
  box-shadow: 0 4px 4px 0 var(--kromatic-shell-gold-shadow);
}

.kromatic-book-shell__inner {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  height: var(--kromatic-shell-header-height);
  margin: 0 auto;
  max-width: var(--kromatic-shell-container);
  padding: 0 24px;
}

.kromatic-book-shell__brand-block {
  align-items: stretch;
  align-self: stretch;
  background: var(--kromatic-shell-surface);
  display: flex;
  margin-left: -24px;
}

.kromatic-book-shell__brand-block::after {
  background: linear-gradient(-45deg, var(--kromatic-shell-gold), var(--kromatic-shell-gold) 50%, var(--kromatic-shell-surface) 50%, var(--kromatic-shell-surface));
  content: "";
  display: block;
  width: var(--kromatic-shell-header-height);
}

.kromatic-book-shell__brand {
  align-items: center;
  display: flex;
  padding: 0 28px 0 40px;
  text-decoration: none;
}

.kromatic-book-shell__logo {
  display: block;
  height: 46px;
  width: auto;
}

.kromatic-book-shell__logo--mobile {
  display: none;
  height: 36px;
}

.kromatic-book-shell__nav {
  align-items: center;
  display: flex;
  gap: 24px;
}

.kromatic-book-shell__nav-link,
.kromatic-book-shell__nav-trigger,
.kromatic-book-shell__panel-links > a,
.kromatic-book-shell__panel-summary {
  color: var(--kromatic-shell-ink);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
}

.kromatic-book-shell__nav-link:hover,
.kromatic-book-shell__nav-link:focus-visible,
.kromatic-book-shell__nav-trigger:hover,
.kromatic-book-shell__nav-trigger:focus-visible,
.kromatic-book-shell__panel-links > a:hover,
.kromatic-book-shell__panel-links > a:focus-visible,
.kromatic-book-shell__panel-summary:hover,
.kromatic-book-shell__panel-summary:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.kromatic-book-shell__nav-menu {
  position: relative;
}

.kromatic-book-shell__nav-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  padding: 0;
}

.kromatic-book-shell__caret {
  border-bottom: 2px solid var(--kromatic-shell-ink);
  border-right: 2px solid var(--kromatic-shell-ink);
  display: inline-block;
  height: 8px;
  margin-top: -4px;
  transform: rotate(45deg);
  width: 8px;
}

.kromatic-book-shell__nav-dropdown {
  background: var(--kromatic-shell-gold);
  border: 1px solid var(--kromatic-shell-border);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
  display: grid;
  left: -16px;
  min-width: 228px;
  padding: 4px 0;
  position: absolute;
  top: calc(100% + 8px);
}

.kromatic-book-shell__nav-dropdown[hidden],
.kromatic-book-shell__member-dropdown[hidden],
.kromatic-book-shell__panel[hidden],
.kromatic-book-shell__modal[hidden] {
  display: none !important;
}

.kromatic-book-shell__nav-dropdown a {
  color: var(--kromatic-shell-ink);
  display: block;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  min-height: 40px;
  padding: 9px 16px;
  text-decoration: none;
}

.kromatic-book-shell__nav-dropdown a:hover,
.kromatic-book-shell__nav-dropdown a:focus-visible {
  background: var(--kromatic-shell-gold-soft);
}

.kromatic-book-shell__search {
  align-items: center;
  background: #f2f3f5;
  border: 1px solid var(--kromatic-shell-border);
  border-radius: 18px;
  display: flex;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  transition: width 140ms ease;
  width: 100px;
}

.kromatic-book-shell__search:focus-within {
  width: 200px;
}

.kromatic-book-shell__search-icon {
  display: inline-block;
  flex: 0 0 14px;
  height: 14px;
  position: relative;
  width: 14px;
}

.kromatic-book-shell__search-icon::before {
  border: 2px solid #8c8f93;
  border-radius: 999px;
  content: "";
  inset: 0 3px 3px 0;
  position: absolute;
}

.kromatic-book-shell__search-icon::after {
  background: #8c8f93;
  border-radius: 999px;
  bottom: 1px;
  content: "";
  height: 2px;
  position: absolute;
  right: 0;
  transform: rotate(45deg);
  width: 6px;
}

.kromatic-book-shell__search input {
  background: transparent;
  border: 0;
  color: var(--kromatic-shell-ink);
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.kromatic-book-shell__search input::placeholder {
  color: #8c8f93;
}

.kromatic-book-shell__actions,
.kromatic-book-shell__guest-actions,
.kromatic-book-shell__member-actions {
  align-items: center;
  display: flex;
  gap: 20px;
}

.kromatic-book-shell__button,
.kromatic-book-shell__member-dropdown a,
.kromatic-book-shell__member-dropdown button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 22px;
  min-height: 36px;
  padding: 0 16px;
  text-decoration: none;
}

.kromatic-book-shell__button {
  background: #171716;
  border: 1px solid #171716;
  color: #ffffff;
}

.kromatic-book-shell__button:hover,
.kromatic-book-shell__button:focus-visible {
  background: #30302e;
}

.kromatic-book-shell__button--ghost {
  background: #ffffff;
  color: #171716;
}

.kromatic-book-shell__button--ghost:hover,
.kromatic-book-shell__button--ghost:focus-visible {
  background: #f6f6f3;
}

.kromatic-book-shell__member-menu {
  position: relative;
}

.kromatic-book-shell__member-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--kromatic-shell-ink);
  cursor: pointer;
  display: inline-flex;
  gap: 12px;
  padding: 0;
}

.kromatic-book-shell__member-name {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.kromatic-book-shell__avatar {
  align-items: center;
  background: #171716;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  text-transform: uppercase;
  width: 28px;
}

.kromatic-book-shell__member-dropdown {
  background: #ffffff;
  border: 1px solid var(--kromatic-shell-outline);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 4px;
  min-width: 200px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
}

.kromatic-book-shell__member-dropdown a,
.kromatic-book-shell__member-dropdown button {
  background: transparent;
  border: 0;
  color: var(--kromatic-shell-ink);
  justify-content: flex-start;
  padding: 0 14px;
  text-align: left;
}

.kromatic-book-shell__member-dropdown a:hover,
.kromatic-book-shell__member-dropdown button:hover,
.kromatic-book-shell__member-dropdown a:focus-visible,
.kromatic-book-shell__member-dropdown button:focus-visible {
  background: #f5f2ea;
}

.kromatic-book-shell__menu-toggle {
  display: none;
}

.kromatic-book-shell__panel {
  background: var(--kromatic-shell-gold);
  border-top: 1px solid var(--kromatic-shell-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
  padding: 18px 24px 24px;
}

.kromatic-book-shell__panel-links,
.kromatic-book-shell__panel-actions,
.kromatic-book-shell__panel-member {
  display: grid;
  gap: 16px;
}

.kromatic-book-shell__panel-links {
  margin-bottom: 16px;
}

.kromatic-book-shell__panel-group {
  border-top: 1px solid var(--kromatic-shell-border);
  margin-top: 4px;
  padding-top: 16px;
}

.kromatic-book-shell__panel-summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  list-style: none;
}

.kromatic-book-shell__panel-summary::-webkit-details-marker {
  display: none;
}

.kromatic-book-shell__panel-sublinks {
  display: grid;
  gap: 12px;
  padding: 14px 0 0 16px;
}

.kromatic-book-shell__panel-sublinks a {
  color: var(--kromatic-shell-ink);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
}

.kromatic-book-shell__panel-search {
  margin-bottom: 16px;
  width: 100%;
}

.kromatic-book-shell__panel-search.kromatic-book-shell__search:focus-within,
.kromatic-book-shell__panel-search.kromatic-book-shell__search {
  width: 100%;
}

.kromatic-book-shell__panel-divider {
  background: var(--kromatic-shell-border);
  height: 1px;
  margin: 16px 0;
  width: 100%;
}

.kromatic-book-shell__guest-actions[hidden],
.kromatic-book-shell__member-actions[hidden],
.kromatic-book-shell__panel-actions[hidden],
.kromatic-book-shell__panel-member[hidden] {
  display: none !important;
}

.kromatic-book-shell__modal {
  inset: 0;
  position: fixed;
  z-index: 60;
}

.kromatic-book-shell__modal-backdrop {
  background: rgba(10, 15, 33, 0.66);
  inset: 0;
  position: absolute;
}

.kromatic-book-shell__modal-dialog {
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(10, 15, 33, 0.3);
  color: #152042;
  left: 50%;
  max-height: min(90vh, 760px);
  max-width: 560px;
  overflow: auto;
  padding: 32px;
  position: relative;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 32px);
}

.kromatic-book-shell__modal-close {
  background: transparent;
  border: 0;
  color: #53607d;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  position: absolute;
  right: 18px;
  top: 18px;
}

.kromatic-book-shell__auth-title {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 10px;
}

.kromatic-book-shell__auth-copy {
  color: #4b5671;
  margin: 0 0 20px;
}

.kromatic-book-shell__form {
  display: grid;
  gap: 14px;
}

.kromatic-book-shell__field {
  display: grid;
  gap: 6px;
}

.kromatic-book-shell__field label {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.kromatic-book-shell__field input {
  background: #fbfaf6;
  border: 1px solid #d9d7ce;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 14px;
}

.kromatic-book-shell__field-error,
.kromatic-book-shell__form-error {
  color: #c62828;
  font-size: 12px;
  font-weight: 700;
}

.kromatic-book-shell__auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.kromatic-book-shell__text-button {
  background: transparent;
  border: 0;
  color: #1a356f;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.kromatic-book-shell__submit {
  justify-self: start;
}

.book-summary,
.book-body {
  top: var(--kromatic-shell-total-height) !important;
}

.book-summary {
  background: linear-gradient(180deg, #f7f4ea 0, #fffdf8 100%);
  border-right: 1px solid rgba(21, 32, 66, 0.08);
}

.book-summary ul.summary li.active > a {
  color: #1a356f;
  font-weight: 700;
}

.book-summary ul.summary li a,
.book-summary ul.summary li span,
#book-search-input input {
  color: #223156;
}

#book-search-input {
  background: transparent;
  border-bottom-color: rgba(21, 32, 66, 0.08);
  border-top: 0;
  padding: 14px 12px 10px;
}

.book-body {
  background:
    radial-gradient(circle at top right, rgba(250, 173, 25, 0.16), transparent 28%),
    linear-gradient(180deg, #fffdf8 0, #ffffff 320px);
}

.page-inner {
  max-width: 900px;
  padding: 28px 24px 72px;
}

.markdown-section {
  color: #263452;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #152042;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

.markdown-section a {
  color: #1a356f;
}

.kromatic-book-cta {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(250, 173, 25, 0.15), rgba(255, 255, 255, 0.9)),
    #fff7e6;
  border: 1px solid rgba(239, 142, 12, 0.18);
  border-radius: 28px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 36px;
  padding: 24px;
}

.kromatic-book-cta__eyebrow {
  color: #9f5d00;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.kromatic-book-cta h2 {
  font-size: 26px;
  margin: 0 0 8px;
}

.kromatic-book-cta p {
  margin: 0;
}

.kromatic-book-cta a {
  align-items: center;
  background: #152042;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  min-width: 190px;
  padding: 0 20px;
  text-decoration: none;
}

.kromatic-book-footer {
  background: linear-gradient(135deg, #0d1233 0, #182251 100%);
  color: #ffffff;
  margin-top: 32px;
  padding: 28px;
}

.kromatic-book-footer__inner {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
}

.kromatic-book-footer__brand {
  align-items: center;
  display: flex;
  gap: 16px;
  max-width: 720px;
}

.kromatic-book-footer__brand img {
  display: block;
  max-height: 52px;
  width: auto;
}

.kromatic-book-footer__brand p {
  color: rgba(255, 255, 255, 0.84);
  margin: 0;
}

.kromatic-book-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-end;
}

.kromatic-book-footer__links a {
  color: #ffffff;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 956px) {
  .kromatic-book-shell__inner {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 16px;
  }

  .kromatic-book-shell__brand-block {
    background: transparent;
    margin-left: 0;
  }

  .kromatic-book-shell__brand-block::after,
  .kromatic-book-shell__logo--desktop,
  .kromatic-book-shell__nav,
  .kromatic-book-shell__inner > .kromatic-book-shell__search,
  .kromatic-book-shell__actions {
    display: none;
  }

  .kromatic-book-shell__brand {
    padding: 0;
  }

  .kromatic-book-shell__logo--mobile {
    display: block;
  }

  .kromatic-book-shell__menu-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid var(--kromatic-shell-outline);
    border-radius: 999px;
    color: var(--kromatic-shell-ink);
    display: inline-flex;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    line-height: 1;
    min-height: 38px;
    padding: 0 14px;
  }

  .page-inner {
    padding: 24px 20px 64px;
  }

  .kromatic-book-cta {
    grid-template-columns: 1fr;
  }

  .kromatic-book-footer {
    padding: 24px 20px;
  }

  .kromatic-book-footer__inner,
  .kromatic-book-footer__brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .kromatic-book-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .page-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kromatic-book-cta,
  .kromatic-book-footer__inner,
  .kromatic-book-footer__brand {
    grid-template-columns: 1fr;
    display: grid;
  }

  .kromatic-book-cta a,
  .kromatic-book-footer__links {
    justify-content: start;
  }
}
