body.interactive-matrix-page { margin:0; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.6; }
.interactive-matrix-page * { box-sizing:border-box; }
.interactive-matrix-page [hidden] { display:none !important; }
.interactive-matrix-page #main-content { width:min(1480px,calc(100% - 40px)); margin:0 auto; padding:40px 0 64px; min-width:0; }
.interactive-matrix-page a { color:var(--accent); text-underline-offset:3px; }
.interactive-matrix-page :is(a,button,input,select,summary,[tabindex]):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.im-hero { border:1px solid var(--line); border-radius:18px; padding:clamp(24px,4vw,48px); background:linear-gradient(130deg,var(--panel),var(--bg-elevated)); }
.im-eyebrow { color:var(--muted); font-size:.8rem; font-weight:750; letter-spacing:.15em; text-transform:uppercase; }
.im-hero h1 { max-width:1000px; font-size:clamp(2rem,4vw,3.7rem); line-height:1.08; letter-spacing:-.04em; margin:12px 0 20px; }
.im-lead { max-width:980px; font-size:1.08rem; }
.im-metrics,.im-related { display:flex; flex-wrap:wrap; gap:12px 22px; }
.im-metrics { margin-top:24px; }
.im-metrics span { padding:9px 15px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.im-related { margin:22px 0; }
.im-views { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 12px; }
.im-views a,.im-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 16px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--text); text-decoration:none; font:inherit; cursor:pointer; }
.im-views a[aria-current],.im-views a:hover,.im-button:hover { border-color:var(--accent); background:var(--surface-hover); }
.im-views a[aria-current] { box-shadow:inset 0 -3px var(--accent); font-weight:700; }
.im-scope,.im-method { padding:18px 22px; border-left:3px solid var(--accent); background:var(--panel); }
.im-controls { margin:20px 0; padding:22px; background:var(--panel); border:1px solid var(--line); border-radius:12px; }
.im-filter-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.im-controls label { display:flex; flex-direction:column; gap:6px; font-size:.9rem; font-weight:650; min-width:0; }
.im-controls .im-query { grid-column:span 2; }
.im-more-filters { margin-top:14px; }
.im-more-filters > summary { min-height:44px; padding:8px 0; cursor:pointer; font-weight:650; }
.im-controls input[type=search],.im-controls select { width:100%; min-width:0; min-height:46px; padding:10px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--text); font:inherit; }
.im-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-top:18px; }
.im-actions label { flex-direction:row; align-items:center; min-height:44px; }
.im-actions input { width:20px; height:20px; accent-color:var(--accent); }
.im-result-count { font-weight:650; }
.im-framework { min-width:0; margin:30px 0; }
.im-framework,#matrix-results,#matrix { scroll-margin-top:90px; }
.im-framework h3 { font-size:1.25rem; }
.im-framework h3 small { display:block; font-size:.84rem; font-weight:450; color:var(--muted); }
.im-board { display:flex; align-items:flex-start; gap:10px; max-width:100%; max-height:72vh; overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); border-radius:12px; padding:12px; background:var(--bg-elevated); scrollbar-gutter:stable; }
.im-column { flex:0 0 230px; min-width:0; }
.im-column h4 { position:sticky; top:-12px; z-index:2; margin:0 0 12px; padding:12px; border-bottom:3px solid var(--accent); background:var(--panel); font-size:.94rem; }
.im-column h4 small { display:block; font-size:.73rem; font-weight:400; color:var(--muted); }
.im-family { margin-bottom:12px; }
.im-cell { border:1px solid var(--line); border-radius:7px; background:var(--panel); overflow:hidden; }
.im-technique { display:flex; flex-direction:column; gap:3px; padding:12px; min-height:64px; color:var(--text) !important; text-decoration:none; font-size:.86rem; font-weight:650; overflow-wrap:anywhere; }
.im-technique:hover { background:var(--surface-hover); text-decoration:underline; }
.im-id { color:var(--accent); font:600 .75rem ui-monospace,SFMono-Regular,Consolas,monospace; }
.im-cell-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 8px; padding:0 12px 10px; font-size:.67rem; }
.im-cell-meta a { padding:2px 0; }
.im-status { color:var(--muted); }
.im-status-can_simulate { color:var(--text); font-weight:650; }
.im-status-can_simulate::before { content:'◉ '; color:var(--accent); }
.im-children { padding-left:10px; margin-left:6px; border-left:2px solid var(--line); }
.im-children summary { cursor:pointer; font-size:.77rem; padding:11px 2px; color:var(--muted); }
.im-children .im-cell { margin-bottom:6px; }
.im-context { border-style:dashed; }
.im-no-matches { color:var(--muted); font-size:.85rem; padding:8px; }
.im-empty { padding:30px; border:1px dashed var(--line); border-radius:10px; }
.im-layout-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); max-height:none; }
.im-layout-list .im-column h4 { position:static; }
.im-method { margin:28px 0; overflow-wrap:anywhere; }
.im-method h2,.im-detail h2 { font-size:1.4rem; }
.im-method li { margin:10px 0; }
.im-detail { max-width:980px; margin:24px auto; padding:24px; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow-wrap:anywhere; }
.im-detail p { white-space:normal; }
.im-detail li { margin:10px 0; }
.im-tags { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.im-tags a,.im-tags span { padding:6px 10px; border:1px solid var(--line); border-radius:7px; font-size:.84rem; }
@media(max-width:760px) {
  .interactive-matrix-page #main-content { width:calc(100% - 24px); padding-top:22px; }
  .im-filter-grid { grid-template-columns:1fr; }
  .im-controls .im-query { grid-column:auto; }
  .im-controls { padding:16px; }
  .im-column { flex-basis:220px; }
  .im-metrics { gap:8px; }
  .im-metrics span { font-size:.86rem; }
}
@media(prefers-reduced-motion:reduce) { .interactive-matrix-page * { scroll-behavior:auto !important; } }
