/* SA 总帮助入口 — 对齐 SA1/SA2 Help Hub 与 install/get.css */

:root {
  --ap-bg: #ffffff;
  --ap-bg-alt: #f5f5f7;
  --ap-text: #1d1d1f;
  --ap-secondary: #6e6e73;
  --ap-link: #0066cc;
  --ap-link-hover: #0077ed;
  --ap-blue: #0071e3;
  --ap-blue-hover: #0077ed;
  --ap-border: #d2d2d7;
  --ap-code-bg: #f5f5f7;
  --ap-selected: #e8f1fc;
  --ap-nav-bg: rgba(251, 251, 253, 0.82);
  --ap-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --ap-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ap-radius-tile: 18px;
  --ap-pill: 980px;
  --ap-max: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

html,
body {
  background: var(--ap-bg-alt);
  color: var(--ap-text);
  font-family: var(--ap-font);
  line-height: 1.47059;
  margin: 0;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ap-link);
  text-decoration: none;
}

a:hover {
  color: var(--ap-link-hover);
}

button {
  font: inherit;
}

code,
pre {
  font-family: var(--ap-mono);
}

.hub-nav {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--ap-nav-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hub-nav__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--ap-max);
  min-height: 48px;
  padding: 0 22px;
  gap: 1rem;
}

.hub-nav__lead {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.casstk-home {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none !important;
  white-space: nowrap;
}

.casstk-wordmark__cas {
  color: #003366;
}

.casstk-wordmark__stk {
  color: #000;
}

.hub-nav__brand {
  align-items: baseline;
  color: inherit;
  display: inline-flex;
  gap: 0.4rem;
  text-decoration: none !important;
}

.hub-nav__mark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hub-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  justify-content: flex-end;
}

.hub-nav__links a {
  color: var(--ap-text);
  font-size: 12px;
  opacity: 0.88;
  text-decoration: none !important;
}

.hub-nav__links a:hover {
  opacity: 1;
}

.hub-hero {
  background: linear-gradient(180deg, #fbfbfd 0%, var(--ap-bg-alt) 100%);
  padding: 2.6rem 1.5rem 2.1rem;
  text-align: center;
}

.hub-hero__brand {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

.hub-hero__product {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0.35rem 0 0.65rem;
}

.hub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.hub-pill {
  align-items: center;
  border-radius: var(--ap-pill);
  display: inline-flex;
  font-size: 14px;
  font-weight: 400;
  justify-content: center;
  min-width: 7rem;
  padding: 0.55rem 1.2rem;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hub-pill:hover {
  text-decoration: none !important;
}

.hub-pill--primary {
  background: var(--ap-blue);
  color: #fff !important;
}

.hub-pill--primary:hover {
  background: var(--ap-blue-hover);
  color: #fff !important;
}

.hub-pill--ghost {
  background: transparent;
  border: 1px solid var(--ap-border);
  color: var(--ap-blue) !important;
}

.hub-pill--ghost:hover {
  border-color: var(--ap-blue);
  background: var(--ap-selected);
}

.hub-page {
  margin: 0 auto;
  max-width: var(--ap-max);
  padding: 1.75rem 22px 2.5rem;
}

.hub-zones {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 2.1rem;
}

.hub-zone {
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--ap-radius-tile);
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 10.5rem;
  padding: 1.25rem 1.3rem 1.15rem;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.hub-zone:hover {
  background: #fff;
  border-color: var(--ap-border);
  color: inherit;
  transform: translateY(-1px);
}

.hub-zone__badge {
  color: var(--ap-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-zone__title {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.hub-zone__desc {
  color: var(--ap-secondary);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 0.35rem;
}

.hub-zone__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.hub-zone__links a {
  color: var(--ap-link);
  font-size: 13px;
}

.hub-section {
  margin: 0 0 2.2rem;
  scroll-margin-top: 72px;
}

.hub-section__head {
  margin-bottom: 0.9rem;
}

.hub-section__title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.hub-section__lead {
  color: var(--ap-secondary);
  font-size: 14px;
  margin: 0.3rem 0 0;
}

.hub-callout {
  background: var(--ap-selected);
  border-radius: var(--ap-radius-tile);
  color: var(--ap-text);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 1rem;
  padding: 0.95rem 1.15rem;
}

.hub-callout strong {
  font-weight: 650;
}

.hub-table-wrap {
  overflow-x: auto;
}

.hub-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

.hub-table th,
.hub-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  line-break: strict;
  padding: 0.7rem 0.65rem;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
}

.hub-table th {
  color: var(--ap-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-table td:first-child {
  color: var(--ap-secondary);
  font-weight: 600;
  white-space: nowrap;
  width: 6.5rem;
}

.hub-feature {
  background: #fff;
  border-radius: var(--ap-radius-tile);
  margin: 0 0 1.15rem;
  padding: 1.2rem 1.25rem 1.3rem;
  scroll-margin-top: 72px;
}

.hub-feature--cspkg {
  background: linear-gradient(180deg, #f3f8ff 0%, var(--ap-bg-alt) 42%);
  border: 1px solid #d6e6fb;
}

.hub-feature__kicker {
  color: var(--ap-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.hub-feature__title {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 0.4rem;
}

.hub-feature__lead {
  color: var(--ap-secondary);
  font-size: 14px;
  margin: 0 0 1rem;
}

.hub-cmd {
  background: #fff;
  border-radius: 14px;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
}

.hub-cmd__row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.hub-cmd__label {
  color: var(--ap-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hub-cmd__copy {
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-pill);
  color: var(--ap-blue);
  cursor: pointer;
  font-size: 13px;
  padding: 0.22rem 0.8rem;
}

.hub-cmd__copy:hover {
  background: var(--ap-selected);
  border-color: var(--ap-blue);
}

.hub-cmd__code {
  color: var(--ap-text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  overflow-x: auto;
  user-select: all;
  -webkit-user-select: all;
  white-space: pre;
}

.hub-list {
  color: var(--ap-text);
  font-size: 14px;
  line-height: 1.55;
  margin: 0.2rem 0 0.85rem;
  padding-left: 1.15rem;
}

.hub-list li + li {
  margin-top: 0.28rem;
}

.hub-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-tile {
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--ap-radius-tile);
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 6.5rem;
  padding: 1.05rem 1.1rem;
  text-decoration: none !important;
}

.hub-tile:hover {
  background: #fff;
  border-color: var(--ap-border);
  color: inherit;
}

.hub-tile__title {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 0;
}

.hub-tile__desc {
  color: var(--ap-secondary);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.hub-links {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ap-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 0.65rem 1.25rem;
  padding: 1.25rem 0 0.35rem;
}

.hub-links a {
  color: var(--ap-link);
}

@media (max-width: 820px) {
  .hub-nav__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.65rem 16px;
  }

  .hub-zones,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-cmd__code {
    white-space: pre-wrap;
  }

  .hub-table td:first-child {
    white-space: normal;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hub-zone,
  .hub-pill {
    transition: none;
  }
}
