.resource-toolbar{display:grid;grid-template-columns:minmax(180px,2fr) minmax(140px,1fr) minmax(140px,1fr);gap:18px;margin:0 0 26px}.resource-toolbar label{font-size:14px;color:var(--muted)}.resource-toolbar input,.resource-toolbar select{min-height:44px;margin-top:8px;font-size:16px}.resource-total,.resource-status{color:var(--muted);font-size:14px}.resource-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:28px}.resource-layout.has-detail{grid-template-columns:minmax(0,1fr) minmax(340px,460px)}.resource-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:14px}.resource-tile{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 8px;background:transparent;color:var(--text);border:1px solid transparent;border-radius:9px;cursor:pointer;min-width:0;font:inherit}.resource-tile:hover,.resource-tile:focus-visible{background:var(--violet-soft);border-color:var(--blue)}.resource-tile[aria-pressed=true]{border-color:var(--gold)}.resource-tile img{width:58px;height:58px;object-fit:contain}.resource-tile>span{font-size:14px;line-height:1.4;text-align:center;overflow-wrap:anywhere}.resource-tile>small{font-size:12px;color:var(--muted)}.resource-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:26px 0}.resource-pagination button{min-width:48px;min-height:44px;border:1px solid #71697f;border-radius:7px;background:#25222c;color:var(--text);font-size:20px}.resource-pagination button:disabled{opacity:.4;cursor:default}.resource-detail{position:sticky;top:18px;align-self:start;max-height:calc(100vh - 36px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:24px;scrollbar-width:thin}.resource-detail[hidden]{display:none}.resource-detail-head{display:flex;align-items:center;gap:16px;margin-bottom:20px;padding-right:30px}.resource-detail-head>img{width:70px;height:70px;object-fit:contain}.resource-detail-head h2{font-size:24px;line-height:1.2;overflow-wrap:anywhere}.resource-detail-head small{display:block;color:var(--muted);font-size:13px;margin-top:7px}.resource-close{position:absolute;right:12px;top:12px;width:36px;min-height:36px;border:1px solid var(--line);border-radius:6px;background:var(--field);color:var(--text);font-size:23px}.resource-description{font-size:15px;white-space:pre-line;line-height:1.65}.resource-meta{display:grid;grid-template-columns:1fr auto;gap:9px 14px;font-size:14px;margin:18px 0}.resource-meta dt{color:var(--muted)}.resource-meta dd{margin:0;text-align:right;max-width:230px;overflow-wrap:anywhere}.resource-section{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.resource-section h3{font-size:17px;margin:0 0 12px}.resource-links{display:flex;flex-direction:column;gap:8px}.resource-link{display:flex;align-items:center;gap:10px;min-height:44px;color:var(--text);font-size:14px;line-height:1.4}.resource-link:hover{color:var(--blue)}.resource-link img{width:34px;height:34px;object-fit:contain;flex:none}.resource-link strong{margin-left:auto;white-space:nowrap;font-weight:500;color:var(--blue)}.resource-variant{margin-top:16px;border-left:2px solid var(--blue);padding-left:14px}.resource-variant h4{font-size:15px;line-height:1.4;margin:0 0 8px}.resource-chance{display:flex;flex-wrap:wrap;gap:6px 15px;color:var(--muted);font-size:13px;margin:9px 0}.resource-effect{white-space:pre-line;font-size:14px;line-height:1.6}.resource-source-link{display:inline-block;margin-top:20px;color:var(--blue);font-size:14px}.resource-data>summary{margin-top:20px;font-size:14px;color:var(--muted)}.resource-data pre{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:350px;overflow:auto;margin-top:10px}.resource-detail a:focus-visible,.resource-pagination button:focus-visible,.resource-close:focus-visible{outline:2px solid var(--blue);outline-offset:3px}.resource-relations-note{font-size:13px;color:var(--muted)}
@media(max-width:1000px){.resource-layout.has-detail{grid-template-columns:minmax(0,1fr) minmax(300px,390px)}.resource-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}}@media(max-width:760px){.resource-toolbar{grid-template-columns:1fr 1fr;gap:12px}.resource-toolbar>label:first-child{grid-column:1/-1}.resource-layout.has-detail{display:flex;flex-direction:column}.resource-detail{position:relative;max-height:none;order:-1;width:100%;padding:20px}.resource-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}.resource-tile{padding:12px 5px}.resource-tile>span{font-size:13px}.resource-tile img{width:52px;height:52px}.resource-detail-head h2{font-size:22px}.resource-total{display:block;margin-top:10px}}

/* Category disclosures replace a flat wall of names. */
body[data-resource-page] #resource-list.resource-group-list{display:block;max-height:none;overflow:visible;padding:0}
body[data-resource-page] .has-detail #resource-list.resource-group-list{max-height:calc(100dvh - 140px);overflow:auto;padding-right:5px}
.resource-group{border:1px solid var(--line);border-radius:9px;background:var(--surface);margin:0 0 9px;padding:0;min-width:0}
.resource-group>summary{display:flex;align-items:center;gap:9px;list-style:none;font-size:16px;min-height:46px;padding:10px 12px;cursor:pointer}
.resource-group>summary::before{content:'›';font-size:21px;line-height:1;color:var(--blue)}
.resource-group[open]>summary::before{transform:rotate(90deg)}
.resource-group>summary::-webkit-details-marker{display:none}
.resource-group>summary>strong{font-weight:700;flex:1;min-width:0;overflow-wrap:anywhere}
.resource-group>summary>span:last-child{color:var(--muted);font-size:13px;font-weight:600}
.resource-group-rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:5px;padding:0 7px 8px;min-width:0}
body[data-resource-page] .resource-group-rows .resource-tile{background:transparent!important;box-shadow:none!important;border-color:transparent!important;min-width:0}
body[data-resource-page] .resource-group-rows .resource-tile:hover,body[data-resource-page] .resource-group-rows .resource-tile[aria-pressed=true]{background:var(--accent-soft)!important;border-color:var(--blue)!important}
.has-detail .resource-group-rows{grid-template-columns:minmax(0,1fr)}
.resource-more{display:block;margin:0 9px 9px;padding:6px 10px;font-size:13px;background:var(--field);border:1px solid var(--line);border-radius:6px;color:var(--text)}
@media(max-width:760px){body[data-resource-page] .has-detail #resource-list.resource-group-list{max-height:none;overflow:visible}.resource-group-rows{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}}

body[data-resource-page] .resource-group-rows .resource-tile{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:4px 10px;padding:8px;text-align:left}
body[data-resource-page] .resource-group-rows .resource-tile>img,body[data-resource-page] .resource-group-rows .resource-tile>.source-icon{width:34px!important;height:34px!important}
body[data-resource-page] .resource-group-rows .resource-tile>span:not(.source-icon){font-size:15px;font-weight:650;text-align:left;line-height:1.35}
body[data-resource-page] .resource-group-rows .resource-tile>small{grid-column:2;font-size:12px;text-align:left}
/* Compact columns of categories; each category still opens independently. */
body[data-resource-page] #resource-list.resource-group-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:10px;align-items:start}
body[data-resource-page] #resource-list>.resource-group{margin:0;min-width:0}
body[data-resource-page] .has-detail #resource-list.resource-group-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
body[data-resource-page] .resource-group-rows{grid-template-columns:minmax(0,1fr)}
.resource-hero-link{margin-top:12px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--field)}
.resource-hero-link>span{flex:1;min-width:0}.resource-hero-link small{display:block;font-size:12px;line-height:1.4;font-weight:600;color:var(--muted)}
.resource-hero-link>strong{font-size:18px;text-align:right;white-space:nowrap}.resource-hero-link>strong small{font-size:11px}
