:root {
  --bg: #f4efe7;
  --surface: #fffdf8;
  --surface-2: #ffffff;
  --ink: #142120;
  --muted: #5a6a67;
  --line: #e2d8ca;
  --brand: #0f766e;
  --brand-2: #f97316;
  --brand-3: #0b4a46;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 36px rgba(10, 24, 24, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 34, 32, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 420px at -10% -10%, #d9f4ec 0%, rgba(217, 244, 236, 0) 55%),
    radial-gradient(900px 300px at 100% 0%, #ffe4cb 0%, rgba(255, 228, 203, 0) 58%),
    var(--bg);
}

.hero {
  padding: 2rem 1.2rem 1.2rem;
}

.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid #d7ecdf;
  background: linear-gradient(120deg, #f6fffb 0%, #fff8ef 100%);
  border-radius: 22px;
  padding: 1.2rem 1.2rem 1rem;
  box-shadow: var(--shadow-soft);
}

.hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__eyebrow {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--brand);
  font-weight: 800;
  line-height: 1.08;
}

.hero__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__label {
  font-size: 0.9rem;
  color: var(--muted);
}

.hero__select {
  width: auto;
  min-width: 124px;
}

h1 {
  margin: 0.45rem 0 0.4rem;
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  line-height: 1.15;
}

.hero__desc {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.hero__tags {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero__tags span {
  display: inline-flex;
  font-size: 0.78rem;
  border: 1px solid #d4e8dd;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #2b615c;
}

.hero__search {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.7rem;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem 2.8rem;
}

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem 1.4rem;
}

.footer__visit {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer__seo {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed #d9d4ca;
}

.footer__seo-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  justify-content: center;
}

.seo-links a {
  color: #356a65;
  font-size: 0.76rem;
  text-decoration: none;
  border-bottom: 1px dotted #9dc3bd;
}

.seo-links a:hover {
  color: var(--brand-2);
}

.page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.05rem;
}

.hidden {
  display: none;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.chip {
  border: 1px solid #d7e5de;
  background: #fff;
  color: #224c48;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip:hover {
  border-color: #9ec8bf;
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-3) 100%);
  border-color: transparent;
  color: #fff;
}

.result-count {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.directory {
  display: grid;
  gap: 1rem;
}

.category-block {
  border: 1px solid #e6dccf;
  border-radius: 14px;
  background: #fff;
  padding: 0.92rem;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.78rem;
  padding-bottom: 0.52rem;
  border-bottom: 1px dashed #eadfce;
}

.category-head h2 {
  margin: 0;
  font-size: 1rem;
}

.category-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 0.72rem;
}

.tool-card {
  border: 1px solid #efe4d8;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #ffffff 0%, #fffdf9 100%),
    var(--surface-2);
  padding: 0.78rem;
  display: grid;
  gap: 0.48rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: #d4e9e1;
}

.tool-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 2.5em;
}

.tool-card__title {
  cursor: pointer;
  line-height: 1.35;
}

.tool-card__title:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  cursor: pointer;
  font: inherit;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-3) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
}

.btn:hover {
  filter: brightness(0.97);
}

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #d7dfdb;
  box-shadow: none;
}

input,
textarea,
select {
  width: 100%;
  font: inherit;
  border: 1px solid #d8ddd9;
  border-radius: 10px;
  padding: 0.64rem 0.74rem;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #9fc7be;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

textarea {
  min-height: 115px;
  resize: vertical;
}

.detail-head {
  margin-bottom: 0.95rem;
}

.detail-category {
  margin: 0.6rem 0 0.22rem;
  font-size: 0.83rem;
  color: #7c6a4b;
}

.detail-head h2 {
  margin: 0;
}

.detail-desc {
  margin: 0.32rem 0 0;
  color: var(--muted);
}

.tool-panel {
  border: 1px solid #dfd5c8;
  border-radius: 13px;
  background: #fff;
  padding: 0.96rem;
}

.tool-docs {
  margin-top: 0.9rem;
  border: 1px solid #dfd5c8;
  border-radius: 13px;
  background: #fff;
  padding: 0.96rem;
}

.tool-docs h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1rem;
}

.tool-docs p,
.tool-docs li {
  color: #253634;
  line-height: 1.6;
}

.tool-docs ol,
.tool-docs ul {
  margin: 0.3rem 0 0.7rem 1.1rem;
  padding: 0;
}

.tool-docs pre {
  margin: 0.3rem 0 0.7rem;
  background: #fffcf6;
  border: 1px dashed #d9ceb9;
  border-radius: 9px;
  padding: 0.55rem 0.62rem;
  white-space: pre-wrap;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.32rem 0;
}

.file-picker__name {
  font-size: 0.88rem;
  color: var(--muted);
  word-break: break-all;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
  margin-top: 0.6rem;
}

.result {
  margin-top: 0.68rem;
  border: 1px dashed #d9ceb9;
  border-radius: 9px;
  background: #fffcf6;
  min-height: 2.2rem;
  padding: 0.58rem 0.66rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 920px) {
  .hero__inner {
    padding: 1rem;
  }

  .hero__search {
    flex-wrap: wrap;
  }

  .hero__controls {
    width: 100%;
    justify-content: flex-start;
  }

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

  .tool-list {
    grid-template-columns: 1fr;
  }
}
