/* 不吃灰官网。颜色和 App 一致（DESIGN.md 2）：深墨 = 理性，温度色 = 冲动，灰尘 = 浪费，绿色 = 回本。
   CSP 不允许行内样式，所有样式都在这里。 */

:root {
  --ground: #F3F6F8;
  --surface: #FFFFFF;
  --ink: #13202A;
  --ink-2: #52616D;
  --ink-3: #5F6C77;
  --line: #D3DCE3;
  --line-soft: #EDF1F4;
  --track: #E6ECF0;
  --hot: #F0643A;
  --hot-text: #C8431A;
  --hot-tile: #FFE1D4;
  --frost-text: #2C6A92;
  --frost-tile: #E2EDF5;
  --paid: #1F7A5C;
  --paid-tile: #DDF1E8;
  --night: #0E1820;
  --night-2: #13202A;
  --night-text: #EEF3F6;
  --night-soft: #9FB3C1;
  --heat: linear-gradient(90deg, #9CC6E4 0%, #CFE4F2 28%, #F6C98A 62%, #F0643A 100%);
  --shadow: 0 1px 2px rgba(19, 32, 42, .05), 0 8px 24px rgba(19, 32, 42, .05);
  --shadow-phone: 0 2px 6px rgba(19, 32, 42, .08), 0 30px 60px -20px rgba(19, 32, 42, .28);
  --radius: 24px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

:lang(zh-Hant) { --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(ja) { --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
:lang(ko) { --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 中日文按字断行，但遵守避头尾（句号不跑到行首）；韩文按词断行。 */
body:lang(zh-Hans), body:lang(zh-Hant), body:lang(ja) { line-break: strict; }
body:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
/* 日文标题按词组断行（Chrome 支持 auto-phrase，其他浏览器照常按字断）。 */
body:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
/* 首屏大标题只在标点处换行，「ひと呼吸」这种词不拆开。 */
.hero h1 span { word-break: keep-all; overflow-wrap: anywhere; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--surface); text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--frost-text); outline-offset: 3px; border-radius: 6px; }

/* MARK: 顶栏 */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(243, 246, 248, .82);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid rgba(211, 220, 227, .6);
}
.site-header .bar {
  width: min(1120px, 100% - 32px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; flex-shrink: 0; }
.brand img { border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.site-nav > a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.site-nav > a:hover, .site-nav > a[aria-current="page"] { color: var(--ink); background: var(--surface); }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; color: var(--ink-2);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: var(--surface); color: var(--ink); }
.globe {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.6px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) center / 1.4px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1.4px no-repeat;
}
.lang ul {
  position: absolute; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; min-width: 150px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow);
}
.lang li a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); }
.lang li a:hover { background: var(--ground); color: var(--ink); }
.lang li a[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* MARK: 首屏 */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: 56px;
  padding-block: 72px 88px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
.hero h1 span { display: block; }
.heat-text {
  background: linear-gradient(90deg, #3F7396 0%, #B4600B 55%, #F0643A 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.intro { margin-top: 24px; max-width: 34em; font-size: 18px; color: var(--ink-2); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 18px;
  background: var(--ink); color: var(--surface);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.cta.is-soon { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.platform { font-size: 14px; color: var(--ink-3); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  margin: 0;
  width: min(300px, 78vw);
  border-radius: 46px;
  padding: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-phone);
}
.phone .screen { width: 100%; border-radius: 38px; }
.phone-hero { position: relative; z-index: 1; }

.thermometer {
  position: absolute; z-index: 0;
  left: 50%; top: 50%; width: min(520px, 110%); height: 14px;
  transform: translate(-50%, -50%) rotate(-12deg);
  border-radius: 999px; background: var(--heat);
  opacity: .9;
}
.thermometer .dot {
  position: absolute; top: 50%; left: 63%;
  width: 26px; height: 26px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--surface); border: 3px solid #F6C98A;
  box-shadow: var(--shadow);
}
.thermometer .label {
  position: absolute; top: 22px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.thermometer .cold { left: 0; }
.thermometer .hot { right: 0; color: var(--hot-text); }

/* MARK: 分区标题 */

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; }

/* MARK: 三道防线 */

.defenses { padding-block: 96px; background: var(--surface); }
.defense {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 64px;
  padding-block: 40px;
}
.defense + .defense { border-top: 1px solid var(--line-soft); }
.defense:nth-of-type(even) .defense-text { order: 2; }
.defense .phone { width: 280px; background: var(--ground); box-shadow: var(--shadow); }
.defense-text { max-width: 520px; }
.defense-text h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 14px 0 16px; letter-spacing: -.02em; }
.defense-text p:not(.tag) { color: var(--ink-2); font-size: 17px; }
.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.tag-1 { background: var(--hot-tile); color: #B23A12; }
.tag-2 { background: var(--ink); color: var(--night-text); }
.tag-3 { background: var(--paid-tile); color: #1F5E48; }

/* MARK: 还有这些 */

.more { padding-block: 96px; }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px 24px 28px;
  box-shadow: var(--shadow);
}
.card-index { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--hot-text); }
.card h3 { font-size: 19px; font-weight: 700; margin: 10px 0 8px; }
.card p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.card:nth-child(2) .card-index { color: var(--paid); }
.card:nth-child(3) .card-index, .card:nth-child(6) .card-index { color: var(--frost-text); }
.card:nth-child(5) .card-index { color: #B4600B; }

/* MARK: 隐私条 */

.privacy-band { background: var(--night); color: var(--night-text); padding-block: 88px; }
.privacy-band .wrap { max-width: 760px; }
.privacy-band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.privacy-band p { margin-top: 18px; font-size: 18px; color: #C6D3DC; }
.privacy-band .text-link { color: #6FD3A8; margin-top: 22px; display: inline-block; }

.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* MARK: 收尾 */

.closing { padding-block: 104px 112px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.heat-bar { width: 120px; height: 8px; border-radius: 999px; background: var(--heat); margin-bottom: 32px; }
.closing h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; max-width: 22em; letter-spacing: -.02em; }
.closing p { margin: 16px 0 32px; color: var(--ink-2); font-size: 18px; }

/* MARK: 隐私政策 · 支持页 */

.doc { padding-block: 64px 96px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.updated { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.lead { margin-top: 24px; font-size: 19px; color: var(--ink-2); }
.toc {
  margin: 40px 0 16px; padding: 22px 26px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.toc h2 { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; font-size: 15px; }
.toc li { break-inside: avoid; padding: 3px 0; color: var(--ink-3); }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc section { padding-top: 40px; }
.doc section h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.doc section p { color: var(--ink-2); }
.doc section p + p { margin-top: 12px; }
.doc a[href^="mailto:"] { color: var(--frost-text); font-weight: 600; text-decoration: none; }
.doc a[href^="mailto:"]:hover { text-decoration: underline; }

/* MARK: 404 */

.not-found { padding-block: 96px 120px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.frost-tile {
  width: 88px; height: 88px; border-radius: 26px; margin-bottom: 28px;
  background: linear-gradient(135deg, #D6E8F4, #EEF5FA);
  box-shadow: inset 0 0 0 1px rgba(44, 106, 146, .15);
}
.nf-block h1 { font-size: 34px; font-weight: 800; }
.nf-block p { margin: 12px 0 20px; color: var(--ink-2); }
.nf-block .text-link { color: var(--frost-text); }
.nf-other { margin-top: 10px; font-size: 14px; }
.nf-other:first-of-type { margin-top: 40px; }
.nf-other a { color: var(--ink-3); text-decoration: none; }

/* MARK: 页脚 */

.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; font-size: 14px; color: var(--ink-3); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-top .brand { color: var(--ink); font-size: 15px; }
.footer-top .brand img { border-radius: 6px; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-top nav a { text-decoration: none; color: var(--ink-2); }
.footer-top nav a:hover { color: var(--ink); }
.footer-langs { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-langs a { text-decoration: none; color: var(--ink-3); }
.footer-langs a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.footer-note { margin-top: 10px; }

/* MARK: 窄屏 */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-block: 48px 72px; text-align: left; }
  .defense { grid-template-columns: 1fr; gap: 32px; justify-items: center; }
  .defense:nth-of-type(even) .defense-text { order: 0; }
  .defense-text { max-width: 640px; justify-self: start; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wide-only { display: none; }
  .site-header .bar { gap: 8px; }
  .site-nav { gap: 0; font-size: 14px; }
  .site-nav > a { padding: 8px 8px; }
  .lang summary { padding: 8px 8px; }
  .lang summary span:not(.globe) { display: none; }
  .intro, .lead, .privacy-band p, .closing p { font-size: 17px; }
  .defenses, .more { padding-block: 72px; }
  .section-head { margin-bottom: 28px; }
  .defense { padding-block: 32px; }
  .defense .phone { width: min(280px, 82vw); }
  .cards { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
