:root {
  --background: oklch(0.965 0.012 265);
  --foreground: oklch(0.28 0.04 265);
  --card: oklch(0.985 0.006 265);
  --primary: oklch(0.62 0.19 275);
  --primary-foreground: oklch(0.99 0.005 270);
  --secondary: oklch(0.94 0.04 165);
  --secondary-foreground: oklch(0.35 0.08 165);
  --muted: oklch(0.945 0.01 265);
  --muted-foreground: oklch(0.47 0.03 265);
  --accent: oklch(0.93 0.05 30);
  --border: oklch(0.9 0.01 265);
  --ring: oklch(0.62 0.19 275);
  --destructive: oklch(0.72 0.16 15);

  --clay-shadow: 12px 12px 28px #d1d9e6, -12px -12px 28px #ffffff;
  --clay-shadow-sm: 4px 4px 10px #d1d9e6, -4px -4px 10px #ffffff;
  --clay-shadow-soft: inset 4px 4px 8px rgba(255, 255, 255, 0.7), 6px 6px 16px rgba(15, 23, 42, 0.05);
  --clay-inset: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
  --clay-pressed: inset 3px 3px 6px #c7d2fe, inset -3px -3px 6px #ffffff;

  --radius: 0.625rem;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 18px;
  --radius-3xl: 22px;
  --radius-4xl: 26px;

  --gradient: linear-gradient(135deg, oklch(0.62 0.19 275), oklch(0.58 0.22 300));

  --card-hairline: oklch(0.62 0.19 275 / 0.06);
  --clay-shadow-xs: 3px 3px 8px #d1d9e6, -3px -3px 8px #ffffff;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: oklch(0.965 0.012 265 / 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-weight: 500;
  font-size: 14px;
  color: var(--muted-foreground);
  letter-spacing: -0.01em;
}

.header-cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  transition: color 0.15s ease;
}

.header-cta:hover {
  color: oklch(0.55 0.22 275);
}

.header-cta.active {
  color: var(--primary);
  background: var(--muted);
  box-shadow: var(--clay-pressed);
}

.header-cta-primary {
  background: var(--primary);
  color: var(--primary-foreground) !important;
  box-shadow: var(--clay-shadow-sm);
}

.header-cta-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 72px;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: oklch(0.96 0.02 275);
  border: 1px solid color-mix(in oklch, var(--primary) 18%, transparent);
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  margin-bottom: 18px;
}

.hero-title {
  text-align: left;
}

.hero-sub {
  text-align: left;
  margin-left: 0;
}

.hero-actions {
  justify-content: flex-start;
}

.device {
  background: var(--card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--clay-shadow);
  padding: 14px;
  outline: 1px solid oklch(1 0 0 / 0.5);
  outline-offset: -1px;
}

.device-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding-left: 4px;
}

.device-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

  .device img {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow, .hero-title, .hero-sub, .hero-actions, .hero-micro, .hero-visual { animation: heroIn 0.6s var(--ease-out) both; }
    .hero-title { animation-delay: 0.05s; } .hero-sub { animation-delay: 0.1s; } .hero-actions { animation-delay: 0.15s; } .hero-visual { animation-delay: 0.2s; }
  }
  @keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 52px;
    align-items: center;
  }
}

.hero-title {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-micro {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin: 0 0 16px;
}

.smartscreen-note {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin: 0;
}

.smartscreen-note strong {
  color: var(--foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-xl);
  padding: 14px 28px;
  box-shadow: var(--clay-shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--clay-pressed);
  filter: none;
}

.btn-lg {
  font-size: 18px;
  padding: 16px 36px;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.chip {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-lead { font-size: 17px; font-weight: 500; color: var(--muted-foreground); max-width: 680px; margin: 0 auto 44px; text-align: center; line-height: 1.6; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 6px; }

.section + .section { border-top: 1px solid var(--border); }

.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: center; padding: 22px 0; border-bottom: 1px solid var(--border); }
.trust span:first-child { color: var(--foreground); }
.trust span { font-size: 13px; font-weight: 700; color: var(--muted-foreground); letter-spacing: 0.02em; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px auto 0; }
.metric { text-align: left; padding: 18px 20px; border-radius: var(--radius-xl); background: var(--muted); box-shadow: var(--clay-inset), inset 0 0 0 1px var(--card-hairline); }
.metric strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--foreground); font-variant-numeric: tabular-nums; }
.metric span { font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
@media (max-width: 760px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

.section-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-align: center;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 40px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-3xl);
  box-shadow: var(--clay-shadow), inset 0 0 0 1px var(--card-hairline);
}

/* Pillars */
.pillar-grid {
  display: grid;
  gap: 28px;
}

.pillar {
  padding: 32px;
  box-shadow: var(--clay-shadow-sm), inset 0 0 0 1px var(--card-hairline);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) {
  .pillar:hover {
    transform: translateY(-3px);
    box-shadow: var(--clay-shadow), inset 0 0 0 1px var(--card-hairline);
  }
}

.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: var(--secondary);
  color: var(--secondary-foreground);
  margin-bottom: 20px;
  box-shadow: var(--clay-shadow-sm);
}

.pillar h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.pillar p {
  margin: 0;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 28px;
}

.shot {
  overflow: hidden;
  padding-bottom: 24px;
}

.shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius-2xl);
  box-shadow: var(--clay-shadow);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.shot figcaption {
  padding: 20px 24px 0;
}

.shot h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.shot p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Docs */
.docs {
  background: oklch(0.955 0.012 265);
}

.doc-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.toc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  margin: 0 0 14px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.toc-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.toc-nav a:hover {
  color: var(--foreground);
  background: var(--muted);
}

.toc-nav a.active {
  color: var(--primary);
  background: oklch(0.96 0.02 275);
  border-left-color: var(--primary);
}

.toc-cta {
  width: 100%;
  justify-content: center;
}

.doc-content {
  min-width: 0;
}

.fact-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.fact {
  padding: 18px 20px;
}

.fact h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.fact p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.doc-hero {
  padding: 36px 34px;
  margin-bottom: 36px;
  background: linear-gradient(145deg, var(--primary), oklch(0.5 0.22 290));
  color: var(--primary-foreground);
}

.doc-hero .doc-kicker {
  color: oklch(0.92 0.04 285);
}

.doc-hero .doc-text h3 {
  color: var(--primary-foreground);
}

.doc-hero .doc-text p {
  color: oklch(0.92 0.03 280);
}

.doc-row {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
  scroll-margin-top: 90px;
}

.doc-media {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--clay-shadow);
}

.doc-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--cat-color);
  opacity: 0.55;
  pointer-events: none;
}

.doc-media img {
  display: block;
  width: 100%;
}

@media (hover: hover) {
  .doc-media img {
    transition: transform 0.35s ease;
  }

  .doc-media:hover img {
    transform: scale(1.03);
  }
}

.doc-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--cat-color);
  background: color-mix(in oklch, var(--cat-color) 14%, white);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.doc-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cat-color);
  margin-bottom: 6px;
}

.doc-text h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.doc-text p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.doc-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.doc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--cat-color);
}

.why-grid {
  display: grid;
  gap: 28px;
  margin-top: 16px;
}

.why {
  padding: 28px 30px;
  border-top: 3px solid var(--cat-color);
}

.why h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.why p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Comparison */
.rubric-details {
  max-width: 720px;
  margin: 20px auto 0;
  text-align: center;
}

.rubric-details summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
}

.rubric-details summary::before {
  content: "\25B8 ";
}

.rubric-details[open] summary::before {
  content: "\25BE ";
}

.rubric-note-inline {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 8px 0 0;
  text-align: left;
  padding: 16px;
  background: var(--muted);
  border-radius: var(--radius-lg);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 7px 14px;
}

.legend-pill-memveri {
  color: var(--foreground);
  background: oklch(0.95 0.02 275);
  border-color: oklch(0.62 0.19 275 / 0.15);
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.swatch-memveri { background: var(--primary); }
.swatch-claude { background: oklch(0.6 0.118 184.704); }
.swatch-opencode { background: oklch(0.55 0.07 265); }
.swatch-mimo { background: oklch(0.769 0.188 70.08); }

/* Comparison matrix */
.matrix {
  overflow-x: auto;
  padding: 8px;
  margin-bottom: 16px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  min-width: 760px;
  border-bottom: 1px solid var(--border);
}

.matrix-row:last-child {
  border-bottom: none;
}

.matrix-head {
  background: var(--muted);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.matrix-head .matrix-cell {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}

.matrix-cell {
  padding: 18px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.matrix-feature {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--foreground);
  font-weight: 700;
}

.matrix-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.matrix-cell-memveri {
  background: oklch(0.95 0.025 275);
  border-left: 3px solid var(--primary);
  border-right: 3px solid var(--primary);
  font-weight: 700;
  color: var(--foreground);
}

.matrix-cell-memveri::before {
  content: "✓";
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  line-height: 1.4em;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-foreground);
  background: var(--primary);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.matrix-head .matrix-cell-memveri::before {
  content: none;
}

.matrix-head .matrix-cell-memveri {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.matrix-cell:not(.matrix-cell-memveri):not(.matrix-feature) {
  color: var(--muted-foreground);
  font-weight: 500;
}

.matrix-cell:not(.matrix-cell-memveri):not(.matrix-feature).yes {
  color: oklch(0.48 0.12 150);
}

.matrix-cell:not(.matrix-cell-memveri):not(.matrix-feature).partial {
  color: oklch(0.58 0.10 75);
}

.matrix-cell:not(.matrix-cell-memveri):not(.matrix-feature).no {
  color: oklch(0.6 0.01 265);
}

.bench-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 56px 0 12px;
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.bench-card {
  padding: 26px 26px;
}

.bench-card h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.bench-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.bench-row strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.bench-note {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1.45;
}

.bench-card-hero {
  grid-column: 1 / -1;
  padding: 30px 30px;
  background: linear-gradient(145deg, oklch(0.96 0.02 275), var(--card));
  border-top: 3px solid var(--primary);
}

.bench-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: oklch(0.94 0.03 275);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  margin-bottom: 12px;
}

.bench-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}

.bench-bar {
  display: block;
  height: 8px;
  width: var(--bar-pct, 50%);
  background: var(--gradient);
  border-radius: var(--radius-xl);
  box-shadow: var(--clay-shadow-xs);
}

.bench-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.bench-card:not(.bench-card-hero) .bench-bar {
  height: 4px;
  background: var(--muted);
}

.bench-card:not(.bench-card-hero) .bench-bar-row {
  margin: -4px 0 6px;
}

.bench-card:not(.bench-card-hero) .bench-bar-label {
  display: none;
}

.verdict {
  margin-top: 48px;
  padding: 48px 40px;
  text-align: left;
  background: linear-gradient(145deg, oklch(0.96 0.02 275), var(--card));
  border-left: 4px solid var(--primary);
}

.verdict-inner {
  max-width: 580px;
}

.verdict h3 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--foreground);
}

.verdict-sub {
  margin: 0 0 28px;
  font-size: 17px;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* Tools */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.chip-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chip-btn:hover {
  background: oklch(0.92 0.02 265);
}

.chip-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
  box-shadow: var(--clay-shadow-sm);
}

.chip-btn:active {
  box-shadow: var(--clay-pressed);
}

.tool-group {
  margin-bottom: 46px;
  scroll-margin-top: 90px;
}

.tool-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tool-group-dot {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--cat-color);
  box-shadow: 0 2px 4px oklch(0.4 0.1 270 / 0.25);
  flex-shrink: 0;
}

.tool-group-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--cat-color);
}

.tool-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-foreground);
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: 4px 10px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.tool-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.tool-card {
  padding: 20px 22px;
  border-top: 3px solid var(--cat-color);
}

@media (hover: hover) {
  .tool-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--clay-shadow);
  }
}

.tool-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cat-color);
  background: color-mix(in oklch, var(--cat-color) 14%, white);
  border-radius: var(--radius-md);
  padding: 3px 10px;
  margin-bottom: 12px;
}

.tool-name {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  word-break: break-all;
}

.tool-desc {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* How it works */
.how {
  background: oklch(0.955 0.012 265);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
  counter-reset: step;
}

.step {
  padding: 28px 32px;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  background: var(--gradient);
  color: var(--primary-foreground);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.step p {
  margin: 0;
  color: var(--muted-foreground);
  font-weight: 500;
}

.final-cta {
  margin-top: 56px;
  text-align: center;
}

a:focus-visible, .btn:focus-visible, .chip-btn:focus-visible, .header-cta:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .site-nav { gap: 2px; flex-wrap: wrap; }
  .header-cta { padding: 6px 10px; font-size: 13px; }
  .header-cta-primary { order: 2; }

  .matrix { position: relative; overflow-x: auto; }
  .matrix-row { grid-template-columns: 140px 1fr 1fr 1fr 1fr; min-width: 600px; }
  .matrix-cell:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--card);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.04);
  }
  .matrix-head .matrix-cell:first-child { z-index: 3; background: var(--muted); }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand .brand-logo {
  width: 28px;
  height: 28px;
}

.footer-copy {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.footer-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}

/* Responsive */
@media (min-width: 760px) {
  .doc-row {
    grid-template-columns: 1fr 1fr;
  }

  .doc-row.flip .doc-media {
    order: 2;
  }

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

@media (min-width: 900px) {
  .pillar-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .doc-layout {
    grid-template-columns: 250px 1fr;
    gap: 40px;
  }

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