/* Everything Xiaomi — THE CHANGELOG (look.blog = 'changelog'). The stories logged the way Xiaomi owners read update notes: every entry
   on one line, its dot in the colour of its line (Xiaomi, Redmi, POCO, MIUI & HyperOS, the ecosystem, other brands), its kind, the device
   it is about and its minutes. One stylesheet for the app's /blog/ and home block (src/lib/ui/sites/everythingxiaomi/Changelog*.svelte)
   and WordPress's own listings and articles (ops/wp/theme/parts/changelog/). Colours come from the site's tokens. */

.cl { --cl-xiaomi: var(--brand); --cl-redmi: #d32f2f; --cl-poco: #f5c400; --cl-system: #2f6fe4; --cl-eco: #17a35a; --cl-other: #8a8f98; --cl-more: var(--muted); }
.cl-xiaomi, .cl-b-xiaomi { --ln: var(--cl-xiaomi); }
.cl-redmi, .cl-b-redmi { --ln: var(--cl-redmi); }
.cl-poco, .cl-b-poco { --ln: var(--cl-poco); }
.cl-system, .cl-b-system { --ln: var(--cl-system); }
.cl-eco, .cl-b-eco { --ln: var(--cl-eco); }
.cl-other, .cl-b-other { --ln: var(--cl-other); }
.cl-more, .cl-b-more { --ln: var(--cl-more); }
.cl .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cl-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ln, var(--muted)); }

/* ---------- the masthead ---------- */
.cl-mast { display: grid; gap: 12px; margin: 14px 0 22px; padding: 26px 26px 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.cl-mast > .google-auto-placed { width: 100%; }
.cl-eyebrow { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cl-eyebrow > span { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--brand) 60%, #fff); }
.cl-mast h1 { margin: 0; font: 900 clamp(2rem, 1.4rem + 2.6vw, 3.2rem)/1.04 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.cl-mast--sm h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
.cl-stand { max-width: 64ch; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }
.cl-lines { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cl-lines button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 700 .88rem/1 var(--font-text); cursor: pointer; }
.cl-lines button i { font-style: normal; font-weight: 800; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-lines button:hover { box-shadow: inset 0 0 0 1.5px var(--ln, var(--brand)); }
.cl-lines button.on { background: var(--ink); color: var(--bg); }
.cl-lines button.on i { color: inherit; opacity: .7; }

/* ---------- the tags every entry carries ---------- */
.cl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cl-kind, .cl-dev, .cl-line { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; font-size: .74rem; font-weight: 800; line-height: 1.2; }
.cl-kind { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.cl-k-how-to { background: color-mix(in srgb, #2f6fe4 16%, var(--surface)); }
.cl-k-reviews { background: color-mix(in srgb, #8b5cf6 18%, var(--surface)); }
.cl-k-miui { background: color-mix(in srgb, #17a35a 18%, var(--surface)); }
.cl-k-tvs { background: color-mix(in srgb, #0ea5b7 18%, var(--surface)); }
.cl-k-accessories { background: color-mix(in srgb, #db2777 15%, var(--surface)); }
.cl-k-audio { background: color-mix(in srgb, #6366f1 16%, var(--surface)); }
.cl-dev { background: var(--ink); color: var(--bg); font-family: var(--font-display); letter-spacing: .01em; }
.cl-line { padding-left: 2px; color: var(--muted); font-weight: 700; }
.cl-line::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ln, var(--muted)); }
.cl-lead .cl-line::before, .cl-head .cl-line::before { display: none; }
.cl-hl { font: 800 1.08rem/1.3 var(--font-display); color: var(--ink); overflow-wrap: anywhere; text-wrap: pretty; }

/* ---------- the latest entry ---------- */
.cl-lead { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-bottom: 26px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.cl-lead:hover { color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 2px var(--ln, var(--brand)); }
.cl-lead .cl-pic { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.cl-lead .cl-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl-lead-body { display: grid; align-content: center; gap: 12px; padding: 24px 26px; border-left: 5px solid var(--ln, var(--brand)); }
.cl-build { display: inline-flex; align-items: center; justify-self: start; gap: 10px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cl-build time { font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .8; }
.cl-lead .cl-hl { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.18; letter-spacing: -.02em; }
.cl-ex { color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cl-mins { font-size: .84rem; font-weight: 700; color: var(--muted); }

/* ---------- the log: one line down the page, a dot per entry ---------- */
.cl-log { display: grid; margin: 0; padding: 0; list-style: none; }
.cl-e > a { display: grid; grid-template-columns: 104px 28px minmax(0, 1fr) 132px; grid-template-areas: 'when node body pic'; align-items: start; gap: 0 14px; padding: 14px 10px 14px 0; border-radius: 14px; color: var(--ink); }
.cl-e > a:hover { color: var(--ink); background: var(--surface); }
.cl-e > a:hover .cl-hl { text-decoration: underline; text-decoration-color: var(--ln, var(--brand)); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cl-when { grid-area: when; display: grid; justify-items: end; gap: 2px; padding-top: 2px; text-align: right; }
.cl-when time { font-size: .84rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cl-when small { font-size: .74rem; color: var(--muted); }
.cl-node { grid-area: node; position: relative; align-self: stretch; }
.cl-node::before { content: ''; position: absolute; left: 50%; top: -14px; bottom: -14px; width: 2px; transform: translateX(-50%); background: var(--line); }
.cl-node::after { content: ''; position: absolute; left: 50%; top: 5px; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-50%); background: var(--ln, var(--brand)); box-shadow: 0 0 0 4px var(--bg); }
.cl-e:first-child .cl-node::before { top: 12px; }
.cl-e:last-child .cl-node::before { bottom: auto; height: 26px; }
.cl-e > a:hover .cl-node::after { box-shadow: 0 0 0 4px var(--surface); }
.cl-body { grid-area: body; display: grid; gap: 7px; min-width: 0; }
.cl-thumb { grid-area: pic; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.cl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl-none, .cl-empty { margin: 0; padding: 20px; border-radius: 14px; background: var(--surface-2); color: var(--muted); text-align: center; }
.cl-none button { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 800; text-decoration: underline; text-decoration-color: var(--brand); cursor: pointer; }
.cl-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin-top: 28px; font-weight: 700; color: var(--muted); }
.cl-pager a, .cl-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border-radius: 999px; color: var(--ink); }
.cl-pager a { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cl-pager a:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.cl-pager .page-numbers.current { background: var(--brand); color: var(--brand-ink); }
.cl-pager .dots { min-width: 0; padding: 0 2px; }

/* ---------- the home block ---------- */
.cl-home { margin: 34px 0 10px; padding: 20px 22px 10px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.cl-home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cl-home-head h2 { margin: 0; font: 900 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--font-display); letter-spacing: -.02em; }
.cl-home-head a { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; white-space: nowrap; }
.cl-home .cl-e > a:hover { background: var(--surface-2); }
.cl-home .cl-node::after { box-shadow: 0 0 0 4px var(--surface); }
.cl-home .cl-e > a:hover .cl-node::after { box-shadow: 0 0 0 4px var(--surface-2); }

/* ---------- WordPress: listings and articles ---------- */
.cl-list .cl-wrapbody, .cl-art .cl-wrapbody { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: clamp(26px, 4vw, 46px); align-items: start; margin-top: 8px; }
.cl .cl-wrapbody--full { grid-template-columns: minmax(0, 1fr); }
.cl-art .cl-head { display: grid; gap: 14px; margin: 14px 0 0; padding: 24px 26px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); border-left: 6px solid var(--ln, var(--brand)); }
.cl-art .cl-head > .google-auto-placed { width: 100%; }
.cl-art .cl-head h1 { margin: 0; font: 900 clamp(1.8rem, 1.3rem + 2vw, 2.7rem)/1.1 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.cl-art .cl-stand { font-size: 1.1rem; }
.cl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.cl-meta a { color: var(--ink); font-weight: 700; }
.cl-art .cl-hero { margin: 20px 0 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.cl-art .cl-hero img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.cl-art .cl-hero figcaption { padding: 8px 14px; font-size: .84rem; color: var(--muted); background: var(--surface); }
.cl-art .pdt-paper { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; overflow: clip; overflow-clip-margin: 8px; }
.cl-art .entry-content { font-size: 1.08rem; line-height: 1.75; max-width: 70ch; }
/* an article's sections read like the sections of an update note: a coloured rule on the left, bullets as dashes */
.cl-art .entry-content h2 { margin: 1.9em 0 .6em; padding-left: 14px; border-left: 5px solid var(--brand); font: 900 clamp(1.3rem, 1.1rem + .8vw, 1.75rem)/1.25 var(--font-display); letter-spacing: -.02em; }
.cl-art .entry-content h3 { margin: 1.6em 0 .45em; font: 800 1.18rem/1.3 var(--font-display); }
.cl-art .entry-content ul { padding-left: 1.3em; }
.cl-art .entry-content ul li::marker { content: '– '; color: var(--brand); font-weight: 900; }
.cl-art .entry-content ol li::marker { color: var(--brand); font-weight: 800; }
.cl-art .entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cl-art .entry-content a:hover { color: var(--brand); }
.cl-art .entry-content blockquote { margin: 1.7em 0; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); box-shadow: inset 4px 0 0 var(--brand); }
.cl-art .entry-content blockquote p:last-child { margin-bottom: 0; }
.cl-art .entry-content table { font-size: .96rem; font-variant-numeric: tabular-nums; }
.cl-art .entry-content th { background: var(--surface-2); color: var(--ink); font: 800 .8rem/1.3 var(--font-text); }
.cl-art .entry-content img, .cl-art .entry-content figure img { border-radius: 12px; }
.cl-art .entry-content code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); font-family: var(--font-mono, ui-monospace, monospace); font-size: .88em; }
.cl-art .entry-content pre { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); overflow-x: auto; font-family: var(--font-mono, ui-monospace, monospace); }
.cl-art .entry-content pre code { padding: 0; background: none; }
.cl-art .pdt-comments { margin-top: 34px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cl-art .pdt-comments h2, .cl-art .pdt-comments .comment-reply-title { margin: 0 0 10px; font: 900 1.3rem/1.25 var(--font-display); }
.cl-hop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.cl-hop a { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cl-hop a:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.cl-hop a.nx { grid-column: 2; text-align: right; }
.cl-hop small { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cl-reads { margin-top: 36px; }
.cl-reads h2 { margin: 0 0 10px; font: 900 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--font-display); letter-spacing: -.02em; }

/* ---------- the site's sidebar ---------- */
.pdt-side.jr-side .widget { padding: 6px 16px 10px; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pdt-side.jr-side .widget-title { margin: 10px 0 6px; padding: 0; background: none; color: var(--ink); font: 900 .84rem/1.3 var(--font-text); letter-spacing: .06em; text-transform: uppercase; }
.pdt-side.jr-side .widget-title::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }
.pdt-side.jr-side .pdt-latest-list li { padding: 9px 0; border-bottom-color: var(--line); }
.pdt-side.jr-side .pdt-latest-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.pdt-side.jr-side .pdt-latest-list a:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.pdt-side.jr-side .pdt-latest-list img { grid-row: span 2; width: 64px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; border-radius: 8px; }
.pdt-side.jr-side .pdt-latest-t { font-weight: 800; font-size: .94rem; line-height: 1.25; color: var(--ink); }
.pdt-side.jr-side .pdt-latest-d { font-size: .78rem; color: var(--muted); }
.pdt-side.jr-side .ym-latest-posts-widget { --ym-latest-accent: var(--brand); }
.pdt-side.jr-side .ym-sidebar-latest-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; min-block-size: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pdt-side.jr-side .ym-sidebar-latest-card:last-child { border-bottom: 0; }
.pdt-side.jr-side .ym-sidebar-latest-media { aspect-ratio: 16 / 9; border-radius: 8px; }
.pdt-side.jr-side .ym-sidebar-latest-rank { background: var(--brand); color: var(--brand-ink); box-shadow: none; border-radius: 8px; }
.pdt-side.jr-side .ym-sidebar-latest-title { font-weight: 800; font-size: .94rem; color: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 1080px) {
  .cl-list .cl-wrapbody, .cl-art .cl-wrapbody { grid-template-columns: minmax(0, 1fr); }
  .cl .cl-wrapbody > .pdt-side { max-width: 640px; }
}
@media (max-width: 820px) {
  .cl-lead { grid-template-columns: minmax(0, 1fr); }
  .cl-lead-body { border-left: 0; border-top: 5px solid var(--ln, var(--brand)); padding: 18px 18px 20px; }
  .cl-e > a { grid-template-columns: 22px minmax(0, 1fr) 96px; grid-template-areas: 'node when pic' 'node body pic'; gap: 4px 12px; padding: 12px 8px 12px 0; }
  .cl-when { justify-items: start; grid-auto-flow: column; justify-content: start; gap: 8px; text-align: left; }
  .cl-node::before { top: -12px; bottom: -12px; }
  .cl-e:first-child .cl-node::before { top: 12px; }
}
@media (max-width: 560px) {
  .cl-mast { padding: 20px 18px 18px; }
  .cl-lines { flex-wrap: nowrap; overflow-x: auto; margin: 2px -18px 0; padding: 0 18px 2px; scrollbar-width: none; }
  .cl-lines button { flex: none; }
  .cl-e > a { grid-template-columns: 18px minmax(0, 1fr) 76px; gap: 4px 10px; }
  .cl-hl { font-size: 1rem; }
  .cl-home { padding: 16px 14px 6px; }
  .cl-art .cl-head { padding: 18px 18px 18px 16px; }
  .cl-art .entry-content { font-size: 1.04rem; }
  .cl-hop { grid-template-columns: minmax(0, 1fr); }
  .cl-hop a.nx { grid-column: 1; }
}
