:root, :root[data-theme=paper] {
  --ink: #27251f;
  --muted: #675f53;
  --paper: #faf7ef;
  --line: #ded6c6;
  --pig-panel: #fffdf7;
  --pig-accent: #8c3d26;
  --panel: var(--pig-panel);
  --editorial-tint: #f0e8d9;
}
:root[data-theme=night] {
  --ink: #f2eadc;
  --muted: #c5b8a5;
  --paper: #201e1a;
  --line: #51483d;
  --pig-panel: #29251f;
  --pig-accent: #ffb18e;
  --panel: var(--pig-panel);
  --editorial-tint: #342d25;
}
body { background: var(--paper); color: var(--ink); }
.wrap { max-width: 1160px; width: calc(100% - 72px); }
.topline { background: var(--editorial-tint); color: var(--muted); border: 0; }
header.wrap:has(.channel-nav) { border-bottom: 0; padding-block: 16px 0; gap: 14px 20px; }
header .logo strong { font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif; }
header .channel-nav {
  --nav-bg: #302820;
  --nav-fg: #fff5e4;
  --nav-highlight: #f5c281;
  --nav-active: #4a3727;
  background: var(--nav-bg);
  color: var(--nav-fg);
  border: 1px solid #61442f;
  border-bottom: 3px solid #bf7d49;
  border-radius: 8px;
  padding: 6px 9px;
  gap: 3px 6px;
}
header .channel-nav > a, header .channel-nav summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 5px;
  color: var(--nav-fg);
  font-weight: 650;
  line-height: 1.25;
}
header .channel-nav summary { list-style: none; }
header .channel-nav summary::-webkit-details-marker { display: none; }
header .channel-nav summary::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
header .channel-nav > a:is(:hover,[aria-current=page]),
header .channel-nav .channel-menu:is([open],:has([aria-current=page])) > summary {
  background: var(--nav-active);
  color: var(--nav-highlight);
}
header .channel-nav > a[aria-current=page]::after { display: none; }
header .channel-nav :is(a,summary):focus-visible { outline: 2px solid var(--nav-highlight); outline-offset: 2px; }
header .channel-nav > a[href="/archive"] {
  margin-inline-start: auto;
  background: var(--nav-highlight);
  color: #35251b;
}
header .channel-nav > a[href="/archive"]:is(:hover,[aria-current=page]) {
  background: #ffe0ae;
  color: #35251b;
}
header .channel-nav .channel-menu > div {
  border: 1px solid var(--line);
  border-top: 2px solid #bf7d49;
  border-radius: 5px;
}
header .channel-nav .channel-menu > div a:focus-visible { outline-color: var(--pig-accent); }
@media (max-width: 700px) {
  header .channel-nav { align-items: flex-start; }
  header .channel-nav .channel-menu[open] { flex-basis: 100%; }
  header .channel-nav > a[href="/archive"] { margin-inline-start: 0; }
}
#search-form button { background: var(--pig-accent); color: var(--pig-panel); }
.edition-kicker, .desk-number {
  color: var(--pig-accent); font: 650 .75rem/1.5 ui-monospace, "PingFang SC", monospace; letter-spacing: .08em;
}
.edition-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 31%); gap: clamp(28px, 6vw, 78px);
  margin-block: 36px 52px; align-items: start;
}
.edition-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); }
.edition-heading h1, .digest-intro h2, .channel-page .section-title h1, .detail-heading h1 {
  color: var(--ink); font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif; font-weight: 750;
}
.edition-heading h1 { font-size: clamp(32px, 5vw, 56px); margin: 0 0 10px; }
.edition-heading a, .digest-heading > a, .edition-topics { color: var(--pig-accent); font-size: .84rem; white-space: nowrap; }
.edition-feed > .article-card, .channel-page .market-grid > .article-card {
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
.edition-feed .article-card > a { display: grid; grid-template-columns: clamp(90px, 18vw, 154px) minmax(0, 1fr); gap: 16px; padding-block: 15px; align-items: center; }
.edition-feed .article-card.no-cover > a { grid-template-columns: minmax(0, 1fr); }
.edition-feed .thumb { width: 100%; aspect-ratio: 1.5; }
.edition-feed .thumb, .channel-page .market-grid .thumb { border-radius: 4px; }
.edition-feed .article-card .card-body { padding: 0; }
.edition-feed .compact .meta time { display: inline; }
.edition-feed .article-title { font-size: clamp(16px, 2.1vw, 21px); line-height: 1.45; }
.edition-directory { background: var(--editorial-tint); padding: 18px 20px; border-top: 2px solid var(--pig-accent); min-width: 0; }
.edition-directory h2 { margin: 0 0 10px; font-size: 1.25rem; }
.edition-directory ol, .home-channel ul { list-style: none; margin: 0; padding: 0; }
.edition-directory li { border-top: 1px solid var(--line); padding: 8px 0; }
.edition-directory li > a { display: grid; grid-template-columns: 24px 1fr auto; align-items: baseline; gap: 8px; }
.edition-directory .channel-links { margin: 6px 0 0; gap: 3px 7px; padding-left: 32px; }
.edition-directory .channel-links a { font-size: .75rem; padding: 0; border: 0; color: var(--muted); }
.edition-directory .channel-links a:hover, .home-channel li a:hover { color: var(--pig-accent); text-decoration: underline; }
.edition-topics { display: inline-block; margin-top: 12px; }
.edition-keywords { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; }
.edition-keywords h2 { font-size: .95rem; }
.edition-keywords ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.edition-keywords ul > li { padding: 0; border: 0; }
.edition-keywords ul > li > a {
  display: block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pig-panel);
  color: var(--keyword-ink, var(--ink));
  font-size: var(--keyword-size, .78rem);
}
.edition-keywords ul > li > a:hover { color: var(--pig-accent); border-color: currentColor; }
.keyword-size-1 { --keyword-size: .76rem; }
.keyword-size-2 { --keyword-size: .85rem; }
.keyword-size-3 { --keyword-size: .94rem; }
.keyword-size-4 { --keyword-size: 1.04rem; }
.keyword-color-1 { --keyword-ink: #943d25; }
.keyword-color-2 { --keyword-ink: #286056; }
.keyword-color-3 { --keyword-ink: #414f85; }
.keyword-color-4 { --keyword-ink: #794373; }
.keyword-color-5 { --keyword-ink: #765316; }
.keyword-color-6 { --keyword-ink: #32612d; }
:root[data-theme=night] .keyword-color-1 { --keyword-ink: #ffb99d; }
:root[data-theme=night] .keyword-color-2 { --keyword-ink: #96ddca; }
:root[data-theme=night] .keyword-color-3 { --keyword-ink: #b4c1fa; }
:root[data-theme=night] .keyword-color-4 { --keyword-ink: #e5a7d9; }
:root[data-theme=night] .keyword-color-5 { --keyword-ink: #f0cd88; }
:root[data-theme=night] .keyword-color-6 { --keyword-ink: #b1d99c; }
.edition-digests {
  border-top: 1px solid var(--line);
  margin-bottom: 52px;
  padding-top: clamp(16px, 3vw, 32px);
}
.digest-intro { margin-bottom: 20px; }
.digest-intro .edition-kicker { margin: 0 0 4px; }
.digest-intro h2 { margin: 0; font-size: clamp(27px, 4vw, 39px); line-height: 1.2; }
.home-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.home-channel {
  min-width: 0;
  margin: 0;
  padding: clamp(15px, 2.4vw, 25px);
  background: var(--pig-panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--pig-accent);
  border-radius: 8px;
}
.home-channel:first-child { grid-column: 1 / -1; }
.digest-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.digest-heading h3 {
  margin: 2px 0 0;
  font: 700 clamp(21px, 3vw, 30px)/1.2 Georgia, "Songti SC", "Noto Serif CJK SC", serif;
}
.digest-heading > a { border: 1px solid var(--line); padding: 4px 9px; border-radius: 4px; }
.digest-heading > a:hover { background: var(--editorial-tint); }
.digest-feature { margin-bottom: 7px; }
.digest-feature-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--editorial-tint);
}
.digest-cover { display: block; aspect-ratio: 2.35; overflow: hidden; }
.digest-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.digest-feature-copy { display: grid; align-content: center; gap: 7px; padding: 12px 14px; min-width: 0; }
.digest-feature-copy strong { font-size: clamp(16px, 2.1vw, 21px); line-height: 1.42; overflow-wrap: anywhere; }
.digest-feature-link:hover strong { color: var(--pig-accent); }
.digest-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: .85rem;
}
.home-channel li a { display: flex; align-items: baseline; justify-content: space-between; gap: 5px 12px; padding-block: 9px; }
.home-channel li + li { border-top: 1px solid var(--line); }
.home-channel li a span { overflow-wrap: anywhere; }
.home-channel time { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.digest-empty { color: var(--muted); }
@media (min-width: 761px) {
  .home-channel:first-child .digest-feature-link:has(.digest-cover) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
  .home-channel:first-child .digest-feature-copy { padding: 20px; }
}
.channel-page .section-title { display: block; border-bottom: 2px solid var(--ink); }
.channel-page .section-title h1 { font-size: clamp(29px, 4.5vw, 46px); margin: 0 0 6px; }
.channel-page .market-grid > .article-card + .article-card { margin-top: 0; }
.channel-page .market-grid .article-title { font-size: clamp(17px, 2.1vw, 22px); }
.channel-sidebar, .tags-panel, .rank-panel, .topic-cards section, .information-copy { border-radius: 4px; }
.detail-page .detail-layout { display: block; margin: 20px auto 40px; max-width: 760px; }
.detail-page .detail-article { background: transparent; border: 0; border-radius: 0; padding: 0; }
.detail-page .detail-heading h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.32; margin-bottom: 18px; }
.detail-meta { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.detail-page .article-lead { padding: 4px 0 4px 16px; border: 0; border-left: 3px solid var(--pig-accent); border-radius: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1.85; }
.detail-page .article-toc { background: var(--editorial-tint); border-color: var(--line); border-radius: 4px; }
.detail-page .article-prose { color: var(--ink); font-size: 19px; line-height: 1.95; overflow-wrap: anywhere; }
.detail-page .article-prose p, .detail-page .article-prose ul, .detail-page .article-prose ol { margin: 0 0 1.15em; }
.detail-page .article-prose :is(h2,h3,h4,h5) { color: var(--ink); line-height: 1.4; margin: 1.7em 0 .6em; font-size: 1.2em; }
.detail-page .article-prose h2 { font-size: 1.48em; padding-top: .55em; border-top: 1px solid var(--line); }
.detail-page .article-prose figure { margin: 1.4em 0; }
.detail-page .article-prose img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 3px; }
.detail-page .article-prose figcaption { font-size: .8em; color: var(--muted); text-align: center; }
.detail-page .article-prose a, .reading-source a { color: var(--pig-accent); text-decoration: underline; text-underline-offset: .15em; }
.reading-source { color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; font-size: .85rem; }
.detail-page .detail-sidebar { position: static; width: auto; margin-top: 30px; background: var(--editorial-tint); }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .edition-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-block: 20px 32px; }
  .home-channels { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-channel li a { flex-wrap: wrap; }
  header .channel-nav { gap: 3px 4px; }
}
@media (max-width: 420px) {
  .edition-feed .article-card > a { gap: 10px; }
  .edition-feed .article-title { font-size: 16px; }
  .edition-feed .card-body p { -webkit-line-clamp: 1; }
}
