:root {
  --bg: #f6f7f4;
  --paper: #ffffff;
  --paper-soft: #fbfbf8;
  --ink: #20231f;
  --text: #4d554f;
  --muted: #778077;
  --line: #dddfd6;
  --line-strong: #c8ccc0;
  --accent: #2f5d50;
  --accent-soft: #e8f1ed;
  --amber: #8a5a17;
  --amber-soft: #f8efd9;
  --shadow: 0 1px 0 rgba(32, 35, 31, .04), 0 18px 42px rgba(32, 35, 31, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}

body.detail-open {
  overflow: hidden;
}

::selection { background: #cfe3dc; color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7cbbf; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid rgba(47, 93, 80, .45);
  outline-offset: 2px;
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, .92);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav {
  display: inline-flex;
  justify-content: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: var(--text);
  font-size: 14px;
}

.nav a {
  min-width: 52px;
  padding: 7px 12px;
  border-radius: 999px;
  text-align: center;
  transition: background .16s ease, color .16s ease;
}

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

.partner {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.partner:hover,
.partner.active {
  border-color: rgba(47, 93, 80, .42);
  background: var(--accent-soft);
  color: var(--accent);
}

.hero { padding: 66px 0 34px; }
.index-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 740px) minmax(250px, 1fr);
  gap: 36px;
  align-items: end;
}

.index-hero .wrap::after {
  content: "使用规则\A 只做入口整理，不托管第三方资源\A 标注访问状态，优先国内常用\A 原创教程单独沉淀";
  white-space: pre-line;
  align-self: center;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 1px 0 rgba(32, 35, 31, .04), 0 12px 28px rgba(32, 35, 31, .05);
  color: var(--text);
  font-size: 13px;
  line-height: 1.85;
  font-weight: 750;
}

.page-hero {
  padding: 38px 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .58);
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-hero h1 { font-size: clamp(32px, 4.5vw, 48px); }
.lead {
  max-width: 690px;
  margin: 17px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.search {
  max-width: 720px;
  min-height: 58px;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 13px;
  background: transparent;
  color: var(--ink);
}

.button,
.search button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.button:hover,
.search button:hover {
  background: #254b41;
  transform: translateY(-1px);
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.quick a,
.chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.quick a:hover,
.chip:hover {
  border-color: rgba(47, 93, 80, .32);
  color: var(--accent);
}

.section { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-desc {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.more {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.category-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.category {
  min-height: 132px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background .16s ease;
}

.category:nth-child(3n) { border-right: 0; }
.category:nth-last-child(-n+2) { border-bottom: 0; }
.category:first-child {
  grid-row: span 2;
  min-height: 265px;
  background: var(--accent-soft);
}

.category:hover { background: var(--paper-soft); }
.category-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.category b {
  font-size: 16px;
  line-height: 1.35;
}

.count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.category p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
}

.path-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-auto-rows: minmax(132px, auto);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.path-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background .16s ease;
}

.path-card:first-child {
  grid-row: span 2;
  min-height: 265px;
  background: var(--accent-soft);
}

.path-card:nth-child(3) {
  border-right: 0;
}

.path-card:nth-child(4) {
  border-bottom: 0;
}

.path-card:hover {
  background: var(--paper-soft);
}

.path-card b {
  font-size: 18px;
  line-height: 1.3;
}

.path-card p {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.directory,
.tutorial-directory {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 0 rgba(32, 35, 31, .04);
}

.filter-title {
  margin: 1px 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-title::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.filter-list {
  display: grid;
  gap: 3px;
}

.filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.filter span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.filter.active {
  font-weight: 900;
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 10px;
  margin-bottom: 10px;
}

.resource-toolbar input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .84);
  color: var(--ink);
}

.resource-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .84);
  color: var(--ink);
  cursor: pointer;
}

.resource-toolbar input:focus,
.resource-toolbar select:focus {
  border-color: rgba(47, 93, 80, .42);
  outline: 0;
}

.quick-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
}

.quick-filter-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quick-filter {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.quick-filter:hover,
.quick-filter.active {
  border-color: rgba(47, 93, 80, .34);
  background: var(--accent-soft);
  color: var(--accent);
}

.result-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
}

.resource-list,
.article-list {
  display: grid;
  gap: 9px;
}

.resource {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.resource:hover {
  border-color: rgba(47, 93, 80, .28);
  box-shadow: 0 10px 28px rgba(32, 35, 31, .07);
  transform: translateY(-1px);
}

.result-card {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: start;
  padding: 16px;
}

.rank {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.result-body {
  min-width: 0;
}

.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.avatar.blue,
.avatar.green {
  background: var(--accent-soft);
  color: var(--accent);
}

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

.resource-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 900;
}

.resource-title a {
  color: var(--ink);
}

.resource-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.rating-label {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.rating-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stars {
  color: var(--amber);
  letter-spacing: 1px;
}

.tag {
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef0ea;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag.good {
  background: var(--accent-soft);
  color: var(--accent);
}

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

.resource p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.editor-note {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
  line-height: 1.58;
}

.editor-note b {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.editor-note span {
  color: var(--text);
}

.visit {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.visit:hover {
  border-color: rgba(47, 93, 80, .42);
  background: var(--accent-soft);
}

.detail-panel[hidden] {
  display: none;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(720px, min(76vw, 980px));
}

.detail-backdrop {
  background: rgba(32, 35, 31, .28);
}

.detail-sheet {
  min-width: 0;
  height: 100dvh;
  overflow: auto;
  padding: 28px clamp(24px, 4vw, 48px) 40px;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: -18px 0 42px rgba(32, 35, 31, .12);
}

.detail-close {
  min-height: 36px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.detail-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 760px;
}

.detail-rank {
  width: 54px;
  height: 54px;
  color: var(--accent);
  background: var(--accent-soft);
}

.detail-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.detail-desc {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.detail-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
}

.detail-section b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.detail-section p,
.detail-section ol,
.detail-section ul {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.detail-section ol,
.detail-section ul {
  padding-left: 20px;
}

.muted-section {
  background: var(--paper-soft);
}

.detail-visit {
  width: 100%;
  margin-top: 16px;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr);
  gap: 18px;
  align-items: stretch;
  margin: 22px 0 18px;
}

.detail-hero-compact {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.detail-visual {
  min-height: 220px;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(232, 241, 237, .95), rgba(255, 255, 255, .72)),
    var(--paper);
}

.visual-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.visual-title {
  margin-top: 8px;
  max-width: 310px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 950;
}

.visual-flow {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.visual-node {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(47, 93, 80, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
}

.visual-node span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.visual-node b {
  font-size: 13px;
  line-height: 1.25;
}

.detail-meta-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
}

.detail-meta-card div {
  display: grid;
  gap: 4px;
}

.detail-meta-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-meta-card b {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}

.detail-stack {
  display: grid;
  gap: 0;
}

.detail-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-checklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.detail-checklist li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 5px #fff;
  border: 1px solid rgba(47, 93, 80, .28);
}

.detail-note-strip {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(138, 90, 23, .18);
  border-radius: 14px;
  background: var(--amber-soft);
  color: #6b4512;
  font-size: 13px;
  line-height: 1.65;
}

.tutorial-main { display: grid; gap: 10px; }
.feature-tutorial {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.feature-tutorial h3 {
  max-width: 560px;
  margin: 12px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.feature-tutorial p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--text);
  line-height: 1.65;
}

.article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  cursor: pointer;
}

.article:hover {
  border-color: rgba(47, 93, 80, .28);
  box-shadow: 0 10px 28px rgba(32, 35, 31, .07);
  transform: translateY(-1px);
}

.article b {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.article span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.article p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
}

.tutorial-steps {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.tutorial-steps li + li {
  margin-top: 4px;
}

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

.topic {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.topic:hover {
  border-color: rgba(47, 93, 80, .28);
  box-shadow: 0 10px 28px rgba(32, 35, 31, .07);
  transform: translateY(-1px);
}

.topic b {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.topic p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

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

.ip-toolbar {
  grid-template-columns: 1fr;
}

.ip-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  cursor: pointer;
}

.ip-card:hover {
  border-color: rgba(47, 93, 80, .28);
  box-shadow: 0 10px 28px rgba(32, 35, 31, .07);
  transform: translateY(-1px);
}

.ip-card > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.ip-card b {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 16px;
}

.ip-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
}

.detail-section a {
  color: var(--accent);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.workflow-main {
  display: grid;
  gap: 10px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
}

.workflow-step span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.workflow-step b,
.workflow-side b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.workflow-step p,
.workflow-side p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.68;
}

.workflow-side {
  position: sticky;
  top: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(32, 35, 31, .04), 0 12px 28px rgba(32, 35, 31, .05);
}

.workflow-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.business {
  padding: 26px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.business h2 { color: #fff; }
.business p {
  max-width: 760px;
  color: #dce1da;
  line-height: 1.75;
}

.business a {
  display: inline-flex;
  margin-top: 6px;
  padding: 10px 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

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

.contact-card {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.contact-card:hover {
  border-color: rgba(47, 93, 80, .28);
  box-shadow: 0 10px 28px rgba(32, 35, 31, .07);
  transform: translateY(-1px);
}

.contact-card b {
  font-size: 16px;
}

.contact-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

footer {
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
  .partner {
    grid-column: 2;
    grid-row: 1;
  }
  .index-hero .wrap,
  .directory,
  .tutorial-directory,
  .workflow-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .index-hero .wrap::after {
    min-height: 0;
    align-self: start;
  }
  .category-grid,
  .path-grid,
  .topic-grid,
  .ip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category:first-child {
    grid-row: auto;
    min-height: 132px;
  }
  .path-card:first-child {
    grid-row: auto;
    min-height: 132px;
  }
  .path-card:nth-child(3) {
    border-right: 1px solid var(--line);
  }
  .path-card:nth-child(2n) {
    border-right: 0;
  }
  .path-card:nth-last-child(-n+2) {
    border-bottom: 0;
  }
  .category:nth-child(3n) { border-right: 1px solid var(--line); }
  .category:nth-child(2n) { border-right: 0; }
  .category:nth-last-child(-n+2) { border-bottom: 0; }
  .filters {
    position: sticky;
    top: 108px;
    z-index: 8;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    background: rgba(246, 247, 244, .9);
    backdrop-filter: blur(14px);
  }
  .filter-title {
    margin: 0;
    padding: 0 6px;
    white-space: nowrap;
  }
  .filter-title::after {
    display: none;
  }
  .filter-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .filter-list::-webkit-scrollbar {
    display: none;
  }
  .filter {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    white-space: nowrap;
  }
  .filter.active,
  .filter:hover {
    border-color: rgba(47, 93, 80, .34);
  }
  .filter span:last-child {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(32, 35, 31, .06);
    text-align: center;
  }
  .workflow-side {
    position: static;
  }
}

@media (max-width: 700px) {
  .wrap { width: min(100% - 28px, 1160px); }
  .topbar-inner {
    min-height: 58px;
    gap: 10px;
    padding: 10px 0;
  }
  .brand span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .partner {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
  .nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .hero { padding-top: 38px; }
  h1 { font-size: 38px; }
  .search { grid-template-columns: 1fr; }
  .resource-toolbar { grid-template-columns: 1fr; }
  .search button,
  .visit { width: 100%; }
  .filters {
    top: 114px;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-inline: -2px;
  }
  .filter-title {
    padding: 0 4px;
    font-size: 11px;
  }
  .filter {
    min-height: 40px;
    padding: 0 11px;
    font-size: 13px;
  }
  .section-head,
  .resource {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .category-grid,
  .path-grid,
  .topic-grid,
  .ip-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .detail-backdrop {
    display: none;
  }

  .detail-sheet {
    height: 100dvh;
    border-left: 0;
    padding: 18px 16px 30px;
  }

  .detail-hero-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .detail-visual {
    min-height: 0;
  }

  .visual-flow {
    position: static;
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .detail-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .detail-rank {
    width: 48px;
    height: 48px;
  }

  .quick-filter {
    min-height: 44px;
    padding: 0 13px;
  }
  .category,
  .path-card,
  .path-card:nth-child(2n),
  .path-card:nth-child(3),
  .path-card:nth-last-child(-n+2),
  .category:nth-child(2n),
  .category:nth-child(3n),
  .category:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .category:last-child { border-bottom: 0; }
  .path-card:last-child { border-bottom: 0; }
}
