.clusters-body { background: #f3f1e9; }
.clusters-topbar { background: radial-gradient(circle at 80% 0%, rgba(184,154,208,.2), transparent 30%), linear-gradient(115deg, #19243c, #283c5d 60%, #344e72); }
.clusters-topbar .eyebrow { color: #b9cee9; }
.cluster-shell { min-height: calc(100vh - 106px); display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.cluster-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 15px; border-right: 1px solid #d6d8d4; display: flex; flex-direction: column; background: #e9e9e4; overflow: hidden; }
.cluster-sidebar > label { margin: 0 0 7px 4px; color: #56615c; font-size: 12px; font-weight: 750; }
.cluster-sidebar > input { width: 100%; padding: 11px 12px; border: 1px solid #cbd0ca; border-radius: 9px; background: white; }
.partition-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 11px; }
.partition-filters button, .cluster-filter-row button { padding: 7px; border: 1px solid #d4d7d1; border-radius: 8px; color: #64706a; background: white; cursor: pointer; font-size: 11px; font-weight: 700; }
.partition-filters button.active, .cluster-filter-row button.active { color: white; border-color: #314e72; background: #314e72; }
.cluster-main { min-width: 0; padding: 26px clamp(18px, 3.5vw, 52px) 80px; }
.cluster-main article { max-width: 1350px; margin: auto; }
.cluster-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(370px, .9fr); gap: 28px; padding: 27px; border-radius: 18px; color: #f7f9fc; background: linear-gradient(130deg, #1d2d49, #35577d); box-shadow: var(--shadow); }
.cluster-hero .eyebrow { color: #b6d0ec; }
.cluster-hero h2 { margin: 7px 0; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 41px); font-weight: 500; line-height: 1.15; }
.diagnosis-panel { margin: 16px 0; padding: 16px 18px; border: 1px solid #e0cdb0; border-left: 5px solid #b07825; border-radius: 12px; background: #fff8e9; }
.diagnosis-panel.pass { border-color: #b9dcc9; border-left-color: var(--green); background: #effaf3; }
.diagnosis-panel h3 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.diagnosis-panel p { margin: 4px 0; color: #655c4e; font-size: 13px; }
.diagnosis-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.diagnosis-list span { padding: 5px 8px; border-radius: 7px; color: #735525; background: #f4e6c9; font-size: 11px; font-weight: 700; }
.cluster-controls { position: sticky; top: 0; z-index: 8; margin: 16px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: minmax(190px, 1fr) minmax(150px, .65fr) minmax(190px, 1fr) auto; gap: 10px; align-items: end; background: rgba(246,244,237,.96); box-shadow: 0 8px 24px rgba(34,44,60,.07); backdrop-filter: blur(10px); }
.cluster-controls label { display: grid; gap: 4px; color: #5d6863; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.cluster-controls select, .cluster-controls input { width: 100%; min-height: 39px; padding: 8px 9px; border: 1px solid #ccd1cb; border-radius: 8px; color: var(--ink); background: white; font-size: 12px; text-transform: none; letter-spacing: 0; }
.cluster-filter-row { display: flex; gap: 5px; }
.cluster-section-nav a { padding: 8px 11px; border-radius: 8px; color: #4d5853; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cluster-section-nav a:hover { background: white; }
.cluster-table-wrap { overflow-x: auto; }
.cluster-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cluster-table th { padding: 9px 10px; color: #69736e; text-align: right; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.cluster-table th:first-child, .cluster-table td:first-child { text-align: left; }
.cluster-table td { padding: 10px; text-align: right; border-bottom: 1px solid #e7e7e1; font-variant-numeric: tabular-nums; }
.cluster-table tr.active { color: #173d2d; background: #edf7f1; font-weight: 750; }
.cluster-table tr.oracle { color: #5c4773; background: #f5f0f8; }
.diagnostic-candidate-list, .diagnostic-cluster-list { display: grid; gap: 10px; }
.diagnostic-candidate { padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid #aeb7b1; border-radius: 10px; background: white; }
.diagnostic-candidate.accepted { border-left-color: var(--green); background: #fbfffc; }
.diagnostic-candidate .candidate-rank { min-width: 33px; height: 33px; border-radius: 9px; display: inline-grid; place-items: center; color: white; background: #385777; font-weight: 800; }
.diagnostic-candidate-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: start; }
.diagnostic-candidate h4 { margin: 0; font-size: 13px; line-height: 1.45; }
.candidate-score-stack { display: grid; gap: 2px; text-align: right; color: #64706a; font-size: 10px; }
.candidate-score-stack b { color: #34423b; font-size: 12px; font-variant-numeric: tabular-nums; }
.diagnostic-cluster { border: 1px solid #d8dad5; border-radius: 13px; overflow: hidden; background: white; }
.diagnostic-cluster > summary { list-style: none; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; cursor: pointer; background: #faf9f4; }
.diagnostic-cluster > summary::-webkit-details-marker { display: none; }
.diagnostic-cluster.selected > summary { background: #eff7f3; }
.diagnostic-cluster.large { border-color: #d8b98c; }
.cluster-title-row { display: flex; align-items: flex-start; gap: 10px; }
.cluster-number { min-width: 34px; height: 29px; border-radius: 7px; display: inline-grid; place-items: center; color: white; background: #53657b; font-size: 11px; font-weight: 800; }
.cluster-title-row h4 { margin: 0; font-size: 13px; line-height: 1.45; }
.cluster-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.cluster-stats span { padding: 4px 7px; border-radius: 6px; color: #55625c; background: #e9ece8; font-size: 10px; font-weight: 750; white-space: nowrap; }
.cluster-stats .selected-stat { color: #0e633d; background: var(--green-soft); }
.cluster-explanation { padding: 12px 16px; border-top: 1px solid #e0e1dc; color: #58645e; background: #f5f5f1; font-size: 12px; }
.cluster-body { padding: 12px; border-top: 1px solid var(--line); }
.cluster-human-links { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.cluster-human-links a { padding: 4px 7px; border-radius: 6px; color: #765329; background: #f5e9d8; font-size: 10px; font-weight: 700; text-decoration: none; }
.cluster-human-links a.covered { color: #0e633d; background: var(--green-soft); }
.cluster-members { display: grid; gap: 7px; }
.cluster-member { padding: 10px 11px; border: 1px solid #e1e2dd; border-radius: 8px; background: #fff; }
.cluster-member.selected { border-color: #85b69e; box-shadow: inset 3px 0 #2c8759; }
.cluster-member.accepted { background: #fbfffc; }
.cluster-member p { margin: 6px 0 0; font-size: 12px; }
.member-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.member-rank { color: #174e35; font-weight: 850; }
.issue-card.selector-covered { border-left-color: var(--green); background: #fbfffc; }
.issue-card.selector-missed { border-left-color: var(--red); background: #fffaf8; }
.issue-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.issue-comparison > div { padding: 9px 10px; border-radius: 8px; color: #59635e; background: #f0f1ed; font-size: 11px; }
.issue-comparison > div.covered { color: #0e633d; background: var(--green-soft); }
.issue-comparison strong { display: block; margin-bottom: 3px; font-size: 10px; text-transform: uppercase; }
.issue-comparison a { color: inherit; }
.no-results { padding: 24px; border: 1px dashed #ccd0ca; border-radius: 10px; color: #6e7773; text-align: center; }
@media (max-width: 1050px) {
  .cluster-shell { grid-template-columns: 245px minmax(0, 1fr); }
  .cluster-controls { grid-template-columns: 1fr 1fr; }
  .cluster-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cluster-shell { display: block; }
  .cluster-sidebar { position: static; height: auto; max-height: 390px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cluster-main { padding: 16px 11px 60px; }
  .cluster-controls { position: static; grid-template-columns: 1fr; }
  .cluster-filter-row { flex-wrap: wrap; }
  .cluster-section-nav { overflow-x: auto; }
  .cluster-hero, .panel { padding: 17px; }
  .diagnostic-candidate-header, .diagnostic-cluster > summary { grid-template-columns: 1fr; }
  .cluster-stats { justify-content: flex-start; }
  .issue-comparison { grid-template-columns: 1fr; }
}
