/* ───────────────────────────────────────────────
   Observatorio Urbano — hoja de estilo de artículos
   ─────────────────────────────────────────────── */
:root {
  --paper: #FBF9F6; --paper-2: #F2EFEA; --panel: #FFFFFF;
  --ink: #1F2328; --ink-soft: #565B63; --muted: #9A9C98;
  --line: rgba(35,38,43,.10); --line-soft: rgba(35,38,43,.06);
  --accent: #EE6A5B; --accent-deep: #D85A48;
  --verde:#7CA56B; --azul:#5273A0; --amarillo:#DDA94F; --morado:#9B86B5;
  --shadow: 0 18px 50px -22px rgba(35,38,43,.28), 0 4px 14px -8px rgba(35,38,43,.14);
  --sans: 'Inter', system-ui, sans-serif;
  --serif: 'Spectral', Georgia, serif;
}
[data-theme="dark"] {
  --paper: #1F2430; --paper-2: #11151B; --panel: #1D222B;
  --ink: #E8EBF0; --ink-soft: #AFB6BE; --muted: #6E7782;
  --line: rgba(255,255,255,.1); --line-soft: rgba(255,255,255,.06);
  --shadow: 0 18px 50px -22px rgba(0,0,0,.7), 0 4px 14px -8px rgba(0,0,0,.5);
}
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink-soft); -webkit-font-smoothing: antialiased; line-height: 1.6; }
a { color: inherit; }

/* ── Nav ── */
.art-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; background: rgba(251,250,247,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
[data-theme="dark"] .art-nav { background: rgba(22,26,33,.85); }
.art-brand { display: flex; align-items: center; gap: 11px; }
.art-brand svg { width: 26px; height: 26px; color: var(--ink); }
.art-brand-text { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; color: var(--ink); }
.art-back { font-size: 12px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; transition: color .2s; }
.art-back:hover { color: var(--accent-deep); }
.art-nav-right { display: flex; align-items: center; gap: 12px; }
#theme-toggle { background: none; border: 1px solid var(--line); cursor: pointer; padding: 7px; border-radius: 999px; color: var(--ink-soft); display: flex; transition: color .2s, border-color .2s; }
#theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
#theme-toggle svg { width: 14px; height: 14px; }
.icon-sun, .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }

/* ── Layout ── */
.art { max-width: 720px; margin: 0 auto; padding: 64px 28px 120px; }
.art-cat { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--accent)); margin-bottom: 22px; }
.art-cat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.art-title { font-family: var(--serif); font-weight: 500; font-size: clamp(33px, 5.2vw, 54px); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); margin-bottom: 22px; text-wrap: pretty; }
.art-dek { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; color: var(--ink-soft); margin-bottom: 30px; text-wrap: pretty; }
.art-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 18px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.art-byline b { color: var(--ink); font-weight: 600; }
.art-byline .sep { color: var(--line); }

/* ── Abstract ── */
.art-abstract { margin: 38px 0; padding: 24px 26px; background: var(--paper-2); border-radius: 12px; }
.art-abstract h4 { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.art-abstract p { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); }

/* ── Body ── */
.art-h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(21px, 2.6vw, 27px); letter-spacing: -.02em; color: var(--ink); margin: 48px 0 16px; }
.art-h2 .n { color: var(--muted); font-weight: 600; margin-right: 10px; }
.art-p { font-family: var(--serif); font-size: 18.5px; line-height: 1.74; color: var(--ink); margin-bottom: 20px; text-wrap: pretty; }
[data-theme="dark"] .art-p { color: var(--ink-soft); }
.art-p sup a { color: var(--accent-deep); font-size: .7em; font-weight: 700; text-decoration: none; padding: 0 1px; }
.art-p a.inline { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }

.art-quote { margin: 38px 0; padding-left: 26px; border-left: 3px solid var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(21px, 2.8vw, 28px); line-height: 1.32; color: var(--ink); text-wrap: pretty; }

/* ── Figura ── */
.art-figure { margin: 40px 0; }
.art-figure .frame { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 26px; }
.art-figure svg { width: 100%; height: auto; display: block; }
.art-figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.art-figcaption b { color: var(--ink-soft); font-weight: 600; }
.art-powered { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; }
.art-powered::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Nota al margen ── */
.art-note { margin: 30px 0; padding: 16px 20px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.art-note b { color: var(--ink); font-weight: 600; }

/* ── Herramienta sugerida: retirada (ahora solo "Impulsado por ClicData" en figuras) ── */

/* ── Referencias ── */
.art-refs { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); }
.art-refs h3 { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.art-refs ol { list-style: none; counter-reset: r; display: flex; flex-direction: column; gap: 11px; }
.art-refs li { counter-increment: r; position: relative; padding-left: 30px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.art-refs li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); font-size: 10px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.art-refs .disc { margin-top: 18px; font-size: 12px; font-style: italic; color: var(--muted); }

/* ── Pie / relacionados ── */
.art-foot { max-width: 720px; margin: 0 auto; padding: 0 28px 100px; }
.art-foot-label { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px; transition: transform .3s, box-shadow .3s; }
a.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rel-cat { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--c, var(--accent)); margin-bottom: 9px; }
.rel-title { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.22; color: var(--ink); text-wrap: pretty; }
.rel-soon { display: inline-block; margin-top: 10px; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; }
.art-foot-back { display: block; margin-top: 34px; font-size: 13px; font-weight: 600; color: var(--accent-deep); }

@media (max-width: 620px) {
  .art-nav { padding: 14px 20px; }
  .art-brand-text { display: none; }
  .art { padding: 44px 22px 90px; }
  .rel-grid { grid-template-columns: 1fr; }
}
