/* ============================================================================
   睛护日记官网 · 样式系统

   配色取自 Android 端 app/src/main/res/values/colors.xml，官网与客户端说同一种语言。
   整页骨架是「一条视力曲线」：
     · 首屏 —— 曲线横贯视口，左端伸进真机截图，右端停在下载按钮上；
     · 下面 —— 同一条线换成沿页面向下的时间轴（.rail），七段内容挂在轴上。
   不引外部字体 / 脚本 / CDN —— 服务器不联外网也要能正常打开。
   ========================================================================= */

:root {
  /* 品牌 */
  --brand: #0E7490;
  --brand-lt: #22A2BD;
  --brand-mid: #1E40AF;
  --brand-violet: #5B21B6;
  --container: #D6EEF4;
  --on-container: #0B3B46;

  /* 底与面 */
  --page: #F5FAFB;
  --surface: #FFFFFF;
  --surface-2: #F0F7F9;
  --border: #CBE5EC;
  --divider: #E0EEF2;

  /* 字 */
  --text: #0F3B44;
  --text-2: #3E5E66;
  /* text-3 在 #F5FAFB 上是 4.82:1，在纯白卡上是 5.08:1；再浅一档就跌破 AA 了 */
  --text-3: #56737B;

  /* 数据色（与 App 图表一致） */
  --series-left: #0E7490;
  --series-right: #EA580C;
  --series-left-on-dark: #5FD3E8;
  --series-right-on-dark: #FFA45B;

  /* 渐变：只在曲线带与头部出现 */
  --aurora: linear-gradient(118deg, #0E7490 0%, #1E40AF 56%, #5B21B6 100%);

  /* 间距节奏 */
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 14px;
  --gap-4: 22px;
  --gap-5: 34px;
  --gap-6: 54px;
  --gap-7: 86px;

  --radius: 14px;
  --radius-lg: 20px;
  --shell: 1180px;

  /* 深度：偏移 + 软模糊，不是零偏移光晕 */
  --shadow-1: 0 1px 2px rgba(15, 59, 68, .06), 0 6px 16px -10px rgba(15, 59, 68, .22);
  --shadow-2: 0 2px 4px rgba(15, 59, 68, .07), 0 20px 44px -22px rgba(15, 59, 68, .34);
  /* 落在渐变带上的阴影用纯中性黑：深青色阴影压在深底上会变成彩色光晕 */
  --shadow-on-dark: 0 3px 8px rgba(0, 0, 0, .26), 0 34px 70px -30px rgba(0, 0, 0, .52);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 浏览器自带的那几处表面，也按配色来 */
::selection { background: #0E7490; color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }
* { scrollbar-color: #A9CFD9 transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #A9CFD9; border: 3px solid var(--page); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #7FB8C7; }

/* height:auto 必须写：img 的 height 属性是尺寸提示，不写就会被拉成原始像素高 */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--on-container); }

h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.28; }

.num, time, .stat, code, kbd { font-variant-numeric: tabular-nums; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 28px; }

/* ============================================================ 顶部导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  /* 深底而不是亮青：半透明的亮青底会把白字的对比度拽到 3.7:1 */
  background: rgba(11, 59, 70, .93);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}
.nav .shell { display: flex; align-items: center; gap: var(--gap-5); height: 62px; }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #FFFFFF;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: .02em;
  text-decoration: none;
  flex: none;
}
.nav-brand:hover { color: #FFFFFF; }
.nav-brand svg { width: 25px; height: 25px; flex: none; }
.nav-links { display: flex; gap: var(--gap-5); margin-left: auto; font-size: 15px; }
.nav-links a { color: rgba(255, 255, 255, .88); text-decoration: none; padding: 6px 0; }
.nav-links a:hover { color: #FFFFFF; }
.nav-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 17px;
  border-radius: 99px;
  background: #FFFFFF;
  color: var(--brand);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.nav-cta:hover { color: var(--on-container); }

/* ============================================================ 按钮 */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 99px;
  background: #FFFFFF;
  color: var(--brand);
  font-size: 16.5px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--shadow-2);
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .18s;
}
.cta:hover { color: var(--on-container); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cta:active { transform: translateY(0); }
.cta svg { width: 19px; height: 19px; flex: none; }

.cta-solid { background: var(--brand); color: #FFFFFF; }
.cta-solid:hover { background: var(--on-container); color: #FFFFFF; }

/* ------------------------------------------------ 首屏：曲线带 */

.hero {
  position: relative;
  background: var(--aurora);
  color: #FFFFFF;
  padding: 46px 0 48px;
  overflow: visible;
}

.hero-head { max-width: 46em; }
.hero h1 {
  font-size: clamp(2.15rem, 4.1vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -.015em;
  max-width: 15em;
}
.hero h1 em { font-style: normal; position: relative; white-space: nowrap; }
/* 标题里的「一条看得见的线」下面压一道短线，用的是同一组数据色 */
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.12em;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--series-left-on-dark), var(--series-right-on-dark));
  opacity: .85;
}
.hero-lede {
  margin: var(--gap-4) 0 0;
  max-width: 40em;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .93);
}
.hero-lede b { font-weight: 650; color: #FFFFFF; }

/* 图例与读数用 HTML 排版而不是画在 SVG 里：SVG 里的字号会随 viewBox 一起缩放，
   到了手机上只剩几个像素，等于没有 */
.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--gap-4);
  margin: var(--gap-5) 0 10px;
  padding-left: 30%;
  font-size: 14px;
  color: rgba(255, 255, 255, .92);
}
.chart-legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend .lg::before { content: ""; width: 20px; height: 3px; border-radius: 99px; flex: none; }
.chart-legend .lg-left::before { background: var(--series-left-on-dark); }
.chart-legend .lg-right::before { background: var(--series-right-on-dark); }
.chart-legend .lg-unit {
  margin-left: auto;
  letter-spacing: .06em;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .9);
}

.chart-wrap { position: relative; }
.hero-chart { display: block; width: 100%; height: auto; }
.chart-narrow { display: none; }

/* 曲线自己生长：默认已经画完，支持滚动驱动动画的浏览器上才沿滚动重播。
   注意用 animation-fill-mode: none —— 用 both 的话，时间轴还没进入范围时元素会被
   钉在「未开始」那一帧（线是空的、轴是白的），默认可见就没了。 */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-chart .series-line {
      stroke-dasharray: var(--len, 900);
      stroke-dashoffset: 0;
      animation: draw 1s linear none;
      animation-timeline: view();
      animation-range: entry 20% cover 60%;
    }
    .hero-chart .series-dot {
      animation: pop .5s cubic-bezier(.16, 1, .3, 1) none;
      animation-timeline: view();
      animation-range: entry 26% cover 62%;
    }
  }
}
@keyframes draw { from { stroke-dashoffset: var(--len, 900); } to { stroke-dashoffset: 0; } }
@keyframes pop  { from { opacity: 0; } to { opacity: 1; } }

/* 最新一次记录的那两点，缓慢呼吸——全页唯一持续动的元素 */
.hero-chart .now-dot { transform-origin: center; animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { opacity: .28; transform: scale(1); }
  50%      { opacity: 0;   transform: scale(2.4); }
}

/* 真机截图压在曲线左下端：两条线从它右边长出来，它自己往下一段沉一点 */
.hero-phone {
  position: absolute;
  left: 0;
  top: 5%;
  width: 21.5%;
  margin: 0;
  z-index: 3;
}
.hero-phone img { width: 100%; border-radius: 24px; box-shadow: var(--shadow-on-dark); }

/* 下载动作钉在曲线右端停下来的高度上（两条线终点 45.1% 与 68.6% 的中点） */
.hero-cta {
  position: absolute;
  right: 0;
  top: 56.9%;
  transform: translateY(-52%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.hero .cta { box-shadow: var(--shadow-on-dark); }
.chart-meta { font-size: 13.5px; color: rgba(255, 255, 255, .93); letter-spacing: .01em; }

.chart-readout {
  position: absolute;
  right: 0;
  bottom: 4px;
  margin: 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .92);
}
.chart-readout b { font-weight: 650; color: #FFFFFF; font-variant-numeric: tabular-nums; }

/* ============================================================ 通用段落 */

.band { padding: var(--gap-7) 0; }
/* 首屏那台手机往下一段沉了约 60px，紧跟着的段落要让出位置 */
.hero + .band { padding-top: calc(var(--gap-7) + 40px); }

.sec-head { margin-bottom: var(--gap-6); }
.sec-head h2 {
  font-size: clamp(1.6rem, 2.7vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.012em;
  max-width: 20em;
}
.sec-head p { margin: var(--gap-3) 0 0; max-width: 46em; color: var(--text-2); font-size: 17px; }

/* ============================================================ 脊柱：曲线沿页面往下走
   同一条线的第二种形态——横轴变成竖轴，数据点变成站点。
   站点线用图表的网格色，站点用图表自己的数据点样式，轴身在滚动时被颜色填满。 */

.rail { position: relative; padding-left: 84px; }

.rail-line {
  position: absolute;
  left: 30px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--divider);
  border-radius: 99px;
  overflow: hidden;
}
.rail-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-mid) 52%, var(--series-right));
  transform-origin: top center;
  transform: scaleY(1);
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rail-fill {
      animation: railfill 1s linear none;
      animation-timeline: view();
      animation-range: entry 8% cover 78%;
    }
  }
}
@keyframes railfill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.rail-items { list-style: none; margin: 0; padding: 0; }

.rail-item { position: relative; padding: var(--gap-4) 0 var(--gap-6); }
/* 站点线：从轴身横穿到内容右缘，就是图表里那条网格线 */
.rail-item::after {
  content: "";
  position: absolute;
  left: -46px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--divider);
}
/* 站点：与曲线上的数据点同一种画法 */
.rail-item::before {
  content: "";
  position: absolute;
  left: -52px;
  top: -5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand-lt);
  box-shadow: 0 0 0 3px var(--page);
  z-index: 2;
}
.rail-item:last-child { padding-bottom: 0; }

.rail-item h3 { font-size: 20px; font-weight: 680; letter-spacing: -.01em; }
.rail-item > p { margin: var(--gap-2) 0 0; color: var(--text-2); font-size: 16.5px; max-width: 40em; }
.rail-item .rail-src { font-size: 14px; color: var(--text-3); }
.rail-item .rail-src b { color: var(--text-2); font-weight: 600; }

.rail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-2) var(--gap-5);
  margin-top: var(--gap-4);
}
.cap-fact { display: flex; align-items: baseline; gap: 8px; }
.cap-fact .stat { font-size: 25px; font-weight: 700; letter-spacing: -.02em; color: var(--brand); }
.cap-fact .cap-fact-label { font-size: 14px; color: var(--text-3); }

/* 截图宽度逐条不同，让节奏不落在同一根栅格上 */
.rail-shot {
  margin: var(--gap-4) 0 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.rail-shot img { width: 100%; }
.rail-shot figcaption {
  padding: 10px 14px 12px;
  font-size: 13px;
  color: var(--text-3);
  border-top: 1px solid var(--divider);
}
.rail-shot-lg { width: 360px; }
.rail-shot-md { width: 286px; }
.rail-shot-sm { width: 238px; }

/* 演示数据要标出来，不能冒充真实用户 */
.demo-flag {
  display: inline-block;
  margin-top: var(--gap-6);
  font-size: 13px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: 99px;
  padding: 4px 12px;
}

/* ============================================================ 不做什么 */

.limits {
  background: var(--on-container);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: var(--gap-6) var(--gap-6) var(--gap-5);
}
.limits h2 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); font-weight: 700; max-width: 22em; }
.limits > p { margin: var(--gap-3) 0 0; max-width: 46em; color: rgba(255, 255, 255, .82); }
.limits ul {
  list-style: none;
  margin: var(--gap-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-4) var(--gap-6);
}
.limits li { padding-left: 30px; position: relative; }
.limits li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, .45);
}
/* 勾用曲线带上的那支青色，不用另起一个不在配色里的薄荷绿 */
.limits li::after {
  content: "";
  position: absolute;
  left: 4.5px; top: .72em;
  width: 6px; height: 3px;
  border-left: 1.6px solid var(--series-left-on-dark);
  border-bottom: 1.6px solid var(--series-left-on-dark);
  transform: rotate(-45deg);
}
.limits li b { display: block; font-weight: 650; font-size: 16.5px; }
.limits li span { color: rgba(255, 255, 255, .76); font-size: 15px; }

/* ============================================================ 下载 */

.dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--gap-6);
  align-items: start;
}
/* 网格子项默认的 auto 最小宽度会被长内容顶开，显式归零 */
.dl-main, .dl-card { min-width: 0; }
.dl-main h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; }
.dl-main > p { margin: var(--gap-3) 0 0; color: var(--text-2); max-width: 40em; }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-4); margin-top: var(--gap-5); }
.dl-note { font-size: 14px; color: var(--text-3); }

.dl-steps { margin: var(--gap-5) 0 0; padding: 0; list-style: none; counter-reset: s; max-width: 40em; }
.dl-steps li {
  counter-increment: s;
  position: relative;
  padding: 9px 0 9px 38px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-2);
  font-size: 15.5px;
}
.dl-steps li:last-child { border-bottom: 0; }
.dl-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 11px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--container);
  color: var(--on-container);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* 这张卡只走「描边」一条路：不再叠软高程，免得变成描边 + 阴影的生成式签名 */
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-4);
}
.dl-card h3 { font-size: 16px; font-weight: 680; }
.dl-rows { margin: var(--gap-3) 0 0; font-size: 14.5px; }
.dl-rows div {
  display: flex;
  justify-content: space-between;
  gap: var(--gap-3);
  padding: 7px 0;
  border-bottom: 1px solid var(--divider);
}
.dl-rows div:last-child { border-bottom: 0; }
.dl-rows dt, .dl-rows .k { color: var(--text-3); flex: none; }
.dl-rows dd, .dl-rows .v {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
/* 64 位十六进制是一整串不可断的词，不写断词规则它会把整个下载区顶宽到 460px */
.dl-hash {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  word-break: break-all;
  overflow-wrap: anywhere;
}
.dl-card .cta { width: 100%; justify-content: center; margin-top: var(--gap-4); }

/* ============================================================ 页脚 */

.foot {
  border-top: 1px solid var(--divider);
  margin-top: var(--gap-7);
  padding: var(--gap-5) 0 var(--gap-6);
  color: var(--text-3);
  font-size: 13.5px;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-4) var(--gap-6);
  align-items: baseline;
  justify-content: space-between;
}
.foot-links { display: flex; flex-wrap: wrap; gap: var(--gap-5); }
.foot-links a { color: var(--text-2); text-decoration: none; }
.foot-links a:hover { color: var(--brand); text-decoration: underline; }
.foot-legal { line-height: 2; text-align: right; }
.foot-legal a { color: var(--text-2); }
.foot-note { margin-top: var(--gap-4); max-width: 66ch; color: var(--text-3); }

/* ============================================================ 文档页（隐私政策 / 用户协议） */

.doc-wrap { padding: var(--gap-6) 0 0; }
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 44px 42px;
  max-width: 46em;
  margin: 0 auto;
}
.doc h1 { font-size: 25px; font-weight: 700; }
.doc .meta { color: var(--text-3); font-size: 13.5px; margin: 8px 0 var(--gap-5); line-height: 1.8; }
.doc h2 {
  font-size: 17px;
  font-weight: 680;
  margin: var(--gap-5) 0 var(--gap-2);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--divider);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc p { margin: var(--gap-2) 0; font-size: 15.5px; }
.doc ul { padding-left: 22px; margin: var(--gap-2) 0; }
.doc li { margin: 6px 0; font-size: 15.5px; }
.doc b { font-weight: 650; }
.doc a { word-break: break-all; }
/* 提示块靠底色深浅区分，不用「圆角 + 单边强调色条」那套 */
.doc .box {
  background: #E9F4F8;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 18px;
  margin: var(--gap-4) 0;
}
.doc .box p:first-child { margin-top: 0; }
.doc .box p:last-child  { margin-bottom: 0; }

/* ============================================================ 自适应 */

@media (max-width: 1080px) {
  .dl { grid-template-columns: 1fr; }
  .dl-card { max-width: 420px; }
}

@media (max-width: 940px) {
  :root { --gap-6: 40px; --gap-7: 58px; }
  body { font-size: 16px; }
  .shell { padding: 0 20px; }
  .nav-links { display: none; }

  /* 首屏改成竖排：图例 → 曲线 → 读数与按钮 → 真机截图。
     手机不再压在图上是它会把刻度整个挡住；曲线也不再横贯，换成竖向重投影的那份。 */
  .hero { padding-top: 34px; }
  .hero-cta, .chart-readout { position: static; transform: none; }
  .chart-wrap { display: flex; flex-direction: column; }
  .chart-wide { display: none; }
  .chart-narrow { display: block; order: 1; }
  .chart-readout { order: 2; margin-top: 8px; text-align: left; }
  .hero-cta { order: 3; align-items: flex-start; margin-top: var(--gap-4); }
  .hero-phone { position: static; order: 4; width: 178px; margin-top: var(--gap-5); }
  .chart-legend { padding-left: 0; margin-top: var(--gap-4); }
  .hero + .band { padding-top: var(--gap-7); }

  .rail { padding-left: 34px; }
  .rail-line { left: 8px; }
  .rail-item::after { left: -26px; }
  .rail-item::before { left: -32px; }
  .rail-shot-lg, .rail-shot-md, .rail-shot-sm { width: 100%; max-width: 300px; }

  .limits { padding: var(--gap-5) var(--gap-4); }
  .limits ul { grid-template-columns: 1fr; }
  .doc { padding: 26px 20px 30px; border-radius: var(--radius); }
  .foot-grid { flex-direction: column; align-items: flex-start; }
  .foot-legal { text-align: left; }
}

@media (max-width: 620px) {
  .hero-phone { width: 156px; }
  .chart-legend { font-size: 13.5px; gap: var(--gap-3); }
  .chart-legend .lg-unit { display: none; }
  .rail-item h3 { font-size: 18px; }
  .cap-fact .stat { font-size: 22px; }
}