:root {
  color-scheme: light;
  --ink: #151922;
  --muted: #647083;
  --line: #dce2e8;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --blue: #1769e0;
  --blue-dark: #0d4eaf;
  --green: #168454;
  --brown: #89573a;
  --red: #bd4148;
  --header-height: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 52px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
body.public-site { padding-top: var(--header-height); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: #fff;
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px #1118270a; }
.site-header-inner {
  width: min(1440px, 100%);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; }
.site-brand img { width: 54px; height: 36px; object-fit: contain; }
.site-brand span { display: grid; line-height: 1.05; }
.site-brand strong { font-size: 17px; }
.site-brand small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.site-nav-panel { flex: 1; display: flex; align-items: center; gap: 24px; }
.site-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }
.site-nav a {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #3e4858;
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.site-actions { display: flex; align-items: center; gap: 9px; }
.site-menu-button {
  display: none;
  flex-direction: column;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.site-menu-button span, .site-menu-button::before, .site-menu-button::after {
  width: 17px;
  height: 2px;
  display: block;
  background: currentColor;
  content: "";
}
.site-menu-button span { margin: 4px 0; }

.site-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #263142;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.site-button:hover { border-color: #9aa7b7; background: var(--soft); }
.site-button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.site-button.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.site-button.green { border-color: var(--green); background: var(--green); color: #fff; }
.site-button.compact { min-height: 38px; padding: 0 13px; }

.public-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 108px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #171b20 url("/assets/hero/shenji-workspace-v2.jpg") center / cover no-repeat;
  color: #fff;
}
.public-hero::before { position: absolute; inset: 0; background: #07101a61; content: ""; }
.public-hero-content { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow { margin-bottom: 16px; color: #a8d9c0; font-size: 13px; font-weight: 800; }
.public-hero h1 { max-width: 800px; margin: 0; font-size: clamp(48px, 7vw, 84px); line-height: 1; }
.public-hero p { max-width: 560px; margin: 24px 0 0; color: #e2e8f0; font-size: 19px; line-height: 1.8; text-shadow: 0 1px 8px #000; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .site-button:not(.primary) { border-color: #ffffff61; background: #ffffff14; color: #fff; }
.hero-facts { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 12px 28px; color: #cbd5e1; font-size: 13px; }
.hero-facts span::before { color: #65d395; content: "●"; margin-right: 8px; }

.page-hero { padding: 78px 24px 62px; border-bottom: 1px solid var(--line); background: var(--soft); }
.page-hero-inner, .section-inner, .legal-inner { width: min(1180px, 100%); margin: 0 auto; }
.page-kicker { margin-bottom: 12px; color: var(--blue); font-size: 13px; font-weight: 800; }
.page-hero h1 { margin: 0; max-width: 850px; font-size: clamp(36px, 5vw, 58px); line-height: 1.1; }
.page-hero p { max-width: 760px; margin: 20px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.page-hero .hero-actions .site-button:not(.primary) { border-color: var(--line); background: #fff; color: var(--ink); }

.section-nav {
  position: sticky;
  z-index: 70;
  top: var(--header-height);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: #fffffff2;
  backdrop-filter: blur(14px);
}
.section-nav a { padding: 10px 14px; color: var(--muted); font-size: 13px; }
.section-nav a:hover { color: var(--blue); }

.site-section { padding: 78px 24px; }
.site-section.soft { background: var(--soft); }
.section-head { margin-bottom: 38px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-head h2 { margin: 0; max-width: 680px; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.section-head p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.75; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.capability-grid article { min-height: 180px; padding: 28px 28px 30px 0; border-bottom: 1px solid var(--line); }
.capability-grid article:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.capability-grid h3 { margin: 0 0 12px; font-size: 19px; }
.capability-grid p { margin: 0; color: var(--muted); line-height: 1.75; }
.tone-blue { color: var(--blue); }
.tone-green { color: var(--green); }
.tone-brown { color: var(--brown); }
.tone-red { color: var(--red); }

.showcase { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 24px; align-items: stretch; }
.showcase figure, .screenshot-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.showcase img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; object-position: top left; }
.showcase-copy { padding: 34px; background: #161c25; color: #fff; }
.showcase-copy h3 { margin: 0 0 16px; font-size: 28px; }
.showcase-copy p { color: #cbd5e1; line-height: 1.8; }
.showcase-copy ul { margin: 28px 0 0; padding: 0; list-style: none; }
.showcase-copy li { padding: 13px 0; border-top: 1px solid #ffffff24; color: #e2e8f0; }
.screenshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.screenshot-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.screenshot-grid figcaption { padding: 15px 17px; color: var(--muted); font-size: 13px; }

.template-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.template-strip a { min-height: 120px; padding: 22px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.template-strip a:nth-child(4n) { border-right: 0; }
.template-strip strong { display: block; margin-bottom: 8px; }
.template-strip span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.data-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.data-flow article { position: relative; padding: 24px; border-left: 4px solid var(--blue); background: #fff; }
.data-flow article:nth-child(2) { border-color: var(--green); }
.data-flow article:nth-child(3) { border-color: var(--brown); }
.data-flow article:nth-child(4) { border-color: var(--red); }
.data-flow strong { display: block; margin-bottom: 9px; }
.data-flow p { margin: 0; color: var(--muted); line-height: 1.65; }

.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.download-card { padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.download-card header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.download-card h2 { margin: 0; font-size: 25px; }
.platform-label { color: var(--blue); font-weight: 800; font-size: 13px; }
.download-card p { color: var(--muted); line-height: 1.7; }
.download-meta { margin: 24px 0; border-top: 1px solid var(--line); }
.download-meta div { padding: 12px 0; display: grid; grid-template-columns: 95px minmax(0, 1fr); border-bottom: 1px solid var(--line); font-size: 13px; }
.download-meta dt { color: var(--muted); }
.download-meta dd { margin: 0; overflow-wrap: anywhere; }

.legal-page { padding: 64px 24px 90px; }
.legal-inner { max-width: 860px; }
.legal-inner h1 { margin: 0 0 28px; font-size: 40px; }
.legal-inner h2 { margin: 40px 0 12px; font-size: 23px; }
.legal-inner h3 { margin: 30px 0 10px; font-size: 18px; }
.legal-inner p, .legal-inner li { color: #4f5b6c; line-height: 1.9; }
.legal-inner a { color: var(--blue); }
.contact-list { border-top: 1px solid var(--line); }
.contact-list article { padding: 22px 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.contact-list h2 { margin: 0; font-size: 18px; }
.contact-list p { margin: 0; }

.site-cta { padding: 54px 24px; background: #151b24; color: #fff; }
.site-cta-inner { width: min(1180px, 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-cta h2 { margin: 0 0 9px; font-size: 29px; }
.site-cta p { margin: 0; color: #cbd5e1; }
.site-footer { padding: 34px 24px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.site-footer-inner { width: min(1180px, 100%); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-registration { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; }
.site-registration a { white-space: nowrap; }
.site-footer a:hover { color: var(--blue); }

@media (max-width: 1080px) {
  .site-header-inner { padding: 0 18px; gap: 16px; }
  .site-nav a { padding: 0 8px; }
  .site-actions .account-action { display: none; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid article:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .capability-grid article:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .template-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .template-strip a:nth-child(4n) { border-right: 1px solid var(--line); }
  .template-strip a:nth-child(3n) { border-right: 0; }
}

@media (max-width: 900px) {
  .site-menu-button { display: inline-flex; margin-left: auto; }
  .site-nav-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    padding: 14px 18px 20px;
    display: none;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 35px #1118271f;
  }
  .site-header.menu-open .site-nav-panel { display: grid; }
  .site-nav { display: grid; justify-content: stretch; }
  .site-nav a { justify-content: flex-start; border-bottom: 0; }
  .site-nav a[aria-current="page"] { border-left: 3px solid var(--blue); }
  .site-actions { margin-top: 8px; }
  .site-actions .account-action { display: inline-flex; }
  .site-actions .site-button { flex: 1; }
  .section-head { align-items: start; flex-direction: column; }
  .showcase { grid-template-columns: 1fr; }
  .data-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --header-height: 60px; }
  .site-header-inner { min-height: var(--header-height); padding: 0 14px; }
  .site-brand img { width: 46px; height: 30px; }
  .site-brand strong { font-size: 15px; }
  .site-brand small { display: none; }
  .site-section { padding: 58px 18px; }
  .public-hero { min-height: calc(100vh - 118px); }
  .public-hero { background-position: 26% center; }
  .public-hero::before { background: #07101a73; }
  .public-hero-content { width: calc(100% - 36px); }
  .public-hero h1 { font-size: 48px; }
  .public-hero p, .page-hero p { font-size: 16px; }
  .page-hero { padding: 58px 18px 48px; }
  .section-nav { justify-content: flex-start; overflow-x: auto; }
  .section-nav a { white-space: nowrap; }
  .capability-grid, .screenshot-grid, .download-grid, .data-flow { grid-template-columns: 1fr; }
  .capability-grid article, .capability-grid article:nth-child(even) { min-height: auto; padding: 24px 0; border-left: 0; }
  .template-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-strip a:nth-child(3n) { border-right: 1px solid var(--line); }
  .template-strip a:nth-child(even) { border-right: 0; }
  .showcase img { min-height: 240px; }
  .showcase-copy { padding: 26px; }
  .site-cta-inner { align-items: flex-start; flex-direction: column; }
  .contact-list article { grid-template-columns: 1fr; gap: 8px; }
  .site-footer-inner { align-items: flex-start; flex-direction: column; }
  .site-registration { justify-content: flex-start; }
}
