:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #16181d;
  --text-soft: #5c6472;
  --accent: #c62f2f;
  --accent-soft: #fdeceb;
  --focus: #1a5fff;
  --shadow: 0 1px 2px rgba(16, 20, 28, 0.06), 0 8px 24px rgba(16, 20, 28, 0.06);
  --radius: 12px;
}
body[data-theme='dark'] {
  color-scheme: dark;
  --bg: #14161a;
  --surface: #1c1f25;
  --surface-2: #23272f;
  --border: #30353d;
  --text: #f2f4f7;
  --text-soft: #a5adba;
  --accent: #ff6b63;
  --accent-soft: #33201f;
  --focus: #7fa6ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.app { min-height: 100%; display: flex; flex-direction: column; }
.state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 20px; text-align: center; }
.state h1 { font-size: 20px; margin: 0; }
.state p { margin: 0; color: var(--text-soft); max-width: 30em; }
.state__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.state__hint { font-size: 13px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.content { display: flex; flex-direction: column; flex: 1; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar__title h1 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.topbar__meta { margin: 4px 0 0; font-size: 12px; color: var(--text-soft); }
.topbar__actions { display: flex; gap: 8px; flex-shrink: 0; }

.banner { margin: 12px 20px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 13px; border: 1px solid var(--border); }

.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 20px 28px; align-items: start; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .layout--detail .layout__list { display: block; }
}
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.news-item { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: inherit; font: inherit; box-shadow: var(--shadow); transition: transform 0.12s ease, border-color 0.12s ease; }
.news-item:hover { border-color: var(--accent); }
.news-item:active { transform: scale(0.995); }
.news-item[aria-current='true'] { border-color: var(--accent); background: var(--accent-soft); }
.news-item__index { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); min-width: 1.6em; }
.news-item__title { font-weight: 600; font-size: 15px; }
.news-item__meta { margin-top: 4px; font-size: 12px; color: var(--text-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.empty { color: var(--text-soft); padding: 24px 4px; }

.detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 18px; box-shadow: var(--shadow); position: sticky; top: 12px; }
@media (max-width: 899px) { .detail { position: static; } }
.detail__bar { display: flex; justify-content: flex-start; }
.detail__body h2 { font-size: 19px; margin: 6px 0 6px; line-height: 1.35; }
.detail__meta { margin: 0 0 12px; font-size: 12px; color: var(--text-soft); }
.detail__summary { margin: 0 0 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.detail__text p { margin: 0 0 10px; }
.detail__note { font-size: 12px; color: var(--text-soft); }
.detail__actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.link-fallback { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.link-fallback input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13px; }

.brief { margin: 0 20px 24px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.brief__head { display: flex; align-items: center; justify-content: space-between; }
.brief__head h2 { font-size: 16px; margin: 0; }
.brief__text { white-space: pre-wrap; font-family: inherit; margin: 10px 0 6px; font-size: 14px; }
.brief__note { margin: 0; font-size: 12px; color: var(--text-soft); }

.button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-family: inherit; cursor: pointer; min-height: 36px; }
.button:hover { border-color: var(--accent); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.button--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--borderless { border-color: transparent; background: transparent; padding-left: 4px; }
.button:focus-visible, .news-item:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(20, 22, 26, 0.92); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 20; }
[hidden] { display: none !important; }

.detail--modal { margin: 10px; max-height: calc(100vh - 20px); overflow: auto; border-radius: var(--radius); }
