/* 推推棒官网：首页和接入文档共用。配色跟 App 的「薄荷汽水」一致（ios/MessageApp/Views/Components/Theme.swift）。 */
:root {
  --ink: #12352a;
  --ink2: #48655b;
  --ink3: #6f877e;
  --bg: #f1faf5;
  --mint: #dbf5ec;
  --mint2: #c4eddd;
  --card: #fff;
  --line: #d6eae0;
  --green: #0f7f57;
  --green-b: #22b783;
  --lemon: #ffd75a;
  --lemon-soft: #fff0d2;
  --lemon-ink: #8a5300;
  --sky: #ddf1ff;
  --sky-ink: #1f6fae;
  --coral: #e5483b;
  --coral-soft: #ffe3de;
  --lilac: #d3ddfd;
  --r-xl: 40px;
  --r-lg: 28px;
  --r-md: 18px;
  --font: ui-rounded, 'SF Pro Rounded', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.wrap {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}
:focus-visible {
  outline: 3px solid var(--green-b);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 公告、顶栏 ---------- */
.notice {
  background: var(--lemon);
  color: #3d2c00;
  text-align: center;
  font-size: 15px;
  padding: 8px 16px;
}
.notice a {
  color: inherit;
  font-weight: 600;
}
.top {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.top nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.top nav a {
  color: var(--ink2);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s;
}
.top nav a:hover,
.top nav a[aria-current] {
  background: var(--mint);
  color: var(--ink);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  transition: transform 0.25s var(--spring), background 0.15s;
}
.btn:hover {
  background: #0c6c4a;
  transform: translateY(-2px);
}
.btn:active {
  transform: scale(0.95);
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn.ghost:hover {
  background: var(--mint);
}
.btn.soon {
  background: var(--mint2);
  color: var(--ink2);
  cursor: default;
  transform: none;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 36px 0 96px;
}
.hero h1 {
  font-size: clamp(64px, 10.5vw, 136px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.hero .lead {
  margin-top: 28px;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.75;
  color: var(--ink2);
  max-width: 30em;
}
.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.hero .req {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink3);
}
.stage {
  position: relative;
  aspect-ratio: 1 / 1.08;
  background: var(--mint);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.stage .dot {
  position: absolute;
  border-radius: 50%;
}
.stage .dot.a {
  width: 46%;
  aspect-ratio: 1;
  background: var(--lemon);
  right: -10%;
  top: -12%;
}
.stage .dot.b {
  width: 30%;
  aspect-ratio: 1;
  background: #a9dcfb;
  left: -8%;
  bottom: 10%;
}
.phone {
  background: #fff;
  border: 9px solid #12352a;
  border-radius: 46px;
  overflow: hidden;
}
.stage .phone {
  position: absolute;
  width: 52%;
  left: 38%;
  top: 9%;
}
.push {
  background: #fff;
  border-radius: 24px;
  padding: 16px 18px;
  box-shadow: 0 18px 40px -18px rgba(18, 53, 42, 0.35);
  font-size: 15px;
  line-height: 1.5;
}
.push header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.push header img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.push .who {
  font-weight: 700;
}
.push .who,
.push time,
.tag {
  white-space: nowrap;
}
.push time {
  margin-left: auto;
  color: var(--ink3);
  font-size: 13px;
}
.push h4 {
  margin: 10px 0 2px;
  font-size: 16px;
  font-weight: 700;
}
.push p {
  color: var(--ink2);
}
.push .acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.push .acts button {
  flex: 1 1 auto;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  border: 0;
  border-radius: 14px;
  padding: 10px 6px;
  background: var(--mint);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.25s var(--spring), background 0.15s;
}
.push .acts button:hover {
  background: var(--mint2);
}
.push .acts button:active {
  transform: scale(0.93);
}
.push .acts button.main {
  background: var(--green);
  color: #fff;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  vertical-align: 2px;
}
.tag.critical {
  background: var(--coral-soft);
  color: var(--coral);
}
.tag.high {
  background: var(--lemon-soft);
  color: var(--lemon-ink);
}
.tag.normal {
  background: var(--sky);
  color: var(--sky-ink);
}
.tag.low {
  background: #ebf3ef;
  color: var(--ink2);
}
.tag.done {
  background: var(--mint);
  color: var(--green);
}
.stage .push {
  position: absolute;
  width: 58%;
  left: 5%;
  top: 30%;
  animation: drop 0.9s var(--spring) 0.35s both;
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-48px) scale(0.92);
  }
}
.stage .chip {
  position: absolute;
  left: 9%;
  top: 68%;
  background: #12352a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  animation: drop 0.7s var(--spring) 1.1s both;
}

/* ---------- 分节 ---------- */
section {
  padding: 84px 0;
}
.sec-head {
  max-width: 34em;
  margin-bottom: 44px;
}
.sec-head h2 {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.sec-head p {
  margin-top: 16px;
  color: var(--ink2);
  font-size: 19px;
}
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 30px;
}
.card h3 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.3;
}
.card > p {
  margin-top: 10px;
  color: var(--ink2);
  font-size: 16px;
}

/* 发消息三步 */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: stretch;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.step .num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lemon);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.step .demo {
  margin-top: auto;
}
.step .demo.fill {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.step .demo.fill .phone-bg {
  flex: 1;
  display: grid;
  align-content: center;
}
pre {
  margin: 0;
  background: #f4faf7;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font: 13px/1.7 var(--mono);
  color: #1d4033;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
}
.k {
  color: #0f7f57;
}
.s {
  color: #9a5b00;
}
.c {
  color: #7d948b;
}
.phone-bg {
  background: var(--lilac);
  border-radius: var(--r-md);
  padding: 22px 16px;
}
.phone-bg .push,
.push.flat {
  box-shadow: none;
}
.push.flat {
  background: var(--bg);
}
.push.flat p {
  margin-top: 8px;
}
pre[data-reply] {
  transition: border-color 0.3s, background 0.3s;
}
pre[data-reply].on {
  border-color: var(--green-b);
  background: #e9f8f0;
}
.toast {
  margin: 12px auto 0;
  width: fit-content;
  background: #12352a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s, transform 0.4s var(--spring);
}
.toast.on {
  opacity: 1;
  transform: none;
}
.hint {
  font-size: 13px;
  color: var(--ink3);
  text-align: center;
  margin-top: 10px;
}

/* 功能格子 */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.grid .card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}
.grid .card.w3 {
  grid-column: span 3;
}
.grid .card.w4 {
  grid-column: span 4;
}
.grid .card .demo {
  margin-top: auto;
  padding-top: 24px;
}
.card.mint {
  background: var(--mint);
}
.card.lilac {
  background: var(--lilac);
}
.card.lemon {
  background: #fff3c9;
}
.card.art {
  padding-bottom: 0;
  overflow: hidden;
}
.card.art img {
  margin: 12px -30px 0;
  max-width: none;
  width: calc(100% + 60px);
}
.matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  font-size: 14.5px;
  table-layout: fixed;
}
.matrix th {
  font-weight: 700;
  color: var(--ink2);
  padding: 4px;
  text-align: center;
}
.matrix th:first-child {
  text-align: left;
  width: 68px;
}
.matrix td {
  background: #f4faf7;
  border-radius: 12px;
  padding: 9px 6px;
  text-align: center;
  font-weight: 600;
  color: var(--ink2);
}
.matrix td.wake {
  background: var(--coral-soft);
  color: var(--coral);
}
.matrix td.now {
  background: var(--mint);
  color: var(--green);
}
.matrix td.hold {
  background: var(--lilac);
  color: #3b4f9c;
}
.chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.chain li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
}
.chain b {
  flex: none;
  width: 64px;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pills span {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 600;
}
.bar {
  display: flex;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.bar span {
  display: grid;
  place-items: center;
}
.bar .work {
  background: var(--green-b);
  flex: 10;
}
.bar .after {
  background: #5fb4ec;
  flex: 4.5;
}
.bar .sleep {
  background: #8c8be6;
  flex: 8.5;
}
.bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink3);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* 截图 */
.shots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}
.shots figure {
  margin: 0;
}
.shots .phone {
  border-width: 6px;
  border-radius: 30px;
  transition: transform 0.45s var(--spring);
}
.shots figure:hover .phone {
  transform: translateY(-10px) rotate(-1.2deg);
}
.shots figcaption {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink2);
  text-align: center;
}
.shots figcaption b {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

/* 绑定步骤 */
.bind {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
}
.bind ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: n;
  display: grid;
  gap: 14px;
}
.bind li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  color: var(--ink2);
  font-size: 16px;
}
.bind li::before {
  content: counter(n);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.bind li b {
  color: var(--ink);
}

/* 结尾 */
.end {
  background: var(--mint);
  border-radius: var(--r-xl);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  overflow: hidden;
}
.end .txt {
  padding: 56px;
}
.end h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.2;
}
.end p {
  margin-top: 14px;
  color: var(--ink2);
}
.end .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
footer {
  padding: 48px 0 56px;
  color: var(--ink3);
  font-size: 14px;
}
footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 14px;
}
footer a {
  color: var(--ink2);
  text-decoration: none;
  font-weight: 600;
}
footer a:hover {
  color: var(--green);
}

/* 滚动进场：只在支持脚本、且用户没要求减少动效时生效 */
.js .rise {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.5s, transform 0.7s var(--spring);
}
.js .rise.in {
  opacity: 1;
  transform: none;
}

/* ---------- 接入文档 ---------- */
.docs {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 44px;
  padding: 20px 0 80px;
  align-items: start;
}
.docs aside {
  position: sticky;
  top: 20px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 14px;
}
.docs aside a {
  display: block;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--ink2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
}
.docs aside a:hover {
  background: var(--bg);
}
.docs aside a[aria-current] {
  background: var(--mint);
  color: var(--ink);
}
.docs aside .base {
  margin: 12px 6px 4px;
  padding-top: 12px;
  border-top: 1.5px solid var(--line);
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.5;
}
.docs aside .base code {
  display: block;
  color: var(--ink);
  word-break: break-all;
  margin-top: 2px;
}
.doc {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 44px 52px 52px;
  min-width: 0;
  font-size: 16.5px;
}
.doc h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.doc h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 48px 0 14px;
  padding-top: 8px;
  line-height: 1.3;
}
.doc h3 {
  font-size: 19px;
  font-weight: 800;
  margin: 32px 0 10px;
}
.doc p,
.doc ul,
.doc ol,
.doc pre,
.doc .tbl {
  margin: 14px 0;
}
.doc ul,
.doc ol {
  padding-left: 1.4em;
}
.doc li {
  margin: 5px 0;
}
.doc :not(pre) > code {
  background: #eef7f2;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.87em;
  color: #0b5c40;
  word-break: break-word;
}
.doc .tbl {
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.6;
}
.doc th,
.doc td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--line);
  vertical-align: top;
}
.doc th {
  background: #f4faf7;
  font-weight: 700;
  white-space: nowrap;
}
.doc tr:last-child td {
  border-bottom: 0;
}
.doc .code {
  position: relative;
}
.doc .code button {
  position: absolute;
  top: 8px;
  right: 8px;
  font: 600 12.5px var(--font);
  border: 0;
  border-radius: 9px;
  padding: 5px 11px;
  background: #fff;
  color: var(--ink2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, transform 0.25s var(--spring);
}
.doc .code:hover button,
.doc .code button:focus-visible {
  opacity: 1;
}
.doc .code button:active {
  transform: scale(0.92);
}
.doc .pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
  font-weight: 700;
}
.doc .pager a {
  text-decoration: none;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 56px;
  }
  .stage {
    max-width: 560px;
  }
  /* 用 minmax(0, 1fr)：单写 1fr 时代码块的最小宽度会把整列撑出屏幕 */
  .flow,
  .bind,
  .end {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid .card,
  .grid .card.w3,
  .grid .card.w4 {
    grid-column: span 6;
  }
  .shots {
    grid-template-columns: repeat(5, 62%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: -24px;
    padding-inline: 24px;
  }
  .shots figure {
    scroll-snap-align: center;
  }
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .docs aside {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 8px;
  }
  .docs aside a {
    white-space: nowrap;
  }
  .docs aside .base {
    display: none;
  }
  .doc {
    padding: 28px 22px 36px;
  }
  .doc h1 {
    font-size: 32px;
  }
  section {
    padding: 56px 0;
  }
  .end .txt {
    padding: 36px 28px 8px;
  }
}
@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .stage .push {
    width: 80%;
    left: 4%;
    top: 34%;
    padding: 14px;
  }
  .stage .phone {
    left: 42%;
    width: 56%;
    border-width: 7px;
    border-radius: 34px;
  }
  .stage .chip {
    top: 76%;
    left: 6%;
  }
  /* 横滑的截图条要贴到屏幕边：负边距跟着这一档的页边距（18px）走 */
  .shots {
    margin-inline: -18px;
    padding-inline: 18px;
  }
  .top {
    gap: 8px;
  }
  .top nav a {
    padding: 8px 10px;
    font-size: 15px;
  }
  .top nav a.hide-s {
    display: none;
  }
  .card {
    padding: 24px 22px;
  }
  .card.art img {
    margin-inline: -22px;
    width: calc(100% + 44px);
  }
  .matrix {
    font-size: 13px;
    border-spacing: 4px;
  }
  .matrix th:first-child {
    width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .js .rise {
    opacity: 1;
    transform: none;
  }
}

/* 文档表格第一列多是字段名，不拆行 */
.doc td:first-child code {
  white-space: nowrap;
  word-break: normal;
}

/* 演示里点完按钮要把按钮收起来：上面给 .acts 设了 display，hidden 属性要单独写 */
.push .acts[hidden] {
  display: none;
}
