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

:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --bg: #0a0a0f;
  --surface: #111118;
  --border: #1e1e2e;
  --accent: #f5a623;
  --accent2: #7c4dff;
  --text: #e2e2e8;
  --muted: #52525e;
  --green: #00d68f;
  --red: #ff4d6d;
  --code-bg: #08080d;
  --code-text: #00d68f;
  --step-hover: #2e2e42;
  --method-bg: rgba(255,255,255,0.05);
}

[data-theme="light"] {
  --bg:       #f5f4f0;
  --surface:  #eceae5;
  --border:   #d5d2cc;
  --text:     #111110;
  --muted:    #888680;
  --accent:   #b86800;
  --accent2:  #4a28c4;
  --green:    #007a45;
  --red:      #c03050;
  --code-bg:    #1e1e28;
  --code-text:  #00c97a;
  --step-hover: #c2bfb9;
  --method-bg:  rgba(0,0,0,0.04);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* GRID BG */

.container { max-width: 860px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.logo span { color: var(--muted); }
.powered {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.powered a { color: var(--accent2); text-decoration: none; }
.powered a:hover { color: var(--accent); }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 15px; height: 15px; stroke-width: 1.5; }

/* HERO */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  font-weight: 300;
  color: var(--accent);
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.6;
  font-weight: 400;
}
.stat-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.stat {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* TOOLTIP */
.tip {
  color: var(--text);
  border-bottom: 1px dotted var(--muted);
  cursor: help;
  position: relative;
  white-space: nowrap;
}
.tip-icon {
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
  font-style: normal;
  margin-left: 3px;
  vertical-align: middle;
}
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 10px;
  width: 280px;
  white-space: normal;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
}
.tip:hover::after,
.tip:hover::before { opacity: 1; }

/* SWARM INTRO */
.swarm-intro {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 48px;
}
.swarm-intro-icon {
  flex-shrink: 0;
  color: var(--accent2);
  padding-top: 2px;
}
.swarm-intro-icon svg { width: 18px; height: 18px; stroke-width: 1.5; }
.swarm-intro-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.swarm-intro-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.swarm-intro-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
  text-decoration: none;
}
.swarm-intro-link:hover { text-decoration: underline; }

/* SWARM INLINE TOGGLE */
.swarm-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  vertical-align: baseline;
}
.swarm-toggle:hover { color: var(--text); }
.swarm-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  max-width: 640px;
  margin: 0 auto;
}
.swarm-accordion.open { max-height: 200px; }
.swarm-accordion-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  text-align: left;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.swarm-accordion-inner a {
  color: var(--accent2);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  display: block;
  margin-top: 10px;
}
.swarm-accordion-inner a:hover { text-decoration: underline; }

/* SKILL PICKER */
.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 20px;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 56px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 12px;
}
.skill-card[data-level="beginner"]::after { background: radial-gradient(circle at 50% 0%, rgba(0,214,143,0.12), transparent 70%); }
.skill-card[data-level="intermediate"]::after { background: radial-gradient(circle at 50% 0%, rgba(245,166,35,0.12), transparent 70%); }
.skill-card[data-level="advanced"]::after { background: radial-gradient(circle at 50% 0%, rgba(124,77,255,0.12), transparent 70%); }

.skill-card:hover, .skill-card.active {
  border-color: transparent;
  transform: translateY(-2px);
}
.skill-card[data-level="beginner"]:hover,
.skill-card[data-level="beginner"].active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 8px 32px rgba(0,214,143,0.15); }
.skill-card[data-level="intermediate"]:hover,
.skill-card[data-level="intermediate"].active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(245,166,35,0.15); }
.skill-card[data-level="advanced"]:hover,
.skill-card[data-level="advanced"].active { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2), 0 8px 32px rgba(124,77,255,0.15); }

.skill-card:hover::after, .skill-card.active::after { opacity: 1; }

.skill-icon { display: flex; justify-content: center; margin-bottom: 14px; }
.skill-icon svg { width: 30px; height: 30px; stroke-width: 1.5; stroke: var(--muted); color: var(--muted); }
.skill-card[data-level="beginner"] .skill-icon svg { stroke: var(--green); color: var(--green); }
.skill-card[data-level="intermediate"] .skill-icon svg { stroke: var(--accent); color: var(--accent); }
.skill-card[data-level="advanced"] .skill-icon svg { stroke: var(--accent2); color: var(--accent2); }
.skill-method {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: var(--method-bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.skill-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.skill-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  font-family: var(--font-body);
}

/* STAMP CALCULATOR */
.stamp-calc {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calc-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.calc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.calc-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 5px 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.calc-btn:hover {
  border-color: var(--accent2);
  color: var(--text);
}
.calc-btn.active {
  border-color: var(--accent2);
  background: rgba(124,77,255,0.1);
  color: var(--text);
}

/* COMPARISON TABLE */
.compare-wrap {
  margin-bottom: 56px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.compare {
  width: 100%;
  border-collapse: collapse;
}
.compare thead tr {
  border-bottom: 1px solid var(--border);
}
.compare th {
  padding: 12px 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.compare th:first-child { text-align: left; }
.compare th.col-easy { color: var(--green); }
.compare th.col-mid { color: var(--accent); }
.compare th.col-adv { color: var(--accent2); }
.compare td {
  padding: 11px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.compare td:first-child {
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}
.compare tbody tr:hover { background: var(--surface); }
.compare .cyes { color: var(--green); font-size: 15px; }
.compare .cno { opacity: 0.3; font-size: 15px; }
.compare .ctext { font-size: 12px; color: var(--accent); }

/* STEPS SECTION */
.steps-section {
  display: none;
  animation: fadeInUp 0.4s ease forwards;
}
.steps-section.visible { display: block; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.tool-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-header h2 svg { width: 20px; height: 20px; stroke-width: 1.5; flex-shrink: 0; }
.tool-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.badge-green { color: var(--green); border-color: var(--green); background: rgba(0,214,143,0.08); }
.badge-orange { color: var(--accent); border-color: var(--accent); background: rgba(245,166,35,0.08); }
.badge-purple { color: var(--accent2); border-color: var(--accent2); background: rgba(124,77,255,0.08); }

/* STEP CARD */
.step {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.step:hover { border-color: var(--step-hover); }
.step-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  min-width: 24px;
  padding-top: 2px;
}
.step-content { flex: 1; min-width: 0; }
.step-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.step-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}
.step-desc a { color: var(--accent); text-decoration: none; }
.step-desc a:hover { text-decoration: underline; }
.step-code {
  margin-top: 10px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 38px 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--code-text);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  position: relative;
}
.copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--text); }
.copy-btn svg { width: 13px; height: 13px; stroke-width: 1.5; }
.step-code span { color: var(--muted); user-select: none; }

/* STEP LIST (bullet-style) */
.step-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step-list li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.step-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  top: 2px;
}
.step-list li code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}
.step-action {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.step-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* STEP NOTE */
.step-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(245,166,35,0.06);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* TIME BADGE */
.time-estimate {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.time-estimate svg { width: 14px; height: 14px; stroke-width: 1.5; flex-shrink: 0; }
.time-hl { color: var(--accent); font-weight: 500; }

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* FOOTER NOTE */
.footer-note {
  text-align: center;
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}
.footer-note .footer-everyone { color: var(--text); }
.footer-note a { color: var(--muted); text-decoration: none; }
.footer-note a:hover { color: var(--text); }

@media (max-width: 640px) {
  /* prevent page from expanding beyond viewport */
  .container { overflow-x: hidden; max-width: 100vw; }

  /* skill grid */
  .skill-grid { grid-template-columns: 1fr; }

  /* hero */
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 38px; }
  .stat-row { gap: 16px; }

  /* steps */
  .step { padding: 14px 16px; gap: 12px; }
  .step-title { font-size: 15px; }
  .step-desc { font-size: 14px; }
  .tool-header h2 { font-size: 18px; }
  .time-estimate { flex-wrap: wrap; }

  /* code blocks */
  .step-code { padding: 8px 36px 8px 10px; }
}
