:root {
  color-scheme: dark;
  --bg: #080b13;
  --panel: #0f1628;
  --panel-2: #121b31;
  --text: #eef4ff;
  --muted: #a9b7d2;
  --line: rgba(255, 255, 255, 0.13);
  --cyan: #39d4ff;
  --blue: #5d8cff;
  --purple: #a36bff;
  --green: #54e7a3;
  --yellow: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(93, 140, 255, 0.42), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(163, 107, 255, 0.26), transparent 32%),
    linear-gradient(180deg, #080b13, #0b1020 48%, #080b13);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(57, 212, 255, 0.48);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 28px 20px 64px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.04em; }
.logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #07101f; font-weight: 900; box-shadow: 0 0 40px rgba(57, 212, 255, 0.32); }
.navlinks { display: flex; flex-wrap: wrap; gap: 6px; }
.navlinks a { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.navlinks a:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }

.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.8fr); gap: 22px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34); backdrop-filter: blur(14px); }
.heroText { padding: clamp(28px, 5vw, 46px); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(57, 212, 255, 0.32); border-radius: 999px; background: rgba(57, 212, 255, 0.08); color: #c9f5ff; font-size: 13px; }
.hero h1 { margin: 20px 0 16px; font-size: clamp(40px, 5.2vw, 62px); line-height: 0.98; letter-spacing: -0.065em; text-wrap: balance; }
.hero p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-weight: 700; cursor: pointer; }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #06111f; }
.btn.secondary { background: rgba(255, 255, 255, 0.06); }
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.07); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.heroCard { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.metric { flex: 1; min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8, 11, 19, 0.55); }
.metric b { display: block; font-size: 34px; }
.metric span { color: var(--muted); font-size: 13px; }
.metric:nth-child(1) b { color: var(--green); }
.metric:nth-child(2) b { color: var(--cyan); }
.metric:nth-child(3) b { color: var(--yellow); }

section { scroll-margin-top: 20px; margin-top: 38px; }
.sectionTitle { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sectionTitle h2 { margin: 0; font-size: 29px; letter-spacing: -0.04em; }
.sectionTitle p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.65; }
.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; min-height: 176px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.045); }
.step::before { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--purple)); content: ""; }
.step small { color: var(--cyan); font-weight: 800; }
.step h3 { margin: 10px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.62; }

.tool-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.35fr) auto; gap: 12px; align-items: end; margin-bottom: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.035); }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 11, 19, 0.72); color: var(--text); }
.field input::placeholder { color: #7585a3; }
.clear-filter { white-space: nowrap; }
.result-summary { min-height: 24px; margin: 10px 2px 14px; color: var(--muted); font-size: 13px; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tools.is-empty { grid-template-columns: 1fr; }
.tool { min-height: 310px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); content-visibility: auto; contain-intrinsic-size: auto 310px; }
.toolTop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tool h3 { margin: 0; font-size: 20px; }
.num { color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.045); color: #d8e1f5; font-size: 12px; overflow-wrap: anywhere; }
.tag.free { border-color: rgba(84, 231, 163, 0.35); background: rgba(84, 231, 163, 0.08); color: #bcffd9; }
.tool p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.62; }
.tool ul { margin: 0 0 14px; padding-left: 18px; color: #d4def1; font-size: 14px; line-height: 1.62; }
.tool .open { min-height: 42px; display: grid; place-items: center; margin-top: auto; padding: 9px 12px; border: 1px solid rgba(57, 212, 255, 0.25); border-radius: 13px; background: rgba(57, 212, 255, 0.09); color: #dff8ff; font-size: 14px; font-weight: 700; }
.tool .open:hover { border-color: rgba(57, 212, 255, 0.55); background: rgba(57, 212, 255, 0.16); }
.tool .open[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; }
.empty-state { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; line-height: 1.7; }
.empty-state a { color: var(--cyan); text-decoration: underline; }

.matrix { padding: clamp(20px, 3vw, 28px); }
.matrix-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.matrix-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8, 11, 19, 0.5); }
.matrix-grid h3 { margin: 0 0 9px; font-size: 15px; }
.matrix-grid p { margin: 0; color: #d8e5ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.footer { margin-top: 38px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .heroCard { display: grid; grid-template-columns: repeat(3, 1fr); }
  .workflow, .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .wrap { padding: 20px 14px 48px; }
  .nav { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .navlinks { margin-left: -8px; }
  .sectionTitle { align-items: flex-start; flex-direction: column; }
  .tool-controls { grid-template-columns: 1fr; }
  .clear-filter { width: 100%; }
}

@media (max-width: 560px) {
  .heroCard, .workflow, .tools { grid-template-columns: 1fr; }
  .panel { border-radius: 22px; }
  .hero h1 { font-size: 40px; }
  .metric { min-height: auto; }
}

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