/* Jervis Desktop landing — Stitch "Technical Infrastructure & Developer Protocol" design.
   CSP-safe: no inline styles, remote fonts or icon fonts. Icons are inline SVG. */
:root {
  color-scheme: dark;
  --surface: #011522;
  --lowest: #00101b;
  --low: #071e2a;
  --container: #0c222f;
  --high: #182c3a;
  --highest: #233745;
  --text: #d0e5f7;
  --variant: #bbc9cc;
  --muted: #95a8b4;
  --outline: #869396;
  --outline-variant: #3c494c;
  --primary: #60e7ff;
  --primary-container: #32cbe3;
  --on-primary-container: #00525d;
  --on-primary: #00363e;
  --primary-fixed: #a0efff;
  --secondary: #4edea3;
  --secondary-container: #00a572;
  --on-secondary-container: #00311f;
  --tertiary: #ffcd92;
  --tertiary-dim: #ffb95f;
  --tertiary-container: #ffa71f;
  --on-tertiary-container: #694100;
  --error: #ffb4ab;
  --glow: 0 0 16px rgba(50, 203, 227, 0.3);
  --r-sm: 2px;
  --r: 4px;
  --r-lg: 8px;
  --r-xl: 12px;
  --sans: "Geist", "IBM Plex Sans Arabic", "Segoe UI Variable Text", "Segoe UI", Tahoma, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --pad: clamp(16px, 3vw, 32px);
  --section: clamp(48px, 6vw, 88px);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body {
  font-size: 15px;
}
::selection {
  background: rgba(50, 203, 227, 0.3);
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-fixed);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
  color: var(--text);
}
p {
  text-wrap: pretty;
}
img {
  max-width: 100%;
}
code,
.mono {
  font-family: var(--mono);
}
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--pad);
}
.wrap.narrow {
  max-width: 900px;
}
.accent {
  color: var(--primary);
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 60;
  background: var(--primary-container);
  color: var(--on-primary-container);
  padding: 8px 14px;
  border-radius: var(--r);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* Labels */
.eyebrow,
.mono-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.mono-label {
  color: var(--variant);
  margin-bottom: 0;
}
[dir="rtl"] .eyebrow,
[dir="rtl"] .mono-label,
[dir="rtl"] .badge,
[dir="rtl"] .chip {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
[dir="rtl"] .eyebrow {
  font-size: 13px;
  font-weight: 600;
}
[dir="rtl"] .mono-label {
  font-size: 12.5px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--highest);
  color: var(--primary);
}
.chip .icon {
  width: 12px;
  height: 12px;
}
.chip.edit {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}
.chip.ok {
  background: rgba(78, 222, 163, 0.12);
  color: var(--secondary);
}
.chip.warn {
  color: var(--tertiary);
}
.chip.solid {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  flex: none;
  box-shadow: 0 0 0 0 rgba(78, 222, 163, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 6px rgba(78, 222, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 222, 163, 0);
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r);
  padding: 9px 16px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}
.button.large {
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
}
.button.xlarge {
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-lg);
}
.button.primary {
  background: var(--primary-container);
  color: var(--on-primary-container);
  box-shadow: var(--glow);
}
.button.primary:hover {
  background: var(--primary);
  color: var(--on-primary-container);
}
.button.outline {
  background: var(--container);
  color: var(--text);
}
.button.outline:hover {
  background: var(--high);
  color: var(--text);
}
.button .icon {
  width: 18px;
  height: 18px;
}
.button.outline .icon {
  color: var(--primary);
}
.button .chip {
  background: rgba(35, 55, 69, 0.6);
  color: var(--on-primary-container);
}
.arrow {
  color: var(--primary);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(1, 21, 34, 0.82);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}
.header-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex: none;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  border-radius: var(--r-lg);
  background: var(--high);
  box-shadow: 0 0 12px -2px rgba(50, 203, 227, 0.35);
}
.brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 15px;
  line-height: 18px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.build-chip {
  display: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  font-size: 12.5px;
}
.nav-link {
  color: var(--variant);
  padding: 5px 10px;
  border-radius: var(--r);
  font-weight: 500;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--high);
}
.language {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--variant);
  background: var(--low);
  border-radius: var(--r);
  padding: 6px 10px;
  margin-inline-start: 8px;
  font-size: 12px;
  font-weight: 500;
}
.language .icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}
.language:hover {
  color: var(--text);
  background: var(--high);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: var(--r);
  padding: 7px 14px;
  margin-inline-start: 4px;
  font-weight: 600;
  font-size: 12.5px;
  box-shadow: 0 0 12px -2px rgba(50, 203, 227, 0.35);
  white-space: nowrap;
}
.nav-cta .icon {
  width: 15px;
  height: 15px;
}
.nav-cta:hover {
  background: var(--primary);
  color: var(--on-primary-container);
}

/* Sections */
.section {
  padding-block: var(--section);
}
.section.alt {
  background: var(--lowest);
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.section-head.center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}
.section h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
[dir="rtl"] .section h2,
[dir="rtl"] h1,
[dir="rtl"] h3 {
  letter-spacing: 0;
}
.section-sub {
  font-size: 15px;
  color: var(--variant);
  max-width: 44em;
}
.panel {
  background: var(--low);
  border-radius: var(--r-xl);
  padding: clamp(16px, 2.2vw, 24px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
.tile {
  background: var(--container);
  border-radius: var(--r);
  padding: 12px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(28px, 4vw, 48px) clamp(40px, 5vw, 64px);
}
.hero-glow,
.final-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 420px at 0% 30%, rgba(96, 231, 255, 0.06), transparent 70%),
    radial-gradient(420px 420px at 100% 40%, rgba(78, 222, 163, 0.05), transparent 70%),
    linear-gradient(180deg, rgba(96, 231, 255, 0.09), transparent 45%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 28px);
}
.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r);
  background: var(--high);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.hero h1 .accent {
  display: block;
}
[dir="rtl"] .hero h1 {
  line-height: 1.35;
}
.hero-sub {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--variant);
  max-width: 46em;
}
.hero .actions {
  padding-top: 4px;
}
.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--variant);
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--variant);
}
.quick-links a:hover {
  color: var(--primary);
}
.quick-links .icon {
  width: 14px;
  height: 14px;
}
.sysline {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
[dir="rtl"] .sysline {
  font-family: var(--sans);
  font-size: 12.5px;
}
.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--low);
  font-size: 12.5px;
  color: var(--variant);
  max-width: 760px;
}
.note .icon {
  width: 18px;
  height: 18px;
  color: var(--tertiary-dim);
  margin-top: 1px;
}
.note strong {
  color: var(--text);
  font-weight: 500;
}

/* Control plane simulator */
.sim {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--low);
  padding: clamp(12px, 1.6vw, 16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.sim-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.sim-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--variant);
  min-width: 0;
}
.lights {
  display: flex;
  gap: 6px;
  flex: none;
}
.lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 180, 171, 0.8);
}
.lights i:nth-child(2) {
  background: rgba(255, 167, 31, 0.8);
}
.lights i:nth-child(3) {
  background: rgba(0, 165, 114, 0.85);
}
.sim-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: var(--r);
  background: var(--container);
  font-size: 12px;
  color: var(--text);
}
.pause-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 12px;
  font-weight: 600;
}
.pause-chip .icon {
  width: 14px;
  height: 14px;
}
.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(90px, 2fr) minmax(0, 5fr);
  gap: 16px;
  align-items: center;
}
.sim-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sim-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sim-col-head .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary);
}
.sim-col-head .count.ok {
  color: var(--secondary);
}
[dir="rtl"] .sim-col-head .count:not([dir="ltr"]) {
  font-family: var(--sans);
  font-size: 12.5px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--container);
  min-width: 0;
  color: var(--text);
  transition: background 0.15s;
}
a.row:hover,
.row:hover {
  background: var(--high);
  color: var(--text);
}
.row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.row-main > .icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.row-main > .icon.warm {
  color: var(--tertiary-dim);
}
.row-main > .icon.green {
  color: var(--secondary);
}
.row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.row-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-path,
.row-meta {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 15px;
  color: var(--variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-meta.ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  color: var(--secondary);
}
.row-meta.ok::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
}
.row .provider-logo {
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: var(--r);
  background: var(--high);
}
.sim-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sim-bridge svg {
  width: 100%;
  height: 56px;
}
.sim-bridge path {
  fill: none;
  stroke: rgba(96, 231, 255, 0.45);
  stroke-width: 2;
  stroke-dasharray: 4 2;
  animation: dash 1.2s linear infinite;
}
.sim-bridge circle {
  fill: var(--primary);
}
@keyframes dash {
  to {
    stroke-dashoffset: -12;
  }
}
[dir="rtl"] .sim-bridge svg {
  transform: scaleX(-1);
}
.sim-bridge .chip {
  color: var(--variant);
  font-size: 10.5px;
}
.prompt-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(35, 55, 69, 0.6);
  font-size: 12px;
  color: var(--text);
  min-width: 0;
}
.prompt-bar .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.prompt-bar span {
  min-width: 0;
}
.assistant-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.assistant-pills a {
  text-decoration: none;
}
.provider-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Trust strip */
.trust {
  background: var(--lowest);
  padding-block: 18px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.trust-item .icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.trust-item:nth-child(2) .icon,
.trust-item:nth-child(5) .icon {
  color: var(--secondary);
}
.trust-item:nth-child(4) .icon {
  color: var(--tertiary);
}
.trust-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 20px;
}
.trust-item span {
  display: block;
  font-size: 11.5px;
  line-height: 15px;
  color: var(--variant);
}

/* How it works */
.step-tabs {
  display: none;
}
.js .step-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-xl);
  background: var(--container);
  max-width: 900px;
  margin: 0 auto 12px;
}
.step-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--variant);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.step-tab:hover {
  color: var(--text);
}
.step-tab[aria-selected="true"] {
  background: var(--high);
  color: var(--primary);
}
.step-tab .num {
  font-family: var(--mono);
  font-size: 12px;
}
.step-panes {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.js .step-panes {
  display: block;
}
.step-pane {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  min-height: 220px;
}
.js .step-pane[hidden] {
  display: none;
}
.step-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.step-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 600;
  font-size: 16px;
}
.step-pane:nth-child(2) .step-num {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.step-pane:nth-child(3) .step-num {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}
.step-pane h3 {
  font-size: 18px;
  line-height: 26px;
}
.step-pane p {
  color: var(--variant);
}
.console {
  width: min(300px, 100%);
  flex: none;
  padding: 14px;
  border-radius: var(--r);
  background: var(--container);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 19px;
  color: var(--variant);
  overflow-wrap: anywhere;
}
.console .ok {
  color: var(--secondary);
}
.console .hi {
  color: var(--primary);
}
.console .warm {
  color: var(--tertiary);
}
.console .err {
  color: var(--error);
}
.console .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

/* Workspace */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.split-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prompt-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--low);
}
.prompt-box q {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--container);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--primary);
  quotes: none;
}
[dir="rtl"] .prompt-box q {
  font-family: var(--sans);
  font-size: 14px;
}
.prompt-box .small-note {
  margin: 0;
}
.workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.workspace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--variant);
}
.workspace-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.workspace-head .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.project-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 128px;
  min-width: 0;
}
.project-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.project-card-top strong {
  font-size: 15px;
  font-weight: 600;
}
.project-card .row-path {
  white-space: normal;
  overflow-wrap: anywhere;
}
.activity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 18px;
  color: var(--variant);
}
.activity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
  color: var(--primary);
  font-weight: 500;
}
[dir="rtl"] .activity-head {
  font-family: var(--sans);
}
.activity-head .ok {
  color: var(--secondary);
}
.activity div {
  overflow-wrap: anywhere;
}
.activity b {
  font-weight: 600;
  color: var(--primary);
  margin-inline-end: 6px;
}
.activity b.warm {
  color: var(--tertiary);
}
.activity b.err {
  color: var(--error);
}
.activity-foot {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
}
.card-grid {
  display: grid;
  gap: 12px;
}
.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 44px);
}
.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 2vw, 20px);
  border-radius: var(--r-xl);
  background: var(--low);
  color: var(--text);
  min-width: 0;
}
.card h3 {
  font-size: 16px;
  line-height: 24px;
}
.card p {
  font-size: 13px;
  color: var(--variant);
}
.icon-tile {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: var(--high);
  color: var(--primary);
  margin-bottom: 4px;
}
.icon-tile .icon {
  width: 20px;
  height: 20px;
}

/* Permission model */
.model-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.model-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.model-title .icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
}
.model.edit .model-title .icon {
  color: var(--tertiary-dim);
}
.model-title h3 {
  font-size: 18px;
  line-height: 26px;
}
.model-title span {
  display: block;
  font-size: 12px;
  color: var(--variant);
}
.checks {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--variant);
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.checks .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--secondary);
}
.checks li.no {
  color: var(--error);
}
.checks li.no .icon {
  color: var(--error);
}
.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--container);
}
.rule > .icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
}
.rule strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.rule p {
  font-size: 13px;
  color: var(--variant);
}

/* Trust boundaries */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: center;
}
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.flow-node .icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}
.flow-node:nth-child(3) .icon {
  color: var(--secondary);
}
.flow-node:nth-child(5) .icon {
  color: var(--tertiary);
}
.flow-node strong {
  font-size: 14px;
  font-weight: 600;
}
.flow-node span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--variant);
  overflow-wrap: anywhere;
}
[dir="rtl"] .flow-node span {
  font-family: var(--sans);
  font-size: 12px;
}
.flow-arrow {
  color: var(--primary);
}
.flow-arrow .icon {
  width: 20px;
  height: 20px;
}
[dir="rtl"] .flow-arrow .icon {
  transform: scaleX(-1);
}
.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.point strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.point strong .icon {
  color: var(--secondary);
}
.point p {
  font-size: 13px;
  color: var(--variant);
}
.privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--container);
  font-size: 13px;
  color: var(--variant);
}
.privacy .icon {
  width: 18px;
  height: 18px;
  color: var(--tertiary-dim);
  margin-top: 1px;
}

/* Capability boundary */
.bounds h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--secondary);
}
.bounds.no h3 {
  color: var(--error);
}
.bounds h3 .icon {
  width: 20px;
  height: 20px;
}
.bounds ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bounds li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--low);
  font-size: 13px;
  color: var(--text);
}
.bounds.no li {
  color: var(--variant);
}
.bounds li .state {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
  white-space: nowrap;
}
.bounds.no li .state {
  color: var(--error);
}
[dir="rtl"] .bounds li .state {
  font-family: var(--sans);
  font-size: 12px;
}
.bounds.card {
  background: var(--container);
}

/* Connect */
.connect-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.connect-grid h2 {
  margin-bottom: 10px;
}
.connect-grid .section-sub {
  margin-bottom: 20px;
}
.connector {
  background: var(--low);
  border-radius: var(--r-xl);
  padding: clamp(16px, 2.2vw, 24px);
  min-width: 0;
}
.connector .mono-label {
  margin-bottom: 10px;
}
.url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: var(--r);
  background: var(--container);
  min-width: 0;
}
[dir="rtl"] .url-box {
  padding: 8px 12px 8px 8px;
}
.url-box code {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--primary);
  overflow-wrap: anywhere;
}
.url-box button {
  flex: none;
  border: 0;
  border-radius: var(--r);
  padding: 7px 12px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.url-box button:hover {
  background: var(--primary);
}
.url-box button.copied {
  background: var(--secondary);
  color: var(--on-secondary-container);
}
.divider {
  height: 1px;
  background: rgba(134, 147, 150, 0.18);
  margin: 18px 0;
}
.conn-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.conn-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--variant);
}
.conn-num {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--high);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 12px;
}
.small-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}
.provider-guides {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(24px, 3vw, 36px);
}
.provider-guide {
  scroll-margin-top: 96px;
  min-width: 0;
}
.provider-guide:target {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}
.provider-guide h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 14px;
}
.provider-guide ol {
  margin: 0;
  padding-inline-start: 22px;
  font-size: 13.5px;
  color: var(--variant);
}
.provider-guide li {
  margin-bottom: 10px;
}
.provider-guide li::marker {
  color: var(--primary);
  font-family: var(--mono);
}
.setup-fields {
  margin-block: 24px;
  padding: 20px;
  border: 1px solid currentColor;
  border-radius: 12px;
}
.setup-fields dl {
  margin: 12px 0 0;
}
.setup-fields dt {
  margin-block-start: 12px;
  font-size: 0.8rem;
  opacity: 0.7;
}
.setup-fields dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  user-select: all;
}
.setup-shot { margin: 24px 0; }
.setup-shot img { display: block; width: 100%; max-width: 448px; height: auto; border-radius: 16px; margin-inline: auto; }
.setup-shot figcaption { margin-block-start: 12px; font-size: 0.875rem; line-height: 1.7; }
.install-command { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; background: #101318; color: #f2f4f7; border-radius: 10px; font-size: 0.8rem; text-align: left; }
#download-linux .card > p { margin-block: 16px; }
.provider-guide .provider-open {
  margin-top: 16px;
  white-space: normal;
  text-align: start;
}
.provider-status {
  min-height: 1.6em;
}
.pairing-note {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--low);
  font-size: 13px;
  color: var(--variant);
}

/* Download */
.download-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.download-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.file {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.file-icon {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-xl);
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.file-icon .icon {
  width: 30px;
  height: 30px;
}
.file strong {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.file span {
  display: block;
  font-size: 12px;
  color: var(--variant);
}
.checksum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.checksum a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.checksum .icon {
  width: 14px;
  height: 14px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--variant);
}
.notice .icon {
  width: 20px;
  height: 20px;
  color: var(--tertiary-dim);
  margin-top: 1px;
}
.notice strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 4px;
  font-size: 12px;
  color: var(--variant);
}
.platforms span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.platforms .icon {
  width: 16px;
  height: 16px;
}
.platforms .chip {
  color: var(--tertiary);
}

/* FAQ */
.faq-title {
  margin-bottom: 20px;
}
.faq {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq details {
  border-radius: var(--r-lg);
  background: var(--low);
  overflow: hidden;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  background: var(--container);
}
.faq summary span:first-child {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.faq-sign {
  flex: none;
  width: 18px;
  height: 18px;
  position: relative;
}
.faq-sign::before {
  content: "";
  position: absolute;
  inset: 3px 4px 6px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] .faq-sign::before {
  transform: translateY(4px) rotate(-135deg);
}
.faq details p {
  padding: 0 16px 16px;
  font-size: 13.5px;
  color: var(--variant);
}

/* Final CTA */
.section.final {
  background: linear-gradient(0deg, var(--lowest), var(--surface));
}
.final-card {
  position: relative;
  overflow: hidden;
  max-width: 1024px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px);
  border-radius: 16px;
  background: var(--low);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.final-glow {
  background: radial-gradient(360px 260px at 50% 0%, rgba(96, 231, 255, 0.12), transparent 75%);
}
.final-card > * {
  position: relative;
}
.final-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--r-xl);
  background: var(--high);
}
.final-card h2 {
  font-size: clamp(24px, 3.2vw, 34px);
}
.final-sub {
  font-size: 15px;
  color: var(--variant);
  max-width: 36em;
}
.final-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  font-size: 12.5px;
}

/* Footer */
.site-footer {
  background: var(--lowest);
  padding-block: 28px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-size: 12.5px;
  color: var(--variant);
}
.footer-brand {
  font-size: 15px;
  font-weight: 600;
  gap: 8px;
}
.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: var(--r);
  box-shadow: none;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-links a {
  color: var(--variant);
}
.footer-links a:hover {
  color: var(--text);
}
.copyright {
  margin-inline-start: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
[dir="rtl"] .copyright {
  font-family: var(--sans);
  font-size: 12.5px;
}

/* Legal and support pages */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px);
}
.legal-hero-inner {
  position: relative;
}
.legal-hero-inner > * {
  max-width: 880px;
}
.legal-hero-inner.narrow > * {
  max-width: none;
}
.legal-hero h1 {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
[dir="rtl"] .legal-hero h1 {
  line-height: 1.3;
}
.legal-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
[dir="rtl"] .legal-date {
  font-family: var(--sans);
  font-size: 13px;
}
.legal-lead {
  color: var(--variant);
  font-size: 16px;
  max-width: 44em;
}
.legal-grid {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 88px;
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--low);
}
.legal-toc ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.legal-toc a {
  color: var(--variant);
}
.legal-toc a:hover {
  color: var(--text);
}
.legal-article {
  max-width: 46em;
  min-width: 0;
}
.legal-article code {
  font-size: 0.88em;
  background: var(--container);
  border-radius: var(--r);
  padding: 1px 6px;
  overflow-wrap: anywhere;
}
.legal-summary {
  border-radius: var(--r-xl);
  background: var(--low);
  padding: clamp(18px, 3vw, 24px);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.section .legal-summary h2 {
  font-size: 17px;
  margin-bottom: 12px;
}
.legal-summary ul,
.legal-section ul {
  margin: 0;
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--variant);
}
.legal-summary li::marker,
.legal-section li::marker {
  color: var(--primary);
}
.legal-section {
  scroll-margin-top: 88px;
  padding-bottom: clamp(24px, 3vw, 36px);
  margin-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid rgba(134, 147, 150, 0.16);
}
.section .legal-section h2 {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.3;
  margin-bottom: 14px;
}
[dir="rtl"] .section .legal-section h2 {
  line-height: 1.45;
}
.legal-section p {
  color: var(--variant);
  margin-bottom: 12px;
}
.legal-section p:last-child {
  margin-bottom: 0;
}
.legal-section p + ul {
  margin-top: -2px;
}
.legal-section strong {
  color: var(--text);
  font-weight: 600;
}
.legal-section a,
.legal-summary a,
.support-contact a {
  overflow-wrap: anywhere;
}
.legal-top {
  font-size: 13px;
}
.support-contact {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-radius: var(--r-xl);
  background: var(--low);
  padding: clamp(18px, 3vw, 26px);
}
.support-contact .icon-tile {
  margin-bottom: 0;
  flex: none;
}
.section .support-contact h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.support-contact p {
  color: var(--variant);
}
.support-contact .small-note {
  margin-top: 10px;
}
.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin: 16px 0 clamp(44px, 6vw, 64px);
}
.support-card {
  color: var(--text);
  transition: background 0.15s;
}
.support-card:hover {
  color: var(--text);
  background: var(--container);
}
.support-card h3 {
  font-size: 15px;
}

/* Responsive */
@media (min-width: 1200px) {
  .build-chip {
    display: inline-flex;
  }
}
@media (max-width: 1080px) {
  .trust-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sim-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sim-bridge svg {
    display: none;
  }
  .sim-bridge::before,
  .sim-bridge::after {
    content: "";
    width: 2px;
    height: 18px;
    background: repeating-linear-gradient(180deg, rgba(96, 231, 255, 0.5) 0 4px, transparent 4px 6px);
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .nav-link {
    display: none;
  }
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }
  .flow-arrow .icon,
  [dir="rtl"] .flow-arrow .icon {
    transform: rotate(90deg);
  }
  .points,
  .card-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
  .connect-grid,
  .card-grid.two,
  .provider-guides,
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-toc {
    position: static;
  }
  .step-pane {
    flex-direction: column;
    align-items: stretch;
  }
  .console {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .header-row {
    gap: 8px;
  }
  .brand-sub {
    display: none;
  }
  .nav-cta span {
    display: none;
  }
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-grid.four,
  .project-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-card {
    min-height: 0;
  }
  .js .step-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero .actions .button {
    width: 100%;
  }
  .download-main .button {
    width: 100%;
  }
  .copyright {
    margin-inline-start: 0;
  }
  .row {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before {
    transition: none !important;
    animation: none !important;
  }
}
