/* VYBE Journal – article metrics on the site. Colours follow the theme's text; the bars use the journal's colour (or a checked blue). */

.vj-metrics-scope { --vj-m-bar: #2a78d6; --vj-m-line: color-mix(in srgb, currentColor 16%, transparent); --vj-m-soft: color-mix(in srgb, currentColor 55%, transparent); }

/* One line: 1,240 views · 386 downloads */
.vj-mline { display: inline; font-variant-numeric: tabular-nums; }
.vj-mline strong { font-weight: 650; }
.vj-mline__sep { opacity: .6; }
.vj-mline__more { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: .92em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vj-mline__more::after { content: "›"; text-decoration: none; }
.vj-mline__more[hidden] { display: none; }
.vj-mline__more:hover { text-decoration-thickness: 2px; }
.vj-mline__more:focus-visible { outline: 2px solid var(--vj-m-bar); outline-offset: 2px; border-radius: 2px; }

/* The box: [vj_metrics] */
.vj-metrics { margin: 0 0 1.5em; }
.vj-metrics__title { margin: 0 0 .6em; font-size: 1.05em; }
.vj-metrics__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 0 0 14px; padding: 0; }
.vj-metrics__stat { display: flex; flex-direction: column-reverse; gap: 2px; margin: 0; padding: 10px 12px; border: 1px solid var(--vj-m-line); border-radius: 8px; }
.vj-metrics__stat dt { margin: 0; font-size: .82em; opacity: .75; }
.vj-metrics__stat dd { margin: 0; font-size: 1.45em; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.vj-metrics__badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0 0; }
.vj-metrics__note, .vj-mdialog__note { margin: 10px 0 0; font-size: .8em; opacity: .7; }
.vj-badge { min-height: 1px; }

/* Chart by month: one series per tab */
.vj-mchart { margin: 0; }
.vj-mchart__tabs { display: inline-flex; gap: 2px; margin: 0 0 10px; padding: 2px; border: 1px solid var(--vj-m-line); border-radius: 999px; }
.vj-mchart__tab { margin: 0; padding: 4px 12px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: .85em; line-height: 1.4; cursor: pointer; opacity: .8; }
.vj-mchart__tab[aria-selected="true"] { background: color-mix(in srgb, var(--vj-m-bar) 14%, transparent); box-shadow: inset 0 0 0 1px var(--vj-m-bar); font-weight: 650; opacity: 1; }
.vj-mchart__tab:focus-visible { outline: 2px solid var(--vj-m-bar); outline-offset: 2px; }
.vj-mchart__cols { position: relative; display: flex; align-items: stretch; height: 120px; margin: 18px 0 22px; padding: 0; border-bottom: 1px solid var(--vj-m-soft); list-style: none; }
.vj-mchart__col { position: relative; display: flex; flex: 1 1 0; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; margin: 0; padding: 0; cursor: default; outline-offset: -2px; }
.vj-mchart__col::before { content: none; }
.vj-mchart__bar { position: relative; display: block; width: min(24px, 62%); border-radius: 4px 4px 0 0; background: var(--vj-m-bar); transition: filter .12s; }
.vj-mchart__bar.is-zero { height: 0 !important; }
.vj-mchart__col:hover .vj-mchart__bar, .vj-mchart__col:focus-visible .vj-mchart__bar { filter: brightness(1.18) saturate(1.05); }
.vj-mchart__col:focus-visible { outline: 2px solid var(--vj-m-bar); }
.vj-mchart__val { position: absolute; bottom: 100%; left: 50%; margin-bottom: 2px; font-size: 11px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; transform: translateX(-50%); white-space: nowrap; }
.vj-mchart__m { position: absolute; top: calc(100% + 4px); left: 50%; font-size: 10.5px; line-height: 1.2; opacity: .7; transform: translateX(-50%); white-space: nowrap; }
.vj-mchart__m.is-quiet { visibility: hidden; }
.vj-mchart__table { margin: 0; font-size: .85em; }
.vj-mchart__table summary { cursor: pointer; opacity: .8; }
.vj-mchart__table table { width: 100%; margin: 8px 0 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vj-mchart__table th, .vj-mchart__table td { padding: 3px 6px; border-bottom: 1px solid var(--vj-m-line); text-align: left; font-weight: 400; }
.vj-mchart__table td { text-align: right; }
.vj-mchart__panel[hidden] { display: none; }

/* Tooltip (hover and keyboard focus) */
.vj-mtip { position: fixed; z-index: 100000; max-width: 240px; padding: 6px 9px; border-radius: 6px; background: #1c1d21; color: #fff; font: 12.5px/1.35 system-ui, sans-serif; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }

/* The "By month" window */
.vj-mdialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: auto; padding: 18px 20px 16px; border: 0; border-radius: 12px; background: #fff; color: #1d2433; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.vj-mdialog::backdrop { background: rgba(20, 22, 28, .45); }
.vj-mdialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.vj-mdialog__title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.vj-mdialog__close { display: grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .06); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.vj-mdialog__close:hover { background: rgba(0, 0, 0, .1); }
.vj-mdialog .vj-mchart__cols { height: 170px; }
.vj-mdialog .vj-mchart__m.is-quiet { visibility: visible; }
@media (max-width: 520px) { .vj-mdialog .vj-mchart__m.is-quiet { visibility: hidden; } }
@media (prefers-color-scheme: dark) {
	.vj-mdialog { background: #1f2229; color: #eef0f4; }
	.vj-mdialog__close { background: rgba(255, 255, 255, .1); }
}

/* [vj_most_read] */
.vj-most-read__list { margin: 0; padding: 0; list-style: none; counter-reset: vjmr; }
.vj-most-read__item { position: relative; display: grid; gap: 2px; margin: 0; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--vj-m-line); counter-increment: vjmr; }
.vj-most-read__item:last-child { border-bottom: 0; }
.vj-most-read__item::before { content: counter(vjmr); position: absolute; top: 9px; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--vj-m-bar) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--vj-m-bar); color: inherit; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vj-most-read__title { font-weight: 600; line-height: 1.35; text-decoration: none; }
.vj-most-read__title:hover { text-decoration: underline; }
.vj-most-read__authors { font-size: .88em; opacity: .8; }
.vj-most-read__n { font-size: .82em; opacity: .7; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .vj-mchart__bar { transition: none; } }
@media print { .vj-mline__more, .vj-mchart__tabs, .vj-mdialog { display: none !important; } }

/* Themes style every button (Twenty Twenty-One, Astra …): keep ours plain. */
.vj-metrics-scope button.vj-mline__more, .vj-mline button.vj-mline__more, button.vj-mline__more { min-height: 0 !important; margin: 2px 0 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; color: inherit !important; font: inherit !important; font-size: .92em !important; font-weight: 400 !important; line-height: 1.4 !important; letter-spacing: normal !important; text-transform: none !important; text-decoration: underline !important; text-underline-offset: 3px; }
.vj-mchart button.vj-mchart__tab { min-height: 0 !important; margin: 0 !important; padding: 4px 12px !important; border: 0 !important; border-radius: 999px !important; background: none !important; box-shadow: none !important; color: inherit !important; font-family: inherit !important; font-size: .85rem !important; font-weight: 500 !important; line-height: 1.4 !important; letter-spacing: normal !important; text-transform: none !important; text-decoration: none !important; }
.vj-mchart button.vj-mchart__tab[aria-selected="true"] { background: color-mix(in srgb, var(--vj-m-bar) 14%, transparent) !important; box-shadow: inset 0 0 0 1px var(--vj-m-bar) !important; font-weight: 650 !important; }
.vj-mdialog button.vj-mdialog__close { width: 34px !important; height: 34px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(0, 0, 0, .06) !important; box-shadow: none !important; color: inherit !important; font-size: 20px !important; line-height: 1 !important; }
.vj-mdialog button.vj-mdialog__close:hover { background: rgba(0, 0, 0, .12) !important; }
.vj-metrics-scope button:focus-visible { outline: 2px solid var(--vj-m-bar) !important; outline-offset: 2px !important; }
.vj-mchart__table summary { font-size: .9rem; }
.vj-mdialog { font-size: 15px; line-height: 1.45; }
.vj-mdialog .vj-mdialog__title { font-family: inherit; font-size: 1.05rem; font-weight: 650; letter-spacing: normal; text-transform: none; }
.vj-mchart__table table, .vj-mchart__table th, .vj-mchart__table td { border: 0 !important; border-bottom: 1px solid var(--vj-m-line) !important; background: none !important; }
.vj-mchart__table th, .vj-mchart__table td { padding: 4px 6px !important; font-size: .9rem !important; font-weight: 400 !important; }
.vj-mchart__table thead th { font-weight: 650 !important; opacity: .8; }
.vj-mchart__table td { text-align: right !important; }
.vj-metrics__stats .vj-metrics__stat dt, .vj-metrics__stats .vj-metrics__stat dd { margin: 0 !important; padding: 0 !important; }
.vj-metrics__stats .vj-metrics__stat dt { font-weight: 500 !important; }
