:root {
    color-scheme: light;
    --page: #f5f7fb;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #758096;
    --line: #e5eaf2;
    --accent: #2864dc;
    --accent-soft: #edf3ff;
    --shadow: 0 18px 50px rgba(25, 46, 88, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page); }

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    line-height: 1.6;
}

a { color: inherit; }

button,
select { font: inherit; }

.site-shell,
.preview-shell {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 72px 0 48px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 54px); line-height: 1.15; letter-spacing: -.04em; }

.hero-copy { margin: 0; color: var(--muted); font-size: 16px; }

.hero-stat {
    min-width: 128px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-stat strong { display: block; font-size: 32px; line-height: 1; }
.hero-stat span { color: var(--muted); font-size: 13px; }

.toolbar,
.update-card,
.empty-state,
.error-state,
.preview-frame-wrap {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    border-radius: var(--radius-lg);
}

.toolbar h2 { margin-bottom: 2px; font-size: 20px; }
.toolbar p { margin: 0; color: var(--muted); font-size: 13px; }

.filter-form { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.filter-form select { min-width: 130px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfe; }
.filter-form button { padding: 8px 12px; border: 0; border-radius: 10px; color: white; background: var(--accent); cursor: pointer; }

.update-groups { display: grid; gap: 40px; padding: 42px 0 0; }
.date-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.date-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.date-heading span { color: var(--muted); font-size: 13px; }
.update-list { display: grid; gap: 12px; }

.update-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border-radius: var(--radius-md); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.update-card:hover { border-color: #c8d6f5; box-shadow: 0 20px 48px rgba(25, 46, 88, .12); transform: translateY(-2px); }
.update-card-main { min-width: 0; }
.update-label { margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.update-card h3 { margin-bottom: 10px; font-size: 18px; overflow-wrap: anywhere; }
.update-meta { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 0; color: var(--muted); font-size: 12px; }
.update-meta div { display: flex; gap: 6px; min-width: 0; }
.update-meta dt { color: #9aa5b8; }
.update-meta dd { margin: 0; overflow-wrap: anywhere; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 118px; padding: 10px 15px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: #1e50bc; }
.button:focus-visible, select:focus-visible, .back-link:focus-visible { outline: 3px solid rgba(40, 100, 220, .26); outline-offset: 3px; }

.empty-state,
.error-state { margin: 42px 0; padding: 58px 24px; border-radius: var(--radius-lg); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 20px; font-weight: 800; }
.empty-state h2, .error-state h2 { margin-bottom: 8px; font-size: 22px; }
.empty-state p, .error-state p { max-width: 520px; margin: 0 auto 22px; color: var(--muted); }
.empty-state code { padding: 2px 6px; border-radius: 6px; color: var(--ink); background: #eef1f7; }
.site-footer { padding: 42px 0 56px; color: #a0aabe; font-size: 12px; text-align: center; }

.preview-page { min-height: 100vh; }
.preview-shell { width: min(1320px, calc(100% - 40px)); }
.preview-header { padding: 34px 0 24px; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.preview-heading h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 44px); }
.preview-meta { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.preview-frame-wrap { min-height: calc(100vh - 210px); padding: 10px; border-radius: var(--radius-lg); }
.preview-frame { display: block; width: 100%; min-height: calc(100vh - 230px); border: 0; border-radius: 15px; background: #fff; }
.error-state { margin-top: 20px; }

@media (max-width: 680px) {
    .site-shell, .preview-shell { width: min(100% - 24px, 560px); }
    .hero { align-items: stretch; flex-direction: column; padding: 42px 0 28px; }
    .hero-stat { align-self: flex-start; }
    .toolbar { align-items: stretch; flex-direction: column; padding: 18px; }
    .filter-form { align-items: stretch; flex-direction: column; }
    .filter-form select { width: 100%; }
    .update-groups { padding-top: 28px; }
    .update-card { align-items: stretch; flex-direction: column; padding: 18px; }
    .button { width: 100%; }
    .preview-header { padding-top: 24px; }
    .preview-frame-wrap { min-height: calc(100vh - 190px); padding: 6px; }
    .preview-frame { min-height: calc(100vh - 205px); border-radius: 12px; }
}
