/* Pvot. Colors are PvotLib's dark palette (design-system/theme/Color.kt). */

@property --fill {
  syntax: '<color>';
  inherits: false;
  initial-value: transparent;
}
@property --s {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

/* Fonts are self-hosted: no request ever goes to Google. Rebuild the icon subset with scripts/fonts.sh. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 300 500;
  font-display: block;
  src: url('/assets/fonts/material-symbols-rounded.woff2') format('woff2');
}

:root {
  --bg: #000;
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, 0.66);
  --ink-3: rgba(245, 245, 247, 0.52);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);
  --surface: #0b0b0e;
  --surface-2: #131317;
  --surface-3: #1b1b20;

  --primary: #8577ff;      /* PvotPrimaryDark */
  --primary-deep: #6b66ff; /* the launcher */
  --pink: #ff6ba6;         /* PvotTertiaryDark */
  --blue: #6fa3ff;         /* PvotSecondaryDark */
  --green: #5fd48a;        /* PvotSuccessDark */
  --amber: #f5c451;        /* PvotWarningDark */
  --lavender: #e4e0ff;     /* PvotOnPrimaryContainerDark */

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --wrap: 1200px;

  /* Depth: a lit top edge and three elevations. Shadows are layered (contact, near, far) the way
     light falls off a raised surface, not one flat blur. */
  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  --e1: 0 1px 1px rgba(0, 0, 0, 0.4), 0 6px 14px -6px rgba(0, 0, 0, 0.6);
  --e2: 0 1px 1px rgba(0, 0, 0, 0.4), 0 12px 28px -10px rgba(0, 0, 0, 0.65), 0 36px 70px -30px rgba(0, 0, 0, 0.6);
  --e3: 0 2px 2px rgba(0, 0, 0, 0.35), 0 22px 44px -14px rgba(0, 0, 0, 0.7), 0 70px 120px -40px rgba(0, 0, 0, 0.65);
  --gutter: 24px;
}
@media (max-width: 560px) { :root { --gutter: 18px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
  /* Android Chrome draws a blue box over anything tapped; controls give their own feedback. */
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: rgba(133, 119, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The skip link shows itself once a keyboard reaches it. */
a.sr-only:focus {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 100;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-size: 15px;
  font-weight: 600;
}

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  display: inline-block;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 24;
  font-feature-settings: 'liga';
  user-select: none;
}
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'opsz' 24; }

/* ---- Type ------------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.display {
  margin: 0;
  font-weight: 700;
  font-size: clamp(56px, 11.4vw, 176px);
  line-height: 0.9;
  letter-spacing: -0.058em;
}
.display > span { display: block; width: fit-content; white-space: nowrap; padding-bottom: 0.06em; }

.h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(38px, 5.6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.h2 .dim, .display .dim { color: var(--ink-3); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); letter-spacing: -0.017em; max-width: 34em; margin: 0; }
.lede strong { color: var(--ink); font-weight: 600; }

/* ---- Buttons ----------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: transform 0.35s var(--spring), background 0.2s, color 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn .ms { font-size: 20px; }
.btn-solid { background: var(--ink); color: #000; }
.btn-solid:hover { background: #fff; }
.btn-glass { color: var(--ink); }
.btn-glass.is-held { transform: scale(1.04); }
.btn-line { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.btn-line:hover { background: rgba(255, 255, 255, 0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--primary); }
.link-arrow .ms { font-size: 20px; transition: transform 0.3s var(--ease); }
.link-arrow:hover .ms { transform: translateX(3px); }

/* ---- Stages and glass -------------------------------------------------------------------- */

.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* What shows before WebGL draws, or without it: a still PvotLiveBackground. */
  background:
    radial-gradient(70% 60% at 40% 30%, rgba(59, 45, 184, 0.32), transparent 70%),
    radial-gradient(40% 40% at 75% 45%, rgba(168, 16, 79, 0.14), transparent 70%),
    #000;
}
.stage:not([data-live]) { background: #000; }
.stage > .stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.stage.is-live > .stage-canvas { opacity: 1; }
:where(.stage > :not(.stage-canvas)) { position: relative; z-index: 1; }
.hero-title { position: relative; }

/* Painted elements are drawn into the backdrop; their DOM copy stays for selection and readers. */
[data-paint='box'] { background: var(--fill); }
[data-stage].is-live [data-paint]:not([data-paint='box']),
[data-stage].is-live [data-paint='rich'] * { -webkit-text-fill-color: transparent; }
/* A rich block's boxes are painted too; its DOM copy keeps only its layout. */
[data-stage].is-live [data-paint='rich'],
[data-stage].is-live [data-paint='rich'] *:not([data-glass]) { background-color: transparent !important; box-shadow: none !important; }
[data-stage].is-live [data-paint='box'] { background: transparent; }

/* Glass, as plain CSS frost until the shader takes over. */
[data-glass] {
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.18);
}
[data-glass='regular'] { background: rgba(35, 31, 54, 0.5); }
[data-glass='thick'] { background: rgba(35, 31, 54, 0.82); }
[data-glass][data-glass-rest] { background: #fff; }
[data-stage].is-live [data-glass] {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
[data-stage].is-live [data-glass][data-glass-rest] { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); }

/* ---- Header ------------------------------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.nav-glass {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: rgba(22, 22, 28, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 10px 40px rgba(0, 0, 0, 0.35);
}
html.refract .nav-glass {
  background: rgba(18, 18, 24, 0.5);
  -webkit-backdrop-filter: url(#nav-refract) saturate(1.7) brightness(1.06);
  backdrop-filter: url(#nav-refract) saturate(1.7) brightness(1.06);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.035em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.nav-glass .brand { margin-right: 12px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
}
.nav-icon:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.nav-icon svg { width: 20px; height: 20px; }
.nav-menu { display: none; }

@media (max-width: 760px) {
  .nav-glass { width: 100%; max-width: 520px; justify-content: space-between; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: 26px;
    background: rgba(22, 22, 28, 0.86);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    /* Hidden, not just see-through, while closed so the keyboard skips its links. Visibility
       flips after the fade out, and at once when opening. */
    visibility: hidden;
    transition: opacity 0.25s, transform 0.35s var(--spring), visibility 0s linear 0.35s;
  }
  .nav-links a { height: 48px; padding: 0 16px; font-size: 17px; color: var(--ink); }
  .site-header.open .nav-links { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
  .nav-menu { display: inline-grid; }
  .nav-right { display: flex; }
}

/* ---- Hero -------------------------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 0 56px;
}
.hero-inner { display: grid; gap: 40px; }
.hero .display { margin-left: -0.04em; }
.hero-top { margin-bottom: 4px; }
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.hero-foot .lede { max-width: 29em; }
.hero-line { animation: rise 1.1s var(--ease) both; }
.stage .hero-line, .stage .hero-meta { animation: none; }
.hero-line:nth-child(2) { animation-delay: 0.12s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(0.3em); }
  to { opacity: 1; transform: none; }
}
.hero-meta { animation: fade 1s 0.35s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* The lens you can pick up. */
.lens {
  position: absolute;
  z-index: 2;
  width: 300px;
  height: 172px;
  border-radius: 999px;
  cursor: grab;
  touch-action: none;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--s));
  transition: --s 0.45s var(--spring);
}
.lens.is-held { --s: 1.07; }
.lens.is-dragging { cursor: grabbing; }
.hero .lens { left: 30%; top: 50%; margin-top: -86px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.lens-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: opacity 0.5s; }
.lens-hint .ms { font-size: 17px; }
.lens-touched .lens-hint { opacity: 0; }
@media (hover: none) { .lens-hint { display: none; } }

@media (max-width: 760px) {
  .lens { width: 196px; height: 112px; }
  .hero .lens { left: 24%; margin-top: -56px; }
  .hero { padding-bottom: 36px; }
}

/* ---- Sections ---------------------------------------------------------------------------- */

.section { padding: clamp(96px, 13vw, 168px) 0; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head.center { justify-items: center; text-align: center; }

/* Statement: words light up as you scroll past them. */
.statement { padding: clamp(120px, 16vw, 220px) 0; }
.statement p {
  margin: 0;
  max-width: 19em;
  font-size: clamp(32px, 4.6vw, 64px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.statement .w { opacity: 0.16; transition: opacity 0.35s linear; }
.statement .w.on { opacity: 1; }
.statement .w.hl { color: var(--primary); }

/* ---- Apps: a home screen ----------------------------------------------------------------- */

.apps-stage { padding: clamp(96px, 12vw, 150px) 0 clamp(80px, 9vw, 120px); }
.seg {
  position: relative;
  display: inline-flex;
  padding: 4px;
  height: 46px;
  border-radius: 999px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-ind {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: left 0.45s var(--spring), width 0.45s var(--spring);
  pointer-events: none;
}
.seg button {
  position: relative;
  z-index: 1;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.2s;
}
.seg button[aria-selected='true'] { color: var(--ink); }

.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; justify-items: center; }
.home-grid {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 28px 12px;
  justify-items: center;
}
.icon-link {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  width: 92px;
  text-align: center;
}
.icon-link[hidden] { display: none; }
.app-icon {
  --c: var(--primary);
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(180deg, #25252b, #141418);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.3);
  color: var(--c);
  transition: transform 0.4s var(--spring);
}
.app-icon .ms { font-size: 32px; font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 40; }
.app-icon.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c), #fff 16%), color-mix(in srgb, var(--c), #000 18%));
  color: #0b0b0e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px color-mix(in srgb, var(--c) 30%, transparent);
}
.app-icon.on .ms { font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 40; }
.icon-link:hover .app-icon { transform: translateY(-4px) scale(1.04); }
.app-icon.has-img { background: none; overflow: hidden; }
.app-icon.has-img img { display: block; width: 100%; height: 100%; }
.icon-label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); line-height: 1.2; letter-spacing: -0.01em; }
.icon-link:hover .icon-label { color: var(--ink); }

.dock-wrap { display: grid; justify-items: center; gap: 14px; }
.dock-wrap[hidden] { display: none; }
.dock-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.dock { display: flex; gap: 14px; padding: 14px 18px 12px; border-radius: 34px; }
.dock .icon-link { width: 76px; }
.dock .icon-label { color: var(--ink); }

.home-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--ink-2);
}
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, #2a2a30, #141418); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.legend i.on { background: var(--primary); box-shadow: none; }

@media (max-width: 560px) {
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 4px; }
  .icon-link { width: 100%; max-width: 76px; }
  .app-icon { width: 58px; height: 58px; border-radius: 16px; }
  .dock { gap: 4px; padding: 12px 10px 10px; border-radius: 30px; max-width: 100%; }
  .dock .icon-link { width: 70px; min-width: 0; flex: 0 1 70px; }
}
@media (max-width: 360px) {
  .app-icon { width: 52px; height: 52px; border-radius: 15px; }
  .app-icon .ms { font-size: 28px; }
  .icon-label { font-size: 11.5px; overflow-wrap: anywhere; }
}

/* ---- The stack --------------------------------------------------------------------------- */

.stack { border-top: 1px solid var(--line); }
.stack-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.4fr) 40px;
  align-items: center;
  gap: 24px;
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
a.stack-row:hover { background: linear-gradient(90deg, rgba(133, 119, 255, 0.07), transparent 70%); }
.stack-row .n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.stack-row h3 { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; }
.stack-row p { margin: 0; color: var(--ink-2); font-size: 16px; }
.stack-row > .ms { color: var(--ink-3); justify-self: end; transition: transform 0.3s var(--ease), color 0.2s; }
a.stack-row:hover > .ms { color: var(--ink); transform: translateX(4px); }
@media (max-width: 760px) {
  .stack-row { grid-template-columns: 36px 1fr 24px; gap: 8px 14px; padding: 24px 0; }
  .stack-row p { grid-column: 2 / 3; }
  .stack-row > .ms { grid-row: 1; grid-column: 3; }
}

/* ---- Privacy: a settings screen ---------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.split .lede { margin-top: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.settings {
  border-radius: 30px;
  padding: 6px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 80px rgba(0, 0, 0, 0.5);
}
.settings-title { padding: 18px 18px 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.set-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.set-row + .set-row { box-shadow: 0 -1px 0 var(--line); }
.set-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--primary)) 18%, transparent);
  color: var(--c, var(--primary));
}
.set-ic .ms { font-size: 22px; }
.set-row b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.set-row small { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }
.set-val { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.set-val.good { color: var(--green); }
.mini-switch { width: 44px; height: 26px; border-radius: 999px; background: rgba(120, 120, 128, 0.32); position: relative; }
.mini-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f5f5f7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ---- Glass controls ---------------------------------------------------------------------- */

.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 44px; }

.g-switch { position: relative; width: 64px; height: 28px; flex: none; touch-action: manipulation; }
.g-switch-track {
  --fill: rgba(120, 120, 128, 0.4);
  position: absolute;
  inset: 0;
  border-radius: 999px;
  transition: --fill 0.25s ease;
}
.g-switch[aria-checked='true'] .g-switch-track { --fill: var(--primary); }
.g-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 38px;
  height: 24px;
  border-radius: 999px;
  transition: left 0.42s var(--spring), transform 0.38s var(--spring);
}
.g-switch[aria-checked='true'] .g-switch-knob { left: 24px; }
.g-switch-knob.is-held { transform: scale(1.55, 1.5); }

.g-slider { position: relative; width: 240px; height: 36px; touch-action: none; cursor: pointer; flex: none; }
.g-slider-track, .g-slider-fill { position: absolute; left: 0; top: 15px; height: 6px; border-radius: 999px; }
.g-slider-track { --fill: rgba(120, 120, 128, 0.4); right: 0; }
.g-slider-fill { --fill: var(--primary); width: 40%; }
.g-slider-knob {
  position: absolute;
  top: 6px;
  left: 40%;
  width: 38px;
  height: 24px;
  margin-left: -19px;
  border-radius: 999px;
  transition: transform 0.38s var(--spring);
}
.g-slider-knob.is-held { transform: scale(1.6, 1.55); }

.g-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--ink);
  transition: transform 0.38s var(--spring);
}
.g-icon .ms { font-size: 24px; }
.g-icon.is-held { transform: scale(1.08); }
.g-icons { display: flex; gap: 14px; }

/* ---- PvotLib teaser ---------------------------------------------------------------------- */

.glass-stage { padding: clamp(110px, 14vw, 180px) 0; }
.glass-stage .section-head { margin-bottom: 64px; }
.glass-stage .controls { margin: 0 0 64px; }
.glass-stage .btn-row { justify-content: center; }

/* ---- CTA and footer ---------------------------------------------------------------------- */

.cta { padding: clamp(120px, 15vw, 200px) 0; text-align: center; }
.cta .h2 { margin-bottom: 26px; }
.cta .lede { margin: 0 auto 36px; }
.cta .btn-row { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 14px; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand .brand { color: var(--ink); }
.footer-brand p { margin: 16px 0 0; max-width: 26em; line-height: 1.55; }
.footer-col h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a:hover { color: var(--ink); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---- Reveal ------------------------------------------------------------------------------ */

.rv { opacity: 0; transform: translateY(36px) scale(0.965); transform-origin: 50% 100%; transition: opacity 0.9s var(--ease), transform 1s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0s); }
@media (hover: hover) and (pointer: fine) { .rv:not(.in) { filter: blur(6px); } }
.rv.in { opacity: 1; transform: none; }
html:not(.js) .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-line, .hero-meta { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Apps index -------------------------------------------------------------------------- */

.page-stage { padding: 150px 0 64px; }
.page-stage .display { font-size: clamp(60px, 9vw, 132px); }
.page-stage .lede { margin-top: 24px; }
.page-stage .seg { margin-top: 40px; }

.cat { padding: 72px 0 8px; }
.cat[hidden] { display: none; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-head h2 { margin: 0; font-size: clamp(28px, 3.2vw, 40px); font-weight: 650; letter-spacing: -0.045em; }
.cat-head p { margin: 0; color: var(--ink-3); font-size: 15px; }
.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.row .app-icon { width: 56px; height: 56px; border-radius: 15px; }
.row .app-icon .ms { font-size: 28px; }
.row b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.row .t { display: block; font-size: 14.5px; color: var(--ink-3); }
.row:hover .app-icon { transform: scale(1.05); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.06);
}
.pill.stable { color: #04210f; background: var(--green); }
.pill.beta { color: #2a1800; background: var(--amber); }
@media (max-width: 760px) { .rows { grid-template-columns: minmax(0, 1fr); } }

/* ---- App page ---------------------------------------------------------------------------- */

.app-hero { padding: 132px 0 80px; }
/* App Store layout: the icon sits on the name's line, actions line up under the text. */
.app-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; }
.app-id { min-width: 0; }
.app-actions { margin: 30px 0 0 calc(136px + 36px); }
.app-hero .app-icon { width: 136px; height: 136px; border-radius: 38px; }
.app-hero .app-icon .ms { font-size: 68px; font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 48; }
.app-hero .app-icon.on .ms { font-variation-settings: 'FILL' 1, 'wght' 400, 'opsz' 48; }
.app-hero h1 { margin: 10px 0 8px; font-size: clamp(52px, 8vw, 112px); font-weight: 700; letter-spacing: -0.055em; line-height: 0.92; }
.app-hero .tagline { margin: 0; font-size: clamp(20px, 2vw, 26px); color: var(--ink-2); letter-spacing: -0.025em; }
.app-hero .pill { margin-left: 4px; vertical-align: middle; }
.crumb { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 44px; }
.crumb:hover { color: var(--ink); }
.crumb .ms { font-size: 20px; }
@media (max-width: 760px) {
  .app-head { gap: 18px; }
  .app-actions { margin: 26px 0 0; }
  .app-hero h1 { font-size: clamp(40px, 11vw, 64px); }
  .app-hero .tagline { font-size: 18px; }
  .app-hero .app-icon { width: 88px; height: 88px; border-radius: 24px; }
  .app-hero .app-icon .ms { font-size: 46px; }
}
/* Narrow screens (320px phones, fold cover screens, enlarged display size): a smaller icon and a
   name that scales with the screen, so a one-word title like "Authenticator" is never cut off. */
@media (max-width: 354px) {
  .app-head { gap: 14px; }
  /* The width beside the icon (screen - 2 x 18px gutter - 72px icon - 14px gap), over the
     longest name's width in em, so it meets the 40px of wider phones at 355px. */
  .app-hero h1 { font-size: calc((100vw - 122px) / 5.9); }
  .app-hero .tagline { font-size: 16px; }
  .app-hero .app-icon { width: 72px; height: 72px; border-radius: 20px; }
  .app-hero .app-icon .ms { font-size: 38px; }
}
.app-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding: 96px 0; }
@media (max-width: 900px) { .app-body { grid-template-columns: minmax(0, 1fr); } }
.app-summary { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.22; }
.feature-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feature-list li { display: flex; gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.feature-list .ms { color: var(--c, var(--primary)); font-size: 22px; }
.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 15px;
}
.note .ms { color: var(--amber); font-size: 22px; }
.related { padding: 0 0 120px; }
.related h2 { margin: 0 0 28px; font-size: 15px; font-weight: 600; color: var(--ink-3); }
.related .home-grid { justify-items: start; max-width: none; }

/* ---- PvotLib ----------------------------------------------------------------------------- */

.lab { min-height: 100svh; padding: 132px 0 72px; display: flex; align-items: center; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: end; width: 100%; }
.lab .display { font-size: clamp(54px, 8.4vw, 132px); }
.lab .lede { margin-top: 28px; }
.lab .btn-row { margin-top: 32px; }
.lab .lens { left: 12%; top: 24%; }
.install-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  height: 48px;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  background: rgba(0, 0, 0, 0.4);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
}
.install-chip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); }
.copy:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.copy .ms { font-size: 18px; }

.panel { border-radius: 30px; padding: 20px 20px 18px; display: grid; gap: 14px; }
.panel h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: center; }
/* Padding gives Reset a comfortable tap target; the negative margin keeps the heading's layout. */
.panel h2 button { font-size: 13px; font-weight: 600; color: var(--primary); min-height: 32px; padding: 0 12px; margin: -6px -12px -6px 0; border-radius: 999px; }
.panel h2 button:hover { background: rgba(133, 119, 255, 0.12); }
.panel .seg { display: flex; width: 100%; height: 40px; padding: 3px; background: rgba(0, 0, 0, 0.3); }
.panel .seg .seg-ind { top: 3px; bottom: 3px; }
.panel .seg button { flex: 1; height: 34px; font-size: 13px; padding: 0 10px; }
.knob { display: grid; gap: 4px; }
.knob label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.knob output { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.knob input[type='range'] { width: 100%; margin: 0; accent-color: var(--primary); height: 22px; }
.panel-note { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
@media (max-width: 960px) {
  .lab-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { max-width: 440px; }
}

.comp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .comp-grid { grid-template-columns: minmax(0, 1fr); } }
.comp {
  display: grid;
  grid-template-rows: 220px auto;
  grid-template-columns: minmax(0, 1fr);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.comp-demo { display: grid; place-items: center; padding: 24px; }
.comp-info { padding: 22px 24px 24px; background: rgba(5, 5, 8, 0.86); border-top: 1px solid var(--line); }
.comp-info h3 { margin: 0 0 4px; font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.comp-info p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-3); }

.code {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: #050507;
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #d6d3e8;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}
.code .k { color: #c7a7ff; }
.code .s { color: #8fd6a5; }
.code .c { color: rgba(214, 211, 232, 0.42); }
.code .f { color: #8fb8ff; }

/* A PvotNavBar: glass bar, the chosen item grown into a pill. */
.navbar { display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 8px; border-radius: 32px; }
.navbar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  min-width: 48px;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.35s var(--spring), color 0.2s, padding 0.35s var(--spring);
}
.navbar button .lbl { display: none; }
.navbar button[aria-selected='true'] { background: var(--primary); color: #0e0033; padding: 0 18px 0 14px; }
.navbar button[aria-selected='true'] .lbl { display: inline; }
.navbar button[aria-selected='true'] .ms { font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 24; }

.glass-card { width: 100%; max-width: 300px; padding: 18px 20px; border-radius: 26px; display: grid; gap: 4px; }
.glass-card b { font-size: 17px; letter-spacing: -0.02em; }
.glass-card span { font-size: 14px; color: var(--ink-2); }

.mat-intro { padding-bottom: 0; }
.mat-intro .section-head { margin-bottom: 0; }
.mat-stage { padding: clamp(110px, 12vw, 170px) 0; margin-bottom: clamp(40px, 6vw, 80px); }
.mat-wall { position: absolute; inset: 0; z-index: 0 !important; display: grid; align-content: center; overflow: hidden; pointer-events: none; user-select: none; }
.mat-wall span {
  display: block;
  width: fit-content;
  white-space: nowrap;
  font-size: clamp(64px, 10vw, 150px);
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: rgba(245, 245, 247, 0.9);
}
.mat-wall span:nth-child(4n+2) { margin-left: -6vw; color: var(--primary); }
.mat-wall span:nth-child(4n+3) { margin-left: 8vw; color: var(--pink); }
.mat-wall span:nth-child(4n) { margin-left: -2vw; color: var(--blue); }
.mats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .mats { grid-template-columns: minmax(0, 1fr); } }
.mat { min-height: 250px; padding: 26px; border-radius: 34px; display: flex; flex-direction: column; justify-content: space-between; }
.mat h3 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.04em; }
.mat p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); max-width: 22em; }
.mat code { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }

.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.install-step h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 860px) { .install { grid-template-columns: minmax(0, 1fr); } }

/* ---- Text pages -------------------------------------------------------------------------- */

.doc-head { padding: 168px 0 64px; border-bottom: 1px solid var(--line); }
.doc-head .display { font-size: clamp(52px, 8vw, 116px); }
.doc-head .lede { margin-top: 26px; }
.doc { padding: 72px 0 140px; }
.doc-body { max-width: 720px; }
.doc-body h2 { margin: 64px 0 16px; font-size: 30px; font-weight: 650; letter-spacing: -0.04em; line-height: 1.1; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--ink-2); font-size: 18px; line-height: 1.65; }
.doc-body p { margin: 0 0 18px; }
.doc-body a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(133, 119, 255, 0.6); text-underline-offset: 3px; }
.doc-body a:hover { text-decoration-color: var(--primary); }
.doc-body ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.doc-body li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.doc-body li::before { content: ''; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-note { margin-top: 48px !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px !important; color: var(--ink-3) !important; }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 24px; }
@media (max-width: 640px) { .help-grid { grid-template-columns: minmax(0, 1fr); } }
.doc-body .help-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: background 0.2s, transform 0.4s var(--spring);
}
.doc-body .help-card:hover { background: var(--surface-3); transform: translateY(-3px); }
.help-card .ms { color: var(--primary); font-size: 26px; }
.help-card h3 { margin: 4px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -0.025em; color: var(--ink); }
.doc-body .help-card p { margin: 0; font-size: 15px; line-height: 1.5; }

/* ---- Store and Exodus -------------------------------------------------------------------- */
.play-mark { width: 18px; height: 18px; }
.exodus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}
.exodus .ms { font-size: 18px; color: var(--green); }
.exodus .ms:last-child { font-size: 16px; color: var(--ink-3); }
.exodus:hover { color: var(--ink); }

.set-row small a { color: var(--ink-2); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.25); text-underline-offset: 2px; }
.set-row small a:hover { color: var(--ink); }

/* ---- Contribute -------------------------------------------------------------------------- */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 40px;
}
.sub-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.2s, color 0.2s;
}
.sub-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.sub-nav a[aria-current='page'] { color: #000; background: var(--ink); box-shadow: none; }

.repo-group { margin-bottom: 72px; }
.repo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
@media (max-width: 960px) { .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .repo-grid { grid-template-columns: minmax(0, 1fr); } }
.repo {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s, transform 0.4s var(--spring);
}
.repo:hover { background: var(--surface-3); transform: translateY(-3px); }
.repo-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.repo-top b { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.repo-top .ms { color: var(--ink-3); font-size: 18px; transition: color 0.2s, transform 0.3s var(--ease); }
.repo:hover .repo-top .ms { color: var(--ink); transform: translate(2px, -2px); }
.repo-about { font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.repo-lang { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.repo-lang::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.repo-lang[data-lang='Kotlin']::before { background: var(--primary); }
.repo-lang[data-lang='Java']::before { background: var(--amber); }
.repo-lang[data-lang='Shell']::before { background: var(--green); }
.repo-lang[data-lang='HTML']::before { background: var(--pink); }
.repo-lang[data-lang='YAML']::before { background: var(--blue); }

.doc-body ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
.doc-body ol.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 14px; }
.doc-body ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.doc-body code { font-family: var(--mono); font-size: 0.86em; padding: 2px 7px; border-radius: 7px; background: var(--surface-3); color: var(--ink); }

.donate { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .donate { grid-template-columns: minmax(0, 1fr); } }
.donate-card {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(133, 119, 255, 0.16), rgba(133, 119, 255, 0.03)), var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px var(--line);
}
.donate-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 107, 166, 0.16); color: var(--pink); margin-bottom: 10px; }
.donate-ic .ms { font-size: 28px; }
.donate-card b { font-size: 22px; letter-spacing: -0.03em; }
.donate-card > span { color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.donate-card small { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }

.sponsor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .sponsor-grid { grid-template-columns: minmax(0, 1fr); } }
.sponsor-slot {
  display: grid;
  place-items: center;
  height: 150px;
  border-radius: 26px;
  border: 1.5px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 860px) { .mat-wall { align-content: space-around; } }
@media (min-width: 861px) { .mat-wall span:nth-child(n+5) { display: none; } }

/* Small phones: let the big headlines scale with the screen so a line never outgrows it. */
@media (max-width: 360px) {
  .display, .page-stage .display, .doc-head .display, .lab .display { font-size: 13.5vw; }
}

/* Touch: with the tap highlight off, plain links dim while pressed so a tap still registers. */
@media (hover: none) {
  .nav-links a:active, .footer-col a:active, .sub-nav a:active, .crumb:active,
  .link-arrow:active, .row:active, .repo:active, .stack-row:active, .icon-link:active { opacity: 0.6; }
}

/* ---- 404 --------------------------------------------------------------------------------- */
.nf { min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.nf .display { font-size: clamp(140px, 30vw, 360px); letter-spacing: -0.07em; line-height: 0.85; margin: 18px 0 8px -0.04em; }
.nf .lens { left: 18%; top: 50%; margin-top: -86px; }
.nf .lede { margin-bottom: 32px; }
@media (max-width: 760px) { .nf .lens { left: 10%; margin-top: -56px; } }

/* ---- Nav: a see-through stage, its links painted, a glass bubble over the current one ---- */
.nav-glass > .stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.nav-glass.is-live > .stage-canvas { opacity: 1; }
.nav-glass > .brand, .nav-glass > .nav-right { position: relative; z-index: 1; }
.nav-links { z-index: 1; }
@media (min-width: 761px) { .nav-links { position: relative; } }
.nav-bubble {
  position: absolute;
  left: 0;
  top: 6px;
  width: 0;
  height: 40px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  background: rgba(255, 255, 255, 0.08);
  transition: left 0.5s var(--spring), top 0.5s var(--spring), width 0.5s var(--spring), transform 0.35s var(--spring);
}
.nav-bubble.is-held { transform: scale(1.12, 1.22); }
.nav-bubble.dragging { transition: width 0.3s var(--spring), transform 0.35s var(--spring); }
.nav-glass:not(.is-live) .nav-bubble { display: none; }
.nav-glass.is-live .nav-links a:hover,
.nav-glass.is-live .nav-links a[aria-current='page'] { background: transparent; }
.nav-glass.is-live [data-glass].nav-bubble { box-shadow: none; }
@media (max-width: 760px) {
  .nav-bubble { display: none !important; }
  /* The menu drops below the bar, outside its canvas: show its links as plain text. */
  .nav-glass.is-live .nav-links a[data-paint] { -webkit-text-fill-color: currentColor; }
  .nav-glass.is-live .nav-links a:hover, .nav-glass.is-live .nav-links a[aria-current='page'] { background: rgba(255, 255, 255, 0.08); }
}

/* ---- Glass category bars: painted track and labels, a glass indicator you can drag ---- */
.seg-glass { --fill: rgba(22, 20, 34, 0.82); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.seg-glass .seg-ind { background: rgba(255, 255, 255, 0.15); }
[data-stage].is-live .seg-glass .seg-ind { background: transparent; box-shadow: none; }
.seg-glass .seg-ind.is-held { transform: scale(1.1, 1.22); }
.seg-glass.dragging .seg-ind { transition: width 0.3s var(--spring), transform 0.35s var(--spring); }
.seg-glass .seg-ind { transition: left 0.45s var(--spring), width 0.45s var(--spring), transform 0.35s var(--spring); }
/* Touching the chosen label grabs the indicator instead of scrolling the row. */
.seg-glass button[aria-selected='true'] { touch-action: none; cursor: grab; }
.seg-glass.dragging, .seg-glass.dragging button { cursor: grabbing; }

.nav-links a { -webkit-user-drag: none; user-select: none; }

/* ---- Depth ----------------------------------------------------------------------------------- */

/* Sections sink back as they scroll away (scale and opacity are written by main.js). */
[data-recede] { transform-origin: 50% 100%; }
[data-plane] { will-change: translate; }

/* Raised surfaces share the same light. */
.settings { box-shadow: var(--rim), var(--e3); }
.repo, .donate-card, .sponsor-slot { box-shadow: var(--rim), var(--e1); }
.code { box-shadow: var(--rim), var(--e1); }
.comp { box-shadow: inset 0 0 0 1px var(--line), var(--e2); }
.btn-solid { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), var(--e1); }
.btn-line { box-shadow: inset 0 0 0 1px var(--line-2), var(--rim), var(--e1); }
.pill { box-shadow: var(--rim); }
.app-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--e2); }
.app-icon.on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--e2), 0 14px 30px -12px color-mix(in srgb, var(--c) 45%, transparent); }
.site-header .nav-glass { transition: box-shadow 0.4s ease, background 0.4s ease; }
.site-header.scrolled .nav-glass {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07), var(--e3);
}

/* Tilt: cards lean toward the pointer and catch a sheen where it points. Vars come from main.js. */
[data-tilt] { position: relative; }
[data-tilt]:not(.icon-link):not(.row) {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--spring), box-shadow 0.4s ease, background 0.2s;
}
[data-tilt].tilting:not(.icon-link):not(.row) { transition: transform 0.12s ease-out, box-shadow 0.4s ease, background 0.2s; box-shadow: var(--rim), var(--e3); }
[data-tilt]:not(.icon-link):not(.row)::after,
:is(.icon-link, .row)[data-tilt] .app-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 0%), rgba(255, 255, 255, 0.11), transparent 45%);
  opacity: var(--so, 0);
  transition: opacity 0.4s ease;
}
:is(.icon-link, .row)[data-tilt] .app-icon::after { background: radial-gradient(90px circle at var(--sx, 50%) var(--sy, 0%), rgba(255, 255, 255, 0.28), transparent 60%); }
:is(.icon-link, .row)[data-tilt] .app-icon {
  transform: perspective(420px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)) scale(var(--grow, 1));
  transition: transform 0.6s var(--spring), box-shadow 0.4s ease;
}
:is(.icon-link, .row)[data-tilt].tilting .app-icon {
  --lift: -4px;
  --grow: 1.06;
  transition: transform 0.14s ease-out, box-shadow 0.4s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), var(--e3);
}
:is(.icon-link, .row)[data-tilt].tilting .app-icon.on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--e3), 0 18px 40px -12px color-mix(in srgb, var(--c) 55%, transparent); }
@media (prefers-reduced-motion: reduce) {
  [data-tilt], [data-tilt] .app-icon { transform: none !important; }
}
