/* neovain site. Plain CSS, no build step. Colors are tokens; the light theme redefines them. */

@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ground: #090e0c;
  --pane: #0f1613;
  --inset: #16201c;
  --rule: #1e2a25;
  --rule-strong: #33433c;
  --text: #ecf4f0;
  --text-2: #a9b8b1;
  --muted: #80918a;
  /* --accent is the brand mint: logo, cursor, links, the main button. Chart bars use --neovain,
     a deeper mint that stays inside the lightness band the chart colors were validated for. */
  --accent: #2ff58f;
  --link: #2ff58f;
  --link-hover: #8bfac0;
  --neovain: #00b15f;
  --edit: #8b6cf6;
  --edit-dim: #3a2f6e;
  --added: #2ff58f;
  --removed: #b7a4fb;
  --button-text: #090e0c;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: 96px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #f2f6f4;
  --pane: #fbfdfc;
  --inset: #e6ece9;
  --rule: #d5ddd9;
  --rule-strong: #aab7b1;
  --text: #0c1411;
  --text-2: #43504a;
  --muted: #5f6d67;
  --accent: #00a35c;
  --link: #00703f;
  --link-hover: #00522e;
  --neovain: #00a35c;
  --edit: #7346e8;
  --edit-dim: #cfc2f7;
  --added: #00703f;
  --removed: #5a2fd0;
  --button-text: #0c1411;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--mono); font-weight: 600; margin: 0; }
p { margin: 0; text-wrap: pretty; }
code, pre, kbd { font-family: var(--mono); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--accent); color: var(--button-text); }
.skip:focus { left: 8px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); font-family: var(--mono); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; height: 44px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand:hover { color: var(--text); }
.mark .dot { fill: var(--text); }
.mark .block { fill: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { display: flex; align-items: center; height: 44px; padding: 0 12px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { font-weight: 600; }
.icon-button {
  display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer;
}
.icon-button:hover { color: var(--text); }
.icon-button.outlined { border: 1px solid var(--rule); color: var(--text-2); }
.icon-button .done, .icon-button.copied .idle { display: none; }
.icon-button.copied .done { display: block; color: var(--accent); }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--rule); }
h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.3; }
.intro { max-width: 780px; font-size: 17px; color: var(--text-2); }
.note { max-width: 780px; color: var(--text-2); }
.note strong, .closing strong { color: var(--text); font-weight: 600; }

/* Hero */
.hero { padding: 88px 0; border-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 560fr) minmax(0, 480fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); }
h1 { font-size: clamp(40px, 5.2vw, 60px); line-height: 1.08; letter-spacing: -0.02em; }
.cursor { display: inline-block; width: 0.5em; height: 0.8em; margin-left: 0.14em; background: var(--accent); }
.meaning { margin-top: -8px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.meaning b { font-weight: 600; color: var(--text); }
.lede { font-size: 19px; line-height: 1.55; color: var(--text-2); }
.install { display: flex; flex-direction: column; gap: 8px; }
.command {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 4px 0 16px;
  background: var(--pane); border: 1px solid var(--rule); border-radius: 6px; font-family: var(--mono); font-size: 13px;
}
.command code { flex: 1; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }
.prompt { color: var(--muted); user-select: none; }
.hint { font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 20px;
  border: 1px solid var(--rule-strong); border-radius: 6px; color: var(--text); text-decoration: none;
  font-family: var(--mono); font-size: 14px;
}
.button:hover { color: var(--text); border-color: var(--muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--button-text); font-weight: 600; }
.button.primary:hover { color: var(--button-text); }

/* Panes and terminal blocks */
.pane { display: flex; flex-direction: column; min-width: 0; background: var(--pane); border: 1px solid var(--rule); border-radius: 6px; font-family: var(--mono); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.pane-head.tight { padding: 0 4px 0 20px; }
.pane-title { display: flex; align-items: center; gap: 8px; color: var(--text); }
.pane-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--rule); font: 13px/1.5 var(--sans); color: var(--muted); }
.pane-foot code { color: var(--text-2); }
.term { margin: 0; padding: 16px 20px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: var(--text); }
figure { margin: 0; }
.term .p, .term .meta { color: var(--muted); }
.term .anchor, .term .add { color: var(--added); }
.term .del, .term .fail { color: var(--removed); }
.term .ctx { color: var(--text-2); }
.swatch { display: inline-block; flex: none; width: 8px; height: 8px; }
.swatch.neovain { background: var(--neovain); }
.swatch.edit { background: var(--edit); }
.swatch.neovain-ex { border: 2px solid var(--neovain); }

/* Demo */
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.figure-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 20px 20px 4px; }
.figure-line strong { font-size: 40px; line-height: 1.1; font-weight: 600; }
.figure-line span { font-size: 13px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 16px 20px; font-size: 13px; line-height: 1.65; }
.steps li { display: flex; justify-content: space-between; gap: 16px; }
.steps li + li { padding-left: 2ch; }
.steps code { white-space: pre; min-width: 0; overflow-x: auto; }
.steps .anchor { color: var(--added); }
.steps .p { color: var(--muted); }
.steps .why { flex: none; font-family: var(--sans); color: var(--muted); text-align: right; }
.calls { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 16px 20px; font-size: 13px; line-height: 1.4; }
.calls li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 64px; align-items: center; column-gap: 8px; }
.calls .n { color: var(--muted); }
.calls .what { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.calls .chars { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.span-bar { display: block; width: 100%; height: 12px; }
.span-bar .find, .key .find { fill: var(--edit-dim); background: var(--edit-dim); }
.span-bar .repl, .key .repl { fill: var(--edit); background: var(--edit); }
.key { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0 20px 16px; font-size: 12.5px; color: var(--text-2); }
.key span { display: flex; align-items: center; gap: 8px; }
.key i { display: block; width: 16px; height: 5px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 40px 0 0; border-top: 1px solid var(--rule); font-family: var(--mono); }
.stats div { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px 0; border-left: 1px solid var(--rule); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 0; }
.stats .value { font-size: 36px; line-height: 1.15; font-weight: 600; }
.stats .sub { font: 13px/1.5 var(--sans); color: var(--muted); }

/* Benchmarks */
.bench-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 48px 0 20px; }
.bench-head p { margin-top: 4px; font-size: 15px; color: var(--text-2); }
.legend { display: flex; gap: 20px; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.chart { gap: 18px; padding: 20px; }
.chart h4 { margin: 0; font-size: 14px; font-weight: 600; }
.chart .sub { font-size: 12.5px; color: var(--muted); }
.bar-group { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; font-size: 12.5px; }
.bar-group > span { color: var(--text-2); }
.bar-rows { display: flex; flex-direction: column; gap: 3px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.bar { display: block; flex: none; height: 14px; }
.bar.neovain { fill: var(--neovain); }
.bar.edit { fill: var(--edit); }
.table-wrap { overflow-x: auto; margin-bottom: 20px; padding: 0 20px; background: var(--pane); border: 1px solid var(--rule); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
th, td { height: 42px; padding: 0 0 0 20px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { padding-left: 0; }
th.text, td.text { text-align: left; }
thead th { height: 40px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
tbody th { font-weight: 400; }
tbody tr { border-top: 1px solid var(--rule); }
td .swatch { margin-right: 8px; }
td.ctx { color: var(--text-2); }
td.short { font-weight: 600; }
th.wrap { height: auto; padding: 12px 24px 12px 0; white-space: normal; font: 14px/1.5 var(--sans); color: var(--text-2); }
th.wrap strong { font: 600 13px/1.5 var(--mono); color: var(--text); }
th.wrap + td { padding-top: 12px; padding-bottom: 12px; line-height: 1.7; vertical-align: top; }
.table-title { margin: 24px 0 8px; font: 600 14px/1.4 var(--mono); }
#behavior .table-wrap { margin-top: 32px; }
.small-edits { margin: 56px 0 24px; }
.small-edits h3 { margin-bottom: 8px; }

/* What we learned */
.lessons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin: 32px 0 40px; }
.lessons h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 16px; }
.lessons ul { list-style: none; display: flex; flex-direction: column; gap: 16px; margin: 16px 0 0; padding: 0; color: var(--text-2); }
.lessons li { display: grid; grid-template-columns: 20px minmax(0, 1fr); }
.lessons li::before { font-family: var(--mono); }
.lessons .for li::before { content: "+"; color: var(--added); }
.lessons .against li::before { content: "-"; color: var(--removed); }
.lessons code, .closing code { font-size: 14px; color: var(--text); }
.lessons strong { color: var(--text); font-weight: 600; }
.closing { max-width: 780px; font-size: 17px; color: var(--text-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 32px; padding-bottom: 40px; }

/* Docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 64px; align-items: start; padding-top: 56px; padding-bottom: 72px; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; font-family: var(--mono); font-size: 13px; }
.toc p { padding-bottom: 8px; color: var(--muted); }
.toc a { display: flex; align-items: center; min-height: 32px; color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); }
.prose { display: flex; flex-direction: column; gap: 16px; min-width: 0; color: var(--text-2); }
.prose h1 { font-size: 30px; letter-spacing: -0.01em; color: var(--text); }
.prose h2 { margin: 32px 0 0; padding-top: 32px; border-top: 1px solid var(--rule); font-size: 22px; line-height: 1.3; letter-spacing: 0; color: var(--text); scroll-margin-top: 16px; }
.prose p code, .prose li code, .prose td code, .prose th code { padding: 1px 5px; background: var(--inset); border-radius: 3px; font-size: 13.5px; color: var(--text); }
.prose .pane .term { padding: 14px 20px; }
.prose strong { color: var(--text); font-weight: 600; }
.defs { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; }
.defs th, .defs td { height: auto; padding: 12px 0 12px 24px; text-align: left; white-space: normal; vertical-align: top; }
.defs th:first-child, .defs td:first-child { width: 220px; padding-left: 0; white-space: nowrap; }
.defs thead th { padding-top: 0; padding-bottom: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.defs tbody tr:last-child { border-bottom: 1px solid var(--rule); }
.points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.points li { display: grid; grid-template-columns: 20px minmax(0, 1fr); }
.points li::before { content: ""; width: 6px; height: 6px; margin-top: 10px; background: var(--accent); }

/* Not found */
.lost { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 96px; padding-bottom: 160px; }

@media (max-width: 1100px) {
  .charts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 1000px) {
  :root { --gutter: 32px; }
  .hero-grid, .demo-grid, .lessons { grid-template-columns: minmax(0, 1fr); }
  .lessons { gap: 32px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
  .toc p { width: 100%; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  section { padding: 48px 0; }
  .hero { padding: 40px 0 48px; }
  .site-header .wrap { height: 56px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 0 8px; }
  h2 { font-size: 24px; }
  .lede { font-size: 17px; }
  .intro, .closing { font-size: 16px; }
  .actions { flex-direction: column; }
  .pane-head, .figure-line, .steps, .calls, .term, .pane-foot { padding-left: 16px; padding-right: 16px; }
  .key { padding-left: 16px; padding-right: 16px; }
  .steps { font-size: 12px; }
  .steps .why { display: none; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats div { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .stats .value { font-size: 26px; }
  .stats .sub { width: 100%; }
  .table-wrap { padding: 0 16px; }
  .defs th:first-child, .defs td:first-child { width: 130px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
