/* The guides (templates/pages/guide.html, guides.html; pages/guides.py), on top of public.css. One
   reading column 720 px wide (figures fill it, prose stops at 72ch), built like "O programie"
   (css/about.css): its title and lead sizes, its hairlines, its question list. Only Occlify tokens
   (static/brand/tokens.css); the Markdown body is plain HTML elements styled here. Every selector
   starts with .guide or .gd-index, so nothing reaches the other pages. */

:where(.guide,.gd-index) ol,:where(.guide,.gd-index) ul{margin:0;padding:0}

/* ---------------------------------------------------------------- the column and the title */
.guide .gd-in,.gd-index .gd-in{max-width:calc(720px + 2 * var(--gutter));display:flex;flex-direction:column;gap:20px}
.guide .gd-hero,.gd-index{padding:72px 0 32px;background:var(--oc-surface)}
.pub .gd-h1{margin:0;font:var(--oc-type-heading-1);letter-spacing:var(--oc-tracking-heading-1);text-wrap:balance}
.guide .gd-hero p,.gd-index p{margin:0}

/* Occlify / Poradnik: the kicker above the title, each part a link. */
.gd-crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:0 8px;font:var(--oc-type-overline);letter-spacing:var(--oc-tracking-overline)}
.gd-crumbs li{display:flex;gap:8px}
.gd-crumbs li + li::before{content:"/";color:var(--oc-text-subtle)}
.pub .gd-crumbs a{display:inline-block;padding:4px 0;color:var(--oc-accent-text);text-decoration:none}
.pub .gd-crumbs a:hover{text-decoration:underline}

/* The answer first: the two-sentence summary in a box under the title. */
.gd-summary{padding:20px 24px;border-radius:var(--oc-radius-lg);background:var(--oc-accent-subtle);font:var(--oc-type-lead);color:var(--oc-text)}
/* The index's one sentence under its title. */
.gd-lead{font:var(--oc-type-lead);color:var(--oc-text-muted)}
.gd-meta{font:var(--oc-type-body-small);color:var(--oc-text-muted)}
.gd-updated{white-space:nowrap}

/* "Na tej stronie": the H2s, numbered. */
.gd-toc{padding-top:20px;border-top:1px solid var(--oc-border);display:flex;flex-direction:column;gap:8px}
.gd-toc-h{font:var(--oc-type-overline);letter-spacing:var(--oc-tracking-overline);color:var(--oc-text-subtle);text-transform:uppercase}
.gd-toc ol{padding-left:24px;display:flex;flex-direction:column;gap:4px;font:var(--oc-type-body)}
.gd-toc li::marker{color:var(--oc-text-subtle);font-variant-numeric:tabular-nums}
.pub .gd-toc a{display:inline-block;padding:2px 0}

/* ---------------------------------------------------------------- the video: our picture until the click */
.gd-video{margin:8px 0 0;display:flex;flex-direction:column;gap:8px;scroll-margin-top:calc(var(--header-web) + 24px)}
.gd-video-box,.gd-video-frame{position:relative;display:block;width:100%;aspect-ratio:16 / 9;border:0;border-radius:var(--oc-radius-lg);overflow:hidden;background:var(--oc-bg)}
.gd-video-box img{display:block;width:100%;height:100%;object-fit:cover}
/* The button covers the picture, so a click anywhere on it plays; the label is the pill in the middle. */
.gd-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;margin:0;padding:0;border:0;background:none;color:var(--oc-text);font:var(--oc-type-ui-heading);cursor:pointer}
.gd-play[hidden]{display:none}
.gd-play-label{display:inline-flex;align-items:center;gap:8px;min-height:var(--oc-size-control-lg);padding:0 20px;border-radius:var(--oc-radius-full);background:var(--oc-surface);box-shadow:var(--oc-shadow-2);white-space:nowrap}
.gd-play-time{color:var(--oc-text-muted);font-variant-numeric:tabular-nums}
.gd-play:hover .gd-play-label{color:var(--oc-accent-text)}
.gd-play:focus-visible{outline:none}
.gd-play:focus-visible .gd-play-label{outline:2px solid var(--oc-focus-ring);outline-offset:2px}
.gd-video figcaption{font:var(--oc-type-body-small);color:var(--oc-text-muted)}

/* ---------------------------------------------------------------- the text (Markdown) */
.guide .gd-body{padding:16px 0 96px;background:var(--oc-surface)}
.gd-prose{font:var(--oc-type-body);color:var(--oc-text);overflow-wrap:break-word}
.gd-prose > :first-child{margin-top:0}
.gd-prose p,.gd-prose ul,.gd-prose ol,.gd-prose blockquote{margin:0 0 16px;max-width:72ch}
.gd-prose ul,.gd-prose ol{padding-left:24px}
.gd-prose li{margin-bottom:8px}
.gd-prose li > p{margin-bottom:8px}
.pub .gd-prose h2,.pub .gd-h2{margin:56px 0 16px;font:var(--oc-type-heading-3);letter-spacing:var(--oc-tracking-heading-3);text-wrap:balance;scroll-margin-top:calc(var(--header-web) + 24px)}
.pub .gd-prose h3{margin:32px 0 8px;font:var(--oc-type-ui-title);letter-spacing:var(--oc-tracking-ui-title);scroll-margin-top:calc(var(--header-web) + 24px)}
.gd-prose strong{font-weight:600}
/* File names and the program's own words in code: `zlecenie_1050-Occlify.stl`. */
.gd-prose code{padding:1px 6px;border-radius:var(--oc-radius-sm);background:var(--oc-surface-sunken);font:400 14px/22px var(--oc-font-mono);overflow-wrap:anywhere}
/* A file tree or a listing (```text): one block that scrolls sideways on a phone. */
.gd-prose pre{margin:0 0 16px;padding:16px 20px;border-radius:var(--oc-radius-lg);background:var(--oc-surface-sunken);overflow-x:auto}
.gd-prose pre code{padding:0;border-radius:0;background:none;overflow-wrap:normal;white-space:pre}
/* A note box ("> ..."): the callout pair, which the brand keeps for the website. */
.gd-prose blockquote{padding:16px 20px;border-radius:var(--oc-radius-lg);background:var(--oc-callout);color:var(--oc-on-callout)}
.gd-prose blockquote > :last-child{margin-bottom:0}
.gd-prose hr{margin:40px 0;border:0;border-top:1px solid var(--oc-border)}

/* Figures fill the column; the caption under them. A narrow figure (one pane of the program) keeps
   its size on the screen, the img's width attribute, and shrinks only on a phone. */
.gd-fig{margin:32px 0;display:flex;flex-direction:column;gap:8px}
.gd-fig img{display:block;max-width:100%;height:auto;border:1px solid var(--oc-border);border-radius:var(--oc-radius-lg);background:var(--oc-bg)}
.gd-fig:not(.gd-fig-narrow) img{width:100%}
.gd-fig-narrow img{align-self:flex-start}
.gd-fig figcaption{font:var(--oc-type-body-small);color:var(--oc-text-muted)}

/* Tables scroll sideways on a phone rather than squeeze. */
.gd-table{margin:24px 0;overflow-x:auto;border:1px solid var(--oc-border);border-radius:var(--oc-radius-lg)}
.gd-table:focus-visible{outline:2px solid var(--oc-focus-ring);outline-offset:2px}
.gd-table table{width:100%;min-width:520px;border-collapse:collapse;font:var(--oc-type-body-small)}
.gd-table th,.gd-table td{padding:12px 16px;text-align:left;vertical-align:top;border-top:1px solid var(--oc-border)}
.gd-table thead th{border-top:0;background:var(--oc-bg);font-weight:600}

/* ---------------------------------------------------------------- after the text */
.gd-faq dl{margin:0;display:flex;flex-direction:column}
.gd-faq dl > div{display:flex;flex-direction:column;gap:8px;padding:20px 0;border-top:1px solid var(--oc-border)}
.gd-faq dl > div:last-child{border-bottom:1px solid var(--oc-border)}
.gd-faq dt{font:var(--oc-type-ui-title);letter-spacing:var(--oc-tracking-ui-title)}
.gd-faq dd{margin:0;font:var(--oc-type-body);color:var(--oc-text-muted);max-width:72ch}
.gd-related{margin-top:48px;padding-top:20px;border-top:1px solid var(--oc-border);display:flex;flex-direction:column;gap:8px}
.gd-related ul{list-style:none;display:flex;flex-direction:column;gap:4px;font:var(--oc-type-body)}
.pub .gd-related a{display:inline-block;padding:2px 0}
.gd-transcript details{font:var(--oc-type-body)}
.gd-transcript summary{min-height:var(--oc-size-control-lg);display:flex;align-items:center;cursor:pointer;color:var(--oc-accent-text);font-weight:600}
.gd-transcript details[open] summary{margin-bottom:16px}

/* ---------------------------------------------------------------- the index */
.gd-cards{list-style:none;margin-top:12px;display:flex;flex-direction:column;gap:16px}
.gd-card{position:relative;display:flex;flex-direction:column;gap:12px;padding:24px;border:1px solid var(--oc-border);border-radius:var(--oc-radius-lg);background:var(--oc-surface);box-shadow:var(--oc-shadow-1);transition:box-shadow var(--oc-duration-base) var(--oc-ease-standard)}
.gd-card:hover{box-shadow:var(--oc-shadow-2);border-color:var(--oc-border-strong)}
.pub .gd-card-h{margin:0;font:var(--oc-type-heading-3);letter-spacing:var(--oc-tracking-heading-3);text-wrap:balance}
.pub .gd-card-h a{color:var(--oc-text);text-decoration:none}
/* The whole card is the title's link. */
.gd-card-h a::after{content:"";position:absolute;inset:0;border-radius:var(--oc-radius-lg)}
.gd-card-t{font:var(--oc-type-body);color:var(--oc-text-muted)}
.gd-index{padding-bottom:96px}

/* ---------------------------------------------------------------- phone */
@media (max-width:720px){
  .guide .gd-hero,.gd-index{padding:32px 0 24px}
  .guide .gd-in,.gd-index .gd-in{gap:16px}
  .pub .gd-h1{font:var(--oc-type-heading-2);letter-spacing:var(--oc-tracking-heading-2)}
  .gd-summary{padding:16px;font:var(--oc-type-body)}
  .gd-lead{font:var(--oc-type-body)}
  .gd-toc ol{padding-left:20px}
  .pub .gd-toc a,.pub .gd-related a{padding:6px 0}
  .guide .gd-body{padding:8px 0 64px}
  .pub .gd-prose h2,.pub .gd-h2{margin:40px 0 12px}
  .gd-fig{margin:24px 0}
  .gd-faq dt{font:var(--oc-type-ui-heading)}
  .gd-card{padding:20px}
  .gd-index{padding-bottom:64px}
}
@media (max-width:480px){
  .pub .gd-h1{font:var(--oc-type-heading-3);letter-spacing:var(--oc-tracking-heading-3)}
  .pub .gd-card-h{font:var(--oc-type-ui-title);letter-spacing:var(--oc-tracking-ui-title)}
}
@media (prefers-reduced-motion:reduce){.gd-card{transition:none}}
