:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #282c29;
  --muted: #62665e;
  --line: #d7d7ca;
  --accent: #94392e;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, .jail-example:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; }
.container { width: min(1020px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; padding: 8px 14px; background: white; z-index: 1; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand strong { display: block; font: bold 38px/1.1 Georgia, serif; }
.brand small { display: block; color: var(--muted); font-size: 14px; }
.site-header nav { display: flex; gap: 24px; font-size: 14px; }
.intro { max-width: 800px; padding-block: 32px 24px; }
h1 { margin: 0 0 20px; font: 38px/1.2 Georgia, serif; }
.intro p { margin: 0 0 16px; }
.story { font: 21px/1.6 Georgia, serif; }
.story strong { font-weight: normal; }
h2 { margin: 0 0 12px; font-size: 17px; line-height: 1.4; }
.chooser { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.chooser h2 { margin: 0; }
.os-options { display: flex; gap: 8px; flex-wrap: wrap; }
.os-card { padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); }
.os-card small { margin-left: 4px; color: var(--muted); font-size: 12px; }
.os-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 -2px var(--accent); background: #fff; }
.os-card:not(:disabled):hover { background: #fff; }
.login-note { margin: 16px 0 20px; font-size: 14px; color: var(--muted); }
.login-note code { color: var(--ink); }
.workbench { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px 12px; }
.panel-header h2 { margin: 0; }
.status { display: flex; align-items: center; gap: 8px; font: 12px/1.5 ui-monospace, monospace; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8b8f86; flex: none; }
.status-dot.running { background: #39784d; }
.status-dot.error { background: #b6332b; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.button { padding: 6px 12px; border: 1px solid #bfc2b7; border-radius: 3px; background: #fafaf7; color: var(--ink); font-size: 13px; }
.button:not(:disabled):hover { background: #edeee6; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:not(:disabled):hover { background: #793127; }
.screen-frame { display: grid; place-items: center; min-height: 400px; background: #080b09; overflow: auto; }
.screen-placeholder { color: #c1c9c0; text-align: center; padding: 24px; font-family: ui-monospace, monospace; }
.screen-placeholder p { margin: 0 0 8px; }
.screen-placeholder small { color: #899586; }
.vm-screen { width: 100%; min-height: 400px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: auto; }
.vm-screen[hidden] { display: none; }
.vm-screen > div { color: #f5f5f5; flex-shrink: 0; }
.vm-screen canvas { max-width: none; flex-shrink: 0; }
.vm-screen:focus-visible { outline: 2px solid #b6caaa; outline-offset: -3px; }
.panel-footer { margin: 0; padding: 12px 18px; font-size: 13px; color: var(--muted); }
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-block: 36px; }
.notes p { margin: 0 0 14px; font-size: 15px; }
.notes > div { min-width: 0; }
.jail-example { margin: 0 0 14px; padding: 12px; overflow-x: auto; border-left: 2px solid var(--line); background: #efefe7; font: 13px/1.6 ui-monospace, monospace; }
.jail-example code { font: inherit; }
.practical-notes { color: var(--muted); }
.practical-notes h2 { color: var(--ink); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.screen-frame:fullscreen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #000; }
.screen-frame:fullscreen .vm-screen { height: 100vh; }

@media (max-width: 650px) {
  .container { width: calc(100% - 28px); }
  .site-header { padding-block: 12px; }
  .brand { gap: 10px; }
  .brand img { width: 64px; height: 64px; }
  .brand strong { font-size: 32px; }
  .site-header nav { gap: 14px; }
  h1 { font-size: 30px; }
  .story { font-size: 19px; }
  .os-card { padding: 7px 10px; }
  .panel-header { align-items: start; }
  .status { text-align: right; }
  .notes { grid-template-columns: 1fr; gap: 20px; padding-block: 28px; }
  .vm-screen { align-items: flex-start; }
}
