:root {
  color-scheme: light;
  --red: #da1a21;
  --ink: #172033;
  --muted: #64748b;
  --line: #d7dee8;
  --surface: #fff;
  --background: #f3f5f8;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--background); line-height: 1.55; }
button, select { font: inherit; }
select { cursor: pointer; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid rgba(218, 26, 33, .28); outline-offset: 2px; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app-header { position: sticky; z-index: 20; top: 0; border-bottom: 4px solid var(--red); color: #fff; background: var(--ink); }
.header-inner { display: grid; width: min(960px, 100%); min-height: 4.75rem; grid-template-columns: 2.75rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin: 0 auto; padding: max(.65rem, env(safe-area-inset-top)) .8rem .65rem; }
.icon-button { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: .45rem; color: #fff; text-decoration: none; }
.icon-button svg { width: 1.2rem; height: 1.2rem; }
.header-title { min-width: 0; }
.header-title p { margin: 0 0 .1rem; color: #cbd5e1; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.header-title h1 { overflow: hidden; margin: 0; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.language-control select { min-height: 2.5rem; border: 1px solid #526079; border-radius: .45rem; padding: .35rem 1.5rem .35rem .45rem; color: #fff; background: #253149; font-size: .72rem; font-weight: 700; }

.page-shell { width: min(960px, calc(100% - 1rem)); margin: .85rem auto 5rem; }
.notice, .content-panel, .article-detail { border: 1px solid var(--line); background: var(--surface); }
.notice { padding: 1rem; }
.notice-error { border-color: #fca5a5; color: #991b1b; background: #fef2f2; }
.section-heading { border-bottom: 1px solid var(--line); padding: 1rem; background: #f8fafc; }
.section-heading h2 { margin: 0; font-size: 1.1rem; }
.section-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .78rem; }
.article-list { padding: 0 1rem; }
.article-row { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr) 1rem; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; color: var(--ink); text-decoration: none; }
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: #f8fafc; }
.article-row.no-cover { grid-template-columns: minmax(0, 1fr) 1rem; }
.thumbnail-wrap { display: flex; min-height: 4rem; align-items: center; justify-content: center; overflow: hidden; background: #f1f5f9; }
.article-thumbnail { display: block; width: auto; max-width: 100%; height: auto; max-height: 9rem; object-fit: contain; }
.article-copy { min-width: 0; }
.article-copy h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.article-copy p { display: -webkit-box; margin: .35rem 0 0; overflow: hidden; color: #475569; font-size: .8rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-copy time { display: block; margin-top: .45rem; color: var(--muted); font-size: .68rem; }
.article-row > svg { width: 1rem; }
.empty { margin: 0; padding: 2rem 1rem; color: var(--muted); font-size: .82rem; text-align: center; }

.back-row { display: inline-flex; align-items: center; gap: .35rem; padding: .65rem 0; color: #334155; font-size: .8rem; font-weight: 700; text-decoration: none; }
.back-row svg { width: 1rem; }
.article-detail { overflow: hidden; }
.cover-wrap { display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); background: #f8fafc; }
.cover-image { display: block; width: auto; max-width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.article-heading { padding: 1.2rem 1.25rem 1rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; color: var(--muted); font-size: .7rem; }
.article-meta time { margin-right: auto; }
.article-metric { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.article-metric svg { width: .9rem; height: .9rem; }
.article-metric strong { color: #334155; font-variant-numeric: tabular-nums; }
.article-heading h2 { margin: .45rem 0 0; font-size: clamp(1.3rem, 4vw, 1.9rem); line-height: 1.3; }
.article-subtitle { margin: .55rem 0 0; color: #475569; font-size: .95rem; white-space: pre-wrap; }
.article-body { border-top: 1px solid var(--line); padding: 1.25rem; }
.article-body .markdown-body { color: #273449; font-size: .92rem; }
.sources { border-top: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; background: #f8fafc; }
.sources > h3 { margin: 0 0 .45rem; font-size: .82rem; }
.sources .markdown-body { color: #475569; font-size: .78rem; }
.article-share { border-top: 1px solid var(--line); padding: 1rem 1.25rem 1.15rem; }
.article-share > h3 { margin: 0 0 .65rem; font-size: .82rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.share-link, .share-button { display: inline-flex; min-height: 2.65rem; align-items: center; gap: .55rem; border: 1px solid #cbd5e1; border-radius: .4rem; padding: .35rem .75rem .35rem .35rem; color: #273449; background: #fff; font-size: .75rem; font-weight: 700; line-height: 1; text-decoration: none; }
.share-link:hover, .share-button:hover { border-color: #94a3b8; background: #f8fafc; }
.share-button { cursor: pointer; }
.share-icon { display: grid; width: 1.9rem; height: 1.9rem; flex: 0 0 1.9rem; place-items: center; border-radius: .3rem; color: #fff; }
.share-icon svg { width: 1.12rem; height: 1.12rem; }
.share-icon .brand-fill { fill: currentColor; stroke: none; }
.share-icon-facebook { background: #1877f2; }
.share-icon-whatsapp { background: #128c7e; }
.share-icon-whatsapp svg { width: 1.18rem; height: 1.18rem; stroke-width: 1.7; }
.share-icon-x { background: #111827; }
.share-icon-telegram { background: #258fca; }
.share-icon-generic { background: var(--red); }
.share-status { min-height: 1.1rem; margin: .45rem 0 0; color: var(--muted); font-size: .7rem; }

.markdown-body { min-width: 0; overflow-x: auto; overflow-wrap: anywhere; line-height: 1.65; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 1.25em 0 .55em; color: var(--ink); line-height: 1.3; }
.markdown-body h1 { font-size: 1.45em; }
.markdown-body h2 { font-size: 1.3em; }
.markdown-body h3 { font-size: 1.16em; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1em; }
.markdown-body p { margin: 0 0 .9em; }
.markdown-body ul, .markdown-body ol { margin: 0 0 .9em; padding-left: 1.5rem; }
.markdown-body li + li { margin-top: .25em; }
.markdown-body blockquote { margin: 0 0 .9em; border-left: 3px solid #94a3b8; padding: .1em 0 .1em .9em; color: #475569; }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body a { color: #a61218; text-decoration: underline; text-underline-offset: .15em; }
.markdown-body a:focus-visible { outline: 3px solid rgba(218, 26, 33, .28); outline-offset: 2px; }
.markdown-body code { border-radius: .2rem; padding: .1em .3em; background: #e8edf3; font: .92em/1.5 Consolas, "Courier New", monospace; }
.markdown-body pre { max-width: 100%; margin: 0 0 .9em; overflow: auto; border: 1px solid var(--line); padding: .8rem; background: #eef2f6; white-space: pre; }
.markdown-body pre code { border-radius: 0; padding: 0; background: transparent; font-size: .85rem; }
.markdown-body hr { margin: 1.2rem 0; border: 0; border-top: 1px solid var(--line); }
.markdown-body table { width: 100%; min-width: 32rem; margin: 0 0 .9em; border-collapse: collapse; background: #fff; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.markdown-body th { background: #eef2f6; font-weight: 700; }
.markdown-body img { display: block; width: auto; max-width: 100%; height: auto; margin: .8rem 0; object-fit: contain; }
.markdown-body.markdown-fallback { white-space: pre-wrap; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
  .header-title p { display: none; }
  .page-shell { width: calc(100% - .7rem); margin-top: .45rem; }
  .article-list { padding: 0 .8rem; }
  .article-row, .article-row.no-cover { grid-template-columns: minmax(0, 1fr) 1rem; gap: .7rem; }
  .thumbnail-wrap { grid-column: 1 / -1; }
  .article-thumbnail { width: 100%; max-height: 15rem; }
  .article-heading, .article-body { padding-inline: 1rem; }
  .sources, .article-share { padding-inline: 1rem; }
  .article-meta time { width: 100%; margin-right: 0; }
}
