/* ==========================================================================
   Snapleaf site — design system
   Dark, fast, eye-catching, accessible. No frameworks, no runtime CSS-in-JS.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #05080f;
  --bg-soft: #070c16;
  --bg-elevated: #0a111d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #0b1322;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #edf3ff;
  --text-soft: #c6d1e4;
  --muted: #98a6bd;
  --muted-2: #75839a;
  --blue: #1e90ff;
  --blue-bright: #57b6ff;
  --blue-soft: #8fd0ff;
  --violet: #b79bff;
  --yellow: #f7df1e;
  --green: #55e6a5;
  --green-deep: #0b3b28;
  --red: #ff7b8a;
  --orange: #ffb86b;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  color-scheme: dark;
  scrollbar-color: #25334a #070c14;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(60rem 36rem at 50% -10%, rgba(30, 144, 255, 0.16), transparent 62%),
    radial-gradient(40rem 30rem at 96% 8%, rgba(183, 155, 255, 0.08), transparent 60%),
    var(--bg);
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body::selection,
::selection {
  background: rgba(30, 144, 255, 0.42);
  color: #fff;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--blue-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.18s ease;
}

a:hover {
  color: #c7e9ff;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::marker {
  color: var(--blue-bright);
}

strong {
  color: var(--text);
  font-weight: 600;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 0.14em 0.38em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cfeaff;
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, 820px);
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 2.5rem, 1360px);
  margin-inline: auto;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  color: #04111f;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: none;
}

.gradient-text {
  background: linear-gradient(100deg, #ffffff 0%, #dfeeff 30%, #7cc7ff 58%, #c2a9ff 82%, #f7df1e 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--blue-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(87, 182, 255, 0.12), 0 0 16px rgba(87, 182, 255, 0.7);
}

.eyebrow--green::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(85, 230, 165, 0.1), 0 0 16px rgba(85, 230, 165, 0.55);
}

.eyebrow--yellow::before {
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(247, 223, 30, 0.1), 0 0 16px rgba(247, 223, 30, 0.45);
}

.lead {
  color: var(--muted);
  font-size: clamp(1.03rem, 0.98rem + 0.22vw, 1.2rem);
  line-height: 1.7;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.mono {
  font-family: var(--font-mono);
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Buttons, badges, tags
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn svg {
  flex: none;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  border-color: rgba(151, 210, 255, 0.55);
  background: linear-gradient(180deg, #57b6ff 0%, #1e90ff 55%, #1272db 100%);
  color: #04111f;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 30px rgba(30, 144, 255, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7cc7ff 0%, #2e9bff 55%, #1b80e8 100%);
  color: #020b14;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 38px rgba(30, 144, 255, 0.32);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

.btn-quiet {
  padding-inline: 0.7rem;
  color: var(--muted);
}

.btn-quiet:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border-radius: 14px;
  font-size: 1rem;
}

.btn-sm {
  min-height: 36px;
  padding: 0.48rem 0.8rem;
  border-radius: 9px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.tag--green {
  border-color: rgba(85, 230, 165, 0.28);
  background: rgba(85, 230, 165, 0.09);
  color: #8df3c6;
}

.tag--blue {
  border-color: rgba(87, 182, 255, 0.3);
  background: rgba(87, 182, 255, 0.1);
  color: #a5d9ff;
}

.tag--yellow {
  border-color: rgba(247, 223, 30, 0.25);
  background: rgba(247, 223, 30, 0.08);
  color: #f7e878;
}

.link-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.link-button:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.announcement {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.55rem 2.7rem;
  border-bottom: 1px solid rgba(87, 182, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(30, 144, 255, 0.12), rgba(183, 155, 255, 0.08) 55%, rgba(247, 223, 30, 0.06)),
    #070c14;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.announcement-dismissed .announcement {
  display: none;
}

.announcement p {
  margin: 0;
}

.announcement a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.announcement a:hover {
  color: var(--blue-soft);
}

.announcement__badge {
  display: inline-block;
  margin-right: 0.3rem;
  padding: 0.06rem 0.4rem;
  border-radius: 999px;
  background: var(--yellow);
  color: #161400;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.announcement__close {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.announcement__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.74);
  backdrop-filter: blur(18px) saturate(150%);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(4, 8, 14, 0.91);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  filter: drop-shadow(0 6px 16px rgba(30, 144, 255, 0.25));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__version {
  margin-top: 0.25rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
}

.primary-nav {
  margin-left: auto;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.primary-nav a {
  display: inline-block;
  padding: 0.48rem 0.72rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.primary-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.primary-nav a[aria-current="page"] {
  background: rgba(87, 182, 255, 0.09);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.4rem;
}

.header-github {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 38px;
  padding: 0.42rem 0.62rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.header-github:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mobile-nav {
  padding: 0.8rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #070c15;
}

.mobile-nav ul {
  display: grid;
  gap: 0.15rem;
}

.mobile-nav a:not(.btn) {
  display: block;
  padding: 0.7rem 0.65rem;
  border-radius: 8px;
  color: var(--text-soft);
  text-decoration: none;
}

.mobile-nav a:not(.btn):hover,
.mobile-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.mobile-nav__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* --------------------------------------------------------------------------
   Sections + headings
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--soft {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%),
    rgba(7, 12, 22, 0.6);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.section-head__copy {
  max-width: 710px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.25rem + 2.8vw, 3.15rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--text);
  text-wrap: balance;
}

.section-head p:not(.eyebrow) {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 60ch;
}

.section-head__aside {
  flex: none;
}

.section-foot {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 10%, transparent 78%);
  opacity: 0.55;
}

.hero::after {
  content: "";
  position: absolute;
  top: -8rem;
  left: 50%;
  z-index: -1;
  width: 60rem;
  height: 36rem;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(30, 144, 255, 0.22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.015em;
  backdrop-filter: blur(8px);
}

.hero-badge--live {
  border-color: rgba(85, 230, 165, 0.24);
  background: rgba(85, 230, 165, 0.07);
  color: #9cf7d0;
}

.hero-badge .dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(85, 230, 165, 0.8);
}

.hero h1 {
  max-width: 13ch;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 1.55rem + 5.1vw, 5.25rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.058em;
  color: var(--text);
  text-wrap: balance;
}

.hero h1 em {
  display: inline;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  -webkit-text-fill-color: transparent;
}

.hero .lead {
  max-width: 34rem;
  margin-top: 1.35rem;
}

.hero-cta {
  margin-top: 1.8rem;
  align-items: stretch;
}

.hero-cta .btn-primary {
  min-width: 13.5rem;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 1.1rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.69rem;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.hero-note svg {
  color: var(--green);
}

.hero-motion {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.4rem;
  padding: 0.3rem 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

.hero-motion:hover {
  color: var(--text-soft);
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.app-frame {
  position: relative;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 45px 110px rgba(0, 0, 0, 0.65),
    0 0 90px rgba(30, 144, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: perspective(1600px) rotateY(-3.5deg) rotateX(1.5deg);
  transition: transform 0.45s var(--ease), box-shadow 0.45s ease;
}

.app-frame:hover {
  transform: perspective(1600px) rotateY(-1deg) rotateX(0.5deg) translateY(-3px);
  box-shadow:
    0 55px 130px rgba(0, 0, 0, 0.7),
    0 0 110px rgba(30, 144, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.app-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 19px;
  background: linear-gradient(130deg, rgba(87, 182, 255, 0.85), rgba(183, 155, 255, 0.3) 40%, rgba(247, 223, 30, 0.22) 75%, transparent);
  filter: blur(12px);
  opacity: 0.55;
}

.app-frame__chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.45rem 0.65rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.app-frame__dots {
  display: flex;
  gap: 0.3rem;
}

.app-frame__dots span {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #33425b;
}

.app-frame__dots span:nth-child(1) {
  background: #57b6ff;
}

.app-frame__dots span:nth-child(2) {
  background: #b79bff;
}

.app-frame__dots span:nth-child(3) {
  background: #f7df1e;
}

.app-frame__title {
  margin-inline: auto;
  letter-spacing: 0.02em;
}

.app-frame__live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #8df3c6;
}

.app-frame__live::before {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--green);
}

.app-frame img {
  width: 100%;
  height: auto;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.86);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.2;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
}

.float-chip svg {
  flex: none;
}

.float-chip--tr {
  top: -0.9rem;
  right: 1.4rem;
  border-color: rgba(87, 182, 255, 0.28);
}

.float-chip--bl {
  bottom: 1.7rem;
  left: -1.3rem;
  border-color: rgba(85, 230, 165, 0.24);
}

.float-chip--br {
  right: -1rem;
  bottom: -0.9rem;
  border-color: rgba(247, 223, 30, 0.24);
}

.float-chip strong {
  color: #fff;
  font-weight: 600;
}

.float-chip .dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(85, 230, 165, 0.75);
}

@media (prefers-reduced-motion: no-preference) {
  .float-chip {
    animation: float-soft 7s ease-in-out infinite;
  }
  .float-chip--tr {
    animation-delay: -1.5s;
  }
  .float-chip--br {
    animation-delay: -3.2s;
  }
}

@keyframes float-soft {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

/* Stat strip */
.stats-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(3rem, 5vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.stat {
  padding: 1.35rem 1.4rem;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat dt {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat dd {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.15rem + 0.9vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat dd span {
  color: var(--blue-bright);
}

/* Tech strip */
.tech-strip {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
}

.tech-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 1.15rem;
}

.tech-strip li {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.tech-strip li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.tech-strip .tech-hot {
  color: var(--yellow);
}

/* --------------------------------------------------------------------------
   Cards / bento
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1.35rem, 2.2vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.3s var(--ease), background-color 0.25s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: -8rem;
  right: -8rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 144, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--span-7 {
  grid-column: span 7;
}

.feature-card--span-5 {
  grid-column: span 5;
}

.feature-card--span-4 {
  grid-column: span 4;
}

.feature-card--span-6 {
  grid-column: span 6;
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 1.05rem;
  border: 1px solid rgba(87, 182, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(87, 182, 255, 0.16), rgba(183, 155, 255, 0.06));
  color: var(--blue-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.feature-card--violet .feature-card__icon {
  border-color: rgba(183, 155, 255, 0.22);
  background: linear-gradient(145deg, rgba(183, 155, 255, 0.16), rgba(87, 182, 255, 0.05));
  color: #d1c0ff;
}

.feature-card--green .feature-card__icon {
  border-color: rgba(85, 230, 165, 0.2);
  background: linear-gradient(145deg, rgba(85, 230, 165, 0.14), rgba(87, 182, 255, 0.05));
  color: #92f5cb;
}

.feature-card--yellow .feature-card__icon {
  border-color: rgba(247, 223, 30, 0.2);
  background: linear-gradient(145deg, rgba(247, 223, 30, 0.13), rgba(255, 184, 107, 0.05));
  color: #ffe97a;
}

.feature-card h3 {
  margin-bottom: 0.55rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.32rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.feature-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.feature-card__demo {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 12, 0.55);
  overflow: hidden;
}

.feature-card__demo-bar {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

.feature-card__demo-bar span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #2a3750;
}

.feature-card__demo pre {
  margin: 0;
  padding: 0.8rem 0.9rem;
  color: #b8cae5;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.75;
  overflow: auto;
}

.feature-card__demo .k {
  color: #ff9eb5;
}
.feature-card__demo .s {
  color: #a8e6a0;
}
.feature-card__demo .f {
  color: #8fd0ff;
}
.feature-card__demo .n {
  color: #ffd479;
}
.feature-card__demo .c {
  color: #5e718c;
}
.feature-card__demo .ok {
  color: #55e6a5;
}

.feature-card__visual {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.mini-theme {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--t1, #1e90ff), var(--t2, #b79bff));
}

/* --------------------------------------------------------------------------
   Code windows
   -------------------------------------------------------------------------- */
.code-window {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #060b14;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.code-window__dots {
  display: flex;
  gap: 0.3rem;
}

.code-window__dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2d3a50;
}

.code-window__dots span:nth-child(1) {
  background: #57b6ff;
}
.code-window__dots span:nth-child(2) {
  background: #b79bff;
}
.code-window__dots span:nth-child(3) {
  background: #f7df1e;
}

.code-window__title {
  margin-inline: auto;
  letter-spacing: 0.03em;
}

.code-window__badge {
  padding: 0.1rem 0.42rem;
  border: 1px solid rgba(87, 182, 255, 0.25);
  border-radius: 5px;
  color: var(--blue-soft);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-window pre {
  margin: 0;
  padding: 1rem 0 1.1rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 0.66rem + 0.18vw, 0.83rem);
  line-height: 1.82;
  tab-size: 2;
  color: #c9d8ee;
}

.code-window code {
  display: block;
  min-width: max-content;
  padding-inline: 0.9rem;
}

.line {
  display: block;
  padding-inline: 0.55rem;
  border-left: 2px solid transparent;
}

.line--active {
  border-left-color: var(--blue);
  background: rgba(30, 144, 255, 0.06);
}

.ln {
  display: inline-block;
  width: 2.1em;
  margin-right: 1.1em;
  color: #39465b;
  text-align: right;
  user-select: none;
}

.tok-k {
  color: #ff9eb5;
}
.tok-s {
  color: #a8e6a0;
}
.tok-f {
  color: #8fd0ff;
}
.tok-n {
  color: #ffd479;
}
.tok-c {
  color: #5e718c;
}
.tok-p {
  color: #c9a9ff;
}
.tok-v {
  color: #d7e6ff;
}
.tok-ok {
  color: #55e6a5;
}
.tok-warn {
  color: #ffcb7a;
}
.tok-err {
  color: #ff8796;
}

.console {
  border-top: 1px solid var(--line);
  background: #040810;
}

.console__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.console__head .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--green);
}

.console__body {
  display: grid;
  gap: 0.18rem;
  padding: 0.7rem 0.9rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  line-height: 1.7;
}

.console__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: #9db0cb;
}

.console__row .arrow {
  color: var(--green);
}

.console__row .val {
  color: #d4e3f7;
}

.console__row--muted {
  color: #60728c;
}

/* --------------------------------------------------------------------------
   Runtimes demo
   -------------------------------------------------------------------------- */
.demo-split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.demo-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--text);
}

.demo-copy .lead {
  margin-top: 1rem;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 1.6rem 0 0;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.tablist [role="tab"] {
  position: relative;
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.tablist [role="tab"]:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tablist [role="tab"][aria-selected="true"] {
  background: rgba(87, 182, 255, 0.13);
  color: #fff;
}

.tablist [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0.75rem 0;
  border-bottom: 2px solid var(--blue-bright);
}

.tab-panel {
  margin-top: 1rem;
}

.tab-panel h3 {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.tab-panel p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.tab-panel .code-window {
  margin-top: 0.9rem;
}

.runtime-points {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.runtime-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.runtime-points svg {
  flex: none;
  margin-top: 0.2rem;
  color: var(--green);
}

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

.demo-cta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.3rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.kbd {
  display: inline-block;
  min-width: 1.55rem;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line-strong);
  border-bottom-color: rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   AI split
   -------------------------------------------------------------------------- */
.ai-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.ai-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2.7vw, 3.3rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: var(--text);
}

.ai-copy .lead {
  margin-top: 1rem;
}

.ai-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.ai-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.ai-list .icon-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(183, 155, 255, 0.22);
  border-radius: 8px;
  background: rgba(183, 155, 255, 0.08);
  color: #d1c0ff;
}

.ai-list strong {
  display: block;
  font-size: 0.92rem;
}

.ai-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.provider-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.4rem;
}

.provider-pills span {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.ai-shot {
  position: relative;
}

.ai-shot img {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
}

.ai-shot__note {
  position: absolute;
  right: 1rem;
  bottom: -1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(85, 230, 165, 0.28);
  border-radius: 9px;
  background: rgba(5, 14, 12, 0.9);
  color: #a4f8d2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   Theme lab
   -------------------------------------------------------------------------- */
.theme-lab {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.theme-picker {
  margin-top: 1.4rem;
  border: 0;
  padding: 0;
}

.theme-picker > legend {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.theme-option {
  position: relative;
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-option label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.theme-option label:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.theme-option input:focus-visible + label {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

.theme-option input:checked + label {
  border-color: rgba(87, 182, 255, 0.45);
  background: rgba(87, 182, 255, 0.08);
  color: var(--text);
}

.theme-swatch {
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  background: linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
}

.theme-preview {
  --theme-bg: #0b1020;
  --theme-panel: #11182a;
  --theme-text: #dbe7ff;
  --theme-accent: #57b6ff;
  --theme-accent-2: #b79bff;
  --theme-string: #a8e6a0;
  --theme-key: #ff9eb5;
  --theme-number: #ffd479;
  --theme-console: #070b14;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--theme-bg);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.theme-preview__bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--theme-panel);
  color: var(--theme-text);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  opacity: 0.9;
}

.theme-preview__bar span:not(.theme-preview__dots span) {
  white-space: nowrap;
}

.theme-preview__dots {
  display: flex;
  gap: 0.28rem;
}

.theme-preview__dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--theme-accent);
}

.theme-preview__dots span:nth-child(2) {
  background: var(--theme-accent-2);
}

.theme-preview__dots span:nth-child(3) {
  background: var(--theme-number);
}

.theme-preview__bar em {
  margin-inline: auto;
  font-style: normal;
  opacity: 0.65;
}

.theme-preview__body {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  min-height: 20rem;
}

.theme-preview__code {
  padding: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--theme-text);
  font-family: var(--font-mono);
  font-size: clamp(0.64rem, 0.6rem + 0.16vw, 0.75rem);
  line-height: 1.9;
  overflow: auto;
}

.theme-preview__code .c {
  color: color-mix(in srgb, var(--theme-text) 65%, transparent);
}
.theme-preview__code .k {
  color: var(--theme-key);
}
.theme-preview__code .s {
  color: var(--theme-string);
}
.theme-preview__code .n {
  color: var(--theme-number);
}
.theme-preview__code .f {
  color: var(--theme-accent);
}

.theme-preview__console {
  padding: 0.8rem;
  background: var(--theme-console);
  color: var(--theme-text);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.9;
  overflow: auto;
}

.theme-preview__console .ok {
  color: var(--theme-string);
}

.theme-preview__console .muted {
  color: color-mix(in srgb, var(--theme-text) 65%, transparent);
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.gallery-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  appearance: none;
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
}

.gallery-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1366 / 838;
  background: #0a101a;
}

.gallery-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease);
}

.gallery-card:hover .gallery-card__media img {
  transform: scale(1.015);
}

.gallery-card__zoom {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 9, 17, 0.75);
  color: var(--text);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

.gallery-card:hover .gallery-card__zoom,
.gallery-card:focus-visible .gallery-card__zoom {
  opacity: 1;
  transform: none;
}

.gallery-card__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.9rem 1rem 1rem;
}

.gallery-card__caption strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-card__caption span {
  display: block;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.gallery-card--wide {
  grid-column: span 2;
}

.lightbox {
  width: min(94vw, 1280px);
  max-height: 94dvh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #060b14;
  color: var(--text);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.lightbox::backdrop {
  background: rgba(1, 4, 9, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 11, 20, 0.94);
  backdrop-filter: blur(12px);
}

.lightbox__head h2 {
  font-size: 0.92rem;
  font-weight: 600;
}

.lightbox__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lightbox img {
  width: 100%;
  height: auto;
}

.lightbox figcaption {
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Detail feature rows
   -------------------------------------------------------------------------- */
.feature-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.feature-detail:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.feature-detail--flip .feature-detail__media {
  order: -1;
}

.feature-detail h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.3rem + 2.1vw, 2.8rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--text);
}

.feature-detail p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.feature-detail__shot {
  position: relative;
}

.feature-detail__shot img {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.feature-detail__shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.feature-detail__shot--tilt img {
  transform: perspective(1400px) rotateY(2.5deg);
}

.feature-detail__shot--tilt2 img {
  transform: perspective(1400px) rotateY(-2.5deg);
}

.shot-stack {
  display: grid;
  gap: 0.75rem;
}

.shot-stack img {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.feature-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.2rem;
  margin-top: 1.3rem;
}

.feature-checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.feature-checks svg {
  flex: none;
  margin-top: 0.22rem;
  color: var(--green);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.mini-card {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.mini-card svg {
  color: var(--blue-soft);
  margin-bottom: 0.6rem;
}

.mini-card h3 {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.mini-card p {
  margin-top: 0.25rem;
  color: var(--muted-2);
  font-size: 0.78rem;
  line-height: 1.55;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.6rem;
}

.anchor-nav a {
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-decoration: none;
}

.anchor-nav a:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 2rem;
  margin-top: 1.8rem;
}

.checklist-grid h3 {
  margin-bottom: 0.55rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checklist-grid ul {
  display: grid;
  gap: 0.38rem;
}

.checklist-grid li {
  display: flex;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.checklist-grid svg {
  flex: none;
  margin-top: 0.18rem;
  color: var(--green);
}

@media (max-width: 900px) {
  .feature-detail {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .feature-detail--flip .feature-detail__media {
    order: 0;
  }

  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checklist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .feature-checks,
  .mini-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .feature-detail__shot--tilt img,
  .feature-detail__shot--tilt2 img {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.profile-card {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(28rem 16rem at 100% 0%, rgba(30, 144, 255, 0.1), transparent 60%),
    rgba(255, 255, 255, 0.025);
}

.profile-card__photo {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  object-fit: cover;
}

.profile-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.1;
}

.profile-card .tag {
  margin-bottom: 0.6rem;
}

.profile-card p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.reference-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.reference-card blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.reference-card blockquote p {
  color: var(--text-soft);
  font-size: 0.87rem;
  line-height: 1.7;
}

.reference-card figcaption {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

.reference-card figcaption span {
  display: block;
  color: var(--muted-2);
  font-size: 0.73rem;
  font-weight: 400;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.principle {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.principle__number {
  color: var(--blue-bright);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.principle h3 {
  margin-top: 0.4rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.principle p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .reference-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-card__photo {
    width: 7rem;
  }
}

/* --------------------------------------------------------------------------
   Compare / table etc.
   -------------------------------------------------------------------------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  overflow: auto;
  scrollbar-gutter: stable;
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.compare-table caption {
  padding: 1rem 1.1rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

.compare-table th,
.compare-table td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  border-top: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
}

.compare-table thead th:first-child {
  color: var(--muted);
}

.compare-table tbody th {
  color: var(--text-soft);
  font-weight: 500;
}

.compare-table td {
  color: var(--muted);
}

.compare-table .is-featured {
  background: rgba(30, 144, 255, 0.06);
  color: var(--text-soft);
}

.compare-table .yes {
  color: #90f2c8;
}

.compare-table .no {
  color: #94a3b8;
}

.compare-table .partial {
  color: #ffd479;
}

.table-note {
  margin-top: 0.7rem;
  color: var(--muted-2);
  font-size: 0.76rem;
}

/* --------------------------------------------------------------------------
   Trust / open source
   -------------------------------------------------------------------------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.trust-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.trust-card svg {
  color: var(--blue-soft);
  margin-bottom: 0.8rem;
}

.trust-card h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.trust-card p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.dev-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(30rem 12rem at 0% 0%, rgba(30, 144, 255, 0.08), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.dev-strip img {
  width: 4.6rem;
  height: 4.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  object-fit: cover;
}

.dev-strip h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.dev-strip p {
  color: var(--muted);
  font-size: 0.85rem;
}

.dev-strip .btn {
  justify-self: end;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.cta-panel {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border: 1px solid rgba(87, 182, 255, 0.22);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(50rem 26rem at 50% 0%, rgba(30, 144, 255, 0.24), transparent 62%),
    linear-gradient(160deg, #0a1526 0%, #07101c 55%, #0d0b1c 100%);
  overflow: hidden;
  text-align: center;
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 75%);
  pointer-events: none;
}

.cta-panel > * {
  position: relative;
}

.cta-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.02;
  color: var(--text);
  text-wrap: balance;
  margin-inline: auto;
  max-width: 18ch;
}

.cta-panel p {
  max-width: 48rem;
  margin: 1rem auto 0;
  color: var(--muted);
}

.cta-panel .btn-row {
  justify-content: center;
  margin-top: 1.6rem;
}

.cta-panel__fine {
  margin-top: 1.1rem !important;
  color: var(--muted-2) !important;
  font-family: var(--font-mono);
  font-size: 0.69rem;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list {
  display: grid;
  gap: 0.55rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--blue-soft);
}

.faq-item summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.faq-item__body {
  padding: 0 1.1rem 1.15rem;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.7;
}

.faq-item__body p + p {
  margin-top: 0.7rem;
}

.faq-item__body ul {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding-left: 1.1rem;
}

.faq-item__body li {
  list-style: disc;
}

/* --------------------------------------------------------------------------
   Interior page hero
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding: clamp(2.8rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  overflow: clip;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -10rem 0 auto;
  height: 30rem;
  z-index: -1;
  background:
    radial-gradient(40rem 22rem at 50% 20%, rgba(30, 144, 255, 0.18), transparent 65%),
    radial-gradient(28rem 18rem at 80% 20%, rgba(183, 155, 255, 0.1), transparent 65%);
  pointer-events: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.02em;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: #3a475c;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 1.5rem + 3.7vw, 4.3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--text);
  max-width: 20ch;
  text-wrap: balance;
}

.page-hero .lead {
  max-width: 48rem;
  margin-top: 1.1rem;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin-top: 1.5rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.page-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.page-hero__meta .dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.page-hero__actions {
  margin-top: 1.6rem;
}

.page-hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
}

/* --------------------------------------------------------------------------
   Prose / legal / guide
   -------------------------------------------------------------------------- */
.prose {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.78;
}

.prose > * + * {
  margin-top: 1.05rem;
}

.prose h2 {
  margin-top: 2.7rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 2rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose h4 {
  margin-top: 1.4rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

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

.prose strong {
  color: var(--text-soft);
}

.prose a {
  color: var(--blue-soft);
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.3rem;
}

.prose ul > li {
  list-style: disc;
}

.prose ol > li {
  list-style: decimal;
}

.prose li::marker {
  color: var(--blue-bright);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: rgba(30, 144, 255, 0.06);
  color: var(--text-soft);
}

.prose blockquote p {
  color: inherit;
}

.prose code {
  white-space: break-spaces;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose pre {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #060b14;
  color: #c9d8ee;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  white-space: pre;
}

.prose .note {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(87, 182, 255, 0.2);
  border-radius: 10px;
  background: rgba(30, 144, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.prose .warn {
  border-color: rgba(255, 184, 107, 0.24);
  background: rgba(255, 184, 107, 0.06);
}

.prose hr {
  margin: 2rem 0;
}

.prose__updated {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.docs-layout > * {
  min-width: 0;
}

.hero-grid > *,
.demo-split > *,
.ai-split > *,
.theme-lab > *,
.download-hero > *,
.contact-grid > *,
.feature-detail > *,
.footer-grid > * {
  min-width: 0;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100dvh - var(--header-h) - 3rem);
  overflow: auto;
  padding-right: 1rem;
  min-width: 0;
}

.docs-toc h2 {
  margin-bottom: 0.7rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-toc ol {
  display: grid;
  gap: 0.12rem;
  border-left: 1px solid var(--line);
}

.docs-toc a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.85rem;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  overflow-wrap: anywhere;
}

.docs-toc a:hover {
  color: var(--text);
}

.docs-toc a.is-active {
  border-left-color: var(--blue-bright);
  color: var(--blue-soft);
}

.docs-toc .toc-cta {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.docs-toc .toc-cta .btn {
  width: 100%;
}

.guide-section {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.guide-section + .guide-section {
  margin-top: 2.8rem;
}

.guide-section > h2 {
  margin-top: 0;
}

.keytable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 1rem 0;
}

.keytable caption {
  text-align: left;
  color: var(--muted-2);
  font-size: 0.76rem;
  padding-bottom: 0.5rem;
}

.keytable th,
.keytable td {
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.keytable thead th {
  border-top: 0;
  color: var(--text);
  font-size: 0.76rem;
}

.keytable td {
  color: var(--muted);
}

.keytable td:first-child {
  white-space: nowrap;
  color: var(--text-soft);
}

@media (max-width: 680px) {
  .keytable td:first-child {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* --------------------------------------------------------------------------
   Download page
   -------------------------------------------------------------------------- */
.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.download-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid rgba(87, 182, 255, 0.26);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(30rem 18rem at 100% 0%, rgba(30, 144, 255, 0.13), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.download-card__os {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.download-card__os svg {
  color: var(--blue-soft);
}

.download-card .btn {
  margin-top: 1.2rem;
}

.download-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.download-meta div {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.download-meta dt {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.download-meta dd {
  margin: 0.1rem 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.checksum {
  margin-top: 0.9rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.checksum p {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checksum code {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.5;
  word-break: break-all;
  white-space: normal;
}

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
  margin-top: 1.5rem;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.88rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(87, 182, 255, 0.24);
  border-radius: 7px;
  background: rgba(87, 182, 255, 0.08);
  color: var(--blue-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.steps strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-cards {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  text-decoration: none;
}

.contact-card:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.contact-card svg {
  flex: none;
  margin-top: 0.1rem;
  color: var(--blue-soft);
}

.contact-card strong {
  display: block;
  font-size: 0.9rem;
}

.contact-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-form {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.form-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.form-field label {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.form-field .hint {
  color: var(--muted-2);
  font-size: 0.74rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 43px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 0.9rem;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted-2);
}

.form-status {
  margin-top: 0.7rem;
  color: var(--green);
  font-size: 0.82rem;
}

.form-status.is-error {
  color: var(--red);
}

.form-captcha {
  margin-bottom: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

/* --------------------------------------------------------------------------
   Ads
   -------------------------------------------------------------------------- */
.ad-slot {
  display: block;
  margin: 2.2rem auto;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  min-height: 260px;
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

.ad-slot__label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot .adsbygoogle {
  display: block;
}

/* --------------------------------------------------------------------------
   Cookie banner + dialog
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  z-index: 100;
  right: 0.9rem;
  bottom: 0.9rem;
  left: 0.9rem;
  width: min(100% - 1.8rem, 1120px);
  margin-inline: auto;
  border: 1px solid rgba(87, 182, 255, 0.28);
  border-radius: 14px;
  background: rgba(7, 13, 23, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-banner {
    animation: cookie-in 0.35s var(--ease) both;
  }
}

@keyframes cookie-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.8rem 0.9rem;
}

.cookie-banner__copy {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.cookie-banner__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-top: 0.05rem;
  border-radius: 7px;
  background: rgba(87, 182, 255, 0.09);
  color: var(--blue-soft);
}

.cookie-banner p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.cookie-banner p strong {
  color: var(--text);
}

.cookie-banner p a {
  color: var(--text-soft);
  white-space: nowrap;
}

.cookie-banner__actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.cookie-banner .btn {
  white-space: nowrap;
}

.cookie-dialog {
  width: min(92vw, 620px);
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #080e18;
  color: var(--text-soft);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  overscroll-behavior: contain;
}

.cookie-dialog::backdrop {
  background: rgba(1, 4, 9, 0.8);
  backdrop-filter: blur(7px);
  overflow: hidden;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-dialog[open] {
    animation: dialog-in 0.22s var(--ease) both;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

.cookie-dialog__form {
  padding: 1.3rem;
}

.cookie-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-dialog__head .eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.62rem;
}

.cookie-dialog__head h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.cookie-dialog__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.cookie-dialog__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.cookie-dialog__intro {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.cookie-options {
  display: grid;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  border: 0;
}

.cookie-option {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.cookie-option--locked {
  cursor: default;
}

.cookie-option__control {
  flex: none;
  padding-top: 0.1rem;
}

.cookie-option input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--blue);
}

.cookie-option__body {
  display: grid;
  gap: 0.15rem;
}

.cookie-option__name {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
}

.cookie-option__desc {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.5;
}

.cookie-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

.cookie-dialog__fine {
  margin-top: 0.9rem;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.cookie-dialog__fine a {
  color: var(--muted);
}

body.has-cookie-banner {
  padding-bottom: 5.2rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(40rem 20rem at 20% 0%, rgba(30, 144, 255, 0.06), transparent 60%),
    #04070d;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 1.4fr) repeat(3, minmax(8rem, 0.7fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: 2.5rem;
}

.footer-brand p {
  max-width: 24rem;
  margin-top: 0.9rem;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.footer-social {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.footer-social a:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.footer-col h2 {
  margin-bottom: 0.7rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 0.4rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.83rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  color: var(--muted-2);
  font-size: 0.76rem;
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.footer-bottom__links a,
.footer-bottom__links .link-button {
  color: var(--muted-2);
  font-size: 0.76rem;
  text-decoration: none;
}

.footer-bottom__links a:hover,
.footer-bottom__links .link-button:hover {
  color: var(--text);
}

.footer-disclosure {
  padding: 0.2rem 0 1.6rem;
  color: #5f6f86;
  font-size: 0.67rem;
  line-height: 1.6;
}

.footer-disclosure a {
  color: #8294ad;
}

/* --------------------------------------------------------------------------
   Scroll reveal + motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0;
        translate: 0 26px;
      }
      to {
        opacity: 1;
        translate: 0 0;
      }
    }

    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 34%;
    }
  }
}

html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .app-frame {
    transform: none;
  }

  .app-frame:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .header-github span {
    display: none;
  }

  .primary-nav a {
    padding-inline: 0.55rem;
    font-size: 0.82rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .hero-visual {
    max-width: 860px;
  }

  .float-chip--bl {
    left: -0.5rem;
  }

  .float-chip--br {
    right: -0.3rem;
  }

  .docs-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 62px;
  }

  .container,
  .container--narrow,
  .container--wide {
    width: min(100% - 2rem, var(--container));
  }

  .primary-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card--span-7,
  .feature-card--span-5,
  .feature-card--span-4,
  .feature-card--span-6 {
    grid-column: span 1;
  }

  .demo-split,
  .ai-split,
  .theme-lab,
  .download-hero,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .theme-lab {
    gap: 2rem;
  }

  .theme-preview {
    order: 2;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

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

  .footer-brand {
    grid-column: span 3;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    position: static;
    max-height: none;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
  }

  .docs-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 0.8rem;
    border-left: 0;
  }

  .docs-toc a {
    padding-left: 0.6rem;
    border-left: 2px solid var(--line);
  }

  .page-hero--split {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-grid {
    gap: 0.8rem;
  }

  .gallery-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cookie-banner__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: flex-end;
  }

  body.has-cookie-banner {
    padding-bottom: 8rem;
  }
}

@media (max-width: 680px) {
  .announcement {
    padding: 0.6rem 2.3rem 0.6rem 0.9rem;
    font-size: 0.73rem;
    line-height: 1.45;
  }

  .announcement__badge {
    font-size: 0.56rem;
  }

  .brand__version {
    display: none;
  }

  .header-github {
    display: none;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 1.45rem + 5vw, 3.6rem);
    max-width: 100%;
  }

  .hero-note {
    gap: 0.4rem 0.8rem;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  .float-chip {
    font-size: 0.6rem;
    padding: 0.35rem 0.5rem;
  }

  .float-chip--tr {
    top: -0.7rem;
    right: 0.5rem;
  }

  .float-chip--bl {
    bottom: 0.9rem;
    left: 0.3rem;
  }

  .float-chip--br {
    display: none;
  }

  .stats-strip {
    margin-top: 2.2rem;
  }

  .stat {
    padding: 1rem;
  }

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

  .tech-strip ul {
    justify-content: flex-start;
  }

  .tech-strip li + li::before {
    display: none;
  }

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

  .gallery-grid--three {
    grid-template-columns: 1fr;
  }

  .gallery-card--wide {
    grid-column: span 1;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .theme-preview__body {
    grid-template-columns: 1fr;
  }

  .theme-preview__code {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

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

  .footer-brand {
    grid-column: span 2;
  }

  .dev-strip {
    grid-template-columns: auto 1fr;
  }

  .dev-strip .btn {
    grid-column: span 2;
    justify-self: start;
  }

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

  .download-meta {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    right: 0.55rem;
    bottom: 0.55rem;
    left: 0.55rem;
    width: calc(100% - 1.1rem);
  }

  .cookie-banner__copy {
    gap: 0.5rem;
  }

  .cookie-banner__icon {
    display: none;
  }

  .cookie-banner p {
    font-size: 0.72rem;
  }

  .cookie-banner__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .cookie-banner__actions .btn {
    min-height: 34px;
    padding: 0.4rem 0.35rem;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .cookie-banner__actions .btn:first-child {
    grid-column: auto;
    order: 0;
  }

  body.has-cookie-banner {
    padding-bottom: 12rem;
  }

  .cookie-dialog__form {
    padding: 1rem;
  }

  .cookie-dialog__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-dialog__actions .btn {
    width: 100%;
  }

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

  .page-hero h1 {
    font-size: clamp(2.1rem, 1.45rem + 3.6vw, 3rem);
  }

  .docs-toc ol {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    padding: 2rem 1.2rem;
  }

  .table-wrap {
    border-radius: 12px;
  }
}

@media (max-width: 430px) {
  .container,
  .container--narrow,
  .container--wide {
    width: min(100% - 1.5rem, var(--container));
  }

  .btn-lg {
    width: 100%;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .announcement {
    font-size: 0.69rem;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .announcement,
  .site-header,
  .site-footer,
  .cookie-banner,
  .cookie-dialog,
  .ad-slot,
  .hero-motion,
  .cta-panel {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .page-hero,
  .section {
    padding: 1rem 0;
  }

  a {
    color: #111;
  }
}

/* --------------------------------------------------------------------------
   Snapleaf Interactive Annotation Studio Playground
   -------------------------------------------------------------------------- */
.snap-playground {
  border: 1px solid rgba(87, 182, 255, 0.28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(45rem 22rem at 80% 0%, rgba(30, 144, 255, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    #060b14;
  box-shadow:
    0 35px 95px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(30, 144, 255, 0.12);
  overflow: hidden;
}

.snap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 25, 0.88);
}

.snap-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.snap-toolbar__label {
  margin-right: 0.25rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snap-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.snap-btn:hover:not(:disabled) {
  border-color: rgba(87, 182, 255, 0.4);
  background: rgba(87, 182, 255, 0.08);
  color: var(--text);
}

.snap-btn.is-active {
  border-color: #1e90ff;
  background: #1e90ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(30, 144, 255, 0.45);
}

.snap-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.snap-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: var(--swatch, #ff3b30);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.snap-swatch:hover {
  transform: scale(1.08);
}

.snap-swatch.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #1e90ff, 0 0 12px rgba(30, 144, 255, 0.65);
}

.snap-canvas-wrap {
  position: relative;
  padding: 1rem;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    #040810;
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

.snap-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55);
}

.snap-annot {
  cursor: pointer;
  transition: filter 0.12s ease;
}

.snap-annot:hover {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.snap-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(5, 9, 17, 0.92);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.snap-statusbar strong {
  color: var(--blue-soft);
}

/* --------------------------------------------------------------------------
   Gallery category filters & Filename token builder
   -------------------------------------------------------------------------- */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
}

.filter-pill {
  min-height: 38px;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: rgba(87, 182, 255, 0.4);
  color: var(--text);
}

.filter-pill.is-active {
  border-color: #1e90ff;
  background: rgba(30, 144, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(30, 144, 255, 0.25);
}

.filename-builder {
  margin-top: 1.4rem;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 11, 20, 0.8);
}

.filename-builder__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.filename-builder input,
.filename-builder select {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.token-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.token-pill {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--blue-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.token-pill:hover {
  border-color: var(--blue-bright);
  background: rgba(30, 144, 255, 0.12);
}

.filename-builder__preview {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(30, 144, 255, 0.08);
  border: 1px solid rgba(87, 182, 255, 0.22);
  color: #a5d9ff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.checksum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 680px) {
  .filename-builder__controls {
    grid-template-columns: 1fr;
  }
  .snap-toolbar {
    padding: 0.7rem;
  }
}
