/* Polish for about, projects, AI visibility checker and privacy (zh + en).
   Loaded after home.css, pages.css and motion.css. Only touches these pages. */

/* ---------- tap targets ---------- */
.hdr .pill.sm { min-height: 44px; }
.idx a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; display: inline-block; padding: 13px 10px; margin: -13px -10px; }

/* ---------- projects: featured heading is now an h2 (heading order) ---------- */
.feat h2 { font-size: clamp(34px, 8.6vw, 64px); line-height: 1.06; letter-spacing: -.02em; margin-top: 14px; }
html[lang="en"] .feat h2 { letter-spacing: -.045em; line-height: 1; }

/* ---------- client list: keep the dated number visible on phones ---------- */
@media (max-width: 959px) {
  .ctable a { grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; align-items: start; gap: 2px 12px; padding: 14px 0 15px; }
  .ctable .i { grid-row: 1; padding-top: 4px; }
  .ctable .nm { grid-row: 1; grid-column: 2; }
  .ctable .u { grid-row: 1; grid-column: 3; padding-top: 4px; }
  .ctable .wh { display: block; grid-row: 2; grid-column: 2 / -1; font-size: 14px; line-height: 1.5; }
}

/* ---------- how we work: one rule per row below desktop (matches en/about), calmer rows on desktop ---------- */
@media (max-width: 959px) {
  ol.rules { display: block; }
  .rules li { grid-template-columns: 32px 1fr; gap: 4px 12px; padding: 16px 0 17px; }
  .rules li::before { padding-top: 4px; }
  .rules span { grid-column: 2; }
  .rules li:nth-last-child(2) { border-bottom-color: var(--hair); }
}
@media (min-width: 960px) {
  .rules li { padding: 22px 0; align-items: baseline; }
  .rules li::before { padding-top: 0; }
  .rules span { font-size: 16px; line-height: 1.6; }
}

/* ---------- checker: hero CTA row ---------- */
.phero .ctas .pill { margin-top: 0; }

/* ---------- privacy: readable long-form ---------- */
.policy-sec { padding-top: 56px; }
.policy { max-width: 40em; }
.policy h2 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -.01em; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--hair); }
.policy h2:first-child { margin-top: 0; border-top-color: var(--ink); }
.policy p, .policy li { font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.policy p { margin-top: 12px; max-width: none; }
.policy b { color: var(--ink); font-weight: 600; }
.policy ul { margin: 14px 0 0; padding: 0; }
.policy li { list-style: none; position: relative; padding-left: 20px; }
.policy li + li { margin-top: 12px; }
.policy li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.policy a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
html[lang="en"] .policy p, html[lang="en"] .policy li { line-height: 1.7; }
@media (min-width: 960px) {
  .policy-sec { padding-top: 88px; }
}

/* ---------- UX round 2: line breaks, spacing, captions ---------- */
.nw { white-space: nowrap; }
/* zh headings break at phrase edges (checker and privacy don't load motion.css) */
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3 { word-break: keep-all; overflow-wrap: anywhere; }
/* FAQ questions, stat labels and side notes: balanced lines, no 1-2 character tails */
details summary > span:nth-child(2), .delta p, .shot-cap { text-wrap: balance; }
html[lang^="zh"] .faq-list details p, html[lang^="zh"] .tl ul { max-width: 36em; }
/* text links inside spec rows: 44px tall hit area without moving the text */
.spec dd a:not(.mono) { display: inline; padding: 12px 0; margin: 0; white-space: nowrap; }
/* checker: screenshot captions read as captions, not body copy */
.step .shot-cap { font-size: 12px; line-height: 1.6; margin-top: 12px; max-width: none; color: var(--ink-3); }
/* checker: status line dot sits on the first line when the text wraps */
.status-pill { align-items: flex-start; line-height: 1.6; }
.status-pill::before { flex: none; margin-top: calc(.8em - 4px); }
@media (min-width: 960px) {
  /* projects: the featured block opens right under the hero, no double spacing */
  #agents { padding-top: 128px; }
  #agents .feat { margin-top: 0; }
  /* about: label column of the services table fits a 960-1279 content column */
  .split .spec.wide > div { grid-template-columns: 9em 1fr; }
  /* checker: the dashboard heading sits in a half column; size it like other split headings */
  #dashboard .state { font-size: clamp(40px, 4.2vw, 64px); }
  .step .shot-cap { font-size: 13px; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  html[lang="en"] .feat h2 { font-size: 4.6vw; } /* "AI Visibility Checker" on one line */
}
@media (min-width: 1280px) { .split .spec.wide > div { grid-template-columns: 12em 1fr; } }
/* projects hero: on tablets the render stays a supporting image, the lede stays near the fold */
@media (min-width: 600px) and (max-width: 959px) { .phero.has-obj .obj-h { padding: 0 27%; margin-top: 8px; } }
.cmp td, .cmp th, .spec dd { text-wrap: pretty; }
