/* rbox project site styles: one column, system fonts, dark by default with a light scheme. */
/* No external assets; colours are custom properties switched by prefers-color-scheme. */
:root {
  --bg: #0b0f0d; --panel: #121916; --line: #223029; --text: #dfe9e3; --dim: #8fa59a;
  --accent: #5ee6a8; --accent-ink: #06231a; --code: #0e1512;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7faf8; --panel: #ffffff; --line: #d5e0da; --text: #14201b; --dim: #55675e;
    --accent: #0c7a52; --accent-ink: #ffffff; --code: #eef4f0;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.35em; }

.top {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 1rem;
  justify-content: space-between; padding: 0.8rem max(1.25rem, calc((100vw - 1040px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.55rem; font: 600 1.1rem var(--mono); color: var(--text); }
.brand:hover { text-decoration: none; }
nav { display: flex; align-items: center; gap: 1.2rem; font-size: 0.93rem; }
nav a { color: var(--dim); }
nav a:hover { color: var(--text); text-decoration: none; }
nav .pill { color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.8rem; }

main { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
section { padding: 3.5rem 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.4rem 0 1.1rem; max-width: 17ch; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 1.5rem; }
h3 { font-size: 1.02rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }

.hero { padding-top: 4.5rem; }
.eyebrow { font: 0.8rem var(--mono); color: var(--dim); letter-spacing: 0.04em; text-transform: uppercase; }
.lede { font-size: 1.15rem; color: var(--dim); max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 2.5rem; }
.button { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 0.6rem 1.15rem; border-radius: 8px; border: 1px solid var(--accent); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button:hover { text-decoration: none; filter: brightness(1.08); }

pre { background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.15rem; margin: 0; overflow-x: auto; line-height: 1.55; }
.term { max-width: 44rem; box-shadow: 0 18px 50px -30px var(--accent); }
.c { color: var(--accent); user-select: none; }
.d { color: var(--dim); }
.ok { color: var(--accent); font-weight: 600; }

.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
article, .links a { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.15rem 1.25rem; }
article p { color: var(--dim); margin: 0; font-size: 0.96rem; }
.links a { display: flex; flex-direction: column; gap: 0.25rem; color: var(--text); }
.links a:hover { border-color: var(--accent); text-decoration: none; }
.links span { color: var(--dim); font-size: 0.93rem; }
.note { color: var(--dim); max-width: 70ch; }

.copy { position: relative; }
.copy .button { position: absolute; top: 0.7rem; right: 0.7rem; padding: 0.35rem 0.8rem; font-size: 0.88rem; cursor: pointer; font-family: var(--sans); }
.copy pre { padding-top: 3.2rem; white-space: pre-wrap; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; display: grid; gap: 0.5rem; min-width: 0; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: 0.6rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 0.85rem var(--mono); }

.table { overflow-x: auto; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--panel); }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }

footer { max-width: 1040px; margin: 0 auto; padding: 2rem 1.25rem 3rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; color: var(--dim); font-size: 0.9rem; }

@media (max-width: 640px) {
  nav a:not(.pill) { display: none; }
  section { padding: 2.5rem 0; }
}
