/* Soilicon landing page: soilicon.com. Plain CSS, no build step. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f1c;
  --muted: #5d625a;
  --line: #e3e1da;
  --accent: #2f6f4f;
  --accent-text: #ffffff;
  --soil: #c9b48a;
  --soil-2: #a8946c;
  --water: #3d7fb8;
  --slip: #c2452d;
  --code-bg: #f1efe8;
  --radius: 10px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151714;
    --surface: #1d201c;
    --text: #e9ebe6;
    --muted: #a3a99f;
    --line: #30342e;
    --accent: #6fbf93;
    --accent-text: #0f1a13;
    --soil: #8a7a57;
    --soil-2: #6e6145;
    --water: #6aa8de;
    --slip: #ee7a62;
    --code-bg: #252923;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #151714;
  --surface: #1d201c;
  --text: #e9ebe6;
  --muted: #a3a99f;
  --line: #30342e;
  --accent: #6fbf93;
  --accent-text: #0f1a13;
  --soil: #8a7a57;
  --soil-2: #6e6145;
  --water: #6aa8de;
  --slip: #ee7a62;
  --code-bg: #252923;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

code {
  font: 0.9em ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.site-header nav .button { color: var(--accent-text); padding: 0.35em 0.9em; }

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

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; margin: 0 0 0.6em; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero figure { margin: 0; }
.hero svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hero figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0.4em 0 0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.75rem; padding: 0.1em 0.55em; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin-right: 4px; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 56px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }

.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout.warn { border-left-color: var(--slip); }

/* ----------------------------------------------------------------- long-form pages */

.doc { max-width: 760px; }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; }
.doc .toc ol { margin: 0.3em 0 0; padding-left: 1.2em; }
.doc figure { margin: 1.4em 0; }
.doc figure svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doc figcaption { font-size: 0.85rem; color: var(--muted); }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.refs { font-size: 0.92rem; }
.refs li { margin-bottom: 0.4em; }

/* ----------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
th.num { text-align: right; }
td .note { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

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

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 40px 0; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .site-header nav { margin-left: 0; gap: 14px; padding-bottom: 10px; }
}
