/* BioGraphs start page (2026-11-30, the user's direction "E3 in the app's own style"): the app's top bar with the site's
   pages in the middle; a hero over the logo's bars scaled up (the skyline); the example figure made by the app with its
   Chart / Code / Statistics tabs; what you get; questions. Every colour, radius and shadow: the UI kit's tokens (ui.css),
   so the light and gray themes both follow. Layout concept: one 1240 px column, the hero split text | preview. */
body.home { margin: 0; background: var(--bg); color: var(--ink); }
.home .topbar { position: sticky; top: env(safe-area-inset-top, 0px); }
.home .brand { text-decoration: none; color: var(--ink); }
.py-btn.pill-idle { background: var(--sunken); color: var(--muted); }

/* the site's pages, in the middle of the top bar (the app's step links' look) */
.site-nav { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; }
.site-nav a { padding: 4px 10px; border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { background: var(--hover); color: var(--ink); }

.home .wrap { max-width: 1240px; margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }

/* hero */
.hero { position: relative; overflow: hidden; }
/* (on the left, behind the headline, so the example's card does not hide it: the user, 2026-11-30, "Bars on the left" 1) */
.skyline { position: absolute; left: -160px; top: 40px; width: 980px; height: auto; color: var(--accent); opacity: .09; pointer-events: none; }
:root[data-theme="gray"] .skyline { opacity: .12; }
.hero-in { position: relative; max-width: 1240px; margin: 0 auto; box-sizing: border-box; padding-block: 72px 96px;
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px));
  display: flex; gap: 48px; flex-wrap: wrap; align-items: center; }
.hero-text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(40px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
/* the key word on a line of its own, in the brand colour (as "Bio" in the logo): two lines of like length */
.hero h1 .h1-key { display: block; color: var(--accent); }
.hero .lead { margin: 0; max-width: 470px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .button-link { font-size: 15px; font-weight: 600; padding: 11px 18px; }
.hero .fine { margin: 0; font-size: 13px; color: var(--faint); }

/* the example: the app's card, tabs and paper */
.preview { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.pv-tabs { margin: 0; padding: 0 12px; align-items: center; }
.pv-tabs button { font-size: 13px; }
.pv-src { margin-left: auto; font-size: 12px; color: var(--faint); text-align: right; }
/* the card keeps one height whichever tab is open (the page does not jump): the Chart panel sets it, and the Code and
   Statistics panels lie over it and scroll inside it */
.pv-body { position: relative; }
.pv-panel { display: flex; flex-direction: column; }
.pv-panel.off { visibility: hidden; }
#pv-code, #pv-stats { position: absolute; inset: 0; }
#pv-stats { display: block; } /* the app's .statview: scrolls, its actions row stays at the top */
.paper { margin: 14px; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.paper img { display: block; width: 100%; height: auto; }
.tiles { margin: 0 14px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tiles > div { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tiles span { color: var(--muted); }
.pv-note { margin: -6px 14px 14px; font-size: 12px; color: var(--faint); }
/* the Code tab: one row per line, the app's code colours (app.css .t-*) */
.pv-code { flex: 1; min-height: 0; margin: 0 0 12px; padding: 10px 0; overflow: auto; overscroll-behavior: contain; background: var(--code-bg); color: var(--code-ink); border-bottom: 1px solid var(--line);
  font: 12.5px/1.6 var(--mono); }
#pv-code .pv-note { margin: 0 14px 12px; }
.pv-code .ln { display: flex; gap: 14px; padding: 0 16px; min-width: max-content; }
.pv-code .no { flex: none; width: 28px; text-align: right; color: var(--code-gutter); user-select: none; }
.pv-code .tx { white-space: pre; }
/* the Statistics tab: the app's own (app.css .statview, details.resitem, .res-native, .methods) */

/* what you get: a band of the panel colour */
.band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .wrap { padding-block: 80px; display: flex; flex-direction: column; gap: 32px; }
.home h2 { margin: 0; font-size: 30px; letter-spacing: -.02em; font-weight: 650; }
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.band .card { background: var(--panel-2); box-shadow: none; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.faq { padding-block: 80px 90px; display: flex; flex-direction: column; gap: 24px; }

/* footer */
.site-foot { background: var(--panel); border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 24px; display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot .sp { margin-left: auto; }

/* The first view fits the window (the user, 2026-11-30: "adjusted to the screen", it was cut off at the bottom on a
   laptop): top bar + hero = one screen, the hero's contents in its middle, and the card as wide as fits the window's
   height. The card is its fixed parts (tabs, tiles, note, margins: 161 px) + the figure, 520 / 760 as tall as wide
   (32 px narrower than the card); never narrower than 440 px or wider than the figure (760 px) or 58 % of the row.
   svh: the height with the phone's / browser's bars shown (vh where svh is missing). Side by side only (wider than 900 px). */
@media (min-width: 901px) {
  .hero { --top-h: 50px; --fold-pad: clamp(20px, 5vh, 64px); --fold-pad: clamp(20px, 5svh, 64px);
    min-height: calc(100vh - var(--top-h)); min-height: calc(100svh - var(--top-h)); display: flex; align-items: center; }
  .hero-in { width: 100%; padding-block: var(--fold-pad); flex-wrap: nowrap; }
  .preview { flex: 0 1 auto;
    width: clamp(440px, calc((100vh - var(--top-h) - 2 * var(--fold-pad) - 161px) / 0.6842 + 32px), min(760px, 58%));
    width: clamp(440px, calc((100svh - var(--top-h) - 2 * var(--fold-pad) - 161px) / 0.6842 + 32px), min(760px, 58%)); }
}
@media (max-width: 900px) { .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .cards4, .cards2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .hero-in { padding-block: 40px 56px; }
  .skyline { width: 640px; left: -260px; }
  .site-nav { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .pv-src { display: none; }
}
