:root {
  --ink: #101827;
  --text: #27354a;
  --muted: #66758a;
  --line: rgba(118, 138, 158, 0.2);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --teal: #0f8a7c;
  --teal-deep: #0b645f;
  --navy: #143449;
  --blue: #426ad8;
  --amber: #d69a2d;
  --danger: #bc4a3c;
  --shadow-sm: 0 12px 32px rgba(19, 36, 53, 0.08);
  --shadow-md: 0 24px 70px rgba(19, 36, 53, 0.13);
  color: var(--text);
  background: #f6faf9;
  font-family: Inter, "SF Pro Display", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(227, 246, 241, 0.95), rgba(246, 249, 252, 0.96) 42%, rgba(248, 245, 236, 0.74)),
    #f6faf9;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(20, 52, 73, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 52, 73, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 70%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.tool-header,
.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 5vw, 70px);
}

.tool-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 251, 250, 0.86);
  border-bottom: 1px solid rgba(122, 144, 158, 0.14);
  backdrop-filter: blur(22px);
}

.brand,
.tool-nav,
.tool-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), #0d5360);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 47, 67, 0.2);
}

.tool-nav {
  gap: 18px;
  color: #40516a;
  font-size: 14px;
  font-weight: 760;
}

.tool-nav a {
  padding: 8px 0;
}

.tool-actions {
  gap: 10px;
}

.button,
.ghost-button,
.mini-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  box-shadow: 0 18px 42px rgba(15, 138, 124, 0.22);
}

.ghost-button,
.mini-button {
  color: #17243a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(122, 144, 158, 0.18);
  box-shadow: var(--shadow-sm);
}

.danger-button {
  color: #a73528;
  background: rgba(255, 238, 235, 0.94);
  border: 1px solid rgba(188, 74, 60, 0.16);
}

.mini-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.button:hover,
.ghost-button:hover,
.mini-button:hover,
.danger-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tool-shell,
.tools-hub {
  width: min(1280px, calc(100% - 36px));
  max-width: calc(100% - 36px);
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 18px;
  color: #607089;
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.breadcrumb a {
  color: var(--teal-deep);
}

.breadcrumb span:last-child {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.tool-hero,
.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(38px, 5vw, 72px) 0 30px;
}

.hub-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.74fr);
}

.tool-hero > *,
.hub-hero > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--teal);
  border-radius: 99px;
  box-shadow: 0 0 0 6px rgba(15, 138, 124, 0.1);
}

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

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 920;
  letter-spacing: 0;
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.hero-copy {
  max-width: 760px;
  min-width: 0;
  margin-bottom: 22px;
  color: #40516a;
  font-size: 18px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #0b645f;
  background: rgba(224, 248, 243, 0.86);
  border: 1px solid rgba(15, 138, 124, 0.16);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.preview-card,
.tool-panel,
.result-panel,
.hub-card,
.cta-panel,
.tool-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 246, 243, 0.78)),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.preview-card {
  min-height: 280px;
  padding: 24px;
}

.preview-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.preview-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.preview-bar {
  min-height: 18px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 138, 124, 0.16);
}

.hub-grid,
.tool-layout {
  display: grid;
  gap: 18px;
}

.hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 28px 0 60px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 26px;
}

.tool-card p {
  flex: 1;
  color: var(--muted);
  line-height: 1.76;
}

.tool-card .button {
  width: fit-content;
}

.tool-layout {
  grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr);
  min-width: 0;
  align-items: start;
  padding: 12px 0 70px;
}

.content-section {
  margin-bottom: 28px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(232, 246, 243, 0.7)),
    rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.compact-section {
  padding-bottom: 24px;
}

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

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

.seo-grid article,
.faq-card details {
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(118, 138, 158, 0.14);
  border-radius: 20px;
}

.seo-grid strong {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.seo-grid p,
.faq-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.72;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: 20px;
  align-items: start;
}

.faq-card {
  display: grid;
  gap: 12px;
}

.faq-card summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.5;
}

.faq-card p {
  margin-top: 10px;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #17384a;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(118, 138, 158, 0.16);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 780;
}

.tool-panel,
.result-panel,
.cta-panel {
  padding: 24px;
}

.sticky-result {
  position: sticky;
  top: 92px;
}

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

.field-grid .wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: #53657d;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  max-width: 100%;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(118, 138, 158, 0.22);
  border-radius: 15px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

textarea {
  min-height: 116px;
  padding-top: 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 138, 124, 0.44);
  box-shadow: 0 0 0 4px rgba(15, 138, 124, 0.1);
}

.task-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr);
  gap: 12px;
  align-items: end;
  padding: 14px 60px 14px 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(118, 138, 158, 0.14);
  border-radius: 18px;
}

.task-row label {
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #a73528;
  background: rgba(255, 238, 235, 0.9);
  border: 1px solid rgba(188, 74, 60, 0.16);
  border-radius: 13px;
  cursor: pointer;
}

.task-row .icon-button {
  position: absolute;
  right: 12px;
  bottom: 14px;
}

.panel-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

.metric {
  padding: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(118, 138, 158, 0.14);
  border-radius: 18px;
}

.metric strong {
  display: block;
  color: var(--teal-deep);
  font-size: 26px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gantt-output {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 16px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(118, 138, 158, 0.16);
  border-radius: 18px;
}

.gantt-line {
  display: grid;
  grid-template-columns: 150px minmax(420px, 1fr);
  gap: 12px;
  align-items: center;
}

.gantt-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.gantt-track {
  position: relative;
  height: 28px;
  background: rgba(118, 138, 158, 0.12);
  border-radius: 999px;
}

.gantt-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 18px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 999px;
}

.gantt-bar::after {
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  content: "";
  background: rgba(255, 255, 255, 0.34);
  border-radius: inherit;
}

.text-output {
  min-height: 260px;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  color: #1c2b42;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(118, 138, 158, 0.16);
  border-radius: 18px;
  line-height: 1.72;
}

.cta-panel {
  display: none;
  margin-top: 18px;
  border-color: rgba(15, 138, 124, 0.22);
}

.cta-panel.visible {
  display: block;
}

.cta-panel p {
  color: var(--muted);
  line-height: 1.72;
}

.tool-footer {
  align-items: flex-start;
  color: var(--muted);
  border-top: 1px solid rgba(122, 144, 158, 0.14);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links a {
  font-weight: 780;
}

@media (max-width: 1080px) {
  .tool-hero,
  .hub-hero,
  .tool-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .sticky-result {
    position: static;
  }

  .hub-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  main,
  section,
  article,
  aside,
  form,
  .tool-shell,
  .tools-hub,
  .tool-hero,
  .hub-hero,
  .tool-layout,
  .content-section,
  .preview-card,
  .tool-panel,
  .result-panel,
  .cta-panel,
  .tool-card {
    max-width: 100%;
    overflow-x: hidden;
  }

  .tool-shell,
  .tools-hub {
    width: calc(100vw - 72px);
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .tool-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  h1 {
    font-size: clamp(26px, 7vw, 28px);
    line-height: 1.16;
    word-break: break-word;
  }

  .hero-copy {
    width: 100%;
    max-width: min(100%, 290px);
    word-break: break-word;
    font-size: 16px;
  }

  .breadcrumb span:last-child {
    flex-basis: 100%;
  }

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

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

  .tool-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
