/* smpl site — the LEMON house language in its audio rendition:
   dark base, bright chartreuse highlights, readable long-form type.
   Input/dry material renders chartreuse; output/wet renders amber. */

:root {
  --bg: #0f120c;
  --panel: #151a11;
  --panel-2: #10140d;
  --border: #2b3324;
  --ink: #dde1d4;
  --dim: #a2a894;
  --accent: #cfe36a;
  --accent-ink: #c6d97a;
  --accent-soft: rgba(207, 227, 106, 0.08);
  --amber: #f0b132;
  --amber-soft: rgba(240, 177, 50, 0.09);
  --chip-ink: #191d12;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { background: var(--bg); scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber) 60%, transparent 92%);
}

::selection { background: var(--accent); color: var(--chip-ink); }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 1.4rem; }

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(207, 227, 106, 0.4);
}
a:hover { text-decoration-color: var(--accent); }

strong { color: #eef1e6; }
em { color: var(--ink); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  color: #d9dec9;
}

pre {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
  color: #ccd3bc;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }

/* terminal token colors */
pre .c  { color: var(--dim); }              /* the $ prompt */
pre .p  { color: var(--amber); }            /* pipes */
pre .f  { color: #9fc6e8; }                 /* flags */
pre .s  { color: #e8c890; }                 /* strings */
pre .o  { color: var(--dim); font-style: italic; }  /* comments */
pre .k  { color: var(--accent-ink); }       /* json keys / emphasis */
pre .bs { color: var(--dim); }              /* line continuations */

/* ---------------------------------------------------------------- header -- */

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.2rem;
  font-family: var(--mono);
  font-size: 13.5px;
}
.brand { color: var(--ink); text-decoration: none; letter-spacing: 0.02em; }
.brand b { color: var(--accent); font-weight: 700; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.site-nav a { color: var(--dim); text-decoration: none; }
.site-nav a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------------ hero -- */

.hero { padding: 3.2rem 0 0.4rem; }

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #eef1e6;
}
.hero h1 .cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.98em;
  margin-left: 0.12em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .cursor { animation: none; } }

.hero .tag {
  font-size: 1.3rem;
  margin-top: 0.7rem;
  color: #eef1e6;
  max-width: 40ch;
  line-height: 1.45;
}
.hero .sub {
  color: var(--dim);
  max-width: 62ch;
  margin-top: 0.8rem;
}
.hero pre { margin-top: 1.5rem; }

.cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.btn {
  font-family: var(--mono);
  font-size: 13.5px;
  text-decoration: none;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--chip-ink);
}
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--accent-ink); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent-ink); filter: none; }

.house {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
}
.house a { color: var(--accent-ink); }

.hero-wf {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 0.5rem 0.6rem 0.2rem;
}
.hero-wf img { width: 100%; height: 88px; display: block; }
.hero-wf figcaption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  padding: 0.3rem 0.2rem 0.4rem;
}

/* ---------------------------------------------------------- quick start --- */

section.quickstart {
  margin-top: 2.4rem;
  padding: 1.3rem 1.35rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.quickstart h2 { margin-bottom: 0.45rem; }
.quickstart .lead { color: var(--dim); margin-bottom: 0; }
.start-step { padding-top: 1.15rem; }
.start-step + .start-step {
  margin-top: 1.1rem;
  border-top: 1px solid var(--border);
}
.start-step > p { max-width: 76ch; }
.start-label {
  font-family: var(--mono);
  font-weight: 700;
  color: #eef1e6;
  margin-bottom: 0.35rem;
}
.start-label span {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--chip-ink);
  font-size: 0.78rem;
}
.start-step .copy-wrap { margin-top: 0.65rem; }
.expected {
  margin-top: 1.2rem;
  padding: 0.9rem 1rem 0.95rem;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
}
.expected p { max-width: 76ch; }
.expected pre { margin: 0.65rem 0; background: var(--bg); }
.expected .chip { margin-bottom: 0.35rem; }

/* -------------------------------------------------------------- sections -- */

section { padding: 2.6rem 0 0.6rem; }

h2 {
  font-family: var(--mono);
  font-size: 1.32rem;
  font-weight: 700;
  color: #eef1e6;
  margin-bottom: 0.9rem;
}
h2::before { content: '// '; color: var(--accent); }

h3 {
  font-family: var(--mono);
  font-size: 1.02rem;
  color: #eef1e6;
  margin: 1.4rem 0 0.5rem;
}

section > p, section li { max-width: 70ch; }
section > p { margin-bottom: 0.8rem; }
section > p.dim, p.dim { color: var(--dim); }

.lead { font-size: 1.05rem; }

/* three plain-words cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 0.4rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.05rem 1.05rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 0.98rem; }
.card p { font-size: 0.92rem; color: var(--dim); line-height: 1.55; }
.card p code { font-size: 0.85em; }

/* how-to-read-a-pipe explainer */
.pipe-key {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  padding: 0.85rem 1.05rem;
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
  max-width: none;
}
.pipe-key p { max-width: 76ch; color: var(--ink); margin: 0 0 0.3rem; }
.pipe-key p:last-child { margin-bottom: 0; }
.pipe-key .glyph {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--amber);
  padding: 0 0.15em;
}

/* ------------------------------------------------------- before / after --- */

.demo {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 1.15rem 1.2rem 1.2rem;
  margin: 1.3rem 0;
}
.demo > pre { margin: 0.15rem 0 0.55rem; background: var(--bg); }
.demo-title {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: #eef1e6;
  margin-bottom: 0.2rem;
}
.plain {
  color: var(--dim);
  font-size: 0.95rem;
  max-width: 74ch;
  margin-bottom: 0.75rem;
}
.translate {
  font-size: 0.9rem;
  color: var(--dim);
  max-width: 76ch;
  margin: 0 0 1rem;
}
.translate b {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.92em;
  font-weight: 600;
}
.demo-note { color: var(--dim); font-size: 0.93rem; max-width: 74ch; margin-top: 0.85rem; }
.demo-note strong { color: var(--ink); }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pane { min-width: 0; }
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-bottom: 0.45rem;
  background: var(--accent);
  color: var(--chip-ink);
}
.chip.out { background: var(--amber); }
.pane .wf {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 0.35rem 0.4rem;
}
.pane .wf img { width: 100%; height: 92px; display: block; }
.pane audio {
  width: 100%;
  height: 34px;
  margin-top: 0.55rem;
  accent-color: var(--accent);
}
.nums {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 0.5rem;
  line-height: 1.75;
}
.nums b { color: var(--ink); font-weight: 600; }
.nums .hot { color: var(--amber); font-weight: 700; }
.nums .cool { color: var(--accent-ink); font-weight: 700; }

/* spectrogram readouts (real tool output, so they keep their own colors) */
.readout { margin-top: 0.2rem; }
.readout img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.readout figcaption, .wf-cap {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  margin-top: 0.35rem;
}

.receipt {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  border-left: 2px solid var(--border);
  padding-left: 0.8rem;
  margin: 1.2rem 0 0.4rem;
  max-width: 76ch;
}
.receipt a { color: var(--accent-ink); }

/* -------------------------------------------------------------- anatomy ---- */

.anatomy {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.55rem;
  align-items: stretch;
  margin: 1.3rem 0 1rem;
}
.anatomy .stage {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.9rem 0.85rem;
  min-width: 0;
}
.anatomy .stage code {
  display: block;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
}
.anatomy .stage p {
  color: var(--dim);
  font-size: 0.84rem;
  line-height: 1.5;
  max-width: none;
  margin: 0;
}
.anatomy .link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  max-width: 7.5rem;
  text-align: center;
}
.anatomy .glyph::before { content: '\2192'; }
.anatomy .glyph {
  color: var(--amber);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}
.anatomy .carry {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--amber);
  opacity: 0.85;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .anatomy { grid-template-columns: 1fr; }
  .anatomy .glyph::before { content: '\2193'; }
  .anatomy .link {
    flex-direction: row;
    max-width: none;
    justify-content: flex-start;
    padding-left: 0.9rem;
    gap: 0.6rem;
  }
}

/* --------------------------------------------------------------- chains ---- */

.chain { margin: 1.4rem 0; }
.chain h3 { margin-top: 0; }
.chain p { color: var(--dim); font-size: 0.95rem; max-width: 72ch; margin-top: 0.55rem; }

/* ---------------------------------------------------------------- tools ---- */

.tool-group { margin-top: 1.5rem; }
.tool-group h3 { margin-top: 0; }
.tool-group h3 span { color: var(--dim); font-weight: 400; font-size: 0.85em; }
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.1rem;
  margin-top: 0.6rem;
}
.tools > div {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.1rem 0.45rem;
  font-size: 0.9rem;
}
.tools code { white-space: nowrap; background: var(--panel); }
.tools span { color: var(--dim); line-height: 1.45; }

/* ---------------------------------------------------------------- agents --- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 0.6rem; }
.split h3 { margin-top: 0.4rem; }
.split p { color: var(--dim); font-size: 0.95rem; }
.report-excerpt { max-height: 30rem; overflow-y: auto; }

.skill-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.9rem; }
.skill-cards .card p { margin-top: 0.2rem; }
.skill-cards .card .chip { margin-bottom: 0.55rem; }

/* --------------------------------------------------------------- install --- */

.copy-wrap { position: relative; }
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--panel);
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
}
.copy-btn:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.copy-btn.done { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- footer --- */

footer {
  margin-top: 3.2rem;
  border-top: 1px solid var(--border);
  padding: 1.6rem 0 2.6rem;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
}
footer p { max-width: none; margin-bottom: 0.4rem; }
footer a { color: var(--accent-ink); }

/* ------------------------------------------------------------- responsive -- */

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .cards, .pair, .tools, .split, .skill-cards { grid-template-columns: 1fr; }
  .site-head { flex-direction: column; gap: 0.4rem; }
  .hero { padding-top: 2.2rem; }
  .hero-wf img { height: 64px; }
  .pane .wf img { height: 76px; }
}
