:root {
  --ink: #172033;
  --muted: #697586;
  --line: #e4e9f2;
  --soft: #f6f9fc;
  --panel: #ffffff;
  --blue: #246bfe;
  --blue-dark: #1747b8;
  --teal: #13a89e;
  --amber: #f5a623;
  --rose: #ef5c72;
  --red: #dc3545;
  --shadow: 0 18px 45px rgba(35, 52, 84, .12);
  --shadow-soft: 0 10px 28px rgba(35, 52, 84, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  background:
    linear-gradient(180deg, #eef5ff 0, #fbfdff 420px, #f8fbff 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(228, 233, 242, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(20, 35, 60, .05);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 22px rgba(36, 107, 254, .24);
}
.site-nav { display: flex; gap: 8px; color: var(--muted); font-weight: 800; }
.site-nav a { padding: 8px 13px; border-radius: 8px; }
.site-nav a:hover { color: var(--blue); background: #eef5ff; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0 34px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}
.hero-text { max-width: 660px; margin: 20px 0 0; color: var(--muted); font-size: 18px; }
.hero-actions, .calculator-toolbar, .sticky-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(35, 52, 84, .06);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(35, 52, 84, .10); }
.button.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.button.ghost { background: rgba(255, 255, 255, .84); }
.button.danger { color: var(--red); background: #fff6f7; border-color: #ffd7dc; }

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(246,250,255,.90)),
    linear-gradient(135deg, rgba(36,107,254,.16), rgba(19,168,158,.12));
  box-shadow: var(--shadow);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--amber), var(--rose));
}
.hero-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.hero-panel-head span { color: var(--muted); font-weight: 800; }
.hero-panel-head strong { color: var(--blue); font-size: clamp(42px, 5vw, 58px); line-height: 1; }
.signal-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 170px;
  margin: 28px 0 20px;
  align-items: end;
}
.signal-board div { display: grid; gap: 9px; align-items: end; height: 100%; }
.signal-board span {
  display: block;
  min-height: 28px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
  box-shadow: 0 10px 20px rgba(36, 107, 254, .18);
}
.signal-board div:nth-child(2) span { background: linear-gradient(180deg, var(--blue), var(--blue-dark)); }
.signal-board div:nth-child(3) span { background: linear-gradient(180deg, var(--amber), #f0782f); }
.signal-board div:nth-child(4) span { background: linear-gradient(180deg, var(--rose), var(--blue)); }
.signal-board small { color: var(--muted); text-align: center; font-weight: 800; }
.hero-panel p { margin: 0; color: var(--muted); }

.section-heading { max-width: 780px; margin-bottom: 24px; }
.section-heading.centered { margin-right: auto; margin-left: auto; text-align: center; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.18; letter-spacing: 0; }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.calculator-shell, .feature-section, .content-band, .page-wrap, .article-layout {
  width: min(1220px, calc(100% - 36px));
  margin: 42px auto;
}
.calculator-shell {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(228, 233, 242, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
.calculator-shell .section-heading { margin-bottom: 10px; }

.sku-table { margin-top: 20px; overflow-x: auto; border-radius: 8px; border: 1px solid var(--line); }
.sku-head, .sku-row { display: grid; grid-template-columns: 1fr .9fr .9fr .9fr .9fr 1fr 86px; gap: 1px; min-width: 880px; background: var(--line); }
.sku-head span { padding: 14px 13px; background: #f3f7fd; color: var(--muted); font-weight: 900; text-align: center; }
.sku-row label, .sku-row .result { display: grid; gap: 6px; padding: 13px; background: #fff; }
.sku-row label span, .result span { display: none; color: var(--muted); font-size: 12px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(36, 107, 254, .15); border-color: var(--blue); }
.result strong { color: var(--blue); font-size: 18px; }
.result.good strong { color: var(--teal); }
.result.bad strong { color: var(--red); }
.delete-sku { border: 0; background: #fff6f7; color: var(--red); font-weight: 900; cursor: pointer; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.summary-strip div {
  padding: 18px;
  border: 1px solid #eaf0f7;
  border-radius: 8px;
  background: linear-gradient(145deg, #f8fbff, #fff);
}
.summary-strip span { display: block; color: var(--muted); font-weight: 800; }
.summary-strip strong { display: block; margin-top: 5px; color: var(--blue); font-size: 30px; line-height: 1; }

.feature-section {
  padding: clamp(26px, 5vw, 56px) 0;
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article {
  min-height: 260px;
  padding: 32px 26px;
  border: 1px solid rgba(228, 233, 242, .9);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-grid article:hover { transform: translateY(-4px); border-color: rgba(36, 107, 254, .32); box-shadow: var(--shadow); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  border-radius: 50%;
  color: var(--blue);
  background: #eaf2ff;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(36, 107, 254, .08);
}
.feature-grid article:nth-child(2) .feature-icon { color: var(--teal); background: #e8f7f5; }
.feature-grid article:nth-child(3) .feature-icon { color: var(--amber); background: #fff6df; }
.feature-grid article:nth-child(4) .feature-icon { color: var(--teal); background: #e5f8fc; }
.feature-grid article:nth-child(5) .feature-icon { color: var(--rose); background: #fff0f3; }
.feature-grid article:nth-child(6) .feature-icon { color: #6f42c1; background: #f1eaff; }
.feature-grid h3 { margin: 0 0 9px; font-size: 22px; line-height: 1.35; }
.feature-grid p, .article-card p, .article-meta, .breadcrumb, .site-footer { color: var(--muted); }

.content-band {
  padding: clamp(24px, 4vw, 38px);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,247,255,.82));
  border: 1px solid var(--line);
}
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card {
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card img { width: calc(100% + 44px); height: 160px; object-fit: cover; margin: -22px -22px 18px; }
.article-card span { color: var(--teal); font-size: 13px; font-weight: 900; }
.article-card h2, .article-card h3 { margin: 8px 0; line-height: 1.35; }

.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 16px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.category-pills a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-weight: 800; }
.category-pills a:hover { color: var(--blue); border-color: rgba(36, 107, 254, .28); background: #f2f7ff; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.article-page { max-width: 840px; margin: 0 auto; }
.article-page h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 54px); line-height: 1.12; letter-spacing: 0; }
.article-meta { display: flex; gap: 16px; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 8px; margin: 26px 0; }
.article-content {
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 18px;
}
.article-content h2 { margin-top: 34px; font-size: 28px; }
.article-content img { border-radius: 8px; margin: 22px 0; }
.related { max-width: 840px; margin: 28px auto; }
.related-list { display: grid; gap: 10px; }
.related-list a { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; }
.empty-state { text-align: center; padding: 80px 18px; }
.site-footer { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 36px 18px; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 900px) {
  .hero, .feature-grid, .article-grid { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-nav { width: 100%; justify-content: space-between; }
  .sku-head { display: none; }
  .sku-table { border: 0; overflow: visible; }
  .sku-row { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
  .sku-row label span, .result span { display: block; }
  .delete-sku { min-height: 48px; grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-header { padding: 12px 16px; }
  .site-nav { gap: 6px; }
  .site-nav a { padding: 7px 9px; }
  .hero { width: min(100% - 28px, 1220px); padding-top: 30px; }
  .hero-panel { padding: 22px; }
  .hero-panel-head { display: grid; }
  .signal-board { height: 132px; }
  .calculator-shell, .feature-section, .content-band, .page-wrap, .article-layout { width: min(100% - 28px, 1220px); margin: 28px auto; }
  .summary-strip, .sku-row, .search-row { grid-template-columns: 1fr; }
  .calculator-toolbar .button, .hero-actions .button { width: 100%; }
  .feature-grid article { min-height: auto; padding: 28px 20px; }
}
