/* The guides (src/guides.php): plain pages to read, light like every public page, in the default violet (2026-11-30). */
:root { color-scheme: light; --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --soft: #475569; --line: #e3e3e6; --green: #6435c4; --wash: #f2edfc; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green); }
.g-head { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.g-head nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.g-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 750; color: var(--ink); text-decoration: none; }
.g-lang, .g-link { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--soft); text-decoration: none; }
.g-lang[aria-current] { color: var(--green); background: var(--wash); }
.g-btn { display: inline-grid; place-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: #7c4dd8; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.g-btn:hover { background: #6435c4; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 8px; }
.g-main { max-width: 820px; margin: 0 auto; padding: 18px 20px 64px; }
.g-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; color: var(--soft); }
.g-crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.g-crumbs a { color: var(--soft); }
h1 { margin: 0 0 8px; font-size: clamp(30px, 5.4vw, 46px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 14px; max-width: 70ch; overflow-wrap: anywhere; }
.g-lead { font-size: 19px; color: var(--soft); margin-bottom: 30px; }
.g-date { font-size: 14px; color: var(--soft); }
article > section { padding: 26px 0 8px; border-top: 1px solid var(--line); }
.g-toc { margin: 18px 0 30px; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.g-toc h2 { font-size: 15px; color: var(--soft); }
.g-toc ol { margin: 0; padding-left: 22px; }
.g-toc li { padding: 4px 0; }
.g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 34px; padding: 0; list-style: none; }
.g-cards a { display: grid; gap: 6px; align-content: start; height: 100%; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.g-cards a:hover { border-color: var(--green); }
.g-cards h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.g-cards p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--soft); }
.g-cards span { font-size: 13px; color: var(--green); font-weight: 650; }
.g-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 34px 0; padding: 20px; border-radius: 16px; background: var(--wash); }
.g-cta p { margin: 0; }
.g-more ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.g-more a { display: inline-flex; align-items: center; min-height: 44px; }
.g-foot { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 4vw, 64px); border-top: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.g-foot nav { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.g-foot a { display: inline-grid; place-items: center; min-height: 44px; color: var(--soft); }
@media (max-width: 620px) {
  .g-head { position: static; padding: 8px 16px; }
  .g-head .g-btn { display: none; }
  .g-link { white-space: nowrap; }
  html { scroll-padding-top: 16px; }
  .g-main { padding-inline: 16px; }
}

/* The blog (src/blog.php, 2026-12-01): the same page, a list of articles with covers, and an article's body. */
.b-empty { padding: 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.b-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 0 0 34px; padding: 0; list-style: none; }
.b-list a { display: grid; gap: 8px; align-content: start; height: 100%; padding: 0 0 18px; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.b-list a:hover { border-color: var(--green); }
.b-list a > *:not(img) { margin-inline: 18px; }
.b-list .b-cover { margin: 0 0 4px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); aspect-ratio: 1200 / 630; object-fit: cover; }
.b-list h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.b-list p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.b-about { max-width: 76ch; margin: 0 0 30px; }
.b-about h2 { margin: 0 0 8px; font-size: 20px; }
.b-about p { margin: 0 0 10px; line-height: 1.6; color: var(--soft); }
.b-cats { font-size: 14px; }
.b-meta { font-size: 13px; color: var(--soft); }
.b-meta b { color: var(--green); font-weight: 650; }
.b-cat { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.b-post-head { margin-bottom: 18px; }
/* The author's badge (2026-12-01): a round picture, the name and the title, above the date. */
.b-author { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; max-width: 100%; }
.b-author:hover { border-color: var(--green); }
.b-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.b-author span { display: grid; line-height: 1.25; min-width: 0; }
.b-author b { font-size: 15px; }
.b-author small { font-size: 12.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-cover { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.b-post > .b-cover { margin: 0 0 26px; }
.b-body h2 { margin: 36px 0 10px; font-size: 25px; scroll-margin-top: 84px; }
.b-body h3 { margin: 26px 0 8px; font-size: 19px; line-height: 1.35; scroll-margin-top: 84px; }
.b-body h4 { margin: 20px 0 6px; font-size: 17px; }
.b-body ul, .b-body ol { margin: 0 0 16px; padding-left: 24px; max-width: 70ch; }
.b-body li { padding: 3px 0; }
.b-body figure { margin: 22px 0 26px; }
.b-body figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 10px 30px -18px rgba(29, 18, 56, .35); }
.b-body figcaption { margin-top: 8px; font-size: 14px; color: var(--soft); text-align: center; }
.b-body code { padding: 1px 6px; border-radius: 6px; background: var(--wash); font: 14.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.b-body pre { margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; background: #1d1238; color: #f2edfc; overflow-x: auto; }
.b-body pre code { padding: 0; background: none; color: inherit; overflow-wrap: normal; }
.b-body blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--green); color: var(--soft); }
.b-body hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.b-callout { margin: 0 0 18px; padding: 14px 18px; border-radius: 14px; background: var(--wash); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }
.b-callout strong { display: block; margin-bottom: 4px; font-size: 14px; color: var(--green); }
.b-callout p { margin: 0; }
.b-callout.is-warning, .b-callout.is-important { background: #fff7e6; border-color: #f2cf8a; }
.b-callout.is-warning strong, .b-callout.is-important strong { color: #8a5a00; }
.b-table { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.b-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.b-table th, .b-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.b-table th { background: var(--bg); font-weight: 650; }
.b-table tr:last-child td { border-bottom: 0; }
.b-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.b-tags li { padding: 4px 12px; border-radius: 999px; background: var(--wash); color: var(--green); font-size: 13px; font-weight: 600; }
@media (max-width: 620px) {
  .b-body h2 { font-size: 22px; }
  .b-list { grid-template-columns: minmax(0, 1fr); }
}

/* The blog uses the window's width (2026-12-01): the list in as many columns as fit; an article's words beside its
   contents, which stay in view while reading. One column on a phone, the contents above the words. */
.b-wide { width: 100%; box-sizing: border-box; padding: 18px clamp(16px, 4vw, 64px) 64px; }
.b-wide > h1, .b-wide > .g-lead { max-width: 1100px; }
.b-wide .b-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.b-post { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "head head" "cover cover" "body side"; column-gap: clamp(28px, 4vw, 64px); }
.b-post-head { grid-area: head; max-width: 1100px; }
.b-post > .b-cover { grid-area: cover; width: 100%; max-height: 560px; object-fit: cover; }
.b-body { grid-area: body; min-width: 0; }
.b-body p, .b-body li, .b-body blockquote p { max-width: 88ch; }
.b-side { grid-area: side; position: sticky; top: 84px; align-self: start; display: grid; gap: 16px; max-height: calc(100vh - 100px); overflow: auto; }
.b-side .b-toc { margin: 0; }
.b-side .b-toc li { padding: 3px 0; font-size: 15px; line-height: 1.4; }
.b-side-cta { padding: 18px; border-radius: 16px; background: var(--wash); display: grid; gap: 12px; }
.b-side-cta p { margin: 0; font-size: 15px; line-height: 1.5; }
.b-sources { padding-left: 22px; font-size: 15px; }
.b-sources li { padding: 5px 0; overflow-wrap: anywhere; }
.b-wide .g-more, .b-wide .g-cta { max-width: none; }
@media (max-width: 980px) {
  .b-post { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cover" "side" "body"; }
  .b-side { position: static; max-height: none; overflow: visible; margin-bottom: 10px; }
}

/* The guides use the whole window (2026-12-01), like the blog: the gutter grows with it, the words keep their measure,
   and on a wide screen a guide's contents stand beside it, in view while reading. */
.g-main.g-wide { max-width: none; padding: 18px clamp(16px, 4vw, 64px) 64px; }
.g-wide .g-cta, .g-wide .g-more { max-width: none; }
@media (min-width: 1100px) {
  .g-wide article:has(> .g-toc) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); column-gap: clamp(32px, 4vw, 72px); align-items: start; }
  .g-wide article:has(> .g-toc) > * { grid-column: 1; }
  .g-wide article > .g-toc { grid-column: 2; grid-row: 1 / span 400; position: sticky; top: 24px; margin: 0; max-height: calc(100vh - 48px); overflow: auto; }
}
