:root {
  --ink: #14213d;
  --ink-2: #22314a;
  --muted: #627086;
  --line: #dfe8f0;
  --panel: #ffffff;
  --soft: #f5f8fb;
  --green: #28b98f;
  --green-dark: #118263;
  --blue: #1073d6;
  --amber: #f3a12b;
  --amber-dark: #8b5009;
  --shadow: 0 24px 70px rgba(20, 33, 61, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(40, 185, 143, .13), transparent 26%),
    radial-gradient(circle at 88% 7%, rgba(16, 115, 214, .13), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fb 48%, #ffffff 100%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(223, 232, 240, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 35px rgba(20, 33, 61, .08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.tool-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.brand-mark {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

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

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

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--ink);
  background: var(--soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.partner-strip,
.hero,
.idea-section,
.section,
.split-section,
.contact-band {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.partner-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border: 2px solid rgba(243, 161, 43, .72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 236, .96), rgba(255, 255, 255, .94) 58%, rgba(234, 247, 255, .92)),
    #fff;
  box-shadow: 0 18px 46px rgba(139, 80, 9, .15);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f5a623, #ef6c00);
  font-size: 13px;
  font-weight: 900;
}

.ad-loop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ad-loop span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #ef6c00, #f5a623);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
}

.ad-loop span:nth-child(2) {
  background: linear-gradient(135deg, var(--ink), var(--blue));
}

.ad-loop span:nth-child(3) {
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
}

.partner-strip p {
  max-width: 860px;
  margin: 0;
  color: #51401f;
  line-height: 1.6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 510px;
  align-items: center;
  gap: 48px;
  padding: 40px 0 54px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-weight: 900;
  letter-spacing: 0;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(40px, 5.7vw, 68px);
  line-height: 1.14;
  letter-spacing: 0;
}

h1 span {
  color: var(--green-dark);
}

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

h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.lead {
  max-width: 670px;
  color: #33445c;
  font-size: 19px;
  line-height: 1.74;
}

.hero-actions,
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.button.primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 28px rgba(20, 33, 61, .22);
}

.button.primary:hover {
  background: #0d172c;
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
}

.button.amber {
  min-width: 150px;
  color: #fff;
  background: linear-gradient(135deg, #ef6c00, var(--amber));
  box-shadow: 0 14px 28px rgba(239, 108, 0, .22);
}

.metrics {
  margin-top: 26px;
}

.metrics span {
  min-width: 112px;
  padding: 12px 14px;
  border: 1px solid rgba(223, 232, 240, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
}

.metrics b,
.metrics small {
  display: block;
}

.metrics b {
  font-size: 24px;
}

.metrics small {
  color: var(--muted);
  font-weight: 700;
}

.hero-visual {
  padding: 10px;
  border: 1px solid rgba(223, 232, 240, .95);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.idea-section,
.split-section,
.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: center;
  margin-top: 24px;
  padding: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.idea-section .eyebrow,
.split-section .eyebrow,
.contact-band .eyebrow {
  color: #8ee6ca;
}

.idea-section p,
.split-section p,
.contact-band p {
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  line-height: 1.76;
}

.idea-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.idea-card label {
  display: grid;
  gap: 8px;
}

.idea-card span {
  font-weight: 900;
}

.idea-card input,
.idea-card textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  outline: none;
  resize: vertical;
}

.idea-card input::placeholder,
.idea-card textarea::placeholder {
  color: rgba(255, 255, 255, .52);
}

.section {
  padding: 70px 0 24px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

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

.tool-card,
.ad-card {
  min-height: 270px;
  padding: 24px;
  border: 1px solid rgba(223, 232, 240, .95);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 14px 40px rgba(20, 33, 61, .08);
}

.tool-card.featured {
  border-color: rgba(40, 185, 143, .36);
  background: linear-gradient(180deg, #ffffff, #effaf6);
}

.tool-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e7f8f2;
  font-size: 12px;
  font-weight: 900;
}

.status.online {
  color: var(--amber-dark);
  background: #fff3dd;
}

.tool-card p,
.ad-card p {
  color: var(--muted);
  line-height: 1.68;
}

.text-link {
  color: var(--blue);
  font-weight: 900;
}

.process-list {
  display: grid;
  gap: 10px;
}

.process-list span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  font-weight: 900;
}

.process-list b {
  color: #8ee6ca;
}

.ad-section {
  padding-top: 58px;
}

.ad-card {
  min-height: 220px;
}

.ad-card span {
  color: var(--green-dark);
  font-weight: 900;
}

.ad-card.premium {
  color: #fff;
  background: linear-gradient(135deg, var(--ink), #1d5f8c);
}

.ad-card.premium span,
.ad-card.premium p {
  color: rgba(255, 255, 255, .78);
}

.contact-band {
  margin-top: 54px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #102038, #166d66);
}

.contact-band a {
  color: #fff;
  font-weight: 900;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 940px) {
  .menu-button {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 76px 16px auto 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  body.nav-open .nav {
    display: grid;
  }

  .nav a {
    padding: 12px;
  }

  .partner-strip,
  .hero,
  .idea-section,
  .split-section,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 26px;
    padding-top: 34px;
  }

  .hero-visual {
    order: -1;
  }

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

@media (max-width: 640px) {
  .site-header,
  .partner-strip,
  .hero,
  .idea-section,
  .section,
  .split-section,
  .contact-band,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .partner-strip,
  .idea-section,
  .split-section,
  .contact-band {
    padding: 20px;
  }

  h1 {
    font-size: 38px;
  }

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

  .button {
    width: 100%;
  }

  .metrics span {
    flex: 1 1 96px;
  }

  .footer {
    display: grid;
  }
}

.tool-shell,
.pi-app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid rgba(223, 232, 240, .95);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.tool-hero.compact h1,
.tool-hero h1 {
  max-width: none;
  margin-bottom: 16px;
  font-size: clamp(34px, 4.2vw, 54px);
}

.release-panel,
.input-panel,
.result-board,
.copy-panel,
.ai-fill-panel,
.pi-form,
.pi-preview-shell,
.detail-card,
.download-section,
.ad-strip {
  border: 1px solid rgba(223, 232, 240, .95);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 44px rgba(20, 33, 61, .08);
}

.release-panel {
  padding: 22px;
}

.quote-strip {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), #176c67);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.55;
}

.quote-strip p {
  margin: 0;
}

.calculator-grid,
.pi-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
  gap: 18px;
  align-items: start;
}

.calculator-grid > *,
.pi-workbench > *,
.tool-hero > *,
.ai-fill-panel > *,
.item-row > *,
.field,
.field input,
.field select,
.field textarea {
  min-width: 0;
}

.input-panel,
.result-board,
.copy-panel,
.pi-form,
.pi-preview-shell {
  padding: 22px;
}

.panel-title,
.section-title-row,
.preview-toolbar,
.preview-actions,
.tool-actions,
.ai-fill-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea,
.ai-fill-box textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field textarea,
.ai-fill-box textarea {
  resize: vertical;
  line-height: 1.5;
}

.span-2 {
  grid-column: 1 / -1;
}

.risk-badge {
  min-height: 82px;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
}

.risk-badge.danger {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
}

.risk-badge.warn {
  background: linear-gradient(135deg, #f59e0b, #92400e);
}

.risk-badge strong,
.risk-badge span {
  display: block;
}

.risk-badge strong {
  font-size: 22px;
}

.risk-badge span {
  margin-top: 6px;
  line-height: 1.55;
}

.price-cards,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.price-card,
.metric-grid span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.price-card small,
.metric-grid small {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.price-card b,
.metric-grid b {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.price-card em {
  display: block;
  margin-top: 6px;
  color: #48627d;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.cost-list {
  display: grid;
  gap: 8px;
}

.cost-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
}

.mode-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.mode-tabs button.active {
  color: #fff;
  background: var(--ink);
}

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

.bilingual-copy pre {
  min-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink-2);
  line-height: 1.6;
}

.copy-panel,
.ai-fill-panel,
.detail-grid,
.download-section,
.ad-strip {
  margin-top: 22px;
}

.ai-fill-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 20px;
  padding: 24px;
}

.ai-fill-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.ai-fill-box {
  display: grid;
  gap: 12px;
}

.form-section + .form-section {
  margin-top: 20px;
}

.item-list {
  display: grid;
  gap: 12px;
}

.item-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .62fr .72fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.pi-preview-shell {
  position: sticky;
  top: 96px;
}

.pi-paper {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  overflow: auto;
  max-width: 100%;
}

.pi-paper table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-size: 12px;
}

.pi-paper th,
.pi-paper td {
  border: 1px solid #cbd5e1;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.pi-paper th {
  background: #eff6ff;
}

.pi-doc-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
}

.pi-doc-hero h2 {
  margin: 0;
  font-size: 26px;
}

.pi-product-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.grand-total th,
.grand-total td {
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.pi-signature {
  margin-top: 34px;
  text-align: right;
}

.captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 20, 38, .56);
}

.captcha-dialog,
.records-dialog {
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid rgba(223, 232, 240, .95);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.records-dialog {
  width: min(640px, 100%);
}

.captcha-close {
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
}

.captcha-question {
  margin: 12px 0;
  padding: 16px;
  border-radius: 8px;
  background: #f8fbff;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.captcha-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.captcha-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.captcha-error {
  display: block;
  min-height: 22px;
  margin-top: 8px;
  color: #dc2626;
  font-weight: 900;
}

.record-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.record-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.record-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.detail-card,
.download-section,
.ad-strip {
  padding: 24px;
}

.detail-card.wide {
  grid-column: 1 / -1;
}

.detail-card p,
.detail-card li,
.download-section p,
.ad-strip p {
  color: var(--muted);
  line-height: 1.7;
}

.download-section,
.ad-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.ad-strip {
  border-color: rgba(243, 161, 43, .45);
  background: linear-gradient(135deg, #fff8ec, #fff);
}

.ad-tag {
  color: var(--amber-dark);
  font-weight: 900;
}

.disabled-link,
button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .tool-hero,
  .calculator-grid,
  .pi-workbench,
  .ai-fill-panel {
    grid-template-columns: 1fr;
  }

  .pi-preview-shell {
    position: static;
  }

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

@media (max-width: 700px) {
  .tool-shell,
  .pi-app {
    width: min(100% - 24px, 1180px);
  }

  .tool-hero,
  .input-panel,
  .result-board,
  .copy-panel,
  .ai-fill-panel,
  .pi-form,
  .pi-preview-shell,
  .detail-card,
  .download-section,
  .ad-strip {
    padding: 18px;
  }

  .field-grid,
  .price-cards,
  .metric-grid,
  .bilingual-copy,
  .detail-grid,
  .item-row {
    grid-template-columns: 1fr;
  }

  .span-2,
  .detail-card.wide {
    grid-column: auto;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .tool-hero,
  .ai-fill-panel,
  .pi-form,
  .preview-toolbar,
  .footer {
    display: none !important;
  }

  .pi-app,
  .pi-workbench,
  .pi-preview-shell,
  .pi-paper {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
