/* AngelWatch DS — Documentation chrome + component styles */

/* ============ DOC SHELL ============ */
.app {
  display: grid;
  /* minmax(0, 1fr) 让主区列允许收缩到 0 —— 默认 `1fr` = `minmax(auto, 1fr)`,
     会被内部 fixed-width 子元素(如 .modal-demo / .shell-mock 4 卡 grid)
     撑大,导致 .app-main 的 overflow-x:hidden 失效,内容溢出右边 */
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.app-side {
  background: var(--aw-bg);
  border-right: 1px solid var(--aw-border-2);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  padding: 20px 0 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 18px; margin-bottom: 12px;
  border-bottom: 1px solid var(--aw-border-3);
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 6px;
  display: grid; place-items: center;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
[data-theme="dark"] .brand-logo img,
[data-theme="dark"] .shell-mock.v12 .sb .logo-region .b img,
[data-theme="dark"] .sidebar-states .ss-logo .lg img,
[data-theme="dark"] .ss-sb.dark .ss-logo .lg img {
  filter: brightness(0) invert(1) brightness(0.92);
}
.brand-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.brand-name small {
  display: block; font-weight: 400; font-size: 11px;
  color: var(--aw-text-3); letter-spacing: 0.4px;
}
.nav-section {
  font-size: 11px; font-weight: 600;
  color: var(--aw-text-3); letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 14px 20px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 20px; color: var(--aw-text-2);
  text-decoration: none; font-size: 13px;
  border-left: 2px solid transparent;
  transition: all var(--aw-dur-fast) var(--aw-ease);
}
.nav a:hover { background: var(--aw-fill-1); color: var(--aw-text-1); }
.nav a.active {
  color: var(--aw-primary); background: var(--aw-primary-bg);
  border-left-color: var(--aw-primary); font-weight: 500;
}
.nav a .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.4;
}
.nav a.active .dot { opacity: 1; }

.theme-toggle {
  margin: 16px 16px 0; padding: 4px;
  background: var(--aw-fill-2);
  border-radius: var(--aw-radius);
  display: flex; gap: 2px;
}
.theme-toggle button {
  flex: 1; border: 0; background: transparent;
  padding: 6px 10px; font-size: 12px;
  color: var(--aw-text-2); cursor: pointer;
  border-radius: 4px; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.theme-toggle button.is-active {
  background: var(--aw-bg); color: var(--aw-text-1);
  box-shadow: var(--aw-shadow-1);
}

.app-main { padding: 0; overflow-x: hidden; }

/* HERO */
.hero {
  background: var(--aw-primary);
  color: white;
  padding: 80px 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute;
  right: -120px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
}
.hero-inner { max-width: 1100px; position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 14px; font-weight: 500;
}
.hero h1 {
  font-size: 56px; font-weight: 600; line-height: 1.08;
  letter-spacing: -1px; margin: 0 0 18px; max-width: 820px;
}
.hero h1 em { font-style: normal; opacity: 0.55; }
.hero p {
  font-size: 17px; max-width: 640px; opacity: 0.88;
  line-height: 1.6; margin: 0 0 32px;
}
.hero-meta {
  display: flex; gap: 32px; font-size: 13px;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.18);
  max-width: 700px;
}
.hero-meta div { opacity: 0.85; }
.hero-meta strong { display: block; font-size: 18px; opacity: 1; margin-bottom: 2px; font-weight: 600; }

/* CONTENT — outer wrapper of fragment content.
   Padding 由 SPA shell 规则 `.app-main.comp-page > #app-slot > .content`
   承担(直接子选择器,不污染嵌套 widget 中的 .content,例如 .alert .content
   和 .shell-mock .main .content)。这里只设上限宽度,避免超宽屏拉得过宽。 */
.app-main.comp-page > #app-slot > .content { max-width: 1200px; }

.section { margin-top: 72px; scroll-margin-top: 24px; }
.section:first-of-type { margin-top: 0; }
.section-eyebrow {
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--aw-text-3); font-weight: 600; margin: 0 0 8px;
}
.section h2 {
  font-size: 28px; font-weight: 600; margin: 0 0 6px;
  letter-spacing: -0.4px; color: var(--aw-text-1);
}
.section .lede {
  font-size: 15px; color: var(--aw-text-2);
  margin: 0 0 32px; max-width: 720px; line-height: 1.6;
}

.subsection { margin-top: 40px; }

/* ===== card-style stack: 多个 .surface 卡片栈式排列(标题在卡内,
   类似 #/inputs 的 "输入态/选择 & 开关" 范式)===== */
.demo-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
}
/* 卡片内标题:小号 14px + 与下方内容 12px 间隔 */
.surface .card-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--aw-text-1);
  letter-spacing: -0.1px;
}
/* Modal demo 居中舞台:为 .modal-demo 提供深色背板,模拟真实弹窗的位置感 */
.modal-stage {
  background: var(--aw-fill-1);
  border-radius: var(--aw-radius);
  padding: 32px;
  display: grid;
  place-items: center;
}
.subsection h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 14px;
  color: var(--aw-text-1);
}

/* shared utility */
.surface {
  background: var(--aw-bg);
  border: 1px solid var(--aw-border-2);
  border-radius: var(--aw-radius);
  padding: 20px;
}
.mono { font-family: var(--aw-font-mono); font-size: 12px; }
.tag-meta {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 500;
  background: var(--aw-fill-2); color: var(--aw-text-2);
  font-family: var(--aw-font-mono);
}
