/* OrientationJ site — custom styling on top of Material for MkDocs. */

/* Helvetica everywhere (theme.font is disabled, no Google Fonts loaded);
   code keeps a monospace stack for legibility */
:root {
  --md-text-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --md-code-font: "Menlo", "Consolas", "Liberation Mono", monospace;
}

/* accent: the blue used throughout the repository's figures */
:root {
  --md-accent-fg-color: #4878a8;
  --md-typeset-a-color: #4878a8;
}
[data-md-color-scheme="slate"] {
  --md-typeset-a-color: #7ba7d7;
  --md-accent-fg-color: #7ba7d7;
}

/* book-like measure: slightly narrower content column */
.md-grid {
  max-width: 1160px;
}

/* headings: calm weight, a rule under H1 like a chapter head */
.md-typeset h1 {
  font-weight: 600;
  color: var(--md-default-fg-color);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.3em;
}
.md-typeset h2 {
  font-weight: 600;
}

/* page banner above the title: a book title page, centered */
.md-typeset .oj-banner {
  text-align: center;
  margin: 0 0 1.6em 0;
}
.md-typeset .oj-banner .oj-logo {
  height: 38px;
  width: auto;
  margin: 0 auto;
}
.md-typeset .oj-banner hr {
  border: none;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin: 0.6em 0;
}
.md-typeset .oj-banner p {
  margin: 0.3em 0;
}
.md-typeset .oj-subtitle {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--md-default-fg-color);
  margin: 0.2em 0 0.2em;
}
.md-typeset .oj-author,
.md-typeset .oj-author a {
  font-size: 0.6rem;
  line-height: 1;
  color: var(--md-default-fg-color--lighter);
}
.md-typeset .oj-author a:hover {
  color: var(--md-accent-fg-color);
}
.md-typeset .oj-date {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lighter);
}
.md-typeset .oj-banner .oj-tree {
  width: 100%;
  display: block;
  margin: 0.2em 0 0;
}

/* comfortable body text */
.md-typeset {
  font-size: 0.78rem;
  line-height: 1.6;
}

/* keep the left navigation visible on medium screens (default: >= 76.25em) */
@media screen and (min-width: 60em) and (max-width: 76.234375em) {
  .md-header__button[for="__drawer"] {
    display: none;
  }
  .md-sidebar--primary {
    display: block;
    position: sticky;
    top: 2.4rem;
    height: auto;
    transform: none;
    width: 12.1rem;
    background-color: transparent;
    z-index: 0;
  }
  .md-sidebar--primary .md-nav__title {
    background: none;
    box-shadow: none;
    color: var(--md-default-fg-color--light);
  }
  .md-sidebar--primary .md-nav__title[for="__drawer"] {
    display: none;
  }
}

/* before/after comparison slider (docs/javascripts/compare.js) */
.md-typeset .oj-compare {
  --pos: 50%;
  position: relative;
  display: block;
  max-width: 520px;
  margin: 1.4em auto 0.6em;
  line-height: 0;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.md-typeset .oj-compare img {
  margin: 0;
  width: 100%;
  display: block;
}
.md-typeset .oj-compare img + img {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.md-typeset .oj-compare .oj-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.md-typeset .oj-compare .oj-compare-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
.md-typeset .oj-compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.md-typeset .oj-compare input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 100%;
}
.md-typeset .oj-caption {
  text-align: center;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
  margin: 0 0 1.6em;
}
