/* Ratatos site — Linear-style dark base, orange accent from the logo. */
:root {
  --bg: #08090a;
  --surface: #0f1011;
  --surface-2: #141518;
  --surface-3: #1b1c20;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f8f8;
  --text-2: rgba(247, 248, 248, 0.68);
  --text-3: rgba(247, 248, 248, 0.44);
  --accent: #ff7a1a;
  --accent-hi: #ffa04a;
  --accent-deep: #d9530f;
  --ok: #4cc38a;
  --radius: 20px;
  --container: 1120px;
  --gap: 200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
p { margin: 0; }

.container { width: 100%; max-width: calc(var(--container) + 48px); margin: 0 auto; padding: 0 24px; }
.mut { color: var(--text-3); }

/* ---------- Decorative rail (cable + squirrel) ---------- */
.rail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.cable { position: absolute; top: 0; left: 0; display: block; }
.squirrel {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.squirrel.ready { opacity: 1; }
.squirrel .sq-sprite { display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); }

/* Plugs light up as the squirrel passes them */
.plug-glow { opacity: 0.18; transition: opacity 0.6s ease; }
.plug-tip { fill: #6a3a1a; transition: fill 0.4s ease; }
.plug.on .plug-glow { opacity: 0.9; }
.plug.on .plug-tip { fill: var(--accent); }

main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand img { height: 15px; width: auto; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-primary { background: var(--accent); color: #140700; }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); }
.btn:focus-visible, .nav-links a:focus-visible, .brand:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { padding-top: 112px; }
.eyebrow { font-size: 14px; color: var(--accent-hi); font-weight: 500; margin-bottom: 20px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  max-width: 820px;
  background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 560px; margin-top: 24px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.actions.center { justify-content: center; }

/* Empty band the cable runs through */
.lane { height: 150px; position: relative; }

/* ---------- Panels ---------- */
.panel {
  margin: 0;
  position: relative;
  background: linear-gradient(180deg, #111214 0%, #0c0d0e 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 80px rgba(0, 0, 0, 0.45);
}
.panel-shot { padding: 12px; }
.block { padding-top: var(--gap); }

.panel-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 48px;
}

/* Blocks take part of the width and alternate sides; the free column holds the cable. */
@media (min-width: 961px) {
  .side-left, .side-right { width: 62%; }
  .side-right { margin-left: auto; }
  .hero .lane { height: 96px; }
}

.label { font-family: var(--mono); font-size: 13px; color: var(--accent-hi); margin-bottom: 16px; letter-spacing: 0.02em; }
.feature-text h2 { font-size: clamp(30px, 3.4vw, 42px); }
.feature-text > p:not(.label) { color: var(--text-2); margin-top: 18px; font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-size: 15px; color: var(--text-2); }
.ticks li { position: relative; padding-left: 18px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px rgba(255, 122, 26, 0.6); }
.shot { margin: 0; }
.feature-text, .shot { min-width: 0; }
.shot picture, .shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.panel-grid { display: grid; grid-template-columns: 1fr; }
.cell { padding: 32px 40px; border-top: 1px solid var(--border); }
.cell:first-child { border-top: 0; }
.cell h3 { font-size: 22px; letter-spacing: -0.02em; }
.cell p:not(.label) { color: var(--text-2); margin-top: 10px; font-size: 15px; }
.cell .label { margin-bottom: 12px; }

/* ---------- Window mocks (screenshot placeholders) ---------- */
.window {
  background: #0d0e10;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
.titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #16171a;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #3a3b40; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.titlebar .title { position: absolute; left: 0; right: 0; text-align: center; color: var(--text-3); font-size: 12px; pointer-events: none; }

.win-body { min-height: 220px; }
.split { display: grid; grid-template-columns: 200px 1fr; min-height: 380px; }
.sidebar { background: #111215; border-right: 1px solid var(--border); padding: 14px 10px; }
.side-h { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 8px 6px; }
.side-h:first-child { margin-top: 2px; }
.host { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; color: var(--text-2); }
.host.active { background: rgba(255, 122, 26, 0.12); color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #4a4b52; flex: none; }
.dot.ok { background: var(--ok); }

.term { display: flex; flex-direction: column; min-width: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); }
.tab { padding: 6px 14px; border-radius: 6px 6px 0 0; color: var(--text-3); font-size: 12px; }
.tab.on { background: #17181c; color: var(--text); }
.tab.add { color: var(--text-3); }
.term-out {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #d8dadf;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}
.term-out .pr { color: var(--accent-hi); }
.term-out .pa { color: #7aa7ff; }
.term-out .ok { color: var(--ok); }
.term-out .mut { color: var(--text-3); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.panes { display: grid; grid-template-columns: 1fr 1fr; }
.panes .term-out + .term-out { border-left: 1px solid var(--border); }

.fpath { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); padding: 0 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); }
.frow::before { content: ""; width: 12px; height: 14px; border-radius: 2px; background: #3a3c44; flex: none; }
.frow.dir::before { width: 14px; height: 11px; background: #4b6db3; }
.frow span { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.frow.sel { background: rgba(255, 122, 26, 0.14); color: var(--text); }

.sw { width: 34px; height: 20px; border-radius: 20px; background: #2a2b31; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #9a9ca4; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 16px; background: #fff; }

/* Inline code in copy, Pro tag, hero meta line */
.feature-text code, .lead code { font-family: var(--mono); font-size: 0.88em; color: var(--text); background: rgba(255, 255, 255, 0.06); border-radius: 5px; padding: 1px 5px; }
.feature-text h2 code { font-size: 0.86em; padding: 0 8px; border-radius: 8px; color: var(--accent-hi); background: rgba(255, 122, 26, 0.1); }
.pro { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--accent-hi); border: 1px solid rgba(255, 122, 26, 0.4); border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.meta { margin-top: 22px; font-size: 13px; color: var(--text-3); }
.meta i { font-style: normal; margin: 0 6px; }
.cell-note { padding: 14px 40px 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

/* Sidebar segmented control (Sessions / Files / Tunnels), latency, env tags */
.seg { display: flex; gap: 2px; padding: 2px; margin: 0 2px 6px; background: #0b0c0e; border: 1px solid var(--border); border-radius: 7px; }
.seg b { flex: 1; text-align: center; font-weight: 500; font-size: 11px; color: var(--text-3); padding: 4px 0; border-radius: 5px; }
.seg b.on { background: #22232a; color: var(--text); }
.host .ms { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.tab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tabs { overflow: hidden; }
/* Tabs carry a coloured environment stripe, as in the app (TerminalTabItemView): PROD red, STAGE orange. */
.stripe { width: 3px; height: 14px; border-radius: 1.5px; flex: none; }
.stripe.prod { background: rgb(242, 66, 54); }
.stripe.stage { background: rgb(255, 148, 0); }
.window > .tabs { background: #0d0e10; }

/* Files: sidebar browser that follows the shell's cd */
.split-files { grid-template-columns: 230px 1fr; min-height: 300px; }
.fside { background: #111215; border-right: 1px solid var(--border); padding: 12px 8px; }
.fside .fpath { margin-top: 4px; }
.hl { color: var(--accent-hi); background: rgba(255, 122, 26, 0.12); border-radius: 4px; padding: 0 3px; }
.term-out .hl { color: var(--accent-hi); }
.fdrop { margin: 10px 4px 2px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; text-align: center; font-size: 11.5px; color: var(--text-3); }

/* Tunnels: status dot in the name */

/* Monitoring */
.dot.warn { background: #e5b54a; }
.mon { padding: 6px 8px 8px; }
.mrow { display: grid; grid-template-columns: 1.4fr 1fr 52px 52px; align-items: center; gap: 12px; padding: 10px 10px; border-top: 1px solid var(--border); }
.mrow.head { border-top: 0; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 6px; }
.mrow > span { display: flex; align-items: center; gap: 9px; color: var(--text); }
.mrow svg { width: 100%; height: 18px; }
.mrow polyline { fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.mrow.warn polyline { stroke: #e5b54a; }
.mrow b { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--text-2); text-align: right; }
.mrow b.hot { color: #f2c46d; }
.finding { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 2px 0; padding: 12px 14px; border-radius: 8px; background: rgba(229, 181, 74, 0.08); border: 1px solid rgba(229, 181, 74, 0.25); }
.finding p { display: grid; gap: 2px; }
.finding b { font-weight: 500; color: var(--text); }
.finding p span { font-size: 12px; color: var(--text-2); }
.btn-mini { flex: none; font-size: 12px; padding: 6px 10px; border-radius: 6px; background: #24252b; border: 1px solid var(--border-strong); color: var(--text); }

/* Privacy */
.sec { padding: 8px; }
.touch { display: flex; align-items: center; gap: 14px; padding: 14px 12px; }
.touch p { flex: 1; display: grid; gap: 3px; }
.touch b { font-weight: 500; }
.touch p span { font-size: 12px; color: var(--text-3); }
.fp { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px solid var(--accent); box-shadow: inset 0 0 0 4px #0d0e10, inset 0 0 0 6px rgba(255, 122, 26, 0.6), inset 0 0 0 10px #0d0e10, inset 0 0 0 12px rgba(255, 122, 26, 0.45); }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid var(--border); }
.srow > span { width: 70px; flex: none; color: var(--text-3); font-size: 12px; }
.srow code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow b.ok { font-weight: 500; font-size: 11.5px; color: var(--ok); }

/* ---------- CTA ---------- */
.cta { padding-top: 180px; padding-bottom: 110px; text-align: center; }
.cta h2 { font-size: clamp(36px, 5vw, 60px); }
.cta .lead { margin-left: auto; margin-right: auto; }

/* Laptop the cable plugs into (generic, no brand marks) */
.laptop {
  width: min(640px, 86vw);
  margin: 80px auto 0;
  position: relative;
  text-align: left;
}
.lp-screen {
  background: #0c0d0f;
  border: 1px solid #2c2d33;
  border-radius: 20px 20px 6px 6px;
  padding: 14px 14px 20px;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}
.lp-display {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: #050506;
  position: relative;
}
.lp-ui { width: 100%; height: 100%; display: block; border: 0; border-radius: 0; font-size: 11px; transition: opacity 0.9s ease, filter 0.9s ease; }
.lp-ui img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-ui .titlebar { height: 30px; }
.lp-ui .lights i { width: 9px; height: 9px; }
.lp-ui .split { min-height: 0; height: calc(100% - 30px); grid-template-columns: 34% 1fr; }
.lp-ui .sidebar { padding: 10px 8px; }
.lp-ui .host { padding: 4px 6px; }
.lp-ui .term-out { font-size: 10.5px; padding: 12px 14px; }
.lp-boot {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--text-3);
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.lp-boot span { animation: blink 1.1s steps(1) infinite; }
html.js .laptop:not(.on) .lp-ui { opacity: 0.08; filter: grayscale(1); }
html.js .laptop:not(.on) .lp-boot { opacity: 1; }

/* Launcher overlay on laptop display */
.lp-launcher {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  background: rgba(8, 9, 10, 0.32);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 10;
}
.laptop.on .lp-launcher {
  opacity: 1;
  pointer-events: auto;
}
.lp-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font: 500 14px/1 inherit;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lp-launch-btn svg { color: var(--accent); }
.lp-launch-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.28); }
.lp-launch-btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

/* "or…" between the download button and the laptop */
.cta-or { margin: 28px 0 0; font-size: 13px; color: var(--text-3); letter-spacing: 0.02em; }
.cta .cta-or ~ .laptop { margin-top: 28px; }

/* Demo modal */
.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 7, 10, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.demo-modal-dialog {
  width: min(1180px, 96vw);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-modal-backdrop.is-open .demo-modal-dialog {
  transform: scale(1) translateY(0);
}
.demo-modal-body {
  position: relative;
  height: min(720px, 86vh);
}

/* The demo window is the dialog: its own title bar, red light closes it; hints below. */
.demo-modal-body .demo { height: 100%; display: flex; flex-direction: column; gap: 10px; }
.demo-modal-body .demo .rt-win { flex: 1; min-height: 0; height: auto; box-shadow: 0 40px 140px rgba(0, 0, 0, 0.9); }

/* Hero window presentation */
.panel-hero { padding: 12px; }
.hero-window-frame {
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d0e10;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
.hero-window-frame picture, .hero-window-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.hero-demo-jump {
  color: var(--accent-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  margin-left: auto;
  transition: color 0.15s ease;
}
.hero-demo-jump:hover {
  color: #fff;
}

.lp-base {
  position: relative; height: 16px; width: 114%; margin-left: -7%;
  background: linear-gradient(180deg, #2c2d33 0%, #1a1b1f 55%, #0f1012 100%);
  border-radius: 2px 2px 16px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.lp-base::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 16%; height: 6px; transform: translateX(-50%);
  background: #121316; border-radius: 0 0 8px 8px;
}
/* Ports are invisible anchors: the cable plug itself shows (and lights up) where it goes in. */
.lp-port { position: absolute; top: 4px; width: 5px; height: 7px; pointer-events: none; }
.lp-port.l { left: 0; }
.lp-port.r { right: 0; }

/* Server rack LEDs (drawn in the cable SVG) */
.led { animation: led 2.6s steps(2) infinite; }
@keyframes led { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .led, .lp-boot span { animation: none; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; min-height: 72px; padding-top: 22px; padding-bottom: 22px; align-items: center; font-size: 13px; color: var(--text-2); }
.credits { flex-basis: 100%; font-size: 11px; color: var(--text-3); }
.credits a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.2); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --gap: 150px; }
  .panel-feature { padding: 32px; gap: 32px; }
  .cell { padding: 28px 32px; }
  .cell-note { padding: 12px 32px 16px; }
  .split, .lp-ui .split { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .split-files { grid-template-columns: 1fr; }
  .fside { order: 2; border-right: 0; border-top: 1px solid var(--border); }
  /* Narrow screens: the cable comes down the right edge into the right port,
     so the laptop is narrower and shifted left to leave room for the squirrel. */
  .laptop { width: 64vw; margin-left: 5vw; margin-right: auto; }
  .lp-base { width: 106%; margin-left: -3%; }
}
@media (max-width: 640px) {
  :root { --gap: 160px; --radius: 16px; }
  .hero { padding-top: 72px; }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .panel-feature { padding: 24px; }
  .cell-note { padding: 12px 24px 16px; }
  .mrow { grid-template-columns: 1.3fr 1fr 44px 44px; gap: 8px; padding: 9px 6px; }
  .finding { flex-direction: column; align-items: flex-start; }
  .tabs .tab:nth-child(3):not(.add) { display: none; }
  .panes { grid-template-columns: 1fr; }
  .panes .term-out + .term-out { border-left: 0; border-top: 1px solid var(--border); }
  .lane { height: 150px; }
  .hero .meta { margin-bottom: 18px; }
  /* The cable runs down the right edge into the laptop port: keep the CTA copy clear of it. */
  .cta h2, .cta .lead { padding-right: 34px; }
  /* Very narrow phones: smaller laptop further left, so the squirrel at the right port stays on screen. */
  .laptop { width: 58vw; margin-left: 3vw; }
  .cta { padding-top: 120px; padding-bottom: 100px; }
  .lp-screen { padding: 8px 8px 12px; border-radius: 14px 14px 4px 4px; }
  .lp-base { height: 11px; }
  .lp-ui .titlebar .title { display: none; }
}

/* ---------- Interactive hero demo (js/demo.js) ----------
   Colours: TerminalTheme.ratatosBlack — the app's default theme
   (TerminalEngine/TerminalTheme.swift). Its accent is a neutral light grey;
   the site's orange stays outside the window. */
.demo {
  --rt-bg: rgb(13, 14, 16);
  --rt-fg: rgb(247, 248, 248);
  --rt-side: rgb(17, 18, 21);
  --rt-panel: rgb(23, 24, 28);
  --rt-tool: rgb(22, 23, 26);
  --rt-acc: rgb(204, 209, 219);
  --rt-acc-a: 204, 209, 219;
  --rt-border: rgba(255, 255, 255, 0.08);
  --rt-sec: rgb(138, 140, 148);
  --rt-sel: rgba(255, 255, 255, 0.20);
  --rt-cursor: rgba(227, 230, 235, 0.95);
  --rt-green: rgb(48, 209, 88);
  --rt-yellow: rgb(255, 214, 10);
  --rt-red: rgb(255, 69, 58);
  --rt-prod: rgb(242, 66, 54);
  --rt-stage: rgb(255, 148, 0);
  --rt-purple: rgb(191, 90, 242);
  --rt-ansi-green: rgb(77, 194, 138);
  --rt-ansi-blue: rgb(102, 166, 250);
  --rt-ansi-cyan: rgb(61, 219, 217);
  --rt-dim: rgb(138, 140, 148);
  --rt-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  font-family: var(--rt-sys);
  color: var(--rt-fg);
}
.panel-demo { padding: 10px; }
.rt-win { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 470px; border-radius: 11px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16); background: var(--rt-bg); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); font-size: 12px; line-height: 1.3; text-align: left; }
.rt-i { width: 12px; height: 12px; flex: none; }
/* Distro logos (Views/Common/DistroIconView.swift) */
.rt-distro { flex: none; }
.rt-r1 .rt-distro { width: 14px; height: 14px; }
.rt-tab .rt-distro, .rt-sftph .rt-distro { width: 12px; height: 12px; }
.demo button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.demo button:focus-visible, .demo input:focus-visible { outline: 2px solid var(--rt-acc); outline-offset: 1px; }
.demo code { font-family: var(--mono); }

/* sidebar */
.rt-side { display: flex; flex-direction: column; min-height: 0; background: var(--rt-side); border-right: 1px solid var(--rt-border); }
.rt-chrome { height: 38px; flex: none; display: flex; align-items: center; padding: 0 14px; background: var(--rt-tool); }
.rt-chrome-side { background: var(--rt-side); }
.rt-lights { display: flex; gap: 8px; }
.rt-lights i { width: 12px; height: 12px; border-radius: 50%; }
.rt-lights i:nth-child(1) { background: #ff5f57; }
.rt-lights i:nth-child(2) { background: #febc2e; }
.rt-lights i:nth-child(3) { background: #28c840; }
.rt-title { font-size: 13px; font-weight: 600; color: var(--rt-fg); }
.rt-segbar { display: flex; gap: 6px; padding: 8px; background: var(--rt-tool); border-bottom: 1px solid var(--rt-border); }
.rt-seg { flex: 1; display: flex; gap: 2px; padding: 2px; background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 7px; }
.demo .rt-segb { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px; border-radius: 5px; font-size: 11px; color: var(--rt-sec); transition: background 0.15s ease, color 0.15s ease; }
.demo .rt-segb .rt-i { width: 10px; height: 10px; }
.demo .rt-segb.on { background: rgba(var(--rt-acc-a), 0.18); color: var(--rt-acc); font-weight: 600; }
.rt-gear { display: flex; align-items: center; padding: 5px; color: var(--rt-sec); background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 6px; }
.rt-panel { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.rt-head { display: flex; gap: 8px; padding: 8px 10px 4px; }
.rt-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 6px; background: var(--rt-tool); border-radius: 6px; color: var(--rt-sec); }
.rt-search input, .rt-path input { flex: 1; min-width: 0; background: none; border: 0; color: var(--rt-fg); font: inherit; font-size: 12px; outline: none; }
.rt-search input::placeholder { color: rgba(138, 140, 148, 0.8); }
.rt-plus { display: flex; align-items: center; padding: 0 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--rt-fg); }
.rt-chips { display: flex; gap: 5px; padding: 2px 10px 6px; }
.demo .rt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 12px; background: var(--rt-tool); color: var(--rt-sec); border: 0.6px solid rgba(255, 255, 255, 0.04); font-size: 10px; font-weight: 500; }
.rt-chip.env span { font-family: var(--mono); }
.rt-chip i { width: 5.5px; height: 5.5px; border-radius: 50%; }
.rt-chip.prod i { background: var(--rt-prod); }
.rt-chip.stage i { background: var(--rt-stage); }
.rt-chip small { font-size: 9px; padding: 0 3px; border-radius: 3px; color: rgba(138, 140, 148, 0.8); }
.demo .rt-chip.sel { font-weight: 700; color: var(--rt-acc); background: rgba(var(--rt-acc-a), 0.18); border: 1px solid rgba(var(--rt-acc-a), 0.6); }
.demo .rt-chip.prod.sel { color: var(--rt-prod); background: rgba(242, 66, 54, 0.22); border-color: rgba(242, 66, 54, 0.6); }
.demo .rt-chip.stage.sel { color: var(--rt-stage); background: rgba(255, 148, 0, 0.22); border-color: rgba(255, 148, 0, 0.6); }
.rt-chip.sel small { color: var(--rt-fg); background: rgba(13, 14, 16, 0.4); }
.rt-list { display: grid; gap: 6px; padding: 4px 10px 10px; }
.demo .rt-card { display: flex; border-radius: 8px; overflow: hidden; background: var(--rt-panel); border: 1px solid var(--rt-border); transition: border-color 0.15s ease; }
.demo .rt-card:hover { border-color: rgba(var(--rt-acc-a), 0.4); }
.demo .rt-card.sel { background: rgba(var(--rt-acc-a), 0.12); border: 1.5px solid var(--rt-acc); }
.rt-stripe { width: 3.5px; flex: none; }
.env-prod .rt-stripe, .env-prod .rt-tstripe { background: var(--rt-prod); }
.env-stage .rt-stripe, .env-stage .rt-tstripe { background: var(--rt-stage); }
.rt-cbody { flex: 1; min-width: 0; display: grid; gap: 5px; padding: 8px; }
.rt-r1, .rt-r2, .rt-r3 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rt-r1 .rt-i { width: 13px; height: 13px; }
.rt-r1 b { font-size: 12px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-os { margin-left: auto; flex: none; font: normal 600 9px/1.3 var(--rt-sys); padding: 1.5px 5px; border-radius: 4px; color: var(--os); background: color-mix(in srgb, var(--os) 12%, transparent); box-shadow: inset 0 0 0 0.8px color-mix(in srgb, var(--os) 25%, transparent); white-space: nowrap; }
.rt-os.sm { margin-left: 0; font-size: 8.5px; font-weight: 500; padding: 1px 4px; border-radius: 3px; box-shadow: none; }
.rt-ping { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; border-radius: 3.5px; font: 600 9px/1.3 var(--mono); }
.rt-ping i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.rt-ping.g { color: var(--rt-green); background: rgba(48, 209, 88, 0.12); box-shadow: inset 0 0 0 0.7px rgba(48, 209, 88, 0.3); }
.rt-ping.y { color: rgb(230, 191, 26); background: rgba(230, 191, 26, 0.12); }
.rt-r2 code { font-size: 11px; color: var(--rt-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-env { margin-left: auto; font: normal 700 8.5px/1.3 var(--mono); padding: 1px 4.5px; border-radius: 3px; }
.rt-env.prod { color: var(--rt-prod); background: rgba(242, 66, 54, 0.18); }
.rt-env.stage { color: var(--rt-stage); background: rgba(255, 148, 0, 0.18); }
.rt-div { height: 1px; background: rgba(255, 255, 255, 0.06); }
.rt-r3 { font-size: 9px; color: var(--rt-sec); }
.rt-r3 .rt-i { width: 8px; height: 8px; }
.rt-tunb { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px; border-radius: 3px; color: var(--rt-sec); background: rgba(138, 140, 148, 0.14); font-weight: 500; }
.rt-auth { display: inline-flex; align-items: center; gap: 2px; }
.rt-auth code { font-size: 9px; }
.rt-dots { margin-left: auto; display: flex; }
.rt-dots .rt-i { width: 14px; height: 14px; }
.rt-empty { padding: 18px 10px; text-align: center; color: var(--rt-sec); font-size: 12px; }

/* files (SFTPBrowserView) */
.rt-sftph { display: flex; align-items: center; gap: 6px; padding: 6px 10px 4px; background: rgba(22, 23, 26, 0.6); border-bottom: 1px solid var(--rt-border); font-size: 11px; }
.rt-sftph b { font-weight: 600; white-space: nowrap; }
.rt-sftph span { margin-left: auto; font-size: 10px; color: var(--rt-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-sftpt { display: flex; gap: 5px; padding: 6px 8px 4px; }
.demo .rt-tb { display: flex; padding: 4px 5px; border-radius: 5px; color: var(--rt-sec); background: var(--rt-panel); border: 1px solid var(--rt-border); }
.demo .rt-tb[data-act]:hover { color: var(--rt-fg); }
.demo .rt-tb[aria-disabled] { cursor: default; opacity: 0.7; }
.rt-path { display: flex; align-items: center; gap: 6px; padding: 3px 8px; color: var(--rt-sec); }
.rt-path input { font-family: var(--mono); font-size: 11px; padding: 3px 6px; border-radius: 5px; background: var(--rt-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.rt-err { margin: 4px 8px; padding: 4px 6px; border-radius: 4px; color: var(--rt-red); background: rgba(255, 69, 58, 0.08); font-size: 10px; }
.rt-files { display: grid; gap: 1px; padding: 4px 6px 8px; }
.rt-files.enter { animation: rt-in 0.22s ease both; }
@keyframes rt-in { from { opacity: 0; transform: translateY(4px); } }
.rt-frow { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 4px; cursor: default; user-select: none; }
.rt-frow:hover { background: rgba(22, 23, 26, 0.7); }
.rt-frow.sel { background: var(--rt-sel); }
.rt-frow .rt-i { width: 14px; height: 14px; }
.rt-frow .dir { color: #ffd60a; }
.rt-frow .lnk { color: #64d2ff; }
.rt-frow .file { color: var(--rt-acc); }
.rt-frow.sel .rt-i { color: var(--rt-fg); }
.rt-fname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-frow.sel .rt-fname { font-weight: 600; }
.rt-frow code { font-size: 11px; color: var(--rt-sec); }
.demo .rt-open { display: flex; padding: 2px; color: var(--rt-sec); border-radius: 4px; }
.demo .rt-open .rt-i { width: 11px; height: 11px; stroke-width: 2; }

/* tunnels (TunnelCardRowView) */
.rt-tlist { padding-top: 8px; border-top: 1px solid var(--rt-border); }
.rt-tcard { display: grid; gap: 6px; padding: 9px; border-radius: 8px; background: var(--rt-panel); border: 1px solid var(--rt-border); }
.rt-tr1 { display: flex; align-items: center; gap: 6px; }
.rt-tdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(138, 140, 148, 0.5); transition: background 0.2s ease, box-shadow 0.2s ease; }
.connected .rt-tdot { background: var(--rt-green); box-shadow: 0 0 6px rgba(48, 209, 88, 0.6); }
.connecting .rt-tdot { background: var(--rt-yellow); }
.rt-tr1 b { font-size: 12px; font-weight: 600; }
.rt-proto { font: normal 700 8px/1.3 var(--mono); padding: 1px 4px; border-radius: 3px; color: var(--rt-acc); background: rgba(var(--rt-acc-a), 0.18); }
/* Purple marks the WireGuard protocol only (app AGENTS §2.56). */
.rt-proto.wg { color: var(--rt-purple); background: rgba(191, 90, 242, 0.18); }
.demo .rt-switch { margin-left: auto; width: 26px; height: 15px; border-radius: 8px; background: rgba(255, 255, 255, 0.18); position: relative; transition: background 0.18s ease; flex: none; }
.rt-switch i { position: absolute; top: 1.5px; left: 1.5px; width: 12px; height: 12px; border-radius: 50%; background: #e8e8ea; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); transition: transform 0.18s ease; }
.demo .rt-switch.on { background: var(--rt-acc); }
.rt-switch.on i { transform: translateX(11px); background: #fff; }
.rt-spin { margin-left: auto; width: 12px; height: 12px; margin-right: 7px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.2); border-top-color: var(--rt-fg); animation: rt-spin 0.7s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.rt-tr2 { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 5px; background: rgba(13, 14, 16, 0.5); font-size: 9px; color: var(--rt-sec); min-width: 0; }
.rt-tr3 { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rt-slabel { font-size: 10px; font-weight: 600; color: var(--rt-sec); }
.rt-schip { font-size: 9px; font-weight: 500; padding: 1.5px 5px; border-radius: 3px; color: var(--rt-sec); background: rgba(255, 255, 255, 0.08); white-space: nowrap; }
.rt-scope { font: normal 500 9px/1.3 var(--rt-sys); padding: 2px 5px; border-radius: 4px; }
.rt-scope.app { color: rgb(255, 159, 10); background: rgba(255, 159, 10, 0.12); }
.rt-scope.system { color: var(--rt-green); background: rgba(48, 209, 88, 0.12); }
.rt-tr2 > span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.rt-tr2 .rt-i { width: 9px; height: 9px; }
.rt-tr2 code { font-size: 9px; }
.rt-acc { color: var(--rt-acc); }
.rt-acc code { font-size: 10px; font-weight: 700; }
.rt-arr { opacity: 0.5; width: 8px !important; }

/* terminal area */
.rt-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; }
.rt-tabbar { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: var(--rt-tool); border-bottom: 1px solid var(--rt-border); }
.rt-count { flex: none; min-width: 20px; padding: 2px 5px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.07); font: 600 10px/1.3 var(--mono); color: var(--rt-sec); text-align: center; }
.rt-tabs { display: flex; gap: 6px; min-width: 0; overflow: hidden; flex: 1; }
.demo .rt-tab { display: inline-flex; align-items: center; gap: 5px; min-width: 96px; max-width: 170px; padding: 4px 4px 4px 3px; border-radius: 6px; color: var(--rt-sec); font-size: 11.5px; border: 1px solid transparent; flex: 0 1 auto; }
.demo .rt-tab:hover { background: var(--rt-panel); }
.demo .rt-tab.on { background: var(--rt-bg); color: var(--rt-fg); font-weight: 500; }
.demo .rt-tab.on.env-prod { border-color: rgba(242, 66, 54, 0.7); }
.demo .rt-tab.on.env-stage { border-color: rgba(255, 148, 0, 0.7); }
.rt-tstripe { width: 3px; height: 16px; border-radius: 1.5px; flex: none; }
.rt-tab .rt-i { width: 11px; height: 11px; }
.rt-tab > span:not(.rt-x) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-x { display: flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; }
.rt-x .rt-i { width: 8px; height: 8px; stroke-width: 2.2; }
.rt-tools { flex: none; display: flex; align-items: center; gap: 6px; color: var(--rt-sec); font-size: 11px; }
.rt-layout { display: flex; gap: 2px; padding: 2px; border-radius: 5px; background: var(--rt-panel); }
.rt-layout .rt-i { width: 14px; height: 14px; padding: 1px; border-radius: 3px; }
.rt-layout .rt-i.on { color: var(--rt-acc); background: rgba(var(--rt-acc-a), 0.18); }
.rt-tool { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 5px; background: var(--rt-panel); color: var(--rt-fg); white-space: nowrap; }
.rt-tool .rt-i { width: 10px; height: 10px; }
.rt-snip { width: 16px; height: 16px; }
.rt-term { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; background: var(--rt-bg); font: 12px/1.45 var(--mono); cursor: text; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.rt-out div { white-space: pre-wrap; word-break: break-all; }
.rt-dim { color: var(--rt-dim); }
.rt-pu { color: var(--rt-ansi-green); font-weight: 600; }
.rt-pp { color: var(--rt-ansi-blue); font-weight: 600; }
.rt-ld { color: var(--rt-ansi-blue); font-weight: 600; }
.rt-ll { color: var(--rt-ansi-cyan); font-weight: 600; }
.rt-inputline { display: flex; white-space: pre; }
.rt-in { flex: 1; min-width: 40px; background: none; border: 0; padding: 0; color: var(--rt-fg); font: inherit; caret-color: var(--rt-cursor); outline: none; }
.demo .rt-in:focus-visible { outline: none; }

/* bar under the window (site chrome, not part of the app) */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 6px 4px; font-size: 13px; color: var(--text-3); }
.demo-bar b { font-weight: 500; color: var(--text-2); }
.demo-bar code { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
html:not(.js) .demo-bar { display: none; }

/* Tab bar tools give way to tabs as the terminal area narrows (the app scrolls its tab bar instead). */
@container (max-width: 700px) { .rt-layout, .rt-tool.mx { display: none; } }
/* Narrow: keep the Monitoring and Commands toggles (icon only) — phones have no ⌃⇧D / ⌃⇧K. */
@container (max-width: 560px) { .demo .rt-monbtn .rt-montxt { display: none; } .demo .rt-monbtn { padding: 4px 6px; } }
@container (max-width: 400px) { .demo .rt-tab { min-width: 0; } .rt-tab .rt-x { display: none; } }
@media (max-width: 960px) {
  .demo .rt-win { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .panel-demo { padding: 6px; }
  .demo .rt-win { grid-template-columns: minmax(0, 1fr); grid-template-rows: 250px 300px; height: auto; }
  .demo .rt-side { border-right: 0; border-bottom: 1px solid var(--rt-border); }
  .demo .rt-main .rt-chrome { display: none; }
  .demo .rt-tab { max-width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-spin, .rt-files.enter { animation: none; }
}
.demo-bar em { font-style: normal; color: var(--text-2); }

/* Static sidebar-only windows (e.g. 03 · Tunnels): same look as the demo, not interactive. */
.rt-static { display: flex; justify-content: center; }
.rt-static .rt-win.rt-sideonly { display: block; width: 100%; max-width: 400px; height: auto; }
.rt-static .rt-side { border-right: 0; }
.rt-static .rt-panel { overflow: visible; }
.rt-static .rt-segb, .rt-static .rt-switch { cursor: default; }
.rt-ph { color: rgba(138, 140, 148, 0.8); font-size: 12px; }
.rt-static .rt-switch { display: inline-block; margin-left: auto; width: 26px; height: 15px; border-radius: 8px; background: rgba(255, 255, 255, 0.18); position: relative; flex: none; }
.rt-static .rt-switch.on { background: var(--rt-acc); }
.rt-static .rt-segb { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px; border-radius: 5px; font-size: 11px; color: var(--rt-sec); }
.rt-static .rt-segb .rt-i { width: 10px; height: 10px; }
.rt-static .rt-segb.on { background: rgba(var(--rt-acc-a), 0.18); color: var(--rt-acc); font-weight: 600; }

/* ---------- Demo: window controls, monitoring, commands, hints ---------- */
.demo .rt-light { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; position: relative; flex: none; }
.demo .rt-light::after { content: ""; position: absolute; inset: 3px; opacity: 0; transition: opacity 0.12s ease;
  background: linear-gradient(45deg, transparent 43%, rgba(0,0,0,.6) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, rgba(0,0,0,.6) 43% 57%, transparent 57%); }
.demo .rt-lights:hover .rt-light::after, .demo .rt-light:focus-visible::after { opacity: 1; }
.rt-body { flex: 1; min-height: 0; display: flex; }
.rt-body > .rt-term { flex: 1; min-width: 0; }
.rt-mon[hidden], .rt-snips[hidden], .rt-term[hidden] { display: none !important; }
.demo kbd { font: 600 9.5px/1 var(--mono); padding: 2px 4px; border-radius: 4px; color: var(--rt-sec); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.rt-term .rt-ok { color: var(--rt-ansi-green); }

/* toolbar toggles */
.demo .rt-monbtn { flex: none; padding: 4px 9px 4px 8px; border: 0; cursor: pointer; font: 400 11px/1.2 var(--rt-sys); }
/* Bold text is wider: reserve it with an invisible bold copy so switching on never clips or shifts. */
.rt-montxt { display: inline-grid; }
.rt-montxt::after { content: attr(data-t); font-weight: 700; height: 0; visibility: hidden; overflow: hidden; }
.demo .rt-monbtn.on { background: var(--rt-acc); color: #0d0e10; font-weight: 700; }
.demo .rt-snipbtn { display: flex; color: var(--rt-sec); padding: 2px; border-radius: 4px; }
.demo .rt-snipbtn .rt-i { width: 16px; height: 16px; }
.demo .rt-snipbtn.on { color: var(--rt-acc); }

/* Monitoring */
.rt-mon { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--rt-bg); overflow: hidden; container-type: inline-size; }
.rt-montool { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--rt-tool); border-bottom: 1px solid var(--rt-border); flex: none; }
.rt-montitle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.rt-montitle .rt-i { width: 13px; height: 13px; }
.rt-monfill { flex: 1; }
.rt-chipst { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--rt-fg); white-space: nowrap; }
.rt-chipst i { width: 7px; height: 7px; border-radius: 50%; }
.rt-monupd { font-size: 10px; color: var(--rt-sec); white-space: nowrap; }
.demo .rt-mbtn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 6px; font-size: 11px; font-weight: 500; background: var(--rt-panel); border: 1px solid var(--rt-border); color: var(--rt-fg); white-space: nowrap; }
.demo .rt-mbtn:disabled { opacity: .6; cursor: default; }
.demo .rt-mbtn .rt-i { width: 11px; height: 11px; }
.demo .rt-mbtn kbd { padding: 1px 3px; font-size: 9px; }
.rt-mgear { display: flex; color: var(--rt-sec); }
.rt-mgear .rt-i { width: 13px; height: 13px; }
.rt-spin.sm { width: 10px; height: 10px; margin: 0; }
.rt-mscroll { flex: 1; min-height: 0; overflow: auto; }
.rt-mtable { min-width: 540px; }
/* Metric columns never go below their content (value 36 + bar ≥ 16 + sparkline 24): the table scrolls instead of overlapping. */
.rt-mrow { display: grid; grid-template-columns: 10px 8px minmax(130px, 1.3fr) repeat(3, minmax(92px, 1fr)) 96px minmax(110px, 1fr) 30px; align-items: center; gap: 12px; height: 40px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; }
.rt-mrow:hover, .rt-mrow.open { background: rgba(23, 24, 28, 0.6); }
.rt-mrow:focus-visible { outline: 2px solid var(--rt-acc); outline-offset: -2px; }
.rt-mhead { height: 24px; cursor: default; font: 600 9px/1 var(--rt-sys); letter-spacing: .04em; text-transform: uppercase; color: var(--rt-sec); border-bottom: 1px solid var(--rt-border); }
.rt-mhead:hover { background: none; }
.rt-chev { display: flex; color: var(--rt-sec); transition: transform .15s ease; }
.rt-chev .rt-i { width: 9px; height: 9px; stroke-width: 2.2; }
.rt-mrow.open .rt-chev { transform: rotate(90deg); }
.rt-sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.rt-sev.ok { background: var(--rt-green); }
.rt-sev.warning { background: rgb(255, 159, 10); }
.rt-sev.bad { background: var(--rt-red); }
.rt-mid { display: grid; gap: 1px; min-width: 0; }
.rt-mid b { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rt-mid code { font-size: 10px; color: var(--rt-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-mcell { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.rt-mcell b { width: 36px; flex: none; text-align: right; font: 400 11px/1 var(--mono); color: var(--rt-sec); }
.rt-mbar { position: relative; display: block; flex: 1; min-width: 16px; max-width: 140px; height: 5px; border-radius: 3px; background: rgba(138, 140, 148, 0.18); overflow: hidden; }
.rt-mbar > i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.rt-spark { width: 24px; height: 12px; flex: none; }
.rt-spark polyline { fill: none; stroke-width: 1; opacity: .8; }
.rt-mup { font-size: 10px; color: var(--rt-sec); white-space: nowrap; }
.rt-miss { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: rgb(255, 159, 10); white-space: nowrap; }
.rt-miss .rt-i { width: 11px; height: 11px; }
.rt-mact { display: flex; justify-content: flex-end; }
.demo .rt-mterm { display: flex; padding: 4px; border-radius: 4px; color: var(--rt-sec); opacity: .55; }
.rt-mrow:hover .rt-mterm, .rt-mrow.open .rt-mterm { opacity: 1; }
/* The table may scroll sideways on narrow screens; the cards stay in view at the visible width. */
.rt-mdetail { position: sticky; left: 0; box-sizing: border-box; width: min(100%, 100cqw); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 12px; align-items: start; padding: 6px 16px 14px 50px; background: rgba(23, 24, 28, 0.35); border-bottom: 1px solid rgba(255,255,255,.04); }
.rt-dcard { background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rt-dcard h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--rt-sec); margin: 0 0 3px; white-space: nowrap; }
.rt-dcard h4 .rt-i { width: 12px; height: 12px; flex: none; }
.rt-dmeta { margin-left: auto; font-size: 10px; font-weight: 400; color: var(--rt-sec); overflow: hidden; text-overflow: ellipsis; }
.rt-dcard hr { width: 100%; height: 1px; border: 0; margin: 2px 0; background: var(--rt-border); }
.rt-res { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.rt-res p { min-width: 0; display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 11px; font-weight: 500; }
.rt-res code { flex: 1; min-width: 0; text-align: right; font-size: 10px; color: var(--rt-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-res b { min-width: 34px; text-align: right; font: 600 11px/1 var(--mono); }
.rt-res b.over { color: var(--rt-red); }
.rt-res .rt-mbar { max-width: none; height: 4px; }
.rt-kv { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 11px; }
.rt-kv span { color: var(--rt-sec); white-space: nowrap; }
.rt-kv code { flex: 1; min-width: 0; text-align: right; font-size: 11px; color: var(--rt-fg); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rt-failed { display: grid; gap: 3px; padding-bottom: 2px; }
.rt-failed b { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: rgb(255, 159, 10); }
.rt-failed b .rt-i { width: 11px; height: 11px; }
.rt-failed code { font-size: 10px; color: rgb(255, 159, 10); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-svc { display: flex; align-items: center; gap: 6px; font-size: 11px; min-width: 0; }
.rt-svc .rt-sev { width: 6px; height: 6px; flex: none; }
.rt-svc .rt-sev.bad { background: var(--rt-red); }
.rt-svck { width: 10px; height: 10px; flex: none; color: var(--rt-sec); }
.rt-svc code { min-width: 0; max-width: 62%; flex: none; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-svc > span:not(.rt-svcm) { margin-left: auto; padding-left: 6px; min-width: 0; color: var(--rt-sec); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.rt-svcm { display: flex; flex: none; width: 18px; justify-content: center; color: var(--rt-sec); }
.rt-svcm .rt-i { width: 12px; height: 12px; }
.demo .rt-link { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 0; border: 0; background: none; font: 400 11px/1.3 var(--rt-sys); color: rgb(10, 132, 255); cursor: pointer; white-space: nowrap; }
.demo .rt-link:hover { text-decoration: underline; }
.demo .rt-link .rt-i { width: 11px; height: 11px; }
.rt-dcard h4 .rt-link { flex: none; font-weight: 400; }
.rt-dcard h4 .rt-dmeta + .rt-link { margin-left: 8px; }
.rt-sevsum { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; font-size: 11px; font-weight: 600; }
.rt-sevsum span { display: inline-flex; align-items: center; gap: 5px; }
.rt-sevsum .rt-i { width: 12px; height: 12px; }
.rt-sevsum .warning, .rt-find.warning .rt-findi { color: rgb(255, 159, 10); }
.rt-sevsum .info, .rt-find.info .rt-findi { color: rgb(10, 132, 255); }
.rt-find { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 6px; }
.rt-find.warning { background: rgba(255, 159, 10, 0.07); }
.rt-find.info { background: rgba(10, 132, 255, 0.07); }
.rt-findi { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.rt-find > div { display: grid; gap: 4px; min-width: 0; }
.rt-find b { font-size: 12px; font-weight: 600; color: var(--rt-fg); }
.rt-find > div > span { font-size: 11px; color: var(--rt-sec); line-height: 1.4; }
.rt-findact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 0; }
.demo .rt-mbtn.sm { height: 22px; padding: 0 8px; }
.rt-allgood { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 600; color: var(--rt-green); }
.rt-allgood .rt-i { width: 12px; height: 12px; }
.rt-passed { margin: -3px 0 0; font-size: 11px; color: var(--rt-sec); line-height: 1.45; }
.rt-drawer { flex: none; max-height: 42%; display: flex; flex-direction: column; border-top: 1px solid var(--rt-border); background: var(--rt-side); }
.rt-drawerh { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 14px; background: var(--rt-tool); font-size: 11.5px; }
.rt-drawerh code { flex: 1; min-width: 0; font-size: 10px; color: var(--rt-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Container queries come after the base rules so they win at equal specificity. */
/* The monitoring toolbar gives way as the area narrows (e.g. with Commands open beside it). */
/* App: three cards in a row from 820 pt, otherwise Resources + Services, Analysis below. */
@container (max-width: 860px) { .rt-mdetail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-left: 16px; } .rt-dcard.wide { grid-column: 1 / -1; } }
@container (max-width: 470px) { .rt-mdetail { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 680px) { .rt-monupd { display: none; } }
@container (max-width: 800px) {
  .rt-mrow { grid-template-columns: 10px 8px minmax(118px, 1.3fr) repeat(3, minmax(64px, 1fr)) minmax(92px, 1fr) 26px; gap: 10px; padding: 0 12px; }
  .rt-mup, .rt-mhead > span:nth-child(7), .rt-mrow .rt-spark { display: none; }
  .rt-mdetail { padding-left: 12px; padding-right: 12px; }
}
@container (max-width: 520px) { .rt-chipst, .rt-mgear { display: none; } .demo .rt-mbtn kbd { display: none; } }
.rt-drawer pre.rt-confirm { color: var(--rt-sec); font-family: var(--rt-sys); }
.rt-drawer pre { margin: 0; padding: 10px 14px; overflow: auto; font: 11px/1.5 var(--mono); color: var(--rt-fg); }

/* Commands panel */
.rt-snips { width: 300px; flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--rt-border); background: var(--rt-side); }
.rt-snh { padding: 8px 10px; font-size: 12px; font-weight: 600; background: var(--rt-tool); border-bottom: 1px solid var(--rt-border); }
.rt-sntabs { padding: 6px 10px; border-bottom: 1px solid var(--rt-border); }
.rt-sntabs .rt-seg { border-radius: 8px; }
.demo .rt-sntabs .rt-segb kbd { margin-left: 2px; padding: 1px 3px; font-size: 8.5px; font-weight: 400; background: none; border: 0; }
.rt-snlist { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 10px; display: grid; gap: 1px; align-content: start; }
.rt-snsec { margin: 8px 2px 3px; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rt-sec); }
.demo .rt-snrow { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; border: 1px solid transparent; }
.demo .rt-snrow:hover, .demo .rt-snrow:focus-visible { background: rgba(var(--rt-acc-a), 0.12); border-color: rgba(var(--rt-acc-a), 0.3); outline: none; }
.rt-snrow > .rt-i { width: 9px; height: 9px; color: var(--rt-sec); flex: none; }
.rt-snrow span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rt-snrow b { font-size: 11.5px; font-weight: 500; }
.rt-snrow code { font-size: 9.5px; color: var(--rt-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo .rt-snrow kbd { color: var(--rt-acc); background: rgba(var(--rt-acc-a), 0.18); border: 0; }
.rt-snfolder { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--rt-sec); }
.rt-snfolder > .rt-i:first-child { width: 12px; height: 12px; }
.rt-snfolder span { flex: 1; display: grid; gap: 1px; }
.rt-snfolder b { font-size: 11.5px; font-weight: 500; color: var(--rt-fg); }
.rt-snfolder small { font-size: 9.5px; }
.rt-snfolder > .rt-i:last-child { width: 9px; height: 9px; opacity: .5; }
.rt-sndemo { margin: 10px 4px 0; font-size: 10.5px; color: var(--rt-sec); line-height: 1.4; }

/* Hints bar under the window (site chrome) */
.rt-hints { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; padding: 0 4px; font-size: 12px; color: var(--text-3); }
.rt-hintnote { white-space: nowrap; }
.rt-hintkeys { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; }
.rt-hint { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text-2); }
.demo .rt-hint kbd { font-size: 10.5px; padding: 3px 6px; color: var(--text); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.demo .rt-hintclose { cursor: pointer; }
.demo .rt-hintclose:hover { color: var(--text); }

@media (max-width: 960px) {
  .rt-snips { position: absolute; right: 0; top: 0; bottom: 0; z-index: 2; box-shadow: -20px 0 40px rgba(0,0,0,.5); }
  .rt-body { position: relative; }
}
@media (max-width: 640px) {
  .demo-modal-backdrop { padding: 8px; align-items: stretch; }
  .demo-modal-body { height: 100%; }
  .demo-modal-body .demo .rt-win { grid-template-rows: minmax(0, 40%) minmax(0, 60%); }
  .rt-snips { width: 100%; }
  .rt-hintnote { display: none; }
  .rt-hintkeys { justify-content: flex-start; }
}

/* Touch screens have no keyboard shortcuts to show: keep only "Close". */
@media (hover: none) {
  .rt-hintkeys .rt-hint:not(.rt-hintclose) { display: none; }
}

/* Easter eggs (js/eggs.js): the red light on each screenshot closes it; a note sits behind. */
.egg-box { position: relative; }
.egg-box picture { transition: transform .22s cubic-bezier(.4, 0, .2, 1), opacity .22s ease; transform-origin: 50% 50%; }
.egg-closing picture { transform: scale(.94); opacity: 0; }
.egg-closed picture { display: none; }
/* Once closed, the note takes the window's place in the flow: at least as tall, taller if its text needs it (phones). */
.egg-closed .egg-note { position: relative; inset: auto; }
.egg-closing .egg-light { visibility: hidden; }
.egg-light { position: absolute; z-index: 2; width: calc(var(--egg-d) * 1%); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; transform: translate(-50%, -50%); cursor: pointer; }
.egg-light::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.egg-x { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .12s ease; }
.egg-x svg { width: 72%; height: 72%; fill: none; stroke: rgba(77, 0, 0, .85); stroke-width: 1.7; stroke-linecap: round; }
.egg-light:hover .egg-x, .egg-light:focus-visible .egg-x { opacity: 1; }
.egg-light:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.egg-note { position: absolute; inset: 0; z-index: 1; display: flex; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .14);
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 122, 26, .07), transparent 60%), rgba(255, 255, 255, .015); animation: egg-in .3s ease both; }
.hero-window-frame .egg-note { border-radius: 10px; border: 0; }
.egg-note[hidden] { display: none; }
.egg-in { margin: auto 0; width: 100%; max-height: 100%; overflow: auto; padding: clamp(14px, 4%, 36px) clamp(16px, 6%, 48px); }
.egg-label { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); letter-spacing: .02em; }
.egg-note h3 { margin-top: 0; font-size: clamp(17px, 2vw, 22px); letter-spacing: -.02em; outline: none; }
.egg-note p:not(.egg-label) { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 56ch; }
.egg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
.egg-reopen { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: var(--text); font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; cursor: pointer; }
.egg-reopen:hover { background: rgba(255, 255, 255, .1); }
@keyframes egg-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .egg-note p:not(.egg-label) { font-size: 13px; margin-top: 6px; }
  .egg-note h3 { margin-top: 4px; }
  .egg-foot { margin-top: 10px; }
  .egg-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .egg-box picture, .egg-note { transition: none; animation: none; }
}

/* Demo terminal easter egg: `ratatoskr` */
.rt-egg { display: flex; align-items: center; gap: 12px; padding: 6px 0; white-space: normal; }
.rt-eggsq { flex: none; width: 88px; height: 64px; background: url("../assets/squirrel/run.webp") 100% 0 / 900% 100% no-repeat; }
.rt-egg b { display: block; color: var(--rt-acc); }
.rt-hintnote b { color: var(--text-2); font-weight: 600; }

/* Server LED Morse ("CLICK CLOSE", js/eggs.js) and the first-find congratulations */
.led-morse { filter: drop-shadow(0 0 3px rgba(255, 122, 26, .9)); }
.led-morse.off { opacity: .16; filter: none; }
.egg-congrats { margin: 0 0 16px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 122, 26, .1); border: 1px solid rgba(255, 122, 26, .28); font-size: 14px; line-height: 1.45; color: var(--text-2); }
.egg-congrats[hidden] { display: none; }
.egg-congrats b { color: var(--text); }
.egg-congrats small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.egg-note p.egg-congrats { margin-top: 0; font-size: 14px; max-width: none; }
@media (max-width: 640px) { .egg-note p.egg-congrats { font-size: 12.5px; } }

/* Demo: controls that do nothing here look disabled (title says "— not in this demo"). */
.demo .rt-lights i { background: #3a3b40; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12); cursor: not-allowed; }
.demo .rt-gear, .demo .rt-plus, .demo .rt-dots, .demo .rt-layout, .demo .rt-tool.mx, .demo .rt-mgear,
.demo .rt-svcm, .demo .rt-tb[aria-disabled="true"], .demo .rt-tab .rt-x { opacity: .3; cursor: not-allowed; }
.demo .rt-layout .rt-i.on { color: inherit; background: none; }
.demo .rt-snfolder { cursor: default; }
.demo .rt-snfolder > .rt-i:last-child { display: none; }
