:root {
  color-scheme: light;
  --paper: #f4f6fa;
  --ink: #121c31;
  --muted: #536078;
  --line: #d9e0ea;
  --navy: #102344;
  --blue: #2759bf;
  --mint: #8df0cc;
  --sans: "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #2d67d6; outline-offset: 4px; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px; background: white; }
.skip:focus { top: 12px; }
.top { border-bottom: 1px solid var(--line); background: #fff; }
.top-inner {
  min-height: 72px;
  display: grid;
  grid-template-areas: "brand navigation search language";
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.top-inner:dir(rtl) {
  grid-template-areas: "language brand navigation search";
  grid-template-columns: auto auto auto minmax(0, 1fr);
}
.top-inner > .brand { grid-area: brand; justify-self: start; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.18rem; font-weight: 750; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: end; justify-content: center; gap: 3px; width: 34px; height: 34px; padding-bottom: 8px; border-radius: 9px; background: var(--navy); }
.brand-mark i { width: 4px; background: var(--mint); border-radius: 1.5px; height: 8px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; }
.main-nav { grid-area: navigation; display: flex; align-items: center; gap: 25px; }
.main-nav a { font-size: .94rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { color: #1746a8; }
.main-nav a[aria-current] { font-weight: 700; }
.language-switch { grid-area: language; position: relative; z-index: 5; }
.language-switch summary { list-style: none; cursor: pointer; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; font-size: .875rem; font-weight: 650; }
.language-switch summary::-webkit-details-marker { display: none; }
.language-switch nav { position: absolute; right: 0; min-width: 126px; display: grid; gap: 2px; margin-top: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 8px 24px #10234420; }
.language-switch a { padding: 6px 8px; border-radius: 5px; font-size: .875rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.language-switch a:hover { color: var(--blue); }
.language-switch a[aria-current] { background: var(--navy); color: white; font-weight: 700; }
:lang(zh-CN) .intro h1, .feature h2:lang(zh-CN), .card h3:lang(zh-CN), .story-header h1:lang(zh-CN) { letter-spacing: normal; }
.search { grid-area: search; display: flex; justify-self: end; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f7f9fc; }
.search input { width: 150px; min-width: 0; border: 0; background: transparent; padding: 8px 11px; font-size: .88rem; color: var(--ink); }
.search button { border: 0; border-inline-start: 1px solid var(--line); background: #fff; padding: 8px 11px; color: var(--navy); font-size: .86rem; font-weight: 650; }
.search input:focus-visible, .search button:focus-visible { outline-offset: -3px; }
.search button:hover { background: #edf3fd; }
.demo-banner { text-align: center; color: #234270; padding: 7px 20px; background: #e7eef9; font-size: .83rem; }
.intro { padding: 45px 0 32px; }
.intro-date { margin: 0 0 10px; color: var(--blue); font-size: .92rem; font-weight: 700; }
.intro h1 { font: 700 clamp(2.55rem, 5.6vw, 4.45rem)/1.02 var(--serif); letter-spacing: -.065em; margin: 0; }
.intro h1 span { color: var(--blue); }
.intro-copy { color: var(--muted); margin: 16px 0 0; font-size: 1.04rem; line-height: 1.6; }
.feature { display: flex; position: relative; isolation: isolate; align-items: center; min-height: 380px; padding: 38px; border-radius: 15px; overflow: hidden; color: #f4f8ff; background: radial-gradient(ellipse at 96% 100%, #1c4584, transparent 66%), #102344; }
.feature-copy { z-index: 1; max-width: 680px; }
.feature-with-cover { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 50px); }
.feature-cover { min-width: 0; margin: 0; }
.feature-cover img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: contain; border-radius: 10px; background: #0d1a30; }
.feature-cover figcaption { margin-top: 7px; color: #c0d0ec; font-size: .82rem; }
.feature-label { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; color: #adebd9; font-size: .82rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.feature-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.feature-meta { margin: 0 0 9px; color: #c0d0ec; font-size: .9rem; }
.feature-meta span, .story-meta span { margin-inline: 5px; }
.feature h2 { margin: 0; font: 700 clamp(2.05rem, 3.7vw, 3.22rem)/1.08 var(--serif); letter-spacing: -.04em; text-wrap: balance; }
.feature h2 a { text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; text-underline-offset: .1em; }
.feature-summary { margin: 17px 0 24px; max-width: 47ch; color: #dbe6f8; line-height: 1.65; }
.button { display: inline-block; border: 0; border-radius: 7px; padding: 10px 15px; color: #102344; background: var(--mint); text-decoration: none; font-weight: 750; font-size: .94rem; }
.button:hover { background: #b3f7e0; }
.orbit { z-index: -1; pointer-events: none; position: absolute; width: 330px; height: 330px; right: -57px; bottom: -103px; opacity: .55; border: 1px solid #729dde; border-radius: 50%; box-shadow: 0 0 0 22px #9eceff12, 0 0 0 44px #9eceff12, 0 0 0 66px #9eceff0d; }
.orbit i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #aaf1df; box-shadow: 0 0 14px #8df0ccaa; }
.orbit i:nth-child(1) { top: 10%; left: 19%; }
.orbit i:nth-child(2) { top: 2%; right: 32%; width: 5px; height: 5px; }
.orbit i:nth-child(3) { top: 50%; left: -2%; width: 5px; height: 5px; }
.orbit i:nth-child(4) { top: 35%; right: 1%; }
.ranking { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: white; padding: 21px 21px 13px; }
.ranking-header { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.ranking h2 { font-size: 1.14rem; letter-spacing: -.025em; margin: 0; }
.ranking-header p { color: var(--muted); margin: 5px 0 12px; font-size: .875rem; }
.status { border-radius: 20px; background: #eaf0fa; padding: 4px 8px; color: #254477; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.status.ready { background: #dff8ee; color: #185d49; }
.status.waiting { background: #f7efe0; color: #6a4b0e; }
.ranking-list { margin: 0; padding: 0; list-style: none; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.ranking-list li { border-top: 1px solid #e7ebf1; }
.ranking-list li a { display: grid; align-items: baseline; grid-template-columns: 29px minmax(0, 1fr) auto; gap: 7px; padding: 9px 3px; text-decoration: none; }
.ranking-list li a:hover { color: var(--blue); background: #f2f6ff; }
.rank { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.ranking-list li:nth-child(-n+3) .rank { color: var(--blue); }
.rank-topic { min-width: 0; overflow-wrap: anywhere; font-weight: 650; font-size: .94rem; }
.traffic { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .84rem; }
.ranking-empty, .feed-empty { color: var(--muted); padding-block: 24px; line-height: 1.5; }
.ranking-footer { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #e7ebf1; padding-top: 11px; margin-top: 5px; color: var(--muted); font-size: .8rem; }
.ranking-footer a { color: #2352a8; text-underline-offset: 3px; white-space: nowrap; }
.feed { margin: 34px 0 60px; }
.feed-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); padding-top: 19px; }
.feed-heading h2 { margin: 0 0 13px; font: 700 2rem/1.1 var(--serif); letter-spacing: -.035em; }
.feed-heading p { color: var(--muted); margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.categories a, .pagination a { border-radius: 7px; border: 1px solid var(--line); background: white; text-decoration: none; padding: 6px 11px; font-size: .875rem; color: #3c4c67; }
.categories a:hover, .pagination a:hover { color: var(--blue); border-color: var(--blue); }
.categories a[aria-current] { background: var(--navy); color: white; border-color: var(--navy); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; display: flex; border: 1px solid var(--line); border-radius: 12px; background: white; }
.card-link { min-width: 0; width: 100%; display: flex; flex-direction: column; border-radius: inherit; text-decoration: none; }
.card-cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 11px 11px 0 0; background: #101a2c; }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.card-meta { color: var(--blue); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .83rem; font-weight: 700; }
.card-meta time, .card-date { color: var(--muted); font-weight: 400; font-size: .83rem; }
.card h3 { font: 700 1.43rem/1.16 var(--serif); letter-spacing: -.03em; margin: 12px 0 0; overflow-wrap: anywhere; }
.card-link:hover h3, .card-link:focus-visible h3 { color: var(--blue); text-decoration: underline; text-underline-offset: .12em; }
.card p { color: var(--muted); line-height: 1.55; margin: 11px 0 17px; }
.card-date { margin-top: auto; }
.pagination { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 26px; color: var(--muted); font-size: .9rem; }
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding-block: 22px; display: flex; align-items: center; gap: 18px; }
.story-wrap { max-width: 790px; }
.story { margin-block: 36px 65px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin-bottom: 29px; }
.breadcrumb a { color: var(--blue); text-underline-offset: 3px; }
.story-header h1 { font: 700 clamp(2.25rem, 5vw, 3.75rem)/1.06 var(--serif); letter-spacing: -.055em; margin: 0; }
.story-meta { margin: 15px 0; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.story-language-note { font-size: .9rem; color: var(--muted); }
.story-summary { color: #2b3a53; font: 1.32rem/1.57 var(--serif); margin: 23px 0; }
.story-body { border-top: 1px solid var(--line); padding-top: 11px; font-size: 1.08rem; line-height: 1.76; }
.story-body p { overflow-wrap: anywhere; }
.story-cover { margin: 24px 0; }
.story-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 12px; background: #101a2c; }
.story-cover img.default-cover { background: var(--navy); }
.story-cover figcaption { margin-top: 6px; color: var(--muted); font-size: .86rem; }
.story-inline-image { margin: 24px 0; }
.story-inline-image img { display: block; max-width: 100%; max-height: 700px; height: auto; margin-inline: auto; border-radius: 8px; }
.story-inline-image figcaption { margin-top: 6px; color: var(--muted); font-size: .86rem; text-align: center; }
.story-keywords { margin: 20px 0 25px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.story-keywords h2 { margin: 0 0 8px; font: 700 1rem/1.3 var(--sans); }
.story-keywords .categories { align-items: baseline; gap: 7px; margin: 0 0 7px; }
.story-keywords .categories:last-child { margin-bottom: 0; }
.keyword-label { color: var(--muted); font-size: .86rem; }
.story-keywords .focus-keyword { color: var(--navy); background: #e8efff; border-color: #b8c7ed; font-weight: 700; }
.story-keywords a, .more-stories a, .adjacent-stories a { overflow-wrap: anywhere; }
.story-body h2 { margin: 1.45em 0 .35em; font: 700 clamp(1.35rem, 3vw, 1.7rem)/1.35 var(--serif); overflow-wrap: anywhere; }
.story-body:lang(ar) h2 { letter-spacing: normal; }
.trend-diagnostic { overflow-wrap: anywhere; }
.more-stories { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 16px; }
.more-stories h2 { font: 700 1.55rem/1.2 var(--serif); margin: 0 0 12px; }
.more-stories ul { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.more-stories a, .adjacent-stories a { text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--blue); }
.adjacent-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.adjacent-stories div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.adjacent-stories span { color: var(--muted); font-size: .875rem; }
.error-page { padding-block: 80px; }
.admin { padding-block: 32px 58px; }
.admin h1 { font: 700 2.5rem/1.1 var(--serif); letter-spacing: -.04em; margin: 0 0 15px; }
.admin h2 { margin: 0 0 15px; font: 700 1.55rem/1.15 var(--serif); }
.admin-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 18px; align-items: start; }
.admin-sidebar { display: grid; min-width: 0; gap: 18px; }
.admin .ranking h2 { margin: 0; font: 700 1.15rem/1.3 var(--sans); }
.admin-panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.admin-cover-preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--navy); border-radius: 8px; margin-bottom: 14px; }
.login-panel { max-width: 440px; margin-inline: auto; }
.admin label { display: block; font-size: .91rem; font-weight: 680; margin: 0 0 12px; }
.admin input, .admin textarea, .admin select { display: block; width: 100%; border: 1px solid #bfcadc; border-radius: 7px; color: var(--ink); background: white; padding: 8px 10px; margin-top: 4px; }
.admin select { appearance: none; padding-right: 27px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 15px center / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center / 5px 5px no-repeat white; }
.admin textarea { resize: vertical; }
.admin-note { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.admin-notice { padding: 10px 12px; margin: 0 0 14px; border-radius: 7px; background: #e7eef9; color: #234270; }
.admin-error { background: #ffe9e8; color: #762321; }
.admin-action { border: 1px solid var(--line); border-radius: 7px; background: #f4f7fc; color: var(--navy); font-size: .88rem; font-weight: 650; padding: 7px 9px; }
.admin-action:hover { border-color: var(--blue); }
.admin-header a.admin-action { text-decoration: none; }
.admin-article-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.admin-article-filters label { flex: 1 1 180px; margin: 0; }
.admin-article-filters button { min-height: 39px; }
.admin-article-list { margin: 12px 0 0; padding: 0; list-style: none; }
.admin-article-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-block: 13px; }
.admin-article-list .admin-action { text-decoration: none; }
.article-editor-images { margin-top: 16px; }
.article-editor-cover img { display: block; width: min(100%, 220px); height: auto; border-radius: 6px; margin-bottom: 12px; }
.article-editor-image-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.article-editor-image-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.article-editor-image-list img { width: 104px; height: 66px; object-fit: cover; border-radius: 6px; }
.admin-article-title { display: inline-block; font-weight: 680; text-underline-offset: .16em; overflow-wrap: anywhere; }
.admin-article-title:hover { color: var(--blue); }
.admin-article-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 5px; font-size: .86rem; color: var(--muted); }
.provider-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.provider-entry { border-top: 1px solid var(--line); padding-block: 12px; }
.provider-entry summary { cursor: pointer; overflow-wrap: anywhere; }
.provider-entry[open] summary { margin-bottom: 14px; }
.provider-meta { display: block; color: var(--muted); font-size: .84rem; margin: 4px 0 0 15px; }
.provider-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.provider-fields .wide { grid-column: 1 / -1; }
.admin .provider-check { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.admin .provider-check input { width: auto; margin: 0; }
.provider-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.provider-secondary { margin-top: 10px; }
.provider-remove { color: #762321; }
.category-list { margin: 12px 0 0; padding: 0; list-style: none; }
.category-list li { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; }
.category-editor { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; }
.category-editor input { margin: 0; min-width: 0; }

@media (max-width: 920px) {
  .wrap { width: calc(100% - 44px); }
  .top-inner { gap: 16px; }
  .feature { padding: 28px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .top-inner {
    grid-template-areas: "brand language" "navigation navigation" "search search";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
    padding-block: 10px;
  }
  .top-inner:dir(rtl) {
    grid-template-areas: "language brand" "navigation navigation" "search search";
    grid-template-columns: auto minmax(0, 1fr);
  }
  .top-inner > .brand { justify-self: left; }
  .main-nav { gap: 13px; }
  .main-nav a { font-size: .86rem; }
  .search { width: 100%; }
  .search input { flex: 1; }
  .intro { padding-block: 30px 21px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .provider-fields { grid-template-columns: minmax(0, 1fr); }
  .feature { min-height: 310px; padding: 24px; }
  .feature-with-cover { grid-template-columns: minmax(0, 1fr); }
  .ranking, .admin-panel { padding-inline: 15px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .feed { margin-top: 25px; }
  .footer-inner { flex-wrap: wrap; gap: 12px; }
  .adjacent-stories { grid-template-columns: minmax(0, 1fr); }
}

[dir="rtl"] .intro h1, .feature h2:lang(ar), .card h3:lang(ar), .story-header h1:lang(ar) { letter-spacing: normal; }
