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

:root {
  --navy:       #1e1b5e;
  --teal:       #00D4AA;
  --teal-dim:   rgba(0, 212, 170, 0.15);
  --teal-border:rgba(0, 212, 170, 0.3);
  --gray:       #f5f5f7;
  --border:     #e8e8e8;
  --text:       #111111;
  --muted:      #666666;
  --white:      #ffffff;
  --radius:     12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

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

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

ol, ul { padding-left: 20px; }
li { margin-bottom: 6px; }
p + p { margin-top: 12px; }
p + ol, p + ul { margin-top: 10px; }
ol + p { margin-top: 12px; }
code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ── Sticky header (nav + tabs) ──────────────────────────── */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  box-shadow: 0 1px 0 var(--border);
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
}

.nav-logo {
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: -0.2px;
}

/* ── Tab bar ─────────────────────────────────────────────── */
.tabs-wrap {
  background: white;
  padding: 0;
}

.tabs-bar {
  display: flex;
  gap: 0;
}

.tab {
  flex: 1;
  padding: 14px 0;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}

.tab:hover { color: var(--navy); }

.tab.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
}

/* ── Tab panels ──────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: white;
  padding: 60px 0 68px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: 0.2px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#hero-subtitle {
  font-size: 19px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}

.hero-rating {
  font-size: 15px;
  color: var(--teal);
  font-weight: 600;
}

/* ── Sections ────────────────────────────────────────────── */
.section        { padding: 72px 0; }
.section-white  { background: white; }
.section-gray   { background: var(--gray); }
.section-dark   { background: var(--navy); }
.section-teal   { background: var(--teal); }

.section-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text);
}

.section-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ── Grid ────────────────────────────────────────────────── */
.grid   { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ── Resource cards (After tab) ──────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 6px;
  display: inline-block;
}

.card-link:hover { text-decoration: underline; }

/* ── Setup list (Before tab) ─────────────────────────────── */
.setup-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.setup-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.setup-num {
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.setup-content {
  flex: 1;
}

.setup-content strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.setup-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.setup-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
}

.setup-link:hover { text-decoration: underline; }

/* ── Concept cards (Before tab) ──────────────────────────── */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.concept-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.concept-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--teal);
}

.concept-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.concept-tag {
  font-size: 13px;
  color: var(--muted);
}

.concept-body {
  padding: 20px 24px;
  font-size: 14px;
  color: #444;
  line-height: 1.75;
}

.concept-body ol,
.concept-body ul { padding-left: 18px; }

/* ── FAQ accordion ───────────────────────────────────────── */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.faq-width { max-width: 720px; }

.accordion-item {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: background 0.15s;
}

.accordion-header:hover { background: #fafafa; }

.acc-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.acc-arrow {
  font-size: 22px;
  font-weight: 300;
  color: var(--teal);
  flex-shrink: 0;
  line-height: 1;
}

.accordion-body {
  display: none;
  padding: 16px 24px 20px;
  font-size: 14px;
  color: #444;
  line-height: 1.75;
  border-top: 1px solid var(--border);
}

.accordion-body.open { display: block; }

/* ── Build prompt block (During tab) ─────────────────────── */
.prompt-block {
  position: relative;
  background: #1a1a2e;
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 720px;
}

.prompt-text {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 15px;
  color: #e8e8f0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--teal);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.copy-btn:hover { opacity: 0.85; }

/* ── PRD grid (During tab) ───────────────────────────────── */
.prd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 720px;
}

.prd-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.prd-num {
  width: 30px;
  height: 30px;
  background: var(--teal);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.prd-content strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.prd-content span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
}

/* ── Build loop (During tab) ─────────────────────────────── */
.loop-list {
  list-style: none;
  padding: 0;
  counter-reset: loop-counter;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loop-item {
  counter-increment: loop-counter;
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.loop-item::before {
  content: counter(loop-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--teal-dim);
  color: var(--navy);
  border-radius: 50%;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

/* ── Troubleshooting (During tab) ────────────────────────── */
.trouble-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trouble-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.trouble-problem {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.trouble-fix {
  padding: 14px 20px;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

/* ── CTA block ───────────────────────────────────────────── */
.cta-block { text-align: center; }

.cta-block h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.cta-block p {
  font-size: 17px;
  color: rgba(30,27,94,0.7);
  max-width: 480px;
  margin: 0 auto;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 24px 0; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}

.footer-link {
  font-size: 13px;
  color: var(--teal);
}

.footer-link:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .concepts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero h1       { font-size: 30px; letter-spacing: -0.5px; }
  #hero-subtitle { font-size: 16px; }
  .hero          { padding: 44px 0 52px; }
  .section       { padding: 52px 0; }
  .section-title { font-size: 24px; }
  .grid-2        { grid-template-columns: 1fr; }
  .prd-grid      { grid-template-columns: 1fr; }
  .footer-inner  { flex-direction: column; gap: 10px; text-align: center; }
  .prompt-block  { padding: 20px; }
  .prompt-text   { font-size: 13px; }
}
