/* Orion — node29 palette, flat, restrained. One stylesheet, no build step. */

:root {
  --bg: #0b0c10;
  --bg-alt: #111318;
  --card: #111827;
  --border: #1f2937;
  --border-soft: #171a21;
  --text: #e0e0e0;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --tag-bg: #1f2937;
  --tag-text: #93c5fd;
  --ok: #86efac;
  --ok-bg: rgba(74, 222, 128, 0.13);
  --warn: #fcd34d;
  --warn-bg: rgba(251, 191, 36, 0.13);
  --bad: #fca5a5;
  --bad-bg: rgba(248, 113, 113, 0.13);
  --radius: 10px;
  --radius-sm: 7px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 0.87em; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.78rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; }
.mt3 { margin-top: 24px; } .mt4 { margin-top: 36px; }
.mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; } .mb3 { margin-bottom: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 8px; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------- public site motion */
/* Same feel as nestor.ink: short fade-in-up, a drifting hero glow, sections
   that rise as they enter the viewport. Everything degrades to static HTML. */
html { scroll-behavior: smooth; }
#main { transition: opacity .25s ease-out; }
.page-transition { animation: orion-fade-up .45s ease-out both; }

.pnav { transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
.pnav.scrolled {
  background: rgba(11, 12, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; left: -10%; right: -10%; top: -30%; height: 560px;
  pointer-events: none; z-index: 0;
  background: radial-gradient(55% 60% at 50% 40%, var(--accent-soft), transparent 72%);
  transform: translateY(var(--hero-shift, 0px));
}
.hero > .container { position: relative; z-index: 1; opacity: var(--hero-fade, 1); }

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s ease-out, transform .55s cubic-bezier(.22, .61, .36, 1);
}
.reveal.in { opacity: 1; transform: none; }

.section-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, .45);
  animation: orion-dot 2.4s ease-out infinite;
}
@keyframes orion-dot {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .45); }
  70% { box-shadow: 0 0 0 9px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ---------------------------------------------------------------- public shell */
.pnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.pnav .container { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-weight: 700; font-size: 1.08rem; color: var(--text); letter-spacing: -0.02em; }
.logo .num { color: var(--accent); }
.pnav nav { display: flex; gap: 24px; align-items: center; }
/* Links only. `.pnav nav a` outweighs `.btn-primary` on specificity, so without
   the :not(.btn) the header's call to action inherited the nav's grey and its
   font weight - a grey label on a blue button. */
.pnav nav a:not(.btn) { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; text-decoration: none; }
.pnav nav a:not(.btn):hover, .pnav nav a:not(.btn).active { color: var(--text); }

/* ---------------------------------------------------------------- burger */
/* One control for both shells: three bars that fold into a cross when open.
   Hidden by default; each layout reveals it at its own breakpoint. */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 9px; margin: -9px 0 -9px -9px; border-radius: 8px;
  color: var(--text); line-height: 0;
}
.nav-toggle:hover { background: var(--accent-soft); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle .bars { display: block; width: 20px; height: 14px; position: relative; }
.nav-toggle .bars i {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), opacity .12s ease, top .22s ease;
}
.nav-toggle .bars i:nth-child(1) { top: 0; }
.nav-toggle .bars i:nth-child(2) { top: 6px; }
.nav-toggle .bars i:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .pnav .container { position: relative; }
  .pnav .nav-toggle { display: block; }
  .pnav nav {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 0 20px; overflow: hidden;
    max-height: 0; opacity: 0; visibility: hidden;
    transition: max-height .3s cubic-bezier(.22,.61,.36,1), opacity .2s ease,
                padding .3s ease, visibility .3s;
  }
  .pnav nav.open { max-height: 78vh; opacity: 1; visibility: visible; padding: 8px 20px 18px; }
  .pnav nav a:not(.btn) {
    padding: 14px 2px; font-size: 1rem; border-bottom: 1px solid var(--border-soft);
  }
  .pnav nav a:not(.btn):last-child { border-bottom: 0; }
  /* A comfortable target at the end of the panel, not a squashed one: the
     link padding above used to apply to it as well. */
  .pnav nav a.btn { margin-top: 14px; width: 100%; padding: 12px 16px; }
}

.hero { padding: 84px 0 64px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.35rem; max-width: 780px; margin-bottom: 16px; }
.hero .lead { font-size: 1.08rem; color: var(--text-muted); max-width: 620px; margin-bottom: 26px; }
.hero .eyebrow {
  display: inline-block; font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--tag-text); background: var(--accent-soft); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 18px;
}

section { padding: 64px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 1.35rem; margin-bottom: 8px; }
.section-lead { color: var(--text-muted); max-width: 660px; margin-bottom: 30px; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card.tight { padding: 16px; }
.card.flat { background: var(--bg-alt); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { font-size: 1rem; }
.card-h .sub { color: var(--text-dim); font-size: 0.82rem; }
.card.link:hover { border-color: var(--accent); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); }
.stat .v { font-size: 1.6rem; font-weight: 680; margin-top: 4px; }
.stat .v small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.stat.accent .v { color: var(--accent); }
.stat.bad .v { color: var(--bad); }
.stat.warn .v { color: var(--warn); }

.bar { height: 7px; border-radius: 999px; background: var(--border-soft); overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s cubic-bezier(.4, 0, .2, 1); }
.bar.ok > span { background: #4ade80; }
.metric { margin-top: 14px; }
.metric .bar { margin-top: 7px; }
.input-sm { padding: 5px 9px; font-size: .82rem; }
.htmx-indicator { opacity: 0; transition: opacity .15s ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
#svc-busy { width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.bar.warn > span { background: #fbbf24; }
.bar.bad > span { background: #f87171; }

/* ---------------------------------------------------------------- modes */
.mode { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--bg-alt); }
.mode-head { display: flex; gap: 12px; align-items: flex-start; }
.mode-head .pill { flex: none; margin-top: 1px; }
.mode-title { font-weight: 650; font-size: .95rem; }
details.advanced { border-top: 1px solid var(--border); padding-top: 14px; }
details.advanced > summary, details > summary {
  cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--text-muted);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; color: var(--accent); transition: transform .18s ease; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: var(--text); }

/* ---------------------------------------------------------------- loader */
.loader { animation: orion-fade-in .35s ease-out; }

.loader-count { margin-left: auto; color: var(--text-dim); font-size: .78rem; white-space: nowrap; }

/* The status fragment is re-fetched every couple of seconds while a machine is
   being built. Both animations below replay on every swap, which is what made
   the panel look as though it were reloading itself - the fade-out to 35% and
   the fade-in are only wanted on the first paint. */
#instance-status .loader,
#instance-status .htmx-added,
#instance-status .htmx-added * { animation: none; }

/* The provisioning log, scrolling at its own end. Fixed height so the card does
   not grow a line at a time, and a thin bar because this one is content the
   reader may genuinely want to look back through. */
.loader-log {
  margin-top: 12px;
  height: 8.5rem;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.loader-log::-webkit-scrollbar { width: 8px; }
.loader-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* -------------------------------------------------------------- addresses */
/* The address is the subject of the simple-mode card, so it gets the room: the
   label read first, the shared domain behind it, the facts about it on the
   right, and one button. The copy button used to be floated over a code box
   with negative margins to make it sit inside the padding. */
.addr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.addr-main {
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.addr-main:hover .addr-label { text-decoration: underline; }
.addr-tags { display: flex; gap: 6px; margin-left: auto; flex: none; }
.addr-card .btn { flex: none; }
@media (max-width: 640px) {
  .addr-card { flex-wrap: wrap; gap: 8px; }
  .addr-tags { margin-left: 0; }
}
.addr { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.addr-host { text-decoration: none; white-space: nowrap; }
.addr-label { color: var(--accent); font-weight: 600; }
.addr-zone { color: var(--text-dim); }
.addr-host:hover .addr-label { text-decoration: underline; }
.inline-edit > summary {
  cursor: pointer;
  list-style: none;
  color: var(--text-dim);
  font-size: .72rem;
  user-select: none;
}
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit > summary::before { content: "\2732"; margin-right: 5px; }
.inline-edit > summary:hover { color: var(--accent); }
.inline-edit form { margin-top: 6px; }
.loader-head { display: flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 600; }
.loader-head .loader-step { flex: 1 1 auto; color: var(--text); }
.loader-head .loader-pct { color: var(--accent); font-size: .82rem; }
.spinner {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: orion-spin .8s linear infinite;
}
.steps { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.steps li { font-size: .84rem; color: var(--text-dim); display: flex; gap: 8px; align-items: baseline; }
.steps li .tick { color: var(--ok); font-size: .8rem; }
.steps li.current { color: var(--text); }
.steps li.current .tick { color: var(--accent); animation: orion-pulse 1.4s ease-in-out infinite; }

@keyframes orion-spin { to { transform: rotate(360deg); } }
@keyframes orion-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes orion-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes orion-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Smooth swap for HTMX-updated regions, and no jump while a bar animates. */
.fade-swap.htmx-swapping { opacity: .35; transition: opacity .12s ease-out; }
.htmx-added { animation: orion-fade-in .25s ease-out; }
#instance-status { min-height: 3.5rem; }

/* View transitions: HTMX 2 drives these for full navigations and swaps. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-text); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.idle { background: var(--border-soft); color: var(--text-muted); }
.badge.muted { background: var(--border-soft); color: var(--text-dim); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill { font-size: 0.74rem; padding: 2px 8px; border-radius: 6px; background: var(--tag-bg); color: var(--tag-text); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-size: 0.9rem; font-weight: 600;
  font-family: inherit; cursor: pointer; text-decoration: none; transition: .14s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger { background: transparent; border-color: #6b2b2b; color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: var(--bad-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--border); }
.btn-sm { padding: 5px 11px; font-size: 0.81rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.field .hint { font-size: 0.78rem; color: var(--text-dim); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 0.93rem;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: 0.86rem; }
select.input {
  appearance: none;
  padding-right: 34px;
  /* Replaces the native chevron that `appearance: none` removes. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23c4a882' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
}
.checkline { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; }
.checkline input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.table th, table.table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); }
table.table th {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-dim); font-weight: 700; background: var(--bg-alt);
}
table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: rgba(249, 115, 22, 0.045); }
table.table td.num, table.table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.table .id { color: var(--text-dim); font-family: var(--mono); font-size: 0.82rem; }

/* ---------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--bg-alt); border-right: 1px solid var(--border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.side::-webkit-scrollbar-thumb:hover { background: var(--tag-bg); }
.side .brand { padding: 6px 10px 16px; }
.side .brand .logo { font-size: 1.12rem; }
.side .brand .role {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-dim); margin-top: 3px;
}
.side .nav-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); padding: 14px 10px 6px; font-weight: 700;
}
.side a.nav {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500; text-decoration: none;
}
.side a.nav:hover { background: var(--card); color: var(--text); text-decoration: none; }
.side a.nav.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.side a.nav .count {
  font-size: 0.74rem; color: var(--tag-text); background: var(--tag-bg);
  padding: 1px 7px; border-radius: 999px;
}
.side .foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.side .foot .who { font-size: 0.8rem; color: var(--text-muted); padding: 0 10px 8px; word-break: break-all; }

.main { min-width: 0; display: flex; flex-direction: column; }
/* The top bar doubles as the page title. On a phone it holds the menu button and
   the heading and nothing else; actions move to the top of the content, and the
   primary action is repeated in the drawer so it stays one tap away. */
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content-actions { display: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 16, 0.78); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
  /* Same thickness as the portfolio site's navbar. The bar is a title strip,
     not a toolbar: on a phone it carries the menu button and the two lines of
     heading only. */
  min-height: 64px; padding: 6px 28px;
}
.topbar-titles {
  display: flex; flex-direction: column; justify-content: center;
  gap: 1px; min-width: 0;
}
.topbar h1 {
  font-size: 1.15rem; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .breadcrumb {
  display: block; font-size: 0.79rem; line-height: 1.3; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .breadcrumb a { color: var(--text-dim); text-decoration: none; }
.topbar .breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.content { padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 22px; }
.content.narrow { max-width: 900px; }

/* ---------------------------------------------------------------- misc blocks */
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 7px 18px; font-size: 0.9rem; }
.kv dt { color: var(--text-dim); }
.kv dd { color: var(--text); word-break: break-word; }
.kv dd.mono { font-family: var(--mono); font-size: 0.85rem; }

.codebox {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--mono); font-size: 0.85rem;
  color: var(--text); overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.term-pane {
  position: relative;
  /* A target height, not a promise: the script snaps it to a whole number of
     rows after every fit, so no strip of empty pane is left under the last
     line. Growing it with the window made that gap obvious, which is why it is
     back to a fixed size. */
  height: 460px;
  background: #05070d;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 6px 8px 10px;
  overflow: hidden;
}
/* The terminal fills the pane exactly: the pane already provides the frame, so
   the container adds nothing of its own. Stated rather than inherited, because
   `.xterm` also carries xterm's own `.terminal` class - a rule of ours aimed at
   that name silently resizes the terminal (see .job-log above). */
.term-pane .xterm {
  height: 100%;
  width: 100%;
  padding: 0;
  border: 0;
  max-height: none;
  background: transparent;
}
.term-pane .xterm-viewport { background: transparent !important; }

/* No scrollbar at all, on purpose: the wheel scrolls the buffer directly, and a
   bar in a terminal pane is a strip of chrome that costs a column of text. The
   "last lines" marker is what tells you the view is above the end.

   Both layers need it. xterm 5.5 makes `.xterm` itself scrollable (its content
   is taller than the pane by a few pixels), so a 17px native bar appeared on the
   *outer* element while `.xterm-viewport` - the one that actually holds the
   scrollback - was already clean. */
.term-pane .xterm {
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.term-pane .xterm::-webkit-scrollbar { width: 0; height: 0; }
.term-pane .xterm-viewport {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.term-pane .xterm-viewport::-webkit-scrollbar { width: 0; height: 0; }

/* Shown only while the view is above the end of the output. */
.term-jump {
  position: absolute; right: 14px; bottom: 12px; z-index: 3;
  font: inherit; font-size: .72rem; line-height: 1.4;
  padding: 4px 10px; cursor: pointer;
  color: var(--accent); background: rgba(11, 12, 16, .94);
  border: 1px solid var(--border); border-radius: 999px;
}
.term-jump:hover { border-color: var(--accent); }

#terminal-status.ok { color: var(--ok); }
#terminal-status.bad { color: var(--bad); }

/* The provisioning log block. Its class used to be `.terminal` - which is
   exactly the class xterm puts on its own root element, so this rule landed on
   the terminal itself: a 420px max-height (the terminal's screen was 435px, and
   41px of it overflowed), a 12/14 padding and border on top of the pane's own,
   and a warm #d8c6ad text colour left over from the retired palette. The
   terminal's font belongs to terminal.js; nothing here should reach it. */
.job-log {
  background: #05070d; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5;
  max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: var(--text-muted);
}
.job-log .err { color: var(--bad); }

.alert {
  padding: 11px 15px; border-radius: var(--radius-sm); font-size: 0.9rem;
  border: 1px solid var(--border); background: var(--card);
}
.alert.ok { border-color: #2f5d3f; background: var(--ok-bg); color: var(--ok); }
.alert.err { border-color: #6b2b2b; background: var(--bad-bg); color: var(--bad); }
.alert.info { background: var(--accent-soft); border-color: var(--border); color: var(--tag-text); }

.empty {
  padding: 40px 20px; text-align: center; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg-alt);
}
.empty h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }

.tpl-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.tpl {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
  background: var(--bg-alt); cursor: pointer; display: block;
}
.tpl:hover { border-color: var(--accent); }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl.sel { border-color: var(--accent); background: var(--accent-soft); }
.tpl .t { font-weight: 650; font-size: 0.94rem; margin-bottom: 4px; }
.tpl .d { font-size: 0.83rem; color: var(--text-muted); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .item {
  display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 0.87rem;
}
.timeline .item:last-child { border-bottom: none; }
.timeline .when { color: var(--text-dim); font-size: 0.79rem; white-space: nowrap; min-width: 118px; }
.timeline .what { color: var(--text); }
.timeline .who { color: var(--text-dim); font-size: 0.8rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a {
  padding: 9px 14px; font-size: 0.89rem; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; text-decoration: none;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

.price { font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.price small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.plan-card { display: flex; flex-direction: column; gap: 14px; }
.plan-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 0.89rem; }
.plan-card li { color: var(--text-muted); }
.plan-card li::before { content: "—"; color: var(--accent); margin-right: 8px; }

.inline-form { display: inline; }
.powered { font-size: 0.8rem; color: var(--text-dim); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { padding: 6px 16px; gap: 10px; }
  .topbar .nav-toggle { display: block; }
  .topbar-titles { flex: 1 1 auto; min-width: 0; }
  .topbar h1 { font-size: 1.02rem; }
  .topbar .breadcrumb { font-size: 0.75rem; }
  .topbar-actions { display: none; }
  .content-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .content-actions .btn { flex: 1 1 auto; justify-content: center; }
  .content { padding: 20px 16px 48px; }
  .hero h1 { font-size: 1.8rem; }
}

/* Below the shell breakpoint the sidebar is a drawer, not a row of links. */
@media (max-width: 900px) {
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 320px);
    height: 100%; z-index: 80; padding: 18px 14px;
    border-right: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0, 0, 0, .45);
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
  }
  .side.open { transform: none; }
  .side-scrim {
    position: fixed; inset: 0; z-index: 70; display: block;
    background: rgba(0, 0, 0, .5);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
  }
  .side-scrim.open { opacity: 1; visibility: visible; }
}

@media (min-width: 901px) {
  .topbar .nav-toggle, .side-scrim { display: none; }
}
