:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --card: #ffffff;
  --card-alt: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #475569;
  --brand: #1d4ed8;
  --brand-strong: #1e40af;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --ok: #166534;
  --ok-soft: #f0fdf4;
  --ok-border: #bbf7d0;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  --danger: #991b1b;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-frame: 0 1px 3px rgba(15, 23, 42, 0.05), 0 12px 32px -8px rgba(15, 23, 42, 0.08);
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--brand-strong); }
.nav-links a:not(.btn), .btn, .brand-link { text-decoration: none; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

h1, h2, h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-top: 0;
}
h2 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.22;
  margin-bottom: 8px;
}
h3 {
  font-size: 1.0625rem;
  line-height: 1.32;
  margin-bottom: 6px;
}
.subhead-h2 { font-size: 1.15rem; margin: 0 0 6px; line-height: 1.35; }
.mor-note { margin-top: 8px; font-size: 0.78rem; color: var(--muted); text-align: center; line-height: 1.4; }
.mor-note-left { text-align: left; }
.hidden { display: none !important; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-link:hover { color: var(--ink); }
.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 11px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:not(.btn):hover {
  color: var(--ink);
  background: var(--bg-muted);
}

/* Hero */
.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 44px;
  align-items: center;
}
@media (max-width: 940px) {
  .hero { padding: 40px 0 36px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(1.9rem, 2.55vw, 2.35rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.028em;
  margin: 0 0 16px;
  color: var(--ink);
}

.lead {
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 56ch;
}

.hero-scope-note {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Product Inspection Window & Dropzone */
.product-window {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  min-width: 0;
}
.pw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.pw-dots {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.pw-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.pw-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pw-body {
  padding: 20px;
}
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  padding: 24px 18px;
  text-align: center;
  background: var(--bg-soft);
  transition: border-color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}
.dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.dropzone.drag-active {
  border-color: var(--ok);
  background: var(--ok-soft);
}
.dropzone-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-title {
  font-size: 0.96rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}
.dropzone-sub {
  font-size: 0.8125rem;
  color: var(--muted);
}
.pw-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 500px) {
  .pw-metrics { grid-template-columns: minmax(0, 1fr); }
}
.pw-metric {
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pw-metric-lbl {
  font-size: 0.74rem;
  color: var(--muted);
}
.pw-metric-val {
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pw-status {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.pw-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.pw-footer a { font-weight: 600; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--brand-strong); }

/* Pills — clean sentence case */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-border); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); }
.pill-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.pill-brand { background: var(--brand-soft); color: var(--brand-strong); border: 1px solid var(--brand-border); }

/* Sections & Cards */
.section-block {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.section-block:last-child {
  border-bottom: 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.section-sub {
  color: var(--ink-2);
  font-size: 0.96rem;
  margin: 0;
  max-width: 66ch;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
.card:last-child { margin-bottom: 0; }
.card-alt { background: var(--card-alt); }
.card code, p code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--bg-muted);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

/* Buttons */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.cta-row-left { justify-content: flex-start; margin-top: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #ffffff;
}
.btn-success {
  background: var(--ok);
  border-color: var(--ok);
  color: #ffffff;
}
.btn-success:hover {
  background: #14532d;
  border-color: #14532d;
  color: #ffffff;
}
.btn-secondary {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: #94a3b8;
  color: var(--ink);
}
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: 0.8125rem; }

/* Workspace KPIs & Tables */
.workspace-section {
  padding-top: 36px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
}
.kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.kpi-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 6px 0 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi-value.ok { color: var(--ok); }
.kpi-value.warn { color: var(--warn); }
.kpi-value.brand { color: var(--brand); }
.kpi-sub { font-size: 0.84rem; color: var(--ink-2); margin: 0; }

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.field-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.field-group select,
.field-group input {
  width: 100%;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  background: #ffffff;
}
th, td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
th {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8125rem;
  background: var(--bg-soft);
}
.num { text-align: right; font-variant-numeric: tabular-nums; }

.appeal-box {
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.gate-banner {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Sample & Pricing Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 860px) {
  .grid-2, .pricing-grid { grid-template-columns: minmax(0, 1fr); }
}

.sample-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.price-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.price-card.featured {
  background: #ffffff;
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-xs);
}
.price-tag {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price-tag span { font-size: 0.9rem; font-weight: 500; color: var(--muted); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-panel {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}
.modal-panel hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

/* Footer */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8125rem;
}
footer p { margin: 0 0 10px; }
footer p:last-child { margin-bottom: 0; }
footer a { color: var(--ink-2); font-weight: 500; }

@media (max-width: 720px) {
  .nav-hide-mobile { display: none !important; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 2.05rem; }
  .card { padding: 18px; }
  .cta-row .btn { width: 100%; }
}
