/* stlToSolid user manual pages (/docs/). The site's palette and faces,
   laid out for reading: a side menu, one column of text, screenshots. */

:root {
  --ink: #14171c;
  --panel: #1d2229;
  --panel-2: #232932;
  --line: #313945;
  --line-soft: rgba(214, 220, 228, 0.09);
  --text: #d6dce4;
  --bright: #eef3f7;
  --muted: #8b95a3;
  --edge: #5ad2ea;
  --edge-ink: #0c2a31;
  --pass: #6fdc8c;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --nav-h: 68px;
  --side: 270px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 20px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16.5px/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--edge); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bright); }
b, strong { font-weight: 600; color: var(--bright); }
code { font-family: var(--mono); font-size: 0.86em; color: var(--edge); background: rgba(90, 210, 234, 0.08); padding: 0.08em 0.36em; border-radius: 4px; overflow-wrap: anywhere; }
::selection { background: var(--edge); color: var(--ink); }
:focus-visible { outline: 2px solid var(--edge); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--edge); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 16px; }

/* ---------- top bar ---------- */
.dnav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px;
  padding-inline: var(--gut);
  background: rgba(20, 23, 28, 0.86);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__cube { width: 32px; height: 32px; border-radius: 8px; }
.brand__word { font: 800 14px/1 var(--sans); font-stretch: 125%; letter-spacing: 0.08em; color: var(--bright); }
.brand__word i { font-style: normal; color: var(--edge); margin: 0 0.32em; }
.dnav__sec { font: 400 22px/1 var(--serif); color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }
.dnav__links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.dnav__links a { color: var(--muted); text-decoration: none; }
.dnav__links a:hover, .dnav__links a[aria-current] { color: var(--bright); }

.dbtn {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px;
  font: 600 14px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: box-shadow .3s, border-color .3s, transform .12s;
}
.dbtn:active { transform: scale(0.96); }
.dbtn--solid { background: var(--edge); color: var(--edge-ink); }
.dbtn--solid:hover { color: var(--edge-ink); box-shadow: 0 10px 34px -8px rgba(90, 210, 234, .55); }
.dbtn--ghost { color: var(--bright); border-color: var(--line); background: rgba(214, 220, 228, .04); }
.dbtn--ghost:hover { border-color: rgba(90, 210, 234, .6); }

/* ---------- layout ---------- */
.dlayout {
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  max-width: 1320px; margin: 0 auto; padding: 36px var(--gut) 0;
}
.side { position: relative; }
.side__menu { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; padding-right: 6px; }
.side__menu summary { list-style: none; font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; cursor: default; }
.side__menu summary::-webkit-details-marker { display: none; }
.pages, .toc { list-style: none; margin: 0; padding: 0; }
.pages > li > a {
  display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); text-decoration: none;
  font-size: 15px; border-left: 2px solid transparent;
}
.pages > li > a:hover { background: var(--panel); color: var(--bright); }
.pages > li > a[aria-current] { background: var(--panel); color: var(--edge); border-left-color: var(--edge); font-weight: 600; }
.toc { margin: 4px 0 10px 14px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 12px; font-size: 13.5px; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--bright); }
.side__pdf { margin: 18px 12px 0; font-size: 14px; }

/* ---------- the reading column ---------- */
.doc { min-width: 0; max-width: 820px; padding-bottom: 40px; }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--edge); margin: 0 0 14px; }
.doc h1 { font: 400 clamp(2.6rem, 5.4vw, 4.4rem)/1 var(--serif); color: var(--bright); letter-spacing: -0.015em; margin: 0 0 26px; text-wrap: balance; }
.doc h2 { font: 400 clamp(1.9rem, 3.2vw, 2.6rem)/1.08 var(--serif); color: var(--bright); margin: 64px 0 18px; padding-top: 28px; border-top: 1px solid var(--line); text-wrap: balance; }
.doc h1 + h2 { border-top: 0; margin-top: 30px; padding-top: 0; }
.doc h3 { font: 600 19px/1.3 var(--sans); color: var(--bright); margin: 44px 0 12px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--edge); }
.doc em { color: var(--bright); font-style: italic; }
.lede { font-size: 19px; line-height: 1.55; color: var(--text); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 40px !important; }

blockquote {
  margin: 22px 0; padding: 14px 18px; border-radius: 10px;
  background: rgba(90, 210, 234, 0.06); border: 1px solid rgba(90, 210, 234, 0.25); border-left: 3px solid var(--edge);
}
blockquote p { margin: 0 0 6px !important; }
blockquote p:last-child { margin-bottom: 0 !important; }

/* tables: a framed box that scrolls sideways on a phone */
.tablebox { margin: 18px 0 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th { text-align: left; font: 600 11.5px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
th, td { padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--bright); }
td:first-child b, td:first-child strong { white-space: normal; }
/* settings tables: setting, default, meaning */
td:nth-child(2):not(:last-child) { white-space: nowrap; }
td:nth-child(2) code { white-space: nowrap; }
@media (max-width: 640px) { table { min-width: 560px; } td:nth-child(2) { white-space: normal; } }

/* screenshots */
figure { margin: 26px 0 30px; }
.shot { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0e1115; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); transition: border-color .3s; }
.shot:hover { border-color: rgba(90, 210, 234, .55); }
.shot--rail { max-width: 376px; }
figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 70ch; }
figcaption b, figcaption strong, figcaption code { color: var(--text); }

/* overview cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 30px; }
.card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: border-color .3s, transform .3s, background .3s;
}
.card:hover { border-color: rgba(90, 210, 234, .55); background: var(--panel-2); color: var(--text); transform: translateY(-2px); }
.card small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card--tool small { color: var(--edge); }
.card__t { font: 400 30px/1.05 var(--serif); color: var(--bright); }
.card__d { font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* previous / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--line); }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--bright); }
.pn:hover { border-color: rgba(90, 210, 234, .55); color: var(--bright); }
.pn small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pn span { font: 400 24px/1.1 var(--serif); }
.pn--next { text-align: right; }

.dfoot { margin-top: 80px; padding: 40px var(--gut) 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.dfoot p { margin: 0 auto 8px; max-width: 70ch; }
.dfoot__small { color: #5f6976; font-size: 12.5px; }

/* ---------- narrow screens: the menu folds above the text ---------- */
@media (max-width: 900px) {
  .dlayout { grid-template-columns: minmax(0, 1fr); padding-top: 18px; gap: 18px; }
  .side__menu { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 10px; background: var(--panel); }
  .side__menu summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; }
  .side__menu summary::after { content: "+"; font-size: 16px; color: var(--edge); }
  .side__menu[open] summary { margin-bottom: 12px; }
  .side__menu[open] summary::after { content: "–"; }
  .dnav__links { display: none; }
  .dnav .dbtn { margin-left: auto; }
}
@media (max-width: 560px) {
  :root { --nav-h: 60px; }
  .dnav__sec { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pn--next { text-align: left; }
  .doc h2 { margin-top: 48px; }
}
