/* Graphvein website. Home page: a product layout (lead beside a real
   screenshot, measured numbers below it). Docs pages: a quiet reading
   layout with a sidebar. Colours are tokens. The theme follows the system
   unless the reader picks Light or Dark in the header (site.js sets
   data-theme on <html>); the dark tokens are therefore listed twice, once
   for a dark system without a choice and once for the Dark choice.
   Screenshots show in the theme opposite to the page's. */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #ffffff; --fg: #15131f; --muted: #57546b; --line: #e3e1ec; --surface: #f7f6fb; --surface-2: #eeebfa;
  --link: #4b3cc9; --focus: #6a4cff; --accent: #5242d6; --code-bg: #f0eef8;
  --term-bg: #14121f; --term-fg: #e6e3f5; --term-prompt: #a597ff; --term-comment: #9b97b4;
  --fact-bg: #e3f4ea; --fact-fg: #17603a; --inf-bg: #e8e4ff; --inf-fg: #3d2fae; --unk-bg: #fff7e6; --unk-fg: #7d4b00; --prec-bg: #e6f0ff; --prec-fg: #1d4f99;
  --hero-bg: linear-gradient(160deg, #120f2a 0%, #241a52 55%, #3b2477 100%); --hero-fg: #f4f2ff; --hero-muted: #d0cbf0;
  --big: #4b3cc9; --frame-bg: #1d1b29;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e17; --fg: #ece9f8; --muted: #aeaac4; --line: #2c2940; --surface: #17152a; --surface-2: #231f3d;
    --link: #b0a4ff; --focus: #b0a4ff; --code-bg: #221f36;
    --term-bg: #08070f; --fact-bg: #13301f; --fact-fg: #8fdcae; --inf-bg: #241e52; --inf-fg: #c4baff; --unk-bg: #33260b; --unk-fg: #f0bf63; --prec-bg: #142a4d; --prec-fg: #9cc2ff;
    --hero-bg: linear-gradient(160deg, #0a0817 0%, #181236 55%, #2a1a58 100%);
    --big: #b9afff; --frame-bg: #f4f3f8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f0e17; --fg: #ece9f8; --muted: #aeaac4; --line: #2c2940; --surface: #17152a; --surface-2: #231f3d;
    --link: #b0a4ff; --focus: #b0a4ff; --code-bg: #221f36;
    --term-bg: #08070f; --fact-bg: #13301f; --fact-fg: #8fdcae; --inf-bg: #241e52; --inf-fg: #c4baff; --unk-bg: #33260b; --unk-fg: #f0bf63; --prec-bg: #142a4d; --prec-fg: #9cc2ff;
    --hero-bg: linear-gradient(160deg, #0a0817 0%, #181236 55%, #2a1a58 100%);
    --big: #b9afff; --frame-bg: #f4f3f8;
    color-scheme: dark;
}

/* Screenshots in the opposite theme: a light page shows the dark
   screenshot (.shot-dark), a dark page the light one (.shot-light). */
.shot-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-dark { display: none !important; }
  :root:not([data-theme="light"]) .shot-light { display: block !important; }
}
:root[data-theme="dark"] .shot-dark { display: none !important; }
:root[data-theme="dark"] .shot-light { display: block !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--code-bg); padding: .08em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { overflow-x: auto; max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); color: var(--fg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .hwrap { max-width: 1240px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { display: block; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { font-weight: 650; }
.hgh { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.theme[hidden] { display: none; }
.theme + .hgh { margin-left: 0; }
.theme button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.theme button:hover { color: var(--fg); }
.theme button[aria-pressed="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.theme button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.gh, .star { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--fg); font-size: 14px; white-space: nowrap; }
.star { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; background: var(--surface); }
.star-count[hidden] { display: none; }
.star svg { color: #b8860b; }
.star-count { border-left: 1px solid var(--line); padding-left: 8px; margin-left: 2px; font-variant-numeric: tabular-nums; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--hero-muted); border: 1px solid #ffffff40; border-radius: 999px; padding: 3px 12px; margin: 0 0 18px; }
.hero h1 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 760; }
.hero .sub { font-size: 17px; color: var(--hero-muted); margin: 0 0 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 650; text-decoration: none; }
.btn-primary { background: #5a49e6; color: #fff; box-shadow: 0 6px 20px #6b5cf055; }
.btn-primary:hover { background: #4b3ad6; }
.btn-ghost { color: var(--hero-fg); border: 1px solid #ffffff66; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; }
.shot figcaption { font-size: 14px; color: var(--muted); padding: 8px 2px 0; }
.shot.framed { border-radius: 12px; overflow: hidden; box-shadow: 0 24px 70px #00000080, 0 0 0 1px #ffffff22; background: var(--frame-bg); padding-top: 28px; position: relative; }
.shot.framed::before { content: ""; position: absolute; top: 10px; left: 14px; width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; box-shadow: 15px 0 #febc2e, 30px 0 #28c840; }
.shot.framed figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }

/* Measured numbers */
section { padding: 72px 0 0; }
h2 { font-size: 30px; letter-spacing: -.015em; margin: 0 0 20px; line-height: 1.2; }
h3 { line-height: 1.3; }
.lede { max-width: 880px; color: var(--muted); }
.numbers { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0 44px; }
.evgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ev { background: var(--bg); padding: 18px 22px; display: flex; flex-direction: column; }
.ev .big { font-family: var(--mono); font-size: 34px; font-weight: 700; margin: 0; color: var(--big); letter-spacing: -.02em; }
.ev .nlabel { font-weight: 650; margin: 2px 0 6px; }
.ev .ntext { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.nsrc { margin: auto 0 0; font-size: 14px; }
.ev .base { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.reads { margin-top: 20px; }
.reads-t { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.langs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 12px; display: flex; flex-direction: column; min-width: 0; }
.langs .ln { font-weight: 650; font-size: 14px; }
.langs .ld { font-size: 12.5px; color: var(--muted); }
.reads-n { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

/* What it does */
.frows { display: grid; gap: 40px; margin-top: 28px; }
.frow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: center; }
.frow:nth-child(even) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.frow:nth-child(even) .ftext { order: 2; }
.zoom { display: block; cursor: zoom-in; border-radius: 10px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; width: 96vw; height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(8, 7, 15, .86); }
.lightbox figure { margin: 0; height: 100%; padding-top: 52px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.lightbox img { max-width: 100%; max-height: calc(96vh - 100px); width: auto; height: auto; border-radius: 8px; }
.lightbox figcaption { color: #e6e3f5; font-size: 14px; text-align: center; }
.lightbox .lb-close { position: absolute; top: 0; right: 0; min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: #ffffffe6; color: #15131f; font: 600 15px/1 var(--font); padding: 0 14px; cursor: pointer; }
.lightbox .lb-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in .15s ease-out; }
  @keyframes lb-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
}
.frow h3, .fcard h3 { margin: 0 0 8px; font-size: 19px; }
.frow p, .fcard p { margin: 0 0 10px; }
.frow .shot img { border: 1px solid var(--line); border-radius: 10px; max-height: 560px; width: auto; max-width: 100%; margin: 0 auto; }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 40px 0 24px; }
.fcard { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--surface); display: flex; flex-direction: column; }
.fcard h3 { font-size: 16px; }
.fcard p { color: var(--muted); font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Quick start and terminal */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.term, .code { background: var(--term-bg); color: var(--term-fg); border-radius: 10px; padding: 16px 18px; line-height: 1.55; font-size: 13px; }
.term .p { color: var(--term-prompt); user-select: none; }
.term .c, .code .c { color: var(--term-comment); }
.term-note { font-size: 14px; color: var(--muted); }
.notice { white-space: pre-wrap; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tscroll { max-width: 100%; overflow-x: auto; }
.status table { font-size: 15px; }
.status td:first-child { font-weight: 650; }
@media (max-width: 700px) {
  .status thead, table.rel thead { position: absolute; left: -9999px; }
  .status table, .status tbody, .status tr, .status td,
  table.rel, table.rel tbody, table.rel tr, table.rel td { display: block; width: 100%; }
  .status tr, table.rel tr { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 4px 0; }
  .status td, table.rel td { border: 0; padding: 6px 14px; }
  table.rel td::before { content: attr(data-label); display: block; font-size: 12px; text-transform: uppercase; color: var(--muted); }
}

/* How Graphvein decides, how it is verified */
.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 650; border: 1px solid transparent; }
.chip-fact { background: var(--fact-bg); color: var(--fact-fg); }
.chip-inferred { background: var(--inf-bg); color: var(--inf-fg); }
.chip-unknown { background: var(--unk-bg); color: var(--unk-fg); border-style: dashed; border-color: var(--unk-fg); }
.chip-precise { background: var(--prec-bg); color: var(--prec-fg); }
.rank { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-left: 8px; font-weight: 500; }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dcard { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--surface); }
.dcard h3 { margin: 0 0 8px; font-size: 16px; }
.dcard p { margin: 0; color: var(--muted); }
.verified { columns: 2; column-gap: 40px; padding-left: 18px; }
.verified li { break-inside: avoid; margin: 0 0 14px; }
.verified li.planned { color: var(--muted); }
.coming { padding-left: 18px; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.short { list-style: none; padding: 0; margin: 0 0 14px; }
.short li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.short a { color: var(--fg); text-decoration: none; }
.short a:hover { color: var(--link); text-decoration: underline; }
.dgrid.one { grid-template-columns: minmax(0, 1fr); }
.dcard h2 { font-size: 17px; margin: 0 0 8px; font-family: var(--font); }
.verified.one { columns: 1; }
.plainpage.wide { max-width: 1180px; }
.hero .sub { font-size: 19px; }
.coming-wrap { padding-bottom: 72px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; }
.fwrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.fbrand { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.fnav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fnav a { color: var(--muted); font-size: 14px; }
.fnote { width: 100%; margin: 0; font-size: 13px; color: var(--muted); }

/* Docs: sidebar, article in a reading column, "On this page". */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; gap: 40px; max-width: 1320px; margin: 0 auto; padding: 24px 24px 64px; }
.sidebar ul, .toc ul { list-style: none; padding: 0; margin: 0 0 18px; }
.sidebar li a, .toc li a, .dmenu li a { display: block; padding: 4px 8px; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: 14px; }
.sidebar li a[aria-current="page"], .dmenu li a[aria-current="page"] { color: var(--fg); background: var(--surface-2); font-weight: 650; }
.toc li.l3 a { padding-left: 20px; }
.sg { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px 8px; font-weight: 700; }
.sidebar, .toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.dmenu { display: none; }
.doc { min-width: 0; max-width: 780px; }
.doc h1, .doc h2, .doc h3, .plainpage h1, .plainpage h2 { font-family: var(--serif); font-weight: 600; }
.doc h1 { font-size: 40px; line-height: 1.15; margin: 6px 0 16px; }
.doc h2 { font-size: 26px; margin-top: 40px; padding-top: 8px; }
.doc h3 { font-size: 20px; margin-top: 28px; }
.doc li { margin: 0 0 8px; }
.doc table { font-size: 14px; }
.doc pre { background: var(--code-bg); border-radius: 8px; padding: 12px 14px; }
.doc td code, .doc li code, .doc p code { overflow-wrap: anywhere; }
.doc .index li { margin: 0 0 6px; }
.crumb { font-size: 14px; color: var(--muted); margin: 0; }
.crumb a { color: inherit; }
.docfoot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 18px; font-size: 14px; color: var(--muted); }
.report { font-weight: 650; }
.plainpage { max-width: 820px; margin: 0 auto; padding: 40px 32px 64px; }
.plainpage h1 { font-size: 42px; margin: 0 0 18px; }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 8px; padding: 4px 18px; }

@media (max-width: 1180px) { .docs { grid-template-columns: 220px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 1100px) {
  .hero-grid, .split, .frow { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .frow:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .frow:nth-child(even) .ftext { order: 0; }
  .fgrid, .evgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap, .site-header .hwrap, .fwrap, .plainpage { padding-left: 16px; padding-right: 16px; }
  .site-header { position: static; }
  .site-header .hwrap { flex-wrap: wrap; gap: 8px 16px; }
  .nav { order: 3; width: 100%; gap: 16px; font-size: 15px; }
  .gh-t { display: none; }
  .hero { padding: 32px 0 40px; }
  .hero .sub { font-size: 16px; }
  .evgrid, .fgrid, .dgrid, .gallery, .two { grid-template-columns: minmax(0, 1fr); }
  .verified { columns: 1; }
  h2 { font-size: 24px; }
  section { padding-top: 48px; }
  .btn { flex: 1 1 auto; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px 48px; }
  .sidebar { display: none; }
  .dmenu { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
  .dmenu summary { cursor: pointer; font-weight: 650; }
  .doc h1 { font-size: 30px; }
  .plainpage h1 { font-size: 32px; }
}
