/*
Theme Name: 历程社学习空间
Description: 简体中文、适配读屏与移动设备的独立课程学习主题。
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: licheng-learning
*/

:root {
    --lc-paper: #faf9f5;
    --lc-surface: #ffffff;
    --lc-ink: #1d1d18;
    --lc-muted: #5f5d4f;
    --lc-accent: #f9ed37;
    --lc-accent-hover: #eadb20;
    --lc-link: #1d1d18;
    --lc-link-hover: #5b4d00;
    --lc-tint: #f8f5df;
    --lc-line: #d8d5c8;
    --lc-strong-line: #817e6f;
    --lc-focus: #1d1d18;
    --lc-error: #922c28;
    --lc-width: 1120px;
    color-scheme: light;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: var(--lc-ink);
    background: var(--lc-paper);
    scrollbar-color: var(--lc-strong-line) var(--lc-paper);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; min-width: 0; }
body, input, button, select, textarea { font-family: inherit; }
::selection { color: var(--lc-ink); background: var(--lc-accent); }
input, textarea { caret-color: var(--lc-ink); }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--lc-link); text-decoration-thickness: 1px; text-underline-offset: .23em; overflow-wrap: anywhere; }
a:hover { color: var(--lc-link-hover); text-decoration-thickness: 2px; }
button, input, textarea, select { font-size: 1rem; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: rgba(249, 237, 55, .35); }
:focus-visible, .cs-space :focus-visible { outline: 3px solid var(--lc-focus); outline-offset: 4px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
h1, h2, h3, h4 { color: var(--lc-ink); font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
h1 { margin: 0 0 1rem; font-size: clamp(1.9rem, 4.3vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 2.7vw, 1.9rem); margin: 2.2rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 .65rem; }
h4 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; overflow-wrap: anywhere; }
ul, ol { padding-inline-start: 1.5rem; }
li { overflow-wrap: anywhere; }
strong { font-weight: 700; }
small { font-size: .88rem; }
hr { border: 0; border-top: 1px solid var(--lc-line); margin: 2rem 0; }

.screen-reader-text, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100001; padding: .7rem 1rem; background: var(--lc-accent); color: var(--lc-ink); }

.site-header { background: var(--lc-paper); border-bottom: 1px solid var(--lc-line); }
.site-header-inner { max-width: var(--lc-width); margin: 0 auto; padding: 1.4rem 0; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.site-brand { text-decoration: none; color: var(--lc-ink); flex: 1 1 250px; display: flex; align-items: center; gap: .75rem; min-width: 0; }
.site-brand-logo { display: block; flex: 0 0 56px; width: 56px; height: 56px; }
.site-brand-text { min-width: 0; }
.site-brand-name { display: block; font-size: 1.65rem; line-height: 1.25; font-weight: 750; letter-spacing: .04em; }
.site-brand-description { display: block; margin-top: .22rem; font-size: .78rem; color: var(--lc-muted); }
.site-brand:hover { text-decoration: none; color: var(--lc-ink); }
.site-navigation ul { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; list-style: none; padding: 0; margin: 0; }
.site-navigation a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--lc-ink); font-size: .9rem; }
.site-navigation a[aria-current="page"] { color: var(--lc-ink); background: var(--lc-tint); text-decoration: underline; text-decoration-thickness: 2px; font-weight: 700; }
.site-navigation a:hover { text-decoration: underline; }
.site-account { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .88rem; }
.account-name { max-width: 12rem; display: inline-flex; align-items: center; min-height: 44px; }
.account-exit { display: inline-flex; align-items: center; min-height: 44px; color: var(--lc-muted); }
.site-login, .cs-space .cs-button, .cs-space button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    max-width: 100%;
    padding: .6rem 1.1rem;
    border: 1px solid var(--lc-ink);
    border-radius: 6px;
    font: inherit;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: var(--lc-accent);
    color: var(--lc-ink);
    cursor: pointer;
    white-space: normal;
}
.site-login:hover, .cs-space .cs-button:hover, .cs-space button:hover, button:hover, input[type="submit"]:hover { background: var(--lc-accent-hover); color: var(--lc-ink); }
button:disabled, input[type="submit"]:disabled, .cs-space button:disabled { background: #e9e6dc; color: #635f52; border-color: var(--lc-line); cursor: not-allowed; }

.site-main { max-width: var(--lc-width); margin: 0 auto; padding: 2.8rem 0 4rem; min-height: 60vh; }
.page-content { min-width: 0; }
.page-title { margin-bottom: 1.5rem; }
.page-content > p, .page-content > ul, .page-content > ol { max-width: 74ch; }
.page-empty { padding-block: 2rem; }
.site-footer { border-top: 1px solid var(--lc-line); color: var(--lc-muted); font-size: .85rem; }
.site-footer-inner { max-width: var(--lc-width); margin: auto; padding: 1.4rem 0 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 2rem; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }

.cs-space { max-width: none; margin: 0; font-size: 1rem; line-height: 1.8; }
.cs-space > nav:first-child { border-bottom: 1px solid var(--lc-line); margin-bottom: 2rem; }
.cs-space nav ul { gap: .25rem 1.4rem; margin: 0; padding-bottom: .7rem; }
.cs-space nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .9rem; }
.cs-space nav a[aria-current="page"] { background: var(--lc-tint); font-weight: 700; text-decoration-thickness: 2px; }
.cs-space > h2:first-child, .cs-space > nav + h2 { margin-top: 0; }
.cs-space article { padding: 1.5rem 0; border-bottom: 1px solid var(--lc-line); }
.cs-space article h2:first-child, .cs-space article h3:first-child { margin-top: 0; }
.cs-space article p { max-width: 74ch; }
.cs-space label { display: block; font-weight: 650; margin-bottom: .35rem; }
.cs-space input[type="text"], .cs-space input[type="email"], .cs-space input[type="password"], .cs-space textarea, .cs-space select {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    display: block;
    padding: .65rem .8rem;
    font: inherit;
    color: var(--lc-ink);
    background: var(--lc-surface);
    border: 1px solid var(--lc-strong-line);
    border-radius: 5px;
}
.cs-space textarea { line-height: 1.7; resize: vertical; }
.cs-space input[type="checkbox"], .cs-space input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: var(--lc-ink); vertical-align: middle; }
.cs-space input[type="file"] { max-width: 100%; min-height: 46px; font: inherit; }
.cs-space input[type="file"]::file-selector-button { min-height: 44px; border: 1px solid var(--lc-strong-line); background: var(--lc-surface); padding: .45rem .7rem; color: var(--lc-ink); border-radius: 5px; margin-right: .6rem; font: inherit; cursor: pointer; }
.cs-space input::placeholder, .cs-space textarea::placeholder { color: var(--lc-muted); opacity: 1; }
.cs-space form { padding: 1.4rem; margin: 1.2rem 0 2rem; background: var(--lc-surface); border: 1px solid var(--lc-line); border-radius: 8px; max-width: 780px; }
.cs-space form > p:last-child { margin-bottom: 0; }
.cs-space small { color: var(--lc-muted); }
.cs-space .cs-notice { border: 1px solid var(--lc-line); padding: .9rem 1.1rem; color: var(--lc-ink); background: var(--lc-tint); border-radius: 6px; }
.cs-space details { margin: 1.2rem 0; padding: 0 1.1rem; border: 1px solid var(--lc-line); border-radius: 8px; background: var(--lc-surface); }
.cs-space summary { cursor: pointer; min-height: 48px; padding: .8rem 0; font-weight: 650; }
.cs-space details[open] > summary { margin-bottom: .6rem; }
.cs-space details > form { padding: 0; border: 0; }
.cs-space .cs-comments { list-style: none; padding: 0; }
.cs-space .cs-comments ol { padding-inline-start: 1.1rem; }
.cs-space .cs-comments article { padding: 1.1rem 0; }
.cs-space .cs-comments article a { display: inline-flex; align-items: center; min-height: 44px; }
.cs-space table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.cs-space th, .cs-space td { padding: .65rem .8rem; border-bottom: 1px solid var(--lc-line); text-align: left; overflow-wrap: anywhere; }
.cs-space th { background: var(--lc-tint); font-weight: 700; }
.cs-space progress { width: min(100%, 28rem); height: .8rem; accent-color: var(--lc-ink); }
.cs-space .cs-upload-status:empty { display: none; }

.lc-intro { padding: .5rem 0 1.5rem; }
.lc-intro > h1, .lc-intro > p, .lc-course-overview > p { max-width: 74ch; }
.lc-intro > p { color: var(--lc-muted); }
.lc-intro h1 { color: var(--lc-ink); }
.lc-intro-lead { font-size: 1.1rem; max-width: 48ch; }
.lc-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 1.5rem 0 2.5rem; }
.lc-intro-actions a:not(.cs-button) { min-height: 44px; display: inline-flex; align-items: center; }
#lc-curriculum { margin-top: 2.5rem; }
#lc-curriculum > h2 { border-bottom: 1px solid var(--lc-line); padding-bottom: .85rem; }
.lc-learning-guide { max-width: 74ch; }
.lc-learning-guide li { padding: .3rem 0; }
.lc-chapter { padding: 1.4rem 0; border-bottom: 1px solid var(--lc-line); }
.lc-chapter > h3 { margin-top: 0; }
.lc-chapter-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; }
.lc-course-overview { margin: 1rem 0 2rem; color: var(--lc-muted); }
.lc-lessons { list-style: none; padding: 0; margin: .5rem 0 0; }
.lc-lesson-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1.5rem; padding: .5rem 0; border-top: 1px solid #e8e5d9; }
.lc-lesson-row:first-child { border-top: 0; }
.lc-lesson-link { min-height: 44px; display: inline-flex; align-items: center; flex: 1 1 20rem; }
.lc-lesson-title { flex: 1 1 20rem; }
.lc-lesson-meta, .lc-meta { color: var(--lc-muted); font-size: .85rem; }
.lc-lesson-meta { font-variant-numeric: tabular-nums; }
.lc-progress-summary { padding: 1.3rem 1.5rem; background: var(--lc-tint); border: 1px solid var(--lc-line); border-radius: 8px; margin: 1.5rem 0 2rem; }
.lc-progress-summary h2, .lc-progress-summary h3 { margin-top: 0; }
.lc-progress-summary p:last-child { margin-bottom: 0; }
.lc-dashboard-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.lc-dashboard-links a { display: inline-flex; align-items: center; min-height: 44px; }
.lc-lesson-state { color: var(--lc-muted); font-size: .9rem; }
.lc-lesson-navigation { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.lc-status { display: inline-block; color: var(--lc-muted); font-size: .82rem; }
.lc-status-complete { color: var(--lc-ink); font-weight: 650; }

@media (min-width: 1000px) {
    .lc-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 3rem; }
    .lc-course-overview { margin-top: 0; }
    .lc-learning-guide { margin-top: .4rem; }
    .lc-learning-guide h2 { margin-top: 0; font-size: 1.3rem; }
    #lc-curriculum { grid-column: 1 / -1; margin-top: 1rem; }
}

@media (max-width: 1200px) {
    .site-header-inner, .site-main, .site-footer-inner { margin-inline: 2rem; }
}
@media (max-width: 760px) {
    .site-header-inner, .site-main, .site-footer-inner { margin-inline: 1rem; }
    .site-header-inner { padding-block: 1rem; gap: .6rem 1rem; }
    .site-brand { flex-basis: calc(100% - 9rem); }
    .site-brand-name { font-size: 1.5rem; }
    .site-navigation { order: 3; flex: 1 1 100%; }
    .site-navigation ul { gap: .25rem 1.1rem; }
    .site-account { margin-left: auto; gap: .2rem .6rem; }
    .account-name { max-width: 7rem; }
    .site-login { padding: .55rem .85rem; }
    .site-main { padding-block: 1.75rem 3rem; }
    .cs-space nav ul { gap: .15rem 1rem; }
    .cs-space form { padding: 1rem; }
    .lc-progress-summary { padding: 1rem; }
}
@media (max-width: 420px) {
    .site-brand { flex-basis: 100%; }
    .site-account { margin-left: 0; }
    .site-navigation { order: 2; }
    .site-account { order: 3; }
    .site-brand-description { font-size: .82rem; }
    .cs-space form { padding: .8rem; }
    .cs-space .cs-comments ol { padding-inline-start: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    .site-login, .cs-space .cs-button, .cs-space button, button, input[type="submit"] { border: 1px solid ButtonText; }
    a[aria-current="page"] { outline: 1px solid LinkText; }
    :focus-visible, .cs-space :focus-visible { outline: 3px solid Highlight; }
    .lc-progress-summary, .cs-space .cs-notice, .cs-space form { border: 1px solid CanvasText; }
}
