/* Mobile Creator Pulse. Mobile first, no build step. Contrast checked against WCAG AA. */
:root {
  --bg: #faf9f7; --card: #ffffff; --line: #e4e2dd; --text: #16171a; --muted: #5b5e66;
  --signal: #d4361a; --mark: #ffe08a; --mark-text: #16171a; --grey: #8b8e96;
  --phones: #1f5da3; --video: #7d3fae; --audio: #a24a12; --gear: #2c6e36;
  --apps: #0b6b67; --reviews: #a1263d; --mojo: #7a5e00;
  --head: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --r: 12px; --gap: 16px; --max: 46rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012; --card: #17191d; --line: #2a2d33; --text: #eeeff1; --muted: #a3a7b0;
    --signal: #ff6b4a; --mark: #6b4f00; --mark-text: #fff6d6; --grey: #6c707a;
    --phones: #8dbcf2; --video: #cfa5ef; --audio: #f2a46f; --gear: #92d39c;
    --apps: #72cfc8; --reviews: #f59cae; --mojo: #e2c15a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1012; --card: #17191d; --line: #2a2d33; --text: #eeeff1; --muted: #a3a7b0;
  --signal: #ff6b4a; --mark: #6b4f00; --mark-text: #fff6d6; --grey: #6c707a;
  --phones: #8dbcf2; --video: #cfa5ef; --audio: #f2a46f; --gear: #92d39c;
  --apps: #72cfc8; --reviews: #f59cae; --mojo: #e2c15a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.5 var(--body); overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: .15em; }
a:hover { color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: -.02em; }
time, .n, .num, .ver { font-variant-numeric: tabular-nums; }
mark { background: var(--mark); color: var(--mark-text); border-radius: 2px; padding: 0 .1em; }
code { font-size: .92em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--bg); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- top bar */
.top { background: var(--bg); border-bottom: 1px solid var(--line); padding: .6rem var(--gap) 0; }
.top__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .75rem; max-width: var(--max); margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font: 700 1.05rem/1 var(--head); letter-spacing: -.03em; min-height: 44px; }
.logo b { font-weight: 900; color: var(--signal); }
.logo__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--text); position: relative; flex: none; }
.logo__mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--signal); }
.pulse { margin: 0; display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); text-align: right; }
.pulse__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); flex: none; position: relative; }
.pulse__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--signal); animation: ping 2s ease-out infinite; }
.pulse__live { font-weight: 800; color: var(--signal); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.pulse--stale .pulse__dot, .pulse--stale .pulse__dot::after { background: var(--grey); animation: none; }
.pulse--stale .pulse__text { color: var(--text); font-weight: 600; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse__dot::after { animation: none; } }
.fresh-new { display: block; }

.search { display: flex; gap: .5rem; order: 3; flex-basis: 100%; margin: .35rem 0 0; }
.search input {
  flex: 1; min-width: 0; min-height: 44px; padding: .55rem .8rem; font: inherit; font-size: 1rem;
  color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.search input:focus-visible { outline-offset: 0; border-color: var(--signal); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.1rem;
  font: 700 .95rem/1 var(--body); color: var(--bg); background: var(--text); border: 0; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { color: var(--bg); background: var(--signal); }

.chips { max-width: var(--max); margin: 0 auto; }
.chips ul {
  display: flex; gap: .4rem; list-style: none; margin: 0 calc(-1 * var(--gap)); padding: .6rem var(--gap) .7rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips ul::-webkit-scrollbar { display: none; }
.chips li { --c: var(--text); }
.chips a {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: .3rem .85rem; white-space: nowrap;
  border-radius: 999px; text-decoration: none; font-weight: 650; font-size: .92rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}
.chips a[aria-current="page"] { background: var(--c); color: var(--bg); border-color: var(--c); }
.chips--inline ul { margin: 0 0 1rem; padding: 0 0 .3rem; flex-wrap: wrap; }


/* ---------- stream */
.main { max-width: var(--max); margin: 0 auto; padding: .25rem var(--gap) 2rem; }
.day {
  font: 800 .75rem/1 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  margin: 1.4rem 0 .5rem; display: flex; align-items: center; gap: .75rem;
}
.day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stream > .day:first-child { margin-top: .9rem; }

.card { position: relative; display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.card__body { flex: 1; min-width: 0; }
.card__title { margin: 0; font-size: 1.12rem; font-weight: 800; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }   /* whole card is the link */
.card:hover .card__title a { color: var(--signal); }
.card:focus-within { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
.card__title a:focus-visible { outline: none; }
.card__meta { margin: .3rem 0 0; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .1rem .35rem; align-items: baseline; }
.card__src { font-weight: 700; color: var(--text); }
.kind { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--signal); }
.card__excerpt {
  margin: .3rem 0 0; color: var(--muted); font-size: .94rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__cats, .month__cats { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: .45rem 0 0; padding: 0; }
.tag {
  --c: var(--muted); position: relative; z-index: 1; display: inline-block; padding: .12rem .5rem; border-radius: 6px;
  font-size: .74rem; font-weight: 700; text-decoration: none; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--card));
}
.card__media { margin: 0; flex: none; width: 96px; position: relative; }
.card__media img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--line); }
.card__media figcaption { font-size: .62rem; color: var(--muted); margin-top: .2rem; line-height: 1.2; }

.card--lead { flex-direction: column-reverse; gap: .6rem; padding: 1rem 0 1.1rem; }
.card--lead .card__title { font-size: 1.5rem; font-weight: 900; letter-spacing: -.03em; }
.card--lead .card__excerpt { -webkit-line-clamp: 3; line-clamp: 3; font-size: 1rem; }
.card--lead .card__media { width: 100%; }
.card--lead .card__media img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--r); }

.notice { margin: 1rem 0 0; padding: .7rem .9rem; border-left: 4px solid var(--grey); background: var(--card); font-size: .92rem; }
.more, .pager { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; align-items: center; margin: 1.5rem 0 .5rem; }
.pager a:not(.button) { min-height: 44px; display: inline-flex; align-items: center; }
.empty { padding: 2.5rem 0; text-align: center; color: var(--muted); }
.empty strong { color: var(--text); }
.newer { position: sticky; top: .5rem; z-index: 5; display: flex; justify-content: center; margin: .5rem 0 0; }

/* ---------- inner pages */
.page h1 { font-size: 1.8rem; font-weight: 900; margin: 1.2rem 0 .6rem; }
.page h1 .q { color: var(--signal); }
.lede, .hint, .count, .crumb { color: var(--muted); }
.crumb { margin: 1rem 0 -.6rem; font-size: .9rem; }
.filters-wrap summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: 0 0 1rem; font-size: .85rem; color: var(--muted); }
.filters label { display: flex; flex-direction: column; gap: .2rem; }
.filters select, .filters input {
  min-height: 40px; font: inherit; font-size: .95rem; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: .3rem .5rem;
}
.year h2 { font-size: 1.3rem; margin: 1.6rem 0 .4rem; }
.months { list-style: none; padding: 0; margin: 0; }
.month { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.month__name { font: 800 1.1rem/1.3 var(--head); text-decoration: none; display: inline-flex; gap: .5rem; align-items: baseline; min-height: 32px; }
.n { font-weight: 600; color: var(--muted); font-size: .85em; }
.tag .n, .chips .n { color: inherit; opacity: .8; }
.apps { list-style: none; padding: 0; margin: 0; }
.app { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.app__name { margin: 0; font-size: 1.1rem; }
.app__name a { text-decoration: none; }
.app__notes { margin: .3rem 0 0; color: var(--muted); font-size: .92rem; white-space: pre-line; }
.ver { font-weight: 700; color: var(--text); }
.table-wrap { overflow-x: auto; }
.sources { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sources th, .sources td { text-align: left; padding: .6rem .5rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sources thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sources .num { text-align: right; }
.bad { display: block; color: var(--reviews); font-weight: 700; font-size: .8rem; }
.prose { max-width: 38rem; }
.prose h2 { font-size: 1.2rem; margin: 1.6rem 0 .4rem; }
.ua { display: inline-block; padding: .3rem .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }

/* ---------- footer */
.foot { border-top: 1px solid var(--line); padding: 1.2rem var(--gap) 2rem; color: var(--muted); font-size: .85rem; }
.foot > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; font-weight: 650; color: var(--text); }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.foot .theme { margin-top: .4rem; background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }

/* ---------- wider screens */
@media (min-width: 40rem) {
  :root { --gap: 24px; }
  .top { position: sticky; top: 0; z-index: 4; }
  .top__row { flex-wrap: nowrap; gap: 1rem; }
  .search { order: 2; flex: 1; margin: 0; }
  .pulse { order: 3; }
  .card__title { font-size: 1.2rem; }
  .card__media, .card__media img { width: 132px; }
  .card__media img { height: 88px; }
  .card--lead .card__title { font-size: 1.85rem; }
  .card--lead { flex-direction: row-reverse; align-items: flex-start; }
  .card--lead .card__media { width: 44%; }
}
/* category colours last, so they win over the --c defaults above */
.cat-phones { --c: var(--phones); } .cat-video { --c: var(--video); } .cat-audio { --c: var(--audio); }
.cat-gear { --c: var(--gear); } .cat-apps { --c: var(--apps); } .cat-reviews { --c: var(--reviews); }
.cat-mojo { --c: var(--mojo); }

@media print { .top, .foot, .more, .pager { display: none; } }
