.access-matrix {display:grid;gap:1rem;min-width:0;max-width:100%}
.access-matrix .am-tools,.access-matrix .am-buttons {display:flex;flex-wrap:wrap;align-items:end;gap:.65rem}
.access-matrix label {display:grid;gap:.3rem}
.access-matrix .am-scroll {max-width:100%;max-height:min(70vh,48rem);overflow:auto;isolation:isolate;border:1px solid var(--border,#88919b);border-radius:.5rem;background:var(--surface,#fff)}
.access-matrix .am-scroll:focus-visible,.access-matrix button:focus-visible {outline:3px solid #3574c8;outline-offset:-3px}
.access-matrix table {width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:.925rem}
.access-matrix td,.access-matrix th {padding:.5rem .75rem;text-align:center;vertical-align:middle;border-inline-end:1px solid var(--border,#bbc1c9);border-block-end:1px solid var(--border,#bbc1c9)}
.access-matrix thead {position:sticky;top:0;z-index:3;background:var(--surface,#fff);color:inherit}
.access-matrix th {background:var(--surface,#fff);color:inherit}
.access-matrix .am-person {position:sticky;left:0;z-index:2;width:clamp(8rem,32vw,16rem);max-width:clamp(8rem,32vw,16rem);min-width:8rem;white-space:normal;text-align:left;overflow-wrap:anywhere;box-shadow:2px 0 0 var(--border,#8793a4)}
.access-matrix thead .am-person {z-index:4}
.access-matrix .am-person small {display:block;font-size:.75rem;font-weight:400}
.access-matrix .am-toggle,.access-matrix .am-mark {display:inline-grid;place-items:center;width:2rem;height:2rem;font-weight:700}
.access-matrix .am-toggle {border:1px solid currentColor;border-radius:.35rem;background:transparent;color:inherit;cursor:pointer}
.access-matrix .am-on {color:#075d43;background:#dcf4e9}
.access-matrix .am-review {display:grid;gap:.5rem;padding:1rem;border:1px solid var(--border,#8793a4);border-radius:.5rem}
.access-matrix .am-review form {display:grid;gap:.5rem}
.access-matrix .am-review textarea {width:min(100%,42rem)}
@media(max-width:760px){.access-matrix .am-toggle,.access-matrix .am-buttons button,.access-matrix .am-tools button,.access-matrix .am-tools select,.access-matrix .am-tools input {min-height:44px;min-width:44px}.access-matrix td,.access-matrix th{padding:.35rem .45rem}}
@media(prefers-color-scheme:dark){.access-matrix .am-scroll,.access-matrix thead,.access-matrix th{background:var(--surface,#17202b);color:var(--text,#eef3f8)}.access-matrix .am-on{background:#174537;color:#c2f9df}}

.access-matrix .am-gridset {border:0;min-width:0;margin:0;padding:0}.access-matrix .am-tools form {display:flex;align-items:end;gap:.45rem;flex-wrap:wrap}
.am-dialog {width:min(96vw,90rem);max-width:96vw;max-height:92vh;padding:1rem;overflow:auto;border:1px solid var(--border,#8793a4);border-radius:.65rem;background:var(--surface,#fff);color:var(--text,#19212b)}.am-dialog::backdrop {background:rgba(14,20,28,.6)}.am-dialog-bar {display:flex;justify-content:flex-end;margin-bottom:.6rem}

.access-matrix .am-action-category{display:none}
@media(max-width:760px){.access-matrix .am-action-category{display:block;max-width:9rem;white-space:normal;font-weight:400;font-size:.8rem;margin-bottom:.2rem}.access-matrix thead th{background:var(--surface,#fff)}}

.access-matrix .am-pack-state{display:grid;gap:.1rem}.access-matrix .am-buttons [aria-pressed="true"]{font-weight:700;text-decoration:underline}.am-dialog>[data-am-body],.am-dialog .access-matrix,.am-dialog .am-gridset{min-inline-size:0;max-inline-size:100%}

.am-dialog{box-sizing:border-box;overflow-x:hidden}.am-dialog .access-matrix{grid-template-columns:minmax(0,1fr)}.am-dialog .am-scroll{box-sizing:border-box;width:100%;max-width:100%}.am-dialog button[data-oh-older][hidden]{display:none!important}

.am-dialog.op-scope{padding:clamp(.7rem,2vw,1.5rem);border-radius:.75rem}
.am-dialog .am-dialog-bar{margin:0}.am-dialog .access-matrix header{padding-right:4rem}
.am-dialog .access-matrix header h2,.am-dialog .access-matrix header p,.am-dialog .access-matrix [data-am-status]{margin:0}
.access-matrix .am-person summary{font-weight:400;font-size:.8rem;cursor:pointer;color:var(--op-text-muted,#465972)}
.access-matrix .am-person small{line-height:1.35}
.am-history-link{border:0;background:transparent;padding:.15rem 0;color:var(--op-link,#264b75);font:inherit;font-size:.82rem;text-decoration:underline;cursor:pointer}
.access-matrix .am-buttons [aria-pressed="true"]{background:#193752;color:white;text-decoration:none}
.access-matrix th,.access-matrix td{line-height:1.35}.access-matrix thead th{background:var(--op-surface-muted,#f2f5f8);color:#19212b}
@media(max-width:760px){.am-dialog .am-tools{gap:.5rem}.am-dialog .am-tools form{width:100%}.am-dialog .am-tools form label{flex:1}.am-dialog .am-person summary{padding:.25rem 0}.am-dialog .access-matrix header{padding-right:0}}
