/* MicroVM Studio's site: one stylesheet for the home page, the legal pages and the user guide.
   Colours follow the app: its indigo accent on cool neutrals, in light and dark. */
:root {
  color-scheme: light dark;
  --bg: #f7f7fb; --surface: #ffffff; --sunken: #eeeff6; --fg: #17182b; --muted: #5a5d77; --line: #dcdeeb;
  --accent: #3b46d9; --accent-fg: #ffffff; --accent-soft: #e6e8fb; --code-bg: #eceef7;
  --ok: #1f7a3a; --warn: #9a5b00;
  --shadow: 0 1px 2px rgba(23, 24, 43, .06), 0 8px 24px rgba(23, 24, 43, .08);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111220; --surface: #191b2e; --sunken: #0c0d18; --fg: #ecedf7; --muted: #a2a5c0; --line: #2c2f48;
    --accent: #98a0ff; --accent-fg: #10112a; --accent-soft: #22254a; --code-bg: #20233c;
    --ok: #6fd08c; --warn: #f0b45a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, video { max-width: 100%; height: auto; display: block; }
code, kbd { font: .9em var(--mono); background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--fg); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(140deg, #5a63f0, #2f38b8); display: grid; place-items: center; }
.brand-mark::after { content: ""; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 2px; transform: rotate(45deg) scale(.86); }
.site-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 7px; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); background: var(--sunken); }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 9px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.button.primary { background: var(--accent); color: var(--accent-fg); }
.button.secondary { background: var(--surface); color: var(--fg); border-color: var(--line); }
.button:hover { filter: brightness(1.07); }

/* Home */
.hero { padding: 64px 0 40px; display: grid; gap: 40px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.shot { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; margin: 0; list-style: none; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0; }
.features h3 { margin: 0 0 .3em; font-size: 1.05rem; }
.features p { margin: 0; color: var(--muted); font-size: .95rem; }
.yt { aspect-ratio: 16 / 9; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.videos { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.videos figure { margin: 0; }
.videos figcaption { margin-top: 10px; }
.videos figcaption strong { display: block; }
.band { background: var(--sunken); border-block: 1px solid var(--line); padding: 8px 0 40px; margin-top: 56px; }
.two { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Text pages (privacy, licence) */
.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 24px; }

/* Guide */
.guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 32px; align-items: start; }
.guide-nav { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: .95rem; padding-bottom: 24px; }
.guide-nav h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.4em 0 .5em; }
.guide-nav ul { list-style: none; padding: 0; margin: 0; }
.guide-nav li { margin: 0; }
.guide-nav a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--fg); text-decoration: none; }
.guide-nav a:hover { background: var(--sunken); }
.guide-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.version { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--surface); }
.guide-body { max-width: 760px; padding-bottom: 24px; min-width: 0; }
.guide-body h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.guide-body figure { margin: 1.4em 0; }
.guide-body figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 1.6em; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.note { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 1.2em 0; }
.note.cost { border-left-color: var(--warn); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 600; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .guide { grid-template-columns: 1fr; gap: 8px; }
  /* On a phone the page comes first and the guide's contents follow it. */
  .guide-nav { position: static; max-height: none; order: 2; border-top: 1px solid var(--line); margin-top: 24px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* The analytics consent bar (assets/analytics.js). */
#consent { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem; }
#consent p { margin: 0; flex: 1 1 320px; }
#consent div { display: flex; gap: 8px; margin-left: auto; }
#consent button { font: inherit; font-weight: 600; cursor: pointer; padding: 8px 16px; }
