/*
Theme Name: benart
Theme URI: https://benjamin.art/
Author: benjamin.art
Author URI: https://benjamin.art/
Description: A simple modular portfolio theme
Version: 1.0.0
Text Domain: benart
*/

/* Custom fonts */

@font-face {
    font-family: "Faculty Glyphic";
    src: url("assets/fonts/FacultyGlyphic.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Patua One";
    src: url("assets/fonts/PatuaOne.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* Source Code Pro variable font (self-hosted). font-weight range lets the browser use the variable axis. */
@font-face {
    font-family: "Source Code Pro";
    src: url("assets/fonts/SourceCodePro.ttf") format("truetype");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Theme palette */
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --colorbase-light: #546175;
    --colorbase-med: #334155;
    --colorbase-dark: #1e293b;
    --colorbase-darkest: #0f172a;
    --colorpop-pale: #f3e3eb;
    --colorpop-light: #ff6b9d;
    --colorpop-med: #ff1493;
    --colorpop-dark: #c71585;
    --colorpop-darkest: #6f455f;
    --colorpop-desat-med: #aa5984;
    --colorpop-desat-dark: #5c3b4d;
    --color-border: #eaeaea;
    --colorthree-med: #f7e08a;
    --colorthree-pale: #fef7df;
    --postit-bg: #fff9c9;
    --postit-border: #f0e8b0;
    --postit-shadow: rgba(90, 75, 30, 0.14);

    /* App palette */
    --app-bg: #0f172a;
    --app-bg-elevated: #1e293b;
    --app-text: #f1f5f9;
    --app-text-muted: #94a3b8;
    --app-border: #334155;
    --app-accent: #ff6b9d;
    --app-accent-hover: #fda4c8;
    --app-accent-deep: #e879a5;

    /* Typography */
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-mono: "Source Code Pro", ui-monospace, monospace;

    /* Spacing */
    --spacing-unit: 1rem;
    --container-width: 1200px;
    --intro-portrait-right-gap: 1.5rem;

    /* Dark band gradient (slate left-to-right) */
    --gradient-band-dark: linear-gradient(to right, var(--colorbase-med) 0%, var(--colorbase-dark) 100%);

    /* Page title band (medium-dark pink, shorter than single-post band) */
    --gradient-band-page: linear-gradient(to right, var(--colorpop-desat-med) 0%, var(--colorpop-dark) 100%);
}

::selection {
    background: var(--colorthree-med);
    color: #1a1a1a;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    font-weight: 700;
}

a {
    color: var(--colorpop-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--colorpop-med);
}

/* Blockquote */
blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem 1rem 2rem;
    border-left: 4px solid var(--colorpop-light);
    background-color: #fafafa;
}

blockquote p,
blockquote ul,
blockquote ol,
blockquote li,
blockquote h1,
blockquote h2,
blockquote h3,
blockquote h4 {
    color: var(--color-text);
    line-height: 1.7;
    font-family: "Source Code Pro";
}

blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
    margin-bottom: 0;
}

blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--color-text-light);
}

/* Responsive content: images and embeds */
.entry-content img,
article img,
.site-main img {
    max-width: 100%;
    height: auto;
    display: block;
}

.entry-content iframe,
.entry-content embed,
.entry-content object,
article iframe,
article embed,
article object {
    max-width: 100%;
}

.entry-content,
article .entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Auto-truncated excerpts: last words fade left → right */
.benart-excerpt-fade-tail {
    display: inline;
    -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, transparent 100%);
}

.benart-excerpt-fade p:last-child {
    margin-bottom: 0;
}

.entry-content pre,
.entry-content code,
article pre,
article code {
    max-width: 100%;
    overflow-x: auto;
}

/* Post content tables */
.entry-content .wp-block-table,
.entry-content figure.wp-block-table,
article .entry-content .wp-block-table,
article .entry-content figure.wp-block-table {
    display: flow-root;
    margin-block: 1.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.entry-content .wp-block-table table,
.entry-content figure.wp-block-table table,
article .entry-content .wp-block-table table,
article .entry-content figure.wp-block-table table {
    margin: 0;
}

.entry-content table,
article .entry-content table {
    width: 100%;
    min-width: 280px;
    margin-block: 1.75rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

.entry-content table caption,
article .entry-content table caption {
    caption-side: bottom;
    padding: 0.65rem 1rem 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: left;
}

.entry-content thead th,
.entry-content thead td,
article .entry-content thead th,
article .entry-content thead td {
    background: var(--gradient-band-dark);
    color: #f8fafc;
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: left;
    vertical-align: bottom;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--colorbase-darkest);
}

.entry-content tbody th,
article .entry-content tbody th {
    background-color: #f1f5f9;
    color: var(--colorbase-dark);
    font-weight: 600;
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.entry-content td,
article .entry-content td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.entry-content tbody tr:last-child td,
.entry-content tbody tr:last-child th,
article .entry-content tbody tr:last-child td,
article .entry-content tbody tr:last-child th {
    border-bottom: none;
}

.entry-content tbody tr:nth-child(even) td,
.entry-content tbody tr:nth-child(even) th,
article .entry-content tbody tr:nth-child(even) td,
article .entry-content tbody tr:nth-child(even) th {
    background-color: #f8fafc;
}

.entry-content tbody tr:hover td,
.entry-content tbody tr:hover th,
article .entry-content tbody tr:hover td,
article .entry-content tbody tr:hover th {
    background-color: var(--colorpop-pale);
}

.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
article .entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
    background-color: #f8fafc;
}

.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(even) td,
article .entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(even) td {
    background-color: var(--color-bg);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Header */
.site-header {
    position: relative;
    z-index: 20;
    padding: 1.25rem var(--spacing-unit) 0.8rem;
}

.site-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.site-menu-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: 0.15rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    color: #4a5c85;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
    border-color: rgba(74, 92, 133, 0.25);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    color: #7b8fc4;
    outline: none;
}

.site-menu-toggle-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 1.25rem;
}

.site-menu-toggle-bar {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    box-sizing: border-box;
}

.site-menu-overlay[hidden] {
    display: none;
}

.site-menu-overlay:not(.is-open) {
    pointer-events: none;
}

.site-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.32s ease;
}

.site-menu-overlay.is-open .site-menu-backdrop {
    opacity: 1;
}

.site-menu-panel {
    position: relative;
    z-index: 1;
    width: min(100%, var(--container-width));
    margin: auto;
    overflow: visible;
    /* Inset padding keeps card box-shadows inside the scrollable overlay */
    padding: 2.5rem;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.32s ease,
        transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-menu-overlay.is-open .site-menu-panel {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .site-menu-backdrop,
    .site-menu-panel {
        transition: none;
    }
}

.site-menu-grid.project-grid {
    margin: 0;
}

.site-menu-grid .project-card {
    opacity: 1;
    animation: none;
    overflow: visible;
}

body.site-menu-open {
    overflow: hidden;
}

body.site-menu-open .site-header {
    z-index: 10001;
}

.site-branding {
    text-align: left;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.logo-scale-wrapper {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
}

/* Animated logo: benjamin.art typing effect */
.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:visited {
    color: inherit;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    cursor: default;
    max-width: 100%;
    min-width: 0;
    transform-origin: left center;
}

.logo-text {
    font-size: calc(1.2rem + 1.4vw);
    font-weight: 800;
    color: #4a5c85;
    font-family: "Source Code Pro";
    display: flex;
    align-items: center;
    gap: 0.05rem;
    text-transform: lowercase;
    white-space: nowrap;
}

/* Subtle retro monitor phosphor glow on logo text */
.logo-text .prompt {
    color: #c15795;
    margin-right: 6px;
    font-size: calc(1.2rem + 1.4vw);
    text-shadow:
        0 0 8px rgba(154, 125, 142, 0.4),
        0 0 16px rgba(154, 125, 142, 0.2);
}

.logo-text .logo-link {
    color: #4a5c85;
    text-shadow:
        0 0 8px rgba(94, 114, 165, 0.5),
        0 0 18px rgba(148, 163, 207, 0.28),
        0 0 28px rgba(203, 213, 232, 0.15);
}

.logo-text .logo-link:hover {
    color: #7b8fc4;
}

.logo-text .cursor {
    background-color: #6b7fa3;
    width: 0.7rem;
    height: calc(1.2rem + 1.4vw);
    display: inline-block;
    vertical-align: middle;
    animation: cursor-blink 2s ease-in-out infinite;
    position: relative;
    top: 1px;
    margin-left: 7px;
}

.logo-text .logo-category-link,
.logo-text .logo-suffix {
    color: var(--colorpop-desat-med);
    text-decoration: none;
    text-shadow:
        0 0 8px rgba(170, 89, 132, 0.4),
        0 0 16px rgba(199, 140, 170, 0.2);
}

.logo-text .logo-category-link:hover {
    color: var(--colorpop-light);
}

@keyframes cursor-blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 600px) {
    .logo-text .prompt {
        font-size: 1.6rem;
    }

    .logo-text .cursor {
        height: 1.5rem;
    }
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.site-title a {
    color: var(--color-text);
}

.site-title a:hover {
    color: var(--colorpop-light);
}

/* Modules */
.module {
    padding: 4rem 0;
}

.module-full {
    background-color: #f8f8f8;
}

/* Reduce padding for intro to allow portrait to overlap */
.module-intro {
    position: relative;
    padding: 2rem 0;
    background: var(--gradient-band-dark);
    color: #f8fafc;
    overflow: visible;
}

/* Clips portrait on the right only; extends up so top overlap is not clipped */
.intro-portrait-clip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: -400px;
    overflow-x: hidden;
    overflow-y: visible;
    pointer-events: none;
    z-index: 10;
}

.intro-portrait-clip .intro-portrait {
    pointer-events: auto;
}

.module-intro .intro-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: #fff;
    padding-top: 1.5rem;
}

.module-intro .intro-text {
    font-size: 1.25rem;
    color: #e2e8f0;
    padding-right: 30px;
    padding-bottom: 1.5rem;
}

.intro-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.intro-content {
    flex: 1;
}

/* Spacer for grid when portrait is absolutely positioned */
.intro-portrait-spacer {
    flex: 0 0 280px;
}

/* Portrait width used for positioning; must match .portrait-image max-width */
.intro-portrait {
    position: absolute;
    bottom: 0;
    /* Always keep --intro-portrait-right-gap from right edge; stay on-screen with left buffer */
    right: min(calc(100% - 500px - var(--spacing-unit)), max(var(--intro-portrait-right-gap), calc((100% - var(--container-width)) / 2 + var(--spacing-unit) + 45px)));
    width: 280px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 10;
    overflow: visible;
    pointer-events: none;
}

.intro-portrait .portrait-image {
    pointer-events: auto;
}

/* Portrait: fixed size above breakpoint */
.module-intro .portrait-image {
    display: block;
    width: auto;
    max-width: 500px;
    height: 350px;
    object-fit: contain;
    object-position: bottom center;
}

/* Framework Module */
.module-framework {
    text-align: center;
    background: linear-gradient(180deg, #f0f0f0 0%, #e8e8e8 100%);
    color: var(--color-text);
    border-top: 2px solid var(--colorpop-light);
    border-bottom: 2px solid var(--colorpop-light);
}

.framework-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.framework-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--color-text-light);
}

.button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--colorpop-light);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background-color: var(--colorpop-med);
    color: #fff;
    transform: translateY(-2px);
}

/* Hide portrait below threshold */
@media (max-width: 900px) {
    .intro-grid {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .intro-portrait-spacer,
    .intro-portrait-clip {
        display: none;
    }
}

/* Homepage: section labels (sketchbooks, 3D print designs, find me online) */
.module-sketchbooks .module-section-label,
.module-cad-designs .module-section-label,
.find-me-online .section-label,
.latest .section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 var(--homepage-section-header-gap, 1.25rem);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    color: var(--colorpop-desat-med);
}

.module-sketchbooks .module-section-label::before,
.module-sketchbooks .module-section-label::after,
.module-cad-designs .module-section-label::before,
.module-cad-designs .module-section-label::after,
.find-me-online .section-label::before,
.find-me-online .section-label::after,
.latest .section-label::before,
.latest .section-label::after {
    content: '';
    flex: 1 1 0;
    height: 1px;
    background: var(--color-border);
}

.module-sketchbooks {
    padding-bottom: 1rem;
}

.module-sketchbooks .project-card .project-title {
    margin-bottom: 0.6rem;
}

.module-sketchbooks .project-card .project-daterange {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.module-cad-designs {
    padding: 0;
}

.cad-designs-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.cad-designs-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    color: #fff;
    border: 5px solid #fff;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    line-height: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.cad-designs-card:hover,
.cad-designs-card:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.cad-designs-card__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.cad-designs-card__placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.cad-designs-card__title {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    display: block;
    padding: 2.5rem 0.85rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
}

.cad-designs-card--more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--color-text);
    line-height: 1.35;
}

.cad-designs-card--more:hover,
.cad-designs-card--more:focus-visible {
    color: var(--color-text);
}

.cad-designs-card__more-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.find-me-online {
    padding: 0;
}

.find-me-online .find-me-icons {
    --find-me-gap: clamp(0.75rem, 2vw, 1.25rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--find-me-gap);
}

.find-me-online .find-me-icon {
    width: 64px;
    flex: none;
}

.latest {
    padding: 0;
}

/* Homepage: uniform vertical spacing between sections */
body.home {
    --homepage-section-gap: 3rem;
    --homepage-section-header-gap: calc(var(--homepage-section-gap) / 2);
}

body.home .site-main > .module-intro {
    padding-top: 2rem;
    padding-bottom: var(--homepage-section-header-gap);
    margin-bottom: var(--homepage-section-header-gap);
}

body.home .site-main > .latest,
body.home .site-main > .module-sketchbooks,
body.home .site-main > .module-cad-designs,
body.home .site-main > .find-me-online {
    padding-top: 0;
    padding-bottom: var(--homepage-section-header-gap);
}

.latest-zipgallery-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.latest-zipgallery-item__trigger {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 5px solid #fff;
    border-radius: 16px;
    background: none;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
    line-height: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.latest-zipgallery-item__trigger:hover,
.latest-zipgallery-item__trigger:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.latest-zipgallery-item__trigger .latest-zipgallery-item__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

html.latest-viewer-open {
    overflow: hidden;
}

.latest-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: safe center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.latest-viewer[hidden] {
    display: none;
}

.latest-viewer__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: default;
}

.latest-viewer__inner {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    pointer-events: none;
}

.latest-viewer__figure {
    margin: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    width: fit-content;
    max-width: 100%;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    min-height: 0;
    pointer-events: none;
}

.latest-viewer__source {
    margin: 0 0 0.85rem;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
    grid-row: 1;
}

.latest-viewer__source[hidden] {
    display: none;
}

.latest-viewer__source-prefix {
    color: #fff;
}

.latest-viewer__source-link,
.latest-viewer__license .benart-cc-license a,
.zipgallery-lightbox__caption .benart-cc-license a,
.zipgallery-lightbox__license .benart-cc-license a {
    color: color-mix(in srgb, var(--colorpop-light) 72%, #fff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.latest-viewer__source-link:hover,
.latest-viewer__source-link:focus-visible,
.latest-viewer__license .benart-cc-license a:hover,
.latest-viewer__license .benart-cc-license a:focus-visible,
.zipgallery-lightbox__caption .benart-cc-license a:hover,
.zipgallery-lightbox__caption .benart-cc-license a:focus-visible,
.zipgallery-lightbox__license .benart-cc-license a:hover,
.zipgallery-lightbox__license .benart-cc-license a:focus-visible {
    color: var(--colorpop-light);
}

.latest-viewer__img {
    display: block;
    min-height: 0;
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.latest-viewer__media {
    grid-row: 2;
    justify-self: center;
    align-self: center;
    position: relative;
    display: inline-block;
    max-width: min(96vw, 1400px);
    line-height: 0;
    pointer-events: auto;
    cursor: default;
}

.latest-viewer__media .latest-viewer__pin {
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
}

.latest-viewer__media .latest-viewer__pin[aria-hidden='true'] {
    display: none;
}

.latest-viewer__media .zipsocial-image-pin__icon {
    width: 1.5rem;
    height: 1.5rem;
}

.latest-viewer__license {
    margin: 0.75rem 0 0;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.4;
    color: #fff;
    text-align: center;
    pointer-events: auto;
    grid-row: 3;
}

.latest-viewer__license[hidden] {
    display: none;
}

.latest-viewer__source-link {
    pointer-events: auto;
}

@media (max-width: 900px) {
    .latest-zipgallery-grid,
    .cad-designs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .latest-zipgallery-grid,
    .cad-designs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: block;
    background: #fff;
    border: 2px solid transparent;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease;
}

.project-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.project-card .project-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: var(--color-text);
    position: relative;
    display: inline-block;
}

.project-card .project-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 4px;
    width: 0;
    background: var(--colorpop-med);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-title::after {
    width: 100%;
}

.project-card .project-description {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.project-card .project-daterange {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-text-light);
}

.find-me-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: min(64px, calc((100% - 2 * var(--find-me-gap)) / 3));
    flex: 0 1 min(64px, calc((100% - 2 * var(--find-me-gap)) / 3));
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: visible;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--colorpop-pale);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.22);
}

.find-me-icon:hover,
.find-me-icon:focus-visible {
    z-index: 10;
}

.find-me-icon::after {
    content: attr(aria-label);
    position: absolute;
    z-index: 20;
    left: 50%;
    top: calc(100% + 0.45rem);
    transform: translateX(-50%);
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--colorbase-med);
    background: var(--zipnode-tooltip-bg, #fef9c3);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.find-me-icon:hover::after,
.find-me-icon:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

.find-me-icon:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 107, 157, 0.2);
    transform: scale(1.08) rotate(-3deg);
    border-color: var(--colorpop-light);
}

.find-me-icon:nth-child(2):hover {
    transform: scale(1.08) rotate(3deg);
}

.find-me-icon-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    background: var(--colorpop-pale);
    border-radius: 12px;
}

.find-me-icon-placeholder::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--colorpop-light) 0%, transparent 70%);
    opacity: 0.4;
}

.find-me-icon-img {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    object-fit: cover;
    object-position: center;
    border: 3px solid #fff;
    border-radius: 14px;
    transition: filter 0.3s ease;
}

.find-me-icon:hover .find-me-icon-img {
    border-color: #fff;
    filter: brightness(1.06) saturate(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpSoft {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes statsGridItemIn {
    from {
        opacity: 0;
        transform: translateX(80px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes statsGridItemInFaded {
    from {
        opacity: 0;
        transform: translateX(80px);
    }

    to {
        opacity: 0.75;
        transform: translateX(0);
    }
}

.intro-title {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.intro-title.animate-on-scroll {
    transition-delay: 0s;
}

.intro-text.animate-on-scroll {
    transition-delay: 0.1s;
}

.intro-text {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
    opacity: 0;
}

.portrait-image {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.project-card {
    opacity: 0;
    /* Start hidden */
}

.project-card.is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Animation-only class (no card styling) – e.g. category grid items */
.animate-fade-in-up {
    opacity: 0;
}

.animate-fade-in-up.is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Single post: full-width title section (standard blue band) */
.single-post-title-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: var(--gradient-band-dark);
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 1.8rem;
    position: relative;
    overflow: hidden;
}

/* One-time shine sweep on load */
.single-post-title-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%);
    animation: title-bar-shine 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    pointer-events: none;
}

@keyframes title-bar-shine {
    to {
        left: 150%;
    }
}

.single-post-title-section .container {
    position: relative;
    z-index: 1;
}

.single-post-title-section .single-post-title {
    font-family: "Patua One", var(--font-heading);
    font-size: 4rem;
    line-height: 4.5rem;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: fadeInUpSoft 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s forwards;
}

.single-post-title-section .single-post-subtitle {
    margin: 0.5rem 0 0;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.5rem;
    opacity: 0.4;
    word-spacing: 0.06em;
    color: #fff;
}

.sketchbook-daterange::before {
    content: '';
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.65rem;
    vertical-align: -0.12em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4'/%3E%3Cpath d='M4 10h16'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4'/%3E%3Cpath d='M4 10h16'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.single-post-title-section .entry-title-ipa {
    margin-left: 0.35em;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fadeInUpSoft 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
}

/* Page: full-width title section (shorter pink band) */
.page-title-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: var(--gradient-band-page);
    color: #fff;
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.page-title-section .container {
    position: relative;
    z-index: 1;
}

.page-title-section .page-title {
    font-family: "Patua One", var(--font-heading);
    font-size: 2.75rem;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

body.page article .entry-content {
    font-family: var(--font-mono);
}

/* Single post: base typography (not on category archive grid) */
.single-post article {
    font-family: "Faculty Glyphic", var(--font-body);
}

.single-post article h1 {
    font-family: "Patua One", var(--font-heading);
    font-size: 4rem;
    line-height: 4.5rem;
}

.single-post article p {
    font-size: 1.1rem;
}

/* Single post: CAD project */
.single-post.post-project-cad .entry-content,
.single-post.post-project-cad .single-post-body__content.entry-content {
    font-family: var(--font-mono);
}

/* CAD post content headings (excludes get-in-touch / donate callout titles) */
.single-post.post-project-cad .entry-content :is(h1, h2):not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content :is(h1, h2):not(.get-in-touch__heading, .donate__heading) {
    font-family: "Patua One", var(--font-heading);
    font-weight: 400;
    color: var(--colorbase-dark);
    line-height: 1.2;
    margin: 2rem 0 1rem;
    padding: 0 0 0.15rem 0.85rem;
    border: none;
    border-left: 4px solid var(--colorthree-med);
}

.single-post.post-project-cad .entry-content h1:not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content h1:not(.get-in-touch__heading, .donate__heading) {
    font-size: 2.25rem;
}

.single-post.post-project-cad .entry-content h2:not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content h2:not(.get-in-touch__heading, .donate__heading) {
    font-size: 1.65rem;
}

.single-post.post-project-cad .entry-content :is(h3, h4, h5, h6):not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content :is(h3, h4, h5, h6):not(.get-in-touch__heading, .donate__heading) {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--colorbase-med);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
}

.single-post.post-project-cad .entry-content h3:not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content h3:not(.get-in-touch__heading, .donate__heading) {
    font-size: 1.15rem;
}

.single-post.post-project-cad .entry-content h4:not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content h4:not(.get-in-touch__heading, .donate__heading) {
    font-size: 1.05rem;
}

.single-post.post-project-cad .entry-content :is(h5, h6):not(.get-in-touch__heading, .donate__heading),
.single-post.post-project-cad .single-post-body__content.entry-content :is(h5, h6):not(.get-in-touch__heading, .donate__heading) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--colorbase-light);
}

/* Prose only (default single-post body text is 1.1rem) */
.single-post.post-project-cad .entry-content :is(p, ul, ol, li, dl, dd, dt, blockquote, table, figcaption, pre, code),
.single-post.post-project-cad .single-post-body__content.entry-content :is(p, ul, ol, li, dl, dd, dt, blockquote, table, figcaption, pre, code) {
    font-size: 0.95rem;
}

/* CAD addenda inside .entry-content: messages not monospace; callout heading colour only */
.single-post.post-project-cad .entry-content .get-in-touch__message,
.single-post.post-project-cad .entry-content .donate__message,
.single-post.post-project-cad .single-post-body__content.entry-content .get-in-touch__message,
.single-post.post-project-cad .single-post-body__content.entry-content .donate__message {
    font-family: "Faculty Glyphic", var(--font-body);
    font-size: 1.05rem;
}

.single-post.post-project-cad .entry-content .get-in-touch__heading,
.single-post.post-project-cad .single-post-body__content.entry-content .get-in-touch__heading {
    color: #8a7320;
}

.single-post.post-project-cad .entry-content .donate__heading,
.single-post.post-project-cad .single-post-body__content.entry-content .donate__heading {
    color: #4d7a38;
}

.single-category-cad {
    margin: 0 0 1.5rem;
}

/* CAD gallery column: download thumb first, then one thumbnail per row */
.single-post.post-project-cad .single-post-body__gallery {
    --zipgallery-cad-thumb-size: 7.5rem;
    --zipgallery-cad-thumb-min-size: 5.5rem;
    --zipgallery-cad-thumb-max-size: 7.5rem;
    --zipgallery-thumb-radius: 15px;

    flex: 0 0 auto;
    max-width: none;
    width: auto;
}

.single-post.post-project-cad .single-post-body__gallery .zipgallery-batch {
    width: auto;
    align-items: flex-start;
}

.single-post.post-project-cad .single-post-body__gallery .zipgallery__item {
    content-visibility: visible;
}

.single-post.post-project-cad .single-post-body__gallery .zipgallery--grid {
    --zipgallery-grid-columns: 1;
    --zipgallery-grid-gap: 8px;
    width: var(--zipgallery-cad-thumb-size);
    max-width: 100%;
}

.single-post.post-project-cad .single-post-body__gallery .zipgallery__item--download {
    overflow: hidden;
    margin: 0;
}

.single-post.post-project-cad .zipgallery__item--download .zipgallery__download-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0.65rem;
    box-sizing: border-box;
    border: var(--zipgallery-thumb-border, 3px solid #fff);
    border-radius: var(--zipgallery-thumb-radius, 15px);
    background-color: var(--colorpop-light);
    box-shadow: none;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        opacity 0.15s ease;
}

.single-post.post-project-cad .zipgallery__item--download .zipgallery__download-link:hover,
.single-post.post-project-cad .zipgallery__item--download .zipgallery__download-link:focus-visible {
    background-color: var(--colorpop-med);
    opacity: 1;
}

.single-post.post-project-cad .zipgallery__item--download .zipgallery__download-link:focus-visible {
    outline: 2px solid var(--colorpop-med);
    outline-offset: 2px;
}

.single-post.post-project-cad .zipgallery__download-icon {
    display: block;
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
}

.single-post.post-project-cad .zipgallery__download-label {
    font-family: "Faculty Glyphic", var(--font-body);
    font-size: 0.82rem;
    font-weight: bold;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-align: center;
}

@media (max-width: 768px) {
    /* Side-by-side break: horizontal wrapping row (flex, not grid columns var) */
    .single-post.post-project-cad .single-post-body__gallery {
        width: 100%;
        max-width: 100%;
    }

    .single-post.post-project-cad .single-post-body__gallery .zipgallery-batch {
        width: 100%;
        align-items: stretch;
    }

    .single-post.post-project-cad .single-post-body__gallery .zipgallery--grid {
        display: flex;
        flex-flow: row wrap;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
        gap: var(--zipgallery-grid-gap, 8px);
    }

    .single-post.post-project-cad .single-post-body__gallery .zipgallery__item {
        flex: 1 1 var(--zipgallery-cad-thumb-min-size);
        min-width: var(--zipgallery-cad-thumb-min-size);
        max-width: var(--zipgallery-cad-thumb-max-size);
        width: auto;
    }

    .single-post.post-project-cad .zipgallery__download-icon {
        width: clamp(1rem, 22%, 1.35rem);
        height: clamp(1rem, 22%, 1.35rem);
        max-width: 1.35rem;
        max-height: 1.35rem;
    }

    .single-post.post-project-cad .zipgallery__download-label {
        font-size: clamp(0.68rem, 2.8vw, 0.82rem);
        max-width: var(--zipgallery-cad-thumb-max-size);
    }

    .single-post.post-project-cad .single-post-body__gallery .zipgallery__more {
        width: 100%;
        margin-top: 0;
    }
}

/* Align content column top with gallery column (button); drop default <p> top margin */
.single-post-body--with-gallery .single-post-body__content.entry-content > :first-child {
    margin-top: 0;
    margin-block-start: 0;
}

.entry-content + .single-category-cad {
    margin-top: 2rem;
}

/* Single post: Sketchbook project */
.single-post.post-project-sketchbook .single-post-title-section .container {
    text-align: center;
}

.single-post.post-project-sketchbook .entry-content,
.single-post.post-project-sketchbook .single-post-body__content.entry-content {
    text-align: center;
}

.single-post.post-project-sketchbook .entry-content :is(ul, ol),
.single-post.post-project-sketchbook .single-post-body__content.entry-content :is(ul, ol) {
    list-style-position: inside;
    padding-left: 0;
}

.single-post.post-project-sketchbook .single-post-body--gallery-below {
    display: block;
    margin: 0 0 2rem;
}

.single-post.post-project-sketchbook .single-post-body--gallery-below .single-post-body__gallery {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-top: 2.5rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 max(1.5rem, calc(50vw - var(--container-width) / 2));
}

.single-post.post-project-sketchbook .single-post-body__gallery .zipgallery__caption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.35;
}

.single-post.post-project-sketchbook .zipgallery__more,
.entry-content .zipgallery__more {
    --zipgallery-more-bg: var(--colorbase-dark);
    --zipgallery-more-text: #ffffff;
    --zipgallery-more-accent: var(--colorpop-light);
    --zipgallery-more-accent-hover: var(--colorpop-med);
    margin-top: 2rem;
}

.single-post.post-project-sketchbook .zipgallery__more-status,
.entry-content .zipgallery__more-status {
    color: var(--colorpop-pale);
}

.single-post.post-project-sketchbook .zipgallery__more-status .zipgallery__more-count,
.entry-content .zipgallery__more-status .zipgallery__more-count {
    color: #ffffff;
}

.single-cad-download.button {
    text-decoration: none;
}

.get-in-touch {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background-color: #fbf8ec;
    border-left: 4px solid #e8d88a;
    border-radius: 0 4px 4px 0;
}

.get-in-touch__heading {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: #8a7320;
}

.get-in-touch__message {
    font-family: "Faculty Glyphic", var(--font-body);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

.get-in-touch + .donate {
    margin-top: 1rem;
}

.donate {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background-color: #fafafa;
    border-left: 4px solid #92b86e;
    border-radius: 0 4px 4px 0;
}

.donate__heading {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: #4d7a38;
}

.donate__message {
    font-family: "Faculty Glyphic", var(--font-body);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

.cad-more-models {
    margin-top: 2rem;
    text-align: center;
}

.cad-more-models__link.button {
    font-family: var(--font-heading);
    text-decoration: none;
    background-color: #fff;
    color: var(--colorpop-light);
    border: 2px solid var(--colorpop-light);
}

.cad-more-models__link.button:hover,
.cad-more-models__link.button:focus-visible {
    background-color: #fff;
    color: var(--colorpop-med);
    border-color: var(--colorpop-med);
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.site-footer .site-info {
    font-family: "Source Code Pro", monospace;
}

.site-footer a {
    color: var(--colorpop-light);
}

.site-footer a:hover {
    color: var(--colorpop-med);
}

/* Framework tabs module – reusable tabbed content */
.framework-tabs-module {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    margin-bottom: 0;
    padding: 2.5rem max(1.5rem, calc(50vw - var(--container-width) / 2)) 3rem;
    background: var(--gradient-band-dark);
    color: #f8fafc;
}

/* Framework row: Dependencies + Framework Browser (equal width), Network Map full width below */
.category-framework {
    --stats-grid-gap: clamp(0.75rem, 0.5rem + 1vw, 1rem);
}

/* ==========================================================================
   .webapp .dependencies – post-it note (warm paper, ink; no tilt — long lists)
   ========================================================================== */
.webapp .dependencies {
    width: 100%;
    box-sizing: border-box;
}

.webapp .dependencies .webapp-tabs-wrap {
    position: relative;
    isolation: isolate;
    border-radius: 10px;
    background:
        radial-gradient(ellipse 95% 55% at 12% 8%, rgba(255, 235, 160, 0.22) 0%, transparent 52%),
        radial-gradient(ellipse 70% 45% at 92% 88%, rgba(250, 220, 140, 0.14) 0%, transparent 48%),
        radial-gradient(ellipse 50% 40% at 55% 45%, rgba(240, 220, 150, 0.08) 0%, transparent 45%),
        linear-gradient(165deg, #fffef8 0%, #fdf6d8 40%, #f8edc4 100%);
    border: 1px solid rgba(220, 200, 130, 0.45);
    box-shadow:
        4px 4px 2px rgba(22, 20, 14, 0.1),
        6px 6px 14px rgba(18, 16, 12, 0.09),
        inset 0 1px 0 rgba(255, 255, 252, 0.75),
        inset 0 -2px 10px rgba(230, 210, 150, 0.12),
        inset 0 0 45px rgba(255, 245, 200, 0.35);
    overflow: hidden;
}

/* Paper grain — multiply keeps yellow dominant */
.webapp .dependencies .webapp-tabs-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0.11;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

.webapp .dependencies .webapp-header {
    position: relative;
    z-index: 1;
    padding: 0.75rem 1rem 0.55rem;
    background: transparent;
    border-bottom: 2px solid rgba(210, 190, 120, 0.35);
}

.webapp .dependencies .webapp-title {
    margin: 0;
    font-family: "Patua One", var(--font-heading);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
    color: #292524;
    text-shadow: 0 1px 0 rgba(255, 252, 240, 0.65);
}

.webapp .dependencies .webapp-panel-content {
    position: relative;
    z-index: 1;
    padding: 0.85rem 1rem 1rem;
    background:
        radial-gradient(ellipse 80% 50% at 88% 12%, rgba(255, 230, 170, 0.2) 0%, transparent 45%),
        linear-gradient(180deg, rgba(255, 254, 248, 0.65) 0%, rgba(252, 244, 210, 0.55) 100%);
    color: #1c1917;
    border-top: none;
}

/* Stacked list: subtle dotted rule between items */
.webapp .dependencies .dependencies-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
}

.webapp .dependencies .dependencies-list li {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0.45rem 0;
}

.webapp .dependencies .dependencies-list li + li {
    border-top: 1px dotted rgba(190, 170, 115, 0.45);
}

.webapp .dependencies .dependencies-list li:first-child {
    padding-top: 0;
}

.webapp .dependencies .dependencies-list li:last-child {
    padding-bottom: 0;
}

.webapp .dependencies .framework-browser-list.dependencies-list li+li {
    margin-top: 0;
}

.webapp .dependencies .dependencies-list a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0.35rem 0.5rem 0.35rem 0.7rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    border-radius: 4px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.webapp .dependencies .dependencies-list a:hover {
    transform: none;
    border-color: rgba(200, 175, 95, 0.45);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 3px rgba(40, 38, 30, 0.08);
}

.webapp .dependencies .dependencies-list a:hover:has(.framework-browser-badge-claim) {
    border-color: rgba(30, 64, 175, 0.35);
    color: #1e40af;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 4px rgba(30, 64, 175, 0.12);
}

.webapp .dependencies .dependencies-list a:hover:has(.framework-browser-badge-rule) {
    border-color: rgba(157, 23, 77, 0.35);
    color: #9d174d;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 4px rgba(157, 23, 77, 0.1);
}

.webapp .dependencies .dependencies-list a:focus {
    outline: 2px solid #854d0e;
    outline-offset: 2px;
}

/* Type tags: text-only + divider (no nested pill on the pill) */
.webapp .dependencies .framework-browser-badge {
    display: inline;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    border-radius: 0;
    vertical-align: baseline;
    background: transparent !important;
    box-shadow: none;
    white-space: nowrap;
}

.webapp .dependencies .dependencies-list a .framework-browser-badge {
    padding-right: 0.55rem;
    margin-right: 0.55rem;
    border-right: 1px solid rgba(190, 165, 95, 0.4);
}

.webapp .dependencies .framework-browser-badge-claim {
    color: #1d4ed8;
}

.webapp .dependencies .framework-browser-badge-rule {
    color: #be185d;
}

.webapp .dependencies .dependencies-ghost .framework-browser-badge {
    padding-right: 0.55rem;
    margin-right: 0.55rem;
    border-right: 1px solid rgba(175, 155, 100, 0.4);
}

.webapp .dependencies .framework-browser-badge-axiom {
    color: #a21caf;
}

.webapp .dependencies .framework-browser-badge-term {
    color: #0f766e;
}

.webapp .dependencies .framework-browser-badge-node {
    color: #57534e;
}

.webapp .dependencies .framework-browser-badge-ghost {
    color: #57534e;
}

.webapp .dependencies .dependencies-list .dependencies-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0.35rem 0.5rem 0.35rem 0.7rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #3f3a36;
    border-radius: 4px;
    border: 1px dashed rgba(175, 155, 85, 0.55);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: none;
    opacity: 0.65;
}

.framework-browser-map-row {
    --stats-grid-gap: clamp(0.75rem, 0.5rem + 1vw, 1rem);
    display: grid;
    /* Framework browser (wide, as before); Dependencies + map ~35% (narrow, as before) */
    grid-template-columns: 1fr 35%;
    gap: var(--stats-grid-gap);
    align-items: start;
    margin-top: 2rem;
}

.framework-browser-map-row .framework-browser-map-cell {
    min-width: 0;
}

.framework-browser-map-row .framework-browser-map-cell--stack {
    display: flex;
    flex-direction: column;
    gap: var(--stats-grid-gap);
}

/* Single top cell (no Dependencies output): span full width before the map */
.framework-browser-map-row > .framework-browser-map-cell:only-of-type {
    grid-column: 1 / -1;
}

.framework-browser-map-row .framework-browser-map-cell--full {
    grid-column: 1 / -1;
}

.framework-browser-map-row .framework-browser-map-cell > .webapp {
    padding: 0;
}

@media (max-width: 1000px) {
    .framework-browser-map-row {
        grid-template-columns: 1fr;
    }

    .framework-browser-map-row .framework-browser-map-cell--full {
        grid-column: 1;
    }
}

.category-framework .framework-browser-module,
.category-framework .framework-map-module {
    opacity: 0;
    animation: fadeIn 2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

/* Framework stats grid – seven-item value + label grid (one row at max width), fluid scale */
.framework-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--stats-grid-gap);
    margin: var(--stats-grid-gap) 0 -1rem 0.3rem;
    padding: 0;
}

.framework-stats-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: clamp(3.5rem, 3rem + 1.5vw, 4rem);
    min-width: 0;
    padding: clamp(0.75rem, 0.5rem + 0.5vw, 1rem) clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
    background: #fff;
    border: 1px solid transparent;
    border-radius: clamp(8px, 6px + 0.5vw, 12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    color: #fff;
    opacity: 0;
    animation: statsGridItemIn 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.framework-stats-grid__item:nth-child(1) {
    animation-delay: 0.06s;
}

.framework-stats-grid__item:nth-child(2) {
    animation-delay: 0.12s;
}

.framework-stats-grid__item:nth-child(3) {
    animation-delay: 0.18s;
}

.framework-stats-grid__item:nth-child(4) {
    animation-delay: 0.24s;
}

.framework-stats-grid__item:nth-child(5) {
    animation-delay: 0.3s;
}

.framework-stats-grid__item:nth-child(6) {
    animation-delay: 0.36s;
}

.framework-stats-grid__item:nth-child(7) {
    animation-delay: 0.42s;
}

.framework-stats-grid__value {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--colorpop-desat-med);
}

.framework-stats-grid__label {
    display: block;
    font-size: clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem);
    font-weight: 700;
    color: var(--colorbase-med);
    margin-top: clamp(0.15rem, 0.1rem + 0.2vw, 0.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

.framework-stats-grid__item--faded {
    animation-name: statsGridItemInFaded;
}

.framework-stats-grid__item--faded .framework-stats-grid__value {
    color: color-mix(in srgb, var(--colorpop-desat-med) 50%, var(--color-border));
}

.framework-stats-grid__item--faded .framework-stats-grid__label {
    color: color-mix(in srgb, var(--colorbase-med) 45%, var(--color-border));
}

.framework-stats-grid__item--primary {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

/* Framework stats tooltip */
.framework-stats-grid__item[data-tooltip] {
    cursor: help;
}

.framework-stats-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 240px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--colorbase-med);
    background: var(--zipnode-tooltip-bg, #fef9c3);
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.framework-stats-tooltip::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--zipnode-tooltip-bg, #fef9c3);
}

.framework-stats-tooltip.is-visible {
    opacity: 1;
}

.framework-stats-grid__link .framework-stats-grid__item {
    animation-delay: 0.3s;
    cursor: pointer;
}

.framework-tabs-wrap {
    width: 100%;
}

.framework-tabs-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.framework-tabs-module-header {
    margin: 0;
}

.framework-tabs-module-header .framework-tabs-page-title {
    margin: 0;
    padding: 0;
    font-family: "Patua One", var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.framework-tabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

/* Base tab styling */
.framework-tab {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    margin: 0;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hover state */
.framework-tab:hover,
.framework-tabs-module .framework-tab:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* Active state */
.framework-tab.is-active,
.framework-tabs-module .framework-tab.is-active {
    color: var(--colorpop-light);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    transform: translateY(-1px);
}

.framework-tab-panels {
    position: relative;
    min-height: 1px;
}

.framework-tab-panels.height-transition-ready {
    transition: height 0.3s ease;
}

.framework-tab-panels .framework-tab-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    visibility: hidden;
}

.framework-tab-panels .framework-tab-panel.is-active {
    position: absolute;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.framework-tab-panels .framework-tab-panel.is-active.fade-in {
    opacity: 0;
}

.framework-tab-panels .framework-tab-panel.measure {
    visibility: visible !important;
}

.framework-tab-inner {
    width: 100%;
    font-family: "Source Code Pro";
    font-size: 1rem;
    color: #e2e8f0;
}

.framework-tab-inner h2 {
    margin: 0 0 1rem;
    color: #fff;
}

.framework-tab-inner p {
    margin: 0 0 1rem;
}

.framework-tab-inner a {
    color: var(--colorpop-light);
}

.framework-tab-inner a:hover {
    color: var(--app-accent-hover);
}

.framework-tab-inner p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Webapp – general dark app-style module (slate + pink chrome)
   Reusable for Framework Browser and other app-like modules
   ========================================================================== */
.webapp {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.webapp-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.webapp-header {
    padding: 0.75rem 1rem;
    background: var(--app-bg-elevated);
    border-bottom: 1px solid var(--app-border);
}

.webapp-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--app-text);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.framework-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.framework-map-fullscreen-btn {
    flex-shrink: 0;
    margin-left: auto;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-bg-elevated);
    color: var(--app-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.framework-map-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--app-accent);
    color: var(--app-accent-hover);
}

.framework-map-fullscreen-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

/* Exit fullscreen button – recreated inside the map when fullscreen (left of zoom controls) */
.framework-map-fullscreen-exit-btn {
    position: absolute;
    top: 10px;
    right: 54px;
    z-index: 25;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-bg-elevated);
    color: var(--app-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.framework-map-fullscreen-exit-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--app-accent);
    color: var(--app-accent-hover);
}

.framework-map-fullscreen-exit-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.webapp-tabs-wrap {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    background: var(--app-bg);
}

.webapp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--app-bg-elevated);
    border-bottom: 1px solid var(--app-border);
}

.webapp-tab {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--app-text-muted);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: 6px;
    margin: 0;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.webapp-tab:hover {
    color: var(--app-text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--app-border);
}

.webapp-tab.is-active {
    color: var(--app-accent);
    background: rgba(255, 107, 157, 0.15);
    border-color: var(--app-accent);
}

.webapp-panels {
    position: relative;
    background: var(--app-bg);
}

.webapp-panels .webapp-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    visibility: hidden;
}

.webapp-panels .webapp-panel.is-active {
    position: absolute;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.webapp-panels .webapp-panel.is-active.fade-in {
    opacity: 0;
}

.webapp-panels .webapp-panel.measure {
    visibility: visible !important;
}

.webapp-panel-content {
    padding: 0.75rem 1rem 0.25rem;
    max-height: 50vh;
    overflow-y: auto;
}

/* ==========================================================================
   Framework Browser module – specific to two-column link list (claims / rules)
   ========================================================================== */
.framework-browser-module .webapp-panel-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
}

.framework-browser-node-group {
    padding: 0 0 0.6rem;
    min-width: 0;
}

.framework-browser-claims {
    border-right: 1px solid var(--app-border);
    padding-right: 1rem;
}

.framework-browser-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    margin-right: 0.5rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: 0.2em;
}

.framework-browser-badge-claim {
    color: #5a7eb5;
    background: rgba(107, 143, 201, 0.2);
}

.framework-browser-badge-rule {
    color: #db2777;
    background: rgba(236, 72, 153, 0.2);
}

.framework-browser-badge-axiom {
    color: var(--app-accent-deep);
    background: rgba(180, 80, 120, 0.2);
}

.framework-browser-badge-term {
    color: #0d9488;
    background: rgba(45, 212, 191, 0.2);
}

.framework-browser-badge-node {
    color: var(--app-text-muted);
    background: rgba(148, 163, 184, 0.2);
}

.framework-browser-badge-ghost {
    color: #7c3aed;
    background: rgba(167, 139, 250, 0.25);
}

.framework-browser-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.framework-browser-list li {
    margin: 0;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.framework-browser-list li+li {
    margin-top: 1px;
}

.framework-browser-list a {
    display: inline-block;
    padding: 0.35rem 0.5rem 0.35rem 0.5rem;
    font-size: 0.9rem;
    color: var(--app-text);
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.framework-browser-list a:hover {
    background: rgba(255, 107, 157, 0.15);
    color: var(--app-accent-hover);
}

.framework-browser-claims .framework-browser-list a:hover {
    background: rgba(96, 165, 250, 0.15);
    color: var(--app-accent-hover);
}

.framework-browser-list a:focus {
    outline: 2px solid var(--app-accent);
    outline-offset: 2px;
}

.framework-browser-list .framework-browser-current {
    display: inline-block;
    padding: 0.35rem 0.5rem 0.35rem 0.5rem;
    font-size: 0.9rem;
    color: var(--app-text-muted);
    background: rgba(148, 163, 184, 0.12);
    filter: saturate(0.4);
    border-radius: 6px;
}

/* Pagination & in-content links */
.pagination a,
.page-links a {
    color: var(--colorpop-light);
}

.pagination a:hover,
.page-links a:hover {
    color: var(--colorpop-med);
}

/* Category archive: project header & content grid */
.project-header {
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--colorpop-light);
    padding-bottom: 2rem;
}

.project-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.project-item-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.project-item-link:hover {
    color: var(--colorpop-light);
}

.project-item {
    margin: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-item-link:hover .project-item {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--colorpop-light);
}

@media (prefers-reduced-motion: reduce) {
    .project-item-link:hover .project-item {
        transform: none;
    }
}

.project-item .entry-title {
    margin: 0;
    font-size: 1.125rem;
}

/* Category archive: optional featured image thumbnails */
.project-item:has(.project-item-thumbnail) {
    padding: 0;
    overflow: hidden;
}

.project-item-thumbnail {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
    border-bottom: 1px solid var(--color-border);
}

.project-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-item:has(.project-item-thumbnail) .entry-header {
    padding: 1.25rem 1.5rem;
}

/* Framework > Glossary category archive */
.topband {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2rem max(1rem, calc(50vw - var(--container-width) / 2)) 2rem;
    background: var(--gradient-band-dark);
    color: #f8fafc;
    margin-bottom: 2rem;
}

.topband-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.4em;
}

.topband-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.topband-subtitle {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.5rem;
    opacity: 0.4;
    word-spacing: 0.06em;
}

.topband-description {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    font-weight: 400;
    font-family: var(--font-mono);
    color: #e2e8f0;
    line-height: 1.5;
}

.module-sketchbook-volumes {
    padding: 1.25rem 1.5rem;
    background-color: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.module-sketchbook-volumes--above {
    margin-bottom: 2rem;
}

.module-sketchbook-volumes--below {
    margin-top: 2rem;
}

.sketchbook-category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
}

.sketchbook-category-nav .button {
    background-color: #fff;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    transform: none;
    opacity: 0.35;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.sketchbook-category-nav a.button:hover {
    background-color: #fff;
    color: var(--colorpop-dark);
    transform: none;
    opacity: 1;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.sketchbook-category-nav .button.is-active,
.sketchbook-category-nav .button.is-active:hover {
    opacity: 1;
    cursor: default;
    transform: none;
    background-color: #fff;
    color: var(--colorpop-med);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.glossary-archive-header {
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--colorpop-light);
    padding-bottom: 2rem;
}

.glossary-breadcrumb {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.glossary-breadcrumb a {
    color: var(--colorpop-light);
}

.glossary-breadcrumb a:hover {
    color: var(--colorpop-med);
}

.glossary-breadcrumb-sep {
    margin: 0 0.35em;
    opacity: 0.6;
}

.glossary-breadcrumb-current {
    color: var(--color-text);
}

.glossary-archive-title {
    margin: 0 0 0.75rem;
}

.glossary-archive-description {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.glossary-term-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.glossary-term-list li {
    display: inline-block;
}

.glossary-term-list a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.glossary-term-list a:hover {
    color: var(--colorpop-desat-med);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1.03);
}

.glossary-term-ipa {
    display: block;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.glossary-term-definition {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.glossary-empty {
    color: var(--color-text-light);
}

/* Full-width Framework Browser on glossary archive */
.glossary-framework-browser-wrap {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 2rem;
    padding: 0 max(1.5rem, calc(50vw - var(--container-width) / 2)) 2rem;
}

/* ==========================================================================
   Responsive: ensure all areas respond to screen resize
   ========================================================================== */

/* Tablet and down */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem var(--spacing-unit) 0.5rem;
    }

    .module {
        padding: 2.5rem 0;
    }

    .module-intro {
        padding: 1.5rem 0;
    }

    body.home {
        --homepage-section-gap: 2.5rem;
    }

    body.home .site-main > .module-intro {
        padding-top: 1.5rem;
        padding-bottom: var(--homepage-section-header-gap);
    }

    .module-intro .intro-title {
        font-size: 2.25rem;
    }

    .module-intro .intro-text {
        font-size: 1.1rem;
        padding-right: 0;
    }

    .single-post-title-section {
        padding: 1.75rem 0;
        margin-bottom: 0.75rem;
    }

    .page-title-section {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }

    .page-title-section .page-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .single-post-title-section .single-post-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .single-post article h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .framework-title {
        font-size: 2rem;
    }

    .framework-text {
        font-size: 1rem;
    }

    .framework-tabs-module {
        padding: 1rem max(1rem, calc(50vw - var(--container-width) / 2)) 2rem;
    }

    .topband {
        padding: 1.5rem max(0.75rem, calc(50vw - var(--container-width) / 2)) 1.5rem;
    }

    .topband-subtitle {
        flex-basis: 100%;
        margin-top: -0.3rem;
    }

    .framework-tabs-module-header .framework-tabs-page-title {
        font-size: 1.6rem;
    }

    .framework-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9375rem;
    }

    .framework-browser-map-row {
        margin-top: 1.25rem;
    }

    .framework-stats-grid {
        margin-bottom: calc(var(--stats-grid-gap) - 1.25rem);
    }

    .webapp-header {
        padding: 0.6rem 0.75rem;
    }

    .webapp-title {
        font-size: 1.1rem;
    }

    .webapp-panel-content {
        padding: 0.6rem 0.75rem 0.25rem;
        max-height: 55vh;
    }

    .webapp .dependencies .webapp-panel-content {
        padding: 0.75rem 0.9rem;
    }

    .webapp .dependencies .dependencies-list a,
    .webapp .dependencies .dependencies-list .dependencies-ghost {
        font-size: 0.98rem;
        padding: 0.3rem 0.45rem 0.3rem 0.6rem;
    }

    .webapp .dependencies .framework-browser-badge {
        font-size: 0.68rem;
    }

    .project-card .project-title {
        font-size: 1.5rem;
    }

    .project-card .project-description {
        font-size: 1rem;
    }

    .project-card {
        padding: 1.75rem;
    }

    .project-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .project-content-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .glossary-archive-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }


    .button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    blockquote {
        padding: 0.75rem 1rem 0.75rem 1.25rem;
        margin: 1rem 0;
    }

    .site-footer {
        padding: 1.5rem 0;
        margin-top: 1.5rem;
        font-size: 0.85rem;
    }
}

/* Framework Browser: switch to 1 column; Framework stats: 4 columns */
@media (max-width: 740px) {
    .framework-browser-module .webapp-panel-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Single column: display RULES above CLAIMS via order */
    .framework-browser-rules {
        order: 1;
        border-bottom: 1px solid var(--app-border);
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .framework-browser-claims {
        order: 2;
        border-right: none;
        border-bottom: 1px solid var(--app-border);
        padding-right: 0;
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .framework-browser-axioms {
        order: 3;
    }

    .framework-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: calc(var(--stats-grid-gap) - 1.25rem);
    }
}

/* Small phones and narrow viewports */
@media (max-width: 600px) {
    .container {
        padding: 0 max(var(--spacing-unit), 1rem);
    }

    .site-header {
        padding: 0.6rem var(--spacing-unit) 0.3rem;
    }

    .module-intro .intro-title {
        font-size: 1.875rem;
    }

    .module-intro .intro-text {
        font-size: 1rem;
    }

    .intro-grid {
        gap: 1.5rem;
    }

    .single-post-title-section .single-post-title {
        font-size: 2rem;
        line-height: 1.25;
    }

    .page-title-section .page-title {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .single-post article h1 {
        font-size: 2rem;
        line-height: 1.25;
    }

    .single-post article p {
        font-size: 1rem;
    }

    .framework-title {
        font-size: 1.75rem;
    }

    .framework-stats-grid {
        margin-bottom: calc(var(--stats-grid-gap) - 1.25rem);
    }

    .framework-tabs-header-row {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .framework-tabs-module-header .framework-tabs-page-title {
        font-size: 1.4rem;
    }

    .framework-tabs-list {
        gap: 0.25rem;
    }

    .framework-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-content-grid {
        grid-template-columns: 1fr;
    }

    .project-item {
        padding: 1rem 1.25rem;
    }

    .project-item:has(.project-item-thumbnail) {
        padding: 0;
    }

    .project-item:has(.project-item-thumbnail) .entry-header {
        padding: 1rem 1.25rem;
    }

    .project-item .entry-title {
        font-size: 1rem;
    }
}

/* Extra small: tighten spacing and type */
@media (max-width: 400px) {
    .site-header {
        padding: 0.75rem var(--spacing-unit) 0.5rem;
    }

    .module {
        padding: 2rem 0;
    }

    body.home {
        --homepage-section-gap: 2rem;
    }

    .framework-stats-grid {
        margin-bottom: calc(var(--stats-grid-gap) - 1.25rem);
    }

    .module-intro .intro-title {
        font-size: 1.6rem;
    }

    .single-post-title-section .single-post-title {
        font-size: 1.75rem;
    }

    .page-title-section .page-title {
        font-size: 1.5rem;
    }

    .single-post article h1 {
        font-size: 1.75rem;
    }

    .framework-tabs-module-header .framework-tabs-page-title {
        font-size: 1.25rem;
    }

    .webapp-tabs {
        padding: 0.5rem 0.75rem;
    }

    .webapp-tab {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .framework-browser-list a {
        font-size: 0.85rem;
    }
}

/* ZipNode Addenda – collapsible modules */

.zipnode-addenda-wrapper {
    margin: 2rem 0;
}

.zipnode-addenda {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.zipnode-addendum {
    border: 1px solid var(--color-border, #eaeaea);
    border-radius: 6px;
    background: var(--color-bg, #fff);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.zipnode-addendum__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.2s ease;
}

.zipnode-addendum__heading::-webkit-details-marker,
.zipnode-addendum__heading::marker {
    display: none;
}

.zipnode-addendum__heading::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 8px solid var(--colorpop-med, #ff1493);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.zipnode-addendum[open] .zipnode-addendum__heading::before {
    transform: rotate(90deg);
}

.zipnode-addendum__heading:hover {
    color: var(--colorpop-dark, #c71585);
}

.zipnode-addendum__content {
    padding: 0 1rem 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.zipnode-addendum__content > *:first-child {
    margin-top: 0;
}

.zipnode-addendum__content > *:last-child {
    margin-bottom: 0;
}

/* List format: one item per line */
.zipnode-addendum--list .zipnode-addendum__content ul {
    margin: 0;
    padding-left: 1.25em;
    list-style-type: disc;
}

.zipnode-addendum--list .zipnode-addendum__content li {
  margin-bottom: 0.35em;
  font-weight: bold;
}

.zipnode-addendum--list .zipnode-addendum__content li:last-child {
  margin-bottom: 0;
}

.zipnode-addendum-list-item__link {
  display: inline-block;
  vertical-align: middle;
  margin-top: -2px;
  font-weight: normal;
  font-size: 0.85em;
  padding: 0.3em 0.6em 0.2em;
  margin-left: 0.35em;
  background: var(--colorpop-pale);
  border-radius: 4px;
  text-decoration: none;
  color: var(--colorpop-desat-med);
  transition: background 0.15s ease, color 0.15s ease;
}

.zipnode-addendum-list-item__link:hover {
  background: var(--colorpop-desat-med);
  color: #fff;
}

.zipnode-addendum-list-item__description {
  margin-top: 0.25em;
  font-size: 0.9em;
  font-weight: normal;
  color: var(--color-text-muted, #666);
  line-height: 1.5;
}

/* CC BY-NC-ND 4.0 — lightbox only (hidden on gallery thumbnails) */
.zipgallery .zipgallery__caption--license {
  display: none;
}

.benart-cc-license__icon {
  max-width: 1em;
  max-height: 1em;
  margin-left: 0.2em;
  vertical-align: -0.15em;
}

/* Full-size lightbox: image caption uses theme mono */
.zipgallery-lightbox__caption {
    font-family: var(--font-mono);
}

/* Short viewports: shrink image so CC footer stays on screen */
.zipgallery-lightbox {
    overflow-x: hidden;
    overflow-y: auto;
    align-items: safe center;
}

.zipgallery-lightbox__inner {
    min-width: 0;
    max-width: 100%;
}

.zipgallery-lightbox__figure {
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    min-height: 0;
    min-width: 0;
    width: fit-content;
    max-width: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    justify-items: center;
}

.zipgallery-lightbox__caption {
    grid-row: 1;
}

.zipgallery-lightbox__media {
    grid-row: 2;
    min-height: 0;
    min-width: 0;
    max-height: 100%;
    max-width: 100%;
    justify-self: center;
    align-self: center;
    display: block;
    line-height: 0;
}

.zipgallery-lightbox__license {
    grid-row: 3;
}

.zipgallery-lightbox__img {
    display: block;
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    max-width: 100%;
    width: auto;
    height: auto;
}

.zipgallery-lightbox__caption:not([hidden]) + .zipgallery-lightbox__media .zipgallery-lightbox__img {
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
}