/* ==========================================================================
   PULSE STUDIO — Material 3 Expressive Design System (ttyou.app inspired)
   Tonal elevation, spring physics, shape morphing, dark + light schemes
   ========================================================================== */

:root {
  color-scheme: light dark;

  --spring: cubic-bezier(.42, 1.67, .21, .9);
  --ease-out: cubic-bezier(.38, 1.21, .22, 1);
  --ease-press: cubic-bezier(.2, 0, 0, 1);

  /* Light defaults (overridden by system dark or explicit meta[content="dark"]) */
  --bg: #fdf8fd;
  --surface: #f3edf7;
  --surface-2: #ece6f0;
  --surface-hi: #e6e0e9;
  --icon-well: #e6e0e9;
  --selected: #e8def8;
  --chip-on: #e8def8;
  --on-chip-on: #1d192b;
  --glass: rgba(29, 27, 32, 0.06);
  --header-bg: rgba(253, 248, 253, 0.78);
  --menu-bg: rgba(243, 237, 247, 0.98);
  --outline: #cac4d0;
  --wave: #e2dbe6;
  --scrim: rgba(29, 27, 32, 0.25);

  --text: #1d1b20;
  --text-2: #49454f;
  --text-3: #5d5866;
  --text-4: #79747e;
  --text-chip: #49454f;

  --primary: #6750a4;
  --on-primary: #ffffff;
  --on-primary-2: #e8def8;
  --tertiary: #ffd8e4;
  --on-tertiary: #31111d;

  --glow-p: 208 188 255;
  --glow-t: 255 216 228;
  --glow-p-a: 0.65;
  --glow-t-a: 0.7;
  --shadow-pop: 0 18px 54px rgba(60, 40, 90, 0.16);
  --shadow-mag: 0 10px 18px rgba(60, 40, 90, 0.14);
  --hairline: rgba(29, 27, 32, 0.07);

  --scrollbar-track: var(--bg);
  --scrollbar-thumb: var(--surface-hi);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  accent-color: var(--primary);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121112;
    --surface: #1c1b1e;
    --surface-2: #212023;
    --surface-hi: #303038;
    --icon-well: #303035;
    --selected: #2e2f42;
    --chip-on: #46464f;
    --on-chip-on: #f5eefa;
    --glass: rgba(255, 255, 255, 0.06);
    --header-bg: rgba(18, 17, 18, 0.72);
    --menu-bg: rgba(36, 34, 39, 0.98);
    --outline: #323033;
    --wave: #2c2a2f;
    --scrim: rgba(0, 0, 0, 0.45);

    --text: #fffbff;
    --text-2: #c7c5d1;
    --text-3: #acaab5;
    --text-4: #918f9a;
    --text-chip: #aeaaae;

    --primary: #c2c3ee;
    --on-primary: #2b2d50;
    --on-primary-2: #595b81;
    --tertiary: #e0bae6;
    --on-tertiary: #412649;

    --glow-p: 79 55 138;
    --glow-t: 99 59 72;
    --glow-p-a: 0.48;
    --glow-t-a: 0.42;
    --shadow-pop: 0 18px 54px rgba(0, 0, 0, 0.36);
    --shadow-mag: 0 10px 18px rgba(0, 0, 0, 0.16);
    --hairline: rgba(255, 255, 255, 0.06);
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
  --bg: #121112;
  --surface: #1c1b1e;
  --surface-2: #212023;
  --surface-hi: #303038;
  --icon-well: #303035;
  --selected: #2e2f42;
  --chip-on: #46464f;
  --on-chip-on: #f5eefa;
  --glass: rgba(255, 255, 255, 0.06);
  --header-bg: rgba(18, 17, 18, 0.72);
  --menu-bg: rgba(36, 34, 39, 0.98);
  --outline: #323033;
  --wave: #2c2a2f;
  --scrim: rgba(0, 0, 0, 0.45);

  --text: #fffbff;
  --text-2: #c7c5d1;
  --text-3: #acaab5;
  --text-4: #918f9a;
  --text-chip: #aeaaae;

  --primary: #c2c3ee;
  --on-primary: #2b2d50;
  --on-primary-2: #595b81;
  --tertiary: #e0bae6;
  --on-tertiary: #412649;

  --glow-p: 79 55 138;
  --glow-t: 99 59 72;
  --glow-p-a: 0.48;
  --glow-t-a: 0.42;
  --shadow-pop: 0 18px 54px rgba(0, 0, 0, 0.36);
  --shadow-mag: 0 10px 18px rgba(0, 0, 0, 0.16);
  --hairline: rgba(255, 255, 255, 0.06);
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
  --bg: #fdf8fd;
  --surface: #f3edf7;
  --surface-2: #ece6f0;
  --surface-hi: #e6e0e9;
  --icon-well: #e6e0e9;
  --selected: #e8def8;
  --chip-on: #e8def8;
  --on-chip-on: #1d192b;
  --glass: rgba(29, 27, 32, 0.06);
  --header-bg: rgba(253, 248, 253, 0.78);
  --menu-bg: rgba(243, 237, 247, 0.98);
  --outline: #cac4d0;
  --wave: #e2dbe6;
  --scrim: rgba(29, 27, 32, 0.25);

  --text: #1d1b20;
  --text-2: #49454f;
  --text-3: #5d5866;
  --text-4: #79747e;
  --text-chip: #49454f;

  --primary: #6750a4;
  --on-primary: #ffffff;
  --on-primary-2: #e8def8;
  --tertiary: #ffd8e4;
  --on-tertiary: #31111d;

  --glow-p: 208 188 255;
  --glow-t: 255 216 228;
  --glow-p-a: 0.65;
  --glow-t-a: 0.7;
  --shadow-pop: 0 18px 54px rgba(60, 40, 90, 0.16);
  --shadow-mag: 0 10px 18px rgba(60, 40, 90, 0.14);
  --hairline: rgba(29, 27, 32, 0.07);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-block-size: 100dvb;
  font-family: "Google Sans", "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 2px;
}

/* Layout Wrapper (ttyou-style generous rhythm) */
.wrap {
  max-inline-size: 1440px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 6vw, 7.5rem);
}

.sec {
  padding-block: clamp(3.5rem, 8vw, 7.5rem);
}

/* ==========================================================================
   Fixed Blurred Header + Sliding Pill Indicator + Theme/Lang Controls
   ========================================================================== */
.hdr {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 40;
  block-size: 74px;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background-color 220ms ease, backdrop-filter 220ms ease, border-color 220ms ease;
}

.hdr.is-stuck {
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  border-block-end: 1px solid var(--hairline);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.scallop-badge {
  inline-size: 32px;
  block-size: 32px;
  display: grid;
  place-items: center;
  color: var(--primary);
  position: relative;
  flex-shrink: 0;
}

.scallop-badge svg {
  inline-size: 100%;
  block-size: 100%;
  display: block;
}

.scallop-glyph {
  position: absolute;
  color: var(--on-primary);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.nav-center {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
}

.nav-ind {
  position: absolute;
  inset-block: 0.25rem;
  inset-inline-start: 0;
  border-radius: 999px;
  background: var(--glass);
  pointer-events: none;
  transition: transform 320ms var(--spring), inline-size 320ms var(--spring), opacity 180ms ease;
  opacity: 0;
}

.nav-ind.is-ready {
  opacity: 1;
}

.nav-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  block-size: 36px;
  padding-inline: 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-3);
  transition: color 180ms ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.nav-link.is-active {
  color: var(--text);
}

.tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Connected Segmented Theme Toggle (Sun / Moon) */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 24px;
  background: var(--surface);
}

.seg-btn {
  inline-size: 30px;
  block-size: 30px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-radius 220ms var(--spring), transform 140ms var(--ease-press);
}

.seg-btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
}

.pill-ctrl {
  inline-size: auto;
  block-size: 36px;
  padding-inline: 0.9rem;
  border-radius: 18px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: border-radius 220ms var(--spring), background-color 160ms ease, transform 140ms var(--ease-press);
}

.pill-ctrl--primary {
  background: var(--primary);
  color: var(--on-primary);
}

/* Mobile Nav Button */
.menu-btn {
  display: none;
  inline-size: 36px;
  block-size: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  place-items: center;
  cursor: pointer;
}

.nav-popover {
  position: fixed;
  inset: auto;
  inset-block-start: 4.9rem;
  inset-inline-end: 1rem;
  inline-size: min(84dvw, 18rem);
  margin: 0;
  padding: 0.45rem;
  border: 0;
  border-radius: 24px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-pop);
  list-style: none;
}

.nav-popover a {
  display: block;
  padding: 0.72rem 1rem;
  border-radius: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.nav-popover a:hover {
  background: var(--surface-hi);
  color: var(--text);
}

@media (max-width: 1120px) {
  .nav-center {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
}

/* ==========================================================================
   M3 Expressive Buttons, Chips & Morphing Physics
   ========================================================================== */
.btn {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  block-size: 52px;
  padding-inline: 1.5rem;
  border: 0;
  border-radius: 28px;
  background: var(--glass);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  transform: translate3d(var(--mx), var(--my), 0);
  transition:
    border-radius 240ms var(--spring),
    transform 240ms var(--spring),
    background-color 180ms ease,
    box-shadow 200ms ease;
}

.btn:hover {
  background: var(--surface-hi);
  box-shadow: var(--shadow-mag);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: var(--primary);
  filter: brightness(1.06);
}

.btn--tonal {
  background: var(--surface);
  color: var(--text);
}

.btn--tonal:hover {
  background: var(--surface-hi);
}

.btn--lg {
  block-size: 60px;
  min-inline-size: min(100%, 212px);
  padding-inline: 1.75rem;
  border-radius: 30px;
  font-size: 1rem;
}

.btn--sm {
  block-size: 36px;
  padding-inline: 1rem;
  border-radius: 18px;
  font-size: 0.84rem;
}

.btn.is-pressed,
.pill-ctrl.is-pressed,
.mirror.is-pressed {
  transform: translate3d(var(--mx), var(--my), 0) scale(0.95);
  border-radius: 16px;
}

/* Compact M3 Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  block-size: 32px;
  padding-inline: 0.78rem;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--surface);
  color: var(--text-chip);
  white-space: nowrap;
}

.chip--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.chip--tertiary {
  background: var(--tertiary);
  color: var(--on-tertiary);
}

.chip--glass {
  background: var(--glass);
  color: var(--text-2);
}

.chip--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--outline);
  color: var(--text-2);
}

/* Interactive Filter Chips with Animated Checkmark Grid Reveal */
.fchip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fchip {
  display: inline-flex;
  align-items: center;
  block-size: 40px;
  padding-inline: 1rem;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-radius 220ms var(--spring),
    transform 160ms var(--ease-press);
}

.fchip:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.fchip-check {
  display: grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns 220ms var(--spring), margin-inline-end 220ms var(--spring);
}

.fchip-check > span {
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.fchip[aria-pressed="true"] {
  background: var(--chip-on);
  color: var(--on-chip-on);
  border-radius: 20px;
}

.fchip[aria-pressed="true"] .fchip-check {
  grid-template-columns: 1fr;
  margin-inline-end: 0.45rem;
}

/* ==========================================================================
   Hero Section with Ambient Radial Blobs & Bottom Fade
   ========================================================================== */
.hero {
  position: relative;
  min-block-size: clamp(660px, 92dvb, 920px);
  padding-block: 112px 96px;
  display: grid;
  place-items: center;
  overflow: clip;
}

.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 260px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.ambient {
  position: absolute;
  inset: -120px;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
}

.blob--1 {
  inline-size: min(76vw, 760px);
  block-size: min(76vw, 760px);
  inset-block-start: -18%;
  inset-inline-start: 10%;
  background: radial-gradient(circle, rgb(var(--glow-p) / var(--glow-p-a)), transparent 68%);
  animation: drift-a 16s ease-in-out infinite alternate;
}

.blob--2 {
  inline-size: min(65vw, 620px);
  block-size: min(65vw, 620px);
  inset-block-start: 8%;
  inset-inline-end: 6%;
  background: radial-gradient(circle, rgb(var(--glow-t) / var(--glow-t-a)), transparent 70%);
  animation: drift-b 19s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 6%, 0) scale(1.07); }
}

@keyframes drift-b {
  from { transform: translate3d(3%, 2%, 0) scale(1.03); }
  to   { transform: translate3d(-4%, -5%, 0) scale(0.95); }
}

.hero-stack {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(1.35rem, 3vw, 2.25rem);
  max-inline-size: 980px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.hero-h1 {
  margin: 0;
  font-size: clamp(2.55rem, 1.35rem + 4.4vw, 5.25rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  max-inline-size: 56ch;
  font-size: clamp(0.96rem, 0.9rem + 0.3vw, 1.1rem);
  color: var(--text-3);
  text-wrap: balance;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  inline-size: 100%;
}

.sec-h2 {
  margin: 0;
  font-size: clamp(1.65rem, 1.15rem + 2.1vw, 3rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.sec-sub {
  margin: 0;
  color: var(--text-3);
  font-size: 1.04rem;
  max-inline-size: 56ch;
  text-wrap: balance;
}

/* ==========================================================================
   Feature Showcase Card (.feat + .cblock + cropped .phone)
   ========================================================================== */
.feat {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

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

.feat-l {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.cblock {
  background: var(--surface);
  border-radius: 24px;
  padding: 20px 28px 20px 24px;
  min-block-size: 368px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: 1.5rem;
  overflow: clip;
  position: relative;
}

@media (max-width: 780px) {
  .cblock {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

.cb-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-inline-size: 0;
}

.well {
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background: var(--icon-well);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.cb-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cb-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-3);
}

/* Cropped Realistic Smartphone Preview inside .cblock */
.phone-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  block-size: 320px;
  overflow: clip;
  position: relative;
  mask-image: linear-gradient(#000 76%, transparent);
}

.phone {
  inline-size: 100%;
  max-inline-size: 300px;
  min-block-size: 460px;
  border-radius: 34px;
  background: var(--bg);
  padding: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), inset 0 0 0 6px var(--surface-2);
  display: grid;
  gap: 0.65rem;
  align-content: start;
  animation: shot-in 380ms var(--ease-out);
}

@keyframes shot-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.phone-notch {
  inline-size: 72px;
  block-size: 16px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-inline: auto;
}

.phone-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.phone-seg-row {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.58rem 0.72rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.phone-seg-row:first-child {
  border-start-start-radius: 14px;
  border-start-end-radius: 14px;
}

.phone-seg-row:last-child {
  border-end-start-radius: 14px;
  border-end-end-radius: 14px;
}

/* ==========================================================================
   Team / Process Pastel Tonal Cards Carousel (.tcar)
   ========================================================================== */
.tcar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-block: 0.5rem 1rem;
  scroll-snap-type: x proximity;
  cursor: grab;
  scrollbar-width: none;
}

.tcar::-webkit-scrollbar {
  display: none;
}

.tcard {
  flex: 1 0 264px;
  scroll-snap-align: start;
  border-radius: 24px;
  padding: 20px;
  display: grid;
  gap: 1rem;
  align-content: space-between;
  transition: border-radius 320ms var(--spring), transform 220ms var(--spring);
}

.tcard:hover {
  border-radius: 40px;
}

.tcard:active {
  border-radius: 32px;
  transform: scale(0.98);
}

.tcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tcard-num {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.tcard-arrow {
  font-size: 1.1rem;
  transition: transform 220ms var(--spring);
}

.tcard:hover .tcard-arrow {
  transform: translate(2px, -2px);
}

.tcard-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.tcard-role {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.tcard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tchip {
  padding: 0.35rem 0.68rem;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
}

/* Pastel Material 3 Card Tones (matched from ttyou.app) */
.tone-pink {
  background: #ffb2bf;
  color: #660028;
}
.tone-pink .tcard-role { color: #9c274d; }
.tone-pink .tcard-num,
.tone-pink .tchip { background: #ff86a0; color: #660028; }

.tone-blue {
  background: #90cdff;
  color: #003450;
}
.tone-blue .tcard-role { color: #0b5d8b; }
.tone-blue .tcard-num,
.tone-blue .tchip { background: #5db3f1; color: #003450; }

.tone-orange {
  background: #ffb4a2;
  color: #621100;
}
.tone-orange .tcard-role { color: #a13920; }
.tone-orange .tcard-num,
.tone-orange .tchip { background: #ff8b6e; color: #621100; }

.tone-lavender {
  background: #d8c8ff;
  color: #291454;
}
.tone-lavender .tcard-role { color: #54378b; }
.tone-lavender .tcard-num,
.tone-lavender .tchip { background: #b9a1f5; color: #291454; }

/* ==========================================================================
   M3 Segmented Version / Pricing Split Card (.vlist + .ucard)
   ========================================================================== */
.updates-split {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: stretch;
}

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

.vlist {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 4px;
  display: grid;
  gap: 2px;
}

.vrow {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: start;
  cursor: pointer;
  color: var(--text-2);
  transition: background-color 180ms ease, color 180ms ease;
}

.vrow[aria-selected="true"] {
  background: var(--selected);
  color: var(--text);
}

.ucard {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(210px, 265px) minmax(0, 1fr);
  gap: 1.75rem;
}

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

.uc-num {
  font-size: clamp(2.1rem, 1.5rem + 1.8vw, 2.875rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.8rem 0 0.45rem;
}

.changes {
  display: grid;
  gap: 2px;
  align-content: start;
  border-radius: 20px;
  overflow: clip;
}

.change-row {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.82rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-2);
}

.change-row:first-child {
  border-start-start-radius: 20px;
  border-start-end-radius: 20px;
}

.change-row:last-child {
  border-end-start-radius: 20px;
  border-end-end-radius: 20px;
}

.change-plus {
  color: var(--primary);
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   Segmented Download / Action Mirrors (.mirrors) + Animated Wave (.wave)
   ========================================================================== */
.dl-sec {
  position: relative;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}

.mirrors {
  inline-size: min(100%, 528px);
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 2;
}

.mirror {
  --mx: 0px;
  --my: 0px;
  min-block-size: 72px;
  padding: 0.95rem 1.35rem;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: start;
  cursor: pointer;
  transform: translate3d(var(--mx), var(--my), 0);
  transition:
    min-block-size 260ms var(--spring),
    border-radius 240ms var(--spring),
    transform 240ms var(--spring),
    background-color 180ms ease;
}

.mirror--top {
  border-radius: 24px 24px 4px 4px;
  background: var(--primary);
  color: var(--on-primary);
}

.mirror--bot {
  border-radius: 4px 4px 24px 24px;
  background: var(--surface);
  color: var(--text);
}

.mirror:hover {
  min-block-size: 82px;
}

.mirror-arrow {
  transition: transform 220ms var(--spring);
}

.mirror:hover .mirror-arrow {
  transform: translateY(2px);
}

.wave {
  position: relative;
  inline-size: 100%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--outline) 20%, var(--outline) 80%, transparent 100%);
  overflow: hidden;
  margin-block-start: 2.5rem;
}

.wave-track {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: -35%;
  inline-size: 35%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  animation: beam-glide 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes beam-glide {
  from { transform: translateX(0); }
  to   { transform: translateX(390%); }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .wave-track,
  .phone {
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Responsive M3 Table (Concept 2) + Native Modal Dialog
   ========================================================================== */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(460px, 70dvb);
  border-radius: 20px;
  background: var(--surface-2);
  container-type: inline-size;
  scrollbar-gutter: stable;
}

.data-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: start;
  font-size: 0.9rem;
}

.data-table caption {
  text-align: start;
  padding: 1rem 1.1rem 0.5rem;
  font-weight: 600;
  color: var(--text-3);
  font-size: 0.84rem;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--surface-hi);
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.1rem;
  border-block-end: 2px solid var(--bg);
  white-space: nowrap;
}

.data-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  z-index: 1;
}

@container (width < 600px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }
  .data-table thead {
    display: none;
  }
  .data-table tr {
    margin: 0.65rem;
    border-radius: 16px;
    background: var(--surface);
    overflow: clip;
  }
  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--selected);
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    white-space: normal;
  }
  .data-table td:nth-child(2)::before { content: var(--label-2, "Товар") ": "; color: var(--text-3); }
  .data-table td:nth-child(3)::before { content: var(--label-3, "Сервер") ": "; color: var(--text-3); }
  .data-table td:nth-child(4)::before { content: var(--label-4, "Сумма") ": "; color: var(--text-3); }
  .data-table td:nth-child(5)::before { content: var(--label-5, "Статус") ": "; color: var(--text-3); }
}

/* Native <dialog> */
dialog {
  margin: auto;
  inline-size: min(100% - 2rem, 33rem);
  max-block-size: min(90dvb, 44rem);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: blur(6px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-inner {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

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

.dialog-head h2 {
  margin: 0.45rem 0 0;
  font-size: 1.3rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.84rem;
  color: var(--text-2);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  padding: 0.75rem 0.95rem;
  border: 0;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Search Pill */
.sfield {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  block-size: 56px;
  padding-inline: 1.2rem;
  border-radius: 28px;
  background: var(--surface);
  inline-size: 100%;
}

.sfield:focus-within {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.sfield input {
  flex: 1;
  min-inline-size: 0;
  border: 0;
  background: transparent;
  outline: none;
}

/* Footer */
.ftr {
  padding-block: 3.5rem 2.5rem;
  display: grid;
  gap: 2.5rem;
}

.ftr-cols {
  display: grid;
  grid-template-columns: minmax(220px, 280px) repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}

.ftr h4 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.ftr-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--text-2);
  font-size: 0.9rem;
}

.ftr-links a:hover {
  color: var(--primary);
}

.ftr-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-4);
  font-size: 0.82rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.75rem;
}

.m3-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 1.35rem;
  display: grid;
  gap: 0.85rem;
  align-content: space-between;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 4px;
  border-radius: 24px;
  overflow: clip;
}

.kpi-tile {
  background: var(--surface);
  padding: 1.15rem 1.25rem;
  display: grid;
  gap: 0.25rem;
}
