/* mbadisrupted.com: the site layer over the section library (deliverables/mbadisrupted-redesign/build.py writes this file).
   Reading rules from the 2026-11-15 audit (docs/knowledge/blog-readability-2026-11.md): body 18px at weight 400,
   ink at 10:1 or darker, 45 to 75 characters a line, links underlined at 4.5:1, captions at 4.5:1, figures framed. */

/* header: the wordmark reads as the book's title */
.mb-hdr .hdr__mark { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.01em; }
.mb-hdr .hdr__mark span { color: var(--brand-text); }

/* opener: the book on the right, the four parts under it like a contents list */
.mb-hero__grid { align-items: center; }
.mb-hero .h-1 { font-size: clamp(3.2rem, 2rem + 6cqi, 6.4rem); }
.mb-hero__sub { font-family: var(--font-body); font-weight: 600; color: var(--ink); max-width: 30ch; }
.mb-hero .dek { max-width: 46ch; }
.mb-hero__side { display: grid; gap: 1rem; }
.mb-hero__art { display: block; }
.mb-hero__art img { display: block; width: 100%; height: auto; }
.mb-hero__toc-label { margin-top: 0.5rem; }
.mb-hero__lines { margin-top: 0; }

/* press shelf: one ink colour, even height */
.mb-press { border-block: var(--rule) solid var(--line); background: var(--paper); }
.mb-press__in { display: grid; gap: 1rem; padding-block: clamp(28px, 4vw, 44px); }
.mb-press__row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.mb-press__row img { display: block; height: 28px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) brightness(0.32); }

/* testimonials */
.mb-notes__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.mb-notes__card blockquote { margin: 0; }
.mb-notes__card blockquote p { font-size: 1.0625rem; line-height: 1.6; color: var(--ink); }
.mb-notes__by { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.1rem; }
.mb-notes__by img, .mb-notes__initial { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; }
.mb-notes__initial { display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-family: var(--font-display); font-size: 1.25rem; }
.mb-notes__by span { display: grid; gap: 0.1rem; }
.mb-notes__by span span { color: var(--ink-2); font-size: var(--step--1); }

/* author */
.mb-author__photo { background: none; }
.mb-author__photo img { display: block; width: min(100%, 460px); height: auto; aspect-ratio: 1; object-fit: contain; background: none; border-radius: 0; }
.mb-author .lede { font-weight: 600; color: var(--ink); }

/* contents: the four parts, part numbers at display size */
.mb-toc__parts { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 0; border-top: var(--rule-strong) solid var(--line-strong); }
.mb-toc__part { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; padding: 2rem 0; border-bottom: var(--rule) solid var(--line); }
.mb-toc__part:nth-child(odd) { padding-right: clamp(0px, 3vw, 40px); }
.mb-toc__no { font-family: var(--font-display); font-size: clamp(3.6rem, 2.6rem + 3cqi, 5.4rem); line-height: 0.9; color: var(--brand-text); margin: 0; min-width: 1.1ch; }
.mb-toc__body > * + * { margin-top: 0.6rem; }
.mb-toc__desc { color: var(--ink-2); max-width: 52ch; }
.mb-toc__ch { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: ch; display: grid; gap: 0.35rem; }
.mb-toc__ch li { counter-increment: ch; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.5rem; padding: 0.45rem 0; border-top: var(--rule) solid var(--line); font-weight: 500; }
.mb-toc__ch li::before { content: counter(ch, decimal-leading-zero); font-family: var(--font-label); font-size: var(--step--1); color: var(--ink-3); padding-top: 0.15rem; }

/* templates */
.mb-tpl__grid { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.mb-tpl__item a { display: grid; gap: 0.7rem; height: 100%; color: inherit; text-decoration: none; }
.mb-tpl__media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--paper-2); border: var(--rule) solid var(--line); border-radius: var(--radius-3); overflow: hidden; padding: 18px; }
.mb-tpl__media img { width: 100%; height: 100%; object-fit: contain; }
.mb-tpl__desc { color: var(--ink-2); }
.mb-tpl__item .btn { justify-self: start; margin-top: 0.2rem; }
.mb-tpl__item a:hover .h-4, .mb-tpl__item a:focus-visible .h-4 { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }

/* newsletter */
.mb-news__grid { align-items: center; }
.mb-news__topics { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mb-news__embed { background: var(--paper); border: var(--rule) solid var(--line); border-radius: var(--radius-3); padding: 8px; min-height: 336px; }
.mb-news__embed iframe { display: block; width: 100%; border: 0 !important; }

/* 126 Steps */
.mb-126__grid { align-items: center; }
.mb-126__cover { display: grid; place-items: center; background: var(--brand-tint); border-radius: var(--radius-3); padding: clamp(24px, 5vw, 64px); }
.mb-126__cover img { width: min(100%, 300px); height: auto; box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.45); }

/* cards: the blog index, the archive and the homepage's latest posts */
.mb-list__head, .mb-list__title { margin-bottom: 2rem; }
.mb-list__dek { margin: -1rem 0 2rem; max-width: 60ch; }
.mb-list__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.mb-latest .mb-list__grid { margin-top: 2.2rem; }
.mb-card { height: 100%; display: flex; flex-direction: column; gap: 0.7rem; padding: clamp(20px, 2.4vw, 28px); background: var(--paper); border: var(--rule) solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius-2); }
.mb-card__title { margin: 0; }
.mb-card__title a { color: var(--ink); text-decoration: none; }
.mb-card__title a:hover, .mb-card__title a:focus-visible { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.mb-card__excerpt { color: var(--ink-2); margin: 0; }
.mb-card__excerpt p { margin: 0; }
.mb-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.mb-card__meta { margin-top: auto; gap: 0.4rem 1rem; color: var(--ink-2); }
.mb-list__pages { margin-top: 2.4rem; gap: 1rem; font-family: var(--font-label); font-size: var(--step--1); }
.mb-list__pages a, .mb-list__pages .page-numbers { color: var(--ink); }
.mb-list__pages .current { color: var(--brand-text); font-weight: 700; }

/* single post: the reading column */
.mb-post__wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.mb-post__cat a { color: var(--brand-text); text-decoration: none; }
.mb-post__title { margin-top: 0.8rem; text-wrap: balance; }
.mb-post__meta { gap: 0.4rem 1.2rem; margin-top: 1rem; color: var(--ink-2); }
.mb-post__image img { width: 100%; height: auto; border-radius: var(--radius-3); margin-top: 1.6rem; }
.mb-post__body { margin-top: 2.2rem; font-size: 1.125rem; line-height: 1.75; color: var(--ink); }
.mb-post__body p, .mb-post__body li { color: var(--ink); }
/* links styled inline as buttons (background set in the post) keep their own colours */
.mb-post__body a:not([style*="background"]) { color: var(--brand-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mb-post__body a:not([style*="background"]):hover { text-decoration-thickness: 2px; }
.mb-post__body h2 { margin-top: 2.4em; }
.mb-post__body h3 { margin-top: 2em; }
.mb-post__body img { max-width: 100%; height: auto; border-radius: 6px; }
.mb-post__body figure { margin: 2rem 0; }
.mb-post__body figcaption { color: var(--ink-2); font-size: var(--step--1); margin-top: 0.6rem; }
.mb-post__body img[src*="/dvc-"] { border: 1px solid #cfd6dd; border-radius: 8px; box-shadow: 0 1px 3px rgb(16 24 40 / 0.08); }
.mb-post__body blockquote { margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 3px solid var(--brand); color: var(--ink); }
.mb-post__body table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.mb-post__body th, .mb-post__body td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.mb-post__body strong { color: var(--ink); }
/* old posts carry inline grey text; neutralise it, except on elements that also set their own background */
.mb-post__body [style*="color"]:not([style*="background"]) { color: inherit !important; }
.mb-post__nav { margin-top: 3rem; padding-top: 1.4rem; border-top: var(--rule) solid var(--line); gap: 1rem; }
.mb-post__nav a { color: var(--brand-text); text-decoration: none; font-weight: 600; }
.mb-post__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the book box under every post */
.mb-bookbox { margin-top: 3.2rem; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 32px); align-items: center; padding: clamp(18px, 3vw, 32px); background: var(--brand-tint); border-radius: var(--radius-3); }
.mb-bookbox__cover img { display: block; width: 100%; height: auto; }
.mb-bookbox__copy > * + * { margin-top: 0.7rem; }
.mb-bookbox__copy p { color: var(--ink); }
@media (max-width: 640px) { .mb-bookbox { grid-template-columns: 1fr; } }

/* pages (books, podcasts, communities...): readable whatever the editor stored */
.mb-page__title { margin-bottom: 2rem; }
.mb-page__body { color: var(--ink); font-size: 1.0625rem; line-height: 1.7; }
.mb-page__body a { color: var(--brand-text); }
.mb-page__body img { max-width: 100%; height: auto; }

/* search */
.mb-search { max-width: 560px; margin: 1.6rem 0; }
.mb-search .wp-block-search__input { border: var(--rule) solid var(--line-strong); padding: 0.7rem 0.9rem; font: inherit; }
.mb-search .wp-block-search__button { background: var(--brand); color: var(--brand-ink); border: 0; padding: 0.7rem 1.2rem; font-weight: 600; }
