:root {
  --header-height: 68px;
  --bg: #f7f4f6;
  --surface: #ffffff;
  --surface-soft: #f3e8ec;
  --text: #1a1216;
  --muted: #5e5360;
  --line: #e4d5dc;
  --accent: #8e1b3d;
  --accent-2: #c44569;
  --shadow: 0 14px 40px rgba(80, 16, 36, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.blog-site {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
  padding: 0 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand strong {
  font-size: 0.95rem;
}

.brand em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  font-size: 0.72rem;
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.start-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: 3px;
  pointer-events: none;
}

.reading-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.channel-seo {
  width: 100%;
  padding: clamp(28px, 5vw, 64px) 14px 56px;
}

.channel-seo-inner {
  width: min(980px, calc(100% - 8px));
  margin: 0 auto;
}

.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.blog-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-breadcrumb [aria-current] {
  color: var(--text);
  overflow: hidden;
  max-width: 48ch;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crumb-sep {
  opacity: 0.55;
}

.channel-seo h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.prose-lead {
  margin: 0 0 8px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.article-meta > * + *::before {
  content: "·";
  margin: 0 8px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-top: 22px;
}

.blog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.blog-card:hover {
  border-color: var(--accent);
}

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1c0812;
}

.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero {
  margin: 0 0 22px;
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.blog-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px 15px 16px;
}

.channel-seo .blog-card h2 {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.3;
}

.blog-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-card-body > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.blog-card .article-meta {
  margin: 2px 0 0;
  font-size: 12.5px;
}

.article-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.toc-rail {
  position: sticky;
  top: calc(var(--header-height) + 14px);
}

.toc-rail-title,
.answer-box-title {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-left: 2px solid var(--line);
}

.toc-rail a {
  display: block;
  margin-left: -2px;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.toc-rail a:hover {
  color: var(--text);
}

.answer-box {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}

.answer-box p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.6;
}

.prose {
  display: grid;
  gap: 12px;
  max-width: 72ch;
}

.prose p,
.prose li {
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.68;
}

.prose h2 {
  position: relative;
  margin: 28px 0 0;
  padding-top: 14px;
  color: var(--text);
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.22;
}

.prose h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.prose h3 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 19px;
}

.prose a {
  font-weight: 650;
}

.prose ul,
.prose ol {
  margin: 4px 0 0;
  padding-left: 1.2rem;
}

.table-wrap {
  margin: 4px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  white-space: nowrap;
}

.prose th {
  background: var(--surface-soft);
  font-size: 13px;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.start-box {
  margin-top: 28px;
  padding: 18px;
  border-radius: 14px;
  background: #1c0812;
  color: #fff0f4;
}

.start-box h2 {
  margin: 0 0 8px;
  padding: 0;
  color: #fff;
  font-size: 1.25rem;
}

.start-box h2::before {
  content: none;
}

.start-box p {
  margin: 0 0 12px;
  color: rgba(255, 240, 244, 0.78);
}

.related {
  margin-top: 36px;
}

.related h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.site-footer {
  padding: 1.4rem 1.1rem 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.7rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc-rail {
    display: none;
  }

  .header-nav a:not(.start-btn) {
    display: none;
  }
}
