/* =====================================================================
   AWWRT list row — ONE component for every list of guides/posts:
   Help & Support (each topic), /blogs Recent Posts, category pages,
   related guides under an article.

   Moved out of help.css (approved Help design v1, section 8 + the row
   parts of 10/11) so Help and Blogs share one source: change a row here
   and every list follows. Values are unchanged; only the selectors no
   longer depend on the Help page wrapper.

   Markup (see pages/help-support.php, template-parts/list-row.php):
     <ul class="awwrt-help-list">
       <li class="is-first|is-last"><a class="awwrt-help-row" href>
         <span class="awwrt-help-cover"><img></span>
         <span class="awwrt-help-text">
           <span class="awwrt-help-title">…</span>
           <span class="awwrt-help-excerpt">…</span>
           <span class="awwrt-help-meta">…</span>
         </span></a></li>
     </ul>
   Hover (mouse only): glass card + pointer spotlight (assets/js/list-row.js;
   on the Help page its own script does the same) + white title.
   ===================================================================== */

/* ---------- Tokens + base (were inherited from .awwrt-help) ---------- */
.awwrt-help-list {
  --ah-text-hi: #fff;
  --ah-text-strong: #E2E5EC;
  --ah-text-muted: #AAB4C6;
  --ah-text-dim: #8b94a7;
  --ah-accent: #75B8FF;
  --ah-surface-2: #20232b;
  --ah-line: #353a45;
  --ah-r-cover: 4px;
  --ah-base: .2s;
  font-family: Roboto, system-ui, sans-serif;
  color: #CFD4DD;   /* = Help's --ah-text, so anything without its own colour matches */
  list-style: none; margin: 0; padding: 0;
}
.awwrt-help-list > li { margin: 0; padding: 0 }
.awwrt-help-list > li::before, .awwrt-help-list > li::marker { content: none }
.awwrt-help-list a.awwrt-help-row, .awwrt-help-list a.awwrt-help-row:hover { text-decoration: none }

/* ---------- Row ---------- */
/* Rows are separated by hairlines. --pt/--pb = the row's top/bottom padding; --c = how far the hover
   card reaches past the content on every side. Card and spotlight share one inset, so they always match. */
.awwrt-help-list { position: relative; z-index: 0; display: flex; flex-direction: column }
.awwrt-help-list > li { position: relative; transition: border-color var(--ah-base) ease }
.awwrt-help-list > li:not(.is-first) { border-top: 1px solid var(--ah-line) }
.awwrt-help-list .awwrt-help-row {
  --pt: 24px; --pb: 24px; --c: 16px;
  display: flex; gap: 32px; align-items: flex-start; padding: var(--pt) 0 var(--pb); color: inherit;
}
.awwrt-help-list > li.is-first .awwrt-help-row { --pt: 16px }
.awwrt-help-list > li.is-last .awwrt-help-row { --pb: 0px }
/* ---------- Hover surface: shared by list rows and cards ----------
   Rows (.awwrt-help-list .awwrt-help-row) and cards (.awwrt-hover-card, e.g. the
   featured posts on /blogs and the top cards on category pages) use the SAME
   glass card, spotlight, white title, focus and press — so everything matches.
   Per element: --pt/--pb = its own top/bottom padding, --c = how far the card
   reaches past the content, --r = the radius of the picture inside it. */
.awwrt-help-list .awwrt-help-row { --r: var(--ah-r-cover) }
.awwrt-hover-card {
  --pt: 0px; --pb: 0px; --c: 16px; --r: 7px;
  --ah-text-hi: #fff; --ah-accent: #75B8FF;
  position: relative; z-index: 0;   /* own layer, so the card sits behind its content */
}
.awwrt-help-list .awwrt-help-row::before,
.awwrt-help-list .awwrt-help-row::after,
.awwrt-hover-card::before,
.awwrt-hover-card::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; opacity: 0;
  /* nested corners: card radius = picture radius + the gap around it, so both curves share one centre
     (rows 4+16 = 20px, cards 7+16 = 23px; narrow screens 12px gap) */
  border-radius: calc(var(--r) + var(--c));
  inset: calc(var(--pt) - var(--c)) calc(var(--c) * -1) calc(var(--pb) - var(--c));
  transition: opacity .22s ease;
}
/* hover card: glass. Very fine grain (hover-grain.png, 26 Nov 2026) on the card and the light breaks up
   the rings a soft light makes on a dark screen; the light's size and fade are unchanged. */
.awwrt-help-list .awwrt-help-row::before,
.awwrt-hover-card::before {
  background: url(../images/hover-grain.png) 0 0 / 128px 128px, linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px -24px rgba(0,0,0,.9);
}
/* spotlight: follows the pointer (--mx/--my set by the script) */
.awwrt-help-list .awwrt-help-row::after,
.awwrt-hover-card::after {
  background: url(../images/hover-grain.png) 37px 61px / 128px 128px, radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.09), rgba(255,255,255,0) 70%);
}
@media (hover: hover) {
  .awwrt-help-list a.awwrt-help-row:hover::before,
  .awwrt-help-list a.awwrt-help-row:hover::after,
  a.awwrt-hover-card:hover::before,
  a.awwrt-hover-card:hover::after { opacity: 1 }
  .awwrt-help-list a.awwrt-help-row:hover .awwrt-help-title,
  a.awwrt-hover-card.awwrt-hover-card:hover .awwrt-hover-title { color: var(--ah-text-hi) }
  .awwrt-help-list > li:has(> a.awwrt-help-row:hover),
  .awwrt-help-list > li:has(> a.awwrt-help-row:hover) + li { border-top-color: transparent }
}
.awwrt-help-list a.awwrt-help-row:focus-visible::before,
a.awwrt-hover-card:focus-visible::before { opacity: 1 }
.awwrt-help-list a.awwrt-help-row:focus-visible,
a.awwrt-hover-card.awwrt-hover-card:focus-visible { outline: 2px solid var(--ah-accent); outline-offset: 4px; border-radius: 8px }
/* press (finger, mouse or pen held down): the glass card shows at once, a little darker and flat,
   no spotlight; on phones this is the feedback before the next page opens */
.awwrt-help-list a.awwrt-help-row:active::before,
a.awwrt-hover-card:active::before {
  opacity: 1; transition-duration: .05s;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
}
.awwrt-help-list a.awwrt-help-row:active::after,
a.awwrt-hover-card:active::after { opacity: 0 }
.awwrt-help-list a.awwrt-help-row:active .awwrt-help-title,
a.awwrt-hover-card.awwrt-hover-card:active .awwrt-hover-title { color: var(--ah-text-hi) }
.awwrt-help-list > li:has(> a.awwrt-help-row:active),
.awwrt-help-list > li:has(> a.awwrt-help-row:active) + li { border-top-color: transparent }
/* row parts */
.awwrt-help-list .awwrt-help-cover {
  flex: none; display: block; width: 160px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--ah-r-cover);
  background: var(--awwrt-placeholder, #292d36); box-shadow: 0 0 0 1px rgba(255,255,255,.07);   /* grey fill when there is no picture */
}
.awwrt-help-list .awwrt-help-cover img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; object-position: right center;
  border-radius: inherit }   /* the theme rounds every page image to 8px (.page-prose img); the cover's own 4px corner must win */
.awwrt-help-list .awwrt-help-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-top: -4px }
.awwrt-help-list .awwrt-help-title {
  color: var(--ah-text-strong); font-size: 22px; line-height: 1.27; font-weight: 700; letter-spacing: -.016em;
  overflow-wrap: anywhere;
}
.awwrt-help-list .awwrt-help-excerpt {
  color: var(--ah-text-muted); font-size: 16px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.awwrt-help-list .awwrt-help-excerpt:empty { display: none }   /* no description: no empty line */
.awwrt-help-list .awwrt-help-cover img.is-broken { visibility: hidden }   /* missing image: keep the dark placeholder, hide the browser's broken icon */
/* category in the meta line of Blogs cards and rows: hidden, still in the page (25 Nov 2026). Delete this rule to show it again */
.awwrt-meta-cat { display: none }
.awwrt-help-list .awwrt-help-meta { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ah-text-dim); font-variant-numeric: tabular-nums }

/* Variant: a list that continues under cards (category pages): it starts under a
   hairline, like the rows between it, as the old category list did. */
.awwrt-help-list.has-cards-above > li.is-first { border-top: 1px solid var(--ah-line) }
.awwrt-help-list.has-cards-above > li.is-first .awwrt-help-row { --pt: 24px }
@media (max-width: 767px) {
  .awwrt-help-list.has-cards-above > li.is-first .awwrt-help-row { --pt: 20px }
}
@media (hover: hover) {
  .awwrt-help-list.has-cards-above > li.is-first:has(> a.awwrt-help-row:hover) { border-top-color: transparent }
}

/* ---------- Responsive ---------- */
/* narrow screens (below 840px): the column runs nearly edge to edge */
@media (max-width: 839px) {
  .awwrt-help-list .awwrt-help-row,
  .awwrt-hover-card { --c: 12px }                 /* hover card stays 8px clear of the screen */
}
@media (max-width: 767px) {
  .awwrt-help-list .awwrt-help-row { --pt: 20px; --pb: 20px; gap: 16px }
  .awwrt-help-list > li.is-first .awwrt-help-row { --pt: 16px }
  .awwrt-help-list > li.is-last .awwrt-help-row { --pb: 0px }
  .awwrt-help-list .awwrt-help-cover { width: 112px }
  .awwrt-help-list .awwrt-help-title { font-size: 18px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden }   /* same 4-line limit as the blog list */
  .awwrt-help-list .awwrt-help-excerpt { font-size: 15px }
}
/* large phones / small tablets: bigger covers beside the wider text */
@media (min-width: 480px) and (max-width: 767px) {
  .awwrt-help-list .awwrt-help-cover { width: 144px }
  .awwrt-help-list .awwrt-help-row { gap: 24px }
  .awwrt-help-list .awwrt-help-title { font-size: 20px }
}
@media (max-width: 359px) {
  .awwrt-help-list .awwrt-help-cover { width: 88px }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .awwrt-help-list *, .awwrt-help-list *::before, .awwrt-help-list *::after,
  .awwrt-help-list > li,
  .awwrt-hover-card::before, .awwrt-hover-card::after { transition: none !important }
}
