/* sluice: one stylesheet for the site and the console. */
:root {
  --bg: #f6f7f4; --surface: #ffffff; --surface-2: #ecefe9; --text: #1b1f1d; --muted: #5b6460; --border: #d8ddd6;
  --accent: #185f8c; --accent-text: #ffffff; --accent-soft: #dbe9f3;
  --warn: #8a5a00; --warn-soft: #fbefd5; --danger: #a2271f; --danger-soft: #f8dcd9; --ok: #1d6b33; --ok-soft: #dcf0e1;
  --term-bg: #14181b; --term-text: #e4e6e9; --term-muted: #8b9098; --term-accent: #7cc6f0;
  --radius: 8px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101416; --surface: #171c1f; --surface-2: #1e2428; --text: #e6e8e7; --muted: #9aa3a0; --border: #2c3438;
    --accent: #6fb8e6; --accent-text: #0b1419; --accent-soft: #14303f;
    --warn: #f0b84a; --warn-soft: #33280f; --danger: #f07a70; --danger-soft: #3a1714; --ok: #6fd18a; --ok-soft: #13301c;
    --term-bg: #0b0d0f; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.35em; overflow-wrap: anywhere; }
pre { background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 0.4em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.05rem; margin: 1.4em 0 0.4em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; font-size: 0.95rem; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav form { display: inline; }
.nav button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.foot { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem; }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.foot a { color: var(--muted); }
.hero { padding: 56px 0 24px; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.eyebrow { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); margin-bottom: 12px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.note { border: 1px solid var(--border); border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 14px 18px; margin: 24px 0; }
.note.info { border-left-color: var(--accent); background: var(--accent-soft); }
.note.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.note h3, .note h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 0.95rem var(--sans); padding: 9px 16px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); text-decoration: none; cursor: pointer; }
.btn.secondary, button.secondary { background: transparent; color: var(--accent); }
.btn.danger, button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small, button.small { padding: 5px 10px; font-size: 0.85rem; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.inline { display: inline; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=number], input[type=password], input:not([type]), select, textarea { width: 100%; max-width: 520px; font: 1rem var(--sans); padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
textarea { font-family: var(--mono); font-size: 0.9rem; min-height: 120px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1 1 200px; }
.actions-row { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.console-main { padding-top: 28px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.stat .k { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.9em; }
.badge { display: inline-block; font: 600 0.78rem var(--mono); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; border: 1px solid transparent; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.approval { border-left: 4px solid var(--warn); margin-bottom: 12px; }
.approval .cmd { margin: 10px 0; }
.waves { list-style: none; padding: 0; margin: 8px 0 0; }
.waves li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.waves li:last-child { border-bottom: 0; }
.waves .n { font-family: var(--mono); color: var(--muted); margin-right: 10px; }
.log { background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); border: 1px solid var(--border); padding: 12px 14px; font: 0.85rem/1.45 var(--mono); max-height: 70vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.log .meta { color: var(--term-muted); }
.log-state { font: 0.85rem var(--mono); color: var(--muted); margin: 6px 0 14px; }
.steps { list-style: none; padding: 0; margin: 16px 0; counter-reset: step; }
.steps li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.steps .mark { flex: 0 0 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 0.85rem var(--mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.steps li.done .mark { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.steps .body { min-width: 0; }
.steps .body strong { display: block; }
.signin { max-width: 480px; margin: 48px auto; }
.sha { font-family: var(--mono); }
details > summary { cursor: pointer; color: var(--muted); }
