:root {
    color-scheme: light;
    --canvas: #f3f6fb;
    --surface: #fff;
    --ink: #152541;
    --muted: #546780;
    --line: #dce5f0;
    --accent: #214bc8;
    --accent-hover: #173aa6;
    --navy: #11264a;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #6289fc; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .shell, .footer { max-width: 1272px; margin-inline: auto; padding-inline: 32px; }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.12rem; font-weight: 750; white-space: nowrap; }
.brand-icon { width: 33px; height: 33px; background: var(--accent); color: white; border-radius: 9px; display: grid; align-content: center; justify-content: center; gap: 3px; }
.brand-icon i { display: block; background: currentColor; width: 13px; height: 2px; border-radius: 2px; }
.brand-icon i:last-child { width: 9px; color: #aacaef; }
.site-header nav { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: .9rem; }
.site-header nav a:hover, .site-header [aria-current] { color: var(--accent); }
.link-button { color: inherit; border: 0; background: none; padding: 0; }
.link-button:hover { color: var(--accent); }
.shell { margin-block: 30px 44px; min-height: calc(100vh - 214px); }
.footer { padding-block: 0 27px; color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); font-size: .875rem; }
.eyebrow { color: #c2d3ff; font-weight: 650; font-size: .875rem; letter-spacing: .07em; }
.hero, .signin-intro {
    color: #fff;
    background:
        radial-gradient(ellipse at 95% 0%, #2a4c8e 0, transparent 58%),
        linear-gradient(110deg, #102446, #172f5c);
}
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px 36px 32px; border-radius: 17px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); line-height: 1.22; margin-block: 8px 12px; overflow-wrap: anywhere; }
.hero p, .signin-intro p { color: #d4dff4; }
.hero.project-hero { gap: 12px; padding: 8px 16px; border-radius: 10px; margin-bottom: 14px; }
.project-hero h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 1.125rem; line-height: 1.4; }
.hero-status { flex-shrink: 0; padding: 2px 10px; border: 1px solid #7b96d0; border-radius: 999px; color: #eef4ff; font-size: .875rem; white-space: nowrap; }
.breadcrumb { display: flex; gap: 10px; align-items: baseline; margin-bottom: 14px; color: var(--muted); font-size: .875rem; }
.breadcrumb a, .text-link { color: var(--accent); font-weight: 650; }
.text-link:hover, .breadcrumb a:hover { text-decoration: underline; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: 15px; box-shadow: 0 4px 12px #12284b06; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 19px 24px; }
.panel-head h2, .guide h2, .dialog h2 { font-size: 1.125rem; }
.panel-head .muted { margin-top: 3px; }
#draft-status.draft-error { color: #8c1e38; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: .9rem; font-weight: 620; white-space: nowrap; }
.button:hover:not(:disabled) { background: #edf2ff; border-color: #bdcff8; }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); color: white; }
.button.white { color: var(--navy); }
.button.small { min-height: 34px; padding: 5px 11px; font-size: .875rem; }
.button.danger { color: #a5233d; }
.button.delete-confirm { color: white; background: #a5233d; border-color: #a5233d; }
.button.delete-confirm:hover { background: #871a31; border-color: #871a31; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.project-actions { flex-wrap: nowrap; white-space: nowrap; gap: 12px; }
#delete-project-dialog p { margin-top: 9px; overflow-wrap: anywhere; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.tabs-wrap { display: flex; align-items: center; gap: 10px; padding-inline: 20px; background: #f7f9fd; border-block: 1px solid var(--line); }
.tabs { min-width: 0; flex: 1; display: flex; overflow-x: auto; gap: 3px; scrollbar-width: thin; }
.menu-item { display: inline-flex; align-items: stretch; max-width: 100%; flex-shrink: 0; }
.tab { padding: 12px 12px 10px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: none; font-size: .9rem; white-space: nowrap; }
.tab:focus-visible { outline-offset: -3px; }
.tab:hover, .tab[aria-current] { color: var(--accent); background: #ecf2ff; }
.tab[aria-current] { border-bottom-color: var(--accent); font-weight: 680; }
.menu-item:has(.menu-toggle) .tab { padding-right: 5px; }
.menu-toggle { width: 29px; min-height: 34px; display: grid; place-items: center; background: transparent; border: 0; color: var(--muted); }
.menu-toggle::before { content: ""; height: 7px; width: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { color: var(--accent); background: #ecf2ff; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(225deg); }
.menu-toggle:focus-visible { outline-offset: -3px; }
.submenus { padding: 10px 20px; border-bottom: 1px solid var(--line); background: #f8faff; }
.submenu-level { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.submenu-level .tab { padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.submenu-level .menu-item:has(.menu-toggle) .tab { border-radius: 7px 0 0 7px; }
.submenu-level .menu-toggle { border: 1px solid var(--line); border-left: 0; border-radius: 0 7px 7px 0; }
.submenu-level .tab:hover, .submenu-level .tab[aria-current] { border-color: #aabded; background: #ecf2ff; }
.submenu-level .menu-add { color: var(--accent); border-style: dashed; }
.third-menu { margin: 8px 0 1px 12px; padding-left: 12px; border-left: 2px solid #aabded; }
.section-path { margin-bottom: 5px; overflow-wrap: anywhere; }
.workspace-body { padding: 23px 24px 28px; min-height: 325px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 11px; }
.section-heading h2 { font-size: 1.32rem; overflow-wrap: anywhere; }
.hint { padding: 10px 13px; margin-bottom: 19px; border-left: 3px solid #8cabef; border-radius: 3px 7px 7px 3px; color: #37537d; background: #eff4fe; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.hint-input { display: block; width: 100%; font-family: inherit; line-height: inherit; border: 1px solid #dce6fb; border-left: 3px solid #8cabef; resize: vertical; }
.rich-content { overflow-wrap: anywhere; line-height: 1.75; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin-block: .75em .4em; line-height: 1.35; }
.rich-content h2 { font-size: 1.4rem; }
.rich-content p + p { margin-top: .55em; }
.rich-content a { color: var(--accent); text-decoration: underline; }
.rich-content img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; border-radius: 8px; }
.rich-content figure { margin: 17px 0 0; }
.rich-content figcaption { font-size: .83rem; color: var(--muted); margin-top: 5px; }
.guide { padding: 19px 20px; }
.progress-line { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; }
.progress-line strong { font-size: 1.26rem; }
progress { width: 100%; height: 9px; border: 0; border-radius: 8px; margin-block: 8px 11px; overflow: hidden; background: #e9eef7; accent-color: var(--accent); display: block; }
progress::-webkit-progress-bar { background: #e9eef7; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
.overview, .overview ul { list-style: none; margin: 0; padding: 0; }
.overview ul { padding-inline-start: 12px; border-inline-start: 1px solid var(--line); }
.overview-link[aria-current] { color: var(--accent); font-weight: 650; }
.overview-link { width: 100%; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid #e9edf5; background: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: .875rem; }
.overview-link:hover { color: var(--accent); }
.overview-link > :first-child { overflow-wrap: anywhere; }
.overview-status { color: var(--muted); flex-shrink: 0; font-size: .82rem; }
.overview-status.filled { color: #216546; font-weight: 650; }
.saved { color: var(--muted); font-size: .83rem; margin-top: 14px; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 38px 20px; text-align: center; color: var(--muted); }
.empty.compact { padding: 25px 15px; }
.empty h1, .empty h3 { color: var(--ink); }
.empty-icon { border-radius: 10px; background: #eef3ff; color: var(--accent); display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; width: 36px; height: 36px; }
.editor-box { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 7px; background: #f4f7fc; border-bottom: 1px solid var(--line); }
.toolbar button { min-height: 36px; border: 0; color: var(--ink); background: transparent; border-radius: 5px; padding-inline: 8px; font-size: .875rem; }
.toolbar button:hover:not(:disabled) { color: var(--accent); background: #e9efff; }
.editor { min-height: 250px; padding: 14px; }
.editor:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.editor-help { margin: 0; padding: 8px 12px; font-size: .83rem; color: var(--muted); background: #f7f9fd; border-top: 1px solid var(--line); }
.notice { padding: 10px 14px; background: #e8f4ed; color: #236045; border-radius: 8px; margin-block: 13px; }
.notice.error { background: #fff0f3; color: #8c1e38; }
.share-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-bottom: 21px; padding: 14px 18px; }
.share-panel .share-input { flex: 1 1 200px; min-width: 0; background: #f7f9fd; }
.share-panel form { margin: 0; }
.badge { border-radius: 999px; background: #eef2f9; color: #3f5271; padding: 4px 10px; display: inline-block; font-size: .83rem; white-space: nowrap; }
.badge.green { background: #e6f4ec; color: #205f43; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 14px 24px; border-top: 1px solid var(--line); }
th { white-space: nowrap; color: var(--muted); background: #f7f9fd; }
.subline { display: block; font-size: .83rem; color: var(--muted); }
.dialog { width: min(450px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); padding: 24px; box-shadow: 0 12px 50px #11264a30; }
.dialog::backdrop { background: #101e3d85; }
.dialog .actions { justify-content: flex-end; margin-top: 24px; }
label { display: block; font-size: .92rem; font-weight: 650; margin-top: 15px; }
input:not([type="checkbox"], [type="file"], [type="hidden"]) {
    width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; color: var(--ink); min-height: 39px;
}
label input:not([type="checkbox"]) { margin-top: 5px; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { accent-color: var(--accent); }
.signin { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); background: #fff; border-radius: 18px; max-width: 1000px; margin: 52px auto; }
.signin-intro { padding: clamp(26px, 5vw, 62px); }
.signin-intro h1 { margin-block: 14px 18px; line-height: 1.28; font-size: clamp(1.9rem, 4vw, 2.75rem); }
.signin-intro .button { margin-top: 24px; }
.signin-form { padding: clamp(26px, 5vw, 48px); }
.signin-form h2 { margin-bottom: 7px; }
.signin-form > .button { width: 100%; margin-top: 21px; }

@media (max-width: 900px) {
    .project-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; }
    .header-inner, .shell, .footer { padding-inline: 20px; }
    .hero { padding-inline: 24px; }
}
@media (max-width: 690px) {
    .header-inner, .shell, .footer { padding-inline: 13px; }
    .header-inner { min-height: 60px; }
    .site-header nav { gap: 12px; }
    .shell { margin-top: 18px; }
    .project-layout, .signin { grid-template-columns: minmax(0, 1fr); }
    .signin { margin-top: 20px; }
    .hero { padding: 24px 16px; }
    .dashboard-hero { flex-wrap: wrap; }
    .panel-head, .workspace-body { padding-inline: 14px; }
    .tabs-wrap { padding-inline: 10px; }
    .submenus { padding-inline: 10px; }
    .guide { padding: 17px; }
    th, td { padding-inline: 12px; }
}
@media (max-width: 375px) {
    .brand { gap: 7px; font-size: 1rem; }
    .site-header nav { gap: 8px; font-size: .82rem; }
    .hero-status { padding-inline: 8px; }
    .panel-head { flex-wrap: wrap; }
}
