/* The page for AI assistants (ai.html, /ai), and the guides (guides.html, guides/*.html: the end of this file). The
   About page's look (web/about.css), set as a document: its cool paper
   by day and plain greys by night, a book serif for the words that talk to you, tracked mono labels with slashed zeros,
   hairline rules, and no colour but ink (the depth colour is only where Z is). The text keeps a reading measure; the
   pictures are wider than it. Each picture's frame is the colour of its own edges, so a dark board and a light one line
   up in the grid. Every section is a level along Z, counted in its label. No script. */
:root {
  --bg: #F2F4F7; --surface: #FAFBFD; --ink: #1C2430; --ink-2: #4B5765; --ink-3: #677483; --rule: #D3DAE2; --rule-2: #C3CCD6;
  --shadow: 0 1px 2px rgba(20, 28, 40, .06), 0 16px 36px -20px rgba(20, 28, 40, .32);
  --f-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-d: "Newsreader", Georgia, "Songti SC", "STSong", serif;
  --f-m: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wide: 1040px; --text: 680px; --pad: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B0D10; --surface: #14171B; --ink: #ECEEF2; --ink-2: #A9B0BA; --ink-3: #8B95A3; --rule: #232933; --rule-2: #313844;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .9); color-scheme: dark; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.62 var(--f-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, blockquote, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
i { font-style: italic; }
.mono, .tag, .group, .show span, .n, .url, .facts dt, thead th, .copy {
  font-family: var(--f-m); font-feature-settings: "zero"; font-variant-numeric: tabular-nums; }

/* the bar: back to the site, and the Chinese below */
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(var(--pad), calc(50% - var(--wide) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
.back, .lang { font: 500 14px/1 var(--f-ui); color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.back { margin-left: -10px; }
.lang { margin-right: -10px; }
.back:hover, .lang:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* each section: the text at a reading measure in the middle column, pictures across all three */
main { padding: 0 var(--pad); counter-reset: z; }
main > section { max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) min(var(--text), 100%) minmax(0, 1fr); }
main > section > * { grid-column: 2; }
main > section + section { margin-top: 88px; counter-increment: z; }
main > section + section::before { content: ""; grid-column: 1 / -1; height: 1px; margin-bottom: 30px; background: var(--rule); }
h2 { font: 500 clamp(27px, 3.6vw, 34px)/1.15 var(--f-d); letter-spacing: -.015em; color: var(--ink); }
main > section + section > h2::before { content: "Z " counter(z); display: block; margin-bottom: 12px;
  font: 500 11.5px/1 var(--f-m); letter-spacing: .14em; color: var(--ink-3); font-feature-settings: "zero"; }
.body { margin-top: 14px; color: var(--ink-2); }
.body strong { color: var(--ink); font-weight: 600; }
.body + .body { margin-top: 12px; }

/* the first screen: what this page is, and the one thing it asks */
.intro { padding-top: 64px; }
.tag { font-size: 11.5px; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
h1 { margin-top: 16px; font: 500 clamp(38px, 6.2vw, 58px)/1.03 var(--f-d); letter-spacing: -.024em; color: var(--ink); }
.lead { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--ink); }
.ask { margin-top: 22px; padding: 18px 20px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 16px; box-shadow: var(--shadow); }
.ask::before { content: "A request"; display: block; margin-bottom: 8px; font: 500 11px/1 var(--f-m); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.note a { color: var(--ink-2); }

/* the slogan, and the four differences */
.slogan { margin: 22px 0 4px; padding: 0; }
.slogan p { font: 500 clamp(28px, 4.6vw, 42px)/1.1 var(--f-d); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.points { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.points li { padding: 16px 18px 17px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.points h3 { font: 600 15.5px/1.35 var(--f-ui); color: var(--ink); }
.points p { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* the pictures: the default three as wide as the page, their words at the reading measure under them */
.pic { margin-top: 28px; }
.pic.big { grid-column: 1 / -1; margin-top: 44px; }
.pic.big figcaption { max-width: var(--text); margin: 18px auto 0; }
.shot { display: block; overflow: hidden; border-radius: 14px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.shot.dark { background: #0F0F0F; }
.shot.light { background: #F2F3F7; }
.shot img { width: 100%; }
.shot picture { display: contents; }   /* the moving two: a still in their place with reduced motion */
.shot:focus-visible { outline-offset: 4px; border-radius: 14px; }
.pic-t { display: flex; align-items: baseline; gap: 10px; font: 600 16.5px/1.35 var(--f-ui); color: var(--ink); }
.n { flex: none; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; color: var(--ink-3); }
.pic-t ~ p { margin-top: 6px; font-size: 15px; line-height: 1.58; color: var(--ink-2); }
.pic .best { font-size: 14px; color: var(--ink-2); }
.pic .best b { font-weight: 600; color: var(--ink); }
.pic .url { font-size: 12px; line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }
.pic .url a { color: var(--ink-3); }
.pic .url a:hover { color: var(--ink); }

/* the rest, two by two, in frames of one shape (each picture whole inside its frame) */
.grid { grid-column: 1 / -1; margin-top: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 28px; }
.grid .pic { margin: 0; }
.grid .shot { aspect-ratio: 16 / 10; }
.grid .shot img { height: 100%; object-fit: contain; }
.grid figcaption { margin-top: 14px; }

/* who uses it */
.who { margin-top: 18px; border-top: 1px solid var(--rule); }
.who li { padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.who b { color: var(--ink); font-weight: 600; }

/* the questions: each one as it is asked, its answer, and the pictures to show with it */
.group { margin-top: 44px; font-size: 11.5px; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.claim { margin-top: 8px; font: 500 21px/1.3 var(--f-d); color: var(--ink); }
.qa { margin-top: 14px; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.group + .qa { margin-top: 16px; }
.qa p { color: var(--ink-2); }
.qa .q { margin-bottom: 8px; font: italic 400 19px/1.4 var(--f-d); color: var(--ink); }
.qa .show { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.7; }
.show span { margin-right: 8px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.show a { font-weight: 500; white-space: nowrap; }
.qa .more { margin-top: 6px; font-size: 14px; line-height: 1.7; }
.more span { margin-right: 8px; font: 500 11px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.qa .show span, .qa .more span { display: inline-block; min-width: 5.4em; }   /* Show: and Guide: start their links in line */
.more a { font-weight: 500; }

/* compared with other tools */
.table { margin-top: 20px; overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
thead th { border-top: 0; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
td { color: var(--ink-2); }
td:last-child { color: var(--ink); }

/* facts */
.facts { margin-top: 18px; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { padding-top: 3px; font-size: 11.5px; font-weight: 500; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { color: var(--ink-2); }

/* 中文: no slanted questions (Chinese has no italic, and a slanted one is a made-up face) */
#zh .q { font-style: normal; font-family: var(--f-ui); font-weight: 500; font-size: 17px; }
#zh .slogan p { letter-spacing: 0; }
#zh .body, #zh .qa p { line-height: 1.75; }

.foot { width: min(var(--wide), 100% - 2 * var(--pad)); margin: 96px auto 0; padding: 22px 0 44px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; font-size: 13.5px; color: var(--ink-3); }
.foot p:first-child { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.copy { font-size: 12px; letter-spacing: .04em; }

/* the guides (/guides and /guides/…, docs/about.md): one question each, in this page's look. The bar is the way back
   (CoordXYZ / Guides) and the way in; the question sits as it is asked, over its answer; the steps are counted in mono;
   a guide ends with the way in, more guides and the same in Chinese. */
.crumbs { display: flex; align-items: center; min-width: 0; margin-left: -10px; }
.crumbs a { font: 500 14px/1 var(--f-ui); color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 10px;
  white-space: nowrap; }
.crumbs a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.crumbs a[aria-current] { color: var(--ink); }
.crumbs span { font: 400 14px/1 var(--f-ui); color: var(--ink-3); }
.bar-r { display: flex; align-items: center; gap: 6px; }
.bar-r .lang { margin-right: 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 16px; border-radius: 999px;
  font: 500 13.5px/1 var(--f-ui); color: var(--bg); background: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s; }
.pill:hover { background: color-mix(in srgb, var(--ink) 80%, var(--bg)); }
.pill.line { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }
.pill.line:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.go { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.go .pill { height: 46px; padding: 0 22px; font-size: 15px; }
.asked { margin-top: 18px; font: italic 400 21px/1.42 var(--f-d); color: var(--ink-2); text-wrap: pretty; }
.intro .asked + .lead { margin-top: 12px; }
h2 + .asked { margin-top: 14px; }
.steps { margin-top: 22px; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--rule); }
.steps li { position: relative; padding: 14px 0 15px 46px; border-bottom: 1px solid var(--rule); color: var(--ink-2);
  counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 18px;
  font: 500 11.5px/1 var(--f-m); letter-spacing: .1em; color: var(--ink-3); font-feature-settings: "zero"; }
.steps b { color: var(--ink); font-weight: 600; }
.steps + .note { margin-top: 14px; }
.guides { margin-top: 18px; border-top: 1px solid var(--rule); }
.guides li { padding: 15px 0 16px; border-bottom: 1px solid var(--rule); }
.guides a { display: block; text-decoration: none; }
.guides b { display: block; font: 600 16.5px/1.35 var(--f-ui); color: var(--ink); }
.guides a span { display: block; margin-top: 4px; font: italic 400 17px/1.45 var(--f-d); color: var(--ink-2); }
.guides a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--rule-2); }
.guides p { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }
.guides + .note { margin-top: 16px; }
#zh .asked, #zh .guides a span { font-style: normal; font-family: var(--f-ui); }
#zh .asked { font-size: 18px; font-weight: 500; color: var(--ink); }
#zh .guides a span { font-size: 15px; }
#zh .steps li, #zh .guides p { line-height: 1.75; }

@media (max-width: 760px) {
  .points, .grid { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 36px; }
  .grid .pic.tall .shot { aspect-ratio: 4 / 5; }   /* one to a row: the iPhone picture may be taller than the rest */
}
@media (max-width: 600px) {
  .intro { padding-top: 36px; }
  .bar .pill { display: none; }
  .bar-r .lang { margin-right: -10px; }
  .go .pill { flex: 1 1 100%; }
  .asked { font-size: 19px; }
  .steps li { padding-left: 38px; }
  .lead { font-size: 18px; }
  main > section + section { margin-top: 64px; }
  main > section + section::before { margin-bottom: 24px; }
  .pic.big { margin-top: 32px; }
  .shot { border-radius: 12px; }
  .qa { padding: 16px 16px 14px; }
  .qa .q { font-size: 18px; }
  /* the table as cards: the tool, what it is, and how CoordXYZ is different */
  .table { overflow: visible; }
  table, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody tr { padding: 14px 16px; border-top: 1px solid var(--rule); }
  tbody tr:first-child { border-top: 0; }
  tbody th, td { padding: 0; border: 0; white-space: normal; }
  td { margin-top: 4px; }
  td:last-child::before { content: "CoordXYZ: "; font-weight: 600; }
  .vs td[data-l]::before { content: attr(data-l) ": "; font-weight: 600; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dt { padding-top: 0; }
}
