:root {
    --bg: #f2f3f5;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --panel: rgba(255, 255, 255, 0.94);
    --text: #111111;
    --muted: #6d7278;
    --line: rgba(17, 17, 17, 0.10);
    --line-strong: rgba(17, 17, 17, 0.16);
    --shadow: 0 16px 50px rgba(17, 17, 17, 0.08);
    --soft-shadow: 0 10px 26px rgba(17, 17, 17, 0.04);
    --button-bg: #111111;
    --button-text: #ffffff;
    --chip-bg: rgba(17, 17, 17, 0.05);
    --accent: #111111;
    --bg-orb-a: rgba(118, 124, 255, 0.18);
    --bg-orb-b: rgba(137, 235, 255, 0.12);
    --bg-grid: rgba(17, 17, 17, 0.045);
}

html[data-theme="dark"] {
    --bg: #080909;
    --surface: rgba(17, 17, 17, 0.62);
    --surface-strong: rgba(17, 17, 17, 0.82);
    --panel: rgba(17, 17, 17, 0.92);
    --text: #f5f5f2;
    --muted: #b2b4b8;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --shadow: 0 18px 56px rgba(0, 0, 0, 0.34);
    --soft-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    --button-bg: #f5f5f2;
    --button-text: #111111;
    --chip-bg: rgba(255, 255, 255, 0.07);
    --accent: #f5f5f2;
    --bg-orb-a: rgba(120, 130, 255, 0.16);
    --bg-orb-b: rgba(120, 196, 255, 0.10);
    --bg-grid: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background-color .35s ease, color .35s ease;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}
.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 1;
    animation: drift 14s ease-in-out infinite alternate;
}
.orb-a {
    width: 30rem;
    height: 30rem;
    top: -10rem;
    right: -6rem;
    background: radial-gradient(circle, var(--bg-orb-a), transparent 68%);
}
.orb-b {
    width: 26rem;
    height: 26rem;
    left: -8rem;
    bottom: -10rem;
    background: radial-gradient(circle, var(--bg-orb-b), transparent 68%);
    animation-duration: 18s;
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--bg-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--bg-grid) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.92), transparent 84%);
    opacity: .55;
}
@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(1.5rem, 1.25rem, 0) scale(1.06); }
}

.shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding-bottom: 72px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding-top: 18px;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform .25s ease, background-color .35s ease, border-color .35s ease;
}
.site-header.is-scrolled .site-header-inner {
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.96rem;
    font-weight: 600;
}
.brand-mark {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent);
}
.site-nav, .header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color .25s ease, background-color .25s ease;
}
.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: var(--chip-bg);
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.theme-toggle:hover { transform: translateY(-1px); background: var(--chip-bg); }
.theme-label { font-size: 0.92rem; }
.theme-icon { font-size: 0.94rem; }
html[data-theme="dark"] .theme-icon-light,
html[data-theme="light"] .theme-icon-dark { display: none; }

.flash-stack {
    width: min(960px, 100%);
    margin: 18px auto 0;
    display: grid;
    gap: 12px;
}
.flash-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.flash-success { color: var(--text); }
.flash-warning { color: var(--text); }
.flash-danger { color: #b42318; }
html[data-theme="dark"] .flash-danger { color: #ffb4b4; }

.page {
    padding-top: 44px;
}

.hero {
    min-height: calc(100vh - 152px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}
.hero-home {
    padding: 5vh 0 10vh;
}
.hero-subpage {
    min-height: unset;
    padding: 42px 0 18px;
    align-items: flex-end;
}
.hero-copy {
    max-width: 760px;
}
.compact-copy { max-width: 700px; }
.hero-kicker,
.mini-kicker {
    margin-bottom: 18px;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}
.hero-title {
    margin: 0;
    font-size: clamp(4.6rem, 12vw, 7.8rem);
    line-height: 0.92;
    font-weight: 600;
    letter-spacing: -0.07em;
}
.hero-title span {
    display: block;
}
.compact-title {
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 0.98;
}
.hero-desc {
    margin: 22px 0 0;
    max-width: 660px;
    font-size: 1.03rem;
    line-height: 1.8;
    color: var(--muted);
}
.compact-desc { max-width: 560px; }
.hero-actions,
.hero-side-actions,
.form-submit-row,
.row-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-actions {
    margin-top: 32px;
}
.two-line-actions {
    justify-content: flex-end;
}
.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn-main:hover { transform: translateY(-1px); }
.btn-solid {
    background: var(--button-bg);
    color: var(--button-text);
    border-color: transparent;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
}
.small-btn { min-height: 44px; padding: 0 18px; }

.section-block {
    margin-top: 42px;
}
.feature-section,
.form-section,
.results-stack {
    margin-top: 54px;
}
.last-section-gap { margin-bottom: 60px; }
.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.section-title-row h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: -0.05em;
}
.slim-row { margin-bottom: 18px; }

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.number-card,
.feature-card,
.content-card,
.project-table-card,
.empty-panel,
.form-shell,
.result-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}
.number-card {
    padding: 22px 24px;
    border-radius: 24px;
}
.number-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}
.number-card strong {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.feature-card {
    display: block;
    padding: 22px;
    border-radius: 26px;
    transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    background: var(--surface-strong);
}
.feature-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--chip-bg);
    margin-bottom: 18px;
    font-size: 1rem;
}
.feature-card h3 {
    margin: 0;
    font-size: 1.16rem;
}
.feature-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.dual-column,
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.content-card,
.form-shell,
.project-table-card,
.empty-panel,
.result-card {
    border-radius: 28px;
    padding: 24px;
}
.simple-list,
.stats-list {
    display: grid;
    gap: 12px;
}
.simple-list-row,
.stats-row,
.project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.simple-list-row:last-child,
.stats-row:last-child,
.project-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.simple-list-row strong,
.stats-row strong { font-weight: 600; }
.simple-list-row p,
.project-main-cell small,
.empty-inline,
.field-row label,
.project-scene-cell,
.project-time-cell,
.meta-row-grid span,
.info-block span {
    color: var(--muted);
}
.simple-list-row p {
    margin: 4px 0 0;
}

.project-table-head {
    padding: 0 0 16px;
    color: var(--muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--line);
}
.grid-row {
    display: grid;
    grid-template-columns: 2.2fr 1.4fr 1fr 1.4fr 1fr;
    gap: 16px;
    align-items: center;
}
.project-row { padding: 18px 0; }
.project-main-cell { display: grid; gap: 4px; }
.project-main-cell strong { font-size: 1rem; }
.row-actions {
    justify-content: flex-start;
    gap: 14px;
}
.text-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
}
.inline-form {
    display: inline;
    margin: 0;
}
.text-action.danger {
    color: #b42318;
}
html[data-theme="dark"] .text-action.danger {
    color: #ffb4b4;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 0.88rem;
}
.status-pill.parsed { color: #0f766e; }
.status-pill.parsing { color: #b45309; }
.status-pill.parse_failed { color: #b42318; }
.status-pill.neutral { color: var(--muted); }
.status-pill.accent { color: var(--text); }
.status-pill.warning { color: #b45309; }
html[data-theme="dark"] .status-pill.parsed { color: #6ee7b7; }
html[data-theme="dark"] .status-pill.parsing { color: #f6c453; }
html[data-theme="dark"] .status-pill.parse_failed { color: #ffb4b4; }
html[data-theme="dark"] .status-pill.warning { color: #ffd372; }

.clean-form {
    display: grid;
    gap: 18px;
}
.feature-card-form {
    margin: 0;
}
.feature-card-button {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.feature-card-button .feature-icon,
.feature-card-button h3,
.feature-card-button p {
    text-align: left;
}
.hero-side-actions form {
    margin: 0;
}
.compact-form { gap: 16px; }
.field-row {
    display: grid;
    gap: 10px;
}
.field-row.single { grid-column: 1 / -1; }
.field-row input,
.field-row textarea,
.field-row select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    color: var(--text);
    padding: 15px 16px;
    outline: none;
    transition: border-color .25s ease, background-color .25s ease;
}
.field-row input:focus,
.field-row textarea:focus,
.field-row select:focus {
    border-color: var(--line-strong);
}
.field-row textarea { resize: vertical; }
.field-row input::placeholder,
.field-row textarea::placeholder { color: var(--muted); }
select option {
    background: #ffffff;
    color: #111111;
}
html[data-theme="dark"] select option {
    background: #111111;
    color: #f5f5f2;
}
.left-row { justify-content: flex-start; }

.empty-panel {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 12px;
}
.empty-panel i {
    font-size: 2rem;
    color: var(--muted);
}
.empty-panel h3 {
    margin: 0;
    font-size: 1.4rem;
}
.empty-panel p { margin: 0; color: var(--muted); }

.results-stack {
    display: grid;
    gap: 18px;
}
.result-card { padding: 24px; }
.result-card.is-muted { opacity: 0.9; }
.result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.result-head h3 {
    margin: 0;
    font-size: 1.26rem;
}
.result-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.meta-row-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.meta-row-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 0.98rem;
}
.info-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.info-block p {
    margin: 8px 0 0;
    line-height: 1.8;
}

@media (max-width: 1100px) {
    .feature-grid,
    .numbers-grid,
    .meta-row-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-row {
        grid-template-columns: 1.8fr 1.2fr 1fr 1.2fr 1fr;
    }
}

@media (max-width: 880px) {
    .shell { width: min(100%, calc(100% - 24px)); }
    .site-header-inner {
        padding: 12px 14px;
        border-radius: 26px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .site-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-top: 4px;
    }
    .hero,
    .hero-subpage {
        min-height: unset;
        display: grid;
        gap: 24px;
        padding: 36px 0 8px;
    }
    .hero-title { font-size: clamp(3rem, 16vw, 5.2rem); }
    .dual-column,
    .field-grid,
    .feature-grid,
    .numbers-grid,
    .meta-row-grid,
    .parse-numbers-grid {
        grid-template-columns: 1fr;
    }
    .grid-row,
    .project-table-head {
        grid-template-columns: 1fr;
    }
    .project-table-head { display: none; }
    .project-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px 0;
    }
    .row-actions { justify-content: flex-start; }
    .result-head,
    .simple-list-row,
    .stats-row,
    .section-title-row {
        display: grid;
        gap: 10px;
    }
    .result-tags { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


.feature-card p[style*='white-space:pre-line'] { line-height: 1.85; }
