:root {
  color-scheme: light;
  --ink: #172a38;
  --text: #2f3d46;
  --muted: #68747b;
  --line: #d8dfe3;
  --soft: #f3f6f7;
  --warm: #f7f4ed;
  --blue: #1d6597;
  --red: #c93c32;
  --green: #247b68;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  line-height: 1.65;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.portal-header {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  position: sticky;
  top: 0;
  z-index: 20;
}

.portal-header-inner {
  max-width: 1240px;
  min-height: 64px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 18px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand-logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: block;
}

.brand-copy { min-width: 0; display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 18px; font-weight: 800; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }

.portal-header nav { flex: 0 0 auto; display: flex; gap: 22px; }
.portal-header nav a { color: #35434c; font-size: 13px; white-space: nowrap; }

.portal-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 52px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: start;
}

.portal-left,
.portal-right { position: sticky; top: 88px; min-width: 0; }

.portal-left h2,
.portal-right h2 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.portal-left nav { display: grid; }
.portal-left nav a { padding: 8px 10px; color: #3e4a52; border-bottom: 1px solid #edf1f3; }

.rail-method { margin-top: 24px; }
.rail-method p { margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.rail-method ul { margin: 0; padding: 0; list-style: none; }
.rail-method li { padding: 6px 0 6px 12px; border-bottom: 1px solid #edf1f3; color: var(--text); font-size: 12px; position: relative; }
.rail-method li::before { content: ""; width: 4px; height: 4px; background: var(--green); position: absolute; left: 0; top: 14px; }

.portal-feed {
  min-width: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 24px;
}

.feed-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 13px;
}

.feed-heading > div { min-width: 0; }
.feed-heading h1 { margin: 3px 0 0; font-size: 26px; line-height: 1.2; letter-spacing: 0; overflow-wrap: anywhere; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 800; }
.feed-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.site-intro {
  margin: 16px 0 2px;
  padding: 12px 16px;
  border-left: 4px solid var(--green);
  background: var(--soft);
  color: var(--text);
}

.site-intro p { margin: 0; }
.site-intro p + p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.site-intro-lead { font-weight: 600; }
.empty-state { padding: 28px 0; color: var(--muted); }

.feed-row { padding: 19px 0; border-bottom: 1px solid var(--line); }
.feed-row-type { color: var(--green); font-size: 12px; font-weight: 800; }
.feed-row h2 { margin: 4px 0 7px; font-size: 18px; line-height: 1.4; letter-spacing: 0; overflow-wrap: anywhere; }
.feed-row h2 a { color: var(--ink); }
.feed-row > p { margin: 0 0 12px; color: #4d5961; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-row-meta,
.article-byline { min-width: 0; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }

.author-meta { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.author-meta:hover { text-decoration: none; }
.author-meta img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.author-meta span { min-width: 0; display: grid; }
.author-meta strong,
.author-meta small { overflow-wrap: anywhere; }
.author-meta small { color: var(--muted); }
.score { color: var(--red); font-weight: 800; }

.portal-right section + section { margin-top: 26px; }
.portal-right ol { margin: 0; padding: 0; list-style: none; }
.portal-right li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 8px; padding: 9px 0; border-bottom: 1px solid #edf1f3; }
.portal-right li > span { grid-row: 1 / 3; color: var(--red); font-weight: 800; }
.portal-right li a { color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.portal-right li small { color: var(--muted); }

.trust-panel { border-top: 4px solid var(--green); padding-top: 12px; }
.trust-panel h2 { border-bottom-width: 1px; }
.trust-panel > p { margin: 0 0 12px; color: var(--text); font-size: 12px; }
.trust-panel dl { margin: 0; }
.trust-panel dt { margin-top: 9px; color: var(--ink); font-size: 12px; font-weight: 800; }
.trust-panel dd { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.portal-article {
  min-width: 0;
  padding: 3px 24px 24px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.article-kicker { color: var(--green); font-size: 12px; font-weight: 800; }
.portal-article h1 { margin: 8px 0 16px; font-size: 30px; line-height: 1.3; letter-spacing: 0; overflow-wrap: anywhere; }
.article-byline { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article-excerpt { margin: 20px 0; padding: 14px; background: var(--soft); color: #4d5961; font-size: 16px; }

.editorial-disclosure {
  margin: 20px 0;
  padding: 11px 14px;
  border-left: 4px solid var(--red);
  background: var(--warm);
  display: grid;
  gap: 3px;
  color: var(--text);
  font-size: 12px;
}

.editorial-disclosure strong { color: var(--ink); }
.article-body { margin-top: 24px; font-size: 16px; }
.article-body h2 { margin: 32px 0 12px; font-size: 22px; letter-spacing: 0; }
.article-body h3 { margin: 24px 0 10px; font-size: 18px; letter-spacing: 0; }
.article-body img { max-width: 100%; height: auto; }
.article-body pre { max-width: 100%; overflow: auto; padding: 14px; background: var(--ink); color: #f6f8fa; }
.article-body table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.article-body th,
.article-body td { padding: 7px 10px; border: 1px solid var(--line); }

.article-keywords { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 7px; }
.article-keywords span { max-width: 100%; padding: 3px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.article-links { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.author-card { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.author-card h1 { margin: 12px 0 0; font-size: 24px; }

.portal-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-inner { width: min(920px, calc(100% - 40px)); margin: auto; padding: 24px 0; text-align: center; }
.footer-brand { display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--ink); font-size: 16px; }
.footer-brand img { display: block; }
.footer-inner > p { max-width: 760px; margin: 10px auto; }
.footer-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 1000px) {
  .portal-grid { grid-template-columns: 160px minmax(0, 1fr) 230px; gap: 18px; }
  .portal-feed,
  .portal-article { padding-left: 18px; padding-right: 18px; }
  .brand-copy small { max-width: 290px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 900px) {
  .portal-header-inner { gap: 16px; }
  .portal-header nav { gap: 12px; }
  .brand-copy small { max-width: 250px; }
  .portal-grid { width: min(calc(100% - 24px), 720px); grid-template-columns: 1fr; margin-top: 16px; }
  .portal-left,
  .portal-right { position: static; }
  .portal-left { display: none; }
  .portal-right { padding-top: 18px; border-top: 1px solid var(--line); }
  .portal-feed,
  .portal-article { padding-left: 0; padding-right: 0; border-left: 0; border-right: 0; }
  .portal-article h1 { font-size: 27px; }
}

@media (max-width: 680px) {
  .portal-header-inner { align-items: center; padding-left: 12px; padding-right: 12px; }
  .brand-copy small { max-width: 210px; white-space: normal; line-height: 1.25; }
  .portal-header nav a:nth-child(n + 3) { display: none; }
  .feed-heading { align-items: start; }
}

@media (max-width: 520px) {
  .portal-header-inner { min-height: 60px; gap: 8px; }
  .brand { gap: 7px; }
  .brand-logo { flex-basis: 32px; width: 32px; height: 32px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { max-width: 170px; font-size: 9px; }
  .portal-header nav { gap: 9px; }
  .portal-header nav a { font-size: 12px; }
  .portal-grid { width: calc(100% - 24px); gap: 18px; }
  .feed-heading h1 { font-size: 22px; }
  .feed-heading > span { padding-top: 4px; }
  .site-intro { padding: 10px 12px; }
  .feed-row h2 { font-size: 17px; }
  .feed-row-meta { flex-wrap: wrap; }
  .portal-article h1 { font-size: 24px; }
  .footer-inner { width: calc(100% - 28px); }
}

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