/* 我的書房 — a plain stylesheet, linked from the page rather than imported by it.
 *
 * Docusaurus merges every imported stylesheet into the single bundle the homepage links, so an
 * import here would put this page's layout on the critical path of a page that never shows it.
 * The zh-Hans homepage has about four kilobytes of headroom against a hard budget; this is the
 * same reason the reading serif is linked from the article template instead of imported.
 */

.study-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

.study-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.study-lede {
    margin: 0;
    color: var(--ifm-color-emphasis-700);
    line-height: 1.7;
}

/* A count, not a score. Two facts the reader already knows, said back to them — no streak, no
   level, nothing that turns reading into a number to keep up. */
.study-stats {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--esoteric-gold-text);
}

.study-section {
    margin-top: 2.5rem;
}

.study-section > h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

/* The true state of an empty study, rendered by the server — not a placeholder waiting for
   JavaScript. It is also what a crawler sees, which is correct: this page has no content that
   belongs to anyone but its owner. */
.study-empty {
    margin-top: 2.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--ifm-color-emphasis-300);
    border-radius: 12px;
}

.study-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.study-empty p {
    margin: 0 auto 1.25rem;
    max-width: 34rem;
    color: var(--ifm-color-emphasis-700);
    line-height: 1.7;
}

.study-emptyAction,
.study-shelfAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--ifm-color-primary);
    font-weight: 600;
    text-decoration: none;
}

.study-emptyAction:hover,
.study-shelfAction:hover {
    background: var(--ifm-color-primary);
    color: var(--ifm-background-color);
    text-decoration: none;
}

.study-shelf,
.study-finished,
.study-dayList {
    list-style: none;
    margin: 0;
    padding: 0;
}

.study-shelfItem {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.study-shelfItem:last-child {
    border-bottom: none;
}

.study-shelfCopy {
    flex: 1 1 auto;
    min-width: 0;
}

.study-shelfCopy h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.study-shelfMeta {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--ifm-color-emphasis-700);
}

.study-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--ifm-color-emphasis-200);
    overflow: hidden;
}

.study-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--ifm-color-primary);
}

.study-shelfAction {
    flex: 0 0 auto;
}

.study-finished li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.study-finishedDate {
    font-size: 0.82rem;
    color: var(--ifm-color-emphasis-700);
}

.study-day {
    margin-bottom: 1.25rem;
}

.study-dayLabel {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ifm-color-emphasis-700);
}

.study-dayList li {
    padding: 0.3rem 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .study-shelfItem {
        flex-direction: column;
        align-items: stretch;
    }

    .study-shelfAction {
        align-self: flex-start;
    }
}
