/* Axus Flow · Centro de reportes — misma identidad que el landing */
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(../assets/fonts/inter.woff) format('woff'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400 500; font-display: swap; src: url(../assets/fonts/jetbrains-mono.woff) format('woff'); }

:root {
  --void: #030508; --deep: #080C14; --surface: #0D131F; --edge: #1E293B; --edge-2: #2B3A52;
  --mint: #00F5A0; --cyan: #38BDF8; --ink: #E6EDF3; --mute: #8B98A9; --loss: #F0616D;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* , *::before, *::after { box-sizing: border-box; }
html { background: var(--void); scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, var(--void) 0%, var(--deep) 55%, var(--void) 100%); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
.mono { font-family: var(--mono); }
.mute { color: var(--mute); }
.pre { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--cyan); }

/* Cabecera */
.rh { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(30,41,59,.8); background: rgba(3,5,8,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rh-in { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; max-width: 76rem; margin: 0 auto; }
.rh-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.rh-brand i { display: inline-block; width: .55ch; height: 1.05em; background: var(--mint); vertical-align: -.15em; margin-left: 1px; animation: rh-blink 1.1s steps(1) infinite; }
@keyframes rh-blink { 50% { opacity: 0; } }
.rh-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; font-size: 14px; color: var(--mute); }
.rh-nav a:hover, .rh-nav a[aria-current="page"] { color: var(--ink); }
.rh-nav a[aria-current="page"] { position: relative; }
.rh-nav a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--mint); }
.rh-lang { appearance: none; -webkit-appearance: none; padding: .45rem 1.7rem .45rem .7rem; border: 1px solid var(--edge); border-radius: .4rem; background: rgba(13,19,31,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B98A9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .55rem center; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.rh-lang:hover { border-color: rgba(56,189,248,.6); }
.rh-cta { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: .4rem; background: var(--mint); color: var(--void); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .2s; }
.rh-cta:hover { background: #33F7B3; }
@media (max-width: 720px) { .rh-nav .rh-hide { display: none; } .rh-nav { gap: .9rem; } .rh-cta span { display: none; } }

/* Bloques comunes */
.sec { padding-top: 4.5rem; padding-bottom: 3rem; }
.h1 { margin-top: 1rem; font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; max-width: 22ch; }
.lede { margin-top: 1rem; max-width: 40rem; font-size: 1.05rem; line-height: 1.7; color: var(--mute); }
.card { border: 1px solid var(--edge); border-radius: .75rem; background: var(--surface); }
.tag { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .55rem; border: 1px solid var(--edge); border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; color: var(--mute); white-space: nowrap; }
.tag.is-period { color: var(--cyan); border-color: rgba(56,189,248,.35); }
.tag.is-new { color: var(--mint); border-color: rgba(0,245,160,.4); }
.tag.is-new::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1rem; border-radius: .45rem; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--mint); color: var(--void); }
.btn-primary:hover { background: #33F7B3; }
.btn-ghost { border: 1px solid var(--edge); color: var(--ink); font-weight: 500; }
.btn-ghost:hover { border-color: rgba(56,189,248,.6); }
.btn svg { flex: none; }

/* Glosario */
.gloss { margin-top: 1.75rem; max-width: 46rem; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.gloss > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; font-size: 14px; }
.gloss > summary::-webkit-details-marker { display: none; }
.gloss > summary svg { color: var(--mute); transition: transform .25s; }
.gloss[open] > summary svg { transform: rotate(180deg); }
.gloss dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .9rem 2rem; padding: .2rem 0 1.2rem; }
.gloss dt { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }
.gloss dd { margin-top: .2rem; font-size: 13.5px; line-height: 1.6; color: var(--mute); }

/* Métricas */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--edge); border-radius: .6rem; background: var(--edge); }
.metric { padding: .95rem 1rem; background: var(--void); }
.metric dt { font-size: 12px; color: var(--mute); }
.metric dd.v { margin-top: .3rem; font-family: var(--mono); font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.metric dd.n { margin-top: .35rem; font-size: 11.5px; line-height: 1.5; color: var(--mute); }

/* Destacado */
.featured { margin-top: 2.5rem; padding: 1.75rem; position: relative; overflow: hidden; }
.featured::after { content: ''; position: absolute; right: -18%; top: -55%; width: 55%; height: 140%; pointer-events: none; background: radial-gradient(circle, rgba(0,245,160,.09), transparent 62%); }
.featured > * { position: relative; }
@media (max-width: 640px) { .featured { padding: 1.35rem; } .featured::after { display: none; } }
.f-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.f-title { margin-top: .9rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 600; letter-spacing: -.01em; }
.f-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; margin-top: .55rem; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.f-meta b { color: var(--ink); font-weight: 500; }
.f-sum { margin-top: .9rem; max-width: 46rem; font-size: 14.5px; line-height: 1.7; color: var(--mute); }
.f-metrics { margin-top: 1.4rem; }
.f-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* Filtros y listado */
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--edge); }
.list-head h2 { font-size: 1.1rem; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .38rem .8rem; border: 1px solid var(--edge); border-radius: 999px; background: transparent; font-size: 12.5px; color: var(--mute); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.chip:hover:not([disabled]) { border-color: var(--edge-2); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--mint); color: var(--void); background: var(--mint); font-weight: 600; }
.chip[disabled] { opacity: .4; cursor: not-allowed; }
.chip .c { margin-left: .3rem; font-family: var(--mono); font-size: 11px; opacity: .8; }
.filter-stack { display: grid; gap: .6rem; justify-items: end; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .4rem .6rem; }
.filter-lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 760px) { .filter-stack { justify-items: start; } .filter-row { justify-content: flex-start; } }
.rows { margin-top: .25rem; }
.row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--edge); }
.row-title { font-weight: 600; font-size: 15px; }
.row-title a:hover { color: var(--mint); }
.row-meta { margin-top: .25rem; font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.row-side { display: flex; align-items: center; gap: .6rem; }
.row-side .btn { padding: .5rem .85rem; font-size: 13px; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: .6rem; }
  .row-side { flex-wrap: wrap; }
}

/* Estados */
.state { margin-top: 1.5rem; padding: 2.2rem 1.5rem; border: 1px dashed var(--edge-2); border-radius: .75rem; text-align: center; }
.state h3 { font-size: 15px; font-weight: 600; }
.state p { margin-top: .4rem; font-size: 13.5px; color: var(--mute); }
.state.is-error { border-style: solid; border-color: rgba(240,97,109,.4); }
.state.is-error h3 { color: #F0A3AA; }
.state .btn { margin-top: 1.1rem; }
[hidden] { display: none !important; }

/* Lector de reportes */
.crumb { display: inline-flex; align-items: center; gap: .4rem; font-size: 13px; color: var(--mute); }
.crumb:hover { color: var(--ink); }
.v-head { padding: 2.2rem 0 1.5rem; }
.v-title { margin-top: .8rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.v-dl { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: .9rem; }
.v-dl div { font-size: 13px; }
.v-dl dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--mute); text-transform: uppercase; }
.v-dl dd { margin-top: .15rem; color: var(--ink); }
.v-sum { margin-top: 1rem; max-width: 48rem; font-size: 14.5px; line-height: 1.7; color: var(--mute); }
.v-metrics { margin-top: 1.4rem; }
.v-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.6rem; padding: .7rem .9rem; border: 1px solid var(--edge); border-bottom: 0; border-radius: .75rem .75rem 0 0; background: var(--surface); }
.v-bar .lbl { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.v-bar .acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.v-bar .btn { padding: .45rem .8rem; font-size: 12.5px; }
.frame-box { position: relative; border: 1px solid var(--edge); border-radius: 0 0 .75rem .75rem; overflow: hidden; background: #09090B; height: clamp(560px, calc(100vh - 150px), 1600px); height: clamp(560px, calc(100dvh - 150px), 1600px); }
.frame-box iframe { display: block; width: 100%; height: 100%; border: 0; background: #09090B; }
.frame-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; font-family: var(--mono); font-size: 12px; color: var(--mute); background: #09090B; }
.frame-load i { width: 26px; height: 26px; border: 2px solid var(--edge-2); border-top-color: var(--mint); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.frame-note { margin-top: .7rem; font-size: 12px; color: var(--mute); }
@media (max-width: 640px) { .frame-box { height: 78vh; height: 78dvh; } }
.related { margin-top: 3.5rem; }
.related h2 { font-size: 1.05rem; font-weight: 600; padding-bottom: .8rem; border-bottom: 1px solid var(--edge); }

/* Pie */
.rf { margin-top: 4rem; border-top: 1px solid var(--edge); background: var(--void); }
.rf-in { max-width: 76rem; margin: 0 auto; padding: 2rem 1.25rem 2.5rem; }
.rf p { font-size: 12px; line-height: 1.7; color: var(--mute); max-width: 60rem; }
.rf p b { color: var(--ink); font-weight: 500; }
.rf .rf-bottom { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.rf .rf-bottom a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .rh-brand i, .frame-load i { animation: none; }
  .gloss > summary svg, .chip, .btn { transition: none; }
}
