/* Apex Credit — "Fintech Clean": friendly fintech app look.
   Gradient hero band, pill cards, soft violet shadows. */
:root {
  --measure: 68ch;
  --bg: #fafaff;
  --card: #ffffff;
  --text: #1e1b2e;
  --muted: #6d6a85;
  --line: #e9e6f7;
  --accent: #7c3aed;
  --accent-deep: #6d28d9;
  --accent-soft: #f1eafe;
  --grad: linear-gradient(120deg, #7c3aed 0%, #4f46e5 60%, #2563eb 100%);
  --max: 960px;
  --radius: 20px;
  --shadow: 0 12px 32px rgba(124, 58, 237, 0.10);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-size: 1.2rem; }
.brand span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 0.4rem; flex-wrap: wrap; font-size: 0.92rem; font-weight: 600; }
.nav-links a { color: var(--muted); padding: 0.45rem 0.85rem; border-radius: 999px; }
.nav-links a:hover { color: var(--accent-deep); background: var(--accent-soft); text-decoration: none; }

.hero {
  margin: 1.5rem 0 0; padding: 2.8rem 2rem; border-radius: 28px;
  background: var(--grad); color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.12);
}
.hero::before {
  content: ""; position: absolute; right: 60px; bottom: -90px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.08);
}
.hero-badge {
  display: inline-block; background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4rem 0.9rem; border-radius: 999px; margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.hero h1 { margin: 0 0 0.6rem; font-size: clamp(2.05rem, 5.2vw, 3.05rem); letter-spacing: -0.03em; position: relative; z-index: 1; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.85); max-width: 56ch; position: relative; z-index: 1; }

.grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); padding: 1.8rem 0 3rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.55rem 1.5rem 1.3rem; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(124, 58, 237, 0.16); }
.card h2 { margin: 0 0 0.45rem; font-size: 1.12rem; letter-spacing: -0.02em; line-height: 1.4; }
.card h2 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.meta {
  display: inline-block; color: var(--accent-deep); background: var(--accent-soft);
  font-size: 0.82rem; font-weight: 600; padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.1rem;
}

article.page { padding: 2.2rem 0 3.5rem; }
article.page h1 { margin: 0 0 0.6rem; letter-spacing: -0.03em; font-size: clamp(1.7rem, 4.5vw, 2.5rem); }
article.page h2 { margin: 2rem 0 0.7rem; font-size: 1.4rem; letter-spacing: -0.02em; }
article.page h2::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--grad); margin-right: 0.5em; vertical-align: baseline; }
article.page h3 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; }
article.page p { margin: 0.9rem 0; }
article.page ul, article.page ol { margin: 1rem 0; padding-left: 1.3rem; }
article.page li { margin: 0.5rem 0; }
article.page li::marker { color: var(--accent); font-weight: 700; }
article.page blockquote { background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; border: 1px solid var(--line); margin: 1.4rem 0; padding: 1rem 1.3rem; }
article.page table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 1.2rem 0; font-size: 0.94rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
article.page th, article.page td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); }
article.page tr:last-child th, article.page tr:last-child td { border-bottom: none; }
article.page th { background: var(--accent-soft); color: var(--accent-deep); }

.ad-slot {
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #d8cdf5;
  border-radius: var(--radius, 8px);
  background: color-mix(in srgb, var(--bg2, var(--card, #fff)) 88%, transparent);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.ad-slot:empty::before { content: "Advertisement"; opacity: 0.7; }
.ad-slot iframe, .ad-slot > * { pointer-events: auto; max-width: 100%; }
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.6rem; color: var(--muted); font-size: 0.9rem; }
.site-footer .foot-links { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.site-footer .foot-links a { padding: 0.4rem 0.8rem; border-radius: 999px; }
.site-footer .foot-links a:hover { background: var(--accent-soft); }
.legal { max-width: 70ch; }

@media (max-width: 640px) {
  .hero { padding: 3.4rem 0 2.2rem; border-radius: 22px; }
}

/* ---- reader navigation (added 2026-11-03) ---- */
.crumb{font-size:.82rem;color:var(--muted);margin:0 0 1.1rem;display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.crumb .sep{opacity:.55}
.crumb .here{color:var(--text);font-weight:600}
.related{margin:2.4rem 0 1rem;border-top:1px solid var(--line);padding-top:1.3rem}
.related h2{font-size:1.15rem;margin:0 0 .8rem}
.related ul{margin:0;padding:0;list-style:none;display:grid;gap:.55rem}
.related li a{font-weight:600}
.prevnext{display:flex;gap:1rem;margin:1.6rem 0 0}
.prevnext .pn{flex:1;border:1px solid var(--line);border-radius:10px;padding:.8rem 1rem;display:block;transition:border-color .15s ease}
.prevnext .pn:hover{border-color:var(--accent);text-decoration:none}
.prevnext .pn-label{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.25rem}
.prevnext .pn-title{font-weight:700;color:var(--text);line-height:1.4}
.prevnext .next{text-align:right}

.card.featured{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,330px) 1fr;gap:1.5rem;align-items:center}
.card.featured h2{font-size:1.4rem}
@media(max-width:640px){.card.featured{grid-template-columns:1fr}}

/* ---- visible reader polish 2026-11-10 ---- */
.site-header { z-index: 20; }
.lang-switch { font-size: 0.9rem; margin: 0.45rem 0 1rem; letter-spacing: 0.02em; }
.lang-switch a { margin-right: 0.85rem; font-weight: 700; }
article.page p, article.page li, article.page .legal { max-width: var(--measure, 68ch); }
article.page { padding-top: 2.4rem; }
.card img, figure.hero img { width: 100%; height: auto; border-radius: 10px; display: block; }
.card h2 { font-size: 1.22rem; line-height: 1.3; }
.hero p { font-size: 1.08rem; line-height: 1.55; max-width: 60ch; }
.wrap { width: min(var(--max), calc(100% - 2.25rem)); }
@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 1.35rem)); }
  .hero { padding-top: 2.2rem; }
}

/* ---- mobile reader polish 2026-11-10 ---- */
img, video, iframe, svg { max-width: 100%; height: auto; }
pre, code { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { max-width: 100%; }
@media (max-width: 640px) {
  .wrap { width: min(var(--max, 880px), calc(100% - 1.25rem)); }
  .nav { flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 0.8rem 0; }
  .nav-links { gap: 0.7rem 0.95rem; font-size: 0.76rem; letter-spacing: 0.06em; }
  .brand { font-size: 1.22rem; line-height: 1.2; }
  .hero { padding: 1.6rem 0 1.1rem; }
  .hero h1 { font-size: clamp(1.55rem, 7.2vw, 2.05rem); }
  .hero p { font-size: 1rem; }
  .grid { padding-bottom: 2rem; }
  .card { grid-template-columns: 1fr !important; gap: 0.85rem; padding: 1.2rem 0; }
  .card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
  .card h2 { font-size: 1.18rem; }
  .card.featured { grid-template-columns: 1fr !important; padding: 1.1rem 0.95rem; }
  article.page { padding: 1.15rem 0 2.4rem; }
  article.page h1 { font-size: clamp(1.45rem, 6.8vw, 1.95rem); word-break: break-word; }
  article.page h2 { font-size: 1.2rem; margin-top: 1.7rem; }
  article.page > p.legal { font-size: 0.98rem; }
  article.page p, article.page li { overflow-wrap: anywhere; }
  figure.hero { margin: 0.9rem 0 1.1rem; }
  figure.hero img { border-radius: 8px; }
  .lang-switch { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }
  .ad-slot { min-height: 96px; margin: 1.15rem 0; padding: 0.6rem 0.7rem; font-size: 0.7rem; 
    overflow: visible !important;
    pointer-events: auto !important;
  }
  .editorial-recirc { margin: 1.4rem 0 1rem; }
  .editorial-recirc h2 { font-size: 1.05rem; }
  .editorial-recirc-sub { font-size: 0.86rem; }
  .editorial-recirc-dek { font-size: 0.84rem; }
  .related { margin-top: 1.6rem; }
  .prevnext { flex-direction: column; gap: 0.7rem; }
  .prevnext .next { text-align: left; }
  .site-footer { padding: 1.5rem 0 2rem; }
  .site-footer .foot-links { gap: 0.7rem 0.95rem; }
  article.page table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
