/* Original CSS. Portal geometry follows the supplied reference screenshot. */
:root {
  --ink: #333;
  --muted: #64716a;
  --line: #dfe9e2;
  --accent: #ce0e0e;
  --page: #d9f7e0;
  --surface: rgba(255, 255, 255, .82);
  --rail: 310px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 Arial, 'Microsoft YaHei', sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #347746; outline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; }
.container { width: 100%; padding: 0 10px; }

/* Compact wrapping navigation, native navbar content. */
.site-header { background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 60px; padding-top: 5px; padding-bottom: 5px; }
.brand { display: flex; align-items: center; gap: 7px; max-width: 230px; min-width: 0; font-size: 19px; font-weight: 700; line-height: 1.25; }
.brand-symbol { width: 30px; height: 30px; flex-shrink: 0; color: #682781; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navigation { flex: 1; min-width: 200px; }
.navigation ul { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 0 4px; }
.navigation li { position: relative; }
.navigation a { display: block; padding: 10px 8px; font-size: 18px; line-height: 24px; font-weight: 700; }
.navigation ul ul { display: none; position: absolute; z-index: 5; top: 100%; left: 0; min-width: 160px; padding: 5px; background: #f9fffb; border: 1px solid var(--line); }
.navigation li:hover > ul, .navigation li:focus-within > ul { display: block; }
.navigation ul ul a { font-size: 15px; font-weight: 400; padding: 7px 10px; }
.search-form { display: flex; flex: 0 0 180px; height: 32px; }
.search-form input { width: 100%; min-width: 0; border: 1px solid #ccd9cf; border-right: 0; padding: 4px 8px; border-radius: 2px 0 0 2px; background: white; font-size: 13px; }
.search-form button { display: grid; place-items: center; padding: 4px 9px; border: 1px solid #ccd9cf; border-radius: 0 2px 2px 0; color: #394c3e; background: #edf3ee; }
.search-form svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.menu-toggle { display: none; padding: 5px 12px; background: white; border: 1px solid #ccd9cf; border-radius: 2px; font-size: 14px; }

/* Two article columns and one shared rail; no fixed number of sections. */
.main { padding-top: 8px; padding-bottom: 16px; }
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 10px; align-items: start; }
.portal-layout--wide { grid-template-columns: minmax(0, 1fr); }
.portal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.portal-columns > * { height: max-content; }
.portal-columns.is-packed { grid-auto-rows: 4px; }
.portal-wide { grid-column: 1 / -1; }
.panel { background: var(--surface); border-radius: 3px; min-width: 0; overflow: hidden; }
.content-column { --heading: var(--accent); }
.tone-blue { --heading: #0000d5; }
.tone-green { --heading: #008000; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 43px; border-bottom: 1px solid var(--line); }
.section-heading h2 { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 8px 15px; font-size: 16px; line-height: 26px; font-weight: 700; color: var(--heading, var(--accent)); background: linear-gradient(180deg, #fff, #e5ede8); border-radius: 0 24px 24px 0; }
.section-heading h2::before { content: ''; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; flex-shrink: 0; }
.section-heading h2 a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.more-link { padding-right: 12px; flex-shrink: 0; color: #707a74; font-size: 12px; white-space: nowrap; }
.more-link span { font-size: 20px; vertical-align: -1px; }
.headline-list, .focus-lines { list-style: none; padding: 4px 15px 8px; }
.article-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 5px 0; border-bottom: 1px dotted var(--line); font-size: 16px; line-height: 20px; }
.article-line:last-child { border-bottom: 0; }
.article-line > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-line time { flex-shrink: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.focus-panel .section-heading { min-height: 35px; }
.focus-panel .section-heading h2 { padding-top: 4px; padding-bottom: 4px; background: none; }
.focus-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.focus-lines li:first-child a { font-weight: 700; }
.focus-panel.with-image { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 15px; padding: 0 15px 10px; }
.focus-panel.with-image .section-heading { grid-column: 1 / -1; margin: 0 -15px 8px; }
.focus-panel.with-image .focus-lines { padding: 0; }
.article-card .cover { display: block; aspect-ratio: 16/9; overflow: hidden; }
.article-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-card h3 { font-size: 13px; line-height: 1.4; margin-top: 4px; }
.site-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 6px 15px; background: var(--surface); border-radius: 3px; }
.site-intro h1 { font-size: 20px; line-height: 30px; }
.site-intro p { color: var(--muted); font-size: 13px; }
.rail-panel { margin-bottom: 10px; }
.rail-panel .section-heading { margin: 0 15px; }
.rail-panel .section-heading h2 { padding: 8px 0; background: none; color: #333; }
.rail-panel .section-heading h2::before { display: none; }
.rank-list { padding: 5px 15px 12px 39px; }
.rank-list li, .browse-list li { padding: 6px 0; font-size: 15px; line-height: 20px; }
.rank-list li::marker { font-size: 13px; color: #64716a; }
.rank-list li:nth-child(-n+3)::marker { color: var(--accent); font-weight: 700; }
.rank-list a, .browse-list a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browse-list { list-style: none; padding: 5px 15px 12px; }
.friendlinks ul { display: flex; flex-wrap: wrap; gap: 7px 20px; padding: 10px 15px; list-style: none; font-size: 14px; }
.empty { padding: 14px 15px; color: var(--muted); font-size: 14px; }

/* Shared lists, standard article body and native modules. */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 5px 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.page-heading { padding: 10px 15px; background: var(--surface); margin-bottom: 10px; }
.page-heading h1 { font-size: 22px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 10px; align-items: start; }
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.article-row { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.article-row:last-child { border-bottom: 0; }
.article-row h2 { font-size: 17px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.metadata { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.article-detail { padding: 24px; }
.article-detail h1 { font-size: 28px; line-height: 1.45; overflow-wrap: anywhere; }
.post-body { font-size: 16px; line-height: 1.85; margin-top: 24px; overflow-wrap: anywhere; }
.post-body p { margin: 16px 0; }
.post-body h2 { font-size: 22px; margin: 24px 0 10px; }
.post-body h3 { font-size: 18px; margin: 20px 0 10px; }
.post-body img { max-width: 100%; height: auto; }
.post-body table { display: block; max-width: 100%; overflow: auto; }
.post-body pre { overflow: auto; padding: 15px; background: #edf3ee; }
.post-body a { color: #1c6aa0; text-decoration: underline; }
.sidebar-module { padding: 14px 15px; margin-bottom: 10px; font-size: 14px; }
.sidebar-module h2 { font-size: 16px; margin-bottom: 10px; }
.module-body { list-style: none; padding: 0; }
.module-body li { margin: 7px 0; overflow-wrap: anywhere; }
.module-body input { max-width: 100%; }
.module-body table { width: 100%; }
.module-body td, .module-body th { text-align: center; padding: 3px; }
.module-body td a { display: block; color: #236b38; font-weight: 700; }
.module-body #today { background: #d9f7e0; }
[data-widget="tags"] .module-body { display: flex; flex-wrap: wrap; gap: 5px 12px; }
[data-widget="tags"] .module-body li { margin: 2px 0; }
.update-count strong { color: var(--accent); font-size: 21px; }
.update-date { margin-top: 8px; color: var(--muted); font-size: 13px; }
.article-line--image { align-items: center; min-height: 86px; }
.article-line--image > a { display: flex; align-items: center; gap: 10px; }
.article-line--image img { width: 110px; height: 69px; object-fit: cover; flex-shrink: 0; }
.article-line--image span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagebar { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 15px; }
.pagebar a, .pagebar > span { min-width: 32px; padding: 3px 9px; border: 1px solid #ccd9cf; text-align: center; font-size: 14px; background: white; }
.pagebar [aria-current] { background: #3a7048; border-color: #3a7048; color: white; }
.site-footer { padding: 18px 0; background: var(--surface); color: var(--muted); font-size: 12px; }
.site-footer > .container { display: flex; flex-wrap: wrap; gap: 6px 15px; align-items: center; }
.site-footer > .container > span { font-weight: 700; color: var(--ink); }
.copyright { margin-left: auto; overflow-wrap: anywhere; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; top: 5px; left: 5px; background: white; padding: 8px; }

@media (max-width: 1100px) {
  :root { --rail: 250px; }
  .navigation a { font-size: 16px; padding-left: 6px; padding-right: 6px; }
  .brand { max-width: 180px; font-size: 17px; }
  .search-form { flex-basis: 150px; }
  .headline-list, .focus-lines { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 900px) {
  .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .portal-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
}
@media (max-width: 768px) {
  .header-inner { gap: 5px 10px; padding-top: 8px; padding-bottom: 8px; }
  .brand { flex: 1; max-width: none; }
  .menu-toggle { display: block; }
  .navigation { order: 3; flex-basis: 100%; min-width: 0; }
  .navigation #site-menu { display: none; gap: 0; }
  .navigation #site-menu.is-open { display: block; padding: 5px 0; }
  .navigation a { padding: 7px 8px; font-size: 16px; }
  .navigation ul ul { display: block; position: static; border: 0; padding: 0 16px; background: none; }
  .search-form { order: 4; flex: 1 1 100%; }
  .article-detail { padding: 20px; }
  .article-detail h1 { font-size: 25px; }
}
@media (max-width: 580px) {
  .portal-columns, .portal-rail, .sidebar { grid-template-columns: minmax(0, 1fr); }
  .focus-lines { grid-template-columns: minmax(0, 1fr); }
  .focus-panel.with-image { grid-template-columns: 105px minmax(0, 1fr); gap: 0 10px; }
  .focus-panel.with-image .focus-lines { grid-template-columns: minmax(0, 1fr); }
  .focus-panel.with-image .article-line { font-size: 13px; }
  .focus-panel.with-image time { display: none; }
  .article-line { font-size: 15px; padding-top: 8px; padding-bottom: 8px; }
  .rank-list li, .browse-list li { padding-top: 8px; padding-bottom: 8px; }
  .section-heading h2 { font-size: 15px; padding-left: 12px; }
  .site-intro { gap: 2px; flex-direction: column; padding: 8px 12px; }
  .site-intro h1 { font-size: 18px; }
  .article-detail h1 { font-size: 23px; }
  .article-row h2 { font-size: 16px; }
  .site-footer > .container { display: block; }
  .copyright { margin: 5px 0; }
}
