:root {
    --writems-ink: #252320;
    --writems-muted: #77716b;
    --writems-rule: #ded8d1;
    --writems-paper: #f7f4ef;
}

.writems-page {
    background: var(--writems-paper);
    color: var(--writems-ink);
    font-family: system-ui, sans-serif;
    margin: 0;
}

#collection.writems-reader {
    background: var(--writems-paper);
    color: var(--writems-ink);
    font-family: system-ui, sans-serif;
    margin: 0;
}

#collection.writems-reader .writems-collection-header,
#collection.writems-reader #wrapper,
#collection.writems-reader .writems-reader-footer {
    margin-left: auto;
    margin-right: auto;
    max-width: 48rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

#collection.writems-reader .writems-collection-header {
    padding-top: 4rem;
}

#collection.writems-reader #blog-title {
    font-family: Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: -.06em;
    line-height: 1;
    margin: 0;
}

#collection.writems-reader #blog-title a {
    color: inherit;
    text-decoration: none;
}

#collection.writems-reader .description {
    color: var(--writems-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 1.25rem 0;
    max-width: 38rem;
}

.writems-public-nav {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.writems-public-nav a {
    color: var(--writems-muted);
    text-decoration: none;
}

.writems-public-nav a[aria-current="page"] {
    color: var(--writems-ink);
    font-weight: 700;
}

#collection.writems-reader .writems-post-list {
    padding-bottom: 3rem;
    padding-top: 1rem;
}

#collection.writems-reader .writems-post-list article {
    border-top: 1px solid var(--writems-rule);
    padding: 2rem 0;
}

#collection.writems-reader .writems-post-list .post-title {
    font-family: Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    line-height: 1.15;
    margin: .5rem 0;
}

#collection.writems-reader .writems-post-list .post-title a {
    color: inherit;
    text-decoration: none;
}

#collection.writems-reader .writems-post-list time {
    color: var(--writems-muted);
    font-size: .85rem;
}

#collection.writems-reader .writems-post-list .book {
    font-family: Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.75;
}

.writems-reader-footer {
    border-top: 1px solid var(--writems-rule);
    color: var(--writems-muted);
    padding-bottom: 2rem;
    padding-top: 1.25rem;
}

.writems-reader-footer nav {
    display: flex;
    gap: .75rem;
}

.writems-reader-footer a { color: inherit; }

.writems-header,
.writems-main,
.writems-footer {
    margin: 0 auto;
    max-width: 48rem;
    padding: 1.25rem 1.25rem;
}

.writems-header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}

.writems-header nav { display: flex; gap: 1rem; }
.writems-brand { color: inherit; font-weight: 700; text-decoration: none; }
.writems-main { padding-bottom: 4rem; padding-top: 5rem; }
.eyebrow { color: var(--writems-muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.writems-main h1 { font-size: clamp(2.5rem, 8vw, 5rem); letter-spacing: -.05em; margin: 0 0 3rem; }
.writems-intro { padding-bottom: 4rem; }
.writems-intro h1 { font-family: Georgia, serif; margin-bottom: 1rem; }
.writems-intro p:not(.eyebrow) { color: var(--writems-muted); font-size: 1.15rem; line-height: 1.6; max-width: 34rem; }
.writems-home-section { margin-top: 3rem; }
.writems-section-heading { align-items: baseline; display: flex; justify-content: space-between; }
.writems-section-heading a, .writems-home-links a { color: var(--writems-muted); }
.writems-featured-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.writems-featured-card { background: var(--writems-ink); color: var(--writems-paper); display: grid; gap: 1rem; min-height: 9rem; padding: 1.25rem; text-decoration: none; }
.writems-featured-card span, .writems-recent-list time { font-size: .85rem; opacity: .7; }
.writems-featured-card strong { align-self: end; font-family: Georgia, serif; font-size: 1.4rem; }
.writems-recent-list article { border-top: 1px solid var(--writems-rule); padding: 1.5rem 0; }
.writems-recent-list h2 { font-family: Georgia, serif; margin: .4rem 0; }
.writems-recent-list h2 a { color: inherit; text-decoration: none; }
.writems-recent-list article > div { color: var(--writems-muted); line-height: 1.6; }
.writems-home-links { border-top: 1px solid var(--writems-rule); display: flex; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; }
.writems-note { border-top: 1px solid var(--writems-rule); padding: 1.75rem 0 2.5rem; }
.writems-note time { color: var(--writems-muted); font-size: .85rem; }
.writems-note h2 { font-size: 1.7rem; margin: .45rem 0 1rem; }
.writems-note h2 a { color: inherit; text-decoration: none; }
.writems-note-content { line-height: 1.7; }
.writems-note .read-more { color: var(--writems-muted); display: inline-block; margin-top: 1rem; }
.writems-footer { border-top: 1px solid var(--writems-rule); color: var(--writems-muted); }
.manage-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manage-card { border: 1px solid var(--writems-rule); color: inherit; display: grid; gap: .4rem; padding: 1.25rem; text-decoration: none; }
.manage-card span { color: var(--writems-muted); font-size: .9rem; }
.manage-card-primary { background: var(--writems-ink); color: var(--writems-paper); }
.featured-manage-list { display: grid; gap: 1rem; }
.featured-manage-list .manage-card { gap: .7rem; }
.featured-manage-list button { background: transparent; border: 1px solid var(--writems-rule); cursor: pointer; padding: .45rem .7rem; }
.stats-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-card { border: 1px solid var(--writems-rule); display: grid; gap: .35rem; padding: 1.25rem; }
.stats-card strong { font-family: Georgia, serif; font-size: 2.5rem; }
.stats-card small, .stats-list small { color: var(--writems-muted); }
.stats-list { border-top: 1px solid var(--writems-rule); display: grid; }
.stats-list a { align-items: center; border-bottom: 1px solid var(--writems-rule); color: inherit; display: flex; justify-content: space-between; padding: 1rem 0; text-decoration: none; }
.stats-trend { align-items: end; border-bottom: 1px solid var(--writems-rule); display: grid; gap: .5rem; grid-template-columns: repeat(7, 1fr); min-height: 8rem; }
.stats-trend-day { align-items: center; display: flex; flex-direction: column; gap: .25rem; justify-content: end; min-height: 8rem; padding-bottom: .75rem; }
.stats-trend-day strong { background: var(--writems-ink); color: var(--writems-paper); min-height: 1.5rem; padding: .35rem .55rem; }
.stats-trend-day span, .stats-trend-day small { color: var(--writems-muted); font-size: .75rem; }

@media (max-width: 36rem) {
    .writems-header, .writems-main, .writems-footer { padding-left: 1rem; padding-right: 1rem; }
    .writems-main { padding-top: 3rem; }
    .manage-grid { grid-template-columns: 1fr; }
    .writems-featured-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-list a { align-items: flex-start; flex-direction: column; gap: .3rem; }
    #collection.writems-reader .writems-collection-header,
    #collection.writems-reader #wrapper,
    #collection.writems-reader .writems-reader-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #collection.writems-reader .writems-collection-header { padding-top: 2.5rem; }
}
