/* Jurisprudencia TS — misma paleta, tipografías y filetes que los cuadros de mandos */
.jts {
	--paper: var(--wp--preset--color--base, #F8F6F1);
	--card: var(--wp--preset--color--surface, #FFFFFF);
	--ink: var(--wp--preset--color--contrast, #16181D);
	--ink-2: var(--wp--preset--color--muted, #5C6170);
	--line: var(--wp--preset--color--rule, #E2DDD2);
	--accent: var(--wp--preset--color--accent, #9B2C22);
	--accent-soft: var(--wp--preset--color--accent-soft, #F4E7E2);
	--tc: var(--wp--preset--color--pizarra-azul, #2E5A72);
	--ok: var(--wp--preset--color--olivo, #5E6B2F);
	--serif: var(--wp--preset--font-family--serif, Newsreader, "Iowan Old Style", Georgia, serif);
	--sans: var(--wp--preset--font-family--sans, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	box-sizing: border-box;
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}
.jts *, .jts *::before, .jts *::after { box-sizing: border-box; }
.jts p { margin: 0; }
.jts a { color: inherit; }

/* Cifras */
.jts-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.jts-kpi { padding: 14px 16px 14px 0; min-width: 0; }
.jts-kpi + .jts-kpi { padding-left: 16px; border-left: 1px solid var(--line); }
.jts-kpi-v { font-family: var(--serif); font-size: 2.1rem; font-weight: 560; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.jts-kpi-l { font-weight: 600; font-size: 13px; margin-top: 2px; }
.jts-kpi-s { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buscador y filtros */
.jts .jts-search { width: 100%; max-width: none; min-height: 0; margin: 0 0 14px; padding: 13px 18px 13px 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235C6170' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 18px center; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.4; box-shadow: none; outline: none; }
.jts .jts-search:focus { border-color: var(--ink); }
.jts-filters { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 22px; }
.jts-fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jts-flabel { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 650; margin-right: 2px; }
.jts-chip { display: inline-flex; align-items: center; gap: 6px; padding: .2em .7em; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-family: var(--sans); font-size: 13px; line-height: 1.6; color: var(--ink); text-decoration: none !important; white-space: nowrap; }
button.jts-chip { cursor: pointer; }
.jts-chip b { color: var(--accent); font-weight: 650; }
button.jts-chip:hover, .jts-chip.on { border-color: var(--accent); color: var(--accent); }
.jts-chip.on { background: var(--accent-soft); }
a.jts-chip-go { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }
a.jts-chip-go:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
a.jts-chip-go::after { content: "→"; font-size: 11px; opacity: .7; }
.jts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jts-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 18px; font-size: 13px; color: var(--ink-2); }
.jts-active button { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* Dos columnas: resultados y preceptos más aplicados */
.jts-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.jts-side { position: sticky; top: 24px; }
.jts-sec { border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 26px; }
.jts-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 650; margin: 0 0 12px !important; padding: 0 !important; font-family: var(--sans); }
.jts-top { list-style: none; margin: 0 !important; padding: 0 !important; }
.jts-top li { margin: 0 !important; padding: 0; list-style: none; }
.jts-top button { display: flex; width: 100%; justify-content: space-between; gap: 10px; align-items: baseline; padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.jts-top button:hover, .jts-top button.on { color: var(--accent); }
.jts-top button span:last-child { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-2); }
.jts-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.jts-note a { color: var(--accent); }

/* Ficha en la lista */
.jts-count { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 650; border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 4px !important; }
.jts-item { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.jts-item-meta { font-size: 13px; color: var(--ink-2); }
.jts-item-meta b { color: var(--accent); font-weight: 650; letter-spacing: .01em; }
.jts-dot { margin: 0 .5em; color: var(--line); }
.jts .jts-item-t { font-family: var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.45rem); font-weight: 560; letter-spacing: -.012em; line-height: 1.22; margin: 4px 0 8px !important; padding: 0 !important; }
.jts-item-t a { text-decoration: none; }
.jts-item-t a:hover { color: var(--accent); }
.jts-item-d { font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px !important; }
.jts-item .jts-chips { margin-bottom: 10px; }
.jts-item-f { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 13.5px; }
.jts-link { color: var(--accent) !important; font-weight: 600; text-decoration: none !important; }
.jts-link:hover { text-decoration: underline !important; }
.jts-ecli { font-size: 12px; color: var(--ink-2); margin-left: auto; }
.jts-more { display: flex; justify-content: center; padding: 22px 0 6px; }
.jts-btn { display: inline-flex; align-items: center; gap: 6px; padding: .6em 1.25em; border-radius: 999px; background: var(--ink); color: var(--paper) !important; border: 1px solid var(--ink); font-family: var(--sans); font-weight: 600; font-size: 14px; cursor: pointer; line-height: 1.2; }
.jts-btn:hover { background: var(--accent); border-color: var(--accent); }
.jts-empty { padding: 30px 0; color: var(--ink-2); font-family: var(--serif); font-size: 1.1rem; }

/* Recuadro dentro de cada comentario */
.jts-ficha { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); padding: 12px 0 14px; margin: 0 0 28px; }
.jts-ficha-h { font-size: 13px; font-weight: 650; color: var(--accent); letter-spacing: .01em; margin-bottom: 10px !important; }
.jts-ficha-l { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 650; margin-bottom: 6px !important; }
.jts-ficha-f { margin-top: 12px !important; font-size: 13.5px; }

/* Bloque dentro del panel de un artículo en los cuadros de mandos */
.jts-rel h4 { display: flex; justify-content: space-between; gap: 8px; }
.jts-rel-l { list-style: none; margin: 0 !important; padding: 0 !important; }
.jts-rel-l li { margin: 0 !important; padding: 8px 0; border-bottom: 1px solid var(--line, #E2DDD2); list-style: none; line-height: 1.35; }
.jts-rel-l a { text-decoration: none; color: inherit; display: block; }
.jts-rel-l a b { color: var(--accent, #9B2C22); font-weight: 650; font-size: 13px; display: block; }
.jts-rel-l a span { font-family: var(--serif, Georgia, serif); font-size: 1rem; }
.jts-rel-l a:hover span { color: var(--accent, #9B2C22); }
.jts-rel-all { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent, #9B2C22) !important; text-decoration: none !important; }
.jts-rel-all:hover { text-decoration: underline !important; }
button.jts-badge { cursor: pointer; background: var(--accent, #9B2C22); border-color: var(--accent, #9B2C22) !important; color: #fff !important; font-family: inherit; line-height: inherit; }
button.jts-badge:hover { filter: brightness(1.12); }

@media (max-width: 900px) {
	.jts-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.jts-side { position: static; order: -1; }
	.jts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.jts-kpi:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
	.jts-kpi:nth-child(4) { border-top: 1px solid var(--line); }
	.jts-ecli { margin-left: 0; width: 100%; }
	.jts-top { display: flex; flex-wrap: wrap; gap: 6px; }
	.jts-top button { width: auto; border: 1px solid var(--line); border-radius: 999px; padding: .2em .7em; font-size: 13px; }
	.jts-top button span:last-child { font-size: 12px; }
}
