/* Lisaris EO Studio documentation.
 *
 * Palette and chrome follow the API reference at /docs on the API domain:
 * Axine indigo on near-black surfaces, the Axine wordmark in the header bar,
 * the same three-column grammar of sidebar, prose and page contents.
 *
 * Everything is same-origin. Caddy's CSP for the site domain allows
 * style-src 'self' 'unsafe-inline', font-src 'self' data: and
 * img-src 'self' data: blob: https://*.mapbox.com, so there is no external
 * stylesheet, no font host and no image host. Plus Jakarta Sans is vendored
 * beside this file because it is the typeface the product itself uses.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/jakarta-latin.woff2") format("woff2");
  unicode-range: u+00??, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da,
                 u+02dc, u+0304, u+0308, u+0329, u+2000-206f, u+20ac, u+2122,
                 u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/jakarta-latin-ext.woff2") format("woff2");
  unicode-range: u+0100-02ba, u+02bd-02c5, u+02c7-02cc, u+02ce-02d7,
                 u+02dd-02ff, u+0304, u+0308, u+0329, u+1d00-1dbf,
                 u+1e00-1e9f, u+1ef2-1eff, u+2020, u+20a0-20ab, u+20ad-20c0,
                 u+2113, u+2c60-2c7f, u+a720-a7ff;
}

/* --------------------------------------------------------------- palette */

:root {
  color-scheme: light;

  --bg: #FFFFFF;
  --bg-2: #F7F7FA;
  --bg-3: #EFEFF4;
  --rule: #E5E7EB;
  --rule-soft: #EFEFF3;

  --fg: #16161F;
  --fg-2: #4B4B5C;
  --fg-3: #6E6E82;

  --accent: #4338CA;
  --accent-bg: #EEEDFB;
  --accent-rule: #C7C2F0;

  --warn: #8A5A10;
  --warn-bg: #FCF4E6;
  --warn-rule: #E7CFA3;

  --ok: #1D6B4F;

  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --shadow: 0 1px 2px rgba(16, 16, 31, .04), 0 8px 24px rgba(16, 16, 31, .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-doc-theme="light"]) {
    color-scheme: dark;

    --bg: #07080D;
    --bg-2: #0E0F1A;
    --bg-3: #161826;
    --rule: #1F2130;
    --rule-soft: #161824;

    --fg: #E7E7EF;
    --fg-2: #B9B9C9;
    --fg-3: #86869C;

    --accent: #8B8DF7;
    --accent-bg: #14152A;
    --accent-rule: #2E3060;

    --warn: #D9A55A;
    --warn-bg: #1C1710;
    --warn-rule: #4A3A1E;

    --ok: #4CBE90;

    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .4);
  }
}

:root[data-doc-theme="dark"] {
  color-scheme: dark;

  --bg: #07080D;
  --bg-2: #0E0F1A;
  --bg-3: #161826;
  --rule: #1F2130;
  --rule-soft: #161824;

  --fg: #E7E7EF;
  --fg-2: #B9B9C9;
  --fg-3: #86869C;

  --accent: #8B8DF7;
  --accent-bg: #14152A;
  --accent-rule: #2E3060;

  --warn: #D9A55A;
  --warn-bg: #1C1710;
  --warn-rule: #4A3A1E;

  --ok: #4CBE90;

  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------------------------------------------------------------- header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font: 500 13px/1.2 var(--sans);
  color: var(--fg-3);
}

.masthead .home { display: flex; align-items: center; }
.masthead img { display: block; height: 30px; width: auto; }
.masthead .on-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-doc-theme="light"]) .masthead .on-light { display: none; }
  :root:not([data-doc-theme="light"]) .masthead .on-dark { display: block; }
}
:root[data-doc-theme="dark"] .masthead .on-light { display: none; }
:root[data-doc-theme="dark"] .masthead .on-dark { display: block; }
:root[data-doc-theme="light"] .masthead .on-light { display: block; }
:root[data-doc-theme="light"] .masthead .on-dark { display: none; }

.masthead .title { color: var(--fg-3); }
.masthead .spacer { flex: 1; }

.masthead .out {
  color: var(--fg-3);
  font-weight: 500;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
}
.masthead .out:hover { color: var(--fg); border-color: var(--fg-3); text-decoration: none; }

.themebtn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
}
.themebtn:hover { color: var(--fg); border-color: var(--fg-3); }
.themebtn svg { width: 15px; height: 15px; }

/* ----------------------------------------------------------------- shell */

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 208px;
  gap: 0;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1240px) { .shell { grid-template-columns: 250px minmax(0, 1fr); } }
@media (max-width: 900px)  { .shell { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- sidebar */

.sidebar {
  position: sticky;
  top: 51px;
  max-height: calc(100vh - 51px);
  overflow-y: auto;
  padding: 26px 20px 60px 22px;
  border-right: 1px solid var(--rule);
  font-size: 14px;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 24px;
  }
}

.sidebar .group {
  margin: 22px 0 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.sidebar .group:first-child { margin-top: 0; }

.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0; }

.sidebar li a {
  display: flex;
  gap: 9px;
  padding: 5px 10px 5px 9px;
  border-radius: 7px;
  color: var(--fg-2);
  line-height: 1.4;
}
.sidebar li a:hover { background: var(--bg-2); color: var(--fg); text-decoration: none; }

.sidebar li a.here {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

.sidebar .n {
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  font-size: 12.5px;
  min-width: 15px;
}
.sidebar li a.here .n { color: var(--accent); }

/* ----------------------------------------------------------------- prose */

main {
  min-width: 0;
  padding: 40px 46px 96px;
}
@media (max-width: 900px) { main { padding: 32px 22px 72px; } }

.crumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(28px, 3.6vw, 37px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 14px;
  text-wrap: balance;
}

.lede {
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 34px;
  max-width: 68ch;
}

h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.011em;
  font-weight: 650;
  color: var(--fg);
  margin: 46px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 68px;
  text-wrap: balance;
}
h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 34px; }

h3 {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--fg);
  margin: 28px 0 9px;
  scroll-margin-top: 68px;
}

p { margin: 0 0 14px; max-width: 70ch; }

ul, ol { max-width: 70ch; margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--fg-3); }

strong { color: var(--fg); font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 34px 0; }

/* --------------------------------------------------------------- figures */

figure {
  margin: 26px 0 10px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
figure img { display: block; width: 100%; height: auto; }
figcaption {
  padding: 11px 15px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-3);
  background: var(--bg-2);
}

/* ----------------------------------------------------------------- notes */

.note, .warn {
  margin: 22px 0;
  padding: 14px 17px;
  border: 1px solid var(--accent-rule);
  border-left-width: 3px;
  border-radius: 0 9px 9px 0;
  background: var(--accent-bg);
  max-width: 70ch;
  font-size: 15px;
}
.warn { border-color: var(--warn-rule); background: var(--warn-bg); }
.note p, .warn p { margin: 0; max-width: none; }
.note p + p, .warn p + p { margin-top: 9px; }
.note .lbl, .warn .lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.warn .lbl { color: var(--warn); }

/* ---------------------------------------------------------------- tables */

.tw { overflow-x: auto; margin: 20px 0 24px; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14.5px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--bg-2);
}

th, td {
  text-align: left;
  padding: 10px 15px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  line-height: 1.5;
}
tbody tr:last-child td { border-bottom: 0; }

th {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--bg-3);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

td:first-child { color: var(--fg); font-weight: 550; }
td.nw, th.nw { white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ bits */

code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--bg-3);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--fg);
  white-space: nowrap;
}

kbd {
  font-family: var(--mono);
  font-size: .82em;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--fg);
}

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--rule);
  background: var(--bg-3);
  color: var(--fg);
  white-space: nowrap;
}
.chip.w { border-color: var(--warn-rule); color: var(--warn); background: var(--warn-bg); }
.chip.g { border-color: var(--accent-rule); color: var(--accent); background: var(--accent-bg); }

.where {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-3);
  margin: 0 0 16px;
}
.where b { color: var(--fg); font-weight: 500; }

/* ---------------------------------------------------------- page contents */

.onthis {
  position: sticky;
  top: 51px;
  max-height: calc(100vh - 51px);
  overflow-y: auto;
  padding: 40px 22px 60px 6px;
  font-size: 13px;
}
@media (max-width: 1240px) { .onthis { display: none; } }

.onthis .group {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 9px;
}
.onthis ul { list-style: none; margin: 0; padding: 0; }
.onthis li { margin: 0; }
.onthis a {
  display: block;
  padding: 4px 0 4px 11px;
  border-left: 2px solid var(--rule);
  color: var(--fg-3);
  line-height: 1.4;
}
.onthis a:hover { color: var(--fg); border-left-color: var(--fg-3); text-decoration: none; }

/* --------------------------------------------------------------- pagenav */

.pagenav {
  display: flex;
  gap: 14px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.pagenav a {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--fg);
}
.pagenav a:hover { border-color: var(--accent-rule); text-decoration: none; }
.pagenav .dir {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 3px;
}
.pagenav .next { text-align: right; }

/* ----------------------------------------------------------------- index */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
  margin: 26px 0 12px;
  max-width: none;
}
.card {
  display: block;
  padding: 17px 18px;
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: var(--bg-2);
  color: var(--fg-2);
}
.card:hover { border-color: var(--accent-rule); text-decoration: none; }
.card .n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--fg-3);
}
.card h3 { margin: 5px 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg-3); }

/* ---------------------------------------------------------------- footer */

.foot {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--fg-3);
  max-width: 70ch;
}
.foot p { margin: 0 0 7px; max-width: none; }
