/* Official docs.daocloud.io-like shell (MkDocs Material indigo) */
:root {
  --md-primary: #3f51b5;
  --md-primary-fg: #fff;
  --md-accent: #536dfe;
  --md-default-bg: #fff;
  --md-default-fg: #000000de;
  --md-muted: #00000099;
  --md-border: #e0e0e0;
  --md-sidebar: #fff;
  --md-code-bg: #f5f5f5;
  --font: "Roboto", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--md-default-bg);
  color: var(--md-default-fg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

.md-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--md-primary);
  color: var(--md-primary-fg);
  box-shadow: 0 0 0.2rem #0000001a, 0 0.2rem 0.4rem #0003;
}
.md-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 48px;
  padding: 0 16px;
  max-width: 100%;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}
.cube {
  width: 28px;
  height: 28px;
  display: block;
}
.md-utils {
  display: flex;
  align-items: center;
  gap: 8px;
}
.md-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
}
.md-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #00000026;
  border-radius: 4px;
  padding: 0 10px;
  height: 32px;
}
.md-search input {
  border: 0;
  background: transparent;
  color: #fff;
  width: 120px;
  outline: none;
  font: inherit;
}
.md-search input::placeholder { color: #ffffffcc; }

.md-tabs {
  position: relative;
  z-index: 60;
  background: #3949ab;
  overflow: visible;
}
.md-tabs-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 2px;
  padding: 4px 16px 4px 48px;
  min-height: 48px;
  overflow: visible;
}
.md-tabs a, .md-drop > summary {
  color: #ffffffe6;
  font-size: 14px;
  padding: 10px 12px;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  font: inherit;
}
.md-tabs a:hover, .md-drop > summary:hover { color: #fff; }
.md-tabs a.active {
  color: #fff;
  box-shadow: inset 0 -2px 0 #fff;
}
.md-drop {
  position: relative;
  display: inline-block;
}
.md-drop summary { list-style: none; }
.md-drop summary::-webkit-details-marker { display: none; }
.md-drop summary::after {
  content: " ▾";
  font-size: 10px;
}
.md-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  min-width: 260px;
  background: #fff;
  color: #333;
  border-radius: 4px;
  box-shadow: 0 6px 16px #00000033;
  padding: 6px 0;
  z-index: 80;
}
.md-drop[open] > .md-drop-menu,
.md-drop:hover > .md-drop-menu {
  display: block;
}
.md-drop-menu a {
  display: block;
  padding: 10px 16px;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
}
.md-drop-menu a:hover { background: #f5f5f5; }
.md-drop-menu a.current { color: var(--md-primary); font-weight: 600; }

.layout {
  display: grid;
  grid-template-columns: 242px 1fr;
  min-height: calc(100vh - 96px);
}
.sidebar {
  border-right: 1px solid var(--md-border);
  background: var(--md-sidebar);
  padding: 16px 0 48px;
  overflow: auto;
}
.sidebar h4 {
  margin: 0 16px 8px;
  font-size: 12px;
  color: var(--md-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav-group { margin: 0; }
.nav-group > summary {
  list-style: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #000000de;
  cursor: pointer;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::before {
  content: "›";
  display: inline-block;
  width: 12px;
  margin-right: 4px;
  color: #9e9e9e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transform: none;
  transition: transform 0.15s ease;
}
.nav-group[open] > summary::before {
  transform: rotate(90deg);
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-item {
  display: block;
  padding: 6px 16px 6px 28px;
  font-size: 13px;
  color: #000000b3;
  line-height: 1.4;
}
.nav-item:hover { color: var(--md-primary); }
.nav-item.active {
  color: var(--md-primary);
  background: #3f51b50f;
  border-right: 2px solid var(--md-primary);
  font-weight: 600;
}
.nav-item .opt {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: #9e9e9e;
  font-weight: 400;
}
.nav-sub {
  padding-left: 16px;
}
.nav-sub-title {
  padding: 6px 16px 4px 28px;
  font-size: 12px;
  color: #757575;
}

.main {
  background: #fff;
  padding: 28px 40px 80px;
  min-height: 100%;
}
.main h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.main .empty {
  margin-top: 24px;
  color: var(--md-muted);
  font-size: 14px;
}
.main .crumb {
  color: var(--md-muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.main .lead-green {
  margin: 8px 0 20px;
  color: #0a7a3e;
  font-size: 18px;
  font-weight: 700;
}
.article p,
.article li {
  line-height: 1.85;
  color: #424242;
}
.article h2 {
  margin: 28px 0 14px;
  font-size: 22px;
  font-weight: 700;
}
.module-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 24px;
}
.module-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--md-border);
  border-radius: 8px;
  background: #fafafa;
}
.module-card:hover {
  border-color: var(--md-primary);
  background: #fff;
}
.module-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--md-primary);
}
.module-card p {
  margin: 0;
  font-size: 13px;
  color: #616161;
  line-height: 1.6;
}
.hint {
  margin-top: 24px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #616161;
  font-size: 13px;
}
.hint code {
  font-size: 12px;
  background: #eee;
  padding: 1px 6px;
  border-radius: 4px;
}

/* —— Architecture diagram v2 (light, matches latest product diagram) —— */
.arch-tip {
  margin: -4px 0 12px;
  color: #757575;
  font-size: 13px;
}
.archv2 {
  --arch-border: #d5dde8;
  --arch-card: #fff;
  --arch-muted: #5f6b7a;
  --arch-green: #1ea86a;
  --arch-blue: #2f6fed;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 132px;
  grid-template-areas:
    "scene scene scene"
    "model model model"
    "token guard manage"
    "infer guard manage"
    "sched guard manage"
    "hw hw hw";
  gap: 8px;
  margin: 0 0 36px;
  padding: 12px;
  border-radius: 12px;
  background: #eef2f6;
  border: 1px solid #e1e7ef;
}
.archv2-scene { grid-area: scene; }
.archv2-model { grid-area: model; }
.archv2-token { grid-area: token; }
.archv2-infer { grid-area: infer; }
.archv2-sched { grid-area: sched; }
.archv2-guard { grid-area: guard; }
.archv2-manage { grid-area: manage; }
.archv2-hw { grid-area: hw; }

.archv2-scene,
.archv2-model,
.archv2-token,
.archv2-infer,
.archv2-sched,
.archv2-hw {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}
.archv2-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  border-radius: 8px;
  background: #dfe7f0;
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px solid var(--arch-border);
}
.archv2-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--arch-border);
  min-width: 0;
}
.archv2-scene .archv2-panel {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #f7fbf8, #fff);
}
.archv2-apps,
.archv2-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.archv2-pill,
.archv2-industries span,
.archv2-hw-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--arch-border);
  color: #243041;
  font-size: 12px;
  font-weight: 600;
}
.archv2-industries span {
  background: #f4f7fb;
  color: #5f6b7a;
  font-weight: 500;
}
.archv2-model-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 8px;
}
.archv2-plaza {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef9f3, #f5f9ff);
  border: 1px solid #cfe8da;
  color: #1f2a37;
}
.archv2-plaza span {
  color: var(--arch-muted);
  font-size: 12px;
}
.archv2-model-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.archv2-grid {
  display: grid;
  gap: 6px;
}
.archv2-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archv2-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.archv2-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.archv2-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.archv2-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--arch-card);
  border: 1px solid var(--arch-border);
  color: #243041;
  font-size: 12px;
  line-height: 1.35;
}
.archv2-card strong {
  font-weight: 700;
}
.archv2-card small {
  color: var(--arch-muted);
  font-size: 11px;
}
.archv2-token .archv2-panel {
  background: #f7f8fa;
}
.archv2-infer .archv2-panel {
  border-color: #9fd9ba;
  background: #f3fbf7;
  box-shadow: inset 0 0 0 1px rgba(30, 168, 106, 0.08);
}
.archv2-sched-panel {
  border-color: #9eb8ef;
  background: #f4f8ff;
}
.archv2-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.archv2-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--arch-blue);
}
.archv2-k8s {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8f1ff, #e9f8f1);
  border: 1px solid #b7c9ef;
  color: #1f3f8a;
  font-size: 12px;
  font-weight: 700;
}
.archv2-guard,
.archv2-manage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--arch-border);
  background: #fff;
}
.archv2-guard {
  background: #f2fbf6;
  border-color: #bfe3cf;
}
.archv2-manage {
  background: #f2f8fc;
  border-color: #bdd7ea;
}
.archv2-side-title {
  font-size: 12px;
  font-weight: 700;
  color: #1f6a49;
  margin-bottom: 2px;
  text-align: center;
}
.archv2-manage .archv2-side-title {
  color: #1f5f8a;
}
.archv2-hw-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  align-content: flex-start;
  background: #f8fafc;
}
.archv2-hw-item {
  background: #fff;
  min-width: 96px;
  flex: 0 0 auto;
}

a.archv2-pill.is-link,
a.archv2-card.is-link,
a.archv2-plaza.is-link,
a.archv2-k8s.is-link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.archv2-pill.is-link:hover,
a.archv2-card.is-link:hover,
a.archv2-plaza.is-link:hover,
a.archv2-k8s.is-link:hover {
  border-color: var(--arch-green);
  box-shadow: 0 2px 8px rgba(30, 168, 106, 0.16);
  transform: translateY(-1px);
  color: #16324f;
}

.sidebar .nav-group .nav-group {
  margin-left: 8px;
}
.sidebar .nav-group .nav-group > summary {
  font-weight: 600;
  font-size: 13px;
  color: #616161;
}
.sidebar .nav-group .nav-group .nav-item {
  padding-left: 36px;
}

@media (max-width: 1100px) {
  .archv2 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scene"
      "model"
      "token"
      "infer"
      "sched"
      "guard"
      "manage"
      "hw";
  }
  .archv2-guard,
  .archv2-manage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .archv2-side-title {
    grid-column: 1 / -1;
    text-align: left;
  }
  .archv2-grid.cols-6,
  .archv2-grid.cols-5,
  .archv2-grid.cols-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--md-border); }
  .md-tabs-inner { padding-left: 8px; }
  .module-cards { grid-template-columns: 1fr; }
  .archv2-model-panel,
  .archv2-scene .archv2-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .archv2-grid.cols-6,
  .archv2-grid.cols-5,
  .archv2-grid.cols-4,
  .archv2-grid.cols-3,
  .archv2-model-feats {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Download station —— */
.dl-layout {
  grid-template-columns: 320px 1fr;
}
.dl-parent {
  display: block;
  padding: 8px 16px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #000000de;
}
.dl-parent:hover { color: var(--md-primary); }
.dl-nav .nav-item {
  padding-left: 28px;
  white-space: nowrap;
}
.dl-nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 6px 28px;
  font-size: 13px;
  font-weight: 400;
  color: #000000b3;
}
.dl-nav-group > summary::before { display: none; }
.dl-nav-group > summary::after {
  content: "›";
  color: #9e9e9e;
  font-size: 16px;
  line-height: 1;
}
.dl-nav-group[open] > summary::after {
  transform: rotate(90deg);
}
.dl-nav-group .nav-item {
  padding-left: 40px;
}

.dl-main .crumb {
  margin-bottom: 18px;
}
.dl-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.dl-title h1 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.dl-lead {
  margin: 0 0 20px;
  color: #424242;
  font-size: 15px;
  line-height: 1.7;
}
.dl-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--md-border);
  border-radius: 4px;
}
.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dl-table th,
.dl-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--md-border);
  white-space: nowrap;
}
.dl-table th {
  background: #fafafa;
  color: #616161;
  font-weight: 600;
}
.dl-table tr:last-child td { border-bottom: 0; }
.dl-table tbody tr:hover td { background: #fafafa; }
.dl-arch-arm {
  color: #2e7d32;
  font-weight: 600;
}
.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-primary);
  font-weight: 500;
  cursor: pointer;
}
.dl-link:hover { text-decoration: underline; }
.dl-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dl-history {
  margin-top: 20px;
  border: 1px solid #90caf9;
  border-radius: 24px;
  background: #e3f2fd;
  overflow: hidden;
}
.dl-history > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #1565c0;
  cursor: pointer;
  font-size: 14px;
}
.dl-history > summary::-webkit-details-marker { display: none; }
.dl-history > summary::after {
  content: "›";
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
}
.dl-history[open] > summary::after {
  transform: rotate(90deg);
}
.dl-history-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #42a5f5;
  background:
    linear-gradient(#42a5f5, #42a5f5) 50% 62% / 8px 2px no-repeat,
    linear-gradient(#42a5f5, #42a5f5) 50% 46% / 2px 8px no-repeat;
}
.dl-history[open] .dl-history-icon {
  background:
    linear-gradient(#42a5f5, #42a5f5) 50% 50% / 8px 2px no-repeat;
}
.dl-history .dl-table-scroll {
  margin: 0 12px 12px;
  background: #fff;
}
.dl-ref {
  margin-top: 22px;
  color: #424242;
  font-size: 14px;
}
.dl-ref a {
  color: var(--md-primary);
}
.dl-lead a,
.dl-more a,
.dl-article a {
  color: var(--md-primary);
}
.dl-lead a:hover,
.dl-more a:hover,
.dl-article a:hover {
  text-decoration: underline;
}
.dl-more {
  margin: 8px 0 0;
  font-size: 14px;
}
.dl-table--docs td,
.dl-table--modules td {
  white-space: nowrap;
}

.dl-article h2 {
  margin: 32px 0 14px;
  font-size: 22px;
  font-weight: 700;
}
.dl-article p,
.dl-article li {
  line-height: 1.85;
  color: #424242;
  font-size: 15px;
}
.dl-code {
  margin: 12px 0 18px;
  padding: 14px 16px;
  overflow-x: auto;
  background: #f5f5f5;
  border-radius: 4px;
  color: #37474f;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.dl-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dl-arch-tabs {
  display: flex;
  gap: 0;
  margin: 8px 0 14px;
  border-bottom: 1px solid var(--md-border);
}
.dl-arch-tab {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  color: #616161;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dl-arch-tab.is-active {
  color: var(--md-primary);
  border-bottom-color: var(--md-primary);
  font-weight: 600;
}
.dl-notes {
  margin: 16px 0 0;
  padding-left: 20px;
}
.dl-notes a {
  color: var(--md-primary);
}
.dl-notes a:hover { text-decoration: underline; }
.crumb a {
  color: inherit;
}
.crumb a:hover {
  color: var(--md-primary);
}
.dl-article .dl-table td:nth-child(2) {
  white-space: normal;
  min-width: 220px;
}

@media (max-width: 960px) {
  .dl-layout { grid-template-columns: 1fr; }
  .dl-nav .nav-item { white-space: normal; }
}
