/* The root is the cover (index.ipynb). The logo already links to it, so hide the
   duplicate-looking home row the theme can render above the first part. */
.bd-sidebar-primary nav.bd-links .bd-sidenav__home-link {
    display: none !important;
}

/* Page conventions (Press docs/UI.md): no empty top band, body text size, heading
   scale, Previous/Next size and placement, and link style. Sizes are in rem so they
   do not shift with the body size. */
#pst-header {
    display: none;
}

body {
    font-size: 0.85rem;
}

p,
li {
    font-size: inherit !important;
}

h1 {
    font-size: 1.87rem !important;
    font-weight: 500;
}

h2 {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.1rem !important;
}

h4 {
    font-size: 1.05rem !important;
}

.prev-next-area a p.prev-next-subtitle,
.prev-next-area a p.prev-next-title {
    font-size: 0.85rem;
}

.prev-next-area a p.prev-next-title {
    font-weight: 600;
    text-decoration: none !important;
}

/* On pages shorter than the window the Previous/Next links sit at the bottom of the
   window; the article container is already a full-height flex column. */
.bd-article-container > .prev-next-footer {
    margin-top: auto;
}

a,
a:hover,
a:focus,
a:focus-visible {
    text-decoration: none !important;
}

.bd-content a:not(.headerlink):hover {
    background-color: rgba(127, 127, 127, 0.12);
    border-radius: 2px;
}

a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Title page catalog card (Press docs/UI.md, Title Page Catalog Card). The card is
   its own object, so it keeps its cream stock and dark ink in dark mode too. */
.tp-catalog-card {
    --card-line: 1.75rem;
    background-color: #fbf6e6;
    background-image:
        linear-gradient(to bottom, transparent calc(2.6rem - 1px), #d9534f calc(2.6rem - 1px), #d9534f 2.6rem, transparent 2.6rem),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--card-line) - 1px), #c9d8ea calc(var(--card-line) - 1px), #c9d8ea var(--card-line));
    background-position: 0 0, 0 2.6rem;
    border: 1px solid #e4dcc2;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(40, 32, 12, 0.14), 0 1px 2px rgba(40, 32, 12, 0.12);
    color: #2b2a26;
    display: grid;
    font-family: "Courier New", Courier, "Liberation Mono", monospace;
    font-size: 0.85rem;
    gap: 0 1.25rem;
    grid-template-columns: 5.5rem 1fr;
    line-height: var(--card-line);
    margin: 2rem auto 2.5rem;
    max-width: 38rem;
    padding: 2.65rem 1.5rem 3rem 1.25rem;
    position: relative;
}

.tp-catalog-card p {
    margin: 0;
}

.tp-catalog-card a {
    color: #1d4f9a;
}

.tp-catalog-card__call {
    line-height: var(--card-line);
    white-space: nowrap;
}

.tp-catalog-card__author {
    font-weight: 700;
}

.tp-catalog-card__line {
    text-indent: 0;
}

.tp-catalog-card__tracings {
    margin-top: var(--card-line) !important;
}

.tp-catalog-card__hole {
    background: var(--pst-color-background, #ffffff);
    border: 1px solid #d8cfb3;
    border-radius: 50%;
    bottom: 0.9rem;
    box-shadow: inset 0 1px 2px rgba(40, 32, 12, 0.25);
    height: 1.1rem;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 1.1rem;
}

@media (max-width: 560px) {
    .tp-catalog-card {
        grid-template-columns: 1fr;
        padding: 2.65rem 1rem 3rem;
    }

    .tp-catalog-card__call br {
        display: none;
    }

    .tp-catalog-card__call {
        white-space: normal;
        word-spacing: 0.4rem;
    }
}
