/* StroboGraph documentation: colours of the app's ink and sand theme, readable on phones and desktops. */
:root {
  --primary: #1f3f68;
  --primary-dark: #16304f;
  --primary-container: #d5e2f4;
  --on-primary-container: #0b1d35;
  --bg: #f1ebdc;
  --surface: #faf6ec;
  --surface-container: #ece4cf;
  --text: #16304f;
  --text-muted: #4d6280;
  --outline: #d3c9ae;
  --good: #2e7d32;
  --warn: #8a6100;
  --dark: #16304f;
  /* The accent on the dark header, as the logo's dots. */
  --accent-light: #f2c14e;
  --radius: 14px;
  --content: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 0.2em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; line-height: 1.25; margin: 1.4em 0 0.4em; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--surface-container); padding: 0.1em 0.35em; border-radius: 5px; }
kbd { border: 1px solid var(--outline); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--dark); color: #fff; }
.site-header .inner { max-width: var(--content); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand span span { color: var(--accent-light); }
.site-header nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-header nav a { color: #e1e2e8; text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent-light); }
.site-header a.cta { color: var(--dark); text-decoration: none; background: var(--accent-light); border: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; }

main { max-width: var(--content); margin: 0 auto; padding: 32px 20px 64px; }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--primary); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.secondary { color: var(--primary-dark); background: transparent; }
.btn.secondary:hover { background: var(--primary-container); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.2em 0; }

/* Overview page */
.hero { display: grid; grid-template-columns: 1.1fr 1.3fr; gap: 40px; align-items: center; margin-bottom: 48px; }
.lead { font-size: 1.2rem; color: var(--text-muted); }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.shot { border-radius: var(--radius); box-shadow: 0 10px 30px rgb(40 30 10 / 0.18); border: 1px solid var(--outline); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 24px 0 48px; }
.card { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 22px; }
.card .icon { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-container); margin-bottom: 12px; }
.card p { margin: 0; color: var(--text-muted); }
.workflow { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.workflow li { counter-increment: step; background: var(--surface-container); border-radius: var(--radius); padding: 16px; }
.workflow li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-right: 8px; }
.workflow strong { display: inline; }
.workflow span { display: block; color: var(--text-muted); font-size: 0.95rem; margin-top: 6px; }

/* The printable calibration sheets: a box with download buttons. */
.sheet-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  background: var(--primary-container); color: var(--on-primary-container); border-radius: var(--radius); padding: 16px 20px; margin: 1.2em 0; }
.sheet-box strong { display: block; font-size: 1.05rem; }
.sheet-box span { color: var(--on-primary-container); font-size: 0.95rem; }
.sheet-box > div:first-child { flex: 1 1 260px; }
.sheet-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet-buttons .btn { padding: 9px 18px; }
.btn .ico { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; margin-right: 6px; }
/* The overview's compact line: small outlined buttons, so that "App starten" stays the main action. */
.sheet-line { color: var(--text-muted); font-size: 0.95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.sheet-pair { display: inline-flex; gap: 8px; }
.btn.small { padding: 4px 14px 4px 10px; font-size: 0.9rem; border-width: 1.5px; color: var(--primary-dark); background: transparent; }
.btn.small:hover { background: var(--primary-container); }

/* Callouts */
.note { border-left: 5px solid var(--primary); background: var(--surface-container); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2em 0; }
.note.tip { border-color: var(--good); background: #e9f4ea; }
.note.warn { border-color: var(--warn); background: #fbf1d9; }
.note > :last-child { margin-bottom: 0; }
.note strong:first-child { display: block; margin-bottom: 4px; }

/* Guide: table of contents beside the steps */
.guide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.guide > * { min-width: 0; }
/* Wide tables scroll sideways on narrow screens instead of widening the page. */
.scroll { overflow-x: auto; }
.toc { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 16px 18px; font-size: 0.95rem; }
.toc h2 { font-size: 1rem; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.step { padding: 28px 0 8px; border-top: 1px solid var(--outline); }
.step:first-of-type { border-top: none; padding-top: 0; }
.step .kicker { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.step ol.actions-list { padding-left: 1.4em; }
.step ol.actions-list li { margin: 0.35em 0; }
figure { margin: 1.2em 0 1.6em; }
figcaption { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1em 0 1.4em; }
.fact { background: var(--surface); border: 1px solid var(--outline); border-radius: 12px; padding: 12px 14px; }
.fact b { display: block; font-size: 1.25rem; color: var(--primary-dark); }
.fact span { color: var(--text-muted); font-size: 0.9rem; }
.formula { font-size: 1.1rem; background: var(--surface); border: 2px solid var(--good); color: var(--good); border-radius: 10px; padding: 10px 16px; display: inline-block; margin: 0.4em 0 1em; }
table { border-collapse: collapse; width: 100%; margin: 1em 0 1.4em; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--outline); vertical-align: top; }
th { background: var(--surface-container); }

/* App links stay hidden until site.js knows the app's address; inline ones read as plain text. */
a.app-link:not([href]):not(.inline) { display: none; }
a.app-link.inline:not([href]) { color: inherit; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--outline); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }

.site-footer { border-top: 1px solid var(--outline); color: var(--text-muted); font-size: 0.9rem; }
.site-footer .inner { max-width: var(--content); margin: 0 auto; padding: 20px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; }
  /* Two rows: logo and "App starten" on top, the links below. */
  .site-header nav { margin-left: 0; width: 100%; order: 1; }
  .site-header a.cta { margin-left: auto; }
  html { scroll-padding-top: 120px; }
}

@media print {
  .site-header, .toc, .actions, .site-footer { display: none; }
  body { background: #fff; font-size: 12pt; }
  .guide { display: block; }
  .step, figure { break-inside: avoid; }
  .shot { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}

/* G-code and other listings to copy. */
pre { margin: 8px 0; padding: 10px 12px; overflow-x: auto; border-radius: 8px; background: var(--surface-container); font-size: 0.85em; line-height: 1.45; }
pre code { background: none; padding: 0; }
