/* =========================================================
   YOUBS LABS (blog section: /labs/), content only.
   Since 21/11/2026 (Sebastian and Benjamin: "Labs looks like another site"), Labs uses the site's own header,
   footer, background and theme (head-base styles.css, site-dark.css, /en/partials/header.html and footer.html).
   This file only styles the reading column and the articles, scoped to body.labs main.
   Orange from the charter: #ff9f01 for fills, a darker shade for text. Print stylesheet at the end.
========================================================= */

body.labs {
  --bg: #ffffff;
  --fg: #1a1a1f;
  --muted: #55555d;
  --line: #e2e2e6;
  --panel: #f6f6f7;
  --code-bg: #f3f3f5;
  --accent: #ff9f01;
  --accent-text: #9a5400; /* link and label text: 5.9:1 on white */
  --focus: #1a56db;
  --tok-k: #7a3db8;
  --tok-s: #1a7a3d;
  --tok-c: #6b6b75;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
html[data-theme="dark"] body.labs {
  --bg: #131316; /* the panel colour of the other pages in dark mode (site-dark.css) */
  --fg: #ececf0;
  --muted: #a8a8b3;
  --line: #2c2c33;
  --panel: #1b1b20;
  --code-bg: #1b1b20;
  --accent-text: #ffb23d;
  --focus: #8ab4ff;
  --tok-k: #c9a0ff;
  --tok-s: #86d9a3;
  --tok-c: #8d8d99;
}
/* The reading column sits on a plain panel, like the cards of the other pages, so the text stays readable over the
   animated background. styles.css turns every section into a card: not here. */
body.labs main { width: 100%; }
body.labs main .col, body.labs main .col-wide { width: 100%; background: var(--bg); color: var(--fg); border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); padding: 1rem 3rem 2.5rem; margin: 3rem auto; box-sizing: border-box; position: relative;
  z-index: 1; font-size: 1.125rem; line-height: 1.65; text-align: left; }
html[data-theme="dark"] body.labs main .col, html[data-theme="dark"] body.labs main .col-wide { box-shadow: none; border: 1px solid var(--line); }
body.labs main section { all: unset; display: block; }
body.labs main a { color: var(--accent-text); text-underline-offset: 0.18em; }
body.labs main a:hover { color: var(--fg); }
body.labs main h1::after, body.labs main h2::after { display: none; }
body.labs main h1, body.labs main h2, body.labs main h3 { text-align: left; color: var(--fg); }
body.labs main p, body.labs main li { text-align: left; color: inherit; }

/* ---------- page columns ---------- */
body.labs main { display: block; padding: 0 1.25rem; }
body.labs main .col { max-width: 44rem; margin: 0 auto 3rem; } /* about 70 characters per line */
body.labs main .col-wide { max-width: 64rem; margin: 0 auto; }

/* ---------- headings ---------- */
body.labs main h1, body.labs main h2, body.labs main h3 { line-height: 1.2; letter-spacing: -0.01em; }
body.labs main h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 1rem; }
body.labs main h2 { font-size: 1.55rem; margin: 2.6rem 0 0.7rem; scroll-margin-top: 1rem; position: relative; }
body.labs main h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; scroll-margin-top: 1rem; }
body.labs main .anchor { margin-left: 0.4rem; text-decoration: none; color: var(--muted); opacity: 0; font-weight: 400; }
body.labs main h2:hover .anchor, body.labs main h3:hover .anchor, body.labs main .anchor:focus { opacity: 1; }
body.labs main p { margin: 0 0 1.1rem; }
body.labs main ul, body.labs main ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
body.labs main li { margin-bottom: 0.35rem; }

/* ---------- index ---------- */
body.labs main .intro { padding: 3.5rem 0 1.5rem; }
body.labs main .intro .lead { font-size: 1.25rem; color: var(--muted); max-width: 40rem; }
body.labs main .kicker { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 0.9rem; }
body.labs main .kicker a { color: inherit; }
body.labs main .posts { list-style: none; margin: 1rem 0 0; padding: 0; }
body.labs main .posts > li { border-top: 1px solid var(--line); padding: 1.6rem 0; margin: 0; }
body.labs main .posts h2 { margin: 0.3rem 0 0.4rem; font-size: 1.4rem; }
body.labs main .posts h2 a { color: var(--fg); text-decoration: none; }
body.labs main .posts h2 a:hover { color: var(--accent-text); text-decoration: underline; }
body.labs main .posts p { color: var(--muted); margin: 0; }
body.labs main .post-meta { font-size: 0.95rem; color: var(--muted); margin: 0; }
body.labs main .tag { display: inline-block; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.65rem; margin-right: 0.5rem; color: var(--muted); }
body.labs main .tag-sample { border-style: dashed; color: var(--accent-text); border-color: var(--accent-text); }
body.labs main .notice { border: 1px dashed var(--accent-text); border-radius: 8px; padding: 0.9rem 1.1rem; background: var(--panel); font-size: 1rem; margin: 1.5rem 0; }

/* ---------- article ---------- */
body.labs main .post { padding: 3rem 0 0; }
body.labs main .post-head .meta { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }
body.labs main .summary { font-size: 1.2rem; border-left: 4px solid var(--accent); padding: 0.2rem 0 0.2rem 1.1rem; margin: 0 0 1.8rem; }
body.labs main .toc { background: var(--panel); border-radius: 10px; padding: 1rem 1.3rem; font-size: 1rem; margin-bottom: 1rem; }
body.labs main .toc p { margin: 0 0 0.3rem; font-weight: 700; }
body.labs main .toc ol { margin: 0; }

/* tables and code scroll inside their own box on narrow screens */
body.labs main .scroll { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 8px; }
body.labs main .scroll:focus-visible { outline-offset: 0; }
body.labs main table { border-collapse: collapse; width: 100%; font-size: 0.97rem; min-width: 32rem; }
body.labs main caption { text-align: left; font-weight: 700; padding: 0.7rem 0.9rem 0.3rem; }
body.labs main th, body.labs main td { text-align: left; padding: 0.55rem 0.9rem; border-top: 1px solid var(--line); vertical-align: top; }
body.labs main thead th { border-top: 0; background: var(--panel); }
body.labs main pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; overflow-x: auto; margin: 0 0 1.4rem; font-size: 0.92rem; line-height: 1.55; }
body.labs main code { font-family: var(--mono); font-size: 0.92em; }
body.labs main :not(pre) > code { background: var(--code-bg); border-radius: 4px; padding: 0.1rem 0.35rem; }
body.labs main .tok-k { color: var(--tok-k); } .tok-s { color: var(--tok-s); } .tok-c { color: var(--tok-c); font-style: italic; }

body.labs main figure { margin: 1.6rem 0; }
body.labs main figure img, body.labs main figure svg { display: block; max-width: 100%; height: auto; }
body.labs main figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; }
body.labs main .fig-bar { fill: var(--accent); } .fig-axis { stroke: var(--muted); } .fig-text { fill: var(--muted); font: 12px var(--font); }

body.labs main .corrections { list-style: none; padding: 0; }
body.labs main .corrections li { border-top: 1px solid var(--line); padding: 0.6rem 0; margin: 0; }
body.labs main .post-foot { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.2rem; color: var(--muted); font-size: 1rem; }
body.labs main .dl { display: inline-block; margin: 0 0 1.2rem; font-weight: 700; }

@media (max-width: 600px) {
  body.labs main .col, body.labs main .col-wide { font-size: 1.0625rem; padding: 0.5rem 1.2rem 1.5rem; margin: 1.5rem auto 2.5rem; }
  body.labs main { padding: 0 1rem; }
  body.labs main .intro { padding-top: 2.2rem; }
  body.labs main .post { padding-top: 2rem; }
}

/* ---------- print: articles are saved or printed as PDF ---------- */
@media print {
  :root { --bg: #fff; --fg: #000; --muted: #333; --line: #bbb; --panel: #fff; --code-bg: #fff; --accent-text: #000; }
  body { font-size: 11pt; line-height: 1.5; }
  header, footer, .header-cta, .theme-toggle, .toc, .anchor, .dl, canvas { display: none !important; }
  main { padding: 0; }
  .col, .col-wide { max-width: none; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  h2, h3 { break-after: avoid; }
  pre, table, figure, .summary { break-inside: avoid; }
  .scroll { overflow: visible; border: 0; }
  pre { overflow: visible; white-space: pre-wrap; border: 1px solid #bbb; }
  table { min-width: 0; }
}

/* Empty list before the first article (launch, 17/11/2026) */
body.labs main .posts-empty { border-top: 1px solid var(--line); padding: 1.6rem 0; margin: 1rem 0 0; color: var(--muted); }
body.labs main { padding-top: 1.5rem; }
