/* ==========================================================================
   Kit AI Gratis (@digitalpreneurid_) — High-Conversion Minimalist Editorial
   8pt Spacing Grid · WCAG AA/AAA Dark & Light Contrast · >=16px Mobile Body
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #0b0b0e;
  --surface: #141418;
  --surface-2: #1c1c22;
  --surface-hover: #1f1f26;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.20);
  --text: #f4f4f6;
  --text-body: #d8d8df;
  --text-muted: #9e9ea9;
  --red: #e50914;
  --red-hover: #ff1e29;
  --red-soft: rgba(229, 9, 20, 0.14);
  --red-text-soft: #ff8e93;
  --red-border: rgba(229, 9, 20, 0.45);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --green-border: rgba(52, 211, 153, 0.34);
  --code-bg: #0e0e12;
  --topbar-bg: rgba(11, 11, 14, 0.88);
  --cta-shadow: 0 8px 24px rgba(229, 9, 20, 0.28);
}

[data-theme="light"] {
  --bg: #f8f8fa;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --surface-hover: #ebebef;
  --border: rgba(17, 17, 20, 0.10);
  --border-strong: rgba(17, 17, 20, 0.24);
  --text: #111114;
  --text-body: #2c2c34;
  --text-muted: #5c5c68;
  --red: #d90813;
  --red-hover: #b8060f;
  --red-soft: rgba(217, 8, 19, 0.09);
  --red-text-soft: #b8060f;
  --red-border: rgba(217, 8, 19, 0.35);
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.10);
  --green-border: rgba(21, 128, 61, 0.30);
  --code-bg: #f4f4f7;
  --topbar-bg: rgba(248, 248, 250, 0.90);
  --cta-shadow: 0 8px 22px rgba(217, 8, 19, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar (Clean, Zero Noise) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.wm-accent {
  color: var(--red);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Main Vertical Rhythm (8pt Grid: 40–56px section gaps) */
.page-main {
  flex: 1;
  padding-top: 32px;
  padding-bottom: 64px;
}

/* High-Conversion Editorial Hero */
.hero {
  margin-bottom: 40px;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 16px;
}

.serif-it {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  position: relative;
  display: inline-block;
  padding-right: 3px;
}

.serif-it::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2.5px;
  border-radius: 99px;
  background: var(--red);
}

.hero-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 540px;
}

.hero-cta-group {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-secondary-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 0;
  transition: color 140ms ease;
}

.hero-secondary-link:hover {
  color: var(--text);
}

/* Primary & Secondary Buttons (Min 48px touch target) */
.btn-primary {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--cta-shadow);
  transition: background 140ms ease, transform 120ms ease, opacity 140ms ease;
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-solid-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 0;
  background: var(--red);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-solid-md:hover {
  background: var(--red-hover);
}

.btn-outline-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}

.btn-outline-md:hover {
  background: var(--surface-hover);
  border-color: var(--text);
}

/* Unlocked Bar */
.unlocked-strip {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 36px;
}

.unlocked-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.micro-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--green);
}

.dot-green {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.unlocked-greet {
  font-size: 15px;
  color: var(--text-body);
  margin-top: 6px;
}

.link-muted {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
  padding: 4px 0;
}

.link-muted:hover {
  color: var(--text);
}

.pdf-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pdf-info strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pdf-info span {
  font-size: 14px;
  color: var(--text-muted);
}

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ig-tip {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* Module Selector (Wrapped Pills — 100% Visible, Zero Cut-off) */
.hub-section {
  scroll-margin-top: 72px;
}

.hub-nav-head {
  margin-bottom: 10px;
}

.section-kicker {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tabs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tab-btn {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 140ms ease;
}

.tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.tab-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.tab-lock-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--red);
  opacity: 0.75;
}

.tab-btn.is-active .tab-lock-dot {
  background: var(--red);
  opacity: 1;
}

/* Section Headers inside Stage (Single-Column Clean Hierarchy) */
.sec-block {
  margin-bottom: 40px;
}

.sec-block:last-child {
  margin-bottom: 0;
}

.sec-header-clean {
  margin-bottom: 18px;
}

.sec-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 6px;
}

.sec-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.55;
}

/* Cards (Generous 20px padding, 14px gap, max 3-4 clean lines) */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.repo-card,
.info-row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 140ms ease;
}

.repo-card:hover,
.info-row-card:hover {
  border-color: var(--border-strong);
}

.card-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text);
}

.price-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

.card-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.card-meta s {
  text-decoration-color: var(--red);
}

.card-body {
  font-size: 15.5px;
  color: var(--text-body);
  line-height: 1.58;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 120ms ease, background 120ms ease;
}

.chip-link:hover {
  border-color: var(--text);
  background: var(--surface-hover);
}

.caveat-line {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
  line-height: 1.55;
}

/* Compact Readable Accordion (48px+ touch target, 15.5px prompt text) */
.acc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 140ms ease;
}

.acc-item.is-open {
  border-color: var(--border-strong);
}

.acc-trigger {
  width: 100%;
  min-height: 60px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.acc-left {
  min-width: 0;
  flex: 1;
}

.acc-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.acc-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: block;
}

.acc-sum {
  font-size: 14.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
  line-height: 1.45;
}

.acc-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 160ms ease;
}

.acc-item.is-open .acc-chevron {
  transform: rotate(180deg);
  color: var(--text);
}

.acc-body {
  padding: 0 20px 20px;
  display: none;
}

.acc-item.is-open .acc-body {
  display: block;
}

/* Readable Prompt Box (Sans 15.5px, soft red tint badges for placeholders) */
.prompt-box {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.ph-token {
  background: var(--red-soft);
  color: var(--red-text-soft);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
}

.acc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.copy-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 140ms ease;
}

.copy-btn:hover {
  border-color: var(--text);
}

.copy-btn.is-copied {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}

.ph-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* Filter Pills (Wrapped & Readable) */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Locked Teaser Card */
.locked-teaser {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}

.locked-teaser-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.locked-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.locked-list li {
  font-size: 15px;
  color: var(--text-body);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.locked-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* Steps & Blacklist */
.step-row {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.step-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  padding-top: 2px;
  flex-shrink: 0;
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-body strong {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.55;
}

.cmd-inline {
  display: inline-block;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
}

.blacklist-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ban-pill {
  font-size: 14px;
  color: var(--text-body);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: line-through;
  text-decoration-color: var(--red);
}

/* High-Conversion Inline Unlock Card */
.unlock-card {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px 20px;
  scroll-margin-top: 72px;
}

.unlock-head {
  margin-bottom: 22px;
}

.unlock-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 8px 0 10px;
}

.unlock-head p {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.claim-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label,
.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.opt-tag {
  font-weight: 400;
  color: var(--text-muted);
}

.req-dot {
  color: var(--red);
}

/* 16px inputs prevent iOS Safari auto-zoom */
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 140ms ease;
}

.field input:focus {
  border-color: var(--text);
}

.field input.is-invalid {
  border-color: var(--red);
}

.phone-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 140ms ease;
}

.phone-wrap:focus-within {
  border-color: var(--text);
}

.phone-prefix {
  padding: 0 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  height: 48px;
  display: inline-flex;
  align-items: center;
}

.phone-wrap input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.seg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 520px) {
  .seg-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.seg-chip {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.seg-chip:hover {
  border-color: var(--text);
}

.seg-chip.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--text);
}

.form-error {
  font-size: 14px;
  color: var(--red-text-soft);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.form-footnote {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* WA Channel Bar */
.wa-bar {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wa-bar-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wa-bar-text span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Post-Unlock Voting Card */
.vote-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.vote-head h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 6px 0 14px;
}

.vote-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.vote-chip {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 120ms ease;
}

.vote-chip.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--text);
  font-weight: 600;
}

.vote-custom-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 520px) {
  .vote-custom-row {
    flex-direction: row;
  }
}

.vote-custom-row input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 15px;
  outline: none;
}

.vote-done {
  font-size: 15px;
  color: var(--green);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

@media (min-width: 520px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .pdf-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .wa-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--text);
}
