/*
 * 里程笺官网（odomemo.cn）的样式。颜色和字体跟车机版一样（public/static/pair.css），默认深色，系统是浅色时跟着变浅。
 * 不加载任何外部资源（字体、脚本都没有）：CSP 只许本站的样式和图片，见 site/conf/default.conf。
 */

:root {
  color-scheme: dark;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;

  --r-xl: 22px;
  --r-lg: 18px;

  --bg: #0b0c0e;
  --surface: #16181c;
  --surface-2: #1e2126;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f5f7;
  --text-2: #b6bbc5;
  --hint: #979daa;
  --accent: #7d9aff;
  --accent-fill: #3d5fd9;
  --accent-soft: rgba(111, 143, 255, 0.16);
  --green: #3ddc84;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #eef0f3;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --line: rgba(17, 24, 39, 0.09);
    --line-strong: rgba(17, 24, 39, 0.2);
    --text: #111318;
    --text-2: #464c5a;
    --hint: #5c6271;
    --accent: #2d55c4;
    --accent-fill: #3059c9;
    --accent-soft: rgba(48, 89, 201, 0.11);
    --green: #15803d;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.07);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ 顶栏 */

.top .wrap {
  display: flex;
  align-items: center;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand .latin {
  color: var(--hint);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ 首屏 */

.hero {
  display: grid;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 56px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 88px;
  }
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero h1 span {
  display: inline-block;
}

.lead {
  margin-top: 20px;
  max-width: 32em;
  color: var(--text-2);
  font-size: 17px;
}

@media (min-width: 720px) {
  .lead {
    font-size: 18px;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* 示意卡片：车机上那种「上次行程 / 上次充电」 */
.sample {
  margin: 0;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sample .item + .item {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sample .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--hint);
  font-size: 14px;
}

.sample .row b {
  color: var(--text-2);
  font-weight: 500;
}

.sample .big {
  margin-top: 6px;
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sample .big small {
  margin-left: 6px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
}

.sample .meta {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sample figcaption {
  margin-top: 18px;
  color: var(--hint);
  font-size: 12px;
}

/* ------------------------------------------------------------------ 功能 */

.section {
  padding-bottom: 64px;
}

.section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards li {
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cards h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.cards p {
  color: var(--text-2);
  font-size: 15px;
}

/* ------------------------------------------------------------------ 数据承诺 */

.points {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .points {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
}

.points li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 15px;
}

.points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
}

/* ------------------------------------------------------------------ 页脚 */

.foot {
  padding-bottom: 40px;
  color: var(--hint);
  font-size: 13px;
}

.foot > div {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.foot p + p {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ 单独的小页面（授权回调、404） */

.note {
  max-width: 36em;
  padding-top: 48px;
  padding-bottom: 80px;
}

.note h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

.note p {
  color: var(--text-2);
}

.note p + p {
  margin-top: 12px;
}
