/* app/globals.css */
:root {
  --ink: #1b2821;
  --muted: #66736b;
  --cream: #f5f0e5;
  --paper: #fffdf8;
  --green: #0e684b;
  --green-deep: #0a4c38;
  --lime: #c5ef70;
  --line: #d9ddd4;
  --soft-green: #e7f1e9;
  --danger: #a33d31;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family:
    "Microsoft YaHei UI",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero-shell {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 80% 18%,
      rgba(197, 239, 112, 0.2),
      transparent 25%),
    linear-gradient(
      135deg,
      #103c30 0%,
      #0c563e 52%,
      #0c6448 100%);
  color: #f8f7ef;
}
.hero-shell::before,
.hero-shell::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}
.hero-shell::before {
  width: 520px;
  height: 520px;
  right: -180px;
  top: -250px;
}
.hero-shell::after {
  width: 340px;
  height: 340px;
  right: -80px;
  top: -160px;
}
.topbar,
.hero-grid,
.workspace-section,
.rules-section,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  background: var(--lime);
  color: var(--green-deep);
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(5, 39, 28, 0.22);
}
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}
.shield-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(197, 239, 112, 0.12);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(410px, 0.72fr);
  gap: 80px;
  align-items: center;
  padding: 82px 0 96px;
}
.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--lime);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}
.hero-copy h1 {
  max-width: 700px;
  margin: 22px 0 25px;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    sans-serif;
  font-size: clamp(48px, 5vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}
.hero-copy h1 span {
  color: var(--lime);
}
.hero-lead {
  max-width: 625px;
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 18px;
  line-height: 1.85;
}
.hero-proof {
  display: flex;
  gap: 34px;
  margin-top: 45px;
}
.hero-proof div {
  display: grid;
  gap: 5px;
}
.hero-proof strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}
.hero-proof span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}
.mapping-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px 28px 28px 8px;
  background: rgba(7, 45, 33, 0.62);
  box-shadow: 0 28px 80px rgba(4, 31, 22, 0.32);
  backdrop-filter: blur(12px);
}
.mapping-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}
.live-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(197, 239, 112, 0.13);
  color: var(--lime);
  font-weight: 700;
}
.flow-line {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 10px;
  align-items: center;
}
.flow-node {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  border-radius: 18px 18px 18px 5px;
}
.source-node {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.target-node {
  background: var(--lime);
  color: var(--green-deep);
}
.flow-node small {
  opacity: 0.64;
  font-size: 11px;
}
.flow-node b {
  font-size: 20px;
}
.flow-node span {
  overflow: hidden;
  opacity: 0.72;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-arrow {
  color: var(--lime);
  font-size: 24px;
  text-align: center;
}
.header-match {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.header-match span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-family: Consolas, monospace;
  font-size: 10px;
}
.header-match .match-score {
  margin-left: auto;
  border-color: rgba(197, 239, 112, 0.35);
  color: var(--lime);
}
.workspace-section {
  padding: 100px 0 110px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}
.section-kicker {
  color: var(--green);
}
.section-heading h2,
.result-top h2,
.rules-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}
.section-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.file-drop {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 26px;
  border: 1px dashed #aeb8ae;
  border-radius: 24px 24px 24px 7px;
  background: rgba(255, 253, 248, 0.66);
  transition: 180ms ease;
}
.file-drop:hover,
.file-drop.is-dragging {
  border-color: var(--green);
  background: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(31, 54, 40, 0.08);
}
.file-drop.has-file {
  border-style: solid;
  border-color: #a7c4ac;
  background: #f3f8ef;
}
.drop-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--soft-green);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.ready-dot {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.file-glyph {
  align-self: center;
  justify-self: center;
  width: 72px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 10px 20px 10px 10px;
  color: var(--green);
  font-size: 26px;
}
.file-glyph span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-green);
}
.drop-copy {
  text-align: center;
}
.drop-copy h3 {
  max-width: 440px;
  margin: 0 auto 8px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drop-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.ghost-button {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}
.run-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: 18px;
  padding: 28px;
  border-radius: 7px 24px 24px 24px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(31, 54, 40, 0.07);
}
.filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.filter-field label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
}
.filter-input-wrap {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  height: 58px;
  border: 1px solid #cfd6ce;
  border-radius: 12px;
  background: #fff;
  transition: 160ms ease;
}
.filter-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 104, 75, 0.09);
}
.filter-input-wrap > span {
  color: var(--green);
  font-size: 22px;
  text-align: right;
}
.filter-input-wrap input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 18px 0 12px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}
.filter-field > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}
.primary-button,
.download-button {
  border: 0;
  border-radius: 12px 12px 12px 4px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(14, 104, 75, 0.18);
}
.primary-button {
  min-width: 230px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  cursor: pointer;
  transition: 160ms ease;
}
.primary-button:hover:not(:disabled),
.download-button:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
}
.primary-button:disabled {
  background: #9ca9a0;
  box-shadow: none;
  cursor: not-allowed;
}
.primary-button b {
  color: var(--lime);
  font-size: 22px;
}
.progress-card,
.error-card {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 16px 16px 16px 5px;
  background: var(--paper);
}
.progress-copy {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.progress-copy span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--soft-green);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.progress-copy b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-copy em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9e1;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      var(--green),
      #74b64f,
      var(--lime));
  transition: width 250ms ease;
}
.error-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #ebc6bf;
  background: #fff4f0;
  color: var(--danger);
}
.error-card > span {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f4d9d3;
  font-weight: 900;
}
.error-card b {
  font-size: 13px;
}
.error-card p {
  margin: 4px 0 0;
  color: #865b53;
  font-size: 12px;
}
.result-card {
  margin-top: 26px;
  padding: 34px;
  border: 1px solid #bbd3be;
  border-radius: 28px 28px 28px 8px;
  background: #f4faef;
}
.result-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}
.success-seal {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--lime);
  font-size: 26px;
}
.result-top h2 {
  margin-top: 4px;
  font-size: 30px;
}
.result-top p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.download-button {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 17px 20px;
  transition: 160ms ease;
}
.download-button span {
  color: var(--lime);
  font-size: 20px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.sheet-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 17px;
  border: 1px solid #d8e4d5;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}
.sheet-icon {
  width: 36px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 5px 9px 5px 5px;
  background: var(--soft-green);
  color: var(--green);
  font-family: Consolas, monospace;
  font-weight: 900;
}
.sheet-result h3 {
  margin: 0;
  font-size: 14px;
}
.sheet-result p,
.sheet-result small {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.sheet-result small {
  display: block;
  overflow: hidden;
  max-width: 320px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-check {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.result-check.is-empty {
  color: #8a6a36;
}
.details-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #d6e2d3;
  color: var(--muted);
  font-size: 12px;
}
.details-note summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}
.details-note ul {
  max-height: 180px;
  overflow: auto;
  padding-left: 20px;
  line-height: 1.7;
}
.rules-section {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1fr);
  gap: 70px;
  align-items: start;
  padding: 80px 0 95px;
  border-top: 1px solid #d4d8cf;
}
.rules-copy p {
  max-width: 470px;
  color: var(--muted);
  line-height: 1.8;
}
.rule-list {
  display: grid;
  gap: 12px;
}
.rule-list > div {
  display: grid;
  grid-template-columns: 42px 150px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #d6dbd2;
}
.rule-list span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
}
.rule-list b {
  font-size: 14px;
}
.rule-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #d4d8cf;
  color: var(--muted);
}
.footer-brand {
  color: var(--ink);
}
footer p {
  font-size: 11px;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 55px;
  }
  .mapping-card {
    max-width: 650px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .rules-section {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .run-panel {
    grid-template-columns: 1fr;
  }
  .primary-button {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .topbar,
  .hero-grid,
  .workspace-section,
  .rules-section,
  footer {
    width: min(100% - 28px, 1180px);
  }
  .topbar {
    height: 72px;
  }
  .privacy-badge {
    padding: 8px 10px;
    font-size: 10px;
  }
  .hero-grid {
    padding: 64px 0 70px;
  }
  .hero-copy h1 {
    font-size: 44px;
  }
  .hero-lead {
    font-size: 15px;
  }
  .hero-proof {
    gap: 18px;
  }
  .flow-line {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
  .upload-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
  .filter-fields {
    grid-template-columns: 1fr;
  }
  .primary-button {
    width: 100%;
  }
  .result-top {
    grid-template-columns: auto 1fr;
  }
  .download-button {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .rule-list > div {
    grid-template-columns: 42px 1fr;
  }
  .rule-list p {
    grid-column: 2;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
