/* Curious Invest — "Market Terminal": dark trading-desk theme.
   Tabular numerals, mono meta, sharp edges, live-dot badge. */
:root {
  --measure: 68ch;
  --bg: #0a0f1c;
  --bg2: #0d1424;
  --card: #111a2e;
  --text: #e8eef8;
  --muted: #8b98ad;
  --line: #1f2b45;
  --accent: #38bdf8;
  --accent-bright: #7dd3fc;
  --up: #22c55e;
  --max: 1020px;
  --radius: 6px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: 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);
  font-family: var(--sans); line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 28, 0.94);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.site-header::after { content: ""; display: block; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 70%); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: 0.02em; color: var(--text); font-size: 1.1rem; font-family: var(--mono); }
.brand span { color: var(--accent-bright); }
.nav-links { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.88rem; font-family: var(--mono); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.hero { padding: 3.4rem 0 2.2rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--up); border: 1px solid #14532d; background: rgba(34, 197, 94, 0.08);
  padding: 0.35rem 0.75rem; border-radius: var(--radius); margin-bottom: 1rem;
}
.hero-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.hero h1 { margin: 0 0 0.6rem; font-size: clamp(2.05rem, 5.2vw, 3.05rem); letter-spacing: -0.02em; font-weight: 800; }
.hero p { margin: 0; color: var(--muted); max-width: 60ch; }

.grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); padding: 0.5rem 0 3rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.25rem; transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 { margin: 0 0 0.5rem; font-size: 1.08rem; letter-spacing: -0.01em; line-height: 1.4; }
.card h2 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.meta { font-family: var(--mono); color: var(--muted); font-size: 0.8rem; margin-bottom: 1.1rem; }
.meta::before { content: "> "; color: var(--accent); }

article.page { padding: 2rem 0 3.5rem; }
article.page h1 { margin: 0 0 0.6rem; letter-spacing: -0.02em; font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
article.page h2 { margin: 2rem 0 0.7rem; font-size: 1.35rem; padding-left: 0.7rem; border: 1px solid var(--line); }
article.page h3 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; color: var(--accent-bright); }
article.page p { margin: 0.9rem 0; }
article.page ul, article.page ol { margin: 1rem 0; padding-left: 1.4rem; }
article.page li { margin: 0.45rem 0; }
article.page li::marker { color: var(--accent); }
article.page blockquote { border: 1px solid var(--line); border: 1px solid var(--line); background: var(--bg2); margin: 1.4rem 0; padding: 0.9rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
article.page table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
article.page th, article.page td { border: 1px solid var(--line); padding: 0.55rem 0.8rem; text-align: right; }
article.page th:first-child, article.page td:first-child { text-align: left; }
article.page th { background: var(--bg2); color: var(--accent-bright); font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
article.page code { font-family: var(--mono); background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.88em; }
article.page pre { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; overflow-x: auto; }
article.page pre code { background: none; border: none; padding: 0; }

.ad-slot {
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #2b3a5c;
  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: 1.8rem 0 2.4rem; color: var(--muted); font-size: 0.88rem; font-family: var(--mono); }
.site-footer .foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.legal { max-width: 72ch; }

@media (max-width: 640px) {
  .hero { padding: 1.8rem 0 1.2rem; }
}

/* ---- 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; }
}
