:root {
  color-scheme: light;
  --ink: #172a25;
  --muted: #596760;
  --paper: #f6f7f3;
  --surface: #fff;
  --line: #dbe1d9;
  --accent: #27614f;
  --green: #dcebe2;
  --copper: #923c20;
  --copper-light: #fae9dd;
  --header: #152a27;
  --radius: 12px;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
}

* { box-sizing: border-box; }
html { overflow-y: scroll; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #bd6236; outline-offset: 3px; }
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { line-height: 1.37; }
h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 790; letter-spacing: -.045em; }
h2 { font-size: 19px; }
h3 { font-size: 18px; }
small { font-size: .84em; }
[hidden] { display: none !important; }
.sr-only, .skip: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:focus { position: fixed; z-index: 3; top: 12px; left: 12px; background: white; padding: 8px 14px; }
.frame { width: min(100% - 64px, 1250px); margin-inline: auto; }
.topbar { background: var(--header); color: #edf4ed; }
.topbar-inner { display: flex; align-items: center; min-height: 68px; gap: 43px; }
.topbar a { color: #d6e5db; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 740; letter-spacing: .025em; }
.brand img { display: block; border-radius: 8px; }
.topbar nav { display: flex; gap: 25px; align-self: stretch; }
.topbar nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.topbar nav a[aria-current] { border-bottom-color: #a4d1b7; color: #fff; font-weight: 740; }
.owner { margin-left: auto; white-space: nowrap; font-size: 13px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 50px 0 32px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.hero p { margin-top: 12px; font-size: 16px; color: var(--muted); }
.hero-date { text-align: right; flex-shrink: 0; }
.hero-date > span { font-size: 23px; letter-spacing: -.03em; font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.hero-date small { color: var(--muted); }
.hero-date i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #558b68; margin-right: 3px; }
.dashboard, .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, 300px); gap: 28px; align-items: start; }
.dashboard.admin-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); }
.main-column { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tabs a { font-size: 14px; padding: 7px 15px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); color: var(--ink); }
.tabs a[aria-current] { background: var(--accent); color: white; border-color: var(--accent); font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
select, input:not([type=checkbox]) { min-width: 0; width: 100%; color: var(--ink); background-color: white; border: 1px solid #c7d1c7; border-radius: 7px; min-height: 38px; padding: 6px 9px; }
input::placeholder { color: #68756e; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.filters .search { flex: 1 0 135px; }
.date-filter { color: var(--muted); font-size: 13px; }
.date-filter summary { cursor: pointer; padding: 8px 3px; white-space: nowrap; }
.date-fields { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.button { display: inline-flex; justify-content: center; align-items: center; color: white; background: var(--accent); border: 1px solid var(--accent); border-radius: 7px; padding: 6px 14px; min-height: 38px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.button:not(:disabled):hover { filter: brightness(.92); text-decoration: none; }
.button.secondary { color: var(--accent); border-color: #c9d5cb; background: var(--surface); }
.feed-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; padding: 14px 1px 10px; }
.feed-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.news-row { display: flex; align-items: flex-start; gap: 16px; padding: 20px 18px; border-bottom: 1px solid var(--line); }
.news-row:last-child { border-bottom: 0; }
.score { display: grid; place-content: center; text-align: center; flex: 0 0 64px; min-height: 64px; border-radius: 10px; color: #235344; background: var(--green); line-height: 1; font-variant-numeric: tabular-nums; }
.score.high { color: var(--copper); background: var(--copper-light); }
.score > span { font-weight: 800; font-size: 27px; letter-spacing: -.07em; }
.score small { font-size: 10px; padding-top: 6px; }
.story { min-width: 0; flex: 1; }
.story-meta, .byline { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; color: var(--muted); font-size: 12px; }
.topic, .label { color: var(--accent); background: #eef4ed; font-size: 12px; font-weight: 660; display: inline-block; border-radius: 5px; padding: 1px 7px; }
.story h3 { margin: 6px 0; font-size: 18px; overflow-wrap: anywhere; }
.story h3 a { color: var(--ink); }
.impact { font-size: 14px; color: #3b4c43; overflow-wrap: anywhere; }
.impact > span { display: inline-block; color: var(--accent); margin-right: 7px; font-size: 12px; font-weight: 650; }
.byline { margin-top: 9px; }
.story-open { margin: 2px 0 0 auto; border: 1px solid var(--line); border-radius: 50%; width: 28px; height: 28px; display: grid; place-content: center; flex: 0 0 28px; font-size: 15px; }
.sidebar { display: grid; align-content: start; gap: 14px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.panel-heading > a { font-size: 12px; white-space: nowrap; }
.calendar-mini { padding: 0; margin-top: 12px; list-style: none; }
.calendar-mini li { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.calendar-mini li:last-child { border-bottom: 0; }
.calendar-mini time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.calendar-mini time span { display: block; font-weight: 680; color: var(--ink); }
.calendar-mini a { color: var(--ink); font-weight: 640; }
.micro { margin-top: 10px; color: var(--muted); font-size: 12px; }
.notes h2 { font-size: 16px; }
.notes p, .notes a { font-size: 13px; margin-top: 8px; display: block; }
.notes p, .muted { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 24px 0 8px; color: var(--muted); }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 33px 26px; text-align: center; }
.empty p, .empty a { margin-top: 9px; }
.empty a { display: inline-block; }
.narrow { max-width: 420px; margin: 55px auto; }
.narrow h1 { font-size: 28px; }
.login form, .stack { display: grid; gap: 10px; }
.login form { margin-top: 16px; }
.login .back { margin-top: 20px; }
.footer { margin-top: 44px; padding: 17px 0 24px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
.detail { padding-top: 33px; }
.back { display: inline-block; font-weight: 630; font-size: 13px; }
.detail-header { max-width: 970px; padding: 18px 0 26px; }
.detail-header h1 { font-family: var(--serif); font-size: clamp(29px, 4.6vw, 46px); margin: 10px 0; overflow-wrap: anywhere; }
.detail-header p { color: var(--muted); }
.detail-body { padding: 0 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.detail-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border: 0; }
.detail-section p { margin-top: 9px; overflow-wrap: anywhere; }
.detail-section h3 { margin: 13px 0 3px; font-size: 15px; }
.detail-section h2 small { color: var(--muted); font-weight: 500; }
.score-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.score-panel p { font-size: 13px; color: var(--muted); }
.details-list { display: flex; flex-wrap: wrap; gap: 12px 23px; margin: 13px 0 0; }
.details-list dt { font-size: 12px; color: var(--muted); }
.details-list dd { margin: 0; }
.source-articles { margin-top: 10px; padding: 0; list-style: none; }
.source-articles li { border-bottom: 1px solid var(--line); padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; }
.source-articles li:last-child { border: 0; }
.source-articles li h3 { margin: 3px 0; }
.source-articles .byline { margin-top: 3px; }
.plain-list { margin-top: 8px; padding-left: 18px; }
.plain-list li { margin-top: 5px; }
.calendar-table { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.calendar-table h2 { margin: 0; padding: 9px 17px; background: #e8eee7; font-size: 15px; }
.calendar-line { display: grid; grid-template-columns: minmax(67px, 85px) 1fr auto; gap: 11px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.calendar-line time { font-weight: 650; font-variant-numeric: tabular-nums; }
.calendar-line span { color: var(--muted); font-size: 12px; }
.sources-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.source-table-head, .source-line { display: grid; grid-template-columns: 1fr 155px; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.source-table-head { background: #e8eee7; font-size: 13px; font-weight: 670; }
.source-line:last-child { border: 0; }
.source-line small, .block { display: block; color: var(--muted); }
.source-line a { font-weight: 650; }
.status { font-size: 12px; color: var(--muted); }
.status.live { color: var(--accent); }
.status.warn { color: var(--copper); }
.notice { margin: 12px 0; padding: 10px 14px; background: var(--green); border-radius: 7px; }
.notice.error { color: var(--copper); background: var(--copper-light); }
.select-toolbar, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.select-event { padding-top: 11px; }
.watch-list { list-style: none; padding: 0; margin: 9px 0 12px; }
.watch-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 7px 0; overflow-wrap: anywhere; }
.watch-list small { display: block; color: var(--muted); }
.text-button { background: transparent; border: 0; color: var(--accent); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.digest-list { padding-left: 23px; }
.digest-list > li { padding: 8px 0; }
.digest-list .plain-list { font-size: 13px; }
.translation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.translation-grid h3 { margin-top: 12px; }
.translation-grid p { margin-top: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 950px) {
  .frame { width: calc(100% - 42px); }
  .dashboard, .detail-grid { grid-template-columns: minmax(0,1fr) 245px; gap: 17px; }
  .dashboard.admin-layout { grid-template-columns: minmax(0,1fr) 245px; }
  .filters label { flex: 1 0 24%; }
}
@media (max-width: 700px) {
  .frame { width: calc(100% - 32px); }
  .topbar-inner { gap: 11px 17px; flex-wrap: wrap; padding: 10px 0 0; min-height: 0; }
  .topbar nav { order: 3; width: 100%; min-height: 39px; }
  .topbar nav a { font-size: 13px; }
  .hero { align-items: start; flex-direction: column; gap: 8px; padding: 29px 0 20px; margin-bottom: 17px; }
  .hero p { margin-top: 7px; font-size: 14px; }
  .hero-date { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .hero-date > span { font-size: 14px; }
  .dashboard, .dashboard.admin-layout, .detail-grid, .translation-grid { grid-template-columns: minmax(0,1fr); }
  .admin-layout > .sidebar { grid-row: 1; }
  .news-row { padding: 15px 11px; gap: 10px; }
  .score { flex-basis: 52px; min-height: 54px; }
  .score > span { font-size: 23px; }
  .story h3 { font-size: 16px; }
  .story-open { display: none; }
  .filters { padding: 10px; }
  .filters select { max-width: 100%; }
  .detail-header { padding-bottom: 14px; }
  .detail-body { padding: 0 14px; }
  .calendar-line { grid-template-columns: 65px 1fr; padding-inline: 12px; }
  .calendar-line span { grid-column: 2; }
  .source-line, .source-table-head { grid-template-columns: 1fr 115px; padding-inline: 11px; }
}

.earlier { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.earlier article { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.earlier article:last-child { border: 0; padding-bottom: 0; }
.earlier article .label { flex: 0 0 auto; }
.earlier article a { color: var(--ink); font-weight: 670; overflow-wrap: anywhere; }
.earlier article p { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .empty { padding: 23px 15px; }
  .earlier { padding: 13px; }
}
