:root {
  --background: #ffffff;
  --surface: #ffffff;
  --ink: #09090b;
  --muted: #71717a;
  --soft: #f4f4f5;
  --line: #e4e4e7;
  --accent: #0891b2;
  --container: 896px;
  --sans: "Nunito Sans", "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--background);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-glyph {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--background);
  font-weight: 900;
  line-height: 1;
}

.nav {
  gap: 28px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.site-main {
  padding: 40px 0 64px;
}

.page-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

hr {
  height: 1px;
  margin: 0 0 36px;
  border: 0;
  background: var(--line);
}

.feed-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 40px;
}

.search-box {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.search-box span,
.source-status,
.post-date,
.reader-header p,
.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.search-box span {
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 13px;
  background: var(--surface);
  color: var(--ink);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.source-status {
  margin: 0;
  text-align: right;
}

.post-list {
  display: grid;
  gap: 40px;
}

.post-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-item h2 {
  margin: 0;
  font-size: clamp(1.38rem, 3vw, 1.62rem);
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: 0;
  transition: color 160ms ease;
}

.post-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 1rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-date {
  margin: 0;
}

.post-hit-area {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.post-hit-area:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.28);
  outline-offset: 8px;
}

.post-item:hover h2 {
  color: var(--accent);
}

.reader-shell {
  padding-bottom: 36px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--ink);
}

.reader-header {
  display: grid;
  gap: 14px;
  margin-bottom: 34px;
}

.reader-header h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.reader-header p {
  margin: 0;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.reader-actions a {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.reader-actions a:hover,
.reader-actions a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.reader-content {
  max-width: 760px;
  color: #1f2937;
  font-family: var(--serif);
}

.reader-content h1,
.reader-content h2,
.reader-content h3 {
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.3;
  letter-spacing: 0;
}

.reader-content h1 {
  margin: 0 0 24px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.reader-content h2 {
  margin: 52px 0 18px;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.reader-content h3 {
  margin: 34px 0 14px;
  font-size: 1.2rem;
}

.reader-content p {
  margin: 0 0 20px;
  font-size: 1.08rem;
}

.reader-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--line);
  color: #3f3f46;
}

.reader-content blockquote p {
  margin: 0;
}

.reader-content img {
  width: 100%;
  margin: 18px 0 28px;
  border-radius: 8px;
  background: var(--soft);
}

.reader-content a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.reader-content code {
  padding: 0.12em 0.34em;
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.reader-content ul,
.reader-content ol {
  margin: 0 0 22px;
  padding-left: 1.4em;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.empty-state p {
  margin: 0;
}

.site-footer {
  display: flex;
  gap: 6px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .header-inner {
    min-height: 72px;
  }

  .brand span:last-child {
    display: none;
  }

  .nav {
    gap: 18px;
  }

  .site-main {
    padding-top: 26px;
  }

  .feed-tools {
    grid-template-columns: 1fr;
    margin-bottom: 34px;
  }

  .source-status {
    text-align: left;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .post-list {
    gap: 34px;
  }

  .reader-actions,
  .site-footer {
    flex-direction: column;
  }
}
