/* Free guides (src/layouts/Guide.astro, pages/guides/): the Playbook guide look (access.css) plus the breadcrumb,
   reading time, cover, step diagrams, the kit lines and the guides index. Band colour follows the guide's kit. */

.band.setup { background: var(--kit-setup); }
.crumbs { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--kr-black); }
.crumbs img { display: block; height: 30px; width: auto; }
.band h1 { margin-top: .75rem; }
.meta { margin: 0; font-weight: 700; color: #3B3A36; }
.cover { display: block; width: 100%; height: auto; margin-top: .75rem; border-radius: 14px; box-shadow: 0 14px 36px rgba(20,20,20,.16); }

/* "In this guide": the Playbook's numbered jump list, in its own box */
.toc { padding: 1.25rem; border-radius: 16px; border: 1px solid var(--line); }
.page .toc h2 { font-size: 1.25rem; margin: 0 0 .875rem; }

/* every part sits in its own soft box, so sections never run together on a phone */
.guide { gap: 1.25rem; }
.part { padding: 1.5rem 1.25rem; border-top: 0; border-radius: 16px; background: var(--surface, var(--tile)); border: 1px solid var(--line); }
@media (min-width: 48rem) { .part { padding: 2rem; } }
.part-head.plain { grid-template-columns: 1fr; }
.part-head.plain h2 { padding-top: 0; }
.part p a, .part li a, .shot figcaption a, .flow figcaption a { text-underline-offset: .18em; }

/* a step diagram: boxes and arrows, across on a wide screen, down on a phone */
.flow { margin: .5rem 0; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 40rem) { .flow ol { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2.25rem; } }
.flow li { position: relative; display: grid; gap: .3rem; align-content: start; padding: 1rem 1.125rem; border-radius: 14px; background: var(--tile); line-height: 1.4; }
.flow li b { font: 800 1.0625rem/1.2 var(--font-display); }
.flow li span { font-size: .9375rem; color: var(--muted); }
.flow li + li::before { content: ""; position: absolute; left: 50%; top: -1.6rem; width: 1.2rem; height: 1.2rem; transform: translateX(-50%); background: var(--fg); -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v13m0 0l-5-5m5 5l5-5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (min-width: 40rem) { .flow li + li::before { left: -1.75rem; top: 50%; transform: translateY(-50%) rotate(-90deg); } }
.flow figcaption { margin-top: .625rem; font-size: .9375rem; color: var(--muted); }

/* the kit line in the middle of a guide, and the kit card at the end */
.kit-mid { display: grid; gap: .875rem; justify-items: start; padding: 1.125rem 1.25rem; border-radius: 14px; background: var(--kit-seo); color: var(--kr-black); }
.kit-mid.setup { background: var(--kit-setup); }
.kit-mid p { margin: 0; font-weight: 700; line-height: 1.45; }
.kit-mid .buy { min-height: 48px; background: var(--kr-black); color: var(--kr-yellow); }
.kit-mid :focus-visible { outline-color: var(--kr-black); }
@media (min-width: 40rem) { .kit-mid { grid-template-columns: 1fr auto; align-items: center; } }
.kit-end h2 { color: var(--kr-white); }

/* "More guides" and the /guides index: cover tiles */
.more h2 { font-size: 1.5rem; margin-bottom: .875rem; }
.more ul, .list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .more ul, .list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.more a, .list a { display: grid; gap: .75rem; padding: .75rem .75rem 1rem; border-radius: 16px; background: var(--tile); color: var(--fg); text-decoration: none; font-weight: 700; line-height: 1.3; transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s cubic-bezier(.16,1,.3,1); }
.more a:hover, .list a:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,20,20,.12); }
.more img, .list img { width: 100%; height: auto; border-radius: 10px; }
.list h2 { font-size: 1.375rem; margin: 0 .25rem; }
.list p { margin: 0 .25rem; font-weight: 400; color: var(--muted); line-height: 1.5; }
.list .meta { color: var(--muted); font-size: .9375rem; }

/* screenshots are captured at 440 px with 15 px text: full width on a phone, never blown up on a desktop */
.guide .shot img { width: 100%; max-width: 27.5rem; }

/* the preferred-source ask: small, quiet, once in the middle of a guide */
.pref { display: grid; justify-items: center; text-align: center; gap: .75rem; padding: 1rem 1.125rem; border-radius: 14px; border: 2px dashed var(--line); }
.pref svg { flex: none; }
.pref p { display: inline-flex; align-items: center; gap: .5rem; }
.pref p { margin: 0; line-height: 1.5; }
.pref-badge { display: block; border-radius: 12px; line-height: 0; }
.pref-badge img { display: block; width: 254px; max-width: 100%; height: auto; }
.pref-badge:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

/* critique fixes (Impeccable, 2026-11-02) */
/* "In this guide": the intro has no number, so list numbers match the step badges */
.toc li.plain { counter-increment: none; }
.toc li.plain a::before { visibility: hidden; }
/* phones: screenshots run to the edges of their box so code text stays readable; the cover (it repeats the title) hides */
@media (max-width: 47.99rem) {
  .part .shot { margin-inline: -1.25rem; }
  .part .shot img { max-width: none; border-radius: 0; border-inline: 0; box-shadow: none; }
  .part .shot figcaption { padding-inline: 1.25rem; }
}
@media (max-width: 40rem) { .band .cover { display: none; } }
/* the kit card at the end wears the kit colour in both themes (black on black vanished in dark mode) */
.kit-end { background: var(--kit-seo); color: var(--kr-black); border: 0; }
.kit-end.setup { background: var(--kit-setup); }
.kit-end h2, .kit-end p { color: var(--kr-black); }
.kit-end .buy { background: var(--kr-black); color: var(--kr-yellow); }
.kit-end :focus-visible { outline-color: var(--kr-black); }
/* the kit line reads as text, not a bold block */
.kit-mid p { font-weight: 400; }
/* guides index: one guide sits as a wide row card; every card says it opens */
.list:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .list:has(> li:only-child) a { grid-template-columns: 18rem 1fr; align-items: center; column-gap: 1.5rem; } .list:has(> li:only-child) img { grid-row: span 4; } }
.list .go { margin: 0 .25rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.list .go::after { content: ""; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: var(--right) center / contain no-repeat; mask: var(--right) center / contain no-repeat; --right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12m0 0l-5-5m5 5l-5 5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* inline code wraps only between words, so "--scope project" never splits at its hyphens */
.part p code, .part li code { overflow-wrap: break-word; }

/* Newest | Most read switch above a guide list (components/guide/SortGuides.astro) */
.sort { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 1rem; border-radius: 999px; background: var(--tile); }
.sort button { min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--fg); font: 700 1rem/1 var(--font-body); cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--button-bg); color: var(--button-fg); }

/* Newest | Most read switch above a guide list (components/guide/SortGuides.astro) */
.sort { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 1rem; border-radius: 999px; background: var(--tile); }
.sort button { min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--fg); font: 700 1rem/1 var(--font-body); cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--button-bg); color: var(--button-fg); }
