:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #11151d;
  --line: #293140;
  --text: #eef2f7;
  --muted: #9aa7b8;
  --green: #6ee7a8;
  --blue: #7dc4ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 50% -20%, #1b2942, var(--bg) 42rem);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
header, footer, main { width: min(70rem, calc(100% - 2rem)); margin-inline: auto; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
header { min-height: 4.5rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); font: 700 1.25rem ui-monospace, monospace; text-decoration: none; }
main { padding-block: 4rem; }
.hero { max-width: 60rem; }
.eyebrow { color: var(--green); font: 700 .8rem ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: .25rem 0 1rem; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 1.02; letter-spacing: -.045em; }
.hero > p:last-child { color: var(--muted); font-size: 1.1rem; }

.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 3rem 0 1.25rem; }
.preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  min-height: 11rem; padding: 1.3rem; text-align: left; color: var(--text);
  background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line);
  border-radius: .8rem; cursor: pointer;
}
.preset:hover, .preset:focus-visible { border-color: #60708a; outline: none; }
.preset.selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.preset strong { font-size: 1.25rem; }
.preset span:not(.tag), .preset small { color: var(--muted); }
.tag { color: var(--green); font: 700 .72rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }

.controls { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
button { font: inherit; }
#boot, .secondary { padding: .65rem 1rem; border-radius: .5rem; cursor: pointer; }
#boot { border: 0; background: var(--green); color: #062014; font-weight: 750; }
#boot:disabled { opacity: .55; cursor: progress; }
.secondary { border: 1px solid var(--line); background: transparent; color: var(--text); }
#status { margin-left: auto; color: var(--muted); font: .82rem ui-monospace, monospace; }

.terminal-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: #030504; box-shadow: 0 2rem 6rem #0008; }
.terminal-bar { display: flex; align-items: center; gap: .4rem; height: 2.5rem; padding: 0 .85rem; background: #181c23; }
.terminal-bar span { width: .7rem; height: .7rem; border-radius: 50%; background: #46505f; }
.terminal-bar span:first-child { background: #f36b68; }
.terminal-bar span:nth-child(2) { background: #e9b94f; }
.terminal-bar span:nth-child(3) { background: #62c777; }
.terminal-bar b { margin-left: .4rem; color: var(--muted); font: 500 .75rem ui-monospace, monospace; }
#terminal {
  height: 31rem; margin: 0; padding: 1rem; overflow: auto; outline: none;
  color: #b9f6ce; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#terminal:focus { box-shadow: inset 0 0 0 1px #6ee7a855; }
.notes { margin-top: 3rem; max-width: 52rem; }
.notes pre { overflow-x: auto; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: .6rem; }
.notes p { color: var(--muted); }
footer { min-height: 5rem; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 45rem) {
  main { padding-block: 2.5rem; }
  .presets { grid-template-columns: 1fr; }
  .controls { flex-wrap: wrap; }
  #status { width: 100%; margin-left: 0; }
  #terminal { height: 25rem; }
}
