:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #f5f6f7;
  --surface-hover: #f2f3f5;
  --ink: #1f2329;
  --muted: #646a73;
  --faint: #8f959e;
  --line: #dee0e3;
  --line-soft: #eff0f1;
  --accent: #3370ff;
  --accent-hover: #245bdb;
  --accent-soft: #eaf2ff;
  --green: #00875a;
  --green-soft: #e8f7f0;
  --amber: #b85c00;
  --amber-soft: #fff3e0;
  --red: #c93832;
  --red-soft: #fff0ef;
  --purple: #6f4bc4;
  --purple-soft: #f2edff;
  --radius: 8px;
  --radius-sm: 5px;
  --header-height: 64px;
  --sidebar-width: 232px;
  --content-width: 920px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

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

.page-shell {
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: max-content minmax(240px, 460px) auto;
  align-items: center;
  gap: 24px;
  min-height: var(--header-height);
  padding: 10px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.brand-text {
  font-size: 16px;
}

.header-search {
  position: relative;
  display: flex;
  min-width: 0;
}

.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 64px 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface-subtle);
}

.header-search input:hover,
.header-search input:focus {
  border-color: var(--line);
  background: #fff;
  outline: none;
}

.header-search button {
  position: absolute;
  top: 4px;
  right: 5px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.header-search button:hover {
  background: #fff;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.site-nav a {
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--surface-subtle);
  color: var(--ink);
}

.site-nav .nav-cta {
  margin-left: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.menu-toggle {
  display: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 600;
}

/* Document workspace */
.docs-workspace {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  justify-content: center;
  gap: 48px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 56px);
  padding: 4px 0;
  overflow: auto;
}

.sidebar-title {
  padding: 7px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-title.small {
  color: var(--muted);
  font-size: 12px;
}

.doc-nav,
.sidebar-filters {
  display: grid;
  gap: 2px;
}

.doc-nav a,
.sidebar-filters a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--muted);
}

.doc-nav a:hover,
.doc-nav a.active,
.sidebar-filters a:hover {
  background: #eef1f5;
  color: var(--ink);
}

.doc-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.doc-nav a span {
  color: var(--faint);
  font-size: 12px;
}

.sidebar-divider {
  margin: 14px 10px;
  border-top: 1px solid var(--line);
}

.sidebar-note {
  display: grid;
  gap: 5px;
  margin: 24px 10px 0;
  padding: 12px;
  border: 1px solid #c7d8ff;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 12px;
}

.sidebar-note span {
  color: var(--muted);
}

.sidebar-note a {
  color: var(--accent);
  font-weight: 600;
}

.doc-main {
  min-width: 0;
  min-height: calc(100vh - 140px);
  padding: 48px 64px 72px;
  background: var(--surface);
}

.doc-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}

.doc-header.compact-doc-header {
  padding-bottom: 26px;
}

.doc-breadcrumb {
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 12px;
}

.doc-breadcrumb a:hover {
  color: var(--accent);
}

.doc-header h1 {
  margin-bottom: 12px;
  font-size: 38px;
  line-height: 1.24;
  font-weight: 700;
}

.doc-lead {
  max-width: 760px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.doc-meta,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--faint);
  font-size: 12px;
}

.detail-badges {
  margin-top: 18px;
}

.doc-callout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 28px 0 8px;
  padding: 16px;
  border: 1px solid #c7d8ff;
  border-radius: var(--radius);
  background: #f5f8ff;
}

.doc-callout strong {
  display: block;
  margin-bottom: 2px;
}

.doc-callout p {
  margin: 0;
  color: var(--muted);
}

.callout-mark {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.doc-section {
  padding-top: 42px;
  scroll-margin-top: 80px;
}

.doc-section.first-section {
  padding-top: 32px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.section-heading h1 {
  font-size: 34px;
}

.section-heading h2 {
  font-size: 22px;
  line-height: 1.35;
}

.section-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-kicker,
.eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.section-note {
  color: var(--faint);
  font-size: 12px;
}

/* Buttons and status */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-hover);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.text-link:hover {
  color: var(--accent-hover);
}

.status-tag,
.pill,
.ghost-tag,
.search-tag,
.signal-tag,
.case-tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-blue,
.pill {
  background: var(--accent-soft);
  color: #245bdb;
}

.status-green {
  background: var(--green-soft);
  color: var(--green);
}

.status-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-red {
  background: var(--red-soft);
  color: var(--red);
}

.status-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.status-gray,
.ghost-tag {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

/* Home and directory rows */
.featured-list,
.guide-directory,
.hot-feed {
  border-top: 1px solid var(--line);
}

.featured-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.featured-row:hover,
.guide-list-row:hover,
.hot-item:hover,
.route-row:not(.route-head):hover {
  background: var(--surface-hover);
}

.featured-row.primary-featured {
  background: #f8faff;
}

.featured-row.primary-featured:hover {
  background: #f1f5ff;
}

.resource-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.icon-tool {
  background: var(--amber-soft);
  color: var(--amber);
}

.icon-check {
  background: var(--green-soft);
  color: var(--green);
}

.icon-case {
  background: var(--purple-soft);
  color: var(--purple);
}

.featured-copy,
.guide-list-copy,
.status-stack {
  display: grid;
  min-width: 0;
}

.featured-copy small,
.guide-list-copy small,
.status-stack small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
}

.row-arrow {
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
}

.route-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.route-row {
  display: grid;
  grid-template-columns: 1.2fr 1.25fr 1fr 76px;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.route-row:last-child {
  border-bottom: 0;
}

.route-row > span {
  color: var(--muted);
}

.route-row > span:first-child {
  color: var(--ink);
}

.route-row strong,
.route-row small {
  display: block;
}

.route-row small {
  color: var(--faint);
  font-size: 12px;
}

.route-head {
  min-height: 38px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.clean-grid,
.case-grid,
.condition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.case-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.case-card h3 {
  margin: 2px 0 8px;
  font-size: 16px;
}

.case-card p {
  min-height: 68px;
  margin-bottom: 16px;
  color: var(--muted);
}

.case-index {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.case-card dl {
  display: grid;
  gap: 7px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.case-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.case-card dt {
  color: var(--faint);
}

.case-card dd {
  text-align: right;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
  border-top: 1px solid var(--line);
}

.checklist-grid li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 28px 100px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line-soft);
}

.checklist-grid li::before {
  content: counter(item, decimal-leading-zero);
  color: var(--faint);
  font-size: 11px;
}

.checklist-grid span {
  color: var(--muted);
}

.hot-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.hot-rank {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.hot-item h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.hot-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.feed-sentinel {
  height: 1px;
}

.mobile-feed-hidden {
  display: none !important;
}

.condition-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.condition-grid a {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.condition-grid a:hover {
  border-color: #b7c9f7;
  background: #f8faff;
}

.condition-grid span {
  color: var(--muted);
  font-size: 12px;
}

.guide-list-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 112px 18px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 84px;
}

.guide-list-copy {
  gap: 2px;
}

.inline-meta {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.status-stack {
  justify-items: end;
  gap: 5px;
}

/* Search filters */
.global-search-panel {
  margin: 22px 0;
}

.inline-filter-panel {
  margin-bottom: 0;
}

.global-search-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.search-field,
.search-select,
.admin-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-field > span,
.search-select > span,
.admin-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.search-field input,
.search-select select,
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.search-field input:focus,
.search-select select:focus,
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
}

/* Article */
.article-workspace {
  grid-template-columns: 248px minmax(0, 820px);
}

.doc-article {
  padding-right: 72px;
  padding-left: 72px;
}

.article-header h1 {
  max-width: 720px;
  font-size: 36px;
}

.chapter-progress {
  height: 4px;
  margin: 10px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.chapter-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.progress-copy {
  margin: 0 10px 14px;
  color: var(--faint);
  font-size: 11px;
}

.chapter-list {
  display: grid;
  gap: 2px;
}

.chapter-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--muted);
}

.chapter-item:hover,
.chapter-item.active {
  background: #eef1f5;
  color: var(--ink);
}

.chapter-item.active {
  color: var(--accent);
}

.chapter-item > span {
  color: var(--faint);
  font-size: 11px;
}

.chapter-item div {
  display: grid;
  min-width: 0;
}

.chapter-item strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-item small {
  color: var(--faint);
  font-size: 10px;
}

.chapter-item.locked {
  opacity: 0.74;
}

.article-summary-box {
  margin: 28px 0 40px;
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface-subtle);
}

.article-summary-box h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}

.summary-grid div {
  display: grid;
  gap: 2px;
}

.summary-grid span {
  color: var(--faint);
  font-size: 11px;
}

.summary-grid strong {
  font-size: 13px;
  font-weight: 500;
}

.article-section {
  padding: 38px 0 8px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 78px;
}

.chapter-heading {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 22px;
}

.chapter-heading > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.chapter-heading small {
  color: var(--green);
  font-size: 11px;
}

.chapter-heading h2 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.35;
}

.article-section > p,
.article-render p {
  margin-bottom: 18px;
  color: #373c43;
  font-size: 15px;
  line-height: 1.9;
}

.article-section h3,
.article-render h2 {
  margin: 30px 0 12px;
  font-size: 18px;
}

.article-quote {
  margin: 24px 0;
  padding: 12px 16px;
  border-left: 3px solid #a8b4c4;
  background: var(--surface-subtle);
  color: var(--muted);
}

.article-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-table > div {
  display: grid;
  grid-template-columns: 1fr 1.5fr 64px;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.article-table > div:last-child {
  border-bottom: 0;
}

.article-table-head {
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.article-callout {
  grid-template-columns: auto 1fr;
  margin: 22px 0;
}

.article-checklist {
  display: grid;
  gap: 0;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.article-checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.article-checklist li > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.article-checklist strong {
  display: block;
  margin-bottom: 2px;
}

.article-checklist p {
  margin: 0;
  color: var(--muted);
}

.unlock-card {
  border: 1px solid #b7c9f7;
  border-radius: var(--radius);
  background: #f7faff;
}

.document-unlock {
  margin-top: 44px;
  padding: 22px;
  scroll-margin-top: 84px;
}

.document-unlock h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.document-unlock > div > p {
  margin-bottom: 18px;
  color: var(--muted);
}

.unlock-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.unlock-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.unlock-option.recommended {
  border-color: var(--accent);
}

.unlock-option span {
  display: grid;
}

.unlock-option small {
  color: var(--muted);
  font-weight: 400;
}

.unlock-option b {
  color: var(--accent);
  white-space: nowrap;
}

.legal-note {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.article-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.article-footer-nav a {
  display: grid;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-footer-nav a:last-child {
  text-align: right;
}

.article-footer-nav span {
  color: var(--faint);
  font-size: 11px;
}

/* Standard pages */
body:not(.docs-body):not(.admin-body) .page-shell > main {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  padding-bottom: 56px;
}

.page-hero,
.payment-hero,
.member-self-hero,
.detail-hero,
.hero {
  padding: 44px 0 24px;
}

.page-hero .section-heading,
.payment-hero .section-heading,
.member-self-hero .section-heading {
  max-width: 760px;
}

.page-hero h1,
.payment-hero h1,
.member-self-hero h1,
.detail-main h1,
.hero h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.3;
}

.panel-card,
.dashboard-card,
.payment-plan,
.guide-card,
.sidebar-card,
.article-card,
.metric-card,
.route-card,
.library-card,
.offer-card,
.requirement-card,
.decision-card,
.starter-card,
.pricing-card,
.tool-card,
.admin-card,
.feature-panel,
.content-card,
.consulting-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel-card,
.dashboard-card,
.payment-plan,
.guide-card,
.sidebar-card,
.article-card,
.admin-card,
.pricing-card,
.tool-card,
.consulting-panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.panel-head span,
.panel-card p,
.panel-card > span {
  color: var(--muted);
}

.mini-list,
.task-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.hero-actions,
.guide-actions,
.unlock-actions,
.admin-form-actions,
.admin-topbar-actions,
.block-toolbar,
.chip-group,
.user-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-results-shell {
  padding-bottom: 32px;
}

.search-summary {
  margin-bottom: 10px;
  color: var(--muted);
}

.search-results {
  border-top: 1px solid var(--line);
}

.search-result-card {
  padding: 18px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.search-result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.search-result-card h2 {
  margin: 0;
  font-size: 17px;
}

.search-result-card p {
  margin: 7px 0;
  color: var(--muted);
}

.search-tags,
.featured-meta,
.guide-meta,
.article-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Payment and account */
.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 24px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.payment-plan {
  cursor: pointer;
}

.payment-plan:hover,
.payment-plan.active-plan {
  border-color: var(--accent);
}

.payment-plan h2 {
  margin: 16px 0 6px;
  font-size: 18px;
}

.payment-plan p {
  color: var(--muted);
}

.price {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
}

.price span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.checkout-panel {
  position: sticky;
  top: 84px;
  align-self: start;
}

.order-summary {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary-row span {
  color: var(--muted);
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pay-method.active-method {
  border-color: var(--accent);
  background: #f7faff;
}

.pay-method input,
.switch-row input {
  accent-color: var(--accent);
}

.qr-box {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 180px;
  margin: 16px auto;
  border: 1px dashed #b7bcc5;
  background: var(--surface-subtle);
  color: var(--faint);
  font-size: 12px;
}

.checkout-panel .button {
  width: 100%;
}

.payment-note {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.member-self-layout,
.member-profile-card,
.member-list,
.member-profile,
.resource-list,
.activity-list,
.permission-grid {
  display: grid;
  gap: 14px;
}

.member-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.member-profile-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.member-profile-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.member-profile-head p {
  margin: 0;
  color: var(--muted);
}

.member-level-badge {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.member-profile-grid,
.member-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-profile-grid div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface-subtle);
}

.member-profile-grid span,
.resource-row span,
.activity-row span {
  color: var(--muted);
}

.resource-row,
.activity-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.activity-row {
  grid-template-columns: 74px 1fr;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.switch-row input {
  width: 16px;
  height: 16px;
}

/* Admin */
.admin-body {
  background: var(--bg);
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.admin-sidebar .brand {
  margin: 0 8px 22px;
}

.admin-nav {
  display: grid;
  gap: 3px;
}

.admin-nav a {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--muted);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: #eef1f5;
  color: var(--ink);
}

.admin-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.admin-main {
  min-width: 0;
  padding: 28px 32px 56px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 26px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-card {
  padding: 16px;
}

.dashboard-card span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-card strong {
  display: block;
  min-height: 34px;
  margin: 7px 0 4px;
  font-size: 22px;
}

.dashboard-card p {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.admin-panels,
.admin-editor-preview,
.user-admin-grid,
.cms-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-editor-preview,
.user-admin-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.admin-form,
.recommendation-options,
.recommendation-status,
.admin-user-list,
.payment-table,
.cms-form,
.cms-blocks,
.cms-list {
  display: grid;
  gap: 12px;
}

.recommendation-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface-subtle);
}

.chip,
.filter-chip {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.chip:hover,
.filter-chip:hover,
.filter-chip.active {
  border-color: #b7c9f7;
  background: var(--accent-soft);
  color: var(--accent);
}

.list-table,
.recommendation-status {
  border-top: 1px solid var(--line);
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.7fr;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.list-row span {
  color: var(--muted);
}

.admin-section-head {
  padding-top: 16px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 0.7fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.user-row div {
  display: grid;
}

.user-row span,
.payment-row span {
  color: var(--muted);
}

.payment-row {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 1fr 0.5fr 0.7fr;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.payment-row.table-head {
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
}

.cms-layout {
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1fr);
}

.cms-fields-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cms-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
}

.cms-block textarea,
.cms-block input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.cms-block textarea {
  min-height: 96px;
  resize: vertical;
}

/* Rendered articles */
.article-page-shell {
  padding-top: 36px;
}

.article-render {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 64px;
  background: #fff;
}

.article-render h1 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.3;
}

.article-render figure {
  margin: 24px 0;
}

.article-render img,
.article-render video {
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.article-render figcaption {
  margin-top: 7px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* Legacy grids retained for secondary pages */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 24px;
}

.guide-layout,
.detail-layout,
.content-layout,
.consulting-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.guide-grid,
.chapter-list,
.starter-grid,
.featured-grid,
.route-grid,
.library-grid,
.requirement-grid,
.decision-grid,
.offer-grid,
.pricing-grid,
.tool-grid,
.admin-grid,
.content-cards,
.section-grid {
  display: grid;
  gap: 12px;
}

.guide-grid,
.featured-grid,
.route-grid,
.library-grid,
.requirement-grid,
.decision-grid,
.offer-grid,
.pricing-grid,
.content-cards,
.section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.starter-grid,
.tool-grid,
.admin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-block,
.decision-helper,
.starter-kit {
  margin-top: 42px;
}

.payment-entry-strip,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.payment-entry-strip {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.site-footer {
  min-height: 68px;
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

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

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: max-content minmax(200px, 1fr) auto;
    gap: 14px;
  }

  .site-nav a {
    padding-right: 7px;
    padding-left: 7px;
  }

  .docs-workspace,
  .article-workspace {
    grid-template-columns: 210px minmax(0, 820px);
    gap: 24px;
  }

  .doc-main,
  .doc-article {
    padding: 40px 44px 64px;
  }

  .condition-grid,
  .admin-stats,
  .member-profile-grid,
  .member-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panels {
    grid-template-columns: 1fr;
  }

  .cms-layout,
  .admin-editor-preview,
  .user-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: auto;
  }

  html {
    scroll-padding-top: 126px;
  }

  .site-header {
    grid-template-columns: max-content 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
  }

  .site-nav.open {
    display: flex;
  }

  .docs-workspace,
  .article-workspace {
    display: block;
    width: 100%;
    padding: 0;
  }

  .doc-sidebar {
    position: sticky;
    top: 110px;
    z-index: 20;
    display: flex;
    align-items: center;
    width: 100%;
    max-height: none;
    padding: 8px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 248, 250, 0.97);
  }

  .doc-sidebar > .sidebar-title,
  .doc-sidebar > .sidebar-note,
  .doc-sidebar > .sidebar-divider,
  .doc-sidebar > .sidebar-filters,
  .chapter-rail > .chapter-progress,
  .chapter-rail > .progress-copy {
    display: none;
  }

  .doc-nav {
    display: flex;
    gap: 4px;
  }

  .doc-nav a {
    min-height: 32px;
    white-space: nowrap;
  }

  .chapter-rail .chapter-list {
    display: flex;
    gap: 4px;
  }

  .chapter-rail .chapter-item {
    grid-template-columns: 20px max-content;
    min-width: max-content;
    background: #fff;
  }

  .chapter-rail .chapter-item strong {
    max-width: 132px;
  }

  .doc-main,
  .doc-article {
    min-height: 0;
    padding: 34px 24px 56px;
  }

  .doc-header h1,
  .article-header h1 {
    font-size: 31px;
  }

  .clean-grid,
  .case-grid,
  .payment-layout,
  .member-detail-grid,
  .guide-layout,
  .detail-layout,
  .content-layout,
  .consulting-panel {
    grid-template-columns: 1fr;
  }

  .case-card p {
    min-height: 0;
  }

  .route-row {
    grid-template-columns: 1.1fr 1fr 72px;
  }

  .route-row > span:nth-child(3) {
    display: none;
  }

  .payment-layout {
    gap: 14px;
  }

  .checkout-panel {
    position: static;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-sidebar .brand {
    margin-bottom: 10px;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
  }

  .admin-nav a {
    min-width: max-content;
  }

  .admin-main {
    padding: 22px 18px 48px;
  }
}

@media (max-width: 600px) {
  body {
    background: #fff;
  }

  .brand-text {
    font-size: 14px;
  }

  .doc-sidebar {
    top: 110px;
  }

  .doc-main,
  .doc-article {
    padding: 28px 18px 48px;
  }

  .doc-breadcrumb {
    margin-bottom: 14px;
  }

  .doc-header h1,
  .article-header h1,
  .page-hero h1,
  .payment-hero h1,
  .member-self-hero h1 {
    font-size: 28px;
  }

  .doc-lead {
    font-size: 15px;
  }

  .doc-callout {
    grid-template-columns: auto 1fr;
  }

  .doc-callout .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .compact-heading {
    align-items: start;
  }

  .featured-row {
    grid-template-columns: 36px minmax(0, 1fr) 16px;
  }

  .featured-row > .status-tag {
    display: none;
  }

  .route-table {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .route-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 58px;
    gap: 8px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 12px;
  }

  .route-row .status-tag {
    padding-right: 4px;
    padding-left: 4px;
  }

  .checklist-grid,
  .condition-grid,
  .summary-grid,
  .unlock-options,
  .article-footer-nav,
  .payment-options,
  .member-profile-grid,
  .member-stats,
  .admin-stats,
  .recommendation-options,
  .cms-fields-row,
  .guide-grid,
  .featured-grid,
  .route-grid,
  .library-grid,
  .requirement-grid,
  .decision-grid,
  .offer-grid,
  .pricing-grid,
  .tool-grid,
  .admin-grid,
  .content-cards,
  .section-grid,
  .starter-grid {
    grid-template-columns: 1fr;
  }

  .checklist-grid {
    gap: 0;
  }

  .checklist-grid li {
    grid-template-columns: 28px 88px 1fr;
  }

  .guide-list-row {
    grid-template-columns: 36px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .status-stack {
    display: none;
  }

  .hot-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding-right: 4px;
    padding-left: 4px;
  }

  .hot-item p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .global-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-field,
  .global-search-form .button {
    grid-column: 1 / -1;
  }

  .article-table > div {
    grid-template-columns: 0.9fr 1.4fr 44px;
    gap: 7px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  body:not(.docs-body):not(.admin-body) .page-shell > main {
    width: min(calc(100% - 28px), 1120px);
  }

  .panel-card,
  .payment-plan,
  .guide-card,
  .sidebar-card,
  .article-card,
  .admin-card,
  .pricing-card,
  .tool-card,
  .consulting-panel {
    padding: 16px;
  }

  .member-profile-head,
  .admin-topbar,
  .site-footer,
  .payment-entry-strip,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-row,
  .activity-row,
  .list-row,
  .user-row,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .payment-row.table-head {
    display: none;
  }

  .article-render {
    padding: 28px 18px;
  }

  .article-render h1 {
    font-size: 28px;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

/* AI venture knowledge base */
.venture-workspace {
  grid-template-columns: 250px minmax(0, 960px);
  width: min(100%, 1320px);
  gap: 34px;
}

.venture-sidebar .doc-nav a {
  min-height: 40px;
}

.venture-main {
  padding-top: 42px;
}

.venture-intro {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}

.intro-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.intro-title-row h1 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: 38px;
  line-height: 1.28;
}

.update-stamp {
  flex: 0 0 auto;
  margin-bottom: 20px;
  color: var(--faint);
  font-size: 12px;
}

.venture-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--line-soft);
}

.venture-overview div {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  background: #fff;
}

.venture-overview strong {
  font-size: 20px;
}

.venture-overview span {
  color: var(--faint);
  font-size: 12px;
}

.venture-section {
  padding-top: 52px;
  scroll-margin-top: 78px;
}

.venture-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.venture-section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.venture-section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.venture-section-head > p,
.venture-section-head > a {
  margin: 0 0 2px;
  color: var(--faint);
  font-size: 12px;
}

.venture-section-head > a {
  color: var(--accent);
}

.section-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.venture-list {
  display: grid;
  gap: 12px;
}

.venture-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.venture-card:hover {
  border-color: #b8caff;
  box-shadow: 0 6px 18px rgba(31, 35, 41, 0.06);
}

.featured-venture {
  border-left: 3px solid var(--accent);
}

.venture-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.venture-card h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.45;
}

.venture-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 17px;
}

.venture-card:hover .venture-arrow {
  background: var(--accent-soft);
  color: var(--accent);
}

.venture-type {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.type-video,
.type-drama { background: #fff0ef; color: #b6423c; }
.type-visual { background: #eaf2ff; color: #2d64dc; }
.type-writing { background: #e8f7f0; color: #087957; }
.type-capital { background: #fff3e0; color: #9a520d; }
.type-efficiency { background: #f2edff; color: #6842b8; }
.type-news { background: #1f2329; color: #fff; }
.type-guide { background: #e8f7f0; color: #087957; }

.venture-summary {
  max-width: 760px;
  margin: 12px 0 16px;
  color: var(--muted);
}

.venture-facts {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1.15fr 1.05fr;
  gap: 8px;
  margin: 0;
}

.venture-facts div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 5px;
  background: var(--surface-subtle);
}

.venture-facts dt {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 11px;
}

.venture-facts dd {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.compact-ventures {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-ventures .venture-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.compact-ventures .venture-card h3 {
  font-size: 16px;
}

.compact-ventures .venture-summary {
  min-height: 66px;
}

.compact-ventures .venture-facts {
  grid-template-columns: 1fr;
  margin-top: auto;
}

.compact-ventures .venture-facts div {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: baseline;
  gap: 6px;
  padding: 7px 9px;
}

.compact-ventures .venture-facts dt {
  margin: 0;
}

.risk-callout,
.income-note,
.news-disclaimer {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 3px solid #d58b28;
  background: #fff8ec;
  color: #76521f;
  font-size: 12px;
}

.news-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.news-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.news-row img {
  width: 190px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-subtle);
}

.news-row h3 {
  margin: 5px 0 6px;
  font-size: 18px;
  line-height: 1.45;
}

.news-row p {
  margin-bottom: 8px;
  color: var(--muted);
}

.news-row small,
.news-label {
  color: var(--faint);
  font-size: 11px;
}

.lead-news {
  grid-template-columns: 310px minmax(0, 1fr);
  padding-top: 20px;
}

.lead-news img {
  width: 310px;
}

.lead-news h3 {
  font-size: 21px;
}

.starter-docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.starter-docs article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.starter-number {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.starter-docs h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.starter-docs p {
  color: var(--muted);
}

.starter-docs a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.income-note {
  margin: 14px 0 0;
  border-left-color: var(--accent);
  background: #f5f8ff;
  color: var(--muted);
}

.income-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.income-note p {
  margin: 0;
}

/* Dynamic tutorial and editorial article */
.article-page-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 900px);
  justify-content: center;
  gap: 34px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.article-page-shell .doc-article {
  min-width: 0;
  padding: 46px 64px 72px;
}

.article-dynamic-sidebar .chapter-item {
  grid-template-columns: 25px minmax(0, 1fr);
}

.article-dynamic-sidebar .chapter-item strong {
  white-space: normal;
}

.sidebar-back {
  display: inline-block;
  margin: 20px 10px 0;
  color: var(--accent);
  font-size: 12px;
}

.loading-copy {
  padding: 8px 10px;
  color: var(--faint);
  font-size: 12px;
}

.article-loading,
.article-error {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.article-header > .venture-type {
  margin-bottom: 12px;
}

.article-cover {
  margin: 28px 0 0;
}

.article-cover img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-fact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-fact-grid > div:last-child {
  grid-column: 1 / -1;
}

.rendered-article-body .article-section {
  padding-top: 42px;
  scroll-margin-top: 84px;
}

.article-opening {
  padding-top: 30px;
}

.article-inline-callout {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid #c7d8ff;
  border-radius: var(--radius);
  background: #f5f8ff;
}

.article-inline-callout strong {
  display: block;
  margin-bottom: 4px;
}

.article-inline-callout p {
  margin: 0;
}

.article-media {
  margin: 24px 0;
}

.article-media img,
.article-media video {
  width: 100%;
  border-radius: var(--radius);
  background: #111;
}

.article-media figcaption {
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.article-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}

.article-source a {
  color: var(--accent);
  font-weight: 600;
}

.news-header h1 {
  max-width: 790px;
  font-size: 42px;
  line-height: 1.25;
}

.news-header .doc-lead {
  font-size: 18px;
  line-height: 1.75;
}

.is-news .article-cover img {
  aspect-ratio: 16 / 8.5;
}

.is-news .rendered-article-body {
  max-width: 720px;
  margin: 0 auto;
}

.is-news .rendered-article-body .article-section > p {
  color: #30343b;
  font-size: 17px;
  line-height: 1.95;
}

.is-news .chapter-heading > span,
.is-news .chapter-heading small {
  display: none;
}

.is-news .chapter-heading {
  grid-template-columns: 1fr;
}

.is-news .chapter-heading h2 {
  font-size: 25px;
}

.news-disclaimer {
  margin-top: 16px;
}

@media (max-width: 1120px) {
  .compact-ventures {
    grid-template-columns: 1fr;
  }

  .compact-ventures .venture-card {
    min-height: 0;
  }

  .compact-ventures .venture-summary {
    min-height: 0;
  }

  .compact-ventures .venture-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .venture-workspace,
  .article-page-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .venture-main,
  .article-page-shell .doc-article {
    padding: 34px 24px 56px;
  }

  .article-dynamic-sidebar {
    position: sticky;
    top: 110px;
    z-index: 20;
    display: flex;
    width: 100%;
    padding: 8px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 248, 250, 0.97);
  }

  .article-dynamic-sidebar > :not(.chapter-list) {
    display: none;
  }

  .article-dynamic-sidebar .chapter-list {
    display: flex;
    gap: 4px;
  }

  .article-dynamic-sidebar .chapter-item {
    grid-template-columns: 22px max-content;
    min-width: max-content;
    background: #fff;
  }

  .venture-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .venture-main,
  .article-page-shell .doc-article {
    padding: 28px 18px 48px;
  }

  .intro-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .intro-title-row h1,
  .news-header h1 {
    font-size: 28px;
  }

  .update-stamp {
    margin-bottom: 12px;
  }

  .venture-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .venture-section {
    padding-top: 42px;
  }

  .venture-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .venture-section-head > p {
    padding-left: 46px;
  }

  .venture-card {
    padding: 16px;
  }

  .venture-facts,
  .compact-ventures .venture-facts,
  .article-fact-grid,
  .starter-docs {
    grid-template-columns: 1fr;
  }

  .article-fact-grid > div:last-child {
    grid-column: auto;
  }

  .news-row,
  .lead-news {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .news-row img,
  .lead-news img {
    width: 112px;
  }

  .news-row h3,
  .lead-news h3 {
    margin-top: 3px;
    font-size: 15px;
  }

  .news-row p,
  .news-row small {
    display: none;
  }

  .news-header .doc-lead,
  .is-news .rendered-article-body .article-section > p {
    font-size: 15px;
  }

  .article-cover {
    margin-right: -18px;
    margin-left: -18px;
  }

  .article-cover img {
    border-radius: 0;
  }
}

/* Home category directory and document toolbar */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  min-height: 206px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--category-color, var(--accent));
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-card:hover {
  border-color: var(--category-color, var(--accent));
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.08);
  transform: translateY(-2px);
}

.category-visual { --category-color: #4c6fff; }
.category-content { --category-color: #1f9d72; }
.category-product { --category-color: #d58b28; }
.category-business { --category-color: #8b62c9; }

.category-card-head,
.category-card-foot,
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--category-color) 13%, white);
  color: var(--category-color);
  font-size: 13px;
  font-weight: 700;
}

.category-count {
  color: var(--faint);
  font-size: 12px;
}

.category-card h3 {
  margin: 22px 0 8px;
  font-size: 19px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card-foot {
  margin-top: auto;
  padding-top: 20px;
  color: var(--faint);
  font-size: 12px;
}

.category-card-foot span:last-child {
  color: var(--category-color);
  font-size: 18px;
}

.doc-toolbar {
  min-height: 32px;
  margin: -20px 0 20px;
  color: var(--faint);
  font-size: 12px;
}

.doc-toolbar a {
  color: var(--accent);
}

.doc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.doc-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a36a;
}

.hot-feed-block {
  margin-top: 30px;
}

.hot-feed-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.hot-feed-heading h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.hot-feed-heading > span {
  color: var(--faint);
  font-size: 11px;
}

.primary-directory-row {
  background: #f8faff;
}

.primary-directory-row:hover {
  background: #f1f5ff;
}

.directory-category {
  scroll-margin-top: 84px;
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 180px;
  }

  .doc-toolbar {
    margin-top: -10px;
    flex-wrap: wrap;
  }

  .doc-toolbar > span:nth-child(2) {
    order: 3;
    width: 100%;
  }

  .hot-feed-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
