:root {
  --acid: #d8f238;
  --ink: #11130e;
  --paper: #f5f7f0;
  --surface: #ffffff;
  --muted: #656b60;
  --line: #cdd2c7;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 clamp(24px, 5vw, 76px);
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
}

.brand { font-family: var(--mono); font-size: 30px; font-weight: 900; text-decoration: none; letter-spacing: -0.08em; }
nav { display: flex; gap: clamp(20px, 3vw, 44px); align-items: center; }
nav a { font-size: 15px; font-weight: 700; text-decoration: none; }
nav a:hover, nav a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ── Language Switch ── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.lang-switch button {
  padding: 4px 8px;
  border: none;
  background: transparent;
  font: 600 13px var(--sans);
  cursor: pointer;
  transition: all 120ms;
}

.lang-switch button:hover { color: var(--ink); }
.lang-switch button.lang-active { 
  color: var(--ink); 
  background: var(--acid);
  border-radius: 3px;
}
.lang-switch span { color: var(--muted); font-size: 12px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
  min-height: 620px;
  padding: 86px clamp(24px, 5vw, 76px);
  border-bottom: 2px solid var(--ink);
  background: var(--acid);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 30px; font-size: clamp(48px, 6vw, 82px); line-height: 1.08; letter-spacing: -0.055em; }
.hero-copy > p { margin-bottom: 38px; font-size: clamp(18px, 2vw, 23px); line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: 22px; }
.button { 
  display: inline-flex; 
  min-height: 58px; 
  align-items: center; 
  padding: 0 26px; 
  border: 2px solid var(--ink); 
  box-shadow: 6px 6px 0 var(--ink); 
  font-weight: 800; 
  text-decoration: none; 
  transition: transform 140ms ease, box-shadow 140ms ease; 
}
.button:hover, .button:focus-visible { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.button-dark { color: white; background: var(--ink); box-shadow: 6px 6px 0 #65711f; }
.button-light { background: white; }

.terminal { border: 2px solid white; outline: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); color: white; background: var(--ink); }
.terminal-bar { display: flex; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid #777b72; font-family: var(--mono); font-size: 13px; }
.terminal pre { min-height: 240px; margin: 0; padding: 30px 24px; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.8 var(--mono); }
.terminal code span { color: var(--acid); }

.section { padding: 90px clamp(24px, 5vw, 76px); border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 60px; font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.045em; }
.workflow-track { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: clamp(20px, 3vw, 46px); align-items: center; }
.workflow article { min-width: 0; }
.step { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 28px; border: 2px solid var(--ink); background: var(--acid); font: 800 18px var(--mono); }
.workflow h3 { margin-bottom: 12px; font-size: 24px; }
.workflow code, .workflow p { color: var(--muted); font: 14px/1.55 var(--mono); overflow-wrap: anywhere; }
.connector { font-size: 48px; font-weight: 300; }

/* ── Features / Use Cases ── */
.features { background: var(--surface); }
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}
.feature-card {
  position: relative;
  padding: 32px 28px;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
}
.feature-num {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 2px solid var(--ink);
  background: var(--acid);
  font: 800 15px var(--mono);
}
.feature-card h3 { margin-bottom: 8px; font-size: 22px; letter-spacing: -0.02em; }
.feature-card code {
  display: inline-block;
  margin-bottom: 14px;
  font: 12px var(--mono);
  color: var(--muted);
}
.feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.use-cases { border-top: 2px solid var(--ink); padding-top: 48px; }
.use-cases h3 { margin-bottom: 24px; font-size: 26px; letter-spacing: -0.02em; }
.use-case-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.use-case-list li {
  position: relative;
  padding: 18px 20px 18px 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.use-case-list li::before {
  content: '→';
  position: absolute;
  left: 18px;
  top: 18px;
  color: var(--ink);
  font-weight: 700;
}
.workflow .workflow-desc {
  font: 14px/1.6 var(--sans);
  color: var(--muted);
}

/* ── Links ── */
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #65711f; }

/* ── User Type Selection ── */
.user-type-section { background: linear-gradient(135deg, var(--paper) 0%, #eef5d8 100%); }

.user-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.user-type-card {
  padding: 40px 32px;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 200ms, box-shadow 200ms;
}

.user-type-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0 var(--ink);
}

.user-type-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.user-type-card h3 {
  font-size: 24px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.user-type-card > p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.user-type-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
}

.user-type-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.user-type-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--acid);
  background: var(--ink);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.select-user-btn {
  width: 100%;
  justify-content: center;
}

/* ── Install Section ── */
.install { background: var(--surface); }
.section-lede { max-width: 680px; margin-bottom: 56px; font-size: 18px; line-height: 1.7; color: var(--muted); }

.install-step { margin-bottom: 52px; }
.install-step h3 { margin-bottom: 16px; font-size: 24px; letter-spacing: -0.02em; }
.step-hint { margin-bottom: 20px; font-size: 14px; color: var(--muted); }

/* ── Code Row (reusable) ── */
.code-row { 
  position: relative; 
  display: flex; 
  align-items: stretch; 
  border: 2px solid var(--ink); 
  box-shadow: 7px 7px 0 var(--ink); 
  color: white; 
  background: #151812; 
}
.code-row pre { flex: 1; margin: 0; padding: 24px; overflow-x: auto; font: 14px/1.65 var(--mono); }
.code-row button { 
  align-self: center; 
  min-width: 76px; 
  min-height: 42px; 
  margin: 14px; 
  border: 1px solid white; 
  color: white; 
  background: transparent; 
  font: 700 14px var(--sans); 
  cursor: pointer; 
  transition: background 120ms, color 120ms; 
}
.code-row button:hover, .code-row button:focus-visible { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.code-row-tall pre { min-height: 140px; }
.code-row-small { box-shadow: 4px 4px 0 var(--ink); }
.code-row-small pre { font-size: 12px; padding: 16px; min-height: 100px; }
.code-row-small button { min-width: 70px; min-height: 34px; margin: 10px; font-size: 12px; }

/* ── Platform Tabs ── */
.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.platform-tabs button {
  padding: 10px 22px;
  border: 2px solid var(--line);
  background: var(--surface);
  font: 700 14px var(--sans);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
}
.platform-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.platform-tabs button[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--acid);
  color: var(--ink);
}

/* ── Skill Cards ── */
.skill-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 32px;
}

.skill-card {
  border: 2px solid var(--ink);
  background: var(--surface);
  overflow: hidden;
}

.skill-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.skill-card-header h4 {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: -0.02em;
}
.skill-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  font: 11px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
}

.skill-card-desc {
  padding: 14px 24px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── File Tree ── */
.file-tree {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
}
.file-tree .tree-dir  { color: var(--ink); font-weight: 700; }
.file-tree .tree-file { color: var(--muted); }
.file-tree .tree-branch { color: var(--line); }

/* ── Skill Copy Command ── */
.skill-cmd {
  padding: 0 24px 20px;
}
.skill-cmd-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.skill-cmd .code-row {
  box-shadow: 4px 4px 0 var(--ink);
}
.skill-cmd .code-row pre {
  font-size: 12px;
  padding: 16px;
}
.skill-cmd .code-row button {
  min-width: 60px;
  min-height: 34px;
  margin: 8px;
  font-size: 12px;
}

/* ── MCP Services Grid ── */
.mcp-note {
  padding: 16px 20px;
  margin-bottom: 24px;
  border-left: 4px solid var(--acid);
  background: #f9fceb;
  font-size: 14px;
  line-height: 1.6;
}

.mcp-note code {
  background: rgba(17, 19, 14, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 13px;
}

.mcp-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.mcp-service-card {
  padding: 24px;
  border: 2px solid var(--line);
  background: var(--paper);
}

.mcp-service-card h4 {
  margin: 0 0 8px 0;
  font-family: var(--mono);
  font-size: 15px;
}

.mcp-service-desc {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: var(--muted);
}

.api-key-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border: 1px dashed var(--line);
  background: #fafaf8;
  font-size: 14px;
  color: var(--muted);
}

.api-key-note .button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border: 2px solid var(--ink);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

/* ── Download Box (Non-Developer) ── */
.download-box {
  text-align: center;
  padding: 40px;
  border: 2px dashed var(--ink);
  background: linear-gradient(135deg, var(--acid) 0%, #c8e42f 100%);
}

.download-btn {
  font-size: 18px;
  padding: 20px 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.download-arrow {
  font-size: 24px;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.download-hint {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* ── Extract Steps ── */
.extract-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.extract-step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.extract-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--acid);
  font: 700 14px var(--mono);
}

.extract-step-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.extract-step-item code {
  background: rgba(17, 19, 14, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Agent Paths ── */
.agent-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.agent-path-card {
  padding: 20px;
  border: 2px solid var(--line);
  background: var(--paper);
  text-align: center;
}

.agent-path-card h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.agent-path-card code {
  display: block;
  font: 13px var(--mono);
  color: var(--muted);
  word-break: break-all;
}

/* ── Visual Guide ── */
.visual-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}

.guide-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  max-width: 140px;
}

.guide-icon {
  font-size: 32px;
}

.guide-step p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.guide-arrow {
  font-size: 24px;
  color: var(--muted);
}

/* ── Folder Help (Non-Dev, collapsible) ── */
.folder-help {
  margin: 0 0 28px 0;
  border: 2px solid var(--line);
  background: #fafaf8;
}

.folder-help summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
}

.folder-help summary::-webkit-details-marker { display: none; }

.folder-help summary::before { content: "＋ "; }

.folder-help[open] summary::before { content: "－ "; }

.folder-help .extract-steps {
  padding: 0 20px 20px;
}

/* ── Step Done Note (Non-Dev) ── */
.step-done {
  margin: 16px 0 0 0;
  padding: 14px 20px;
  border-left: 4px solid var(--acid);
  background: #f9fceb;
  font-size: 14px;
  line-height: 1.6;
}

/* ── MCP Simple Config (Non-Dev) ── */
.mcp-simple-config {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
}

.mcp-simple-config > p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--muted);
}

.mcp-simple-config .extract-steps {
  margin-bottom: 20px;
}

.mcp-simple-config .api-key-note {
  margin-bottom: 12px;
}

.mcp-simple-config > .button {
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
}

.mcp-key-hint {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── Back to Selection ── */
.back-to-selection {
  text-align: center;
  padding: 32px;
  background: var(--paper);
}

.text-btn {
  padding: 12px 24px;
  border: none;
  background: transparent;
  font: 600 15px var(--sans);
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms;
}

.text-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Footer ── */
footer { display: flex; justify-content: space-between; gap: 20px; padding: 42px clamp(24px, 5vw, 76px); color: white; background: var(--ink); }
footer span { color: #b6bcaf; }
footer a.link { color: var(--acid); }
footer a.link:hover { color: white; }

/* ── Responsive ── */
@media (max-width: 800px) {
  .site-header { min-height: 68px; flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  nav { gap: 16px; }
  nav a { font-size: 13px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 64px; }
  .terminal pre { min-height: 160px; }
  .workflow-track { grid-template-columns: 1fr; }
  .connector { transform: rotate(90deg); justify-self: start; font-size: 34px; }
  .code-row { display: block; }
  .code-row button { margin-top: 0; }
  .skill-cards { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
  
  /* User type cards responsive */
  .user-type-cards { grid-template-columns: 1fr; }
  
  /* MCP services responsive */
  .mcp-services-grid { grid-template-columns: 1fr; }
  
  /* Visual guide responsive */
  .visual-guide { flex-direction: column; }
  .guide-arrow { transform: rotate(90deg); }
  
  /* Agent paths responsive */
  .agent-paths { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .brand { font-size: 24px; }
  nav a:nth-child(n+3) { display: none; }
  h1 { font-size: 44px; }
  .actions { display: grid; }
  .button { justify-content: center; }
  .platform-tabs { gap: 4px; }
  .platform-tabs button { padding: 8px 14px; font-size: 13px; }
  
  /* Download button responsive */
  .download-btn { 
    width: 100%; 
    justify-content: center; 
    font-size: 16px;
    padding: 16px 24px;
  }
  
  /* Agent paths mobile */
  .agent-paths { grid-template-columns: 1fr; }
  
  /* User type card mobile */
  .user-type-card { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .download-arrow { animation: none; }
}
