
:root {
  --bg: #F5F5F7;
  --elevated: #FFFFFF;
  --grouped: #EFEFF4;
  --label: #1D1D1F;
  --secondary: #6E6E73;
  --tertiary: #86868B;
  --separator: rgba(60, 60, 67, 0.12);
  --accent: #007AFF;
  --accent-soft: rgba(0, 122, 255, 0.10);
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --nav-bg: rgba(255,255,255,0.72);
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --tabbar-h: 0px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --elevated: #1C1C1E;
    --grouped: #2C2C2E;
    --label: #F5F5F7;
    --secondary: #98989D;
    --tertiary: #6E6E73;
    --separator: rgba(84, 84, 88, 0.65);
    --accent: #0A84FF;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.45);
    --nav-bg: rgba(22, 22, 24, 0.72);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Helvetica Neue",
    sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: 0 0 auto; }
.app { min-height: 100vh; }

.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 22px 14px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--separator);
  z-index: 20;
}
.brand {
  padding: 10px 12px 22px;
}
.brand-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand h1 {
  font-size: 21px;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-top: 4px;
}
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-item:hover { background: var(--accent-soft); text-decoration: none; }
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-item .icon { width: 20px; height: 20px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
}
.topbar .title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex: 1;
}
.back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 0; background: transparent; color: var(--accent);
  border-radius: 10px; cursor: pointer;
}
.back-btn.is-visible { display: inline-flex; }

.content {
  padding: 28px 22px 48px;
  max-width: 980px;
}
.view { display: none; animation: fade .28s var(--ease); }
.view.is-active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.hero-date { color: var(--secondary); font-size: 15px; margin: 6px 0 18px; }
.display {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}
.stat {
  background: var(--elevated);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: var(--shadow);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
}
.stat strong { color: var(--label); font-weight: 650; font-size: 15px; }

.card {
  background: var(--elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }

.takeaway { display: flex; gap: 14px; align-items: flex-start; }
.takeaway .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  min-width: 1.6em;
  padding-top: 1px;
}
.takeaway p { flex: 1; font-size: 17px; line-height: 1.5; }

.section-title {
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 8px 0 16px;
}
.subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  background: var(--grouped);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.subtab {
  border: 0;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 14px;
  font-weight: 590;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.subtab.is-active {
  background: var(--elevated);
  color: var(--label);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.cat-pane { display: none; }
.cat-pane.is-active { display: block; }
.cat-count { color: var(--secondary); font-size: 14px; font-weight: 500; margin: -6px 0 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grouped);
  color: var(--label);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 590;
  text-decoration: none;
}
a.chip:hover { text-decoration: none; background: var(--accent-soft); }
.dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.chip-rank { color: var(--secondary); font-variant-numeric: tabular-nums; }
.item-title {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--label);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
  margin-bottom: 12px;
}
a.item-title:hover { color: var(--accent); text-decoration: none; }
.item-title .icon { margin-top: 0.25em; color: var(--tertiary); }
.angle {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 12px 14px;
}
.angle-label {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.angle p { font-size: 16px; line-height: 1.5; }
.empty { color: var(--secondary); }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.platform-tile {
  display: block;
  background: var(--elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  color: var(--label);
  text-decoration: none;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.platform-tile:hover { transform: translateY(-1px); text-decoration: none; }
.platform-tile h3 { font-size: 17px; font-weight: 650; margin: 8px 0 4px; }
.platform-tile p { color: var(--secondary); font-size: 13px; }
.platform-page { display: none; }
.platform-page.is-active { display: block; }
[data-platform-home].is-hidden { display: none; }
.top-list { display: flex; flex-direction: column; gap: 2px; }
.top-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 4px;
  border-bottom: 1px solid var(--separator);
}
.top-row:last-child { border-bottom: 0; }
.top-rank {
  width: 28px;
  color: var(--accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.top-title { flex: 1; font-size: 16px; line-height: 1.45; color: var(--label); font-weight: 500; }
.top-title a { color: inherit; }
.top-title a:hover { color: var(--accent); }

.footnote, .about p { color: var(--secondary); font-size: 14px; line-height: 1.6; }
.about p + p { margin-top: 12px; }

.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 84px;
  padding: 6px 8px 20px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
  z-index: 20;
  justify-content: space-around;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--secondary);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  min-width: 64px;
  background: none;
  border: 0;
  cursor: pointer;
}
.tab .icon { width: 24px; height: 24px; }
.tab.is-active { color: var(--accent); }
.tab:hover { text-decoration: none; }

@media (min-width: 900px) {
  .sidebar { display: block; }
  .topbar { display: none; }
  .content { margin-left: var(--sidebar-w); padding: 40px 48px 72px; }
}
@media (max-width: 899px) {
  :root { --tabbar-h: 84px; }
  .tabbar { display: flex; }
  .content { padding-bottom: 110px; }
  .display { font-size: 32px; }
}

/* Dedicated long-image / print layout */
#long-sheet { display: none; }
html.long-image {
  width: 1080px;
  background: #F5F5F7;
}
html.long-image body {
  background: #F5F5F7;
  color: #1D1D1F;
  width: 1080px;
}
html.long-image .app { display: none !important; }
html.long-image #long-sheet {
  display: block;
  width: 1080px;
  padding: 64px 56px 72px;
  background: #F5F5F7;
  color: #1D1D1F;
  font-size: 30px;
  line-height: 1.5;
}
#long-sheet .kicker {
  color: #007AFF;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
#long-sheet h1 {
  font-size: 56px;
  letter-spacing: -0.035em;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}
#long-sheet .hero-date { font-size: 26px; color: #6E6E73; margin-bottom: 22px; }
#long-sheet .stats { gap: 12px; margin-bottom: 48px; }
#long-sheet .stat {
  font-size: 24px;
  padding: 10px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}
#long-sheet .stat strong { font-size: 26px; }
#long-sheet .section { margin-bottom: 56px; }
#long-sheet h2 {
  font-size: 36px;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 22px;
}
#long-sheet h3 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
#long-sheet .card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}
#long-sheet .stack { gap: 16px; }
#long-sheet .takeaway .num { font-size: 28px; }
#long-sheet .takeaway p { font-size: 30px; }
#long-sheet .chip { font-size: 22px; padding: 5px 12px; background: #EFEFF4; }
#long-sheet .item-title { font-size: 32px; margin-bottom: 16px; }
#long-sheet .angle { border-radius: 16px; padding: 16px 18px; background: rgba(0,122,255,0.10); }
#long-sheet .angle-label { font-size: 20px; color: #007AFF; }
#long-sheet .angle p { font-size: 28px; }
#long-sheet .cat-block { margin-bottom: 36px; }
#long-sheet .cat-count { font-size: 24px; color: #6E6E73; }
#long-sheet .platform-card { margin-bottom: 18px; }
#long-sheet .top-title { font-size: 28px; }
#long-sheet .top-rank { font-size: 26px; width: 40px; color: #007AFF; }
#long-sheet footer { margin-top: 12px; color: #6E6E73; font-size: 22px; }

  /* Split-view reader */
  :root { --reader-w: 520px; }
  .reader {
    display: none;
    flex-direction: column;
    background: var(--elevated);
    color: var(--label);
    z-index: 40;
  }
  .app.is-reading .reader { display: flex; }
  .reader-resizer {
    display: none;
    position: absolute;
    left: -5px; top: 0; bottom: 0;
    width: 10px;
    cursor: col-resize;
    z-index: 3;
  }
  .reader-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid var(--separator);
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
  }
  .reader-heading {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .reader-open, .reader-close {
    appearance: none;
    border: 0;
    background: var(--accent-soft);
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
  }
  .reader-open:hover, .reader-close:hover { text-decoration: none; opacity: 0.88; }
  .reader-body { flex: 1; position: relative; min-height: 0; background: var(--bg); }
  .reader-frame {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0; background: var(--elevated);
  }
  .reader-fallback {
    display: none;
    position: absolute; inset: 0;
    overflow: auto;
    padding: 28px 24px 32px;
  }
  .reader-fallback.is-visible { display: block; }
  .reader-frame.is-hidden { display: none; }
  .fallback-card { max-width: 520px; }
  .fallback-kicker {
    color: var(--secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
  }
  .fallback-card h3 {
    font-size: 22px;
    letter-spacing: -0.03em;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 14px;
  }
  .fallback-note { color: var(--secondary); font-size: 14px; margin-top: 6px; }
  @media (min-width: 900px) {
    .reader {
      position: fixed;
      top: 0; right: 0; bottom: 0;
      width: var(--reader-w);
      border-left: 1px solid var(--separator);
      box-shadow: -12px 0 32px rgba(0,0,0,0.06);
    }
    .reader-resizer { display: block; }
    .app.is-reading .content { margin-right: var(--reader-w); }
  }
  @media (max-width: 899px) {
    .reader {
      position: fixed;
      inset: 0;
      z-index: 60;
    }
  }
  html.long-image .reader { display: none !important; }


:root { --sitebar-h: 52px; }
.sitebar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--sitebar-h);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  overflow-x: auto;
  white-space: nowrap;
}
.sitebar .brand-mini {
  color: var(--label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: 10px;
  flex: 0 0 auto;
}
.sitebar .brand-mini:hover { text-decoration: none; }
.sitebar .brand-mini em {
  color: var(--accent);
  font-style: normal;
  margin-right: 4px;
}
.sitebar a.slink {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 9px;
}
.sitebar a.slink:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.sitebar a.slink.is-current { color: var(--accent); background: var(--accent-soft); }
.sitebar .hub-back {
  margin-left: auto;
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 8px;
}
.sitebar .hub-back:hover { color: var(--accent); text-decoration: none; }
.app { padding-top: var(--sitebar-h); }
@media (min-width: 900px) {
  .sidebar { top: var(--sitebar-h); }
  .reader { top: var(--sitebar-h) !important; }
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0 36px;
}
a.feature-card {
  display: block;
  background: var(--elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 24px 22px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
a.feature-card:hover { transform: translateY(-2px); text-decoration: none; }
.feature-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
a.feature-card h2 {
  font-size: 26px;
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}
.feature-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
}
.feature-list span { color: var(--label); }
.archive-list { display: flex; flex-direction: column; gap: 10px; }
a.archive-row, .archive-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  background: var(--elevated);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
}
a.archive-row:hover { text-decoration: none; }
a.archive-row:hover .arch-title { color: var(--accent); }
.arch-title { font-weight: 650; letter-spacing: -0.02em; }
.arch-meta { color: var(--secondary); font-size: 13px; }
.badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
}
.tag-tabs { margin-bottom: 18px; }
.politics-item .item-title { font-size: 18px; margin-bottom: 8px; }
.politics-meta { color: var(--secondary); font-size: 13px; }
.page-note { color: var(--secondary); font-size: 14px; margin: 8px 0 22px; line-height: 1.6; }
