@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --pico-background-color: #201810;
        --pico-color: #e9ddc7;
        --pico-muted-color: #a3907a;
        --pico-muted-border-color: #3d2f22;
        --pico-card-background-color: #2b2116;
        --pico-card-sectioning-background-color: #352a1c;
        --pico-form-element-background-color: #2b2116;
        --pico-form-element-border-color: #4a3b29;
        --pico-form-element-color: #ece1cf;
        --pico-code-background-color: #241b12;
        --pico-primary: #c98a4b;
        --pico-primary-background: #a56a35;
        --pico-primary-border: var(--pico-primary-background);
        --pico-primary-hover: #e0a868;
        --pico-primary-hover-background: #b97a3f;
        --pico-primary-hover-border: var(--pico-primary-hover-background);
        --pico-primary-focus: rgba(201, 138, 75, 0.375);
        --pico-primary-inverse: #1a130d;
    }
}

table {
    overflow-x: auto;
    display: block;
}

.nav-button {
    margin: 0;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

@media (max-width: 760px) {
    header.container nav {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand-icon {
    width: 64px;
    height: 64px;
}

.brand-wordmark {
    height: 48px;
    width: auto;
}

footer.container {
    text-align: right;
    opacity: 0.6;
}

.hero-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.hero-nav-side {
    display: flex;
    gap: 1.75rem;
    flex: 1;
}

.hero-nav-side:last-child {
    justify-content: flex-end;
}

.hero-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.hero-full-logo {
    width: min(425px, 56vw);
    height: auto;
}

@media (max-width: 760px) {
    .hero-nav {
        flex-direction: column;
        gap: 1rem;
    }
    .hero-nav-side {
        justify-content: center;
    }
    .hero-nav-side:last-child {
        justify-content: center;
    }
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 800px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

.home-image {
    margin-top: 1.5rem;
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

#editor {
    border: 1px solid var(--pico-form-element-border-color, #ccc);
}

/* Pico styles any [role="button"] as a full button, which clashes with
   Quill's own toolbar controls (the heading/color pickers use role="button"
   on their trigger label). Scoped to the label only -- NOT .ql-picker-item,
   since color-swatch items rely on their own background-color to work at all. */
.ql-toolbar.ql-snow .ql-picker-label[role="button"] {
    background: none !important;
    padding: 3px 5px !important;
    height: 24px !important;
    line-height: 24px !important;
    border: none !important;
    color: #fff !important;
}

/* Match the editor's background to the published article's own card
   background (see --pico-card-background-color) so editing looks like
   a preview of the real thing, not a jarring white box. Default text
   is white so it's readable against that dark background out of the box. */
.ql-container.ql-snow,
.ql-editor {
    background-color: #2b2116 !important;
    color: #fff;
}

.thumbnail-preview {
    max-width: 200px;
    display: block;
    margin: 0.5rem 0;
    border-radius: 8px;
}
