/*
 * TrendPerú UI v2 — framework cerrado para contenido nuevo.
 * Alcance estricto: nada fuera de .tp-v2 puede cambiar.
 * Los agentes deben usar .devin/workflows/trendperu-ui-v2.md, no leer este archivo.
 */
.tp-v2 {
    --tp2-brand: #087f5b;
    --tp2-brand-dark: #075f46;
    --tp2-brand-soft: #eaf7f2;
    --tp2-text: #17211d;
    --tp2-muted: #5f6d66;
    --tp2-border: #dce5e0;
    --tp2-surface: #fff;
    --tp2-soft: #f5f8f6;
    --tp2-info: #eaf3ff;
    --tp2-warn: #fff7df;
    --tp2-danger: #fff0f0;
    --tp2-radius: 12px;
    --tp2-shadow: 0 6px 22px rgba(20, 45, 35, .08);
    color: var(--tp2-text);
    font-size: 17px;
    line-height: 1.7;
}
.tp-v2 *, .tp-v2 *::before, .tp-v2 *::after { box-sizing: border-box; }
.tp-v2 > :first-child { margin-top: 0; }
.tp-v2 > :last-child { margin-bottom: 0; }
.tp-v2 h2, .tp-v2 h3 { color: var(--tp2-text); line-height: 1.25; text-wrap: balance; }
.tp-v2 h2 { margin: 36px 0 14px; font-size: clamp(1.45rem, 2.5vw, 1.85rem); }
.tp-v2 h3 { margin: 25px 0 10px; font-size: 1.18rem; }
.tp-v2 p, .tp-v2 ul, .tp-v2 ol { margin: 0 0 18px; }
.tp-v2 a { color: var(--tp2-brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tp-v2 a:hover { color: var(--tp2-brand); }
.tp-v2 .tp2-lead { margin: 0 0 20px; color: #34453d; font-size: clamp(1.06rem, 2vw, 1.2rem); line-height: 1.6; }

.tp-v2 .tp2-answer,
.tp-v2 .tp2-callout,
.tp-v2 .tp2-file,
.tp-v2 .tp2-facts,
.tp-v2 .tp2-ranking,
.tp-v2 .tp2-comparison,
.tp-v2 .tp2-steps {
    margin: 20px 0 28px;
}
.tp-v2 .tp2-answer {
    padding: 20px 22px;
    border: 1px solid #a9d9c8;
    border-radius: var(--tp2-radius);
    background: var(--tp2-brand-soft);
}
.tp-v2 .tp2-answer strong { display: block; margin-bottom: 5px; font-size: 1.08rem; }
.tp-v2 .tp2-answer p:last-child, .tp-v2 .tp2-callout p:last-child { margin-bottom: 0; }

.tp-v2 .tp2-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.tp-v2 .tp2-fact { padding: 16px; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); background: var(--tp2-surface); }
.tp-v2 .tp2-fact__value { display: block; color: var(--tp2-brand-dark); font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.tp-v2 .tp2-fact__label { display: block; margin-top: 5px; color: var(--tp2-muted); font-size: .88rem; line-height: 1.4; }

.tp-v2 .tp2-ranking { overflow: hidden; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); background: var(--tp2-surface); }
.tp-v2 .tp2-rank { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--tp2-border); }
.tp-v2 .tp2-rank:last-child { border-bottom: 0; }
.tp-v2 .tp2-rank__number { color: var(--tp2-brand-dark); font-size: 1.2rem; font-weight: 800; }
.tp-v2 .tp2-rank__name { font-weight: 700; }
.tp-v2 .tp2-rank__detail { color: var(--tp2-muted); font-size: .9rem; text-align: right; }

.tp-v2 .tp2-table-wrap { margin: 20px 0 28px; overflow-x: auto; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); }
.tp-v2 .tp2-table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--tp2-surface); font-size: .95rem; }
.tp-v2 .tp2-table th, .tp-v2 .tp2-table td { padding: 13px 15px; border-bottom: 1px solid var(--tp2-border); text-align: left; vertical-align: top; }
.tp-v2 .tp2-table th { background: var(--tp2-soft); color: #30423a; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; }
.tp-v2 .tp2-table tr:last-child td { border-bottom: 0; }

.tp-v2 .tp2-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tp-v2 .tp2-option { padding: 20px; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); background: var(--tp2-surface); }
.tp-v2 .tp2-option--recommended { border: 2px solid var(--tp2-brand); box-shadow: var(--tp2-shadow); }
.tp-v2 .tp2-option h3 { margin-top: 0; }

.tp-v2 .tp2-steps { counter-reset: tp2-step; display: grid; gap: 12px; padding: 0; list-style: none; }
.tp-v2 .tp2-step { position: relative; min-height: 58px; padding: 15px 16px 15px 62px; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); background: var(--tp2-surface); }
.tp-v2 .tp2-step::before { counter-increment: tp2-step; content: counter(tp2-step); position: absolute; top: 14px; left: 16px; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--tp2-brand); color: #fff; font-weight: 800; }
.tp-v2 .tp2-step strong { display: block; }

.tp-v2 .tp2-callout { padding: 17px 19px; border: 1px solid var(--tp2-border); border-radius: var(--tp2-radius); background: var(--tp2-soft); }
.tp-v2 .tp2-callout--info { border-color: #b8d6fa; background: var(--tp2-info); }
.tp-v2 .tp2-callout--warning { border-color: #ebcf77; background: var(--tp2-warn); }
.tp-v2 .tp2-callout--danger { border-color: #efb3b3; background: var(--tp2-danger); }

.tp-v2 .tp2-file { display: flex; gap: 18px; align-items: center; padding: 20px; border: 1px solid #a9d9c8; border-radius: var(--tp2-radius); background: var(--tp2-brand-soft); }
.tp-v2 .tp2-file__body { flex: 1; min-width: 0; }
.tp-v2 .tp2-file__title { display: block; font-weight: 800; }
.tp-v2 .tp2-file__meta { display: block; color: var(--tp2-muted); font-size: .88rem; }
.tp-v2 .tp2-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid var(--tp2-brand); border-radius: 9px; background: var(--tp2-brand); color: #fff; font-weight: 750; line-height: 1.25; text-decoration: none; }
.tp-v2 .tp2-button:hover { background: var(--tp2-brand-dark); color: #fff; }
.tp-v2 .tp2-button--secondary { background: #fff; color: var(--tp2-brand-dark); }

.tp-v2 .tp2-faq { margin: 24px 0; border-top: 1px solid var(--tp2-border); }
.tp-v2 .tp2-faq details { border-bottom: 1px solid var(--tp2-border); }
.tp-v2 .tp2-faq summary { padding: 15px 2px; cursor: pointer; font-weight: 750; }
.tp-v2 .tp2-faq details > div { padding: 0 2px 15px; color: #3e4c45; }
.tp-v2 .tp2-sources { margin-top: 30px; color: var(--tp2-muted); font-size: .78rem; line-height: 1.5; }
.tp-v2 .tp2-sources a { color: inherit; }
.tp-v2 .tp2-caption { margin-top: -19px; color: var(--tp2-muted); font-size: .8rem; }

@media (max-width: 640px) {
    .tp-v2 { font-size: 16px; }
    .tp-v2 .tp2-comparison { grid-template-columns: 1fr; }
    .tp-v2 .tp2-rank { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 13px; }
    .tp-v2 .tp2-rank__detail { grid-column: 2; text-align: left; }
    .tp-v2 .tp2-file { align-items: stretch; flex-direction: column; }
    .tp-v2 .tp2-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .tp-v2 *, .tp-v2 *::before, .tp-v2 *::after { scroll-behavior: auto !important; transition: none !important; }
}
