/* Guides (itrailog.com/guides, /zh/guides) — pages built by scripts/BuildGuides.py.
   Same tokens and type as privacy.html / terms.html (the app's Theme.swift / Theme.kt). */
:root {
  --neutral-950: #0A0A0B;
  --neutral-900: #161618;
  --neutral-800: #232326;
  --neutral-600: #48484D;
  --neutral-400: #8E8E93;
  --neutral-050: #F5F5F6;
  --orange-500: #FF9500;

  --bg: var(--neutral-950);
  --surface: var(--neutral-900);
  --surface-raised: var(--neutral-800);
  --divider: var(--neutral-800);
  --text: var(--neutral-050);
  --text-2: var(--neutral-400);
  --text-3: var(--neutral-600);
  --accent: var(--orange-500);
  --on-accent: var(--neutral-950);
  --bezel-edge: var(--neutral-600);

  --radius: 14px;
  --page: min(1120px, 100% - 32px);
  --doc: min(760px, 100% - 32px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { width: var(--page); margin-inline: auto; }
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal; line-height: 1;
  font-size: 22px; display: inline-block; vertical-align: middle;
  font-variation-settings: "FILL" 0, "wght" 400, "opsz" 24;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
}

header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}
header .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--bezel-edge); }
.brand small { color: var(--text-2); font-weight: 500; font-size: 14px; }
header nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; color: var(--text-2); }
header nav a:hover, header nav a[aria-current] { color: var(--text); }
/* Same breakpoints as the home page header */
@media (max-width: 900px) { header nav .nav-viewer, header nav .nav-guides { display: none; } }
@media (max-width: 560px) { header nav { display: none; } }

/* Article */
.doc { width: var(--doc); margin-inline: auto; padding: 56px 0 72px; }
/* Back to the guide list (top and bottom of every article) */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }
.back:hover { text-decoration: underline; }
.back .ms { font-size: 18px; }
.related .back { margin-top: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.2; margin: 12px 0 14px; letter-spacing: -.01em; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip { font-size: 13px; padding: 3px 12px; border-radius: 999px; background: var(--surface-raised); color: var(--text-2); }
.intro { color: var(--text-2); font-size: 18px; margin: 0 0 8px; }
.doc section { padding: 28px 0 4px; border-top: 1px solid var(--divider); margin-top: 28px; }
.doc h2 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; }
.doc h3 { font-size: 17px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong, .doc b { color: var(--text); font-weight: 600; }
.doc section a, .doc .intro a { color: var(--accent); }
.doc section a:hover { text-decoration: underline; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; color: var(--text); background: var(--surface-raised); padding: 1px 6px; border-radius: 6px; }
.note { display: flex; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.note .ms { color: var(--accent); margin-top: 3px; }
.note p { margin: 0; }

/* Guide list */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid transparent; }
.card:hover { border-color: var(--divider); background: var(--surface-raised); }
.card .ms { color: var(--accent); font-size: 26px; }
.card b { font-size: 17px; line-height: 1.4; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* Call to action */
.cta { margin-top: 40px; background: var(--surface); border-radius: var(--radius); padding: 24px; }
.cta h2 { font-size: 20px; margin: 0 0 8px; }
.cta p { margin: 0 0 16px; color: var(--text-2); }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--divider); color: var(--text); font-size: 15px; font-weight: 500; }
.btn:hover { background: var(--surface-raised); }
.btn .ms { font-size: 20px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }

/* More guides */
.related { margin-top: 40px; }
.related h2 { font-size: 18px; margin: 0 0 8px; }
.related ul { margin: 0; padding-left: 22px; }
.related li { margin: 6px 0; color: var(--text-2); }
.related a { color: var(--accent); }
.related a:hover { text-decoration: underline; }

footer { border-top: 1px solid var(--divider); padding: 32px 0 48px; color: var(--text-3); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; }
.foot-info { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-info a { color: var(--accent); }
.foot-info a:hover { text-decoration: underline; }
/* The page in other languages */
footer .lang { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text-3); font-size: 14px; }
footer .lang a { color: var(--text-2); }
footer .lang a:hover { color: var(--text); text-decoration: underline; }
footer .lang .ms { font-size: 18px; color: var(--text-2); }

/* Screenshots in articles */
.doc figure { margin: 20px 0; }
.doc figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--divider); background: var(--surface); }
.doc figcaption { margin-top: 8px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
/* Two phone screenshots side by side (already framed, no border) */
.doc figure.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 520px; margin-inline: auto; }
.doc figure.phones img { border: 0; background: none; border-radius: 0; }
.doc figure.phones figcaption { grid-column: 1 / -1; }
/* Guide list cover */
.card .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; border-radius: 10px; margin-bottom: 6px; background: var(--surface-raised); }

/* Topics: chips on the guide list and on each article, sections on the list */
a.chip.topic { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
a.chip.topic .ms { font-size: 16px; color: var(--accent); }
a.chip.topic:hover { background: var(--divider); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.topics .chip { font-size: 14px; padding: 6px 14px; }
.topic-sec { margin-top: 40px; scroll-margin-top: 76px; }
.topic-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 22px; line-height: 1.35; margin: 0 0 4px; }
.topic-sec h2 .ms { color: var(--accent); }
.topic-sec > p { margin: 0; color: var(--text-2); }
.topic-sec .cards { margin-top: 16px; }
/* Raw (unframed) app screenshots: round them like the phone's screen */
.doc figure.phones.shots img { border-radius: 28px; border: 1px solid var(--divider); }
.doc figure.phones.single { grid-template-columns: 1fr; max-width: 260px; }
/* Apple Watch screenshots (framed on white): two side by side */
.doc figure.watches { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 520px; margin-inline: auto; }
.doc figure.watches img { border-radius: 16px; }
.doc figure.watches figcaption { grid-column: 1 / -1; }

/* Blog: post list and post page */
@media (max-width: 900px) { header nav .nav-blog { display: none; } }
.posts { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.post-card { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 14px; border: 1px solid transparent; }
.post-card:hover { border-color: var(--divider); background: var(--surface-raised); }
.post-card .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; margin: 0; background: var(--surface-raised); }
.post-card > * { min-width: 0; }
.post-card time { color: var(--text-2); font-size: 13px; }
.post-card b { display: block; font-size: 18px; line-height: 1.4; margin: 2px 0 6px; }
.post-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) { .post-card { grid-template-columns: 1fr; gap: 12px; } }
.related .when { color: var(--text-3); font-size: 13px; margin-left: 6px; }

/* Under the download buttons: TestFlight for mainland-China Apple Accounts (the App Store link doesn't work there). */
.cta .cta-tf { margin: 14px 0 0; font-size: 14px; }
.cta .cta-tf a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.cta .cta-tf a:hover { color: var(--text); }
.cta .cta-tf img { width: 20px; height: 20px; border-radius: 22.5%; }
