:root {
  --ink: #090909;
  --text: #090909;
  --text-soft: #343841;
  --muted: #747b86;
  --quiet: #8d929b;
  --paper: #f4f3ef;
  --bg: #f4f3ef;
  --bg-soft: #f2f2f0;
  --panel: #ffffff;
  --panel-2: #f7f7f5;
  --panel-solid: #ffffff;
  --line: rgba(8, 8, 8, 0.12);
  --line-strong: rgba(8, 8, 8, 0.28);
  --accent: #111116;
  --accent-2: #9ce9c8;
  --accent-3: #ffd84d;
  --blue: #b9ecf5;
  --green: #9ce9c8;
  --plum: #b9b2ff;
  --saffron: #ffd84d;
  --dark: #111116;
  --shadow-sm: 0 1px 2px rgba(30, 32, 36, 0.06);
  --shadow-md: 0 14px 34px rgba(30, 32, 36, 0.08);
  --shadow-lg: 0 24px 70px rgba(30, 32, 36, 0.12);
  --space-shell-x: 24px;
  --space-frame-top: 12px;
  --space-page-title-y: 24px 0 30px;
  --space-section-gap: 18px;
  --space-back-gap: 10px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-xl: 34px;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Aptos", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Aptos", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Aptos", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  min-width: 320px;
  background: var(--paper) !important;
}

body {
  min-width: 320px;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
  font-weight: 500;
  letter-spacing: 0 !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  display: none !important;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.shell,
.topbar-inner {
  width: min(1440px, calc(100vw - 32px)) !important;
  max-width: 1440px !important;
}

.shell {
  margin: var(--space-frame-top) auto 36px !important;
  padding: var(--space-shell-x) !important;
  border: 5px solid #3f4144;
  border-radius: 34px;
  background: var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.86),
    0 18px 60px rgba(0, 0, 0, 0.1);
}

.topbar {
  top: 10px !important;
  width: min(1440px, calc(100vw - 32px));
  margin: 10px auto 0;
  overflow: hidden;
  border: 4px solid #3f4144 !important;
  border-radius: 28px;
  background: #fff !important;
  box-shadow: var(--shadow-md);
}

.topbar-inner {
  padding: 12px 18px !important;
}

.site-header,
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  padding-bottom: 10px !important;
}

.brand,
.hub-back,
.hub-return,
.nav-links a,
.topnav a,
.link-button,
.btn,
button {
  font-weight: 850 !important;
}

.brand {
  color: var(--ink) !important;
}

.brand-mark,
.brand .dot {
  border-radius: 16px !important;
  background: var(--dark) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16) !important;
}

.brand small,
.kicker,
.section-kicker,
.page-title .kicker,
.hero .kicker,
.card .tag,
.asset-tag,
.tag,
.num,
.idx {
  color: var(--muted) !important;
  font-family: var(--mono) !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

.nav-links,
.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px !important;
  flex-wrap: wrap;
}

.topnav {
  flex-wrap: nowrap;
}

.nav-links a,
.topnav a,
.hub-back,
.hub-return,
.link-button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 999px !important;
  background: #f3f3f1 !important;
  color: var(--ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--shadow-sm) !important;
  text-decoration: none !important;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.nav-links a:hover,
.topnav a:hover,
.hub-back:hover,
.hub-return:hover,
.link-button:hover,
.btn:hover {
  transform: translateY(-2px);
  background: #fff !important;
  box-shadow: var(--shadow-md) !important;
}

.topnav a.active,
.btn.primary,
.link-button.primary {
  background: var(--dark) !important;
  color: #fff !important;
}

.hub-back,
.hub-return {
  width: fit-content;
  margin-bottom: var(--space-back-gap);
}

.shell > .hub-back + header,
.shell > .hub-return + header {
  padding: 0 !important;
}

.page-title,
.hero,
section.block {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-radius: 30px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.page-title,
.hero {
  padding: var(--space-page-title-y) !important;
}

section.block {
  padding: 26px !important;
}

.page-title::after,
.page-title:after,
.hero::before,
.hero:before,
.project-card::before,
.project-card:before,
.ops-card::before,
.ops-card:before,
.ai-card::before,
.ai-card:before {
  opacity: 0 !important;
}

.page-title h1,
.hero h1 {
  max-width: 1080px;
  margin-top: 12px !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
  font-size: 58px !important;
  font-weight: 300 !important;
  line-height: 1.06 !important;
  letter-spacing: 0 !important;
}

.page-title p,
.hero p,
.hero .subtitle,
.section-head p,
.section-header .lede {
  max-width: 820px;
  color: var(--text-soft) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.72 !important;
}

.page-title p,
.hero p,
.hero .subtitle {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
}

.stats {
  gap: 1px !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 26px !important;
  background: var(--line) !important;
}

.stat {
  border: 0 !important;
  border-radius: 0 !important;
  background: #f7f7f5 !important;
  box-shadow: none !important;
}

.stat b {
  color: var(--ink) !important;
  font-size: 34px;
  font-weight: 300 !important;
}

.stat span {
  color: var(--muted) !important;
  font-weight: 750 !important;
}

.section,
.block,
.brief,
.project-summary,
.project-detail,
.modal-panel,
.gate-card,
.level-panel {
  border: 1px solid var(--line) !important;
  border-radius: 30px !important;
  background: #fff !important;
  box-shadow: var(--shadow-md) !important;
}

.section,
.block,
.brief {
  margin-top: var(--space-section-gap);
}

.shell > header + .section,
.shell > header + section.section,
main > .page-title + .section,
main > .page-title + section.section,
main > .page-title + section.block,
.main > .page-title + section.block {
  margin-top: var(--space-section-gap) !important;
}

.section-head,
.section-header {
  border-bottom-color: var(--line) !important;
}

.section-head h2,
.section-header h2,
.chapter-h {
  color: var(--ink) !important;
  font-size: 32px !important;
  font-weight: 850 !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
}

.sub-heading,
.detail-block h4,
.task-card h3,
.level-card h3,
.asset-card h3,
.project-card h3,
.card h4,
.ai-card h4,
.target-card h3,
.practice-card h3,
.persona-board h3,
.identity-card h3 {
  color: var(--ink) !important;
  font-weight: 850 !important;
  line-height: 1.24 !important;
  letter-spacing: 0 !important;
}

.asset-card,
.project-card,
.card,
.task-card,
.level-card,
.persona-card,
.ai-card,
.target-card,
.practice-card,
.detail-block,
.index-link,
.hl-card,
.ops-card,
.callout,
.asset-note,
.table-wrap,
.coverage-table,
.identity-card {
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: #f6f6f4 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(30, 32, 36, 0.06) !important;
}

.asset-card,
.project-card,
.index-link,
.ai-card,
.level-card,
.task-card,
.identity-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.asset-card:hover,
.project-card:hover,
.index-link:hover,
.ai-card:hover,
.level-card:hover,
.task-card:hover,
.identity-card:hover {
  transform: translateY(-4px);
  background: #fff !important;
  box-shadow: var(--shadow-lg) !important;
}

.asset-card p,
.project-card p,
.card p,
.ai-card p,
.level-card p,
.task-card p,
.detail-block,
.modal-body,
.trainer-note,
li,
td {
  color: var(--text-soft) !important;
  font-weight: 560;
  line-height: 1.72;
}

code,
pre,
kbd,
samp,
.path {
  border-color: rgba(0, 0, 0, 0.1) !important;
  border-radius: 14px !important;
  background: #f0f0ee !important;
  color: var(--text-soft) !important;
  font-family: var(--mono) !important;
  overflow-wrap: anywhere;
}

pre {
  white-space: pre-wrap;
}

th {
  color: var(--ink) !important;
  font-weight: 850 !important;
}

td {
  font-size: 13px;
}

.progress {
  background: var(--lime, #d9ff00) !important;
  box-shadow: none !important;
}

.sidebar,
.toc,
.level-panel {
  border-color: var(--line) !important;
  border-radius: 24px !important;
  background: #f7f7f5 !important;
  box-shadow: var(--shadow-sm) !important;
}

.sidebar a,
.toc a {
  color: var(--text-soft) !important;
}

.sidebar a.active,
.toc a.active {
  color: var(--ink) !important;
  font-weight: 850 !important;
}

.modal,
.gate-backdrop,
.floating-layer {
  backdrop-filter: blur(14px);
}

.footer,
footer {
  color: var(--muted) !important;
  font-weight: 560;
}

.site-footer,
.footer.site-footer,
footer.site-footer,
.agent-page .footer.site-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 30px !important;
  padding: 18px 0 0 !important;
  border-top: 1px solid var(--line, #dbe5f1) !important;
  color: var(--muted, #6b7688) !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

.site-footer a,
.footer.site-footer a,
footer.site-footer a,
.agent-page .footer.site-footer a {
  color: var(--muted, #6b7688) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(107, 118, 136, .35);
}

.site-footer-sep {
  color: color-mix(in srgb, var(--muted, #6b7688) 58%, transparent);
}

:focus-visible {
  outline: 3px solid #d9ff00;
  outline-offset: 4px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .shell,
  .topbar,
  .topbar-inner {
    width: min(100% - 20px, 1440px) !important;
  }

  .shell {
    margin-top: 8px !important;
    padding: 16px !important;
    border-width: 4px;
    border-radius: 26px;
  }

  .topbar {
    border-width: 3px !important;
    border-radius: 24px;
  }

  .site-header,
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .topnav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-links a,
  .topnav a {
    white-space: nowrap;
  }

  .page-title,
  .hero,
  section.block {
    padding: 18px 0 24px !important;
  }

  .section,
  .block,
  .brief,
  .project-summary,
  .project-detail {
    border-radius: 24px !important;
    padding: 20px !important;
  }

  .page-title h1,
  .hero h1 {
    font-size: 40px !important;
  }

  .section-head h2,
  .section-header h2,
  .chapter-h {
    font-size: 26px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
