:root {
  /* Rose theme (matches the TUI's "rose" preset) on a true-black canvas. */
  --bg: #000000;
  --bg-soft: #0a0a0d;
  --bg-window: #0c0c11;
  --bg-titlebar: #06070a;
  --fg: #f5e6e9;
  --fg-muted: #6c6c6c;
  --accent: #ff87af;        /* rose 211 — selection / accent */
  --accent-soft: #c75a85;
  --rose-name: #ffd7d7;     /* rose 224 — entry name */
  --rose-dim: #585858;      /* rose 240 — borders, hidden */
  --rose-critter: #ffafaf;  /* rose 217 — bottom-right critters */
  --rose-path-bg: #87005f;  /* rose 89 — path bar background */
  --rose-path-fg: #ffffff;
  --border: #221820;
  --good: #6fc678;
  --warn: #f0c674;
  --bad: #ff5f5f;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
a:hover, a:focus {
  border-bottom-color: var(--accent);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg-soft);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  z-index: 100;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  padding: 4rem 0 2rem;
  background: radial-gradient(ellipse at top, rgba(255, 135, 175, 0.1), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--mono);
}
.brand .prompt {
  color: var(--good);
  font-size: 1.5rem;
}
.brand h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--fg-muted);
  font-size: 1.125rem;
  margin: 0.75rem 0 1.5rem;
  max-width: 56ch;
}

.cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: var(--sans);
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--fg);
}
.btn:hover, .btn:focus {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  color: #1a0008;
  border-color: var(--accent);
}
.btn.primary:hover, .btn.primary:focus {
  background: #ffa9c4;
  border-color: #ffa9c4;
}

.demo-block {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.window {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-window);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
}
.titlebar .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.titlebar .title {
  margin-left: 0.6rem;
  color: var(--fg-muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.screen {
  margin: 0;
  padding: 1.25rem 1rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre;
  overflow-x: auto;
}

.path {
  color: var(--rose-path-fg);
  background: var(--rose-path-bg);
  padding: 0 0.4rem;
  border-radius: 3px;
  font-weight: 700;
}
.muted { color: var(--rose-dim); }
.sel { color: var(--accent); }
/* Bold lives on inner <strong> tags rather than the whole .sel span so
   the border characters stay at regular weight — bold box-drawing
   glyphs can drift in width between fonts. */
.sel strong { font-weight: 700; }
/* Folder + file share the rose name color — in the actual rose theme the
   distinction is in the border-glyph set, not the text colour. */
.folder, .file { color: var(--rose-name); }
.critter { color: var(--rose-critter); }

h2 {
  margin: 3rem 0 1rem;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}
h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.grid article {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.grid article h3 {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 1rem;
}
.grid article p { margin: 0; color: var(--fg-muted); }
.grid code, code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.9em;
}

.snippet {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--fg-muted); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
kbd {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
}

ul.links {
  list-style: none;
  padding: 0;
}
ul.links li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
}

footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 640px) {
  .screen { font-size: 0.78rem; }
  .hero { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
