@layer stable-preview {
  :root {
    --stable-ink: oklch(24% 0.033 154);
    --stable-muted: oklch(46% 0.026 144);
    --stable-paper: oklch(96% 0.018 91);
    --stable-wash: oklch(92% 0.024 96);
    --stable-panel: oklch(99% 0.009 94);
    --stable-line: oklch(78% 0.03 92);
    --stable-green: oklch(31% 0.067 158);
    --stable-moss: oklch(45% 0.072 137);
    --stable-brass: oklch(66% 0.087 77);
    --stable-danger: oklch(43% 0.114 32);
    --stable-radius: 8px;
    --stable-shadow: 0 18px 48px color-mix(in oklch, var(--stable-ink), transparent 88%);
  }

  html {
    background: var(--stable-paper);
    scroll-behavior: smooth;
  }

  body {
    background:
      linear-gradient(90deg, color-mix(in oklch, var(--stable-line), transparent 86%) 1px, transparent 1px) 0 0 / 44px 44px,
      linear-gradient(0deg, color-mix(in oklch, var(--stable-line), transparent 90%) 1px, transparent 1px) 0 0 / 44px 44px,
      var(--stable-paper) !important;
    color: var(--stable-ink) !important;
    font-family: Satoshi, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
  }

  h1,
  h2,
  h3,
  .font-display {
    font-family: Boska, Georgia, serif !important;
    letter-spacing: 0 !important;
  }

  p,
  li {
    max-width: 72ch;
  }

  .bg-background,
  .bg-card,
  .bg-card\/40,
  .bg-card\/50,
  .bg-muted\/30,
  .bg-muted\/40 {
    background-color: color-mix(in oklch, var(--stable-panel), transparent 5%) !important;
  }

  .text-foreground {
    color: var(--stable-ink) !important;
  }

  .text-muted-foreground {
    color: var(--stable-muted) !important;
  }

  .border,
  .border-border,
  .border-card-border,
  .border-input {
    border-color: color-mix(in oklch, var(--stable-line), var(--stable-ink) 7%) !important;
  }

  .rounded-2xl,
  .rounded-3xl,
  .rounded-xl {
    border-radius: var(--stable-radius) !important;
  }

  .rounded-full {
    border-radius: 999px !important;
  }

  header {
    background: color-mix(in oklch, var(--stable-paper), transparent 5%) !important;
    backdrop-filter: blur(10px);
  }

  [data-testid="button-list-horse"],
  [data-testid="button-pricing-list-now"],
  [data-testid="button-make-offer"],
  [data-testid="button-send"],
  button.bg-primary,
  a.bg-primary,
  .bg-primary {
    background: var(--stable-green) !important;
    border-color: color-mix(in oklch, var(--stable-green), black 12%) !important;
    color: oklch(97% 0.013 95) !important;
  }

  [data-testid="button-message-seller"],
  button[variant="outline"],
  .border-input.bg-background {
    background: color-mix(in oklch, var(--stable-paper), white 25%) !important;
  }

  [data-testid="link-nav-browse"],
  [data-testid="link-nav-sell"],
  [data-testid="link-nav-dashboard"],
  [data-testid="link-nav-messages"],
  [data-testid="link-nav-pricing"] {
    font-size: 0.76rem !important;
    letter-spacing: 0.015em !important;
  }

  [data-testid^="card-listing-"] {
    background: color-mix(in oklch, var(--stable-panel), transparent 0%);
    border: 1px solid color-mix(in oklch, var(--stable-line), transparent 25%);
    border-radius: var(--stable-radius);
    padding: 8px;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  }

  [data-testid^="card-listing-"]:hover {
    border-color: color-mix(in oklch, var(--stable-moss), var(--stable-line) 55%);
    box-shadow: var(--stable-shadow);
    transform: translateY(-2px);
  }

  [data-testid^="card-listing-"] img {
    filter: saturate(0.92) contrast(1.04);
  }

  [data-testid^="card-listing-"] h3 {
    white-space: normal !important;
    overflow: visible !important;
  }

  [data-stable-preview-banner] {
    position: sticky;
    top: 0;
    z-index: 80;
    background: var(--stable-green);
    color: oklch(97% 0.013 95);
    font: 600 13px/1.4 Satoshi, ui-sans-serif, system-ui, sans-serif;
    padding: 9px 16px;
    text-align: center;
  }

  [data-stable-feedback-trigger] {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 85;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid color-mix(in oklch, var(--stable-green), white 18%);
    border-radius: 999px;
    background: var(--stable-green);
    color: oklch(98% 0.01 95);
    box-shadow: var(--stable-shadow);
    font: 700 13px/1 Satoshi, ui-sans-serif, system-ui, sans-serif;
    padding: 12px 15px;
    cursor: pointer;
  }

  [data-stable-feedback-panel] {
    position: fixed;
    right: 16px;
    bottom: 68px;
    z-index: 86;
    width: min(420px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 104px));
    overflow: auto;
    border: 1px solid color-mix(in oklch, var(--stable-line), var(--stable-ink) 12%);
    border-radius: 12px;
    background: var(--stable-panel);
    color: var(--stable-ink);
    box-shadow: 0 22px 70px color-mix(in oklch, var(--stable-ink), transparent 78%);
    padding: 18px;
  }

  [data-stable-feedback-panel][hidden] {
    display: none;
  }

  .stable-feedback-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
  }

  .stable-feedback-head h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.05;
  }

  .stable-feedback-head p,
  .stable-feedback-note {
    margin: 6px 0 0;
    color: var(--stable-muted);
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .stable-feedback-close {
    border: 1px solid var(--stable-line);
    border-radius: 999px;
    background: transparent;
    color: var(--stable-ink);
    cursor: pointer;
    font: inherit;
    height: 30px;
    width: 30px;
  }

  .stable-feedback-grid {
    display: grid;
    gap: 12px;
    margin-top: 16px;
  }

  .stable-feedback-grid label {
    display: grid;
    gap: 6px;
    color: var(--stable-ink);
    font-size: 0.82rem;
    font-weight: 700;
  }

  .stable-feedback-grid input,
  .stable-feedback-grid select,
  .stable-feedback-grid textarea {
    width: 100%;
    border: 1px solid color-mix(in oklch, var(--stable-line), var(--stable-ink) 8%);
    border-radius: 8px;
    background: color-mix(in oklch, var(--stable-paper), white 35%);
    color: var(--stable-ink);
    font: 500 0.92rem/1.4 Satoshi, ui-sans-serif, system-ui, sans-serif;
    padding: 10px;
  }

  .stable-feedback-grid textarea {
    min-height: 84px;
    resize: vertical;
  }

  .stable-feedback-submit {
    border: 0;
    border-radius: 999px;
    background: var(--stable-green);
    color: oklch(98% 0.01 95);
    cursor: pointer;
    font: 800 0.86rem/1 Satoshi, ui-sans-serif, system-ui, sans-serif;
    padding: 12px 14px;
  }

  .stable-feedback-status {
    min-height: 20px;
    color: var(--stable-moss);
    font-size: 0.82rem;
    font-weight: 700;
  }

  .stable-insert {
    border: 1px solid color-mix(in oklch, var(--stable-line), var(--stable-ink) 10%);
    border-radius: 10px;
    background: color-mix(in oklch, var(--stable-panel), var(--stable-wash) 22%);
    color: var(--stable-ink);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: 0 12px 32px color-mix(in oklch, var(--stable-ink), transparent 92%);
  }

  [data-stable-home-proof] {
    margin: 40px auto 10px;
    max-width: 1160px;
    width: calc(100% - 40px);
  }

  .stable-insert h2,
  .stable-insert h3 {
    margin: 0;
    color: var(--stable-ink);
    font-size: clamp(1.25rem, 1rem + 1vw, 1.9rem);
    line-height: 1.06;
  }

  .stable-insert p {
    margin: 8px 0 0;
    color: var(--stable-muted);
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .stable-proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .stable-proof-item {
    border: 1px solid color-mix(in oklch, var(--stable-line), transparent 15%);
    border-radius: 8px;
    background: color-mix(in oklch, var(--stable-paper), white 22%);
    padding: 12px;
  }

  .stable-proof-item strong {
    display: block;
    color: var(--stable-ink);
    font-size: 0.86rem;
  }

  .stable-proof-item span {
    display: block;
    margin-top: 4px;
    color: var(--stable-muted);
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .stable-route-note {
    margin: 18px auto;
    max-width: 1100px;
  }

  .stable-route-note strong {
    color: var(--stable-danger);
  }

  .stable-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
  }

  .stable-pill-row span {
    border: 1px solid color-mix(in oklch, var(--stable-line), transparent 10%);
    border-radius: 999px;
    background: color-mix(in oklch, var(--stable-paper), white 26%);
    color: var(--stable-ink);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 10px;
  }

  @media (max-width: 720px) {
    [data-stable-feedback-trigger] {
      right: 12px;
      bottom: 12px;
    }

    [data-stable-feedback-panel] {
      right: 12px;
      bottom: 62px;
      width: calc(100vw - 24px);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
    }
  }
}
