/* Hide the top header bar and the footer */
.md-header,
.md-footer {
    display: none;
}

/* Reclaim the vertical space the header used to occupy */
.md-main__inner {
    margin-top: 0;
}

/* Floating colour-scheme toggle (replaces the hidden header toggle) */
#palette-toggle {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1000;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--md-default-fg-color--lightest);
    background: var(--md-default-bg-color);
    color: var(--md-default-fg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}
#palette-toggle:hover {
    background: var(--md-default-fg-color);
    color: var(--md-default-bg-color);
    transform: scale(1.05);
}
#palette-toggle:focus-visible {
    outline: 2px solid var(--md-accent-fg-color);
    outline-offset: 2px;
}

/* H1 spacing: 1em above, none below */
.md-typeset h1 {
    margin-top: 1em;
    margin-bottom: 0;
}

/* Tighten H2 top margin */
.md-typeset h2 {
    margin-top: 0.64em;
}

/* Match H1 top spacing on the sidebar nav title */
.md-nav__title {
    margin-top: 2.3em;
}

/* Off-white background with black text in the default (light) scheme */
[data-md-color-scheme="default"] {
    --md-default-bg-color: #faf9f6;
    --md-default-fg-color: #000000;
    --md-default-fg-color--light: #1a1a1a;
    --md-default-fg-color--lighter: #3a3a3a;
    --md-default-fg-color--lightest: #6a6a6a;
    --md-typeset-color: #000000;
}
