:root {
  color-scheme: dark;
  --bg: #0c0c0b;
  --surface: #121310;
  --surface-raised: #181a16;
  --line: #2b2d27;
  --line-strong: #41443a;
  --text: #e8e3d9;
  --text-soft: #c3beb4;
  --muted: #85857c;
  --accent: #a9db6f;
  --accent-strong: #c0ef8a;
  --accent-soft: rgba(169, 219, 111, 0.12);
  --accent-faint: rgba(169, 219, 111, 0.055);
  --shadow: none;
  --radius: 2px;
  --content-width: 100%;
  --page-width: 1120px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #11120f;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video,
iframe {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.scan,
.crt-overlay,
.side-glow-left,
.side-glow-right,
.floating-left,
.floating-right,
.title-rule,
.rating-sub,
.center-control,
.wide-rule,
.micro-row,
.section-toggle {
  display: none;
}

.page-frame {
  width: min(100%, var(--page-width));
  min-height: 100vh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.top {
  min-height: 62px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-shape {
  width: 3px;
  height: 22px;
  border-radius: 0;
  background: var(--accent);
  box-shadow: none;
  transform: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-action {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.top-action:hover {
  border-color: transparent transparent var(--accent);
  background: transparent;
  color: var(--accent-strong);
}

.nav {
  min-height: 46px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.nav-item {
  position: relative;
  padding: 12px 0 10px;
  border-radius: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  transition: color 160ms ease, background 160ms ease;
}

.nav-item:hover {
  background: transparent;
  color: var(--accent-strong);
}

.nav-item.active {
  background: transparent;
  color: var(--accent-strong);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.layout {
  width: min(100%, var(--content-width));
  min-height: calc(100vh - 210px);
  margin: 0;
  padding: 76px 48px 110px;
}

.hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 32px;
  padding: 10px 0 86px;
}

.hero::before {
  content: "ISSUE / 01\A 2026 — CN";
  grid-column: 1;
  grid-row: 1 / span 4;
  padding-top: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  white-space: pre;
}

.hero > * {
  grid-column: 2;
}

.title-row {
  display: block;
}

.title-block,
.site-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 7vw, 4.9rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.09em;
  text-transform: uppercase;
}

.crumbs {
  max-width: 620px;
  margin-top: 26px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.rating-cluster {
  margin-top: 30px;
}

.rating-main {
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rating-main::before {
  content: "ARCHIVE —";
  margin-right: 8px;
  color: var(--accent);
}

.rating-text {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.content {
  width: 100%;
}

.content:not(.single) {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
}

.content:not(.single) > .section-title {
  grid-column: 1;
  grid-row: 1;
}

.content:not(.single) > .article-list,
.content:not(.single) > .pagination,
.content:not(.single) > .search-input,
.content:not(.single) > .search-results {
  grid-column: 2;
}

.content:not(.single) > .list-description {
  grid-column: 2;
  grid-row: 1;
}

.content.single {
  width: min(100%, 780px);
  margin-left: 182px;
}

.section-title,
.page-title,
.post-heading {
  margin: 0;
  color: var(--text);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.section-title {
  padding-top: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.section-title::before {
  content: "02 / ";
}

.page-title,
.post-heading {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.18;
}

.content:not(.single) > .page-title {
  padding-top: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.list-description {
  margin: 14px 0 0;
  color: var(--muted);
}

.article-list {
  margin-top: 0;
  border-top: 1px solid var(--line);
  counter-reset: archive-item;
}

.post-item {
  border-bottom: 1px solid var(--line);
  counter-increment: archive-item;
}

.post-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 24px 0;
  border-radius: 0;
  transition: color 160ms ease, transform 160ms ease;
}

.post-link::before {
  content: "0" counter(archive-item);
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
}

.post-link:hover {
  background: transparent;
  transform: translateX(5px);
}

.post-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: baseline;
  gap: 20px;
}

.post-date {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
  font-weight: 560;
  line-height: 1.55;
  transition: color 160ms ease;
}

.post-link:hover .post-title {
  color: var(--accent-strong);
}

.post-header {
  margin-bottom: 46px;
}

.post-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-sep {
  color: var(--line-strong);
}

.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  color: var(--accent-strong);
}

.tag:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body > :last-child {
  margin-bottom: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre,
.post-body table,
.post-body figure {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
  margin: 2em 0 0.7em;
  color: var(--text);
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: -0.025em;
  scroll-margin-top: 24px;
}

.post-body h1 { font-size: 1.85em; }
.post-body h2 { font-size: 1.52em; }
.post-body h3 { font-size: 1.26em; }
.post-body h4 { font-size: 1.08em; }

.post-body a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(169, 219, 111, 0.42);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: currentColor;
}

.post-body strong {
  color: var(--text);
  font-weight: 680;
}

.post-body ul,
.post-body ol {
  padding-left: 1.45em;
}

.post-body li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.post-body li::marker {
  color: var(--accent);
}

.post-body blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.post-body blockquote p {
  margin: 0.65em 0;
}

.cite {
  display: block;
  margin-top: 10px;
  font-size: 0.88em;
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
}

.post-body :not(pre) > code {
  padding: 0.16em 0.38em;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-raised);
  color: #d2f2ae;
  font-size: 0.88em;
}

.post-body pre,
.post-body .highlight {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1117;
  box-shadow: var(--shadow);
}

.post-body pre {
  padding: 18px 20px;
  color: #d6dbe3;
  font-size: 13px;
  line-height: 1.7;
}

.post-body .highlight pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  font-size: 14px;
}

.post-body th,
.post-body td {
  padding: 11px 14px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.post-body th {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 650;
}

.post-body img {
  height: auto;
  border-radius: 0;
}

.post-body hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}

.video-wrapper iframe,
.video-wrapper video {
  width: 100%;
  height: 100%;
  border: 0;
}

.mermaid {
  margin: 28px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.post-nav {
  margin-top: 64px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
}

.post-nav-link,
.page-link {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text-soft);
  font-size: 13px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.post-nav-link:last-child {
  text-align: right;
}

.post-nav-link:hover,
.page-link:hover {
  border-color: rgba(169, 219, 111, 0.42);
  background: var(--accent-faint);
  color: var(--accent-strong);
}

.pagination {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-num {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.search-input {
  width: 100%;
  height: 48px;
  margin-top: 0;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: rgba(169, 219, 111, 0.68);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-results {
  margin-top: 18px;
}

.search-item {
  padding: 15px 4px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.search-item:hover .search-title {
  color: var(--accent-strong);
}

.search-date {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.search-title {
  color: var(--text-soft);
  transition: color 160ms ease;
}

.no-result {
  padding: 24px 0;
  color: var(--muted);
}

.site-footer {
  min-height: 86px;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.footer-power a {
  color: var(--text-soft);
}

.footer-power a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page-frame {
  transition: opacity 150ms ease, transform 150ms ease;
}

.page-frame.page-leaving {
  opacity: 0.58;
  transform: translateY(2px);
}

turbo-progress-bar {
  height: 2px;
  background: var(--accent);
}

@media (max-width: 680px) {
  .page-frame {
    border-right: 0;
    border-left: 0;
  }

  .top {
    min-height: 58px;
    padding: 0 20px;
  }

  .nav {
    min-height: 44px;
    padding: 0 20px;
    gap: 22px;
    overflow-x: auto;
  }

  .nav-item {
    padding: 11px 0 9px;
    white-space: nowrap;
  }

  .layout {
    padding: 46px 20px 72px;
  }

  .hero {
    display: block;
    padding: 0 0 68px;
  }

  .hero::before {
    display: block;
    margin-bottom: 28px;
    padding: 0;
    content: "ISSUE / 01 — 2026";
  }

  .title-block,
  .site-title {
    font-size: clamp(2.15rem, 11.5vw, 3rem);
    letter-spacing: -0.085em;
  }

  .crumbs {
    font-size: 15px;
  }

  .content:not(.single) {
    display: block;
  }

  .content:not(.single) > .section-title {
    margin-bottom: 18px;
  }

  .content:not(.single) > .list-description {
    margin: 0 0 22px;
  }

  .content.single {
    width: 100%;
    margin-left: 0;
  }

  .post-line,
  .search-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .post-link {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .post-body {
    font-size: 16px;
    line-height: 1.84;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-link:last-child {
    text-align: left;
  }

  .site-footer {
    padding: 22px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
