:root {
  --purple: #5b21b6;
  --purple-light: #a78bfa;
  --purple-bg: #f5f3ff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fafafa;
  --green: #16a34a;
  --red: #dc2626;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav .brand { font-weight: 800; font-size: 18px; color: var(--ink); }
.nav .brand span { color: var(--purple); }
.nav-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }

.purple-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple);
  margin-left: 6px;
  box-shadow: 0 0 0 3px var(--purple-bg);
  vertical-align: middle;
}
.owner-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 32px 24px 80px; }
.hero { text-align: center; padding: 56px 24px 40px; }
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 32px; }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 18px; }
.card p.tagline { color: var(--muted); font-size: 14px; margin: 0; flex-grow: 1; }
.card .meta { font-size: 13px; color: var(--muted); }
.price-tag { font-weight: 700; font-size: 16px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.locked { background: #fef3c7; color: #92400e; }
.badge.unlocked { background: #dcfce7; color: #166534; }
.badge.certified { background: var(--purple-bg); color: var(--purple); }

.btn {
  display: inline-block;
  background: var(--purple);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: #4c1d95; text-decoration: none; }
.btn.secondary { background: white; color: var(--purple); border: 1px solid var(--purple); }
.btn.secondary:hover { background: var(--purple-bg); }
.btn.full { width: 100%; }

form.box, .box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 420px;
  margin: 40px auto;
}
form.box input, .box input, form.box select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
form.box label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.error { color: var(--red); font-size: 14px; margin-bottom: 14px; }

.module { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 22px 26px; margin-bottom: 18px; }
.module h3 { margin-top: 0; color: var(--purple); }
.module ul.keypoints { background: var(--purple-bg); border-radius: 8px; padding: 14px 20px; margin-top: 14px; }
.module ul.keypoints li { margin-bottom: 4px; font-size: 14px; }

.lock-screen {
  text-align: center;
  background: white;
  border: 1px dashed var(--purple-light);
  border-radius: 16px;
  padding: 48px 24px;
  margin-top: 24px;
}
.lock-screen .price { font-size: 32px; font-weight: 800; color: var(--purple); margin: 12px 0; }

.q-block { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.q-block .opt { display: block; margin: 6px 0; font-size: 14px; }
.q-block textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; min-height: 70px; font-family: inherit; }

.result-banner { text-align: center; padding: 40px 20px; border-radius: 14px; margin-bottom: 24px; }
.result-banner.pass { background: #dcfce7; }
.result-banner.fail { background: #fee2e2; }
.result-banner .score { font-size: 48px; font-weight: 800; }

table.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
table.admin-table th, table.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
table.admin-table th { background: #f9fafb; }

.small-muted { font-size: 12px; color: var(--muted); }

/* ---- Landing page tabs ---- */
.landing-hero {
  background: linear-gradient(180deg, var(--purple-bg) 0%, #fff 100%);
  text-align: center;
  padding: 64px 24px 32px;
}
.landing-hero h1 { font-size: 38px; margin-bottom: 14px; line-height: 1.2; }
.landing-hero p.sub { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto 28px; }
.landing-hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.landing-hero .btn { padding: 13px 26px; font-size: 15px; }

.stat-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 28px 24px;
  border-bottom: 1px solid var(--border);
  background: white;
}
.stat-row .stat { text-align: center; }
.stat-row .stat .num { font-size: 26px; font-weight: 800; color: var(--purple); }
.stat-row .stat .label { font-size: 12px; color: var(--muted); }

.tab-bar {
  position: sticky;
  top: 61px;
  z-index: 9;
  display: flex;
  justify-content: center;
  gap: 4px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow-x: auto;
}
.tab-btn {
  border: none;
  background: none;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--purple); }
.tab-btn.active { color: var(--purple); border-bottom-color: var(--purple); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.feature-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.feature-card .icon { font-size: 24px; margin-bottom: 8px; }
.feature-card h4 { margin: 0 0 6px; font-size: 15px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--muted); }

.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 28px; counter-reset: step; }
.step-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 22px 18px; position: relative; }
.step-card .step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--purple); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.step-card h4 { margin: 0 0 6px; font-size: 15px; }
.step-card p { margin: 0; font-size: 13px; color: var(--muted); }

.pricing-table-wrap { overflow-x: auto; margin-top: 24px; }
table.pricing-table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; }
table.pricing-table th, table.pricing-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
table.pricing-table th { background: var(--purple-bg); color: var(--purple); }
table.pricing-table tr:last-child td { border-bottom: none; }

.faq-item { background: white; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: all 0.2s ease; font-size: 14px; color: var(--muted); }
.faq-item.open .faq-a { padding: 0 20px 16px; max-height: 400px; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-q .chev { transition: transform 0.2s; color: var(--purple); }

.practice-preview { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-top: 24px; }
.practice-preview .mini-editor { background: #1f2937; color: #d1d5db; font-family: monospace; font-size: 12px; padding: 16px; border-radius: 8px; margin-top: 12px; white-space: pre-wrap; }

/* ---- Wireframe builder ---- */
.wf-wrapper { display: flex; gap: 24px; flex-wrap: wrap; }
.wf-palette { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }
.wf-palette button {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); background: white;
  border-radius: 8px; cursor: pointer; font-size: 13px; text-align: left;
}
.wf-palette button:hover { border-color: var(--purple-light); background: var(--purple-bg); }
.wf-canvas-frame {
  width: 300px; background: #f3f4f6; border-radius: 28px; padding: 14px 10px;
  border: 4px solid #1f2937; flex-shrink: 0;
}
.wf-canvas {
  position: relative; width: 280px; height: 480px; background: white;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
}
.wf-el {
  position: absolute; box-sizing: border-box; cursor: grab; user-select: none;
  display: flex; align-items: center; padding: 0 8px; font-size: 12px;
  border-radius: 4px; touch-action: none;
}
.wf-el:active { cursor: grabbing; }
.wf-el.heading { font-weight: 700; font-size: 15px; background: transparent; color: #111827; }
.wf-el.text { color: #6b7280; background: transparent; }
.wf-el.input { border: 1px solid #d1d5db; background: #fafafa; color: #9ca3af; }
.wf-el.button { background: var(--purple); color: white; font-weight: 600; justify-content: center; }
.wf-el.image { background: #e5e7eb; color: #9ca3af; justify-content: center; font-size: 20px; }
.wf-el.navbar { background: #1f2937; color: white; font-weight: 600; justify-content: center; }
.wf-el .wf-del {
  position: absolute; top: -8px; right: -8px; width: 18px; height: 18px;
  background: #dc2626; color: white; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  line-height: 1;
}
.wf-preview .wf-canvas { pointer-events: none; }
.wf-preview .wf-el .wf-del { display: none; }

