/* ============================================================
   适老智家 · 智能系统「模块详细页」共用样式（sys-detail.css）
   用在：lights.html / security.html / appliances.html / cleaning.html
   （kitchen.html 做得更早，自带 kitchen.css，两者风格一致）
   前缀 .sd-*；颜色 / 按钮 / 卡片 / 折叠样式一律沿用 styles.css，
   这一份只放这几个页面共用的结构件，避免四份重复。
   ============================================================ */

/* ---------- 0) 返回总览 + 「这一页讲什么」 ---------- */
.sd-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 34px;
}
.sd-back {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 2.7rem;
  padding: .4rem 1rem;
  border: var(--bw) solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: .95rem;
  font-weight: 750;
  color: var(--brand-strong);
  text-decoration: none;
}
.sd-back svg { width: min(1.05rem, 21px); height: min(1.05rem, 21px); flex: none; }
.sd-back:hover { background: var(--brand-soft); }
.sd-bar > p { margin: 0; font-size: .98rem; font-weight: 600; color: var(--ink-2); }

/* ---------- 1) 小节头：编号 + 标题 + 一句说明 ---------- */
.sd-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 28px;
}
.sd-head-ico {
  border: var(--bw) solid var(--brand-line);
  width: min(3.1rem, 64px);
  height: min(3.1rem, 64px);
  flex: none;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
}
.sd-head-ico svg { width: min(1.85rem, 38px); height: min(1.85rem, 38px); }
.sd-head-txt { min-width: 0; }
.sd-no {
  font-family: var(--mono);
  display: inline-block;
  margin-bottom: 6px;
  padding: .14rem .6rem;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .1em;
}
.sd-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .02em;
}
.sd-head p {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44em;
}

/* ---------- 2) 卡片网格（6 张卡；不套 .cards —— 它带「最后一张跨列」规则） ---------- */
.sd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ---------- 3) 一张卡装一串能力（门锁 / 摄像头那种） ---------- */
.sd-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.sd-block {
  padding: 28px 26px;
  background: #fff;
  border: var(--bw) solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  position: relative;
}
.sd-block h3 {
  margin: 0 0 16px;
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.sd-list { list-style: none; margin: 0; padding: 0; }
.sd-list li {
  position: relative;
  padding: 8px 0 8px 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
  border-bottom: var(--bw) dashed var(--line);
}
.sd-list li:last-child { border-bottom: 0; }
.sd-list li::before {
  content: "";
  position: absolute;
  left: .22rem;
  top: 1.15em;
  width: .5rem;
  height: .5rem;
  border-radius: 2px;
  background: var(--brand);
}
.sd-list b { color: var(--ink); font-weight: 750; }
.sd-hot {
  font-family: var(--mono);
  display: inline-block;
  margin-left: .4rem;
  padding: .06rem .46rem;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .06em;
  vertical-align: middle;
}

/* ---------- 4) 分步 / 联动链（横向 3 步、竖向 1 列） ---------- */
.sd-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  counter-reset: sf;
}
.sd-flow > li {
  position: relative;
  padding: 22px 22px 22px 64px;
  background: #fff;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  counter-increment: sf;
}
.sd-flow > li::before {
  font-family: var(--mono);
  content: counter(sf);
  position: absolute;
  left: 20px;
  top: 20px;
  width: min(1.85rem, 38px);
  height: min(1.85rem, 38px);
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: .92rem;
  font-weight: 750;
}
.sd-flow h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.sd-flow p {
  margin: 0;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
}
.sd-flow b { color: var(--ink); font-weight: 750; }
.sd-money {
  font-family: var(--mono);
  display: inline-block;
  margin-top: 10px;
  padding: .2rem .62rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: .84rem;
  font-weight: 750;
}

/* ---------- 5) 「管什么 / 不管什么」两栏对照 ---------- */
.sd-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.sd-split-card {
  padding: 26px 24px;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--shadow);
}
.sd-split-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 14px;
  font-size: 1.18rem;
  font-weight: 750;
}
.sd-split-card h3 svg { width: min(1.5rem, 30px); height: min(1.5rem, 30px); flex: none; }
.sd-split-card ul { list-style: none; margin: 0; padding: 0; }
.sd-split-card li {
  position: relative;
  padding: 6px 0 6px 1.5rem;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
}
.sd-split-card li::before {
  content: "";
  position: absolute;
  left: .18rem;
  top: 1.05em;
  width: .46rem;
  height: .46rem;
  border-radius: 2px;
  opacity: .85;
}
.sd-split-card--yes { border-color: #C7E0CD; background: #F1FBF5; }
.sd-split-card--yes h3 { color: var(--tone-b-ink); }
.sd-split-card--yes li::before { background: var(--ok); }
.sd-split-card--no { border-color: #F0D8D2; background: #FDF4F2; }
.sd-split-card--no h3 { color: var(--warn); }
.sd-split-card--no li::before { background: var(--warn); }

/* ---------- 6) 常用口令 / 关键词小药丸 ---------- */
.sd-chips-group { margin: 0 0 20px; }
.sd-chips-group:last-child { margin-bottom: 0; }
.sd-chips-group h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
  font-weight: 750;
  color: var(--brand-strong);
}
.sd-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sd-chips li {
  padding: .42rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: var(--bw) solid var(--line);
  box-shadow: var(--shadow);
  font-size: .96rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- 7) 提醒条（合规 / 施工 / 老实话） ---------- */
.sd-note {
  margin: 30px 0 0;
  padding: 20px 22px;
  background: #EDF1F7;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink-2);
}
.sd-note b { color: var(--ink); font-weight: 750; }
.sd-note a { font-weight: 750; }

/* ---------- 8) 常见疑问（每个详细页自己带几条） ---------- */
.sd-faq { max-width: 52em; margin: 0 auto; }
.sd-q {
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--shadow);
}
.sd-q + .sd-q { margin-top: 12px; }
.sd-q > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 3.4rem;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.5;
  color: var(--ink);
}
.sd-q > summary::-webkit-details-marker { display: none; }
.sd-q > summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  width: min(1.9rem, 40px);
  height: min(1.9rem, 40px);
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1;
}
.sd-q[open] > summary::after { content: "\2212"; }
.sd-q[open] > summary { border-bottom: var(--bw) solid var(--line); }
.sd-q p {
  margin: 0;
  padding: 16px 22px 20px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink-2);
}
.sd-q p b { color: var(--ink); font-weight: 750; }

/* ---------- 9) 收尾动作行（回到总览 / 打电话） ---------- */
.sd-cta-row { margin-top: 30px; }
.sd-cta-row .btn-more { max-width: 100%; white-space: normal; line-height: 1.4; }
@media (max-width: 620px) {
  .sd-cta-row .btn-more { width: 100%; }
}

/* ---------- 10) 浅色底纹：和纯白小节交替 ---------- */
.sd-tint {
  background: linear-gradient(180deg, rgba(29, 78, 216, .075) 0%, rgba(29, 78, 216, 0) 100%);
}

/* ---------- 11) 中段现场图：六张能力卡之后做一次视觉换气 ---------- */
.sd-shot {
  margin: 32px auto 0;
  max-width: 900px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  border: var(--bw) solid var(--img-line);
  box-shadow: var(--shadow-lift);
}
.sd-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.sd-shot figcaption {
  padding: 12px 16px 14px;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- 12) 设备清单「这一套具体装什么」 ---------- */
/* 一张卡 = 一件设备：设备名 + 必备/选配标签 + 装在哪 + 功能几条。
   文案纪律：同一网格里每张卡的功能条数保持一致（现为 3 条，末张宽卡 4 条），
   标题与「装在哪」各压在一行内，否则行与行之间会参差。 */
.sd-spec {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  /* ⚠️ 别改成 1fr：会把隐式行拉到最高那行，末张宽卡撑出大片空白 */
  grid-auto-rows: auto;
}
.sd-spec-item {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: #fff;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
}
.sd-spec-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 10px;
}
.sd-spec-top h3 {
  margin: 0;
  font-size: 1.14rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.sd-spec-tag {
  font-family: var(--mono);
  flex: none;
  padding: .1rem .5rem;
  border-radius: 999px;
  border: var(--bw) solid transparent;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .06em;
}
.sd-spec-tag--must { background: var(--brand-strong); color: #fff; }
.sd-spec-tag--opt  { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-line); }
.sd-spec-where {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  font-size: .93rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-2);
}
.sd-spec-pos {
  font-family: var(--mono);
  flex: none;
  padding: .06rem .42rem;
  border-radius: 6px;
  background: #EDF1F7;
  border: var(--bw) solid var(--line);
  color: var(--brand-strong);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .04em;
}
.sd-spec-fn { list-style: none; margin: 0; padding: 0; }
.sd-spec-fn li {
  position: relative;
  padding: 5px 0 5px 1.5rem;
  font-size: .96rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
}
.sd-spec-fn li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: 1.05em;
  width: .44rem;
  height: .44rem;
  border-radius: 2px;
  background: var(--brand);
}
.sd-spec-fn b { color: var(--ink); font-weight: 750; }

/* ============================================================
   响应式
   ============================================================ */
@media (min-width: 660px) {
  .sd-grid  { grid-template-columns: repeat(2, 1fr); }
  .sd-split { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .sd-blocks { grid-template-columns: repeat(2, 1fr); }
  .sd-flow   { grid-template-columns: repeat(3, 1fr); }
  .sd-spec   { grid-template-columns: repeat(2, 1fr); }
  /* 设备件数是奇数时，末张（放「中枢」那类）跨满一行，不留半格 */
  .sd-spec > .sd-spec-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* 跨满一行的末张卡：功能列表分两栏，免得右半边空一大块 */
  .sd-spec > .sd-spec-item:last-child:nth-child(odd) .sd-spec-fn {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 28px;
  }
}
@media (min-width: 960px) {
  .sd-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   长辈模式（根字号 27px）—— 多列一律收成单列，rem 尺寸补 px 封顶
   ============================================================ */
html[data-mode="elder"] .sd-grid,
html[data-mode="elder"] .sd-blocks,
html[data-mode="elder"] .sd-split,
html[data-mode="elder"] .sd-flow,
html[data-mode="elder"] .sd-spec { grid-template-columns: 1fr; }
html[data-mode="elder"] .sd-spec > .sd-spec-item { grid-column: auto; }
/* 长辈模式末张宽卡不再分两栏：字号大，分栏后每条都要折行 */
html[data-mode="elder"] .sd-spec > .sd-spec-item:last-child:nth-child(odd) .sd-spec-fn { display: block; }
html[data-mode="elder"] .sd-spec-top h3 { font-size: 1.22rem; }
html[data-mode="elder"] .sd-spec-where,
html[data-mode="elder"] .sd-spec-fn li { color: #0E1729; }
html[data-mode="elder"] .sd-spec-tag { font-size: min(.8rem, 20px); }
html[data-mode="elder"] .sd-spec-pos { font-size: min(.84rem, 21px); }

html[data-mode="elder"] .sd-head h2 { font-size: 1.8rem; }
html[data-mode="elder"] .sd-block h3,
html[data-mode="elder"] .sd-flow h3,
html[data-mode="elder"] .sd-split-card h3 { font-size: 1.3rem; }
html[data-mode="elder"] .sd-list li,
html[data-mode="elder"] .sd-flow p,
html[data-mode="elder"] .sd-split-card li,
html[data-mode="elder"] .sd-q p { color: #0E1729; }
html[data-mode="elder"] .sd-q > summary { font-size: 1.1rem; padding: 18px 22px; }
html[data-mode="elder"] .sd-back { font-size: min(1rem, 21px); }
html[data-mode="elder"] .sd-chips li { font-size: min(1rem, 22px); }
html[data-mode="elder"] .sd-money { font-size: min(.92rem, 21px); }
html[data-mode="elder"] .sd-shot figcaption { font-size: min(1rem, 22px); }
html[data-mode="elder"] .sd-cta-row .btn-more { font-size: min(1.15rem, 23px); }

/* ==================== 视频位（.sd-video，7 个详细页共用）====================
   7 个详细页都能挂视频演示（同款样式不同内容）；与 system.html 的 .sy-video
   是兄弟关系（早期 system.html 自带一份），改样式两处都要改。 */
.sd-video {
  margin: 30px auto 0;
  max-width: 880px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  border: var(--bw) solid var(--img-line);
  box-shadow: var(--shadow-lift);
}
.sd-video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--night);
}
.sd-video-poster,
.sd-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sd-video-poster { object-fit: cover; }
.sd-video-el { z-index: 2; object-fit: contain; background: #000; }

.sd-video-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: .28em .72em .32em;
  border-radius: 999px;
  background: rgba(11, 18, 32, .62);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
}
.sd-video-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: auto;
  display: grid;
  place-items: center;
  width: min(5.4rem, 96px, 21vw);
  height: min(5.4rem, 96px, 21vw);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--brand);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(16, 32, 60, .30);
  transition: transform .18s ease, background .18s ease;
}
.sd-video-play svg {
  width: min(2.2rem, 40px);
  height: min(2.2rem, 40px);
  fill: currentColor;
  margin-left: 4px;
}
.sd-video-play:hover { transform: scale(1.06); background: #fff; }
.sd-video-play:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.sd-video.is-loading .sd-video-play { cursor: progress; opacity: .68; }
.sd-video.is-playing .sd-video-play,
.sd-video.is-playing .sd-video-badge { display: none; }

.sd-video-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .3rem .8rem;
  padding: 12px 18px 14px;
  text-align: center;
  font-size: .96rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
}
.sd-video-cap-note { color: var(--warn); font-weight: 500; }

html[data-mode="elder"] .sd-video-cap { font-size: 1.05rem; }
