/* featurewise.dev's own layout, on brand.css's values. */
body { margin: 0; font: var(--fw-font); color: var(--fw-text); background: var(--fw-background); }
a { color: var(--fw-accent); }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--fw-focus); border-radius: var(--fw-radius-small); }
h1, h2, h3, .bar-title { font-family: var(--fw-font-heading); font-weight: 700; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 var(--fw-space-3); color: var(--fw-brand); }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 var(--fw-space-2); color: var(--fw-brand); }
.lede { color: var(--fw-muted); font-size: 1.1rem; margin: 0 0 var(--fw-space-5); }

/* The bar across the top, as on the demos site. */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fw-space-2) var(--fw-space-5);
       padding: var(--fw-space-3) var(--fw-space-5); background: var(--fw-surface); border-bottom: 1px solid var(--fw-border); }
.bar-title { display: inline-flex; align-items: center; gap: var(--fw-space-2); font-weight: 600; font-size: var(--fw-size-h2);
             color: var(--fw-text); text-decoration: none; }
.bar-title img { width: 1.75rem; height: 1.75rem; }
.bar nav { display: flex; flex-wrap: wrap; gap: var(--fw-space-4); }
.bar nav a { color: var(--fw-muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--fw-text); }
.bar nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--fw-accent); text-decoration-thickness: 2px; text-underline-offset: .45em; }

/* A page: a readable measure for text, wider for the home page's claims. */
.page { max-width: 44rem; margin: 0 auto; padding: 2.5rem var(--fw-space-5) 3rem; }
.page:has(.hero) { max-width: 64rem; }

/* The hero: the logo beside the title and tagline, as in the bar but larger; above them on a phone. */
.hero { display: flex; align-items: center; justify-content: center; gap: var(--fw-space-5); padding: var(--fw-space-5) 0 2rem; }
.hero-logo { width: 7rem; height: 7rem; flex: none; }
.hero h1 { font-size: 2.5rem; margin: 0 0 var(--fw-space-1); }
.hero .lede { margin: 0; }
@media (max-width: 40rem) {
  .hero { flex-direction: column; text-align: center; gap: var(--fw-space-3); }
  .hero-logo { width: 5.5rem; height: 5.5rem; }
}
/* The case for featurewise organisation, in headings and paragraphs at a reading measure, then the
   picture, full size so its names read, with the buttons and the latest posts in the same column. On a
   wide screen the page widens, and the picture moves beside the text, staying in view. */
.picture { max-width: 38rem; margin: 3rem auto 0; }
@media (min-width: 80rem) {
  .page:has(.hero) { max-width: 88rem; }
  .argument { display: grid; grid-template-columns: 38rem minmax(0, 1fr); gap: 3rem; align-items: start; }
  .argument .case { grid-column: 1; grid-row: 1; margin: 0; }
  .argument .picture { grid-column: 2; grid-row: 1; position: sticky; top: 2rem; max-width: 44rem; margin: 2rem 0 0; }
  .page .actions, .page .latest { margin-left: 0; }
}
/* The picture and its caption share one round-cornered frame. */
.picture { box-sizing: border-box; background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); overflow: hidden; }
.picture img { display: block; width: 100%; height: auto; }
.picture figcaption { color: var(--fw-muted); font-size: .82rem; line-height: 1.5; padding: 0 var(--fw-space-4) var(--fw-space-3); }
.case, .actions, .latest { max-width: 38rem; margin-left: auto; margin-right: auto; }
.case h2 { margin: 2rem 0 var(--fw-space-1); }
.case p { margin: 0; font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--fw-space-3); margin-top: 2rem; margin-bottom: 2rem; }
.button { display: inline-block; padding: var(--fw-space-2) var(--fw-space-5); border-radius: var(--fw-radius-small);
          border: 1px solid var(--fw-border); background: var(--fw-surface); color: var(--fw-text); text-decoration: none; }
.button.primary { background: var(--fw-brand); border-color: var(--fw-brand); color: var(--fw-on-brand); }
.button.primary:hover { filter: brightness(1.15); }
.latest { margin-top: 3rem; }

/* Posts and lists of them. */
.post-meta { color: var(--fw-muted); font-size: var(--fw-size-small); margin: 0 0 var(--fw-space-1); }
.post-meta a { color: inherit; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: var(--fw-space-4) 0; border-bottom: 1px solid var(--fw-border); }
.post-list h2 { margin: 0 0 var(--fw-space-1); font-size: 1.2rem; }
.post-list h2 a { color: var(--fw-text); text-decoration: none; }
.post-list h2 a:hover { color: var(--fw-accent); }
.post-list p { margin: 0; }
.post { font-size: 1.05rem; line-height: 1.65; }
.categories { display: flex; flex-wrap: wrap; gap: var(--fw-space-4); margin: 0 0 var(--fw-space-4); }

/* Code, in posts and pages. */
pre { background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius);
      padding: var(--fw-space-3) var(--fw-space-4); overflow-x: auto; font-size: .85rem; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
pre code { font-size: inherit; }
.page img { max-width: 100%; height: auto; border: 1px solid var(--fw-border); border-radius: var(--fw-radius); }
.page .hero img, .page .picture img, .bar img, .footer img { border: none; border-radius: 0; }

/* Comments, by giscus, after a post. */
.comments { margin-top: 3rem; padding-top: var(--fw-space-4); border-top: 1px solid var(--fw-border); }
.comments h2 { margin-top: 0; }
.comments-note { color: var(--fw-muted); font-size: var(--fw-size-small); }

/* The book's contents. */
.toc { list-style: none; padding: 0; margin: var(--fw-space-4) 0; display: grid; gap: var(--fw-space-3); }
.toc li { display: flex; gap: var(--fw-space-4); }
.toc-number { flex: 0 0 2rem; color: var(--fw-muted); font-weight: 600; text-align: right; }
.toc p { margin: 0; color: var(--fw-muted); font-size: 1rem; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fw-space-5); padding: 2rem var(--fw-space-5);
          border-top: 1px solid var(--fw-border); color: var(--fw-muted); font-size: var(--fw-size-small); }
.footer a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: var(--fw-space-1); }
.footer img { width: 1rem; height: 1rem; }
