/* www.cyrilvoyant.com — additions to the shared charter (site.css). 22 October 2026.
   Same colours, type and widths as github.io; adds the hero, the step cards, the breadcrumb and the news list. */

:root { --width: 980px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }
header { padding-bottom: 6px; }
nav a[aria-current] { font-weight: 700; text-decoration-thickness: 2px; }
nav a.lang { margin-left: auto; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 10px 0 0; border: 0; padding: 0; display: block; }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 180px; gap: 32px; align-items: center; margin: 28px 0 8px; }
.hero img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; border: 4px solid var(--paper); box-shadow: 0 2px 12px rgba(23,37,54,.14); }
.hero h1 { margin: 0 0 .15em; }
.hero .motto-big { font-size: 1.35rem; color: var(--link); font-weight: 600; margin: 0 0 .6em; }
.hero.small { grid-template-columns: 1fr 120px; } .hero.small img { width: 120px; height: 120px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btns a { padding: 9px 16px; border-radius: 6px; text-decoration: none; border: 1px solid var(--link); background: var(--paper); }
.btns a.primary { background: var(--link); color: #fff; }
.domains { display: flex; flex-wrap: wrap; gap: 8px; }
.domains span { font-size: .85rem; padding: 3px 11px; border-radius: 999px; background: var(--soft); }

/* Cards: a figure is always shown whole, never cropped */
.steps4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 18px 0 8px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 12px 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--c, var(--link)); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.card .body { padding: 12px 16px 16px; }
.card .tag { font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--c, var(--link)); }
.card h3 { margin: .3em 0 .3em; font-size: 1.08rem; line-height: 1.35; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0 0 .45em; font-size: .95rem; }
.card .step-d { font-weight: 600; }
.ex { font-size: .92rem; color: var(--muted); }

/* Step sections on the stories index */
.jump { font-size: .95rem; }
.step-sec { margin-top: 2.2em; padding-top: .4em; border-top: 3px solid var(--c); }
.step-sec h2 { color: var(--c); margin-top: .4em; }

/* Step box on every story (same family as the github.io thread box) */
.thread.step { border-left-color: var(--c); }
.thread.step .principle { background: var(--c); }

/* Story layout */
.byline { color: var(--muted); font-size: .92rem; margin: .2em 0 1em; }
.go { margin-top: 2em; font-size: .95rem; }
figure img { display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; margin-top: 1.5em; }
.split.stack { grid-template-columns: 1fr; gap: 8px; }   /* a wide figure (the map of the work) takes the full width */
.figs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brief { margin: 18px 0; }

/* News list */
ul.news { list-style: none; padding: 0; }
ul.news li { padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.news li a { font-weight: 600; }

/* Single news page (L3, 23 October 2026): filters, cards with thumbnail, full text opened in place */
.news-filters { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 18px 0 6px; }
.news-filters .lab { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 2px 0 8px; }
.news-filters .lab:first-child { margin-left: 0; }
.news-filters button { font: inherit; font-size: .88rem; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.news-filters button[aria-pressed="true"] { background: var(--link); border-color: var(--link); color: #fff; }
.news-filters button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.news-count { font-size: .88rem; color: var(--muted); margin: 4px 0 10px; }
.news-list article.post { display: grid; grid-template-columns: 168px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.news-list article.post:target { background: var(--soft); }
.news-list article.post[hidden] { display: none; }   /* filters: display:grid above would otherwise override [hidden] */
.news-list .thumb { width: 168px; height: 112px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.news-list .meta { font-size: .85rem; color: var(--muted); margin: 0 0 2px; }
.news-list .meta .theme { text-transform: none; }
.news-list h2 { font-size: 1.12rem; margin: 0 0 4px; line-height: 1.35; }
.news-list h2 a { text-decoration: none; color: var(--ink); }
.news-list h2 a:hover { text-decoration: underline; }
.news-list .authors { font-size: .9rem; margin: 0 0 6px; }
.news-list .orig { font-size: .85rem; color: var(--muted); font-style: italic; margin: 0 0 4px; }
.news-list .summary { margin: 0 0 6px; }
.news-list article.post:has(details[open]) .summary { display: none; }   /* the full text repeats it */
.news-list details summary { cursor: pointer; color: var(--link); font-size: .95rem; }
.news-list .post-body { margin-top: 10px; }
.news-list .post-body figure img { max-height: 420px; object-fit: contain; }
.feed { white-space: nowrap; }

/* The course, slide by slide (L4, 23 October 2026) */
.course-toc ol { columns: 2; column-gap: 28px; padding-left: 1.3em; }
.course-toc li { break-inside: avoid; margin-bottom: 4px; }
section.slide { margin: 26px 0 30px; scroll-margin-top: 12px; }
section.slide h3 { font-size: 1.05rem; margin: 0 0 8px; }
section.slide h3 .num { display: inline-block; min-width: 2.1em; padding: 1px 7px; margin-right: 6px; border-radius: 4px; background: var(--soft); color: var(--link); font-variant-numeric: tabular-nums; text-align: center; }
section.slide figure { margin: 0; }
section.slide figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.slide-text { margin-top: 6px; font-size: .95rem; }
.slide-text summary { cursor: pointer; color: var(--link); font-size: .9rem; }
.slide-text[open] { padding: 4px 14px 8px; background: var(--paper); border-left: 3px solid var(--line); }
.slide-table { display: table; margin: 8px 0; font-size: .9rem; }
.course-nav { position: fixed; right: 16px; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(23,37,54,.14); font-size: .88rem; }
.course-nav button { font: inherit; width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); cursor: pointer; }
.course-nav button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#course-pos { font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: center; }
.course-card { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: center; margin: 22px 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.course-card img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.course-card h2 { margin: 0 0 6px; font-size: 1.2rem; }

/* Consent banner (audience measurement, loaded only after acceptance) */
#consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; z-index: 20;
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--link); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(23,37,54,.18); padding: 14px 16px; font-size: .95rem; }
#consent p { margin: 0 0 10px; }
.consent-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent-btns button { font: inherit; padding: 7px 16px; border-radius: 6px; border: 1px solid var(--link); background: var(--paper); color: var(--link); cursor: pointer; }
.consent-btns button.primary { background: var(--link); color: #fff; }
.consent-btns button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
footer .cookies { font-size: .85rem; }

/* Footer */
footer p { margin: .4em 0; }
.thread-foot { font-style: italic; }

@media (max-width: 720px) {
  .course-toc ol { columns: 1; }
  .course-card { grid-template-columns: 1fr; }
  .news-list article.post { grid-template-columns: 96px 1fr; gap: 12px; }
  .news-list .thumb { width: 96px; height: 72px; }
  .hero, .hero.small { grid-template-columns: 1fr; }
  .hero img { order: -1; width: 120px; height: 120px; }
  .steps4, .split, .figs2 { grid-template-columns: 1fr; }
  nav a.lang { margin-left: 0; }
}

/* AI in research page: examples that open in place, glossary (23 October 2026) */
main details[id] { margin: 6px 0 16px; padding: 4px 14px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--p5); border-radius: 6px; scroll-margin-top: 12px; }
main details[id] > summary { cursor: pointer; color: var(--link); font-weight: 600; padding: 6px 0; }
main details[id][open] { padding-bottom: 12px; }
main details[id] table { display: table; width: 100%; font-size: .9rem; }
dl.glossary dt { font-weight: 700; margin-top: 10px; scroll-margin-top: 12px; }
dl.glossary dd { margin: 2px 0 0 0; }
dl.glossary dt:target, dl.glossary dt:target + dd { background: var(--soft); }
