:root {
  color-scheme: light;
  --bg: #f7f8f7;
  --surface: #ffffff;
  --surface-soft: #edf3f1;
  --ink: #17211f;
  --muted: #61706c;
  --line: #d8e0dd;
  --brand: #12312f;
  --brand-2: #1f7a70;
  --accent: #f5b85b;
  --warning: #a85f1d;
  --danger: #b23b3b;
  --ok: #2f7d54;
  --shadow: 0 18px 46px rgba(18, 49, 47, 0.09);
  --radius: 8px;
  --radius-sm: 6px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(31, 122, 112, 0.35);
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: calc(100% - 32px);
  max-width: var(--shell);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.section-toolbar,
.panel-heading,
.search-row {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 72px;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img {
  border-radius: 10px;
}

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

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.top-nav {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-nav a {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
}

.top-nav a:hover {
  background: var(--surface-soft);
  color: var(--brand);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 20px;
  padding: 34px 0 22px;
}

.hero-panel,
.insight-panel,
.filter-panel,
.results-panel,
.compare-panel,
.submit-band {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-panel {
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  z-index: 0;
  width: 34%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(245, 184, 91, 0.14)),
    repeating-linear-gradient(135deg, rgba(18, 49, 47, 0.08) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.search-card {
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.search-card label,
.filter-label,
.submit-form label {
  color: var(--brand);
  font-weight: 700;
}

.search-row {
  gap: 10px;
}

.search-row input,
.submit-form input,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.search-row input {
  font-size: 1rem;
}

.primary-button,
.secondary-button,
.icon-button,
.quick-tasks button,
.segmented button,
.view-tabs button,
.tool-action,
.chip {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.primary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  background: var(--brand);
  color: white;
  padding: 0 18px;
  font-weight: 750;
}

.primary-button:hover {
  background: #0c2422;
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--brand);
  padding: 10px 13px;
  font-weight: 700;
}

.quick-tasks,
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tasks button,
.chip {
  background: var(--surface-soft);
  color: var(--brand);
  padding: 8px 10px;
  font-size: 0.88rem;
  white-space: normal;
}

.quick-tasks button:hover,
.chip:hover {
  border-color: rgba(31, 122, 112, 0.35);
}

.insight-panel {
  padding: 24px;
  align-self: stretch;
}

.metric-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.metric-strip span {
  display: grid;
  gap: 3px;
  min-height: 78px;
  align-content: center;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-strip strong {
  color: var(--brand);
  font-size: 1.65rem;
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  color: var(--muted);
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 20px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.tool-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  align-items: start;
  gap: 16px;
  padding: 14px 0 28px;
}

.filter-panel,
.results-panel,
.compare-panel {
  padding: 18px;
}

.filter-panel,
.compare-panel {
  position: sticky;
  top: 88px;
}

.panel-heading,
.section-toolbar {
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 1.2rem;
  line-height: 1;
}

.filter-group {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button,
.view-tabs button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
  padding: 8px 10px;
}

.segmented button.is-active,
.view-tabs button.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.switch-row,
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 600;
}

.switch-row input,
.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-2);
}

.results-panel {
  min-width: 0;
}

.view-tabs {
  display: flex;
  gap: 8px;
}

.active-filters {
  min-height: 36px;
  margin: 16px 0;
}

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

.tool-card {
  display: grid;
  gap: 14px;
  min-height: 288px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.tool-grid.compact .tool-card {
  min-height: auto;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.tool-grid.compact .tool-meta,
.tool-grid.compact .tool-summary,
.tool-grid.compact .tool-tags {
  display: none;
}

.tool-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tool-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--brand);
  font-weight: 850;
  border: 1px solid var(--line);
}

.tool-title {
  min-width: 0;
}

.tool-title h3 {
  margin-bottom: 3px;
}

.tool-title p,
.tool-summary,
.tool-meta,
.compare-empty,
.submit-band p,
.workflow-card p,
.category-card p {
  color: var(--muted);
}

.tool-summary {
  min-height: 48px;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag {
  background: var(--surface-soft);
  color: var(--brand);
}

.status-pill.ok {
  background: rgba(47, 125, 84, 0.12);
  color: var(--ok);
}

.status-pill.warn {
  background: rgba(245, 184, 91, 0.22);
  color: var(--warning);
}

.status-pill.danger {
  background: rgba(178, 59, 59, 0.12);
  color: var(--danger);
}

.tool-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.84rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tool-action {
  background: var(--surface);
  border-color: var(--line);
  color: var(--brand);
  padding: 8px 10px;
  font-weight: 750;
}

.tool-action:hover {
  background: var(--surface-soft);
}

.compare-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.compare-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-2);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.86rem;
}

.compare-table th,
.compare-table td {
  border-top: 1px solid var(--line);
  padding: 9px 0;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--brand);
  width: 34%;
}

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

.compare-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.category-band,
.workflow-band,
.submit-band {
  padding: 28px 0;
}

.category-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.category-card,
.workflow-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

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

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

.workflow-card {
  display: grid;
  gap: 12px;
  min-height: 230px;
}

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

.workflow-steps li {
  display: flex;
  gap: 8px;
  color: var(--muted);
}

.workflow-steps span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}

.submit-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 34px;
  padding: 24px;
}

.submit-form {
  display: grid;
  gap: 14px;
}

.submit-form label {
  display: grid;
  gap: 8px;
}

.submit-form .checkbox-line {
  display: flex;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--ok);
  font-weight: 700;
}

.empty-state {
  display: grid;
  place-items: start;
  gap: 10px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tool-dialog {
  width: min(760px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
}

.tool-dialog::backdrop {
  background: rgba(18, 33, 31, 0.42);
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.35rem;
}

.dialog-content {
  padding: 26px;
}

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

.fact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.fact strong {
  display: block;
  margin-top: 3px;
  color: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  min-height: 70px;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.88rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 1080px) {
  .tool-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .compare-panel {
    grid-column: 1 / -1;
    position: static;
  }

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

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 24px);
  }

  .header-inner {
    min-height: 66px;
  }

  .top-nav {
    display: none;
  }

  .workspace,
  .tool-layout,
  .submit-band {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(1.9rem, 10vw, 2.45rem);
    line-height: 1.08;
    max-width: 8.5em;
  }

  .lead {
    max-width: 18rem;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-panel::after {
    display: none;
  }

  .filter-panel {
    position: static;
  }

  .search-row {
    display: grid;
  }

  .search-row .primary-button {
    width: 100%;
  }

  .quick-tasks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-tasks button {
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .tool-grid,
  .category-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

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

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

  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
