/*
 * [INPUT]: Oath "Monochrome Chrome" tokens (DESIGN.md), self-hosted Figtree.
 * [OUTPUT]: Shared styles for the home page, support and legal pages.
 * [POS]: website style layer; zero hue, chrome only for primary actions.
 * [PROTOCOL]: 变更时更新此头部，然后检查 AGENT.md
 */
@font-face { font-family: Figtree; src: url("fonts/Figtree-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: Figtree; src: url("fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url("fonts/Figtree-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Figtree; src: url("fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --canvas: #0f0f0f;
  --spotlight: #3a3a3a;
  --surface: #1c1c1c;
  --raised: #242424;
  --well: #080808;
  --hairline: rgba(255, 255, 255, .07);
  --edge: rgba(255, 255, 255, .16);
  --text: #f4f4f4;
  --text-2: #a3a3a3;
  --text-3: #6b6b6b;
  --fog: #9a9a9a;
  --on-chrome: #141414;
  --chrome: linear-gradient(180deg, #f7f7f7 0%, #d2d2d2 55%, #a6a6a6 100%);
  --glass: linear-gradient(180deg, rgba(122, 122, 122, .85), rgba(58, 58, 58, .85));
  --expiring: #e5484d;
  --gutter: 18px;
  --wide: 1160px;
  --read: 720px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-card: 24px;
  --r-feature: 30px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--canvas);
  background-image:
    radial-gradient(ellipse 75% 55% at 50% -6%, var(--spotlight) 0%, rgba(58, 58, 58, .35) 38%, transparent 72%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 100% 100%, 34px 34px, 34px 34px;
  background-repeat: no-repeat, repeat, repeat;
  background-position: top center, center top, center top;
  color: var(--text);
  font: 400 16px/1.65 Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Grid fades out below the first screen; grain sits over everything at 5%. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("brand/grain.png");
  opacity: .05;
  z-index: 100;
}
body::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 140vh;
  pointer-events: none;
  background: linear-gradient(transparent 55%, var(--canvas));
  z-index: -1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: #d2d2d2; color: var(--on-chrome); }
:focus-visible { outline: 2px solid #d2d2d2; outline-offset: 4px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 12px; padding: 10px 18px; background: var(--chrome); color: var(--on-chrome); border-radius: 999px; z-index: 200; font-weight: 500; text-decoration: none; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  background: linear-gradient(rgba(15, 15, 15, .82), rgba(15, 15, 15, .55));
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 21px; letter-spacing: -.3px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--hairline); }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--text-2); text-decoration: none; transition: color .2s; }
.site-nav a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px;
  border-radius: 999px;
  background: var(--chrome);
  color: var(--on-chrome);
  font: 500 17px/1 Figtree, sans-serif;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease), filter .2s;
}
.button:hover { filter: brightness(1.04); }
.button:active { transform: scale(.97); filter: brightness(.96); }
.button svg { width: 19px; height: 19px; }
.button.compact { height: 38px; padding: 0 18px; font-size: 15px; }
.ghost {
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 24px;
  border-radius: 999px; background: var(--raised); color: var(--text); text-decoration: none; font-weight: 500;
  box-shadow: inset 0 1px 0 var(--edge);
  transition: background .2s;
}
.ghost:hover { background: #2b2b2b; }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 18px; color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; }
.display {
  margin: 0;
  font-weight: 300;
  font-size: clamp(46px, 7.4vw, 92px);
  line-height: .98;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #ffffff 20%, var(--fog) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.display b, h2 b { font-weight: 400; }
h2 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, #ffffff 30%, var(--fog) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.2px; }
.lead { color: var(--text-2); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; max-width: 34em; }

/* Inline chrome glyph token, as in the app's onboarding headlines. */
.token {
  display: inline-flex; align-items: center; justify-content: center;
  height: .82em; padding: 0 .28em; margin: 0 .06em;
  vertical-align: -.08em;
  border-radius: 999px;
  background: #1a1a1a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 10px rgba(0, 0, 0, .5);
}
.token svg { width: .5em; height: .5em; stroke: #e6e6e6; stroke-width: 2.6; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; padding: 72px 0 40px; }
.hero .lead { margin: 26px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-note { margin: 22px 0 0; color: var(--text-3); font-size: 14px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 440px); }
.hero-phone {
  border-radius: 46px 46px 0 0;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.hero-art::before {
  content: ""; position: absolute; inset: -12% -20% 20%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .12), transparent);
}

/* Live code card — mirrors the app's code row. */
.code-card {
  position: absolute; left: -14%; bottom: 14%;
  display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 14px;
  width: min(380px, 92%);
  padding: 16px 18px 16px 16px;
  border-radius: var(--r-card);
  background: linear-gradient(180deg, #262626, var(--surface));
  box-shadow: inset 0 1px 0 var(--edge), 0 0 0 1px var(--hairline), 0 24px 48px rgba(0, 0, 0, .6);
}
.well {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--well);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .06);
  font-weight: 600; font-size: 20px;
}
.well span { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.code-meta strong { display: block; font-size: 17px; font-weight: 500; }
.code-meta small { color: var(--text-2); font-size: 13px; }
.code-digits { font-size: 25px; font-weight: 500; letter-spacing: .6px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s; }
.ring { width: 30px; height: 30px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: rgba(255, 255, 255, .1); }
.ring .fill { stroke: #d2d2d2; stroke-linecap: round; transition: stroke .3s; }
.code-card.expiring .code-digits { color: var(--expiring); }
.code-card.expiring .ring .fill { stroke: var(--expiring); }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-top: 32px; }
.facts div { padding: 28px 0; }
.facts div + div { padding-left: 28px; border-left: 1px solid var(--hairline); }
.facts strong { display: block; font-size: 30px; font-weight: 400; letter-spacing: -.6px; }
.facts span { color: var(--text-2); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 120px 0 0; }
.section-intro { max-width: 640px; margin-bottom: 52px; }
.section-intro p { color: var(--text-2); font-size: 18px; margin: 20px 0 0; }

.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.split-art {
  border-radius: var(--r-feature); overflow: hidden;
  box-shadow: 0 0 0 1px var(--hairline), 0 30px 60px rgba(0, 0, 0, .55);
  max-width: 420px; justify-self: center;
}
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.steps li > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--well); color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .7); }
.steps p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shot { margin: 0; }
.shot a { display: block; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--hairline); cursor: zoom-in; transition: transform .5s var(--ease), box-shadow .3s; }
.shot a:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--edge), 0 24px 40px rgba(0, 0, 0, .5); }
.shot figcaption { padding: 14px 2px 0; }
.shot figcaption strong { display: block; font-weight: 500; }
.shot figcaption span { color: var(--text-2); font-size: 14px; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card { padding: 26px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.card svg { width: 22px; height: 22px; stroke: var(--text); margin-bottom: 22px; }
.card p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--raised); color: var(--text-2); font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 var(--hairline); }

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { padding: 32px; border-radius: var(--r-feature); background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.plan.pro { background: var(--glass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px var(--hairline); }
.plan h3 { font-size: 24px; font-weight: 400; }
.plan > p { color: var(--text-2); margin: 6px 0 24px; }
.plan.pro > p { color: #d0d0d0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; margin-top: 3px; stroke: currentColor; }
.plans-note { color: var(--text-3); font-size: 14px; margin: 18px 0 0; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.faq-list { display: grid; gap: 10px; }
details { border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
summary { position: relative; list-style: none; cursor: pointer; padding: 22px 60px 22px 24px; font-size: 17px; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: -6px 24px 22px; color: var(--text-2); font-size: 15px; }

/* Download */
.download { text-align: center; padding: 140px 0 120px; }
.download img { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 30px; box-shadow: 0 0 0 1px var(--hairline), 0 20px 40px rgba(0, 0, 0, .6); }
.download h2 { margin-bottom: 36px; }
.download p { color: var(--text-3); font-size: 14px; margin: 20px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 36px 0 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.copyright { margin: 0; color: var(--text-3); font-size: 13px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .86); backdrop-filter: blur(6px); }
.lightbox img { max-height: 90vh; width: auto; border-radius: var(--r-md); }
.lightbox button { position: fixed; top: 18px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(32, 32, 32, .86); color: var(--text); font-size: 22px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

/* Reveal */
.reveal.ready { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.ready.visible { opacity: 1; transform: none; }

/* ---------- Document pages (legal, support) ---------- */
.doc { display: grid; grid-template-columns: 220px minmax(0, var(--read)); gap: 64px; justify-content: center; padding: 72px 0 120px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc p { margin: 0 0 12px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.toc a { display: block; padding: 6px 0; color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); }
.doc-head h1 { margin: 0; font-weight: 300; font-size: clamp(40px, 5vw, 60px); line-height: 1.02; letter-spacing: -.03em; background: linear-gradient(180deg, #fff 30%, var(--fog) 130%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc-head .updated { margin: 16px 0 0; color: var(--text-3); font-size: 14px; }
.summary { margin: 36px 0 12px; padding: 24px 26px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 1px 0 var(--edge), 0 0 0 1px var(--hairline); }
.summary strong { display: block; font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.summary p { margin: 0; color: var(--text-2); }
.doc section { padding-top: 44px; scroll-margin-top: 80px; }
.doc h2 { font-size: 28px; font-weight: 400; letter-spacing: -.4px; margin-bottom: 14px; background: none; color: var(--text); }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { color: #c8c8c8; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--text-3); }
.doc a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--text); }
.doc strong { color: var(--text); font-weight: 500; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 22px 24px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.contact-card span { color: var(--text-2); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero, .split, .faq { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; gap: 56px; }
  .split-art { order: -1; max-width: 360px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .code-card { left: -4%; }
  .doc { grid-template-columns: 1fr; gap: 0; padding-top: 48px; }
  .toc { display: none; }
}
@media (max-width: 640px) {
  .site-nav a:not(.button) { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--hairline); }
  .facts div { padding: 20px 0; }
  .grid-3, .plans { grid-template-columns: 1fr; }
  .section { padding-top: 88px; }
  .code-card { left: 0; right: 0; margin-inline: auto; width: 100%; grid-template-columns: 44px 1fr auto auto; gap: 12px; padding: 14px; }
  .code-digits { font-size: 21px; }
  .button { width: 100%; }
  .hero-actions .ghost { width: 100%; justify-content: center; }
  .plan { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal.ready { opacity: 1; transform: none; }
}
.lead-tight { margin-top: 20px; }

/* ---------- AutoFill test page ---------- */
.site-nav a.button { color: var(--on-chrome); }
.test-panel { margin-top: 18px; padding: 26px; border-radius: var(--r-feature); background: var(--surface); box-shadow: inset 0 1px 0 var(--edge), 0 0 0 1px var(--hairline); }
.test-panel label { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 10px; }
.test-panel input {
  width: 100%; height: 64px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--well); color: var(--text); font: 500 30px/1 Figtree, sans-serif; letter-spacing: 6px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .06);
}
.test-panel input::placeholder { color: var(--text-3); letter-spacing: 6px; }
.test-panel button.button { width: 100%; margin-top: 14px; border: 0; cursor: pointer; }
.test-result { min-height: 26px; margin: 16px 0 0; color: var(--text-2); font-size: 15px; }
.test-result[data-state="ok"] { color: var(--text); }
.test-result[data-state="ok"]::before { content: "✓  "; }
.test-result[data-state="error"] { color: var(--expiring); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 1px; color: var(--text); background: var(--raised); padding: 2px 8px; border-radius: 8px; word-break: break-all; }
.doc a.button { color: var(--on-chrome); text-decoration: none; }
