/* ArbitrageOS — Retail Intelligence design system (port of src/styles.css + used utilities) */

:root {
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);

  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --background: oklch(0.147 0.007 250);
  --foreground: oklch(0.965 0.004 250);
  --surface: oklch(0.185 0.008 252);
  --surface-raised: oklch(0.222 0.009 252);
  --hairline: oklch(0.28 0.01 252);
  --card: oklch(0.185 0.008 252);
  --popover: oklch(0.205 0.009 252);
  --popover-foreground: oklch(0.965 0.004 250);
  --primary: oklch(0.8 0.132 189);
  --primary-foreground: oklch(0.17 0.02 210);
  --secondary: oklch(0.24 0.009 252);
  --secondary-foreground: oklch(0.93 0.004 250);
  --muted: oklch(0.225 0.008 252);
  --muted-foreground: oklch(0.645 0.011 254);
  --accent: oklch(0.26 0.012 252);
  --accent-foreground: oklch(0.96 0.004 250);
  --destructive: oklch(0.63 0.183 24);
  --destructive-foreground: oklch(0.98 0.004 250);
  --border: oklch(0.268 0.009 252);
  --input: oklch(0.278 0.009 252);
  --ring: oklch(0.8 0.132 189);
  --positive: oklch(0.79 0.155 152);
  --positive-soft: oklch(0.79 0.155 152 / 12%);
  --warning: oklch(0.82 0.145 80);
  --warning-soft: oklch(0.82 0.145 80 / 12%);
  --negative: oklch(0.68 0.185 24);
  --negative-soft: oklch(0.68 0.185 24 / 12%);

  --shadow-panel: 0 1px 0 0 oklch(1 0 0 / 4%) inset, 0 24px 60px -30px oklch(0 0 0 / 70%);
  --shadow-signal: 0 0 0 1px oklch(0.78 0.13 190 / 25%), 0 14px 40px -18px oklch(0.78 0.13 190 / 30%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

html.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
}

::selection {
  background: oklch(0.8 0.132 189 / 26%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

h1, h2, h3, h4, h5, h6, p, figure {
  margin: 0;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-color: inherit;
  text-indent: 0;
}

th {
  font-weight: inherit;
  text-align: inherit;
}

textarea {
  border: 0;
}

input {
  border: 0;
}

svg.size-3 { width: 0.75rem; height: 0.75rem; }
svg.size-3\.5, .size-3\.5 { width: 0.875rem; height: 0.875rem; }
svg.size-4, .size-4 { width: 1rem; height: 1rem; }
svg.size-5, .size-5 { width: 1.25rem; height: 1.25rem; }
svg.h-4.w-4 { width: 1rem; height: 1rem; }

/* Product utilities */
.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 600;
}

.panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.grid-field {
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 3.5%) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 3.5%) 1px, transparent 1px);
  background-size: 56px 56px;
}

.scan-line {
  position: relative;
  overflow: hidden;
}

.scan-line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.55;
  animation: scan 4.5s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(var(--scan-distance, 420px)); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.live-dot { animation: pulse-dot 1.8s ease-in-out infinite; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rise-in { animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */
.min-h-screen { min-height: 100vh; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-1\.5 { margin-right: 0.375rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-2\.5 { margin-top: 0.625rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-9 { margin-top: 2.25rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-16 { padding-top: 4rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-2\.5 { padding-bottom: 0.625rem; }
.pb-16 { padding-bottom: 4rem; }
.pl-1 { padding-left: 0.25rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }
.pl-\[1\.375rem\] { padding-left: 1.375rem; }
.pr-2 { padding-right: 0.5rem; }

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-px { gap: 1px; }
.gap-x-2 { column-gap: 0.5rem; }
.gap-x-5 { column-gap: 1.25rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-2 { row-gap: 0.5rem; }
.gap-y-3 { row-gap: 0.75rem; }
.gap-y-4 { row-gap: 1rem; }
.gap-y-5 { row-gap: 1.25rem; }

.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 2.5rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
[hidden] { display: none !important; }
.block { display: block; }
.contents { display: contents; }

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.self-start { align-self: flex-start; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.place-items-center { place-items: center; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-1\/2 { top: 50%; }
.top-full { top: 100%; }
.right-2 { right: 0.5rem; }
.right-5 { right: 1.25rem; }
.bottom-4 { bottom: 1rem; }
.bottom-5 { bottom: 1.25rem; }
.left-4 { left: 1rem; }
.left-1\/2 { left: 50%; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.pointer-events-none { pointer-events: none; }

.w-full { width: 100%; }
.w-px { width: 1px; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-9 { width: 2.25rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-40 { width: 10rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-85 { max-width: 85%; }
.max-w-\[18rem\] { max-width: 18rem; }
.max-w-1400 { max-width: 1400px; }
.max-w-1600 { max-width: 1600px; }

.h-0\.5 { height: 0.125rem; }
.h-1 { height: 0.25rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-14 { height: 3.5rem; }
.h-64 { height: 16rem; }
.h-72 { height: 18rem; }
.max-h-52vh { max-height: 52vh; }

.size-1\.5 { width: 0.375rem; height: 0.375rem; }
.size-7 { width: 1.75rem; height: 1.75rem; }
.size-9 { width: 2.25rem; height: 2.25rem; }
.size-10 { width: 2.5rem; height: 2.5rem; }
.size-12 { width: 3rem; height: 3rem; }
.size-14 { width: 3.5rem; height: 3.5rem; }
.h-full { height: 100%; }
.size-\[42rem\] { width: 42rem; height: 42rem; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-4\/3 { aspect-ratio: 4 / 3; }

.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-border { border-color: var(--border); }
.border-input { border-color: var(--input); }
.border-transparent { border-color: transparent; }
.border-primary-50 { border-color: color-mix(in oklab, var(--primary) 50%, transparent); }

.divide-y > :not([hidden]) ~ :not([hidden]) { border-top-width: 1px; border-top-style: solid; }
.divide-border > :not([hidden]) ~ :not([hidden]) { border-color: var(--border); }

.bg-background { background-color: var(--background); }
.bg-background-40 { background-color: color-mix(in oklab, var(--background) 40%, transparent); }
.bg-background-80 { background-color: color-mix(in oklab, var(--background) 80%, transparent); }
.bg-background-85 { background-color: color-mix(in oklab, var(--background) 85%, transparent); }
.bg-surface { background-color: var(--surface); }
.bg-surface-raised { background-color: var(--surface-raised); }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--primary); }
.bg-primary-20 { background-color: color-mix(in oklab, var(--primary) 20%, transparent); }
.bg-secondary { background-color: var(--secondary); }
.bg-positive { background-color: var(--positive); }
.bg-positive-soft { background-color: var(--positive-soft); }
.bg-warning { background-color: var(--warning); }
.bg-warning-25 { background-color: color-mix(in oklab, var(--warning) 25%, transparent); }
.bg-warning-soft { background-color: var(--warning-soft); }
.bg-negative { background-color: var(--negative); }
.bg-negative-soft { background-color: var(--negative-soft); }
.bg-border { background-color: var(--border); }
.bg-transparent { background-color: transparent; }
.bg-destructive { background-color: var(--destructive); }

.text-foreground { color: var(--foreground); }
.text-foreground-80 { color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.text-foreground-85 { color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.text-foreground-90 { color: color-mix(in oklab, var(--foreground) 90%, transparent); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-secondary-foreground { color: var(--secondary-foreground); }
.text-destructive-foreground { color: var(--destructive-foreground); }
.text-positive { color: var(--positive); }
.text-warning { color: var(--warning); }
.text-negative { color: var(--negative); }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.line-through { text-decoration: line-through; }
.underline-offset-4 { text-underline-offset: 4px; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-\[0\.625rem\] { font-size: 0.625rem; }
.text-\[0\.6875rem\] { font-size: 0.6875rem; }
.text-\[0\.8125rem\] { font-size: 0.8125rem; }
.text-\[0\.9375rem\] { font-size: 0.9375rem; }
.text-\[2\.5rem\] { font-size: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-\[1\.05\] { line-height: 1.05; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-\[-0\.02em\] { letter-spacing: -0.02em; }
.tracking-\[-0\.03em\] { letter-spacing: -0.03em; }

.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-panel { box-shadow: var(--shadow-panel); }
.shadow-signal { box-shadow: var(--shadow-signal); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-duration: 150ms; }

.cursor-pointer { cursor: pointer; }
button:disabled,
[disabled] {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}
.resize-none { resize: none; }
.outline-none { outline: none; }
.opacity-20 { opacity: 0.2; }
.opacity-70 { opacity: 0.7; }
.scroll-mt-14 { scroll-margin-top: 3.5rem; }

.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.top-\[-14rem\] { top: -14rem; }
.left-1\/2 { left: 50%; }

.blur-3xl { filter: blur(64px); }

.hover-primary-90:hover { background-color: color-mix(in oklab, var(--primary) 90%, black); }
.hover-destructive-90:hover { background-color: color-mix(in oklab, var(--destructive) 90%, black); }
.hover-accent:hover { background-color: var(--accent); color: var(--accent-foreground); }
.hover-secondary-80:hover { background-color: color-mix(in oklab, var(--secondary) 80%, black); }
.hover-text-foreground:hover { color: var(--foreground); }
.hover-text-primary:hover { color: var(--primary); }
.hover-surface-raised:hover { background-color: var(--surface-raised); }
.hover-border-hairline:hover { border-color: var(--hairline); }
.hover-border-primary-40:hover { border-color: color-mix(in oklab, var(--primary) 40%, transparent); }
.hover-opacity-80:hover { opacity: 0.8; }

.placeholder-muted::placeholder { color: var(--muted-foreground); }

.lg-hidden { display: inline-flex; }
.md-hidden { display: block; }
.inline { display: inline; vertical-align: middle; }
svg.inline { display: inline; }
.space-y-3\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.875rem; }
.bg-surface-40 { background-color: color-mix(in oklab, var(--surface) 40%, transparent); }
.hover-surface:hover { background-color: var(--surface); }
.ring-primary { box-shadow: 0 0 0 2px var(--primary); }
.size-3, svg.size-3 { width: 0.75rem; height: 0.75rem; }

table { border-collapse: collapse; }
.w-full { width: 100%; }

.container-q { container-type: inline-size; }

@container (min-width: 62rem) {
  .row-wide { flex-direction: row; align-items: flex-start; }
  .row-figures { width: 26rem; flex-shrink: 0; }
  .row-stock { width: 12rem; flex-shrink: 0; }
  .row-ai { width: 10rem; flex-shrink: 0; }
}

@media (min-width: 640px) {
  .sm\:inline-flex { display: inline-flex; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:w-40 { width: 10rem; }
}

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:inline-flex { display: inline-flex; }
  .md-hidden { display: none; }
  .md\:hidden,
  .md-hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:p-5 { padding: 1.25rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .md\:pb-24 { padding-bottom: 6rem; }
  .md\:pt-24 { padding-top: 6rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-\[1\.75rem\] { font-size: 1.75rem; }
  .md\:max-w-2xl { max-width: 42rem; }
  .md\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(0\,1fr\)\] { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 768px) {
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:border-r { border-right-width: 1px; border-right-style: solid; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
  .lg-hidden { display: none; }
  .lg\:ml-0 { margin-left: 0; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:grid-cols-\[minmax\(0\,1\.6fr\)_21rem\] { grid-template-columns: minmax(0, 1.6fr) 21rem; }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\] { grid-template-columns: minmax(0, 1fr) 20rem; }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\] { grid-template-columns: minmax(0, 1fr) 22rem; }
  .lg\:sticky { position: sticky; }
  .lg\:top-20 { top: 5rem; }
  .lg\:self-start { align-self: flex-start; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:col-span-3 { grid-column: span 3 / span 3; }
}

/* Dialog / sheet / popover / toast */
.dialog-root { position: fixed; inset: 0; z-index: 50; }
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgb(0 0 0 / 0.8);
}
.dialog-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 50;
  width: calc(100% - 2rem);
  max-width: 32rem;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}
.dialog-ask { max-width: 42rem; overflow: hidden; }
.dialog-x {
  position: absolute;
  right: 1rem;
  top: 1rem;
  border: 0;
  background: transparent;
  opacity: 0.7;
  cursor: pointer;
  color: inherit;
}
.dialog-x:hover { opacity: 1; }

.sheet-root { position: fixed; inset: 0; z-index: 50; }
.sheet-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  height: 100%;
  width: 17rem;
  background: var(--surface);
  padding: 1.25rem;
  border-left: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

.popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  width: 22rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  overflow: hidden;
}

.toaster {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  min-width: 16rem;
  max-width: 22rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
  font-size: 0.875rem;
}
.toast-success { border-color: color-mix(in oklab, var(--positive) 35%, var(--border)); }
.toast-out { opacity: 0; transform: translateY(6px); transition: 200ms; }

.chart-wrap { position: relative; width: 100%; }
.chart-svg { width: 100%; height: 100%; display: block; }
.chart-tip {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 12px;
  color: var(--popover-foreground);
  pointer-events: none;
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid transparent;
  background: var(--input);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.switch[aria-checked="true"] { background: var(--primary); }
.switch-thumb {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: var(--background);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2);
  transform: translateX(0);
  transition: transform 150ms;
}
.switch[aria-checked="true"] .switch-thumb { transform: translateX(1rem); }

.map-node { position: absolute; transform: translate(-50%, -50%); background: transparent; border: 0; padding: 0; cursor: pointer; }
.map-node-label { position: absolute; left: 50%; top: 100%; margin-top: 0.375rem; transform: translateX(-50%); white-space: nowrap; font-size: 0.625rem; color: var(--muted-foreground); opacity: 0; transition: opacity 150ms; }
.map-node:hover .map-node-label,
.map-node.is-active .map-node-label { opacity: 1; }
.map-node.is-active .map-node-label { color: var(--foreground); }

.hero-orb {
  position: absolute;
  left: 50%;
  top: -14rem;
  width: 42rem;
  height: 42rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  opacity: 0.2;
  filter: blur(64px);
  background: radial-gradient(circle, var(--primary), transparent 65%);
  pointer-events: none;
}

/* Dashboard chrome — keep these in this file so landing cannot lose its stylesheet */
.placeholder-warn {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed color-mix(in oklab, var(--warning) 50%, var(--border));
  background: color-mix(in oklab, var(--warning) 9%, transparent);
  border-radius: var(--radius);
  color: var(--warning);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.placeholder-warn::before {
  content: "Placeholder";
  flex-shrink: 0;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--warning) 18%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.5625rem;
}

.popover-account {
  width: 14.5rem;
}

.account-link {
  display: block;
  padding: 0.65rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--foreground);
  text-decoration: none;
}

.account-link:hover {
  background: var(--surface-raised);
}

.account-form {
  margin: 0;
  border-top: 1px solid var(--border);
}

.account-form button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.why-panel:not([hidden]) {
  display: grid;
}

.stock-map-frame {
  min-height: 28rem;
}

.stock-map {
  height: 62vh;
  min-height: 28rem;
  width: 100%;
  background: var(--background);
}

.leaflet-container {
  background: var(--background);
  font-family: var(--font-sans);
}

.stock-map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.95);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  box-shadow: none;
}

.leaflet-bar a {
  background: var(--surface);
  color: var(--foreground);
  border-bottom-color: var(--border);
}

.leaflet-bar a:hover {
  background: var(--surface-raised);
}

.min-h-96 { min-height: 24rem; }

.site-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

.site-compare-col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
}

a.site-compare-col:hover {
  border-color: color-mix(in oklab, var(--foreground) 18%, var(--border));
}

a.site-compare-col:hover .site-compare-title {
  color: var(--primary);
}

.site-compare-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-compare-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 800;
}

.site-compare-mark.is-tesco { background: #00539f; }
.site-compare-mark.is-amazon { background: #ff9900; }

.site-compare-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.site-compare-frame img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

.site-compare-frame.is-empty {
  background: var(--surface-raised);
}

.site-compare-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.site-compare-price {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-compare-price .was {
  margin-left: 0.25rem;
  color: var(--muted-foreground);
  font-weight: 500;
  text-decoration: line-through;
}

.dash-thumb {
  position: relative;
}

.dash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-soon {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.site-input {
  height: 2rem;
  min-width: 12rem;
  flex: 1 1 14rem;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  outline: none;
}

.site-input:focus {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 35%, transparent);
}

.site-input.w-full {
  min-width: 0;
}

.site-table-wrap {
  overflow-x: auto;
}

.site-table {
  width: 100%;
  border-collapse: collapse;
}

.site-table th,
.site-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.site-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.site-table tbody tr:last-child td {
  border-bottom: 0;
}

.store-pick {
  position: relative;
}

.store-pick > summary {
  list-style: none;
  cursor: pointer;
}

.store-pick > summary::-webkit-details-marker {
  display: none;
}

.store-pick-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  width: 16rem;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--popover);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

.store-pick-menu a,
.store-pick-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.8125rem;
}

.store-pick-menu a:hover,
.store-pick-menu label:hover {
  background: var(--surface-raised);
}

.store-pick-presets {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.store-pick-presets a {
  flex: 1;
}

.store-pick-presets a.is-active,
.store-pick-menu a.is-active {
  color: var(--primary);
}

.site-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
}

.site-pager-btn {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 500;
}

.site-pager-btn.is-off {
  opacity: 0.4;
  pointer-events: none;
}

.site-range {
  width: 100%;
  accent-color: var(--primary);
}

.price-chart {
  position: relative;
  width: 100%;
  height: 22rem;
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chart-toolbar.is-compact {
  margin-bottom: 0.25rem;
}

.chart-keys,
.chart-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chart-key,
.chart-range {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.75rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
}

.chart-key i {
  display: block;
  width: 0.7rem;
  height: 2px;
  border-radius: 99px;
}

.chart-key.is-off,
.chart-range:not(.is-on) {
  color: var(--muted-foreground);
}

.chart-key.is-off i {
  opacity: 0.28;
}

.chart-key.is-empty {
  opacity: 0.38;
  cursor: not-allowed;
}

.chart-range.is-on {
  background: var(--surface-raised);
  color: var(--foreground);
  border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

.chart-plot {
  width: 100%;
  height: calc(100% - 3.25rem);
}

.keepa-chart .chart-tooltip {
  position: absolute;
  z-index: 10;
  min-width: 11rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--popover);
  color: var(--popover-foreground);
  padding: 0.5rem 0.65rem;
  font-size: 12px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.35);
  pointer-events: none;
  transform: translate(-50%, -8px);
}

.keepa-chart .chart-tooltip[hidden] {
  display: none;
}

.keepa-chart .chart-tooltip dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.85rem;
  margin-top: 0.35rem;
}

.keepa-chart .chart-tooltip dd {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.trip-map.stock-map,
.trip-map {
  height: 18rem;
  min-height: 16rem;
}

.lead-thumb {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  flex-shrink: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
}

.lead-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-thumb.is-lg {
  width: 4.5rem;
  height: 4.5rem;
}

.store-mode {
  max-width: 40rem;
}

.scan-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 9rem;
  padding: 1.25rem;
  border: 1px dashed color-mix(in oklab, var(--primary) 45%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--primary) 8%, var(--surface));
  color: var(--foreground);
  cursor: pointer;
}

.scan-hero span {
  font-size: 0.9375rem;
  font-weight: 600;
}

.scan-hero small {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.scan-pill {
  display: inline-flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface-raised);
  color: var(--foreground-85);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
}

.scan-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
}

.scan-hit-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
}

.scan-result-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.scan-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000;
}

.scan-sheet[hidden] {
  display: none;
}

.scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-overlay-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.25rem;
  pointer-events: none;
}

.scan-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  pointer-events: auto;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}

.scan-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(80vw, 18rem);
  height: 7.5rem;
  transform: translate(-50%, -50%);
  border: 2px solid rgb(255 255 255 / 0.75);
  border-radius: 0.75rem;
  box-shadow: 0 0 0 999px rgb(0 0 0 / 0.35);
}

.scan-hint,
.scan-fallback {
  pointer-events: auto;
  color: #fff;
  text-align: center;
}

.scan-hint {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.scan-fallback {
  width: min(100%, 22rem);
}

.admin-chart-frame {
  height: 12rem;
  width: 100%;
}

.admin-chart {
  display: block;
  width: 100%;
  height: 12rem;
}
