/* flywheelcad.com content styles. The header, footer and manual navigation
   live in chrome.css; this file styles everything between them. */

:root {
  --bg: #fbfaf8; --panel: #ffffff; --ink: #16181d; --muted: #5d636e;
  --line: #e4e2dd; --accent: #1f5f4f; --accent-ink: #ffffff; --code: #f2f0ec;
  --accent-soft: #e6f0ec; --shadow: 0 12px 40px rgba(0, 0, 0, .08);
  /* Renders are made on this plate colour; their frames use it in both themes. */
  --plate: #eef0f2;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013; --panel: #161a1f; --ink: #e9eaec; --muted: #9aa1ab;
    --line: #272c33; --accent: #5fd6b4; --accent-ink: #08110e; --code: #1b2027;
    --accent-soft: #14302a; --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1013; --panel: #161a1f; --ink: #e9eaec; --muted: #9aa1ab;
  --line: #272c33; --accent: #5fd6b4; --accent-ink: #08110e; --code: #1b2027;
  --accent-soft: #14302a; --shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

/* ---- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; padding: 0 0 80px; }
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: clamp(28px, 4.6vw, 42px); font-weight: 660; margin: 0 0 16px; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 640; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 620; margin: 0 0 6px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin: 0 0 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
strong { font-weight: 620; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--code); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; font-size: inherit; }
pre {
  background: var(--code); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 16px;
  font-size: 13.5px; line-height: 1.65; color: var(--ink);
}
kbd {
  font-size: .82em; padding: .1em .4em; border-radius: 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel);
}
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.doc { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap, .wrap-wide, .doc { padding: 0 16px; } }

.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lede { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); max-width: 60ch; }
.lede strong { color: var(--ink); }
.eyebrow {
  display: inline-block; margin: 0 0 10px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
.small { font-size: 13.5px; }

/* ---- Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 9px; text-decoration: none;
  font-weight: 560; font-size: 15px; border: 1px solid transparent; transition: opacity .15s ease;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-soft { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-small { padding: 7px 14px; font-size: 14px; }

/* ---- Sections */
.section { padding: 80px 0 0; }
.section-tight { padding: 36px 0 0; }
.note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.section-head { max-width: 640px; margin: 0 0 28px; }
.section-head p { color: var(--muted); }
.page-head { padding: 56px 0 8px; }
.page-head .lede { margin-bottom: 0; }

/* ---- Home hero */
.home-hero { padding: 56px 0 0; }
.home-hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.028em; }
.promise { font-size: 15px; font-weight: 560; margin: 10px 0 0; }
.req { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.hero-video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 40px 0 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: var(--shadow);
}

/* ---- How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step-media {
  margin: 0 0 14px; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--plate);
}
.step-media img, .step-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.step-media pre {
  height: 100%; margin: 0; border: 0; border-radius: 0; font-size: 12px; line-height: 1.6;
  display: flex; flex-direction: column; justify-content: center;
}
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* ---- Cards (examples) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { display: block; color: inherit; text-decoration: none; }
.card-media {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; margin: 0 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--plate);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-media { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { color: var(--ink); }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card .more { color: var(--accent); font-weight: 560; font-size: 14.5px; }

/* ---- AI block */
.checks { list-style: none; padding: 0; margin: 0 0 22px; }
.checks li { position: relative; padding-left: 26px; margin: 0 0 12px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px;
  border-radius: 3px; background: var(--accent);
}

/* ---- Compare table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table.compare { width: 100%; min-width: 760px; font-size: 14.5px; }
.compare th, .compare td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--bg); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 560; width: 28%; }
.compare .us { background: var(--accent-soft); }
.compare .y { color: var(--accent); font-weight: 600; }
.compare .n { color: var(--muted); }
.footnote { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }

/* ---- News */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 18px 0; border-top: 1px solid var(--line); margin: 0; }
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-list time { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.news-list h3 { margin: 0 0 4px; }
.news-list h3 a { color: var(--ink); text-decoration: none; }
.news-list h3 a:hover { color: var(--accent); }
.news-list p { margin: 0; color: var(--muted); }
.post-meta { color: var(--muted); font-size: 14px; margin: -6px 0 28px; }
.post h2 { margin-top: 36px; }

/* ---- Figures and code captions */
figure { margin: 0 0 24px; }
figcaption, .code-caption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.render {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line); border-radius: 12px; background: var(--plate);
}
.render-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .render-pair { grid-template-columns: 1fr; } }
.example-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* ---- Download page */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0 0 8px; }
.facts dt { color: var(--muted); font-weight: 560; }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.files { list-style: none; padding: 0; margin: 0; }
.files li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.files li:last-child { border-bottom: 1px solid var(--line); }
.files .size { color: var(--muted); font-size: 14px; }

/* ================================================================
   Docs layer — the manual pages migrated from digitalhandstand.com.
   Rebuilt on this file's tokens so every panel follows light/dark.
   ================================================================ */
.doc-head { padding: 40px 0 8px; }
.doc-head h1 { margin-bottom: 8px; }
.doc-head .lede { margin-bottom: 18px; }
.doc-body { padding-top: 12px; }

.section-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px; margin: 0 0 20px;
}
.section-panel > h2 { font-size: 22px; margin-bottom: 14px; }
.section-panel h3 { margin-top: 18px; }
.section-panel > :last-child { margin-bottom: 0; }
@media (max-width: 520px) { .section-panel { padding: 18px 16px; } }

.list-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .list-grid { grid-template-columns: 1fr; } }
.list-panel { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.list-panel h3 { margin: 0 0 8px; }
.list-panel ul { margin: 0; padding-left: 19px; }
.list-panel li { margin-bottom: 7px; }

.detail-table { width: 100%; }
.detail-table th, .detail-table td { border-top: 1px solid var(--line); padding: 10px 0; vertical-align: top; text-align: left; }
.detail-table td + td, .detail-table th + th { padding-left: 14px; }
.detail-table td:first-child { width: 36%; font-weight: 560; }
.detail-table code { overflow-wrap: anywhere; }
.detail-table tr:first-child td, .detail-table tr:first-child th { border-top: 0; }
@media (max-width: 620px) {
  .detail-table, .detail-table tbody, .detail-table tr, .detail-table td { display: block; width: 100% !important; }
  .detail-table td + td { padding-left: 0; padding-top: 0; }
  .detail-table td:first-child { padding-bottom: 4px; }
}

.notice {
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 14px 0;
}
.notice > :last-child { margin-bottom: 0; }
.new { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-ink); background: var(--accent);
  padding: 1px 7px; border-radius: 999px; vertical-align: 2px; margin-left: 6px; }

.example-shot {
  display: block; width: 100%; height: 190px; object-fit: contain; padding: 6px; margin-bottom: 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--plate);
}
.example-pair { display: flex; gap: 8px; margin-bottom: 14px; }
.example-pair .lightbox-trigger { flex: 1 1 0; min-width: 0; }
.example-pair .example-shot { height: 168px; margin-bottom: 0; }

/* Lightbox (assets/lightbox.js) */
.lightbox-trigger { display: block; text-decoration: none; }
.lightbox-trigger img { cursor: zoom-in; }
body.lightbox-open { overflow: hidden; }
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(14, 16, 19, .86); backdrop-filter: blur(10px);
}
.lightbox-shell { position: relative; width: min(1120px, 100%); max-height: 100%; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; padding: 18px; }
.lightbox-image {
  display: block; width: auto; max-width: 100%; max-height: min(82vh, 960px); height: auto;
  object-fit: contain; border-radius: 12px; background: var(--plate);
}
.lightbox-caption { margin: 8px auto 0; max-width: 880px; color: #f3f4f6; text-align: center; font-size: .96rem; }
.lightbox-close {
  position: absolute; top: -8px; right: -8px; width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}

/* Tables inside docs that are not detail tables (component library, syntax) */
.doc-body table:not(.detail-table) { width: 100%; font-size: 14.5px; }
.doc-body table:not(.detail-table) th,
.doc-body table:not(.detail-table) td { border-top: 1px solid var(--line); padding: 8px 10px 8px 0; text-align: left; vertical-align: top; }
.doc-body table:not(.detail-table) thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 13px; }

/* ---- 404 */
.center-page { text-align: center; padding: 96px 0; }
.center-page .lede { margin: 0 auto 24px; }
.center-page .cta { justify-content: center; }
