/* ==========================================================================
   WorldApp Atlas — 世界应用大全
   Editorial data-atlas design system
   ========================================================================== */

:root {
  --paper: #f6f4ef;
  --surface: #fffefb;
  --surface-2: #f1eee6;
  --ink: #15171a;
  --ink-2: #3c4147;
  --muted: #6f7169;
  --line: #e3ded3;
  --line-2: #cfc8b8;
  --accent: #b23a26;
  --accent-soft: #f7e8e3;
  --teal: #1d5a55;
  --teal-soft: #e4efec;
  --gold: #a97c33;
  --radius: 14px;
  --radius-sm: 9px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --shadow-1: 0 1px 2px rgba(21, 23, 26, .05), 0 8px 24px -18px rgba(21, 23, 26, .35);
  --shadow-2: 0 2px 6px rgba(21, 23, 26, .06), 0 22px 40px -28px rgba(21, 23, 26, .45);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::selection { background: #f2d9d1; color: #4a1a10; }

h1, h2, h3, h4 {
  font-weight: 640;
  letter-spacing: -.018em;
  line-height: 1.22;
  margin: 0 0 .5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
strong { font-weight: 640; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; top: 0; inset-inline-start: 8px; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
  transform: translateY(-160%); transition: transform .16s ease;
}
.skip:focus { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, .88);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
/* the domain wordmark: every letter its own colour, and extra tracking between the two v
   so abcvv never reads as abcw */
.brand-domain {
  display: inline-flex; align-items: baseline;
  font-family: var(--sans);
  font-size: 20px; font-weight: 800;
  letter-spacing: .085em;
  line-height: 1.05;
  direction: ltr; unicode-bidi: isolate;
}
.brand-domain .bl { display: inline-block; }
.brand-domain .bl-gap { margin-inline-start: .1em; }
.brand:hover .brand-domain { filter: saturate(1.2) brightness(.96); }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.brand-sub.is-cn { letter-spacing: .05em; text-transform: none; font-size: 10.5px; }

.head-nav { display: flex; gap: 4px; margin-left: 8px; }
.head-nav a {
  font-size: 13.5px; color: var(--ink-2); padding: 7px 11px; border-radius: 8px;
}
.head-nav a:hover { background: var(--surface-2); color: var(--ink); }
.head-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.searchbox { position: relative; }
.searchbox input {
  width: 210px; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); font-size: 13.5px;
  transition: width .2s ease, border-color .2s ease;
}
.searchbox input::placeholder { color: #9a9a90; }
.searchbox input:focus { width: 260px; border-color: var(--ink-2); outline: none; }
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.lang-btn {
  display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13.5px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--ink-2); }
.lang-btn .flagdot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.lang-panel {
  position: absolute; right: 24px; top: 60px; width: 340px; max-height: 70vh;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow-2); z-index: 60;
  display: none; flex-direction: column; overflow: hidden;
}
.lang-panel[data-open="true"] { display: flex; }
.lang-panel-head { padding: 12px; border-bottom: 1px solid var(--line); }
.lang-panel-head input {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-2);
  border-radius: 9px; background: var(--paper); font-size: 13.5px;
}
.lang-list { overflow-y: auto; padding: 6px; }
.lang-list a, .lang-list button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; background: none; border-radius: 8px;
  font-size: 13.5px; text-align: left; cursor: pointer;
}
.lang-list button:hover { background: var(--surface-2); }
.lang-list .native { font-weight: 550; }
.lang-list .en { color: var(--muted); font-size: 12px; margin-left: auto; }
.lang-list .tick { color: var(--accent); font-size: 12px; }
.lang-list .sec {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 12px 10px 6px;
}

/* ---------------------------------------------------------------- hero */
.hero { padding: 56px 0 12px; }
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.03em; max-width: 20ch; }
.hero .lede { font-size: clamp(1.02rem, 1.3vw, 1.14rem); color: var(--ink-2); max-width: 68ch; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
}
.hero-meta span { display: flex; align-items: center; gap: 7px; }
.hero-meta i { width: 4px; height: 4px; background: var(--line-2); border-radius: 50%; display: block; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  margin: 40px 0 0;
}
.stat { padding: 20px 22px 18px 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 6px 0 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 620; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat dd small { font-size: .5em; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }

/* ---------------------------------------------------------------- tldr */
.tldr {
  background: linear-gradient(180deg, #fffdf8, #fbf8f1);
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px; margin: 34px 0;
}
.tldr-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.tldr ul { margin: 0; padding-left: 18px; }
.tldr li { margin: 6px 0; }
.tldr li::marker { color: var(--accent); }
.tldr p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- section */
.sec { margin: 56px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sec-head h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin: 0; }
.sec-head .more { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sec-head .more:hover { color: var(--accent); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.35rem, 2.1vw, 1.7rem); margin-top: 40px; }
.prose h3 { font-size: 1.08rem; margin-top: 28px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose a { color: var(--teal); border-bottom: 1px solid rgba(29, 90, 85, .28); }
.prose a:hover { color: var(--accent); border-color: rgba(178, 58, 38, .4); }

/* ---------------------------------------------------------------- table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rank thead th {
  text-align: left; font-family: var(--mono); font-weight: 500;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 13px 14px; border-bottom: 1px solid var(--line-2);
  background: var(--surface-2); white-space: nowrap;
}
table.rank td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.rank tbody tr:last-child td { border-bottom: 0; }
table.rank tbody tr:hover { background: #fdfbf5; }
table.rank .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rank .rk { color: var(--muted); width: 46px; font-size: 12px; }
table.rank .cty { display: flex; align-items: center; gap: 11px; min-width: 190px; }
table.rank .cty img { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
table.rank .cty b { font-weight: 600; display: block; line-height: 1.3; }
table.rank .cty span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
table.rank .bar { width: 130px; }
table.rank .bar i { display: block; height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #d98a6e); }
table.rank .apps-mini { display: flex; flex-wrap: wrap; gap: 5px; }
table.rank .apps-mini span {
  font-size: 11.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- all-websites table */
table.sites-table { table-layout: fixed; }
table.sites-table td { vertical-align: top; }
table.sites-table thead th:nth-child(1) { width: 26%; }
table.sites-table thead th:nth-child(2) { width: 13%; }
table.sites-table thead th:nth-child(3) { width: 12%; }
table.sites-table thead th:nth-child(4) { width: 49%; }
table.sites-table .slink { font-weight: 600; display: block; }
table.sites-table .slink .ext { font-size: 10px; color: var(--muted); margin-inline-start: 4px; }
table.sites-table .sh { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
table.sites-table .sd { color: var(--ink-2); font-size: 13px; }
table.sites-table .scountry { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
table.sites-table .scountry img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
table.sites-table td:nth-child(2) { white-space: nowrap; }
table.sites-table tr { scroll-margin-top: 84px; }

/* ---------------------------------------------------------------- cards / grid */
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.appcard {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.appcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line-2); color: inherit; }
.appcard:hover .appcard-arrow { color: var(--accent); transform: translate(2px, -2px); }
.tile {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 40px;
  display: grid; place-items: center; font-weight: 660; font-size: 17px;
  letter-spacing: -.02em; position: relative; overflow: hidden;
}
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 60%); }
.tile.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 25px; flex-basis: 60px; }
.appcard-body { min-width: 0; flex: 1; }
.appcard-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: flex; align-items: baseline; gap: 6px; }
.appcard-name em { font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 450; }
.appcard-tag { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.appcard-arrow { color: var(--line-2); font-size: 13px; transition: all .16s ease; margin-left: 2px; }

/* ---- local websites ---- */
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.sitecard {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.sitecard:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line-2); color: inherit; }
.sitecard:hover .sitecard-arrow { color: var(--accent); transform: translate(2px, -2px); }
.sitebadge {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  display: grid; place-items: center;
  font-weight: 750; font-size: 15px; letter-spacing: -.02em;
  background: var(--surface-2);
}
.sitecard-body { min-width: 0; flex: 1; }
.sitecard-name { font-weight: 620; font-size: 14px; line-height: 1.3; display: block; }
.sitecard-host { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 1px; letter-spacing: .01em; direction: ltr; unicode-bidi: isolate; }
.sitecard-desc { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: 5px 0 0; }
.sitecard-arrow { color: var(--line-2); font-size: 12px; transition: all .16s ease; }
[dir="rtl"] .sitecard-arrow { transform: scaleX(-1); }

.catsec { margin: 34px 0; }
.catsec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.catsec-head h3 { margin: 0; font-size: 1.02rem; }
.catsec-head .count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.catdot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.catsec-head .catdesc { font-size: 12.5px; color: var(--muted); margin-left: auto; }

/* ---------------------------------------------------------------- article layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 52px; align-items: start; padding: 34px 0 20px; }
.aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card-title {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; text-align: right; font-weight: 550; }

.toc { display: flex; flex-direction: column; gap: 2px; }
.toc a { font-size: 13px; color: var(--ink-2); padding: 6px 8px; border-radius: 7px; border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface-2); color: var(--ink); border-left-color: var(--accent); }

/* ---------------------------------------------------------------- page head */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span.sep { color: var(--line-2); }

.pagehead { padding: 26px 0 6px; }
.pagehead .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pagehead h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -.028em; max-width: 24ch; }
.pagehead .lede { font-size: 1.03rem; color: var(--ink-2); max-width: 70ch; }
.titleflag { width: 46px; height: 32px; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.cat { background: var(--surface-2); }
.morelink { font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.morelink:hover { border-color: var(--ink); }

/* ---------------------------------------------------------------- faq */
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 30px 16px 0; position: relative;
  font-weight: 570; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 15px; color: var(--muted);
  font-size: 18px; font-weight: 400; transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 30px 18px 0; color: var(--ink-2); font-size: 14.5px; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- callouts */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--teal-soft); border: 1px solid #cfe0dc;
  border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; color: #1b4b47;
  margin: 22px 0;
}
.note svg { flex: 0 0 18px; margin-top: 2px; }
.note p:last-child { margin-bottom: 0; }
.citebox {
  background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 14px 16px; font-size: 12.5px; color: var(--ink-2); margin: 22px 0;
}
.citebox b { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.citebox code { font-family: var(--mono); font-size: 11.5px; word-break: break-word; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 550;
  border: 1px solid var(--ink); cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line-2); margin-top: 64px; padding: 40px 0 48px; background: var(--surface-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.foot-grid a { color: var(--ink-2); }
.foot-grid a:hover { color: var(--accent); }
.foot-note { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------------------------------------------------------------- misc */
.cat-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.results { margin-top: 10px; display: none; }
.results[data-open="true"] { display: block; }
.results a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; }
.results a:hover { background: var(--surface-2); }
.results .r-meta { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.results-empty { padding: 12px; color: var(--muted); font-size: 13px; }

.backtop { position: fixed; right: 22px; bottom: 22px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); display: none; place-items: center; cursor: pointer; box-shadow: var(--shadow-1); z-index: 40; }
.backtop[data-show="true"] { display: grid; }

.relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.relitem { display: flex; gap: 10px; align-items: center; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; }
.relitem:hover { border-color: var(--line-2); background: #fdfbf5; }
.relitem img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.relitem em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: auto; }

.kv-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.kv-inline b { color: var(--ink-2); font-weight: 550; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 34px; }
  .aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .aside > .card { flex: 1 1 260px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .head-nav { display: none; }
  .searchbox input { width: 150px; }
  .searchbox input:focus { width: 180px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  table.rank .bar, table.rank .col-bar { display: none; }
  .lang-panel { right: 12px; left: 12px; width: auto; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 34px 0 8px; }
  table.rank thead th:nth-child(3), table.rank td:nth-child(3) { display: none; }
  table.rank.sites-table thead th:nth-child(3), table.rank.sites-table td:nth-child(3) { display: table-cell; }
  table.rank.sites-table thead th:nth-child(2), table.rank.sites-table td:nth-child(2) { display: none; }
  table.sites-table thead th:nth-child(1) { width: 38%; }
  table.sites-table thead th:nth-child(3) { width: 20%; }
  table.sites-table thead th:nth-child(4) { width: 42%; }
  table.sites-table .sd { font-size: 12.5px; max-width: none; }
  .appgrid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .searchbox { display: none; }
  .head-in { gap: 10px; }
  .brand-domain { font-size: 17px; letter-spacing: .055em; }
  .brand-domain .bl-gap { margin-inline-start: .07em; }
  .lang-btn { padding: 0 10px; font-size: 12.5px; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Multilingual components — language tabs, facts grid, source lists, RTL
   ========================================================================== */

.langtabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 2px; }
.langtabs-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
.langtabs a {
  font-size: 13px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
}
.langtabs a:hover { border-color: var(--ink); color: var(--ink); }
.langtabs a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.facts-wide {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 20px; margin: 0;
}
.facts-wide div { padding: 12px 0; }
.facts-wide dd small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) { .facts-wide { grid-template-columns: 1fr; gap: 0; padding: 6px 16px; } }

.srclist { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.srclist li { margin: 7px 0; }
.srclist a { color: var(--teal); border-bottom: 1px solid rgba(29, 90, 85, .28); }

.linklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.linklist a { display: block; font-size: 13px; padding: 7px 9px; border-radius: 7px; color: var(--ink-2); }
.linklist a:hover { background: var(--surface-2); color: var(--ink); }

.pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
.pill.ok { background: var(--teal-soft); border-color: #cfe0dc; color: #1b4b47; }
.pill.mid { background: var(--accent-soft); border-color: #f0d6ce; color: #8c2d1c; }
.pill.low { background: var(--surface-2); color: var(--muted); }

.tile-lg { width: 54px; height: 54px; border-radius: 14px; font-size: 24px; flex: none; }
.apphead { display: flex; gap: 18px; align-items: center; margin-top: 6px; }
.apphead h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 0 0 4px; letter-spacing: -.03em; }
.apphead .lede { margin: 0; font-size: 1rem; color: var(--ink-2); }

.btn-full { width: 100%; justify-content: center; margin-bottom: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); margin-left: 8px; }
.btn-ghost:hover { background: var(--surface-2); }

.foot-desc { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 36ch; line-height: 1.6; }
.lang-more {
  display: block; padding: 11px 14px; font-size: 12.5px; color: var(--teal);
  border-top: 1px solid var(--line); background: var(--surface-2);
  position: sticky; bottom: 0;
}
.tsm { font-size: 12px; color: var(--muted); }
.tnum { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.altbanner {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 10px 14px; margin: 16px 0 0; font-size: 13px;
}
.altbanner a { color: var(--teal); font-weight: 550; border-bottom: 1px solid rgba(29, 90, 85, .3); }
.altbanner button {
  margin-left: auto; background: none; border: 0; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 4px;
}

/* ---- right-to-left pages ---- */
[dir="rtl"] .crumbs span.sep { transform: scaleX(-1); }
[dir="rtl"] .facts dd { text-align: left; }
[dir="rtl"] .relitem em,
[dir="rtl"] .appcard-arrow,
[dir="rtl"] .results .r-meta { margin-left: 0; margin-right: auto; }
[dir="rtl"] .langtabs-label { margin-right: 0; margin-left: 2px; }
[dir="rtl"] .srclist { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .tldr ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .altbanner button { margin-left: 0; margin-right: auto; }
[dir="rtl"] .appcard-arrow { transform: scaleX(-1); }
[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }

.summary .facts dd small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }

table.rank .bar { display: block; }
table.rank th.col-bar, table.rank td.col-bar { width: 150px; }

/* related-country chips */
.relgrid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.relitem .relname { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.relitem .relname b { font-weight: 560; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relitem .relname em { font-style: normal; font-size: 11.5px; color: var(--muted); margin: 0; }
.relitem > em.num { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-style: normal; }
[dir="rtl"] .relitem > em.num { margin-left: 0; margin-right: auto; }

/* ---- language panel: clean three-part layout ---- */
.lang-panel { width: 356px; max-height: 78vh; }
.lang-panel .lang-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 6px 8px; overscroll-behavior: contain; }
.lang-panel .lang-list a {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 7px; font-size: 13px; line-height: 1.3;
}
.lang-panel .lang-list a:hover { background: var(--surface-2); }
.lang-panel .lang-list a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.lang-panel .lang-list .native { font-weight: 540; }
.lang-panel .lang-list .en { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.lang-panel .lang-list .lp-sec {
  position: sticky; top: 0; background: var(--surface); z-index: 1;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: 9px 10px 5px;
}
.lang-panel-foot {
  display: block; padding: 11px 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--teal); background: var(--surface-2); flex: none;
}
.lang-panel-foot:hover { color: var(--accent); }
.lang-panel { height: min(72vh, 600px); }
@media (max-width: 820px) { .lang-panel { height: min(78vh, 520px); } }

/* ---------------------------------------------------------------- rankings */
.rankbar {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 0 0; padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.rankbar-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; font-weight: 600;
}
.rankbar-scroll { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; padding: 1px; }
.rankbar-scroll::-webkit-scrollbar { display: none; }
.rankbar.has-overflow .rankbar-scroll {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.rankbar.at-end .rankbar-scroll { -webkit-mask-image: none; mask-image: none; }
.rankbar-item {
  display: flex; flex-direction: column; gap: 1px; padding: 5px 10px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  white-space: nowrap; transition: border-color .15s ease, background .15s ease;
}
.rankbar-item .rk-k { font-size: 10px; color: var(--muted); letter-spacing: .02em; }
.rankbar-item .rk-v { font-size: 12px; color: var(--ink-2); }
.rankbar-item b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rankbar-item:hover { border-color: var(--line-2); }
.rankbar-item.on { background: var(--ink); border-color: var(--ink); }
.rankbar-item.on .rk-k { color: rgba(255, 255, 255, .62); }
.rankbar-item.on .rk-v, .rankbar-item.on b { color: #fff; }
.rankbar-all {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--ink); padding-left: 12px; margin-left: 4px;
  border-left: 1px solid var(--line);
}
.rankbar-all:hover { color: var(--accent); }
.rankbar-all span { color: var(--muted); font-weight: 500; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.podium-card {
  display: flex; flex-direction: column; gap: 3px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .16s ease, box-shadow .16s ease;
}
.podium-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); color: inherit; }
.podium-card img { width: 32px; height: 22px; border-radius: 3px; margin: 2px 0 4px; object-fit: cover; }
.podium-card.p1 { background: linear-gradient(178deg, #fffdf3, var(--surface) 62%); border-color: #ddc98f; }
.podium-rank { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.podium-name { font-size: 16.5px; font-weight: 620; letter-spacing: -.015em; }
.podium-val { font-size: 21px; font-weight: 680; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.podium-sub { font-size: 11.5px; color: var(--muted); }

.boardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.boardcard {
  display: flex; flex-direction: column; gap: 10px; padding: 15px 16px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.boardcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.boardcard-head h3 { margin: 0; font-size: 15px; }
.boardcard-head .count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.boardlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.boardlist a { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.boardlist img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex: 0 0 20px; }
.bpos { font-family: var(--mono); font-size: 10.5px; color: var(--muted); width: 12px; flex: 0 0 12px; }
.bname { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boardlist b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.boardcard .bar { display: block; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.boardcard .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #d98a6e); }
.boardgrid-compact .boardlist { gap: 4px; }
.boardgrid-compact .boardcard { padding: 14px 15px 12px; }

.bar-neg i { background: linear-gradient(90deg, #5b6470, #97a0ad) !important; }

.ranklist { list-style: none; margin: 8px 0 12px; padding: 0; }
.ranklist a {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--line);
}
.ranklist a:last-child { border-bottom: 0; }
.ranklist b { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

.kindchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.chip-sm { font-size: 11.5px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chip-sm .tnum { color: var(--muted); font-size: 10.5px; }
button.chip { font: inherit; font-size: 11.5px; }
.kindfilter.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.kindfilter.is-on .tnum { color: rgba(255, 255, 255, .68); }
.kindtag {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.sitecard-kind {
  font-size: 10.5px; margin-inline-start: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-weight: 500; vertical-align: 1.5px;
}
.kindchips + .sitegrid { margin-top: 4px; }

@media (max-width: 820px) {
  .rankbar { flex-wrap: wrap; gap: 8px; }
  .rankbar-label { display: none; }
  .podium { grid-template-columns: 1fr; }
  .podium-card { padding: 13px 15px; }
  .podium-val { font-size: 19px; }
}
@media (max-width: 560px) {
  table.rank.boardtable thead th:nth-child(3), table.rank.boardtable td:nth-child(3) { display: table-cell; }
  table.rank.boardtable thead th:nth-child(5), table.rank.boardtable td:nth-child(5),
  table.rank.boardtable thead th:nth-child(6), table.rank.boardtable td:nth-child(6),
  table.rank.boardtable thead th:nth-child(7), table.rank.boardtable td:nth-child(7) { display: none; }
}

/* ------------------------------------------------ entity tables: websites / apps */
.podium-card.is-static { pointer-events: none; }
.podium-card.is-static:hover { transform: none; box-shadow: none; }
.podium-card.is-static .podium-name { font-size: 17px; }

.boardlist li .brow { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.wrank-name { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.wrank-name b { font-weight: 600; letter-spacing: -.01em; }
.wrank-dom { font-size: 11px; color: var(--muted); font-family: var(--mono); }
a.wrank-name:hover b { color: var(--accent); }

table.entitytable td:nth-child(2) { min-width: 168px; }
table.entitytable td .wrank-name b { font-size: 13.5px; }
table.entitytable tr.is-top td { background: rgba(224, 122, 95, .04); }

@media (max-width: 760px) {
  table.entitytable thead th:nth-child(7), table.entitytable td:nth-child(7) { display: none; }
}
@media (max-width: 560px) {
  table.entitytable thead th:nth-child(5), table.entitytable td:nth-child(5) { display: table-cell; }
  table.entitytable thead th:nth-child(6), table.entitytable td:nth-child(6),
  table.entitytable thead th:nth-child(7), table.entitytable td:nth-child(7) { display: none; }
  table.entitytable thead th:nth-child(3), table.entitytable td:nth-child(3) { display: none; }
}

/* fixed widths so the name column never collapses and the bar column never drifts */
table.entitytable { table-layout: fixed; }
table.entitytable thead th:nth-child(1) { width: 52px; }
table.entitytable thead th:nth-child(2) { width: 23%; }
table.entitytable thead th:nth-child(3) { width: 14%; }
table.entitytable thead th:nth-child(4) { width: 13%; }
table.entitytable thead th:nth-child(5) { width: 108px; }
table.entitytable thead th:nth-child(6) { width: 112px; }
table.entitytable thead th:nth-child(7) { width: 22%; }
table.entitytable td.col-bar { overflow: hidden; }
table.entitytable td.col-bar .bar { width: 100%; }

/* the basis cell: metric on top, disclosure underneath */
.bmet { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.bmet b { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.bmet span { font-size: 11px; color: var(--muted); }
.podium-val .podium-metric { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 5px; letter-spacing: .01em; }

/* platforms with no comparable figure */
table.gapstable { table-layout: fixed; }
table.gapstable thead th:nth-child(1) { width: 14%; }
table.gapstable thead th:nth-child(2) { width: 12%; }
table.gapstable thead th:nth-child(3) { width: 15%; }
table.gapstable thead th:nth-child(4) { width: 59%; }
table.gapstable td { vertical-align: top; }
@media (max-width: 700px) {
  table.gapstable thead th:nth-child(2), table.gapstable td:nth-child(2) { display: none; }
  table.gapstable thead th:nth-child(1) { width: 26%; }
  table.gapstable thead th:nth-child(3) { width: 26%; }
  table.gapstable thead th:nth-child(4) { width: 48%; }
}
.srclist-tight li { font-size: 12.5px; }

/* the global img rule makes images block-level; inside a table cell the flag must sit beside the name */
table.entitytable td img {
  display: inline-block; vertical-align: -3px; margin-right: 6px;
  width: 26px; height: 18px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

/* narrow screens: keep rank, name and number; drop country, category, bar and source
   (a later block in this sheet also targets table.rank columns, so this has to be last) */
@media (max-width: 560px) {
  table.rank.boardtable.entitytable thead th:nth-child(1), table.rank.boardtable.entitytable td:nth-child(1),
  table.rank.boardtable.entitytable thead th:nth-child(2), table.rank.boardtable.entitytable td:nth-child(2),
  table.rank.boardtable.entitytable thead th:nth-child(5), table.rank.boardtable.entitytable td:nth-child(5) { display: table-cell; }
  table.rank.boardtable.entitytable thead th:nth-child(3), table.rank.boardtable.entitytable td:nth-child(3),
  table.rank.boardtable.entitytable thead th:nth-child(4), table.rank.boardtable.entitytable td:nth-child(4),
  table.rank.boardtable.entitytable thead th:nth-child(6), table.rank.boardtable.entitytable td:nth-child(6),
  table.rank.boardtable.entitytable thead th:nth-child(7), table.rank.boardtable.entitytable td:nth-child(7) { display: none; }
  table.rank.boardtable.entitytable thead th:nth-child(1) { width: 34px; }
  table.rank.boardtable.entitytable thead th:nth-child(2) { width: auto; }
  table.rank.boardtable.entitytable thead th:nth-child(5) { width: 96px; }
  table.rank.boardtable.entitytable td:nth-child(2) { min-width: 0; }
}

/* phones: the basis column is hidden, so carry the metric under the number instead */
.mtag { display: none; font-style: normal; font-weight: 400; }
@media (max-width: 560px) {
  table.rank.boardtable.entitytable .mtag {
    display: block; margin-top: 2px;
    font-size: 10px; line-height: 1.2; color: var(--muted); letter-spacing: .02em;
  }
}

/* board cards: keep the metric visible next to the number */
.bmt { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 4px; letter-spacing: .02em; }
.bmt:empty { display: none; }
