/* M3 Expressive app-twin: solid tonal surfaces from MCU vars set by
   site.js; rotating seed re-tints everything via transitions. */
* { box-sizing: border-box; }
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@property --grad-a { syntax: "<color>"; inherits: true; initial-value: #e0e6ee; }
@property --grad-b { syntax: "<color>"; inherits: true; initial-value: #a8cbe7; }
@property --grad-c { syntax: "<color>"; inherits: true; initial-value: #dcddff; }
/* Only the grad vars animate at :root (gradients cannot interpolate).
   Everything else transitions its own property once - a root transition
   plus an element transition would double-smooth and desync. */
:root { transition: --grad-a var(--recolor, 1.6s) ease, --grad-b var(--recolor, 1.6s) ease, --grad-c var(--recolor, 1.6s) ease; }
:root {
  --bg: #0b0f11; --text: #e0e6ee; --body2: #a5acb3; --subtle: #a5acb3bf;
  --accent: #a8cbe7; --on-accent: #20445b; --accent-glow: #a8cbe752;
  --tonal: #2d3d4a; --on-tonal: #b0c1d1;
  --card: #151a1e; --card-high: #1b2025; --card-highest: #20272c;
  --outline-v: #42494f;
  --grad-a: #e0e6ee; --grad-b: #a8cbe7; --grad-c: #dcddff;
  --font-d: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-card: rgba(0, 0, 0, .35); --shadow-menu: rgba(0, 0, 0, .4);
  --shimmer: rgba(255, 255, 255, .055); --spot: rgba(255, 255, 255, .07);
  --aur-op: .3; --grain-op: .045;
}
/* Light fallbacks approximate the boot seed's light scheme so first paint
   is close; site.js recomputes exact MCU values right after. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f9fc; --text: #181c20; --body2: #41484d; --subtle: #41484dbf;
    --accent: #29638a; --on-accent: #ffffff; --accent-glow: #29638a40;
    --tonal: #d3e4f5; --on-tonal: #22323f;
    --card: #eaeef3; --card-high: #e4e9ee; --card-highest: #dee3e9;
    --outline-v: #c1c7ce;
    --grad-a: #181c20; --grad-b: #29638a; --grad-c: #575d92;
    --shadow-card: rgba(23, 40, 57, .18); --shadow-menu: rgba(23, 40, 57, .22);
    --shimmer: rgba(255, 255, 255, .55); --spot: rgba(20, 40, 60, .05);
    --aur-op: .5; --grain-op: .03;
  }
}
body {
  margin: 0; min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

header.hero { position: relative; text-align: center; padding: 96px 0 64px; }

/* Home hero: copy + live phone mockup side by side. */
.hero.split {
  display: flex; align-items: center; justify-content: center; gap: 64px;
  text-align: left; padding: 72px 0 56px;
}
.hero.split .hero-copy { max-width: 540px; }
.hero.split .cta { justify-content: flex-start; }
.hero.split .tagline { margin-left: 0; }
@media (max-width: 920px) {
  .hero.split { flex-direction: column; gap: 8px; text-align: center; padding-top: 80px; }
  .hero.split .cta { justify-content: center; }
  .hero.split .tagline { margin: 0 auto 40px; }
  .hero-phone { margin-top: 36px; }
  .phone { transform: rotate(0deg) scale(.92); }
}

/* Aurora: blurred seed-tinted blobs behind the hero. The --grad-* vars are
   registered @property colors, so the blobs re-tint smoothly with the seed. */
.aurora {
  position: absolute; inset: -160px -260px -80px; z-index: -1;
  pointer-events: none; filter: blur(90px); opacity: var(--aur-op);
}
.aurora i {
  position: absolute; border-radius: 50%; will-change: transform;
}
.aurora i:nth-child(1) {
  width: 480px; height: 480px; left: 4%; top: -6%;
  background: radial-gradient(circle, var(--grad-b), transparent 70%);
  animation: aur-a 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 420px; height: 420px; right: 6%; top: 12%;
  background: radial-gradient(circle, var(--grad-c), transparent 70%);
  animation: aur-b 32s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  width: 360px; height: 360px; left: 38%; bottom: -14%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: aur-c 38s ease-in-out infinite alternate;
}
@keyframes aur-a { to { transform: translate(120px, 60px) scale(1.15); } }
@keyframes aur-b { to { transform: translate(-140px, 40px) scale(.9); } }
@keyframes aur-c { to { transform: translate(80px, -70px) scale(1.2); } }

/* Phone mockup: every surface reads the site vars, so seed rotation and
   card hover re-tint the whole "device". */
.hero-phone {
  opacity: 0; transform: translateY(18px); flex-shrink: 0;
  animation: rise .8s cubic-bezier(.2,.7,.2,1) .5s forwards;
  user-select: none; -webkit-user-select: none;
}
.phone, .phone * { transition: background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease, border-color var(--recolor, 1.6s) ease; }
.phone {
  width: 252px; padding: 10px; border-radius: 40px;
  transform: rotate(-4deg);
  background: var(--card-highest); border: 1px solid var(--outline-v);
  box-shadow: 0 34px 90px -18px var(--accent-glow), 0 26px 60px var(--shadow-card);
  animation: phone-float 7s ease-in-out 1.8s infinite alternate;
  transition: background-color var(--recolor, 1.6s) ease, border-color var(--recolor, 1.6s) ease, box-shadow var(--recolor, 1.6s) ease;
}
@keyframes phone-float {
  from { transform: rotate(-4deg) translateY(0); }
  to { transform: rotate(-4deg) translateY(-12px); }
}
@media (max-width: 920px) {
  @keyframes phone-float {
    from { transform: rotate(0deg) scale(.92) translateY(0); }
    to { transform: rotate(0deg) scale(.92) translateY(-12px); }
  }
}
.p-screen {
  background: var(--bg); border-radius: 31px; padding: 16px 14px 10px;
  display: flex; flex-direction: column; gap: 11px;
  min-height: 480px;
}
.p-clockrow { display: flex; justify-content: space-between; align-items: flex-end; padding: 2px 4px 1px; color: var(--body2); }
.p-sig { display: inline-flex; gap: 4px; padding-bottom: 3px; }
.p-sig svg { width: 11px; height: 11px; }
.p-clock { font-family: var(--font-d); font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--accent); }
.p-qs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-tile {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 12px; border-radius: 20px;
  background: var(--card-high); color: var(--body2);
  font-size: 10.5px; font-weight: 600;
}
.p-tile svg { width: 14px; height: 14px; flex-shrink: 0; }
.p-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-tile.on { background: var(--accent); color: var(--on-accent); }
.p-bright { position: relative; height: 28px; border-radius: 999px; background: var(--tonal); overflow: hidden; display: flex; align-items: center; }
.p-bright i { position: absolute; inset: 0 38% 0 0; background: var(--accent); border-radius: 999px; }
.p-bright svg { position: relative; width: 13px; height: 13px; margin-left: 10px; color: var(--on-accent); }
.p-notif { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 18px; background: var(--card-high); }
.p-dot { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--grad-b), var(--grad-c)); }
.p-dot.alt { border-radius: 8px; background: linear-gradient(135deg, var(--grad-c), var(--accent)); }
.p-ncol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-ncol b { font-size: 11px; color: var(--text); }
.p-ncol em { font-style: normal; font-size: 10px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-pill { width: 72px; height: 4px; border-radius: 999px; background: var(--outline-v); margin: auto auto 2px; }
.logo {
  width: 112px; height: 112px; margin-bottom: 28px;
  filter: drop-shadow(0 12px 36px var(--accent-glow));
  transition: filter var(--recolor, 1.6s) ease;
}
h1.title {
  margin: 0 0 14px; font-family: var(--font-d); font-size: clamp(38px, 7vw, 58px); font-weight: 700; letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--grad-a) 20%, var(--grad-b) 55%, var(--grad-c) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline {
  margin: 0 auto 40px; max-width: 560px; color: var(--body2);
  font-size: clamp(16px, 2.4vw, 18.5px); line-height: 1.65;
  transition: color var(--recolor, 1.6s) ease;
}
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
a.btn {
  display: inline-block; padding: 16px 32px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-d); font-size: 15.5px; font-weight: 600;
  transition: filter .15s ease, transform .12s ease, border-radius .25s cubic-bezier(.2,.7,.2,1),
              background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease;
}
a.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
a.btn:active { transform: scale(.97); border-radius: 18px; }
.primary { background: var(--accent); color: var(--on-accent); }
.tonalbtn { background: var(--tonal); color: var(--on-tonal); }

.section-title {
  font-family: var(--font-d);
  font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  color: var(--subtle); text-align: center; margin: 76px 0 28px;
  transition: color var(--recolor, 1.6s) ease;
}

/* Endless drifting rail. */
.marquee {
  overflow: hidden; padding: 20px 0 56px; margin-bottom: -32px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; gap: 16px; width: max-content; animation: drift 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 8px)); }
}

a.tcard {
  position: relative; overflow: hidden;
  flex: 0 0 280px; width: 280px; text-decoration: none; color: inherit;
  border-radius: 28px; padding: 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-radius .25s cubic-bezier(.2,.7,.2,1);
  display: flex; align-items: center; gap: 16px;
}
a.tcard:hover { transform: translateY(-4px); box-shadow: 0 14px 36px var(--shadow-card); border-radius: 22px; }

/* Cursor spotlight: --mx/--my set by a delegated pointermove in site.js. */
a.tcard::after, .info::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 65%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
a.tcard:hover::after, .info:hover::after { opacity: 1; }

/* Tonal palette strip slides up from the card's bottom edge on hover. */
.pstrip {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  display: flex; transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.pstrip i { flex: 1; }
a.tcard:hover .pstrip, a.tcard:focus-visible .pstrip { transform: none; }
.tinfo { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.tname { font-family: var(--font-d); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tauthor { font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tstats { display: flex; gap: 12px; font-size: 12.5px; align-items: center; opacity: .85; margin-top: 5px; }
.tstats > span { display: inline-flex; align-items: center; gap: 4px; }
.tswatch { width: 64px; height: 64px; flex-shrink: 0; display: block; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
a.tcard:hover .tswatch { transform: scale(1.06) rotate(-3deg); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 48px; }
.themes-grid a.tcard { width: auto; flex: none; }

.info {
  position: relative;
  background: var(--card); border-radius: 28px; padding: 28px;
  transition: background-color var(--recolor, 1.6s) ease, transform .25s cubic-bezier(.2,.7,.2,1);
}
.info:hover { transform: translateY(-3px); }
.info h3 { margin: 0 0 10px; font-family: var(--font-d); font-size: 17px; font-weight: 600; }
.info p { margin: 0; color: var(--body2); font-size: 14.5px; line-height: 1.65; transition: color var(--recolor, 1.6s) ease; }

.toolbar { display: flex; gap: 12px; margin: 40px 0 24px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  background: var(--card-high); color: var(--text);
  border: none; border-radius: 999px;
  padding: 15px 22px; font-size: 15px; outline: none;
  transition: background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease, box-shadow .15s ease;
}
.toolbar input:focus, .toolbar select:focus { box-shadow: 0 0 0 2px var(--accent) inset; }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar input::placeholder { color: var(--subtle); }
.searchwrap { flex: 1; min-width: 200px; position: relative; display: flex; }
.searchwrap input[type="search"] { flex: 1; padding-right: 52px; }
.colorbtn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: none; cursor: pointer; color: var(--subtle);
  transition: background-color .15s ease, color var(--recolor, 1.6s) ease;
}
.colorbtn:hover { background: var(--card-highest); }
.colorbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Themed hue popover; native color dialog can't be styled. */
.colorpop { width: 270px; padding: 16px; }
.hueprev { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); transition: color var(--recolor, 1.6s) ease; }
#huePrevDot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--card-highest); border: 2px solid var(--outline-v);
}
.huewrap {
  position: relative; width: 180px; height: 180px;
  margin: 18px auto 12px; touch-action: none; cursor: pointer;
}
#hueWheel {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  -webkit-mask: radial-gradient(circle, transparent 61px, #000 62px);
  mask: radial-gradient(circle, transparent 61px, #000 62px);
}
#hueWheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#hueThumb {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  border: 4px solid var(--bg); box-shadow: 0 1px 5px rgba(0,0,0,.45);
  background: var(--text); pointer-events: none;
  transform: translate(-50%, -50%); left: 50%; top: 8%;
}
.neutralbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 14px; margin-top: 6px;
  background: var(--tonal); color: var(--on-tonal);
  border: none; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  transition: filter .15s ease, transform .12s ease,
              background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease;
}
.neutralbtn:hover { filter: brightness(1.08); }
.neutralbtn:active { transform: scale(.97); }
.neutralbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.neutraldots { display: inline-flex; }
.neutraldots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bg); }
.neutraldots span + span { margin-left: -5px; }
.toolbar select option { background: var(--card-high); }

.menuwrap { position: relative; }
.sortbtn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card-high); color: var(--text);
  border: none; border-radius: 999px; cursor: pointer;
  padding: 15px 22px; font-size: 15px; font-family: var(--font-d); font-weight: 600;
  transition: background-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease, box-shadow .15s ease;
}
.sortbtn:focus-visible { box-shadow: 0 0 0 2px var(--accent) inset; outline: none; }
.sortbtn .chev { color: var(--subtle); transition: transform .25s cubic-bezier(.2,.7,.2,1), color var(--recolor, 1.6s) ease; }
.menuwrap.open .sortbtn .chev { transform: rotate(180deg); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 210px; padding: 8px;
  background: var(--card-high); border-radius: 16px;
  box-shadow: 0 12px 40px var(--shadow-menu);
  transform-origin: top right;
  animation: menupop .22s cubic-bezier(.2,.7,.2,1);
  transition: background-color var(--recolor, 1.6s) ease;
}
/* Toolbar wraps on mobile: sort button rides the end of its row, so the
   right-anchored dropdown stays on the page. */
@media (max-width: 768px) {
  .menuwrap { margin-left: auto; }
}
@keyframes menupop {
  from { opacity: 0; transform: scale(.92) translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.menuitem {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; font-family: inherit; color: var(--text);
  transition: background-color .15s ease, color var(--recolor, 1.6s) ease;
}
.menuitem:hover, .menuitem:focus-visible { background: var(--card-highest); outline: none; }
.menuitem.selected { color: var(--accent); font-weight: 600; }
.menuitem.selected::after {
  content: ""; width: 16px; height: 16px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M9 16.17 5.53 12.7a.996.996 0 1 0-1.41 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71a.996.996 0 1 0-1.41-1.41L9 16.17z"/%3E%3C/svg%3E') center/contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M9 16.17 5.53 12.7a.996.996 0 1 0-1.41 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71a.996.996 0 1 0-1.41-1.41L9 16.17z"/%3E%3C/svg%3E') center/contain no-repeat;
}

.centerlink { text-align: center; margin: 8px 0 24px; }

/* Live catalog stats; numbers count up on reveal (site.js). */
.stats {
  display: flex; justify-content: center; gap: clamp(32px, 8vw, 96px);
  flex-wrap: wrap; margin: 40px 0 36px; text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.statnum {
  font-family: var(--font-d); font-size: clamp(34px, 5vw, 46px); font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--grad-a) 10%, var(--grad-b) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.statlabel {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--subtle); transition: color var(--recolor, 1.6s) ease;
}
.cnum { font-style: normal; font-weight: inherit; }

/* Ambient M3-expressive blobs drifting behind sections. */
.wrap { position: relative; }
.shape {
  position: absolute; z-index: -1; aspect-ratio: 1; pointer-events: none;
  animation: morph 16s ease-in-out infinite alternate, spin 90s linear infinite;
}
.shape-a {
  width: 360px; left: -170px; margin-top: -40px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 58% 42% 52% 48% / 55% 48% 52% 45%;
}
.shape-b {
  width: 300px; right: -150px; margin-top: 30px;
  border: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 45% 55% 48% 52% / 52% 45% 55% 48%;
}
@keyframes morph {
  from { border-radius: 58% 42% 52% 48% / 55% 48% 52% 45%; }
  to { border-radius: 42% 58% 62% 38% / 44% 58% 42% 56%; }
}
@keyframes spin { to { rotate: 360deg; } }
@media (max-width: 920px) { .shape { display: none; } }

/* Film grain: kills gradient banding, adds depth. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Cross-page morph between index and themes. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Scroll parallax: hero recedes slower than the page. */
@supports (animation-timeline: scroll()) {
  .hero.split {
    animation: hero-drift linear both;
    animation-timeline: scroll();
    animation-range: 0 700px;
  }
  @keyframes hero-drift { to { transform: translateY(130px); opacity: .3; } }
}

footer {
  display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap;
  text-align: center; padding: 48px 0 56px; color: var(--subtle); font-size: 14px;
  transition: color var(--recolor, 1.6s) ease;
}
footer a { color: var(--accent); text-decoration: none; transition: color var(--recolor, 1.6s) ease; }
.sep { width: 4px; height: 4px; border-radius: 50%; background: var(--subtle); display: inline-block; transition: background-color var(--recolor, 1.6s) ease; }
.loading { text-align: center; color: var(--subtle); padding: 32px; font-size: 14px; width: 100%; transition: color var(--recolor, 1.6s) ease; }

a.btn.backbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1; }
.backbtn svg { flex-shrink: 0; display: block; }

/* Under the hood */
.lead { max-width: 660px; margin: 0 auto 36px; color: var(--body2); font-size: 15.5px; line-height: 1.75; transition: color var(--recolor, 1.6s) ease; }
.lead p { margin: 0 0 16px; }
.lead code, .faq code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em;
  background: var(--card-high); border-radius: 6px; padding: 1px 6px;
  transition: background-color var(--recolor, 1.6s) ease;
}
.mode-icon { width: 22px; height: 22px; color: var(--accent); margin-bottom: 12px; transition: color var(--recolor, 1.6s) ease; }
.caps { list-style: none; margin: 14px 0 0; padding: 0; }
.caps li {
  position: relative; padding-left: 16px; margin-bottom: 8px;
  color: var(--body2); font-size: 13.5px; line-height: 1.5;
}
.caps li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  transition: background-color var(--recolor, 1.6s) ease;
}

/* Comparison table */
.tablewrap {
  overflow-x: auto; border-radius: 28px; background: var(--card);
  margin-bottom: 12px;
  transition: background-color var(--recolor, 1.6s) ease;
}
.compare { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 13.5px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--outline-v); vertical-align: top; transition: border-color var(--recolor, 1.6s) ease, color var(--recolor, 1.6s) ease, background-color var(--recolor, 1.6s) ease; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }
.compare thead th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); transition: color var(--recolor, 1.6s) ease; }
.compare tbody th { font-weight: 600; color: var(--text); white-space: nowrap; transition: color var(--recolor, 1.6s) ease; }
.compare td { color: var(--body2); }
.compare th:nth-child(2), .compare td:nth-child(2) { background: var(--card-high); color: var(--text); font-weight: 600; transition: background-color var(--recolor, 1.6s) ease; }
.footnotes {
  padding: 14px 18px; border-top: 1px solid var(--outline-v);
  position: sticky; left: 0;
  transition: border-color var(--recolor, 1.6s) ease;
}
.footnote { color: var(--subtle); font-size: 12.5px; margin: 0 0 4px; transition: color var(--recolor, 1.6s) ease; }
.footnote:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto 24px; }
.faq details {
  background: var(--card); border-radius: 24px;
  margin-bottom: 12px; overflow: hidden;
  transition: background-color var(--recolor, 1.6s) ease;
}
.faq details[open] { background: var(--card-high); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-family: var(--font-d); font-size: 15px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chevd { flex-shrink: 0; color: var(--subtle); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.faq details[open] summary .chevd { transform: rotate(180deg); }
.faq .answer { padding: 0 22px 20px; color: var(--body2); font-size: 14.5px; line-height: 1.7; overflow: hidden; }
.faq .answer p { margin: 0 0 12px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Custom select chevron already above. */

/* ---- Motion layer ---- */
html { scroll-behavior: smooth; }

.hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .logo { animation-delay: .05s; }
.hero h1.title { animation-delay: .15s; }
.hero .tagline { animation-delay: .25s; }
.hero .cta { animation-delay: .35s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.logo { animation: rise .8s cubic-bezier(.2,.7,.2,1) .05s forwards, breathe 7s ease-in-out 1.2s infinite alternate; }
@keyframes breathe { from { transform: translateY(0); } to { transform: translateY(-7px); } }

h1.title { background-size: 220% 100%; animation: rise .8s cubic-bezier(.2,.7,.2,1) .15s forwards, shimmer 9s ease-in-out infinite alternate; }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* Animation, not transition: a transition here would REPLACE the element's
   own list (.info etc.) and kill its var(--recolor, 1.6s) recolor. */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; animation: reveal-in .7s cubic-bezier(.2,.7,.2,1); }
@keyframes reveal-in { from { opacity: 0; transform: translateY(22px); } }

a.btn:focus-visible, a.tcard:focus-visible, .faq summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

#lg stop { transition: stop-color var(--recolor, 1.6s) ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  .hero-copy > *, .hero-phone, .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
}

/* Themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--outline-v) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--outline-v); border-radius: 999px;
  border: 2px solid var(--bg); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--subtle); background-clip: padding-box; }
.tablewrap::-webkit-scrollbar-thumb { border-color: var(--card); }

/* Mobile: second trending row, reversed list, opposite direction */
.track2 { display: none; }
@media (max-width: 768px) {
  .track2 { display: flex; margin-top: 16px; animation: drift-reverse 60s linear infinite; }
  .marquee:hover .track2 { animation-play-state: paused; }
}
@keyframes drift-reverse {
  from { transform: translateX(calc(-50% - 8px)); }
  to { transform: translateX(0); }
}

/* Themed clear button for the search field */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; cursor: pointer;
  background: var(--subtle);
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/%3E%3C/svg%3E') center/contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/%3E%3C/svg%3E') center/contain no-repeat;
}
input[type="search"]::-webkit-search-cancel-button:hover { background: var(--text); }

/* Shimmer skeletons while the index loads. */
.sk-row { display: flex; gap: 16px; width: max-content; padding-left: 16px; }
.sk-card {
  position: relative; overflow: hidden;
  flex: 0 0 280px; width: 280px; border-radius: 28px; padding: 18px;
  background: var(--card); display: flex; align-items: center; gap: 16px;
  transition: background-color var(--recolor, 1.6s) ease;
}
.sk-swatch { width: 64px; height: 64px; border-radius: 16px; background: var(--card-highest); flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; border-radius: 6px; background: var(--card-highest); }
.sk-line.w75 { width: 75%; }
.sk-line.w45 { width: 45%; }
.sk-line.w60 { width: 60%; }
.sk-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, var(--shimmer) 50%, transparent 65%);
  transform: translateX(-100%); animation: sk-sweep 1.6s ease-in-out infinite;
}
.sk-card:nth-child(even)::after { animation-delay: .4s; }
@keyframes sk-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk-card::after { animation: none; } }
.themes-grid .sk-card { width: auto; flex: none; }
.themes-grid .loading { grid-column: 1 / -1; }
