:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #607080;
  --line: #dfe6e6;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --green: #1d7c5a;
  --teal: #0d7c85;
  --coral: #d95f45;
  --gold: #b7791f;
  --blue: #3169a8;
  --shadow: 0 18px 50px rgba(25, 34, 42, 0.09);
  --sidebar-width: 288px;
  --sidebar-collapsed-width: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 248, 245, 0.96) 44%, #eef3f0 100%),
    linear-gradient(115deg, rgba(29, 124, 90, 0.08), transparent 38%, rgba(217, 95, 69, 0.07) 74%, transparent),
    var(--paper);
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 230, 230, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 10px 22px rgba(13, 124, 133, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

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

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #40505c;
  font-size: 14px;
}

.top-nav a {
  padding: 9px 12px;
  border-radius: 8px;
}

.top-nav a:hover {
  color: var(--green);
  background: rgba(29, 124, 90, 0.08);
}

main {
  width: 100%;
  margin: 0;
  padding: 0 clamp(24px, 3.2vw, 64px);
  transition: padding-left 0.24s ease;
}

body:not(.sidebar-collapsed) main {
  padding-left: calc(var(--sidebar-width) + clamp(24px, 3.2vw, 64px));
}

body.sidebar-collapsed main {
  padding-left: calc(var(--sidebar-collapsed-width) + clamp(24px, 3.2vw, 64px));
}

body:not(.sidebar-collapsed) .site-footer {
  padding-left: calc(var(--sidebar-width) + clamp(18px, 4vw, 56px));
}

body.sidebar-collapsed .site-footer {
  padding-left: calc(var(--sidebar-collapsed-width) + clamp(18px, 4vw, 56px));
}

.fixed-category-panel {
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  z-index: 18;
  width: var(--sidebar-width);
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 18px 0 44px rgba(25, 34, 42, 0.08);
  transition: transform 0.24s ease;
  transition:
    width 0.24s ease,
    padding 0.24s ease,
    box-shadow 0.24s ease;
}

body.sidebar-collapsed .fixed-category-panel {
  width: var(--sidebar-collapsed-width);
  padding: 14px 10px;
  box-shadow: 10px 0 26px rgba(25, 34, 42, 0.07);
}

.fixed-category-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 6px 26px;
}

.fixed-category-inner h2 {
  margin-bottom: 18px;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 1;
  white-space: nowrap;
}

body.sidebar-collapsed .fixed-category-inner {
  padding: 56px 0 22px;
}

body.sidebar-collapsed .fixed-category-inner .eyebrow,
body.sidebar-collapsed .fixed-category-inner h2,
body.sidebar-collapsed .category-name,
body.sidebar-collapsed .category-list strong {
  display: none;
}

.category-toggle {
  position: absolute;
  top: 18px;
  right: -43px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: #fff;
  cursor: pointer;
  background: var(--ink);
  box-shadow: 8px 10px 24px rgba(25, 34, 42, 0.14);
}

.category-toggle span,
.category-toggle span::before,
.category-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.category-toggle span {
  position: relative;
}

.category-toggle span::before,
.category-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.category-toggle span::before {
  top: -6px;
}

.category-toggle span::after {
  top: 6px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 64px 0 42px;
  text-align: center;
}

.hero-copy {
  width: 100%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: none;
  margin-bottom: 20px;
  font-size: clamp(52px, 6.4vw, 96px);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-desc {
  max-width: none;
  margin-bottom: 0;
  color: #455663;
  font-size: 19px;
  line-height: 1.8;
  white-space: nowrap;
}

.search-panel {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(100%, 920px);
  margin: 0 auto;
}

.search-input-wrap {
  position: relative;
}

.search-row input {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
  background: #f9fbfa;
}

.search-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(29, 124, 90, 0.12);
}

.search-row button,
.quick-tags button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.search-row button {
  min-height: 52px;
  padding: 0 18px;
  color: #fff;
  font-weight: 800;
  background: var(--ink);
}

.search-input-wrap button {
  position: absolute;
  top: 50%;
  right: 10px;
  min-height: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #3169a8;
  font-size: 24px;
  line-height: 1;
  background: transparent;
  transform: translateY(-50%);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.quick-tags button {
  padding: 9px 12px;
  color: #274338;
  background: rgba(29, 124, 90, 0.1);
}

.quick-tags button:nth-child(2) {
  color: #62351d;
  background: rgba(217, 95, 69, 0.12);
}

.quick-tags button:nth-child(3) {
  color: #24476d;
  background: rgba(49, 105, 168, 0.12);
}

.quick-tags button:nth-child(4) {
  color: #654813;
  background: rgba(183, 121, 31, 0.14);
}

.quick-tags button:hover {
  transform: translateY(-1px);
}

.search-results {
  margin: 0 auto 42px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(25, 34, 42, 0.07);
}

.search-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-results-heading p {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.search-results-heading button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  background: #eef2f1;
}

.search-result-section + .search-result-section {
  margin-top: 28px;
}

.search-result-section h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.search-tool-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.search-article-results {
  display: grid;
  gap: 14px;
}

.search-article-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  border: 1px solid rgba(223, 230, 230, 0.8);
  border-radius: 8px;
  background: #fff;
}

.search-article-card:hover {
  border-color: rgba(29, 124, 90, 0.28);
  background: #f8fbfa;
}

.search-article-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

.search-article-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

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

.search-article-card time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.news-section {
  margin: 0 0 42px;
}

.news-content {
  min-width: 0;
  padding: 24px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(25, 34, 42, 0.06);
}

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

.news-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
}

.news-heading > a {
  color: var(--ink);
  font-size: 14px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  overflow: hidden;
  padding: 20px;
  border-radius: 8px;
  color: #263047;
}

.news-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  transform: rotate(12deg);
}

.news-card span,
.news-card strong,
.news-card small {
  position: relative;
  z-index: 1;
}

.news-card span {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
}

.news-card strong {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
}

.news-card small {
  color: rgba(38, 48, 71, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.news-card-blue {
  background: #d6e5ff;
}

.news-card-green {
  background: #def0d9;
}

.news-card-lilac {
  background: #efe1f7;
}

.news-card-cyan {
  background: #c9ecfb;
}

.news-card-dark {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.48)),
    linear-gradient(120deg, #7b3f15, #1d4d3d 62%, #111827);
}

.news-card-dark small {
  color: rgba(255, 255, 255, 0.78);
}

.section-block {
  padding: 40px 0;
}

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

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.featured-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tool-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 284px;
  padding: 18px;
  border: 1px solid rgba(223, 230, 230, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(25, 34, 42, 0.05);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 124, 90, 0.34);
  box-shadow: 0 18px 42px rgba(25, 34, 42, 0.1);
}

.tool-card.is-compact {
  min-height: 252px;
}

.tool-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  margin-bottom: 14px;
}

.tool-head img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-head h3 {
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tool-desc {
  min-height: 70px;
  margin-bottom: 14px;
  color: #445460;
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 7px;
  color: #4e5c66;
  font-size: 12px;
  background: #eef2f1;
}

.tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tool-foot span {
  color: var(--muted);
  font-size: 13px;
}

.tool-foot a {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

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

.category-sidebar {
  display: none;
}

.category-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #354653;
  font-size: 17px;
  background: #f1f5f3;
}

.category-list a strong {
  margin-left: auto;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--green);
  background: rgba(29, 124, 90, 0.1);
}

.category-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.sidebar-collapsed .category-list {
  gap: 12px;
  margin-top: 0;
}

body.sidebar-collapsed .category-list a {
  justify-content: center;
  min-height: 48px;
  padding: 0;
}

body.sidebar-collapsed .category-icon {
  width: 38px;
  height: 38px;
}

.category-list a:hover {
  color: var(--green);
  background: rgba(29, 124, 90, 0.1);
}

.category-list strong {
  color: var(--muted);
  font-size: 16px;
}

.category-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.category-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.category-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.category-panel-heading h3 {
  margin: 0;
  font-size: 26px;
}

.category-panel-heading > a {
  margin-left: auto;
  color: var(--ink);
  font-size: 14px;
}

.subcategory-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.09);
  scrollbar-width: thin;
}

.subcategory-tabs::-webkit-scrollbar {
  height: 4px;
}

.subcategory-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(96, 112, 128, 0.28);
}

.subcategory-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #74808a;
  font-size: 13px;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}

.subcategory-tabs button.is-active,
.subcategory-tabs button:hover {
  color: #fff;
  background: #5d66ff;
}

.subcategory-tabs span {
  font-size: 12px;
  opacity: 0.76;
}

.subcategory-group {
  display: none;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.subcategory-group.is-active {
  display: block;
}

.subcategory-group + .subcategory-group {
  margin-top: 24px;
}

.subcategory-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.subcategory-heading h4 {
  margin: 0;
  font-size: 20px;
}

.subcategory-heading span {
  color: var(--muted);
  font-size: 13px;
}

.category-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.category-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(223, 230, 230, 0.72);
  border-radius: 8px;
  color: #384853;
  background: #fff;
  box-shadow: 0 10px 24px rgba(25, 34, 42, 0.04);
}

.category-tool-link:hover {
  border-color: rgba(29, 124, 90, 0.28);
  background: #f8fbfa;
}

.category-tool-link img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-tool-link span {
  min-width: 0;
}

.category-tool-link strong,
.category-tool-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tool-link strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
}

.category-tool-link small {
  color: var(--muted);
  font-size: 13px;
}

.category-panel-heading .category-icon {
  color: var(--blue);
  background: rgba(49, 105, 168, 0.1);
}

.category-panel-heading .category-icon svg {
  width: 18px;
  height: 18px;
}

.category-panel a {
  text-decoration: none;
}

.category-panel img {
  border-radius: 6px;
}

.empty-state {
  margin: 22px 0 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.submit-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 0 64px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #17342f, #0d5960 58%, #7f432f);
}

.submit-band h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 38px);
}

.submit-band p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.submit-band .eyebrow {
  color: #ffd38a;
}

.submit-band a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  color: #17342f;
  font-weight: 800;
  background: #fff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: #fff;
}

@media (max-width: 1040px) {
  body:not(.sidebar-collapsed) main {
    padding-left: clamp(24px, 3.2vw, 64px);
  }

  body.sidebar-collapsed main {
    padding-left: clamp(24px, 3.2vw, 64px);
  }

  body:not(.sidebar-collapsed) .site-footer {
    padding-left: clamp(18px, 4vw, 56px);
  }

  body.sidebar-collapsed .site-footer {
    padding-left: clamp(18px, 4vw, 56px);
  }

  .fixed-category-panel {
    width: min(var(--sidebar-width), calc(100vw - 54px));
  }

  .hero {
    padding-top: 58px;
  }

}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(36px, 11vw, 70px);
  }

  .hero-desc {
    white-space: normal;
  }

  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
  }

  .site-footer,
  .submit-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  main {
    padding: 0 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 15px;
  }

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

  .featured-grid,
  .tool-grid,
  .tool-grid.compact,
  .category-board,
  .category-tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card,
  .tool-card.is-compact {
    min-height: 0;
  }

  .tool-desc {
    min-height: 0;
  }

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }
}
