/* Shared reading hierarchy; page-specific data and scoring stay in their original code. */
.ux-reading-route { display:block; padding:.55rem .75rem; margin:.6rem 0; border-left:3px solid #7c3aed; border-radius:.25rem; background:var(--surface2,#f5f3ff); text-decoration:none; font-size:.9rem; font-weight:650; }
.ux-reading-route span { display:block; margin-top:.15rem; font-size:.77rem; font-weight:400; color:var(--muted,#526174); }
.ux-reading-route:hover { text-decoration:underline; }
.ux-guide, .ux-options { border:1px solid var(--border,var(--gray-200,#dfe3e8)); border-radius:.45rem; padding:.5rem .7rem; margin:.55rem 0 .75rem; background:var(--surface,var(--gray-50,#f8fafc)); }
.ux-guide > summary, .ux-options > summary { cursor:pointer; font-size:.8rem; font-weight:600; color:var(--text,var(--gray-700,#334155)); }
.ux-guide > div, .ux-options > div { margin-top:.6rem; }
.ux-guide .about, .ux-guide .workflow-explainer, .ux-guide .get-involved { margin:.5rem 0; }
.ux-view-switch { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem; margin:.65rem 0; }
.ux-view-switch button { min-height:36px; padding:.35rem .65rem; border:1px solid var(--border,#cbd5e1); border-radius:.35rem; background:var(--surface,#fff); color:var(--text,#334155); font:inherit; font-size:.8rem; cursor:pointer; }
.ux-view-switch button[aria-pressed=true] { border-color:var(--accent,#64748b); background:var(--surface2,#e8edf5); font-weight:700; }
.ux-view-switch span { font-size:.76rem; color:var(--muted,#64748b); }
.ux-view-switch button:focus-visible, .ux-reading-route:focus-visible { outline:2px solid var(--primary,#2563eb); outline-offset:3px; }
.ux-browse-only { display:none; }
.ux-browse .ux-browse-only { display:block; }
.ux-browse .ux-compare-only { display:none; }
.ux-primary-controls { gap:.6rem !important; align-items:center; }
.ux-primary-controls .ctrl:first-child { flex:1 1 200px; }
.ux-primary-controls input[type=text], .ux-primary-controls input[type=search] { width:100% !important; min-width:0; }
.ux-options .controls { margin:.5rem 0; padding:.4rem 0; border:0; box-shadow:none; }
.ux-options .dashboard-folds { margin:.5rem 0; }
.ux-note { font-size:.8rem; color:var(--muted,var(--gray-600,#526174)); margin:.6rem 0; }
body[data-collection-page=main] .header-inner { flex-wrap:wrap; gap:.6rem; }
body[data-collection-page=main] .purpose-strip { display:block; }
body[data-collection-page=main] .purpose-strip p { margin:.2rem 0; }
body[data-collection-page=main].ux-browse .card:not(.expanded) .card-row2 > :is(.t-model,.t-opus,.t-living-review,.t-review-overlap,.t-crux,.suggestion-origin-chip) { display:none; }
body[data-collection-page=main].ux-browse .card:not(.expanded) .card-action-row > :is(.priority-marker-info,a[href^="#opus-detail-"]) { display:none; }
body[data-collection-page=main] .card-action-row { flex-wrap:wrap; }
body[data-collection-page=main].ux-browse .card:not(.expanded) .card-brief { padding:.75rem 1rem; }
body[data-collection-page=legal] .ux-guide .about { padding:0; border:0; background:transparent; }
body[data-collection-page=legal].ux-browse .card:not(.expanded) .t-field { display:none; }
body[data-collection-page=impact].ux-browse .ux-human-context { display:none; }
body[data-collection-page=impact] .ux-reading-route { max-width:850px; }
body[data-collection-page=cruxes] .filter-toggle-btn { display:inline-flex; }
body[data-collection-page=cruxes] .filter-bar:not(.filters-open) .filter-secondary { display:none; }
body[data-collection-page=cruxes] .header-desc { margin:.5rem 0; }
body[data-collection-page=cruxes] .ux-guide { max-width:1400px; margin:.5rem auto; }
body[data-collection-page=cruxes].ux-browse #main-table { table-layout:fixed; width:100%; min-width:0; }
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(1),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(3),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(4),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(5),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(8),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(9),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(10),
body[data-collection-page=cruxes].ux-browse #main-table :is(thead tr,.data-row) > :is(th,td):nth-child(11) { display:none; }
body[data-collection-page=cruxes].ux-browse #main-table th:nth-child(2) { width:25% !important; min-width:0 !important; }
body[data-collection-page=cruxes].ux-browse #main-table th:nth-child(6) { width:45% !important; min-width:0 !important; }
body[data-collection-page=cruxes].ux-browse #main-table th:nth-child(7) { width:30% !important; min-width:0 !important; }
body[data-collection-page=cruxes].ux-browse #main-table td { white-space:normal; overflow-wrap:break-word; padding:.55rem .7rem; }
body[data-collection-page=cruxes].ux-browse .crux-sub { display:none; }
body[data-collection-page=cruxes] .ux-view-switch { max-width:1400px; margin:.6rem auto; padding:0 1rem; }
body[data-collection-page=cruxes] .ux-source-meta { font-size:.72rem; color:var(--muted); margin-top:.35rem; }
body[data-collection-page=conflict] details .decision-frame, body[data-collection-page=conflict] details .stats { margin:.6rem 0; }
@media(max-width:700px) {
  .ux-primary-controls { align-items:stretch; }
  .ux-primary-controls .ctrl:first-child { flex-basis:100%; }
  .ux-primary-controls .ctrl { min-width:0; flex:1 1 120px; }
  .ux-primary-controls .ctrl select { max-width:100%; }
  .ux-view-switch span { flex-basis:100%; }
  body[data-collection-page=main] .header-actions { gap:.3rem; }
  body[data-collection-page=main] .header-link { padding:.35rem .55rem; font-size:.76rem; }
  body[data-collection-page=main] .ux-options label { white-space:normal !important; }
  body[data-collection-page=cruxes].ux-browse .table-wrap { overflow:visible; }
  body[data-collection-page=cruxes].ux-browse #main-table thead { display:none; }
  body[data-collection-page=cruxes].ux-browse #main-table, body[data-collection-page=cruxes].ux-browse #table-body, body[data-collection-page=cruxes].ux-browse #table-body tr, body[data-collection-page=cruxes].ux-browse #table-body td { display:block; width:100%; }
  body[data-collection-page=cruxes].ux-browse #table-body tr { border-bottom:1px solid var(--border,#dfe3e8); padding:.4rem 0; }
  body[data-collection-page=cruxes].ux-browse #table-body td { border:0; padding:.35rem .7rem; }
  body[data-collection-page=cruxes].ux-browse #table-body .post-title { font-size:.77rem; }
  body[data-collection-page=cruxes].ux-browse #table-body .crux-question { font-size:.95rem; }
}

body[data-collection-page=cruxes].ux-browse:not(.quickrate) #main-table .rate-col { display:none; }
.ux-primary-controls { flex-direction:row !important; }
@media(max-width:700px) {
  .ux-primary-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.55rem !important; }
  .ux-primary-controls .ctrl:first-child { grid-column:1/-1; }
  .ux-primary-controls .ctrl { width:auto; flex:none; }
  .ux-primary-controls .ctrl select { width:100%; }
  .ux-primary-controls .stats { grid-column:1/-1; justify-content:flex-start; }
}
.ux-more { padding:1rem .5rem; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:.6rem; }
.ux-more span { font-size:.78rem; color:var(--muted,#526174); }
.ux-more button { font:inherit; font-size:.82rem; cursor:pointer; padding:.4rem .7rem; border:1px solid var(--border,#acbcc7); border-radius:.35rem; background:var(--surface,#fff); color:var(--text,#334155); }
.ux-tools { font-size:.8rem; }
.ux-tools > summary { cursor:pointer; padding:.35rem .5rem; border:1px solid var(--border,#cbd5e1); border-radius:.35rem; color:var(--text,#334155); }
.ux-tools > div { display:flex; flex-wrap:wrap; gap:.4rem; padding:.5rem 0; }
body[data-collection-page=cruxes] .header-desc { display:block; }
body[data-collection-page=cruxes] .ux-guide .provenance-bar { position:static; }
body[data-collection-page=legal] .header-inner > div { min-width:0; max-width:100%; }
body[data-collection-page=legal] .card-top, body[data-collection-page=legal] .card-info { min-width:0; }
body[data-collection-page=legal] .card-row2 { flex-wrap:wrap; }
@media(max-width:700px) {
  body[data-collection-page=main] .ux-primary-controls > button { grid-column:2; grid-row:2; white-space:nowrap; }
  body[data-collection-page=main] .ux-primary-controls .ctrl:nth-of-type(2) { grid-column:1; grid-row:2; }
  body[data-collection-page=impact] h1 { font-size:1.8rem; }
}
body[data-collection-page=legal] :is(.papers,.card,.card-brief,.card-title,.card-why-wrap) { min-width:0; max-width:100%; }
body[data-collection-page=legal] .card-title { overflow-wrap:anywhere; }
body[data-collection-page=legal] .tag { white-space:normal; max-width:100%; }
@media(max-width:700px) {
  body[data-collection-page=legal] .tip-text { display:none; position:fixed; left:1rem; right:1rem; bottom:1rem; top:auto; transform:none; width:auto; max-width:none; max-height:45vh; overflow:auto; z-index:1000; }
  body[data-collection-page=legal] :is(.info-tip,.score-wrap):is(:hover,:focus,:focus-within) > .tip-text { display:block; }
}
