:root {
  --ink: #0A0E14;
  --surface: #12161F;
  --surface-2: #1A2030;
  --text: #E8ECF1;
  --muted: #8A94A6;
  --heat: #E31C3D;
  --heat-dim: #7A1522;
  --cold: #1C7DE0;
  --cold-dim: #123457;
  --border: #232A3A;
  box-sizing: border-box;
}
* { box-sizing: inherit; }
html, body {
  margin: 0; padding: 0; background: var(--ink); color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.5;
}
.mono { font-family: "IBM Plex Mono", monospace; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.15; margin: 0 0 .5rem; }
p { color: var(--muted); }
a { color: var(--text); }

.site-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.brand { font-family: "Space Grotesk", sans-serif; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(180deg, var(--heat), var(--cold));
  font-weight: 700; font-size: .95rem;
}
.site-nav nav { display: flex; gap: 1.25rem; align-items: center; font-size: .95rem; }
.site-nav nav a { text-decoration: none; color: var(--muted); }
.nav-cta {
  background: var(--surface-2); color: var(--text) !important; padding: .45rem .9rem;
  border-radius: 8px; border: 1px solid var(--border);
}

main { max-width: 720px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* Hero */
.hero {
  position: relative; margin: 0 -1.5rem 2.5rem; padding: 4rem 1.5rem 5rem;
  overflow: hidden; text-align: center;
}
.hero-heat, .hero-cold {
  position: absolute; left: 0; right: 0; z-index: 0;
}
.hero-heat { top: 0; height: 55%; background: linear-gradient(180deg, var(--heat) 0%, var(--heat-dim) 100%); }
.hero-cold { bottom: 0; height: 55%; background: linear-gradient(0deg, var(--cold) 0%, var(--cold-dim) 100%); }
.hero-mark {
  position: relative; z-index: 1; margin: 0 auto 1.5rem; width: 96px; height: 96px;
  border-radius: 20px; background: var(--ink); border: 2px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 { font-size: 2.1rem; color: #fff; }
.hero-sub { color: rgba(255,255,255,.85); max-width: 480px; margin: 0 auto 1.5rem; }

.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.strip-item h3 { font-size: 1rem; }
.strip-item p { font-size: .9rem; }
@media (max-width: 640px) { .strip { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; padding: .75rem 1.4rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem;
  font-family: "IBM Plex Sans", sans-serif;
}
.btn-primary { background: var(--text); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.full { display: block; width: 100%; text-align: center; }
.btn.small { padding: .4rem .8rem; font-size: .85rem; }

.story p { color: var(--text); max-width: 640px; }

.funnel-step { padding-top: 2.5rem; }
.lede { max-width: 520px; }

.choice-row { display: grid; gap: 1rem; margin-top: 1.5rem; }
.choice-card {
  display: block; padding: 1.25rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: var(--text);
}
.choice-card h2 { font-size: 1.15rem; }
.choice-card p { font-size: .9rem; margin: 0; }

.field { display: block; margin-bottom: 1.1rem; }
.field-label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea {
  width: 100%; padding: .7rem .8rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 1rem;
}
textarea { resize: vertical; }

.chip-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.chip-radio {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: .9rem; cursor: pointer;
}
.agree-row { width: 100%; align-items: flex-start; margin: 1rem 0; font-size: .85rem; color: var(--muted); }
.agree-row input { margin-top: .2rem; }
.agree-row a { color: var(--cold); }

.hint { font-size: .9rem; margin-top: .5rem; }
.hint-error { color: var(--heat); }
.hint-good { color: #34C77B; }

.result-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin-top: 1rem; background: var(--surface);
}
.result-good { border-color: #34C77B; }
.ref-code { font-size: 1.3rem; letter-spacing: .05em; }

.video-frame { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin: 1.25rem 0; border: 1px solid var(--border); }

.wait-state { display: flex; align-items: center; gap: .5rem; margin-top: 1.25rem; color: var(--muted); font-size: .9rem; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cold);
  animation: pulse 1.4s infinite ease-in-out;
}
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

.admin-header { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2rem; }
.admin-tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: .75rem; margin-bottom: 1.5rem; font-size: .9rem; }
.admin-tabs a { text-decoration: none; color: var(--muted); }
.admin-tabs a.active { color: var(--text); font-weight: 600; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; text-align: center; }
.stat-num { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .4rem; border-bottom: 1px solid var(--border); }

.badge { padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; border: 1px solid var(--border); }
.badge-awaiting_payment { color: var(--muted); }
.badge-paid { color: var(--cold); border-color: var(--cold); }
.badge-confirmed { color: #E8B93F; border-color: #E8B93F; }
.badge-shipped { color: #34C77B; border-color: #34C77B; }

.empty-state { padding: 1.5rem; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }

.product-form { display: grid; grid-template-columns: 140px 1fr; gap: 1.25rem; margin-bottom: 2rem; }
.photo-drop {
  display: flex; align-items: center; justify-content: center; height: 140px; border: 1px dashed var(--border);
  border-radius: 10px; font-size: .85rem; color: var(--muted); text-align: center; cursor: pointer;
}
@media (max-width: 560px) { .product-form { grid-template-columns: 1fr; } }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: .5rem; }
.product-card h3 { font-size: .95rem; }
.product-card p { font-size: .85rem; margin: 0 0 .3rem; }
.product-inactive { opacity: .5; }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr 1fr; } }

.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.order-head { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.tracking-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.tracking-form input { width: auto; flex: 1; min-width: 140px; }

.checkout-row { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.qty-input { width: 70px; }

.order-items { padding-left: 1.1rem; font-size: .9rem; }

.flash-stack { max-width: 720px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flash { background: var(--heat-dim); border: 1px solid var(--heat); padding: .7rem 1rem; border-radius: 8px; margin-bottom: .6rem; font-size: .9rem; }

.site-footer {
  text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 0; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .4rem;
}
.footer-links a { color: var(--muted); }
.legal h2 { font-size: 1.05rem; margin-top: 1.75rem; }
.legal ul { color: var(--muted); padding-left: 1.2rem; }
.legal li { margin-bottom: .5rem; }

.muted { color: var(--muted); }

.cutoff-banner { background: var(--heat-dim); color: #fff; text-align: center; font-size: .8rem; padding: .5rem 1rem; }
.steps { padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
.steps li { margin-bottom: .5rem; }

.swatch-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 1.5rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .35rem; cursor: pointer; font-size: .75rem; color: var(--muted); }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--swatch-color); border: 2px solid transparent; }
.swatch input:checked + .swatch-dot { border-color: #fff; box-shadow: 0 0 0 2px var(--swatch-color); }
.banner-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin: .5rem 0 1rem; }

.store-banner { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; }
.store-about { color: var(--text); }
.btn-accent { background: var(--accent, var(--heat)); color: #fff; }

/* ---------------------------------------------------------------- owner portal analytics */
.admin-wide { max-width: 980px; margin: 0 auto; padding: 0 1.5rem 4rem; }
main:has(.admin-wide) { max-width: none; padding: 0; }
.stat-row-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 820px) { .stat-row-5 { grid-template-columns: repeat(2, 1fr); } }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 2rem; }
.chart-card svg { display: block; }

.filter-row { display: flex; gap: .6rem; margin: 1rem 0; flex-wrap: wrap; }
select {
  padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .9rem;
}

.pager { display: flex; gap: .4rem; margin: 1rem 0 2rem; flex-wrap: wrap; }
.pager a { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--muted); font-size: .85rem; }
.pager a.active { color: var(--text); border-color: var(--cold); }

/* ---------------------------------------------------------------- customize page: live preview */
.customize-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .customize-layout { grid-template-columns: 1fr; } }

.custom-color-field { margin-top: -.5rem; }
.color-pick-row { display: flex; gap: .6rem; align-items: center; }
.color-pick-row input[type=color] { width: 44px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.color-pick-row input[type=text] { flex: 1; }

.logo-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; margin: .5rem 0 1rem; border: 1px solid var(--border); }

.preview-pane { position: sticky; top: 1.5rem; }
.preview-frame {
  border: 1px solid var(--border); border-radius: var(--pv-radius, 14px); overflow: hidden; background: var(--surface);
  --pv-heading-font: "Space Grotesk", sans-serif; --pv-body-font: "IBM Plex Sans", sans-serif;
}
.pv-banner { height: 90px; background: var(--surface-2) center/cover no-repeat; }
.pv-banner-empty { background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.pv-body { padding: 1rem; }
.pv-title-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.pv-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pv-logo-empty { background: var(--accent); }
.pv-name { font-family: var(--pv-heading-font); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.pv-tagline { font-family: var(--pv-body-font); font-size: .8rem; color: var(--muted); }
.pv-about { font-family: var(--pv-body-font); font-size: .82rem; color: var(--text); margin: .5rem 0; }
.pv-products { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .75rem 0; }
.pv-products-list { grid-template-columns: 1fr; }
.pv-product { border: 1px solid var(--border); border-radius: calc(var(--pv-radius, 14px) * .5); padding: .5rem; }
.pv-products-list .pv-product { display: flex; align-items: center; gap: .6rem; }
.pv-product-img { aspect-ratio: 1; width: 100%; max-width: 60px; background: var(--surface-2); border-radius: 6px; margin-bottom: .3rem; }
.pv-products-list .pv-product-img { margin-bottom: 0; }
.pv-product-name { font-family: var(--pv-body-font); font-size: .75rem; color: var(--text); }
.pv-product-price { font-family: "IBM Plex Mono", monospace; font-size: .75rem; color: var(--muted); }
.pv-btn { background: var(--accent); color: #fff; text-align: center; padding: .6rem; border-radius: calc(var(--pv-radius, 14px) * .4); font-family: var(--pv-body-font); font-size: .85rem; font-weight: 600; }

/* ---------------------------------------------------------------- storefront customization output */
.store-title-row { display: flex; align-items: center; gap: .9rem; margin-bottom: .5rem; }
.store-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.storefront h1, .store-checkout-title { font-family: var(--store-heading-font, "Space Grotesk", sans-serif); }
.store-tagline { color: var(--text); font-size: .95rem; margin: .1rem 0; font-family: var(--store-body-font, inherit); }
.store-socials { font-size: .85rem; display: flex; gap: 1rem; }
.store-socials a { color: var(--cold); }
.storefront, .storefront p, .funnel-step p { font-family: var(--store-body-font, inherit); }
.storefront .store-banner, .storefront .product-card, .btn-accent { border-radius: var(--store-radius, 12px); }
.product-grid-list { grid-template-columns: 1fr; }
.product-grid-list .product-card { display: flex; gap: 1rem; align-items: center; }
.product-grid-list .product-card img { width: 96px; height: 96px; flex-shrink: 0; margin-bottom: 0; }

/* ---------------------------------------------------------------- plans / revenue cap */
.plan-meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .5rem 0 .25rem; }
.plan-meter-fill { height: 100%; background: linear-gradient(90deg, var(--cold), var(--heat)); border-radius: 999px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 1.5rem; }
@media (max-width: 700px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; text-align: center; }
.plan-card-current { border-color: var(--cold); }
.plan-price { font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; margin: .3rem 0; }
.plan-card .btn { margin-top: .75rem; }

.plan-badge-row { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1.5rem; }

/* ---------------------------------------------------------------- plan cards: hot/cold identity */
.badge-comp { color: #B98CFF; border-color: #B98CFF; }

.plan-subhead { margin-top: -.5rem; }

.owner-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: .75rem 0 1.5rem; }
.owner-actions form { margin: 0; }

.plan-card {
  position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.plan-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.plan-card-starter::before { background: var(--cold); }
.plan-card-growth::before { background: linear-gradient(90deg, var(--cold), var(--heat)); }
.plan-card-scale::before { background: var(--heat); }

.plan-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -12px rgba(0,0,0,.5); }
.plan-card-current { box-shadow: 0 0 0 1px var(--cold), 0 12px 28px -14px rgba(28,125,224,.5); }
.plan-card-scale.plan-card-current { box-shadow: 0 0 0 1px var(--heat), 0 12px 28px -14px rgba(227,28,61,.5); }

.plan-card-icon { font-size: 1.6rem; line-height: 1; margin-bottom: .25rem; }

.result-card { transition: border-color .15s ease; }
.result-good { border-color: #34C77B; }
