/* the theme's text fonts again with font-display: swap (the theme says block: no text until they arrive); the same
   files, without the theme's query strings, which conf.py preloads */
@font-face { font-family: Lato; src: url(css/fonts/lato-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url(css/fonts/lato-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url(css/fonts/lato-normal-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Lato; src: url(css/fonts/lato-bold-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url(css/fonts/Roboto-Slab-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url(css/fonts/Roboto-Slab-Bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

.rst-content img.preview,
.rst-content img.preview-pair {
    max-height: 300px;
    width: auto;
    height: auto;
}

.rst-content img.preview {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.rst-content img.preview-pair {
    display: inline-block;
    max-width: 49%;
}

.rst-content p:has(> img.preview-pair) {
    text-align: center;
}

.rst-content img.result {
    display: block;
    max-height: 440px;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto 1em;
}

/* every figure a page's code draws: at most 360 px high, centered; contain keeps the aspect ratio where the width is
   set inline (docs_figures rows, 3D stills) */
.rst-content div.output_area img,
.rst-content div.output_area > svg {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-height: 360px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.rst-content div.output_area img:not([style*="width"]) {
    width: auto;
}

/* section start pages: a hero strip of linked results and cards for the pages of the section */
.rst-content .px-hero {
    display: flex;
    gap: 2%;
    align-items: flex-start;
    margin-bottom: 24px;
}

.rst-content .px-hero a {
    display: block;
    text-align: center;
    color: #2980b9;
}

.rst-content .px-hero img {
    display: block;
    width: 100%;
    height: min(220px, 26vw);
    object-fit: contain;
    border-radius: 4px;
    transition: box-shadow 0.15s;
}

.rst-content .px-hero a:hover img {
    box-shadow: 0 2px 10px rgba(41, 128, 185, 0.35);
}

.rst-content .px-hero a:hover span {
    text-decoration: underline;
}

.rst-content .px-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 3%;
    margin: 8px 0 24px;
}

.rst-content a.px-card {
    display: block;
    min-width: 0;
    color: inherit;
}

.rst-content .px-card .thumb {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e4e5;
    border-radius: 4px;
    padding: 8px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rst-content .px-card .thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rst-content .px-card b {
    display: block;
    margin-top: 6px;
    color: #2980b9;
}

.rst-content .px-card span {
    font-size: 0.92em;
}

.rst-content a.px-card:hover .thumb {
    border-color: #2980b9;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.25);
}

.rst-content a.px-card:hover b {
    text-decoration: underline;
}

.rst-content .px-cards.large .thumb {
    height: 170px;
}

.rst-content .px-tag {
    display: inline-block;
    font-style: normal;
    font-size: 0.72em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6a737d;
    border: 1px solid #c9d1d9;
    border-radius: 3px;
    padding: 0 4px;
    margin-right: 4px;
    vertical-align: 1px;
}

/* the build wraps PNGs in <picture> (WebP); let the image itself be the thumbnail's child so max-height applies */
.rst-content .px-card .thumb picture {
    display: contents;
}

.rst-content p.px-label {
    font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    margin: 1.2em 0 0.4em;
}

/* phones: two cards per row, filling the width */
@media (max-width: 640px) {
    .rst-content .px-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
    }
    .rst-content .px-card .thumb,
    .rst-content .px-cards.large .thumb {
        height: 100px;
    }
}

/* numbered figures (docs_figures.py): the caption "Figure N: ..." centred below the panels */
.rst-content figure.px-figure {
    margin: 4px 0 18px;
}
.rst-content figure.px-figure figcaption {
    text-align: center;
    font-size: 0.95em;
    color: #404040;
    margin-top: 2px;
}

/* a notice box at the top of a page (installation, v0.1) */
.px-warning { border: 1px solid #e0b252; border-left: 5px solid #d99a1e; background: #fff8e6; padding: 12px 16px;
  margin: 0 0 24px; border-radius: 4px; position: relative; z-index: 2; }
.px-warning p { margin: 0 0 8px; }
.px-warning p:last-child { margin-bottom: 0; }
.px-warning pre { background: #fff; border: 1px solid #f0dca8; padding: 8px 10px; margin: 0 0 8px; font-size: 90%;
  white-space: pre-wrap; }
/* the rest of a page with a notice box under a translucent white veil (user 2026-10-21) */
section:has(> .px-warning) > :not(h1):not(.px-warning) { position: relative; }
section:has(> .px-warning) > :not(h1):not(.px-warning)::after { content: ""; position: absolute; inset: -4px;
  background: rgba(255, 255, 255, 0.6); pointer-events: none; }

/* footer links (about, imprint, privacy, repository, PyPI) */
.px-footer { margin: 6px 0; }

/* the Examples caption links to the overview (page_speed unwraps its entry) */
.wy-menu-vertical p.caption a { color: inherit; padding: 0; display: inline; background: none; font-size: inherit; }
.wy-menu-vertical p.caption a:hover { text-decoration: underline; }

/* the brand: "plan" in ink and "ex2d" in orchid, the curved tet mark before it (landing page heading, index.rst) */
.rst-content .px-plan { color: #1b222d; }
.rst-content .px-ex2d { color: #cc66be; }
.rst-content h1 .px-plan::before {
    content: ""; display: inline-block; width: 1.2em; height: 1.2em; margin-right: 0.3em; vertical-align: -0.22em;
    background: url(brand/planex2d-mark.svg) center / contain no-repeat;
}
/* the sidebar's site name: the mark instead of the theme's home icon */
.wy-side-nav-search > a.icon-home::before, .wy-nav-top a::before {
    content: ""; display: inline-block; width: 1.3em; height: 1.3em; margin-right: 0.35em; vertical-align: -0.25em;
    background: url(brand/planex2d-mark.svg) center / contain no-repeat;
}
