/* 智策官网 — single stylesheet, no framework.
   Brand colour is injected by build.py as --brand from brand/brand.yaml, so a
   brand change upstream moves here too. */

:root {
  --brand: #3D5A80;
  --brand-dark: #324A69;
  --brand-light: #E8EBF0;
  --brand-tint: #F3F5F7;

  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f0f1f3;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 12px;

  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.05), 0 1px 2px rgba(17, 24, 39, 0.03);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.07), 0 2px 6px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.1), 0 6px 18px rgba(17, 24, 39, 0.05);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.1em 0.42em;
  word-break: break-all;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.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;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius-md) 0;
}

.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.topbar.is-stuck {
  border-bottom-color: var(--line-soft);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brandmark img {
  width: 140px;
  height: auto;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle:hover {
  background: var(--bg-soft);
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.bars {
  position: relative;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.bars::before {
  top: -7px;
}

.bars::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] .bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .bars::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 72px 0 auto;
  z-index: 49;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md);
  animation: drop 0.18s ease;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.menu-panel {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px 20px;
}

.menu-panel a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 4px;
  color: var(--ink);
  font-size: 17px;
  border-bottom: 1px solid var(--line-soft);
}

.menu-panel a:last-child {
  border-bottom: 0;
  color: var(--ink-3);
}

.menu-panel a:hover {
  color: var(--brand);
  text-decoration: none;
}

.ext {
  width: 15px;
  height: 15px;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 72px 0 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -240px 0 auto;
  height: 720px;
  background:
    radial-gradient(
      46% 52% at 50% 46%,
      color-mix(in srgb, var(--brand) 16%, transparent) 0%,
      transparent 72%
    ),
    radial-gradient(
      30% 40% at 78% 30%,
      color-mix(in srgb, var(--brand) 9%, transparent) 0%,
      transparent 70%
    );
  filter: blur(6px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 14px;
}

.pill svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.pill:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--brand);
}

.hero h1 {
  margin: 26px auto 0;
  max-width: 17ch;
  font-size: clamp(34px, 5.6vw, 60px);
}

.hero-mascot {
  display: block;
  width: clamp(150px, 19vw, 220px);
  height: auto;
  margin: 10px auto -10px;
}

.hero-sum {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.7vw, 19px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 14px;
}

.hero-meta span {
  margin: 0 8px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: #1f2937;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 16.5px;
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0;
}

.btn-row .btn {
  width: auto;
}

/* --------------------------------------------------------------- shot frame */

.shot {
  margin: 0;
  position: relative;
}

.shot-hero {
  margin-top: 64px;
  padding-bottom: 8px;
}

.shot-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.shot-frame img {
  width: 100%;
}

.float {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px 18px;
  text-align: left;
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-tr {
  top: 10%;
  right: -40px;
  width: 244px;
  animation-delay: 0.4s;
}

.float-bl {
  bottom: -40px;
  left: -40px;
  width: 226px;
  animation-delay: 1.6s;
}

.float-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.float-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.float-row b {
  display: block;
  font-size: 14px;
}

.float-row i {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-3);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex: none;
}

.dot-b {
  background: var(--brand);
}

.meter + .meter {
  margin-top: 14px;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.meter-head b {
  color: var(--ink);
}

.meter-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.meter-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.meter-bar .w63 {
  width: 63%;
}

.meter-bar .w41 {
  width: 41%;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-title {
  position: relative;
  display: inline-block;
  font-size: clamp(28px, 3.8vw, 42px);
  margin-bottom: 14px;
}

.squiggle {
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 72%;
  height: 12px;
  color: color-mix(in srgb, var(--brand) 55%, transparent);
}

.section-sum {
  max-width: 720px;
  color: var(--ink-2);
  font-size: 17px;
}

/* -------------------------------------------------------------------- tabs */

.tabs {
  margin-top: 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tabbar {
  display: flex;
  gap: 4px;
  padding: 14px 14px 0;
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}

.tab {
  border: 0;
  background: none;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 12px 18px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.tabpanel {
  padding: 28px;
}

.panel-lead {
  color: var(--ink-2);
  font-size: 16.5px;
}

/* --------------------------------------------------------------------- cmd */

.cmd {
  position: relative;
  margin: 18px 0;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.cmd pre {
  margin: 0;
  padding-right: 64px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre;
}

.cmd code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  word-break: normal;
}

/* Inline by default. Only the command block floats its button to the corner —
   an unscoped absolute .copy anchored to the viewport's top-right, which is
   exactly where the sticky topbar lives. */
.copy {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 3px 11px;
  cursor: pointer;
  flex: none;
}

.cmd .copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
}

.copy:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.copy.is-done {
  color: #059669;
  border-color: #059669;
}

/* ------------------------------------------------------------------- lists */

.plain {
  margin: 20px 0 0;
  padding-left: 20px;
  color: var(--ink-2);
}

.plain li + li {
  margin-top: 8px;
}

/* ------------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-primary {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 26%, var(--line));
}

.card-head h3 {
  font-size: 22px;
}

.card-head p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15px;
}

.specs {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  font-size: 14.5px;
}

.specs li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.specs li > span:first-child {
  color: var(--ink-3);
  width: 52px;
  flex: none;
}

.specs b {
  font-weight: 600;
}

.hash {
  font-family: var(--mono);
}

.card .btn-lg {
  margin-top: auto;
}

.card-note {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* -------------------------------------------------------------------- warn */

.warn {
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 14.5px;
}

.warn code {
  background: rgba(255, 255, 255, 0.7);
  border-color: #fde68a;
}

/* ----------------------------------------------------------------- history */

.history {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px 24px;
}

.history summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 16px;
}

.history dl {
  margin: 0;
  padding-bottom: 20px;
}

.history dt {
  font-weight: 700;
  font-size: 15px;
  margin-top: 18px;
}

.history dd {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

/* ----------------------------------------------------------------- feature */

.feature {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 56px;
  align-items: center;
}

.feature + .feature {
  margin-top: 104px;
}

.feature-flip {
  grid-template-columns: 1fr minmax(280px, 420px);
}

.feature-flip .feature-copy {
  order: 2;
}

.feature-flip .shot {
  order: 1;
}

.feature-copy h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 16px;
}

.feature-copy p {
  color: var(--ink-2);
  font-size: 16.5px;
}

/* --------------------------------------------------------------- ecosystem */

/* 装上就有的能力：顶部那排数字，比任何形容词都有说服力 */
.eco-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 40px 0 20px;
}

.eco-stats div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.eco-stats b {
  display: block;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.eco-stats span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
}

.ticks {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.ticks li {
  position: relative;
  padding: 9px 0 9px 26px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.5;
}

.ticks b {
  color: var(--ink);
  font-weight: 600;
}

.feature-tight {
  margin-top: 72px;
}

.feature-tight .feature-copy p {
  font-size: 16px;
}

/* --------------------------------------------------------------------- faq */

.faq-wrap {
  position: relative;
}

.faq-mascot {
  position: absolute;
  right: 8px;
  top: -40px;
  width: clamp(84px, 10vw, 128px);
  height: auto;
  opacity: 0.9;
}

.faq {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  font-size: 17px;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 1.6px;
  background: var(--ink-2);
  transition: transform 0.2s ease;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0);
}

.faq details p {
  padding: 0 40px 24px 0;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 76ch;
}

/* --------------------------------------------------------------------- cta */

.cta-inner {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 72px 56px;
  overflow: hidden;
  background:
    radial-gradient(
      80% 120% at 88% 0%,
      color-mix(in srgb, var(--brand) 12%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(160deg, #f7f9fc 0%, #eef2f7 100%);
  border: 1px solid var(--line);
  text-align: left;
}

.cta h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  max-width: 16ch;
}

.cta-inner .btn-row {
  margin-bottom: 0;
}

.cta-mascot {
  position: absolute;
  right: 40px;
  bottom: -8px;
  width: clamp(150px, 20vw, 210px);
  height: auto;
}

/* ------------------------------------------------------------------- foot */

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.foot-inner img {
  width: 132px;
  height: auto;
}

.foot-note {
  color: var(--ink-3);
  font-size: 13.5px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
  font-size: 13.5px;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .float-tr {
    right: -12px;
    width: 200px;
  }
  .float-bl {
    left: -12px;
    width: 188px;
  }
  .feature,
  .feature-flip {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-flip .feature-copy,
  .feature-flip .shot {
    order: initial;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 76px;
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding-top: 40px;
  }
  .br-m {
    display: none;
  }
  .shot-hero {
    margin-top: 44px;
  }
  .float {
    display: none;
  }
  .tabpanel,
  .card {
    padding: 22px;
  }
  .cta-inner {
    padding: 48px 24px 200px;
  }
  .cta-mascot {
    right: 50%;
    transform: translateX(50%);
  }
  .foot-links {
    margin-left: 0;
  }
  .faq-mascot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .float,
  .menu {
    animation: none;
  }
  .btn:hover {
    transform: none;
  }
}