/* The World atlas page and the Demos hub (apps/site/atlas.html, demos.html) — premium clay on the site's own tokens (design/tokens.css, site.css).
   The atlas itself (workspace/atlas.css) and the chat's cards (parts.css) load lazily beside this; nothing above the fold waits on them.
   Styles speak in start/end only (Arabic and Urdu mirror by themselves); 390 px wide with no page scroll; a visible focus ring; motion never when reduced. */

.ap-page { background-color: var(--bc-canvas); background-image: radial-gradient(1100px 520px at 6% -4%, #ECE0FF 0%, rgba(236, 224, 255, 0) 62%), radial-gradient(900px 480px at 96% 0%, #FFE8DA 0%, rgba(255, 232, 218, 0) 60%); background-repeat: no-repeat; background-size: 100% 860px; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html:has(.ap-page) { scroll-behavior: smooth; } }
.ap-page :focus-visible { outline: 2.5px solid var(--bc-focus); outline-offset: 3px; }

/* ── 1 · the hero ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 72px); align-items: center; max-width: 1360px; margin: 0 auto; padding: 116px var(--bc-gutter) var(--bc-s6); }
.ap-kick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--bc-s4); padding-block: 6px; padding-inline: 12px 14px; border-radius: 999px; background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px rgba(74, 29, 87, .12); color: var(--bc-plum); font-size: var(--bc-t-xs); font-weight: 600; }
.ap-kick > span:first-child { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2f9d62; box-shadow: 0 0 0 4px rgba(47, 157, 98, .18); }
.ap-hero h1 { font-size: clamp(2.5rem, 4.9vw, 4.4rem); font-weight: 750; font-stretch: 88%; line-height: .98; letter-spacing: -.03em; text-wrap: balance; }
.ap-lead { max-width: 46ch; margin-top: var(--bc-s5); color: var(--bc-ink-2); font-size: var(--bc-t-lg); line-height: 1.45; }
.ap-hero-act { display: flex; flex-wrap: wrap; gap: var(--bc-s3); margin-top: var(--bc-s6); }
.ap-note { margin-top: var(--bc-s4); color: var(--bc-ink-3); font-size: var(--bc-t-xs); }
.ap-art { margin: 0; border-radius: var(--bc-r-xl); overflow: hidden; aspect-ratio: 3 / 2; background: linear-gradient(120deg, #DCCBF6, #FFE3D2); box-shadow: 0 30px 60px -36px rgba(74, 29, 87, .5), 0 2px 8px rgba(31, 16, 38, .06); }
.ap-art img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }

/* ── the sections ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-sec { max-width: 1360px; margin: 0 auto; padding: var(--bc-s9) var(--bc-gutter) 0; }
.ap-head { max-width: 760px; margin-block-end: var(--bc-s6); }
.ap-head h2 { font-size: var(--bc-t-3xl); line-height: 1.02; text-wrap: balance; }
.ap-head p { max-width: 64ch; margin-top: var(--bc-s4); color: var(--bc-ink-2); }
.ap-fine { display: flex; align-items: flex-start; gap: 10px; max-width: 76ch; margin: var(--bc-s5) 0 0; color: var(--bc-ink-2); font-size: var(--bc-t-xs); line-height: 1.5; }
.ap-fine .bc-icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--bc-plum); }

/* ── 2 · the live atlas: a framed stage in soft clay ─────────────────────────────────────────────────────────────────────────────────── */
.ap-frame { padding: 12px; border-radius: 32px; background: linear-gradient(135deg, #E9DDFA 0%, #FADFD3 100%); box-shadow: 0 32px 70px -44px rgba(74, 29, 87, .55), inset 0 0 0 1px rgba(255, 255, 255, .7); }
.ap-stage { position: relative; min-height: clamp(560px, 82vh, 860px); padding: 10px 12px 14px; border-radius: 22px; background: rgba(246, 245, 248, .94); }
.ap-wait { display: grid; place-items: center; align-content: center; gap: 12px; min-height: clamp(440px, 70vh, 780px); color: var(--bc-ink-3); font-size: var(--bc-t-xs); }
.ap-spin { display: block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bc-plum-tint); border-top-color: var(--bc-plum); animation: ap-spin .8s linear infinite; }
@keyframes ap-spin { to { transform: rotate(360deg); } }
.ap-hint { margin: var(--bc-s3) auto 0; max-width: 70ch; text-align: center; color: var(--bc-ink-3); font-size: var(--bc-t-xs); line-height: 1.5; }
.ap-noscript { margin: var(--bc-s4) 0 0; padding: 14px 18px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink-2); }
.ap-noscript a { color: var(--bc-plum); font-weight: 600; }
/* the atlas' country sheet rises from the bottom of the SCREEN on a phone; on this page it belongs to the stage, so it rests near the bottom edge and hides while the stage is out of view */
.ap-stage.is-away .atl-side { visibility: hidden; }
@media (max-width: 560px) { .ap-stage .atl:not([data-wide="1"]) .atl-side { inset-block-end: calc(10px + env(safe-area-inset-bottom)); } .ap-stage { padding-inline: 6px; } .ap-frame { padding: 8px; border-radius: 26px; } }

/* ── 3 · ask it like a colleague ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-honest { display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 var(--bc-s5); padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink-2); font-size: var(--bc-t-xs); line-height: 1.45; }
.ap-honest .bc-icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--bc-sage); }
.ap-chat { display: grid; grid-template-columns: minmax(230px, 330px) minmax(0, 1fr); gap: var(--bc-s5); align-items: start; }
.ap-chips { position: sticky; inset-block-start: 88px; display: grid; gap: 8px; }
.ap-chip { display: block; padding: 12px 16px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--bc-line); color: var(--bc-ink-2); font: 600 15px/1.35 var(--bc-text); text-align: start; cursor: pointer; transition: box-shadow .15s, color .15s, background .15s; }
.ap-chip:hover { box-shadow: inset 0 0 0 1.5px var(--bc-plum); color: var(--bc-plum); }
.ap-chip[aria-pressed="true"] { background: var(--bc-ink); color: #fff; box-shadow: 0 10px 20px -14px rgba(31, 16, 38, .8); }
.ap-thread { display: grid; gap: 14px; align-content: start; min-height: 320px; min-width: 0; padding: 18px; border-radius: 28px; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 24px 50px -36px rgba(74, 29, 87, .45); }
.ap-msg { min-width: 0; animation: ap-in .35s ease both; }
@keyframes ap-in { from { opacity: 0; transform: translateY(6px); } }
.ap-msg--you { justify-self: end; max-width: min(86%, 520px); padding: 10px 16px; border-radius: 18px; border-end-end-radius: 6px; background: var(--bc-plum); color: #fff; font-size: 15px; line-height: 1.45; }
.ap-msg--bot { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.ap-facew { inline-size: 44px; block-size: 44px; }
.ap-face { inline-size: 44px; block-size: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--bc-plum-tint); box-shadow: 0 0 0 3px #fff, 0 8px 16px -10px rgba(74, 29, 87, .6); }
.ap-bot-body { min-width: 0; }
.ap-who-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 4px; font-size: 14px; color: var(--bc-ink); }
.ap-who-name small { color: var(--bc-ink-3); font-size: 12.5px; }
.ap-say { margin: 0 0 4px; padding: 10px 14px; border-radius: 18px; border-start-start-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink); font-size: 15px; line-height: 1.5; }
.ap-card { min-width: 0; }
.ap-card > .pt:first-child { margin-top: 10px; }
.ap-dots { display: inline-flex; gap: 5px; padding: 12px 16px; border-radius: 18px; border-start-start-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--bc-line); }
.ap-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--bc-ink-3); animation: ap-dot 1s ease-in-out infinite; }
.ap-dots i:nth-child(2) { animation-delay: .15s; } .ap-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ap-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ap-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 12px 16px; border-radius: 14px; background: #FBE7E6; color: #7a2b28; font-size: 14px; }
.ap-empty { display: grid; place-items: center; min-height: 240px; color: var(--bc-ink-3); font-size: var(--bc-t-xs); text-align: center; }
.ap-more { max-width: 70ch; margin: var(--bc-s5) 0 0; color: var(--bc-ink-2); font-size: var(--bc-t-sm); }
.ap-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── 4 · five steps ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--bc-s4); }
.ap-steps-list li { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px 18px 22px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .05), 0 22px 40px -32px rgba(74, 29, 87, .5); }
.ap-steps-list .ap-ic { display: block; inline-size: 100%; block-size: 96px; margin-block-end: 6px; object-fit: contain; }
.ap-n { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--bc-plum); color: #fff; font: 700 14px/1 var(--bc-display); }
.ap-steps-list h3 { font-size: var(--bc-t-md); line-height: 1.15; }
.ap-steps-list p { color: var(--bc-ink-2); font-size: var(--bc-t-xs); line-height: 1.5; }

/* ── 5 · what the passport tells you ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-who { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bc-s3); }
.ap-who li { --c: #b3acbd; --bg: #EFECF3; --tx: #5b5366; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; padding-block: 12px; padding-inline: 8px 18px; border-radius: 22px; background: #fff; border-inline-start: 4px solid var(--c); box-shadow: 0 0 0 1px rgba(31, 16, 38, .05), 0 20px 36px -30px rgba(74, 29, 87, .5); }
.ap-who li[data-tone="good"] { --c: #1f7a4d; --bg: #DCF1E4; --tx: #135a37; }
.ap-who li[data-tone="ok"] { --c: #5fb37a; --bg: #EAF6EE; --tx: #24623f; }
.ap-who li[data-tone="paid"] { --c: #d9a03f; --bg: #FBF0DA; --tx: #7e5209; }
.ap-who li[data-tone="account"] { --c: #5566c4; --bg: #E7EAF8; --tx: #303b8c; }
.ap-who li[data-tone="blocked"] { --c: #c4514c; --bg: #FBE5E3; --tx: #9b2f2c; }
.ap-who li > img { display: block; inline-size: 104px; block-size: 76px; object-fit: contain; }
.ap-who li > div { min-width: 0; }
.ap-who-t { display: inline-block; margin-block-end: 4px; padding: 2px 10px; border-radius: 12px; background: var(--bg); color: var(--tx); font-size: 13.5px; font-weight: 700; line-height: 1.35; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.ap-who-t:empty { display: none; }
.ap-who p { color: var(--bc-ink-2); font-size: var(--bc-t-xs); line-height: 1.5; }

/* ── 6 · not a black box ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bc-s5); }
.ap-trust-grid article { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 22px 24px 26px; border-radius: 24px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 0 0 1px rgba(31, 16, 38, .05); }
.ap-trust-grid .bc-icon { width: 26px; height: 26px; color: var(--bc-plum); }
.ap-trust-grid h3 { font-size: var(--bc-t-md); line-height: 1.2; }
.ap-trust-grid p { color: var(--bc-ink-2); font-size: var(--bc-t-xs); line-height: 1.55; }
.ap-src { margin-top: var(--bc-s5); }
.ap-src h3 { margin-block-end: var(--bc-s3); font-size: var(--bc-t-sm); color: var(--bc-ink-2); font-weight: 650; }
.ap-src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-src-list li { padding: 8px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--bc-line); color: var(--bc-ink-2); font-size: 13px; line-height: 1.4; }
.ap-src-list b { color: var(--bc-ink); font-weight: 650; }
.ap-src-list a { color: var(--bc-plum); font-weight: 600; text-decoration: none; }
.ap-src-list a:hover { text-decoration: underline; }
.ap-advice { margin: var(--bc-s5) 0 0; color: var(--bc-ink); font: 650 var(--bc-t-md)/1.4 var(--bc-display); font-stretch: 92%; }

/* ── the way in: the site's own CTA panel, three links stacked ───────────────────────────────────────────────────────────────────────── */
.ap-page .how-cta { padding-block-start: var(--bc-s9); }
.ap-page .how-cta-act { justify-items: start; }
@media (min-width: 901px) { .ap-page .how-cta-act { justify-items: center; } }

/* ── "Check a company here": a dialog that says what a check needs — and where to go ────────────────────────────────────────────────────── */
.ap-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.ap-gate[hidden] { display: none; }
.ap-gate-scrim { position: absolute; inset: 0; background: rgba(31, 16, 38, .5); backdrop-filter: blur(3px); }
.ap-gate-panel { position: relative; display: grid; gap: 10px; inline-size: min(460px, 100%); padding: 28px 28px 24px; border-radius: 28px; background: #fff; box-shadow: var(--bc-float), 0 0 0 1px rgba(31, 16, 38, .06); outline: 0; animation: ap-in .25s ease both; }
.ap-gate-panel h2 { font-size: var(--bc-t-xl); line-height: 1.1; text-wrap: balance; }
.ap-gate-panel p { color: var(--bc-ink-2); font-size: var(--bc-t-sm); line-height: 1.5; }
.ap-gate-for { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding-block: 4px; padding-inline: 8px 12px; border-radius: 999px; background: var(--bc-plum-tint); color: var(--bc-plum) !important; font-size: 13px !important; font-weight: 700; }
.ap-gate-for:empty { display: none; }
.ap-gate-for .ap-flag { font-size: 18px; line-height: 1; }
.ap-gate-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ap-gate-x { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; display: grid; place-items: center; inline-size: 38px; block-size: 38px; border: 0; border-radius: 50%; background: #F3EEF9; color: var(--bc-ink); cursor: pointer; }
.ap-gate-x:hover { background: #E9DDFA; }
html.ap-lock { overflow: hidden; }

/* ── the Demos hub ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.ap-dhead { max-width: 900px; margin: 0 auto; padding: 128px var(--bc-gutter) var(--bc-s6); text-align: center; }
.ap-dhead h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); font-weight: 750; font-stretch: 88%; line-height: .98; letter-spacing: -.03em; text-wrap: balance; }
.ap-dhead .ap-lead { max-width: 58ch; margin-inline: auto; }
.ap-demo-grid { list-style: none; margin: 0 auto; padding: 0 var(--bc-gutter); max-width: 1180px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bc-s5); }
.ap-demo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 22px; align-content: start; min-width: 0; padding: 26px; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .05), 0 26px 50px -36px rgba(74, 29, 87, .5); }
.ap-demo-ic { grid-row: 1 / span 3; inline-size: 96px; block-size: 96px; border-radius: 24px; object-fit: cover; box-shadow: 0 14px 26px -18px rgba(31, 16, 38, .5); }
.ap-demo-ic--pic { object-position: 65% 50%; }
.ap-demo-tx { min-width: 0; }
.ap-badge { display: inline-flex; align-items: center; gap: 7px; padding-block: 3px; padding-inline: 10px 12px; border-radius: 999px; background: var(--bg, #EFECF3); color: var(--tx, #5b5366); font-size: 12.5px; font-weight: 700; line-height: 1.4; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #b3acbd) 35%, transparent); }
.ap-badge::before { content: ''; flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c, #b3acbd); }
.ap-badge--live { --c: #1f7a4d; --bg: #DCF1E4; --tx: #135a37; }
.ap-badge--recorded { --c: #7a4fa8; --bg: #EFE7F8; --tx: #4A1D57; }
.ap-badge--check { --c: #5566c4; --bg: #E7EAF8; --tx: #303b8c; }
.ap-badge--example { --c: #d9a03f; --bg: #FBF0DA; --tx: #7e5209; }
.ap-demo h2 { margin-top: 10px; font-size: var(--bc-t-xl); line-height: 1.08; }
.ap-demo-tx p { margin-top: 8px; color: var(--bc-ink-2); font-size: var(--bc-t-sm); line-height: 1.5; }
.ap-demo .bc-btn { grid-column: 2; justify-self: start; margin-top: 14px; }
.ap-dend { max-width: 760px; margin: var(--bc-s8) auto 0; padding: 0 var(--bc-gutter) var(--bc-s9); text-align: center; }
.ap-dend p { color: var(--bc-ink); font: 650 var(--bc-t-lg)/1.35 var(--bc-display); font-stretch: 92%; }
.ap-dend .bc-btn { margin-top: var(--bc-s4); }

/* ── a narrower page ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ap-steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ap-hero { grid-template-columns: minmax(0, 1fr); padding-block-start: 104px; }
  .ap-art { max-width: 640px; }
  .ap-chat { grid-template-columns: minmax(0, 1fr); }
  .ap-chips { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-trust-grid { grid-template-columns: minmax(0, 1fr); gap: var(--bc-s3); }
  .ap-demo-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ap-sec { padding-block-start: var(--bc-s8); }
  .ap-steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bc-s3); }
  .ap-who { grid-template-columns: minmax(0, 1fr); }
  .ap-chips { grid-template-columns: minmax(0, 1fr); }
  .ap-thread { padding: 12px; border-radius: 22px; }
  .ap-msg--bot { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .ap-face, .ap-facew { inline-size: 36px; block-size: 36px; }
  .ap-demo { grid-template-columns: 72px minmax(0, 1fr); gap: 4px 16px; padding: 20px; }
  .ap-demo-ic { inline-size: 72px; block-size: 72px; border-radius: 18px; }
  .ap-demo h2 { margin-top: 8px; }
  .ap-gate-panel { padding: 24px 20px 20px; }
}
@media (max-width: 460px) { .ap-steps-list { grid-template-columns: minmax(0, 1fr); } .ap-hero-act .bc-btn { flex: 1 1 auto; } }
@media (prefers-reduced-motion: reduce) { .ap-msg, .ap-gate-panel { animation: none; } .ap-dots i, .ap-spin { animation: none; } .ap-chip { transition: none; } }
