/* Shared by every page: color tokens (light and dark), base type, buttons, header, form helpers, score bar. */
:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --faint: #9a9a9a;
  --line: #e3e3e1;
  --line-strong: #cfcfcf;
  --accent: #e4541b;
  --btn: #111111;
  --btn-ink: #ffffff;
  --ver: #1d7448; --ver-soft: #e5f2ea;
  --claim: #92600a; --claim-soft: #f8eed8;
  --bad: #b0392f;
  --band: #111111; --band-fg: #ececec; --band-muted: #9b9b9b;
  --font-display: "Inter Tight", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c; --surface: #161616; --fg: #ececec; --muted: #a3a3a3; --faint: #737373; --line: #2a2a2a; --line-strong: #414141;
    --accent: #ff6b35; --btn: #ececec; --btn-ink: #111111;
    --ver: #6cc893; --ver-soft: #16301f; --claim: #e2b84f; --claim-soft: #33290f; --bad: #f08a7e;
    --band: #161616;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
/* every paragraph here is short: balance the lines so none ends with one or two lone words or characters */
p { margin: 0; text-wrap: balance; }
/* Chinese: Latin-tuned tight tracking and leading make CJK headings cramped */
:lang(zh) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.25; }
/* Chinese: break only at punctuation or spaces, never inside a word like 確認; anywhere is a last resort against overflow */
:lang(zh) :is(p, h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }
/* with breaks only at punctuation the last line is always a whole clause, so fill lines greedily instead of balancing */
:lang(zh) p { text-wrap: wrap; line-height: 1.7; }
/* short notes added in 2026-12: keep a lone last word off the final line (the wrap rule above predates them) */
:lang(zh) :is(p.api-soon, p.done, .done span) { text-wrap: pretty; }
.tag { display: inline-block; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 4px 8px; }
.tag.sample { color: var(--claim); background: var(--claim-soft); border-color: transparent; }

.btn { font: 500 12.5px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); border-radius: 6px; padding: 12px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn:hover { opacity: 0.86; }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* header */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
/* logo left, the tabs and the Company menu centered, language and Get started right */
header.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a, .nav-more > button { white-space: nowrap; font-size: 15px; color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 8px; }
.site-nav a:hover, .nav-more > button:hover, .nav-more > button[aria-expanded="true"] { color: var(--fg); }
.site-nav > a[aria-current="page"] { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
/* a separate rule: a browser without :has() drops the whole rule, and the tabs above must keep their style */
.nav-more:has([aria-current]) > button { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.top-actions { justify-content: flex-end; }
/* Company: a button styled like the tabs, opening a small list of links below it (site.js initNavMenu) */
.nav-more { position: relative; }
.nav-more > button { font-family: inherit; line-height: inherit; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-more > button::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nav-more > button[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.nav-more ul { position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .08); z-index: 20; }
.nav-more ul a { display: block; padding: 8px 10px; }
.nav-more ul a[aria-current] { color: var(--fg); background: var(--bg); }
.btn-p { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 8px; font: 500 14px var(--font-body); text-decoration: none; background: var(--btn); color: var(--btn-ink); white-space: nowrap; border: 0; cursor: pointer; }
.btn-p:hover { opacity: .88; }
.btn-s { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 8px; font: 500 15px var(--font-body); text-decoration: none; color: var(--fg); }
.btn-s:hover { background: var(--surface); }
/* two header rows up to 880 px: in one row the English header needs about 820 px, so Get started ran off the page.
   Both numbers here (880, and 6 px below 760) were measured for five tabs: re-measure when a tab is added or renamed
   (tests/site-e2e/ai-catalog.spec.mjs fails when they no longer fit) */
@media (max-width: 880px) {
  header.top .wrap { grid-template-columns: auto 1fr; height: auto; padding-block: 10px; row-gap: 6px; }
  /* wraps instead of scrolling sideways: a scrolling box would clip the Company list */
  .site-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; position: relative; }
  /* the Company list hangs from the full-width nav's right edge, wherever the button lands in the row */
  .nav-more { position: static; }
  .nav-more ul { left: auto; right: 0; }
  .site-nav a, .nav-more > button { padding-inline: 10px; }
}
/* phones: the five Chinese tabs need 357 px at 10 px padding and get 328 px at 375 px wide; 6 px keeps them in one row */
@media (max-width: 760px) {
  .site-nav a, .nav-more > button { padding-inline: 6px; }
}
.brand { font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; text-decoration: none; display: flex; align-items: center; gap: 8px; }
/* wordmark: the name set as text until the new logo is drawn */
.mark { white-space: nowrap; }
.brand i { width: 8px; height: 8px; background: var(--accent); border-radius: 2px; display: inline-block; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang button { font: 500 11.5px var(--font-mono); background: transparent; color: var(--muted); border: 0; padding: 7px 9px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* form helpers: .sr hides a label visually but keeps it for screen readers; .hp hides the honeypot field */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* part score: five-part bar, the same split as scanner/levels.py BUCKET (on the page / needs JavaScript, striped green /
   in a PDF / AI can't read / blocked by the site, striped red), its caption, category tags */
.sbar { display: flex; height: 6px; border-radius: 2px; overflow: hidden; background: var(--line); }
.sbar .d { background: var(--ver); } .sbar .j { background: repeating-linear-gradient(135deg, var(--ver) 0 3px, transparent 3px 5px); } .sbar .f { background: var(--claim); } .sbar .n { background: var(--bad); opacity: .75; }
.sbar .b { background: repeating-linear-gradient(135deg, var(--bad) 0 4px, transparent 4px 7px); }
.sbar .c { background: radial-gradient(circle, var(--claim) 1.1px, transparent 1.4px) 0 0 / 4px 4px; }  /* only from search engines' saved copies (2026-12-01.6) */
.split { font: 12px var(--font-mono); color: var(--muted); }
.split span { white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.tags span { font: 11.5px var(--font-body); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

/* data table (leaderboard, report) */
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* status pill; each page adds its own color variants */
.st { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--font-mono); padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.err { color: var(--bad); font-size: 13px; }
/* "Scored learn.x.com · Score x.com instead" beside a score (scan-host.js) */
.alt-host { font: 13px var(--font-mono); color: var(--muted); margin-top: 8px; text-wrap: balance; overflow-wrap: anywhere; }
.alt-host a { color: var(--fg); text-underline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }

/* ---- page sections shared by the home page (for developers) and /suppliers ---- */
.sect { padding-block: 104px; border-top: 1px solid var(--line); }
.sect-h { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.025em; max-width: 18em; }
.sect-lede { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 36em; margin-top: 18px; }
.note-line { margin-top: 18px; font-size: 14px; color: var(--muted); }
.cta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 32px; }

/* animated AI answer: every row keeps its box between steps, so nothing below it moves */
.demo { margin-top: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -36px rgba(0,0,0,.35); }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.demo-bar button { font: 500 13px var(--font-body); background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.demo-body { padding: 32px clamp(20px, 4vw, 48px) 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 32px; align-content: start; }
.demo-body.with-proof { grid-template-columns: minmax(0, 1fr) 280px; }
.demo-body .ask { grid-column: 1 / -1; }
.ask { justify-self: end; max-width: 560px; background: var(--bg); border-radius: 14px; padding: 14px 18px; font-size: 15px; text-wrap: pretty; }
.ans { position: relative; display: grid; gap: 2px; align-content: start; }
.ans .who { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.think { position: absolute; left: 10px; top: 34px; color: var(--muted); font-size: 14px; transition: opacity .3s; }
.think.off { opacity: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 15px; border-radius: 6px; transition: background .4s, opacity .4s, transform .4s; }
.arow .v { font-family: var(--font-mono); font-size: 14px; }
.arow .note { font-size: 13.5px; opacity: 0; transition: opacity .4s; text-wrap: balance; }
.arow.hid { opacity: 0; transform: translateY(6px); }
.arow.wrong { background: color-mix(in srgb, var(--bad) 9%, transparent); }
.arow.wrong .v { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.arow.wrong .note, .arow.bad .note, .arow.ok .note { opacity: 1; }
.arow.wrong .note, .arow.bad .v, .arow.bad .note { color: var(--bad); }
.arow.ok .v, .arow.ok .note { color: var(--ver); }
.arow.final { border-bottom: 0; margin-top: 8px; background: var(--bg); font-weight: 500; }
.arow.final .note { opacity: 1; color: var(--muted); }
.arow.hid .note { opacity: 0; }
.proof { display: grid; gap: 14px; align-content: start; padding-top: 30px; transition: opacity .5s; }
.proof.off { opacity: 0; } /* sections.js hides it until the last step; without JS it stays visible */
/* with JS (class set in <head>), hide the animated parts before first paint so the last step never flashes in */
.js .demo:not(.ready) :is(.arow[data-stage], .proof, .think) { opacity: 0; transition: none; }
.proof figure { margin: 0; }
.proof figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; text-wrap: balance; }
/* the proof is a catalog table we redraw, not a scan of any supplier's page */
.mini { width: 100%; border-collapse: collapse; background: var(--surface); font-family: var(--font-mono); font-size: 13px; }
.mini :is(th, td) { padding: 8px 10px; border: 1px solid var(--line); text-align: center; font-weight: 400; }
.mini th { color: var(--muted); font-family: var(--font-body); white-space: nowrap; }
.mini .hit { color: var(--bad); font-weight: 500; }
.demo-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.demo-steps button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; gap: 10px; padding-top: 14px; border-top: 2px solid var(--line); color: var(--muted); font-size: 15px; }
.demo-steps button[aria-current="step"] { border-top-color: var(--fg); color: var(--fg); } /* no weight change: bolder text could rewrap and move the layout */
.demo-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.demo-steps .n { font: 500 12px var(--font-mono); }

/* FAQ: native disclosure */
.faq { margin-top: 48px; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 22px 4px; font: 500 17px var(--font-display); text-wrap: balance; }
:lang(zh) .faq summary, :lang(zh) .faq details > div { word-break: keep-all; overflow-wrap: anywhere; }
.faq details > div { text-wrap: pretty; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 22px/1 var(--font-body); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 4px 24px; color: var(--muted); max-width: 44em; }
.faq a { color: var(--fg); }

/* request form on a dark band */
.ask-band { background: var(--band); color: var(--band-fg); border-top: 0; }
.ask-band .sect-lede { color: var(--band-muted); }
.req-form { margin-top: 48px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 4vw, 40px); max-width: 760px; display: grid; gap: 20px; }
.req-form fieldset { border: 0; padding: 0; margin: 0; }
.req-form legend, .req-form label.f { font: 500 14px var(--font-body); margin-bottom: 8px; display: block; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font: 500 14px var(--font-body); cursor: pointer; }
.choice input:checked + span { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.req-form input[type=text], .req-form input[type=email], .req-form textarea { width: 100%; font: 15px var(--font-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; }
.req-form textarea { min-height: 96px; resize: vertical; }
.req-form .btn-p { justify-content: center; width: 100%; padding: 12px 16px; font-size: 15px; }
.req-form .fine { font-size: 13px; color: var(--muted); }
.req-form .done { color: var(--ver); font-size: 15px; }

@media (max-width: 920px) {
  .sect { padding-block: 72px; }
  .demo-body.with-proof { grid-template-columns: minmax(0, 1fr); }
  .proof { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); padding-top: 0; } /* two tables side by side when they fit, stacked on a phone */
  .arow { grid-template-columns: minmax(0, 1fr) auto; }
  .arow .note { grid-column: 1 / -1; }
  .demo-steps { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .two { grid-template-columns: minmax(0, 1fr); }
}

.sect-more { margin-top: 20px; font-size: 15px; }
/* trend numbers (/suppliers and blog posts): equal cards, source pinned to the bottom */
.trend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.tcard { border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); }
.tcard b { font: 400 clamp(48px, 5.5vw, 72px)/.95 var(--font-display); letter-spacing: -.04em; }
.tcard p { font-size: 15px; text-wrap: balance; }
.tcard .s { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.tcard .s a { color: inherit; }
@media (max-width: 920px) { .trend { grid-template-columns: minmax(0, 1fr); } }
/* blog: the list at /blog and the posts under /blog/, one reading column */
.post { max-width: 720px; margin: 0 auto; padding: 72px 20px 120px; }
.post h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.03em; }
.post .meta { margin-top: 14px; color: var(--muted); font-size: 14px; }
.post .lede { margin-top: 24px; font-size: 19px; line-height: 1.55; }
/* each part of a post starts below a rule with room above it, so the parts read as separate */
.post article > section { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line-strong); }
.post h2 { font-size: 30px; }
.post p, .post li { text-wrap: pretty; }
.post section > p, .post section > ul { margin-top: 16px; }
.post ul { padding-left: 1.2em; display: grid; gap: 6px; }
/* a list of named points: each point is its own block, its bold name on a line of its own */
.post ul.points { list-style: none; padding: 0; gap: 0; margin-top: 8px; }
.post ul.points li { padding-block: 16px; border-bottom: 1px solid var(--line); }
.post ul.points li:last-child { border-bottom: 0; }
.post ul.points li > b:first-child { display: block; font-size: 18px; font-weight: 500; color: var(--fg); margin: 0 0 6px; }
.post ul.points li > span { color: var(--muted); }
.post #cta { border: 1px solid var(--line); padding: 28px; border-radius: 16px; background: var(--surface); }
.post #cta .cta-row { margin-top: 24px; }
.post .trend { margin-top: 20px; gap: 12px; }
.post .tcard { padding: 18px; gap: 10px; }
.post .tcard b { font-size: 36px; }
.post .tcard p { text-wrap: balance; } /* short card text: .post p's pretty would leave a lone word */
.post table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px; }
.post th { text-align: left; font: 500 12.5px var(--font-body); color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
.post td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; text-wrap: balance; }
.post td.rep { color: var(--muted); font-size: 14px; }
/* posts are long paragraphs: Chinese breaks between any two characters here instead of only at punctuation
   (the site-wide rule above), because a clause longer than the line gets cut anywhere and leaves one or two
   characters behind; pretty/balance then keep the last line from being a lone character.
   The title keeps the site-wide rule: it is short enough to break at its comma. (li and td never had keep-all.) */
:lang(zh) .post :is(p, h2) { word-break: normal; overflow-wrap: normal; }
.posts { margin-top: 40px; }
.posts article { padding-block: 24px; border-top: 1px solid var(--line); }
.posts h2 { font-size: 24px; margin-top: 6px; }
.posts h2 a { color: var(--fg); text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; }
.posts p { margin-top: 10px; color: var(--muted); }
.posts time { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .post table, .post thead, .post tbody, .post tr, .post td { display: block; }
  .post thead { display: none; }
  .post tr { padding-block: 10px; border-bottom: 1px solid var(--line); }
  .post td { border: 0; padding: 2px 0; } /* stacked without the header: the bold first cell names the row */
  .post td:first-child { font-weight: 500; }
  /* the header is hidden, so the later cells say what they are (same words as the hidden th: fTh2, fTh3, qTh2) */
  .post .fixes td:nth-child(2)::before { content: "Why it matters: "; color: var(--muted); }
  :lang(zh) .post .fixes td:nth-child(2)::before { content: "為什麼有用："; }
  .post .fixes td.rep::before { content: "Line in our report: "; }
  :lang(zh) .post .fixes td.rep::before { content: "報告上對應的項目："; }
  #questions td:last-child::before { content: "What AI needs on your site: "; color: var(--muted); }
  :lang(zh) #questions td:last-child::before { content: "AI 要在你的網站讀到："; }
}

footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 24px 40px; color: var(--muted); font-size: 13px; }
