/* Playbook: same type as the site, wider shell + sidebar */

.playbook-page .header-grid,
.playbook-page .footer-content,
.playbook-page .menu-items {
    max-width: 1120px;
}

.playbook-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    width: 100%;
    align-self: stretch;
    flex: 1 0 auto;
    box-sizing: border-box;
    max-width: 1120px;
    margin: 74px auto 0;
    padding: 0 20px 40px;
}

/* Site footer (includes/footer.php). Drop the old gray bar from my.css. */
body.playbook-page > .tb-footer {
    margin-top: 0;
}

body.playbook-page .tb-feedback-dialog h2 {
    font-family: Nunito, sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.92);
}

html:not([data-theme="dark"]) body.playbook-page .tb-feedback-dialog h2 {
    color: #241b16;
}

.playbook-sidebar {
    position: sticky;
    top: 74px;
    align-self: start;
    padding-top: 8px;
}

.playbook-kicker {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #555;
}

.playbook-kicker a {
    text-decoration: none;
}

.playbook-kicker-sub {
    margin-top: 28px;
}

.playbook-nav-group {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
    margin: 18px 0 8px;
}

.playbook-nav-group:first-of-type {
    margin-top: 0;
}

.playbook-nav,
.playbook-toc {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playbook-nav a,
.playbook-toc a {
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
    color: #222;
}

.playbook-nav a:hover,
.playbook-toc a:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.playbook-nav a.is-current {
    font-weight: 700;
    text-decoration: underline;
}

.playbook-toc a {
    font-size: 13px;
    color: #444;
}

.playbook-toc .toc-h3 {
    padding-left: 12px;
}

.playbook-main {
    width: 100%;
    min-width: 0;
    max-width: 800px;
    justify-self: start;
}

.playbook-main .page-title {
    margin-top: 0;
}

.playbook-lead {
    font-family: "Source Serif Pro", serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.45;
}

.playbook-source {
    color: #555;
    font-size: 15px;
}

.playbook-avatar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 8px;
}

.playbook-avatar-row img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.playbook-avatar-row .author-logo,
.playbook-author .author-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    background: transparent;
}

.playbook-avatar-row .author-logo {
    width: 56px;
    height: 56px;
}

.playbook-author .author-logo {
    width: 120px;
    height: 120px;
    align-self: start;
}

.playbook-page .author-logo img.is-logo {
    width: 76.395%;
    height: 76.395%;
    border-radius: 0;
    object-fit: contain;
    padding: 0;
    background: transparent;
}

.playbook-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0 36px;
}

.playbook-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 18px 20px;
    border: 1px solid #e5e5e5;
    text-decoration: none;
    background: #fafafa;
}

.playbook-card:hover {
    text-decoration: none;
    border-color: #111;
}

.playbook-card-kicker {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
}

.playbook-card strong {
    font-family: "Source Serif Pro", serif;
    font-size: 22px;
    font-weight: 600;
}

.playbook-card span:last-child {
    color: #333;
    font-size: 15px;
    line-height: 1.45;
}

.pipeline-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    margin: 36px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.pipeline-step:last-of-type {
    border-bottom: none;
}

.pipeline-step h2 {
    margin-top: 0;
    font-size: 28px;
}

.pipeline-num {
    width: 40px;
    height: 40px;
    border: 1px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Source Serif Pro", serif;
    font-size: 20px;
    margin-top: 6px;
}

.pipeline-artifact {
    color: #444;
    font-size: 16px;
}

.pipeline-faces {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 12px;
}

.pipeline-faces a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.pipeline-faces img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.playbook-author {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 28px;
    margin: 48px 0;
    scroll-margin-top: 24px;
}

.playbook-author img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.playbook-author h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    font-size: 28px;
}

.author-github {
    display: inline-flex;
    flex: none;
    line-height: 0;
    text-decoration: none;
}

.author-github svg {
    width: 26px;
    height: 26px;
    display: block;
}

.author-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.author-roles span {
    border: 1px solid #ccc;
    padding: 2px 8px;
    font-size: 13px;
}

.author-insight {
    font-family: "Source Serif Pro", serif;
    font-size: 18px;
}

.template-block {
    margin: 40px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.template-letter {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 0;
}

.template-block h2 {
    margin-top: 6px;
}

.playbook-pre {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
}

.playbook-crumb {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
}

.example-switcher {
    display: flex;
    gap: 8px;
    margin: 20px 0 28px;
}

.example-switcher a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #111;
    text-decoration: none;
    font-family: "Source Serif Pro", serif;
}

.example-switcher a.is-current {
    background: #111;
    color: #fff;
}

.template-banner {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #111;
    padding: 16px 18px;
    margin: 0 0 32px;
    font-size: 15px;
}

.template-banner h1 {
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.template-banner p {
    margin: 0 0 8px;
    color: #444;
}

.template-banner pre {
    margin: 10px 0 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    font-size: 12px;
    line-height: 1.45;
    overflow: auto;
    white-space: pre-wrap;
}

.exemplar-article h1.article-title {
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
    margin: 0 0 8px;
}

.exemplar-article .meta {
    font-size: 14px;
    color: #555;
    margin-bottom: 24px;
}

.exemplar-article .badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid #ddd;
    border-radius: 999px;
    margin-right: 6px;
    color: #666;
}

.playbook-prose > h1:first-child {
    display: none;
}

.playbook-prose h2 {
    font-size: 30px;
}

.playbook-prose h3 {
    font-size: 22px;
}

.playbook-prose pre {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}

.playbook-prose code {
    font-size: 0.9em;
}

.playbook-prose blockquote {
    margin: 20px 0;
    padding-left: 16px;
    border-left: 3px solid #111;
}

.playbook-table-wrap {
    overflow-x: auto;
    margin: 16px 0 24px;
}

.playbook-table-wrap table {
    font-size: 15px;
}

.playbook-table-wrap th {
    white-space: nowrap;
    vertical-align: top;
}

.playbook-model-stats caption {
    caption-side: bottom;
    text-align: left;
    padding-top: 10px;
    font-size: 13px;
    color: #666;
}

.playbook-model-stats thead th:not(:first-child),
.playbook-model-stats td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.playbook-model-stats tbody th {
    font-weight: 600;
}

.pass-log td:last-child {
    min-width: 260px;
}

.check-pass {
    color: #0a6b0a;
}

.check-fail {
    color: #a40000;
}

.check-warn {
    color: #8a5a00;
}

.muted {
    color: #777;
}

.playbook-details {
    margin: 12px 0 24px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    padding: 8px 16px;
}

.playbook-details summary {
    cursor: pointer;
    font-weight: 600;
    padding: 6px 0;
}

.playbook-prose-embedded h2 {
    font-size: 22px;
}

.playbook-prose-embedded h3 {
    font-size: 18px;
}

.playbook-prose-embedded > h2:first-child {
    display: none;
}
@media screen and (max-width: 860px) {
    .playbook-shell {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .playbook-sidebar {
        position: static;
        padding-top: 0;
    }

    .playbook-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .playbook-toc {
        display: none;
    }

    .playbook-cards {
        grid-template-columns: 1fr;
    }

    .playbook-author {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* Thinking Bugs header themes: computer (data-theme=dark) and garden.
   Paint the canvas on html as well: my.css locks html/body to height 100%,
   which cut the body background off at the viewport. */
html:has(body.playbook-page),
body.playbook-page {
    height: auto;
    min-height: 100%;
}

html:has(body.playbook-page),
body.playbook-page {
    --pb-ink: rgba(238, 241, 248, 0.93);
    --pb-muted: rgba(238, 241, 248, 0.66);
    --pb-faint: rgba(238, 241, 248, 0.42);
    --pb-line: rgba(255, 255, 255, 0.14);
    --pb-panel: rgba(255, 255, 255, 0.045);
    --pb-panel-2: rgba(255, 255, 255, 0.08);
    --pb-link: #8dffb0;
    --pb-accent: #50fa7b;
    margin: 0;
    color: var(--pb-ink);
    background-color: #09090f;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 36px 36px, 36px 36px;
    background-attachment: fixed;
    font-family: Nunito, Inter, sans-serif;
}

html:not([data-theme="dark"]):has(body.playbook-page),
html:not([data-theme="dark"]) body.playbook-page {
    --pb-ink: #241b16;
    --pb-muted: #6f6255;
    --pb-faint: #9a8875;
    --pb-line: rgba(71, 57, 45, 0.16);
    --pb-panel: rgba(255, 250, 239, 0.72);
    --pb-panel-2: rgba(255, 255, 255, 0.55);
    --pb-link: #1f6b48;
    --pb-accent: #2f7d56;
    color: #241b16;
    background-color: #f6efe3;
    background-image:
        radial-gradient(circle at 14% 0%, rgba(255, 184, 77, 0.22), transparent 24rem),
        linear-gradient(180deg, #fff8eb 0%, #f6efe3 46%, #efe0c9 100%);
    background-repeat: no-repeat;
    background-size: auto;
    background-attachment: fixed;
}

body.playbook-page a {
    color: var(--pb-link);
}

body.playbook-page .author-github {
    color: var(--pb-ink);
}

body.playbook-page .author-github:hover,
body.playbook-page .author-github:focus-visible {
    color: var(--pb-accent);
}

body.playbook-page h1,
body.playbook-page h2,
body.playbook-page h3,
body.playbook-page h4 {
    color: var(--pb-ink);
    font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

.playbook-page .playbook-kicker,
.playbook-page .playbook-source,
.playbook-page .playbook-crumb,
.playbook-page .template-letter,
.playbook-page .pipeline-artifact,
.playbook-page .muted {
    color: var(--pb-muted);
}

.playbook-page .playbook-nav-group,
.playbook-page .playbook-card-kicker,
.playbook-page .playbook-model-stats caption,
.playbook-page .playbook-toc a {
    color: var(--pb-faint);
}

.playbook-page .playbook-nav a,
.playbook-page .playbook-card span:last-child,
.playbook-page .playbook-prose,
.playbook-page .playbook-main {
    color: var(--pb-ink);
}

.playbook-page .playbook-card,
.playbook-page .playbook-pre,
.playbook-page .playbook-prose pre,
.playbook-page .playbook-details,
.playbook-page .template-banner {
    background: var(--pb-panel);
    border-color: var(--pb-line);
    color: var(--pb-ink);
}

.playbook-page .playbook-card:hover,
.playbook-page .pipeline-num,
.playbook-page .playbook-prose blockquote {
    border-color: var(--pb-accent);
}

.playbook-page .pipeline-step,
.playbook-page .template-block {
    border-bottom-color: var(--pb-line);
}

.playbook-page table,
.playbook-page th,
.playbook-page td {
    color: var(--pb-ink);
    border-color: var(--pb-line);
}

.playbook-page thead {
    border-bottom-color: var(--pb-line);
}

.playbook-page tbody tr:nth-child(even) {
    background: var(--pb-panel);
}

.playbook-page code {
    color: var(--pb-ink);
}

/* Heading scale: h1 stays heavier than the sections under it. */
.playbook-page h1,
.playbook-page h1.page-title {
    font-weight: 700;
    font-size: 44px;
    line-height: 1.15;
}

.playbook-page h2,
.playbook-page .pipeline-step h2,
.playbook-page .playbook-author h2,
.playbook-page .playbook-prose h2 {
    font-weight: 600;
    font-size: 32px;
    line-height: 1.2;
}

.playbook-page h3,
.playbook-page .playbook-prose h3 {
    font-weight: 600;
    font-size: 24px;
    line-height: 1.25;
}

.playbook-page h4 {
    font-weight: 600;
    font-size: 20px;
    line-height: 1.3;
}
