:root {
  color-scheme: dark;
  --paper: #ffffff;
  --ink: #20242c;
  --muted: #b5b9bd;
  --carbon: #181818;
  --carbon-panel: #242424;
  --carbon-text: #f3f3f3;
  --carbon-muted: #b5b9bd;
  --scrollbar-thumb: color-mix(in srgb, #aaaeb2 30%, transparent);
  --accent: #bfcbd4;
  --nav-height: 76px;
  --space: clamp(56px, 7vw, 104px);
  --page-inset: clamp(18px, 5.55vw, 80px);
  --gutter: 24px;
  --corner: 8px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
html { --page-thumb: transparent; scrollbar-color: var(--page-thumb) transparent; }
html.scrollbar-near { --page-thumb: var(--scrollbar-thumb); }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-width: auto; scrollbar-color: auto; }
}
html::-webkit-scrollbar-thumb { background: var(--page-thumb); }
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-thumb { border-radius: 9999px; background: var(--scrollbar-thumb); }
*::-webkit-scrollbar-track { background: transparent; }
html { scroll-padding-block: calc(var(--nav-height) + 18px) 24px; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background:
    radial-gradient(ellipse 75% 480px at 50% 0, #f6fafe99, transparent 100%),
    linear-gradient(180deg, #e8f0f6 0, #c9d8e5 490px, #6e8ba3 820px, #314354 1240px, #242e37 max(45%, 1400px), #191b1e 100%);
  color: var(--carbon-text);
}
body::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  pointer-events: none;
  background: radial-gradient(circle, #d9e8f134 1px, transparent 1.6px) 0 0 / 10px 10px;
  mask-image: linear-gradient(transparent 240px, #0007 520px, #000a 26%, #0005 82%, #0002),
    radial-gradient(ellipse 100% 70% at 50% 40%, #000 24%, #0007 80%, #0004);
  mask-composite: intersect;
}
h1, h2, h3, p, figure { margin: 0; }
figure { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #4a6792; outline-offset: 3px; }
.wrap { width: min(calc(100% - var(--page-inset) * 2), 1120px); margin-inline: auto; }

.nav {
  position: fixed;
  z-index: 2;
  inset: max(12px, env(safe-area-inset-top)) 0 auto;
  color: #18232d;
  pointer-events: none;
}
.nav-bar, .tour-arrows button {
  background: rgb(255 255 255 / 14%);
  box-shadow: 0 8px 32px #0c141d26, inset 0 1px #ffffff33;
  backdrop-filter: blur(20px);
}
.nav[data-dark-backdrop] {
  color: #f3f7fa;
}
.nav[data-dark-backdrop] .nav-bar {
  backdrop-filter: blur(20px) brightness(.82);
}
.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: min(calc(100% - 32px), 820px);
  min-height: 56px;
  gap: clamp(12px, 3vw, 36px);
  padding: 5px 6px 5px 12px;
  border-radius: 15px;
  pointer-events: auto;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 21px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; }
.brand img { background: var(--carbon); border-radius: var(--corner); padding: 5px; }
.brand { white-space: nowrap; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-links { margin-inline: auto; }
.nav-links a, .source-link, .footer-links nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  border-radius: var(--corner);
  transition: background-color 140ms, color 140ms;
}
.nav-links a, .source-link { color: inherit; }
.nav-links a:hover, .nav-links a[aria-current="location"], .source-link:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.footer-links nav a { color: var(--carbon-muted); }
.footer-links nav a:hover { background: var(--carbon-panel); color: var(--carbon-text); }
.mobile-navigation { display: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 12px;
  padding: 8px 14px;
  border-radius: var(--corner);
  color: var(--carbon-text);
  background: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms, transform 140ms;
}
.button:hover { background: #3b4655; transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.nav .button { background: #cfdae4; color: #18232d; }
.nav .button:hover { background: #f0f5f8; }
.nav :focus-visible { outline-color: currentColor; }
.skip-link {
  position: fixed;
  z-index: 3;
  top: 8px;
  left: var(--page-inset);
  opacity: 0;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: var(--corner);
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus { opacity: 1; transform: none; }

h1, h2 { font-weight: 630; line-height: 1.04; letter-spacing: -.058em; text-wrap: balance; }
h1 { font-size: clamp(42px, 5.4vw, 78px); }
h2 { font-size: clamp(36px, 4.3vw, 62px); }
h3 { font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
p { color: var(--muted); }
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: 100svh;
  padding-block: clamp(110px, 9.5vw, 136px) clamp(42px, 6vw, 88px);
}
.hero-head { display: grid; justify-items: center; text-align: center; color: #182530; }
.hero-head h1 { font-size: clamp(38px, 6.2vw, 88px); letter-spacing: -.069em; }
.hero-head h1 span { display: block; }
.hero-head p, .section-head p { max-width: 42ch; font-size: clamp(16px, 1.35vw, 19px); }
.hero-head p { margin-block-start: 22px; max-width: 46ch; color: #304656; }
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-block-start: 20px;
  padding: 0 14px;
  border-radius: var(--corner);
  background: #182530;
  color: #f3f7fa;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms, transform 160ms;
}
.hero-link:hover { background: #344d60; transform: translateY(-2px); }
.hero-window { width: min(100%, 1000px); margin: clamp(34px, 5.8vw, 84px) auto 0; }
.hero-stage {
  border-radius: 16px;
  box-shadow: 0 28px 68px #10182070;
}
.hero-stage .image-link { border-radius: inherit; }
.image-link { display: block; border-radius: 10px; overflow: hidden; background: var(--carbon); }
.image-link img { width: 100%; }

.frontend { padding-block: var(--space); }
.frontend-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); }
.frontend p { max-width: 54ch; color: #c6d3dd; font-size: clamp(17px, 1.4vw, 20px); }
.frontend p + p { margin-block-start: 16px; }

.workspace { padding-block: var(--space); }
.workspace p { margin-block-start: 12px; color: var(--carbon-muted); }
.workspace :focus-visible { outline-color: var(--accent); }
.tour {
  --slide-width: min(calc(86% - var(--page-inset) * 1.72), 963.2px);
  --slide-inset: calc((100% - var(--slide-width)) / 2);
  --edge-fade: calc(var(--slide-inset) * .68);
  --slide-ratio: 1440 / 900;
  position: relative;
  margin-block-start: 32px;
}
@media (max-width: 540px) {
  .tour { --slide-ratio: 432 / 600; }
}
.tour-stage {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 4px 8px;
  mask-image: linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
}
.tour-stage::-webkit-scrollbar { display: none; }
.tour-stage[data-initializing] { scroll-snap-type: none; }
.tour-stage.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
@media (any-pointer: fine) {
  .tour-stage { cursor: grab; }
  .tour-stage[data-mouse-drag] { scroll-snap-type: none; }
}
.tour-stage figure { flex: 0 0 var(--slide-width); scroll-snap-align: center; }
.tour-stage figure:first-child { margin-inline-start: var(--slide-inset); }
.tour-stage figure:last-child { margin-inline-end: var(--slide-inset); }
.tour-stage .image-link { border-radius: 14px; }
.tour-stage figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-block-start: 12px; }
.tour-stage figcaption span { color: var(--carbon-muted); }
.tour-controls {
  margin: 12px auto 0;
}
.tour-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.tour-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff55;
}
.tour-dots span[data-active] { background: #fff; }
.tour-position {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.tour-arrows {
  position: absolute;
  inset: 4px var(--slide-inset) auto;
  aspect-ratio: var(--slide-ratio);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(8px, 1.5vw, 20px);
  pointer-events: none;
}
.tour-arrows button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--corner);
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 160ms, background-color 160ms;
}
.tour-arrows svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tour-arrows button:hover { background: rgb(255 255 255 / 24%); }
@media (hover: hover) and (pointer: fine) {
  .tour:not(:has(figure[data-active] .image-link:hover, .tour-arrows button:hover, .tour-arrows button:focus-visible, .tour-stage:focus-visible)) .tour-arrows button {
    opacity: 0;
    pointer-events: none;
  }
  .tour:has(.tour-stage.is-dragging) .tour-arrows button { opacity: 0; pointer-events: none; }
}

.themes, .appearance { padding-block: var(--space); }
.appearance .section-head p { color: #cfdae4; }
.appearance-intro { display: grid; justify-items: center; gap: 16px; text-align: center; }
.appearance-preview { margin-block-start: 24px; }
.theme-strip {
  --slice-height: clamp(156px, 18vw, 236px);
  overflow-x: auto;
  overflow-y: hidden;
  margin-block: 24px 12px;
  scrollbar-width: none;
}
.theme-strip::-webkit-scrollbar { display: none; }
.theme-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 1fr);
  min-width: max(100%, 784px);
  overflow: clip;
  border-radius: 16px;
}
.theme-slice { position: relative; display: grid; justify-items: center; min-height: var(--slice-height); }
.theme-slice > span { position: absolute; inset: 0 2px; overflow: hidden; transform: skewX(-45deg); background: var(--bubble); }
.theme-slice:first-child > span { inset-inline-start: calc(var(--slice-height) / -2); }
.theme-slice:last-child > span { inset-inline-end: calc(var(--slice-height) / -2); }
.theme-slice img {
  position: absolute;
  inset-inline-start: calc(var(--slice-height) / -2);
  width: calc(100% + var(--slice-height));
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 36% center;
  transform: skewX(45deg);
}
.theme-slice b {
  position: absolute;
  z-index: 1;
  inset-block-start: min(var(--label-top), calc(100% - 46px));
  inset-inline-start: var(--label-left);
  inset-inline-end: var(--label-right);
  padding: 7px 11px;
  border-radius: 12px 12px 12px 4px;
  background: var(--bubble);
  color: var(--bubble-text, #fff);
  filter: drop-shadow(0 4px 7px #0005);
  font-size: 14px;
}
.theme-slice b::after {
  position: absolute;
  inset: auto auto -5px 0;
  width: 12px;
  height: 8px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  content: '';
}
.theme-carbon { --bubble: #292929; --label-top: 70%; --label-left: 12%; }
.theme-ash { --bubble: #454039; --label-top: 18%; --label-left: 43%; }
.theme-steel { --bubble: #304451; --label-top: 52%; --label-right: 21%; }
.theme-forest { --bubble: #294337; --label-top: 72%; --label-left: 5%; }
.theme-midnight { --bubble: #303655; --label-top: 24%; --label-right: 3%; }
.theme-plum { --bubble: #504056; --label-top: 43%; --label-left: 25%; }
.theme-paper { --bubble: #f1f3f6; --bubble-text: #20242c; --label-top: 76%; --label-right: 12%; }
@media (min-width: 980px) { .theme-strip { overflow: hidden; } }
.appearance-frame { display: block; width: 100%; height: 740px; border: 0; border-radius: 14px; background: var(--carbon); }
.appearance-fallback { padding: 18px; border-radius: 14px; background: var(--carbon-panel); color: var(--carbon-muted); }

.closing { padding-block: var(--space) 28px; }
.start-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-block-start: 32px; }
.start-layout article { min-width: 0; border-block-start: 1px solid #36434d; padding-block-start: 18px; }
.start-layout p { max-width: 48ch; margin-block-start: 8px; color: var(--carbon-muted); }
.start-layout .button { margin: 16px 14px 0 0; background: var(--accent); color: #18232d; }
.start-layout .button:hover { background: #eff3f7; }
.start-layout article > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; margin-block-start: 16px; }
pre { overflow: auto; margin: 16px 0 0; padding: 14px 16px; border-radius: var(--corner); background: #ffffff0b; font-size: 14px; }
code { font-family: "Cascadia Mono", Consolas, monospace; }
.footer-links { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 16px; margin-block-start: 48px; }
.footer-links nav { display: flex; }

@media (max-width: 760px) {
  .frontend-layout { grid-template-columns: 1fr; gap: 14px; }
  .appearance-frame { height: 820px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions .source-link { display: none; }
  .nav-bar { gap: 8px; }
  .nav-bar .brand { font-size: 16px; }
  .nav-actions { gap: 4px; margin-inline-start: auto; }
  .mobile-navigation { display: block; }
  .mobile-navigation summary { display: grid; cursor: pointer; place-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; }
  .mobile-navigation summary::-webkit-details-marker { display: none; }
  .mobile-navigation nav {
    display: grid;
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    padding: 6px;
    border-radius: 12px;
    background: #202b35;
    color: #f3f7fa;
    box-shadow: 0 10px 30px #10182040;
  }
  .mobile-navigation nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--corner); text-decoration: none; }
  .mobile-navigation nav a:hover { background: #ffffff18; }
}
@media (max-width: 380px) {
  .nav-bar { gap: 6px; }
  .nav-bar .brand { font-size: 14px; }
  .mobile-navigation summary { padding-inline: 6px; }
  .nav-actions .button { padding-inline: 9px; }
  .nav-actions .button > span { display: none; }
}
@media (max-width: 670px) {
  .hero-window { width: min(100%, 312px); }
  .start-layout { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  [data-enter] h1 span { animation: arrive 680ms cubic-bezier(.2,.65,.2,1) both; }
  [data-enter] h1 span + span { animation-delay: 100ms; }
  [data-enter] .hero-head p, [data-enter] .hero-link { animation: arrive 600ms 180ms ease-out both; }
  [data-enter] .hero-stage { animation: arrive 860ms 220ms cubic-bezier(.2,.65,.2,1) both; }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-window {
      transform-origin: center 20%;
      animation: level-window linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 440px;
    }
    @keyframes level-window {
      from { transform: perspective(1700px) translateY(12px) rotateX(9deg) scale(.93); }
      to { transform: perspective(1700px) rotateX(0) scale(1); }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .button:active, .hero-link:hover { transform: none !important; }
}
