.theme-library {display:grid; gap:1.2rem}
.theme-featured,.theme-filter,.theme-section-card,.theme-preview {padding:clamp(1rem,2vw,1.65rem)}
.theme-featured {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; border:1px solid #c4d6f8; border-radius:16px; background:#e8f0ff; color:var(--ink); text-decoration:none}
.theme-featured p,.theme-rule p {max-width:68ch}
.theme-featured p {margin:.4rem 0 0}
.theme-filter {display:flex; align-items:end; flex-wrap:wrap; gap:.85rem}
.theme-filter>div {flex:1 1 12rem; min-width:0}
.theme-filter label {display:block; margin:0 0 .3rem; font-weight:700}
.theme-filter input,.theme-filter select {width:100%; box-sizing:border-box; min-height:44px}
.theme-cards,.theme-positions,.theme-pair-cards {display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap:.8rem}
.theme-preview {display:grid; align-content:start; gap:.6rem; min-width:0; text-decoration:none; color:var(--ink)}
.theme-preview:hover,.theme-featured:hover {border-color:#7f9ed6; box-shadow:0 3px 12px #13377316}
.theme-preview h3,.theme-company h3,.theme-pair h3 {margin:0; font-size:1rem; line-height:1.35; overflow-wrap:anywhere}
.theme-card-label,.theme-card-data {display:flex; align-items:center; flex-wrap:wrap; gap:.42rem; color:var(--muted); font-size:.82rem}
.theme-card-data>.icon {margin-left:auto}
.theme-card-label>.icon,.theme-card-data>.icon {width:1em;height:1em}
.theme-evidence-layout {display:grid; grid-template-columns:minmax(0,7fr) minmax(0,4fr); gap:1rem; align-items:start}
.theme-section-card,.theme-library-heading {min-width:0}
.theme-section-card h2 {margin-top:0}
.theme-fund-name {display:block; color:var(--muted); font-weight:500; margin-top:.25rem; min-width:0}
.theme-weight-cell {min-width:6.4rem}
.theme-weight-cell .meter {margin-top:.3rem; height:4px}
.theme-exposure-table tbody tr:nth-child(2n) {background:#f4f7fd}
.theme-exposure-table td time {white-space:nowrap}
.theme-library .chart-figure {margin:.85rem 0 0}
.theme-library canvas[data-plot] {width:100%; height:clamp(160px,24vw,235px)}
.theme-chart-table {margin-top:1rem}
.theme-positions>.theme-company,.theme-pair {padding:.9rem; border:1px solid #d7e3f6; border-radius:12px; background:#f4f7fd; min-width:0}
.theme-positions .ticker-tag {font-size:.7rem}
.theme-positions ul,.theme-pair-dates,.theme-related ul {padding:0; list-style:none}
.theme-positions ul {margin:.5rem 0}
.theme-positions li {display:flex; align-items:baseline; gap:.45rem; flex-wrap:wrap; padding:.28rem 0; border-bottom:1px solid #d9e4f4; font-size:.82rem}
.theme-positions li time {margin-left:auto; color:var(--muted)}
.theme-positions li a,.theme-pair-dates a {display:inline-flex; align-items:center; gap:.25rem}
.theme-positions li .icon,.theme-pair-dates .icon,.theme-chart-table .icon {width:.82em;height:.82em}
.theme-pair dl {display:grid; grid-template-columns:minmax(0,1fr); gap:.3rem; margin:.6rem 0; font-size:.86rem}
.theme-pair dl>div {display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:baseline; gap:.4rem}
.theme-pair dt {overflow-wrap:anywhere}
.theme-pair dd {margin:0; font-weight:800; font-variant-numeric:tabular-nums}
.theme-pair-dates {font-size:.8rem; margin:.5rem 0}
.theme-related ul {display:flex; flex-wrap:wrap; gap:.55rem 1.2rem}
.theme-fund-topics {margin:1rem 0}
.theme-fund-topics li {margin-block:.35rem}
@media(max-width:850px) {.theme-evidence-layout {grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px) {
  .theme-filter button {width:100%}
  .theme-exposure-table {min-width:29rem}
}
