/* datagrep — landing page styles. No build step, no external requests. */

/* ---------- tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-raised: #ffffff;
  --text: #1a2333;
  --text-muted: #55617a;
  --border: #e3e8f0;
  --border-strong: #ccd4e0;
  --accent: #2E7D4F;          /* brand green, 5.1:1 on white */
  --accent-strong: #1F5F3B;
  --accent-soft: #e8f3ec;
  --good: #1a7f4b;
  --warn: #9a6700;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-big: 0 2px 6px rgba(15, 23, 42, .08), 0 24px 64px rgba(15, 23, 42, .16);
  /* terminal blocks are always dark, in both themes */
  --term-bg: #1B1F26;
  --term-border: #2E343F;
  --term-text: #dbe4f3;
  --term-muted: #7d8ba3;
  --term-accent: #8FCBA0;
  --term-green: #6FB585;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16191F;
    --bg-soft: #1C2028;
    --bg-raised: #20242C;
    --text: #e7ebf2;
    --text-muted: #9aa5b8;
    --border: #2E343F;
    --border-strong: #3E4655;
    --accent: #6FB585;
    --accent-strong: #8FCBA0;
    --accent-soft: #16301f;
    --good: #57c98a;
    --warn: #d8a03d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-big: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --bg: #16191F;
  --bg-soft: #1C2028;
  --bg-raised: #20242C;
  --text: #e7ebf2;
  --text-muted: #9aa5b8;
  --border: #2E343F;
  --border-strong: #3E4655;
  --accent: #6FB585;
  --accent-strong: #8FCBA0;
  --accent-soft: #16301f;
  --good: #57c98a;
  --warn: #d8a03d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-big: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .55);
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 46rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 3.5rem;
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 1.6rem; height: 1.6rem; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted); font-size: .92rem; font-weight: 500;
  padding: .35rem .6rem; border-radius: 6px;
}
.site-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.site-nav .nav-gh { color: var(--text); border: 1px solid var(--border-strong); }
.theme-toggle {
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  border-radius: 6px; padding: .3rem .55rem; cursor: pointer; font-size: .95rem; line-height: 1;
}
.theme-toggle:hover { background: var(--bg-soft); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 4.5rem 0 2.5rem; text-align: center; }
.hero-icon { width: 6rem; height: 6rem; margin: 0 auto 1.5rem; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.12; letter-spacing: -.02em; font-weight: 800;
  max-width: 46rem; margin: 0 auto;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede {
  margin: 1.25rem auto 0; max-width: 42rem;
  font-size: 1.15rem; color: var(--text-muted);
}
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero-ctas { margin-top: 1.75rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .6rem 1.25rem; border-radius: 8px;
  font-weight: 600; font-size: .98rem; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary { background: #3E8F5F; color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: #3E8F5F; color: #fff; }
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.hero-note { margin-top: .9rem; font-size: .88rem; color: var(--text-muted); }

/* ---------- terminal blocks ---------- */
.term {
  background: var(--term-bg); border: 1px solid var(--term-border);
  border-radius: 10px; text-align: left; overflow: hidden;
  box-shadow: var(--shadow);
}
.term-title {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem; border-bottom: 1px solid var(--term-border);
  color: var(--term-muted); font-size: .78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.term-title::before {
  content: ""; width: .65rem; height: .65rem; border-radius: 50%;
  background: #6FB585; opacity: .8; flex: none;
}
.term pre {
  padding: .9rem 1.1rem; overflow-x: auto;
  color: var(--term-text); font-size: .88rem; line-height: 1.6;
}
.term .c { color: var(--term-muted); }     /* comment */
.term .p { color: var(--term-green); }     /* prompt/output ok */
.term .a { color: var(--term-accent); }    /* accent token */
.hero-term { max-width: 36rem; margin: 2.25rem auto 0; }

/* ---------- screenshot ---------- */
.shot-section { padding: 1.5rem 0 1rem; }
.shot-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow-big); }
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
.shot-caption { text-align: center; color: var(--text-muted); font-size: .88rem; margin-top: .8rem; }

/* ---------- stats band ---------- */
.stats { padding: 3rem 0 1rem; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}
.stat {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.1rem 1.2rem;
}
.stat .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat .d { margin-top: .3rem; font-size: .9rem; color: var(--text-muted); line-height: 1.45; }
.stat .d strong { color: var(--text); }
.measured-note { margin-top: .9rem; font-size: .85rem; color: var(--text-muted); }

/* ---------- sections ---------- */
section { padding: 3.5rem 0 0; }
section:last-of-type { padding-bottom: 3.5rem; }
.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.015em; line-height: 1.2; }
h3 { font-size: 1.15rem; margin-top: 2rem; margin-bottom: .5rem; }
.section-intro { margin-top: .75rem; color: var(--text-muted); max-width: 46rem; }
.section-intro strong, section p strong { color: var(--text); }
section > .wrap > p { margin-top: .9rem; }

/* ---------- why cards ---------- */
.card-grid {
  margin-top: 2rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.3rem 1.35rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.card h3 { margin: 0 0 .45rem; font-size: 1.03rem; }
.card p { font-size: .93rem; color: var(--text-muted); }
.card p code { font-size: .85em; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 4px; padding: .05em .3em; color: var(--text); }

/* ---------- three blanks demo ---------- */
.blanks-demo {
  margin-top: 2rem; border: 1px solid var(--border-strong); border-radius: 10px;
  overflow-x: auto; box-shadow: var(--shadow); background: var(--bg-raised);
}
.blanks-demo table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .92rem; }
.blanks-demo th, .blanks-demo td { padding: .55rem .9rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.blanks-demo th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); background: var(--bg-soft); font-weight: 600;
}
.blanks-demo tr:last-child td { border-bottom: none; }
.blanks-demo td.num { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.blanks-demo .meaning { color: var(--text-muted); font-size: .85rem; white-space: normal; }
.pill {
  display: inline-block; font-size: .74rem; font-weight: 600; line-height: 1;
  padding: .28em .55em; border-radius: 999px; vertical-align: baseline;
}
.pill-null { background: var(--accent-soft); color: var(--accent); letter-spacing: .05em; }
.pill-empty { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pill-absent { background: transparent; color: var(--warn); border: 1px dashed var(--warn); font-style: italic; }

/* ---------- comparison table ---------- */
.table-scroll {
  margin-top: 2rem; overflow-x: auto; border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: var(--shadow); background: var(--bg-raised);
}
.compare-table { border-collapse: collapse; width: 100%; min-width: 62rem; font-size: .88rem; }
.compare-table th, .compare-table td {
  padding: .7rem .85rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  background: var(--bg-soft); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.compare-table tbody th { font-weight: 600; white-space: nowrap; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .self { background: var(--accent-soft); }
.compare-table .self th { color: var(--accent-strong); }
.compare-table td { color: var(--text-muted); }
.compare-table td.yes { color: var(--good); }
.compare-table td.no { color: var(--warn); }
.compare-note { margin-top: 1rem; font-size: .88rem; color: var(--text-muted); max-width: 50rem; }

/* ---------- engines table ---------- */
.engines-table { margin-top: 2rem; border-collapse: collapse; width: 100%; max-width: 34rem; font-size: .95rem; }
.engines-table th, .engines-table td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
.engines-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; }
.status-ok { color: var(--good); } .status-ok::before { background: var(--good); }
.status-wip { color: var(--warn); } .status-wip::before { background: var(--warn); }
.foot { font-size: .85rem; color: var(--text-muted); margin-top: .8rem; max-width: 46rem; }

/* ---------- install / cli / directives ---------- */
.step { margin-top: 1.6rem; }
.step .term { margin-top: .7rem; }
dl.cmds { margin-top: 1.2rem; display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.1rem; font-size: .93rem; }
dl.cmds dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; color: var(--accent); white-space: nowrap; }
dl.cmds dd { color: var(--text-muted); }
@media (max-width: 30rem) {
  dl.cmds { grid-template-columns: 1fr; gap: .1rem; }
  dl.cmds dd { margin-bottom: .6rem; }
}

/* ---------- not yet ---------- */
.notyet-list { margin-top: 1.4rem; list-style: none; max-width: 46rem; }
.notyet-list li {
  padding: .8rem 0 .8rem 1.6rem; border-bottom: 1px solid var(--border);
  position: relative; color: var(--text-muted); font-size: .96rem;
}
.notyet-list li::before {
  content: "–"; position: absolute; left: .2rem; color: var(--warn); font-weight: 700;
}
.notyet-list li strong { color: var(--text); }
.notyet-list li:last-child { border-bottom: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.site-footer p { font-size: .88rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .88rem; }

/* ---------- responsive ---------- */
@media (max-width: 48rem) {
  .hero { padding-top: 3rem; }
  .site-nav a:not(.nav-gh) { display: none; }  /* keep header light on phones; anchors remain in page flow */
  section { padding-top: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
