/* Long-form prose styling for the /docs pages. The /css/index.css
   stylesheet is loaded first to provide the design tokens and the
   shared #app-header look. Rules here only override what's needed for
   a scrollable, document-oriented page. */

.docs-body {
    /* Undo the SPA's fixed flex-column layout so the page can scroll like a
       normal document. The flex column + min-height make the page at least
       viewport-tall and let <main> grow, so the shared footer sits at the
       bottom of the screen even on short pages. */
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.docs-body main {
    flex: 1 0 auto;
}

/* Centered content column, shared by the landing-page sections and the
   footer: the parent spans the viewport while the text stays readable. */
.section-inner {
    max-width: 52em;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

/* Shared page footer (templates/footer.html). On tall pages it's pinned to
   the viewport bottom via position: sticky so it stays visible regardless
   of scroll position. */
.site-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    border-top: 1px solid var(--border-color-light);
    background-color: var(--background-color-medium);
}

.site-footer .section-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md) var(--spacing-lg);
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    font-size: var(--font-sm);
}

.site-footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .copy {
    color: var(--text-color-light);
}

.docs-main {
    max-width: 48em;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.docs-main h1 {
    font-size: var(--font-xl);
    font-family: 'AtkinsonHyperlegibleBold', sans-serif;
}

.docs-main h2 {
    font-size: var(--font-lg);
    font-family: 'AtkinsonHyperlegibleBold', sans-serif;
    margin-top: var(--spacing-xl);
}

.docs-main figure {
    margin: var(--spacing-lg) 0;
}

.docs-main figure img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.docs-main figcaption {
    font-size: var(--font-sm);
    color: var(--text-color-light);
    margin-top: var(--spacing-sm);
    text-align: center;
}

.docs-main a {
    color: var(--color-accent);
}

.docs-main a:focus-visible,
.site-footer a:focus-visible,
#app-title .title-link:focus-visible {
    outline: 2px solid var(--color-contrast);
    outline-offset: 2px;
}

#app-title .title-link {
    text-decoration: none;
    color: inherit;
}
