/* BASIL website — plain CSS, no build step */
:root {
  --green: #2f6b3a;
  --green-dark: #1f4a27;
  --green-light: #e8f1e9;
  --ink: #1d2320;
  --muted: #5b6560;
  --line: #d9e0db;
  --bg: #fbfcfa;
  --code-bg: #f2f5f2;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.site-header .inner {
  max-width: 1080px; margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.brand span { font-family: var(--serif); font-size: 1.35rem; letter-spacing: 0.06em; font-weight: bold; }
.site-nav a {
  margin-left: 1.1rem; text-decoration: none; color: var(--muted); font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a.active { color: var(--green); }

/* Layout */
main { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem 4rem; }
.narrow { max-width: 780px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.3rem; margin: 2.5rem 0 0.5rem; }
h2 { font-size: 1.55rem; margin: 2.8rem 0 0.8rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }

/* Hero */
.hero { padding: 3.5rem 0 2rem; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: 2.7rem; margin-top: 0; }
.hero h1 em { font-style: normal; color: var(--green); }
.buttons { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 6px; text-decoration: none;
  border: 1px solid var(--green); font-size: 0.95rem;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); color: #fff; }
.btn.ghost { color: var(--green); background: #fff; }
.version { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1rem 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.2rem; }
.card h3 { margin-top: 0; }
.card p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* Steps (how it works) */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1.4rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--green-light); color: var(--green-dark);
  font-weight: bold; text-align: center; line-height: 1.8rem; font-size: 0.9rem;
}

/* Code */
code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
pre {
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.5;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 0.9rem 1rem; overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: inherit; }
.code-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1rem 0 -0.6rem; }
.hl { color: var(--green); font-weight: bold; }
.cm { color: #7c8781; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.94rem; background: #fff; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--green-light); font-weight: 600; }
td code { white-space: nowrap; }

/* Notes */
.note { border-left: 4px solid var(--green); background: var(--green-light); padding: 0.7rem 1rem; border-radius: 0 6px 6px 0; margin: 1.2rem 0; }
.note.warn { border-color: #b7791f; background: #fbf3e4; }
.note p { margin: 0.3rem 0; }

/* Docs layout with side TOC */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; }
.toc { position: sticky; top: 4.5rem; align-self: start; font-size: 0.9rem; padding-top: 2.5rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0.35rem 0; }
.toc li li { padding-left: 0.8rem; font-size: 0.86rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--green); }
.doc-body { min-width: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; font-size: 0.88rem; color: var(--muted); }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .grid { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; padding-top: 1rem; }
  .site-nav a { margin-left: 0; margin-right: 1rem; }
}
.hero pre { font-size: 0.74rem; }
