* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 113, 227, 0.28);
  --panel: rgba(255, 255, 255, 0.76);
  --panel-solid: #ffffff;
  --blue: #0071e3;
  --blue-2: #0a84ff;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff3b30;
  --purple: #af52de;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.10);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.07);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(10, 132, 255, 0.18), transparent 28%),
    radial-gradient(circle at 90% 4%, rgba(175, 82, 222, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.7rem, 7vw, 6.6rem); line-height: 0.94; letter-spacing: -0.075em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2.2rem); letter-spacing: -0.04em; margin-bottom: 8px; }
h3 { font-size: 1rem; margin-bottom: 8px; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
textarea { resize: vertical; min-height: 240px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.10); }
button { border: 0; cursor: pointer; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(22px, calc((100vw - 1480px) / 2));
}
.glass-nav {
  background: rgba(245, 245, 247, 0.72);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  backdrop-filter: blur(24px) saturate(1.5);
}
.brand, .nav-links { display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 800; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-grid; place-items: center;
  color: white;
  background: linear-gradient(135deg, #111827, #64748b);
  box-shadow: var(--shadow-soft);
}
.nav-links { gap: 6px; }
.nav-links a {
  color: var(--muted);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.93rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: rgba(255, 255, 255, 0.82); }
.hero, .page-shell { width: min(1480px, calc(100vw - 36px)); margin: 0 auto; }
.product-hero { text-align: center; padding: 76px 0 42px; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.74rem; font-weight: 800; margin-bottom: 10px; }
.hero-copy { max-width: 760px; margin: 0 auto 24px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.52; }
.subtle { color: var(--muted); line-height: 1.55; }
.caption, .micro { color: var(--muted-2); font-size: 0.82rem; line-height: 1.45; }
.max-copy { max-width: 740px; }
.hero-actions, .button-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-actions { justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px;
  padding: 11px 17px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 22px rgba(0, 113, 227, 0.26); }
.button.secondary { color: var(--blue); background: rgba(255,255,255,0.8); border: 1px solid rgba(0,113,227,0.14); }
.device-stage { position: relative; min-height: 390px; display: grid; place-items: center; margin-top: 42px; }
.device-card, .panel, .feature-tile {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.4);
}
.main-preview { width: min(920px, 92vw); border-radius: 42px; padding: 24px; text-align: left; }
.floating-card { animation: floatCard 7s ease-in-out infinite; }
.phone-preview {
  position: absolute; right: clamp(10px, 8vw, 150px); bottom: 0;
  width: 210px; min-height: 290px; border-radius: 36px; padding: 28px 20px; text-align: left;
}
.phone-pill { display: block; width: 64px; height: 6px; border-radius: 999px; background: rgba(0,0,0,0.18); margin: 0 auto 48px; }
.window-dots { display: flex; gap: 8px; margin-bottom: 24px; }
.window-dots span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window-dots span:nth-child(2) { background: #ffbd2e; } .window-dots span:nth-child(3) { background: #28c840; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.preview-grid article, .metric-card {
  border-radius: 24px; padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.55));
  border: 1px solid rgba(0,0,0,0.04);
}
.metric-value { display: block; font-size: clamp(2rem, 4.2vw, 4.4rem); line-height: 1; letter-spacing: -0.07em; font-weight: 900; }
.metric-label { display: block; color: var(--muted); margin-top: 8px; }
.timeline-lines { display: grid; gap: 12px; margin-top: 22px; }
.timeline-lines span { height: 14px; border-radius: 999px; background: linear-gradient(90deg, rgba(0,113,227,0.28), rgba(175,82,222,0.16), rgba(0,0,0,0.05)); }
.timeline-lines span:nth-child(2) { width: 84%; } .timeline-lines span:nth-child(3) { width: 68%; }
.section-shell { width: min(1480px, calc(100vw - 36px)); margin: 0 auto; padding: 52px 0 90px; }
.centered { text-align: center; max-width: 780px; margin: 0 auto 22px; }
.feature-grid { display: grid; gap: 18px; }
.feature-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-tile { border-radius: var(--radius-xl); padding: 28px; min-height: 250px; transition: transform 180ms ease, box-shadow 180ms ease; }
.feature-tile:hover { transform: translateY(-4px); box-shadow: 0 28px 70px rgba(0,0,0,0.13); }
.tile-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 18px; background: rgba(0,113,227,0.10); margin-bottom: 28px; font-size: 1.5rem; }
.page-shell { padding: 34px 0 70px; }
.page-hero { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding: 48px; border-radius: 42px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.55)); border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-soft); }
.compact-hero h1, .inventory-hero h1, .receipt-hero h1 { font-size: clamp(2.3rem, 5vw, 5rem); max-width: 920px; }
.hero-badge { white-space: nowrap; border-radius: 999px; padding: 12px 16px; background: rgba(52,199,89,0.12); color: #15803d; font-weight: 900; }
.metrics-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { min-height: 126px; }
.metric-card strong { display: block; font-size: 2.1rem; letter-spacing: -0.06em; }
.metric-card span { color: var(--muted); font-size: 0.88rem; }
.split-dashboard { display: grid; grid-template-columns: minmax(310px, 380px) minmax(0, 1fr) minmax(300px, 380px); gap: 18px; align-items: start; }
.inventory-layout { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr) minmax(300px, 390px); gap: 18px; align-items: start; }
.receipt-layout { display: grid; grid-template-columns: minmax(320px, 470px) minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
.panel { border-radius: var(--radius-lg); padding: 20px; }
.sticky-panel { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: hidden; }
.detail-panel { min-height: 580px; }
.right-stack, .small-stack, .stack-list { display: grid; gap: 12px; }
.row-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.filter-grid { display: grid; gap: 10px; margin-bottom: 12px; }
.full-span { width: 100%; }
.stack-list { list-style: none; margin: 0; padding: 0; }
.scroll-list { overflow: auto; max-height: calc(100vh - 340px); padding-right: 4px; }
.list-button, .subcard {
  width: 100%; text-align: left; border-radius: 18px; padding: 14px;
  background: rgba(255,255,255,0.72); border: 1px solid rgba(0,0,0,0.05);
}
.list-button { display: block; }
.list-button:hover, .list-button.active { background: white; box-shadow: var(--shadow-soft); }
.row-between { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.pill-row, .tag-cloud, .flag-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.pill, .tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 0.75rem; font-weight: 900; background: rgba(0,0,0,0.06); color: var(--muted); }
.pill.low, .tag.low, .tag.ok { color: #007aff; background: rgba(0,122,255,0.10); }
.pill.medium, .tag.medium { color: #b45309; background: rgba(255,159,10,0.16); }
.pill.high, .tag.high { color: #b91c1c; background: rgba(255,59,48,0.13); }
.pill.stock { color: #15803d; background: rgba(52,199,89,0.13); }
.empty-state { min-height: 360px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.detail-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-list { margin: 0; padding-left: 18px; color: var(--muted); }
.mini-list li { margin-bottom: 8px; }
pre, code { white-space: pre-wrap; word-break: break-word; }
.codebox { background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 14px; max-height: 320px; overflow: auto; }
.schema-table { display: grid; gap: 8px; }
.schema-table details { background: rgba(255,255,255,0.65); border-radius: 16px; padding: 12px; }
.schema-table summary { cursor: pointer; font-weight: 900; }
.receipt-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.confidence-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; margin-top: 8px; }
.confidence-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 1240px) {
  .split-dashboard, .inventory-layout, .receipt-layout { grid-template-columns: 1fr; }
  .sticky-panel { position: static; max-height: none; }
  .scroll-list { max-height: none; }
  .right-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  h1 { letter-spacing: -0.055em; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; overflow: auto; }
  .page-hero { padding: 28px; border-radius: 28px; flex-direction: column; align-items: flex-start; }
  .feature-grid.three, .preview-grid, .detail-grid, .right-stack { grid-template-columns: 1fr; }
  .phone-preview { position: relative; right: auto; width: min(320px, 92vw); }
  .device-stage { gap: 16px; }
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .hero, .page-shell, .section-shell { width: min(100vw - 24px, 1480px); }
  .product-hero { padding-top: 44px; }
  .metrics-strip { grid-template-columns: 1fr; }
}
