/* ============================================================
   Purple Wallet — content pages (TZ-04): blog + financial literacy.
   Universal article list (covers / bare) and the article page
   (hero / bare). Ported from the Claude Design concept
   (test_designs/1/content.css); FAQ sections live in a separate TZ.
   Loaded after tokens.css + site.css via @push('head').
   ============================================================ */

/* ── Reveal-on-scroll (self-contained; site.js toggles .in) ──── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Breadcrumbs ───────────────────────────────────────────── */
.crumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-muted); margin: 28px 0 24px;
}
.crumbs a { color: var(--text-secondary); transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs .material-icons { font-size: 16px; opacity: .6; }
.crumbs__cur { color: var(--text-primary); font-weight: 500; }

/* ── Tag chips ─────────────────────────────────────────────── */
.tagrow { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; font-size: .78rem; font-weight: 600;
  color: var(--accent); background: var(--accent-light);
  padding: 4px 12px; border-radius: var(--radius-pill);
  transition: background .2s var(--ease-out-expo), transform .2s var(--ease-out-expo);
}
.tag:hover { transform: translateY(-1px); }

/* ── Article ───────────────────────────────────────────────── */
.article { padding: 8px 0 80px; }
.article-col { max-width: 720px; margin: 0 auto; }
.article-col--wide { max-width: 1000px; }
.article-cover {
  position: relative; aspect-ratio: 16 / 8; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent-light), var(--bg-tertiary));
  border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.article-cover .material-icons { font-size: 56px; color: var(--text-muted); opacity: .5; }
.article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-title {
  font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; line-height: 1.12;
  letter-spacing: var(--tracking-display); margin: 26px 0 0; text-wrap: balance;
}
.article-title--bare { margin-top: 8px; }
.article-intro {
  font-size: 1.22rem; color: var(--text-secondary); line-height: 1.5; margin: 18px 0 0;
  font-weight: 400; text-wrap: pretty;
}
/* excerpt is now rich (HTML) — keep nested paragraphs flush. */
.article-intro p { margin: 0 0 .6em; }
.article-intro > :first-child { margin-top: 0; }
.article-intro > :last-child { margin-bottom: 0; }
.article-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 22px 0 0; padding-bottom: 26px; border-bottom: 1px solid var(--border-color);
  font-size: .9rem; color: var(--text-muted);
}
.article-meta__date { display: inline-flex; align-items: center; gap: 6px; }
.article-meta__date .material-icons { font-size: 17px; }
.article-meta__author { display: inline-flex; align-items: center; gap: 6px; }
.article-meta__author .material-icons { font-size: 17px; }
.article-meta__sep { opacity: .5; }
.article-meta__tags { margin-left: 4px; }

/* article body — comfortable longread typography. The body is admin-authored
   HTML (Jodit + image pipeline); these rules style the common elements. */
.article-body { margin-top: 30px; }
.article-body > * { margin: 0; }
.article-body > * + * { margin-top: 22px; }
.article-body h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; margin-top: 40px; line-height: 1.25; }
.article-body h3 { font-size: 1.25rem; font-weight: 600; margin-top: 32px; line-height: 1.3; }
.article-body p { font-size: 1.08rem; line-height: 1.72; color: var(--text-secondary); text-wrap: pretty; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.article-body li {
  position: relative; padding-left: 30px; font-size: 1.08rem; line-height: 1.6; color: var(--text-secondary);
}
.article-body ul li::before {
  content: "check"; font-family: 'Material Icons'; font-size: 19px; color: var(--accent);
  position: absolute; left: 0; top: 1px;
}
.article-body ol { counter-reset: a-ol; }
.article-body ol li { counter-increment: a-ol; }
.article-body ol li::before {
  content: counter(a-ol); font-size: .85rem; font-weight: 700; color: var(--accent);
  position: absolute; left: 0; top: 2px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin: 32px 0;
  font-size: 1.3rem; font-weight: 500; line-height: 1.45; color: var(--text-primary); font-style: normal;
}
.article-body img {
  max-width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); margin: 32px 0; display: block;
}
.article-body figure { margin: 32px 0; }
.article-body figcaption { margin-top: 10px; font-size: .85rem; color: var(--text-muted); text-align: center; }

.article-tagsfoot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--border-color);
}
.article-tagsfoot__label { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: var(--tracking-caption); font-weight: 600; color: var(--text-muted); }

/* ── Read also ─────────────────────────────────────────────── */
.readalso { max-width: 1000px; margin: 64px auto 0; }
.readalso__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 24px; }
.readalso__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ── Article cards (shared by read-also + list) ────────────── */
.acard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--gradient-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease-out-expo), transform .3s var(--ease-out-expo);
}
.acard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.acard__cover {
  position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-light), var(--bg-tertiary));
  display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}
.acard__cover .material-icons { font-size: 40px; color: var(--text-muted); opacity: .5; }
.acard__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acard__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.acard__title { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.3; }
.acard__intro { font-size: .92rem; color: var(--text-secondary); line-height: 1.5; margin: 8px 0 0; flex: 1; text-wrap: pretty; }
.acard__meta { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: .82rem; color: var(--text-muted); }
.acard__dot { opacity: .6; }
/* Stretched-link pattern: the whole card links to the article, while tag chips
   stay independent links above it (clickable tag perelinkovka, no nested <a>). */
.acard { position: relative; }
.acard__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.acard__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acard__tags { position: relative; z-index: 2; margin-top: 12px; }

/* ── List page ─────────────────────────────────────────────── */
.listpage__head { max-width: 680px; margin-bottom: 32px; }
.listpage__title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: var(--tracking-display); margin: 0; }
.listpage__sub { font-size: 1.08rem; color: var(--text-secondary); line-height: 1.5; margin: 12px 0 0; text-wrap: pretty; }

.filters {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.filters__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  cursor: pointer; border: 1px solid var(--border-color); background: var(--bg-card);
  font-family: var(--font-sans); font-size: .85rem; font-weight: 500; color: var(--text-secondary);
  padding: 7px 15px; border-radius: var(--radius-pill);
  transition: color .2s var(--ease-out-expo), background .2s, border-color .2s;
}
.chip:hover { color: var(--text-primary); border-color: var(--border-light); }
.chip.active { color: #fff; background: var(--gradient-primary); border-color: transparent; box-shadow: var(--shadow-accent); }
.filters__search {
  display: inline-flex; align-items: center; gap: 8px; min-width: 240px;
  background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-pill);
  padding: 9px 16px; transition: border-color .2s var(--ease-out-expo), box-shadow .2s;
}
.filters__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.filters__search .material-icons { font-size: 19px; color: var(--text-muted); }
.filters__search input { border: 0; background: transparent; outline: none; font-family: var(--font-sans); font-size: .92rem; color: var(--text-primary); width: 100%; }
.filters__search button {
  border: 0; background: transparent; cursor: pointer; color: var(--text-muted);
  display: inline-flex; align-items: center; padding: 0;
}
.filters__search button:hover { color: var(--accent); }

.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.list-grid--bare { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acard--bare { background: var(--gradient-card); }

/* ── Empty state ───────────────────────────────────────────── */
.list-empty {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  border: 1px dashed var(--border-color); border-radius: var(--radius-lg);
}
.list-empty .material-icons { font-size: 44px; opacity: .5; }
.list-empty p { margin: 12px 0 0; font-size: 1.02rem; }

/* ── Pagination ────────────────────────────────────────────── */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 48px; }
.pager__btn {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary);
  font-family: var(--font-sans); font-size: .88rem; font-weight: 600; padding: 9px 14px; border-radius: var(--radius-md);
  transition: color .2s, border-color .2s, background .2s;
}
.pager__btn:hover { color: var(--accent); border-color: var(--accent); }
.pager__btn--disabled { opacity: .4; pointer-events: none; }
.pager__btn .material-icons { font-size: 18px; }
.pager__nums { display: flex; gap: 6px; }
.pager__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; cursor: pointer; border-radius: var(--radius-md);
  border: 1px solid transparent; background: transparent; color: var(--text-secondary);
  font-family: var(--font-sans); font-size: .9rem; font-weight: 600; font-feature-settings: 'tnum' 1;
  transition: color .2s, background .2s;
}
.pager__num:hover { background: var(--bg-hover); color: var(--text-primary); }
.pager__num.active { color: #fff; background: var(--gradient-primary); box-shadow: var(--shadow-accent); pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
  .list-grid { grid-template-columns: repeat(2, 1fr); }
  .readalso__grid { grid-template-columns: repeat(2, 1fr); }
  /* .faqhub__grid lives in the FAQ section below; its responsive rules sit at the
     end of the file (after its base definition) so source order lets them win. */
}
@media (max-width: 768px) {
  .filters { flex-direction: column; align-items: stretch; }
  .filters__search { width: 100%; }
}
@media (max-width: 600px) {
  .list-grid, .list-grid--bare, .readalso__grid { grid-template-columns: 1fr; }
  .article-intro { font-size: 1.1rem; }
  .article-body blockquote { font-size: 1.15rem; }
  .pager { gap: 8px; }
  .pager__btn span:not(.material-icons) { display: none; }
}

/* ── Support: FAQ hub (hero + category cards) ──────────────── */
.faqhero { position: relative; overflow: hidden; padding: 56px 0 36px; }
.faqhero__inner { max-width: 640px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.faqhero__title { font-size: clamp(2rem, 3.8vw, 2.9rem); font-weight: 700; letter-spacing: var(--tracking-display); margin: 0; }
.faqhero__sub { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.5; margin: 14px 0 0; text-wrap: pretty; }
.faqsearch {
  display: flex; align-items: center; gap: 12px; margin: 28px auto 0; max-width: 560px;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-pill);
  padding: 15px 22px; box-shadow: var(--shadow-md);
  transition: border-color .2s var(--ease-out-expo), box-shadow .2s;
}
.faqsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-md); }
.faqsearch .material-icons { font-size: 24px; color: var(--accent); }
.faqsearch input { flex: 1; border: 0; background: transparent; outline: none; font-family: var(--font-sans); font-size: 1.05rem; color: var(--text-primary); }

.faqhub { padding-top: 16px; }
.faqhub__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.faqcat {
  display: flex; flex-direction: column; padding: 26px; text-decoration: none; color: inherit;
  background: var(--gradient-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease-out-expo), transform .3s var(--ease-out-expo);
}
.faqcat:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.faqcat__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent);
}
.faqcat__icon .material-icons { font-size: 25px; }
.faqcat__icon img { width: 26px; height: 26px; object-fit: contain; }
.faqcat__title { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 14px; }
.faqcat__list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.faqcat__list a {
  display: flex; align-items: center; gap: 6px; padding: 7px 0; font-size: .92rem; color: var(--text-secondary);
  text-decoration: none; transition: color .18s var(--ease-out-expo);
}
.faqcat__list a:hover { color: var(--accent); }
.faqcat__list .material-icons { font-size: 17px; color: var(--text-muted); flex: none; }
.faqcat__list a:hover .material-icons { color: var(--accent); }
.faqcat__more {
  display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--accent);
  text-decoration: none; padding-top: 14px; border-top: 1px solid var(--border-color);
}
.faqcat__more .material-icons { font-size: 18px; transition: transform .25s var(--ease-out-expo); }
.faqcat:hover .faqcat__more .material-icons { transform: translateX(4px); }

/* ── Support: other-sections transition cards (security / troubleshooting) ──
   Ported from the design concept (test_designs/1 → faqsections): a divider title
   + a 2-col grid of horizontal cards (icon | title+desc | arrow). Collapses to 1
   column on phones (responsive block at the end of the file). */
.faqsections { margin-top: 48px; }
.faqsections__title {
  font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin: 0 0 18px;
  padding-top: 28px; border-top: 1px solid var(--border-color);
}
.faqsections__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faqsection {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit;
  background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease-out-expo), transform .3s var(--ease-out-expo), border-color .3s;
}
.faqsection:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }
.faqsection__icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent);
}
.faqsection__icon .material-icons { font-size: 23px; }
.faqsection__body { flex: 1; min-width: 0; }
.faqsection__title { font-size: 1.05rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.faqsection__desc { font-size: .9rem; color: var(--text-secondary); margin: 3px 0 0; line-height: 1.4; }
.faqsection__arrow { color: var(--text-muted); font-size: 22px !important; flex: none; transition: transform .25s var(--ease-out-expo), color .25s; }
.faqsection:hover .faqsection__arrow { color: var(--accent); transform: translateX(4px); }

/* ── Support: FAQ category page (icon head + question list) ─── */
.faqcatpage__head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.faqcatpage__icon {
  width: 56px; height: 56px; flex: none; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent);
}
.faqcatpage__icon .material-icons { font-size: 28px; }
.faqcatpage__icon img { width: 30px; height: 30px; object-fit: contain; }
.faqcatpage__title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.faqcatpage__desc { font-size: 1.02rem; color: var(--text-secondary); margin: 6px 0 0; }
.qlist { display: flex; flex-direction: column; gap: 10px; }
.qlist__item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; text-decoration: none; background: var(--gradient-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); font-size: 1.02rem; font-weight: 500; color: var(--text-primary);
  transition: box-shadow .3s var(--ease-out-expo), transform .3s var(--ease-out-expo), border-color .3s;
}
.qlist__item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }
.qlist__item .material-icons { font-size: 20px; color: var(--text-muted); flex: none; transition: transform .25s var(--ease-out-expo), color .25s; }
.qlist__item:hover .material-icons { color: var(--accent); transform: translateX(4px); }

/* FAQ hub client-side search: hide non-matching cards/questions. */
.faqcat[hidden], .faqcat__list li[hidden] { display: none; }
.faqhub__empty { text-align: center; color: var(--text-secondary); padding: 28px 0; }

/* Support flat list: single readable column of bare cards. */
.support-list { grid-template-columns: 1fr; gap: 12px; }
.support-list .acard--bare { flex-direction: row; }

/* ── Paired screenshot switcher ([shot:…] shortcode) ───────── */
.shotpair { margin: 28px 0; }
.shotpair__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-pill);
}
.shotpair__tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border: 0; cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  font: inherit; font-size: .9rem; font-weight: 500;
  border-radius: var(--radius-pill);
  transition: background .2s, color .2s;
}
.shotpair__tab .material-icons { font-size: 17px; }
.shotpair__tab:hover { color: var(--text-primary); }
.shotpair__tab.active { background: var(--bg-card); color: var(--accent); box-shadow: var(--shadow-sm); }
.shotpair__pane { display: none; }
.shotpair__pane.active { display: block; }
.shotpair__frame {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
}
.shotpair__frame img { display: block; width: 100%; height: auto; }
.shotpair__frame--phone {
  max-width: 340px;
  border-radius: 28px;
  background: #000;
}
.shotpair__bar {
  display: flex; gap: 7px; align-items: center;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}
.shotpair__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); }
/* Single-platform caption (no tab row): a small label naming the lone platform. */
.shotpair__caption {
  margin-top: 8px;
  font-size: .82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Theme-aware swap scoped to .shotpair (content.css is what support pages load;
   the .fshot/.slider swap lives in pages.css). Light default, flip in dark. */
.shotpair img.ts-dark { display: none; }
html:not([data-theme='light']) .shotpair img.ts-light { display: none; }
html:not([data-theme='light']) .shotpair img.ts-dark { display: block; }

/* Light-only shots (no dark variant yet) keep the frame/chrome on the light
   palette in BOTH themes, so a light screenshot never sits inside dark chrome.
   Redeclaring the tokens (mirror of tokens.css [data-theme='light']) cascades to
   the frame's children (.shotpair__bar / its dots). When a dark variant ships,
   the partial drops .shotpair__frame--lightonly and the frame follows the theme. */
.shotpair__frame--lightonly {
  --bg-tertiary: #e8ecf4;
  --bg-secondary: #ffffff;
  --border-light: #d0d5e2;
  --border-color: #e2e6f0;
}

/* Embed mode (TZ-support §D): no site chrome, give the content room to breathe. */
body.pw-embed main { padding: 20px 0 40px; }
body.pw-embed .pw-section { padding-top: 0; }

/* ── Support responsive (FAQ hub + category) ──────────────────────────────────
   The base .faqhub__grid / .faqcat* / .faqcatpage* rules are defined ABOVE this
   point (FAQ section was appended after the generic list media queries), so these
   overrides MUST live here — after the base definitions — to win on source order.
   Mirrors the design concept (test_designs/1/content.css): 3 → 2 → 1 columns. */
@media (max-width: 992px) {
  .faqhub__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .faqhub__grid { grid-template-columns: 1fr; }
  .faqsections__grid { grid-template-columns: 1fr; }
  .faqhero { padding: 40px 0 28px; }
  .faqsearch { padding: 13px 18px; }
  .faqcat { padding: 22px; }
  .faqcatpage__head { gap: 12px; }
  .faqcatpage__icon { width: 48px; height: 48px; }
  .qlist__item { padding: 16px 18px; }
}
