@font-face{font-family:"Clash Display";src:url("/assets/fonts/clash-display.woff2") format("woff2");font-weight:200 700;font-style:normal;font-display:swap}
@font-face{font-family:"Satoshi";src:url("/assets/fonts/satoshi.woff2") format("woff2");font-weight:300 900;font-style:normal;font-display:swap}
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

@font-face {
  font-family: "Geist Mono Variable";
  src: url("/assets/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f3f4f6;
  --surface: #ffffff;
  --ink: #171717;
  --ink-2: rgb(23 23 23 / 0.72);
  --ink-3: rgb(23 23 23 / 0.64);
  --line: rgb(0 0 0 / 0.08);
  --line-strong: rgb(0 0 0 / 0.14);
  --forest: #026748;
  --leaf: #45bc52;
  --display: "Clash Display", -apple-system, "SF Pro Display", system-ui, sans-serif;
  --text: "Satoshi", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --mono: "Geist Mono Variable", ui-monospace, "SF Mono", monospace;
  --radius: 14px;
  --window-shadow:
    0 1px 0 rgb(255 255 255 / 0.6) inset, 0 0 0 1px rgb(0 0 0 / 0.06),
    0 24px 60px -18px rgb(15 23 42 / 0.28), 0 8px 18px -10px rgb(15 23 42 / 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--canvas);
  background-image: radial-gradient(rgb(0 0 0 / 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 400 16px / 1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Buttons */

.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: 500 15px / 1 var(--text);
  text-decoration: none;
  transition:
    transform 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.button {
  background: var(--ink);
  color: #fff;
}

.button:hover {
  background: #000;
  transform: translateY(-1px);
}

.button-small {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.ghost-button {
  color: var(--ink);
  background: rgb(255 255 255 / 0.55);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgb(255 255 255 / 0.85);
}

.split-button {
  display: inline-flex;
  align-items: stretch;
  height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.5);
  transition: transform 0.15s var(--ease);
}

.split-button:hover {
  transform: translateY(-1px);
}

.split-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font: 600 15px / 1 var(--text);
}

.split-meta {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid rgb(255 255 255 / 0.16);
  font: 400 13px / 1 var(--text);
  color: rgb(255 255 255 / 0.7);
}

.text-link {
  color: var(--forest);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Wordmark and navigation */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 650 18px / 1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.hero-nav {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  padding: 0 24px;
}

.hero-nav .button-small {
  justify-self: end;
}

.hero-nav-links,
.desktop-nav {
  display: flex;
  gap: 4px;
}

.hero-nav-links a,
.desktop-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition:
    color 0.15s,
    background-color 0.15s;
}

.hero-nav-links a:hover,
.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgb(0 0 0 / 0.05);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  height: 56px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

[data-enhanced] .site-header[data-home] {
  position: fixed;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(-100%);
  transition:
    opacity 0.18s var(--ease),
    transform 0.18s var(--ease);
}

[data-enhanced] .site-header[data-home][data-visible] {
  opacity: 1;
  transform: none;
}

.menu-control {
  display: none;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.06);
  font: 500 14px / 1 var(--text);
  color: var(--ink);
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

/* Hero */

.hero-frame {
  position: relative;
  margin: 12px;
  height: min(calc(100svh - 24px), 940px);
  min-height: 640px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background: #eef0e4;
}

.landscape {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.landscape-art {
  width: 100%;
  height: 100%;
}

.road {
  fill: #f4e6a6;
  opacity: 0.92;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) 48px 0;
}

.hero-copy h1 {
  max-width: 9.5em;
  font-size: clamp(56px, 8.2vw, 124px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.hero-lede {
  max-width: 30em;
  margin-top: 26px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions .ghost-button {
  height: 48px;
  border-radius: 12px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--ink-3);
}

.hero-window {
  position: relative;
  z-index: 4;
  max-width: 1120px;
  margin: -150px auto 0;
  padding: 0 24px;
}

/* Section scaffolding */

.section-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 16px;
  font-size: 19px;
  color: var(--ink-2);
}

/* Story: sticky window with a step rail */

/* Finale */

.finale {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 120px 24px 140px;
  text-align: center;
}

.finale img {
  margin-bottom: 8px;
  filter: drop-shadow(0 18px 30px rgb(2 103 72 / 0.25));
}

.finale h2 {
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.finale > p:not(.finale-meta) {
  font-size: 19px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.finale-meta {
  color: var(--ink-3);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.footer-brand p {
  margin-top: 12px;
  max-width: 22em;
  color: var(--ink-3);
}

.footer-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-group h2 {
  margin-bottom: 4px;
  font: 500 13px / 1 var(--text);
  color: var(--ink-3);
}

.footer-group a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}

.footer-group a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.footer-bottom a {
  text-decoration: none;
}

/* Document pages */

.document-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 88px 24px 120px;
}

.document-heading {
  margin-bottom: 48px;
}

.document-heading h1 {
  margin-top: 16px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.document-intro {
  margin-top: 18px;
  font-size: 19px;
  color: var(--ink-2);
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose p + p {
  margin-top: 12px;
}

.prose a:not(.button):not(.text-link) {
  color: var(--forest);
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.prose pre {
  margin: 14px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #e4e4e7;
  overflow-x: auto;
  font: 500 13px / 1.65 var(--mono);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.05);
}

.prose .license-text {
  max-height: 520px;
  white-space: pre-wrap;
  font-size: 12px;
}

.download-panel {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 18px 40px -24px rgb(0 0 0 / 0.25);
}

.download-panel h2 {
  margin: 0 0 4px;
}

.download-panel .button {
  margin-top: 16px;
}

.download-size {
  margin-top: 10px;
  font: 500 12px / 1 var(--mono);
  color: var(--ink-3);
}

.callout {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: #ecf5ee;
  box-shadow: inset 0 0 0 1px rgb(2 103 72 / 0.15);
}

.callout h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.install-steps li strong {
  color: var(--ink);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.prose .related-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}

.release-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.release-heading h2 {
  margin: 0;
}

.release-heading time {
  font: 500 12px / 1 var(--mono);
  color: var(--ink-3);
}

.tag {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ecf5ee;
  color: var(--forest);
  font: 500 11px / 1.4 var(--mono);
  vertical-align: middle;
}

.source-note {
  margin-top: 40px;
  font-size: 14px;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-nav-links,
  .desktop-nav {
    display: none;
  }

  .hero-nav,
  .site-header-inner {
    grid-template-columns: 1fr auto;
  }

  .menu-control:not([hidden]) {
    display: inline-flex;
    align-items: center;
  }

  .mobile-nav[data-open] {
    display: grid;
    gap: 4px;
    padding: 8px 16px 16px;
  }

  .mobile-nav a {
    padding: 10px 8px;
    text-decoration: none;
    font-weight: 500;
  }

  .hero-copy {
    padding: 40px 24px 0;
  }

  .hero-window {
    margin-top: -90px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .split-meta {
    display: none;
  }

  .download-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Living sky: colors and positions are set from client/sky.ts */

.sky-top {
  stop-color: var(--sky-top, #cfe1ec);
}

.sky-middle {
  stop-color: var(--sky-middle, #f2efdc);
}

.sky-bottom {
  stop-color: var(--sky-bottom, #f6efd0);
}

.sky-strokes {
  opacity: calc(0.45 * var(--day, 1));
}

.stars {
  fill: #fdfbf1;
  opacity: var(--stars, 0);
  transition: opacity 1.2s;
}

.star:nth-child(3n) {
  animation: twinkle 3.2s ease-in-out infinite alternate;
}

.star:nth-child(5n + 1) {
  animation: twinkle 4.6s ease-in-out -1.4s infinite alternate;
}

.celestial {
  transition:
    transform 1.2s var(--ease),
    opacity 1.2s;
}

.sun-body {
  opacity: calc(var(--day, 1) * 1.4);
}

.moon-body {
  opacity: calc(var(--stars, 0) * 1.2);
}

.land {
  filter: brightness(var(--land, 1)) saturate(calc(0.6 + 0.4 * var(--land, 1)));
  transition: filter 1.2s;
}

.cloud {
  fill: #ffffff;
  opacity: calc(0.18 + 0.55 * var(--day, 1));
  animation: drift 90s linear infinite alternate;
}

.cloud:nth-child(2) {
  animation-duration: 120s;
  animation-direction: alternate-reverse;
}

.cloud:nth-child(3) {
  animation-duration: 75s;
}

.blade {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway 3.8s ease-in-out infinite alternate;
}

.blade:nth-child(2n) {
  animation-duration: 4.6s;
}

.blade:nth-child(3n) {
  animation-delay: -1.3s;
}

.blade:nth-child(5n) {
  animation-duration: 3.1s;
  animation-delay: -2.2s;
}

.blade:nth-child(7n) {
  animation-delay: -0.6s;
}

.grass-front {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: gust 11s ease-in-out infinite;
}

@keyframes sway {
  from {
    transform: skewX(-7deg);
  }
  to {
    transform: skewX(6deg);
  }
}

@keyframes gust {
  0%,
  100% {
    transform: skewX(0deg);
  }
  45% {
    transform: skewX(-4deg);
  }
  60% {
    transform: skewX(1.5deg);
  }
}

@keyframes drift {
  from {
    transform: translateX(-60px);
  }
  to {
    transform: translateX(120px);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

/* Hero copy over a night sky */

.hero-frame[data-night] .hero-copy h1,
.hero-frame[data-night] .hero-nav .wordmark {
  color: #f6f3e6;
}

.hero-frame[data-night] .hero-lede,
.hero-frame[data-night] .hero-meta,
.hero-frame[data-night] .hero-bottom,
.hero-frame[data-night] .hero-nav-links a {
  color: rgb(246 243 230 / 0.8);
}

.hero-frame[data-night] .ghost-button {
  color: #f6f3e6;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
}

.hero-frame h1,
.hero-lede,
.hero-meta,
.hero-nav .wordmark,
.hero-nav-links a {
  transition: color 1.2s;
}

.hero-bottom {
  position: absolute;
  inset: auto 24px 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgb(255 255 255 / 0.9);
}

.hero-gloss {
  opacity: 0.75;
}

.sky-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.28);
  backdrop-filter: blur(10px);
}

.sky-control[hidden] {
  display: none;
}

.sky-control button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(255 255 255 / 0.85);
  font: 500 12px / 1 var(--mono);
  cursor: pointer;
}

.sky-control button[aria-pressed="true"] {
  background: rgb(255 255 255 / 0.92);
  color: var(--ink);
}

/* Real screenshots */

.screenshot {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--window-shadow);
  background: var(--surface);
}

.hero-window {
  max-width: 1180px;
  margin-top: -170px;
}

.beta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 16px 24px;
  font-size: 14px;
  color: var(--ink-2);
}

.beta-strip p {
  display: flex;
  align-items: center;
  gap: 10px;
}

.beta-strip a {
  font-weight: 500;
  color: var(--ink);
  text-underline-offset: 3px;
}

/* Open source */

.open-source {
  max-width: 1160px;
  margin: 0 auto;
  padding: 120px 24px 40px;
  border-top: 1px solid var(--line);
}

.open-source-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: end;
}

.open-source h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.open-source-grid p {
  font-size: 18px;
  color: var(--ink-2);
}

.open-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 960px) {
  .open-source-grid {
    grid-template-columns: 1fr;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-window {
    margin-top: -80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blade,
  .grass-front,
  .cloud,
  .star {
    animation: none;
  }
}

.hero-bottom [lang="he"] {
  font-family: var(--text);
  font-size: 13px;
}

/* Feature story: a sticky screenshot stage beside short steps. The active step
   gets a filled line on its left edge; the stage crossfades to its screenshot. */

.story {
  padding: 144px 0 96px;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 0 64px;
  max-width: 1320px;
  margin: 72px auto 0;
  padding: 0 32px;
}

.story-steps {
  display: grid;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64vh;
  padding-left: 24px;
  border-left: 2px solid var(--line);
  transition: border-color 0.3s var(--ease);
}

.step h3 {
  font-size: clamp(24px, 2.3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.step > p {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

.step-keys {
  display: flex;
  gap: 4px;
  margin-top: 20px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    0 1px 0 var(--line-strong);
  font: 500 13px / 1 var(--text);
  color: var(--ink);
}

.step-shot {
  display: none;
  margin: 24px 0 0;
}

.story-stage {
  min-width: 0;
}

.story-sticky {
  position: sticky;
  top: calc(50vh - min(24vw, 300px));
  display: grid;
  padding: 28px;
  border-radius: 24px;
  background: #e7ebe3;
}

.story-window {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  transition: opacity 0.4s var(--ease);
}

.story-window .screenshot {
  border-radius: 12px;
}

[data-enhanced] .story-window {
  opacity: 0;
}

[data-enhanced] .step:not([data-current]) h3 {
  color: var(--ink-3);
}

[data-enhanced] .step[data-current] {
  border-left-color: var(--ink);
}

.story-grid[data-active="0"] .story-window[data-step="0"],
.story-grid[data-active="1"] .story-window[data-step="1"],
.story-grid[data-active="2"] .story-window[data-step="2"],
.story-grid[data-active="3"] .story-window[data-step="3"],
.story-grid[data-active="4"] .story-window[data-step="4"] {
  opacity: 1;
}

@media (max-width: 960px) {
  .story-grid {
    grid-template-columns: 1fr;
    margin-top: 48px;
    padding: 0 24px;
  }

  .story-stage {
    display: none;
  }

  .step {
    min-height: 0;
    padding: 32px 0 32px 20px;
  }

  .step-shot {
    display: block;
  }

  [data-enhanced] .step:not([data-current]) h3 {
    color: var(--ink);
  }
}

/* Canvas scene replaces the SVG fallback once it has painted. */

.scene-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.scene-canvas[data-ready] {
  opacity: 1;
}

/* Interactive Shaar window */

.demo {
  --space-tint: #e2eee4;
  --space-ink: #24653f;
}

.demo[data-color="blue"] {
  --space-tint: #dde7f5;
  --space-ink: #24538c;
}

.demo[data-color="amber"] {
  --space-tint: #f4e8d2;
  --space-ink: #84561a;
}

.demo-window {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--space-tint);
  box-shadow: var(--window-shadow);
  overflow: hidden;
  font-family: var(--text);
  transition: background-color 0.35s var(--ease);
}

.demo svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.demo-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 12px 10px;
  font-size: 13px;
  color: rgb(0 0 0 / 0.78);
}

.demo-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px;
}

.demo-lights {
  display: flex;
  gap: 7px;
}

.demo-lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.demo-lights i:nth-child(2) {
  background: #febc2e;
}

.demo-lights i:nth-child(3) {
  background: #28c840;
}

.demo-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgb(0 0 0 / 0.55);
}

.demo-space {
  display: grid;
  gap: 4px;
}

.demo-space-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--space-ink);
}

.demo-space-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentcolor;
}

.demo-space-name em {
  margin-left: auto;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  color: rgb(0 0 0 / 0.62);
}

.demo-tabs {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-tab,
.demo-new-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  transition: background-color 0.15s;
}

.demo-tab span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-tab:hover,
.demo-new-tab:hover {
  background: rgb(255 255 255 / 0.5);
}

.demo-tab[aria-pressed="true"] {
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  color: #111;
}

.demo-new-tab {
  color: rgb(0 0 0 / 0.62);
}

.demo-favicon {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.demo-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: auto;
}

.demo-dot {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  position: relative;
}

.demo-dot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.22);
  transition:
    background-color 0.2s,
    transform 0.2s var(--ease);
}

.demo-dot[aria-pressed="true"]::after {
  background: var(--space-ink);
  transform: scale(1.2);
}

.demo-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 8px 8px 0;
}

.demo-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 6px;
}

.demo-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  height: 30px;
  margin: 0 10px;
  border: 0;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.55);
  font-size: 13px;
  color: rgb(0 0 0 / 0.7);
  transition: background-color 0.15s;
}

.demo-address:hover {
  background: rgb(255 255 255 / 0.85);
}

.demo-address svg {
  width: 12px;
  height: 12px;
}

.demo-controls-button:hover,
.demo-controls-button[aria-expanded="true"] {
  background: rgb(255 255 255 / 0.6);
}

.demo-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.06),
    0 2px 8px rgb(0 0 0 / 0.06);
  scrollbar-width: thin;
}

.demo-page-image {
  display: block;
  width: 100%;
  height: auto;
}

.demo-page.is-reloading .demo-page-image {
  animation: demo-reload 0.5s var(--ease);
}

@keyframes demo-reload {
  from {
    opacity: 0.25;
  }
  to {
    opacity: 1;
  }
}

.demo-launcher,
.demo-popover {
  position: absolute;
  z-index: 5;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.97);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.08),
    0 30px 60px -20px rgb(0 0 0 / 0.4);
  font-size: 13px;
}

.demo-launcher {
  left: 50%;
  top: 16%;
  width: min(80%, 520px);
  transform: translateX(-50%);
  padding: 8px;
  animation: demo-pop 0.18s var(--ease);
}

.demo-launcher-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  color: rgb(0 0 0 / 0.5);
}

.demo-launcher-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 400 16px / 1.2 var(--text);
  color: var(--ink);
}

.demo-results {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.demo-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.demo-results li[aria-selected="true"] {
  background: var(--space-tint);
}

.demo-results img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.demo-results em {
  font-style: normal;
  color: rgb(0 0 0 / 0.55);
}

.demo-results kbd {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
}

.demo-popover {
  right: 14px;
  top: 52px;
  width: 260px;
  padding: 14px;
  animation: demo-pop 0.18s var(--ease);
}

.demo-popover-host {
  font-weight: 600;
}

.demo-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 12px;
  color: rgb(0 0 0 / 0.62);
}

.demo-secure svg {
  width: 13px;
  height: 13px;
}

.demo-permissions {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.demo-permissions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
}

.demo-switch {
  position: relative;
  width: 32px;
  height: 20px;
  border: 0;
  border-radius: 10px;
  background: #d4d4d8;
  transition: background-color 0.2s;
}

.demo-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
  transition: transform 0.2s var(--ease);
}

.demo-switch[aria-pressed="true"] {
  background: var(--leaf);
}

.demo-switch[aria-pressed="true"]::after {
  transform: translateX(12px);
}

.demo-actions {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.demo-actions button {
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.demo-actions button:hover {
  background: rgb(0 0 0 / 0.05);
}

@keyframes demo-pop {
  from {
    opacity: 0;
    transform: translate(var(--pop-x, 0), 4px) scale(0.98);
  }
}

.demo-launcher {
  --pop-x: -50%;
}

.demo-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
}

@media (max-width: 700px) {
  .demo-window {
    grid-template-columns: 140px minmax(0, 1fr);
    aspect-ratio: 4 / 5;
  }

  .demo-space-name em {
    display: none;
  }
}

.demo [hidden] {
  display: none !important;
}
