/* Raza Query workbench: shared materials, compact tools, inspectable evidence. */
body:not([data-current-page=home]){background:#171614;color:var(--charcoal)}
#site-nav{gap:.4rem;flex-wrap:wrap;width:fit-content;max-width:100%;position:relative;border-top:1px solid transparent}
#site-nav::before{content:'';position:absolute;top:-1px;left:0;height:1px;width:var(--navigation-width,100%);background:#3f362c}
#site-nav a{color:#d9cdb7;padding:.6rem .85rem;background:#191917d9;border:1px solid #766b554d;font-size:.8rem;letter-spacing:.03em}
#site-nav a[aria-current=page]{color:#f4efe4;border-bottom:2px solid #c58a47;background:#356e6d33}
body:not([data-current-page=home]) main{padding:0 2rem;max-width:92rem}
body:not([data-current-page=home]) .site-footer{color:#c8bca7;border-color:#51493d;padding:1.5rem 0}
body:not([data-current-page=home]) .site-footer a{color:#c8bca7}
:is(.query-workbench,.content-page){background:#f4efe4;border:1px solid #d2c4aa;padding:1.5rem 1.7rem 2rem!important;margin:1rem 0 2rem;box-shadow:0 16px 40px #0002;--rule:#cfc3af}
:is(.query-workbench,.content-page) :is(h1,h2,h3){font-family:Spectral,Georgia,serif;font-weight:500;letter-spacing:0}
:is(.query-workbench,.content-page) h1{font-size:2rem;margin:.2rem 0 .35rem}
.query-workbench h2{font-size:1.5rem;margin:.4rem 0 .6rem}
.query-workbench h3{font-size:1.2rem;margin:.6rem 0}
.query-page-heading{max-width:none;margin-bottom:0;position:relative;border-bottom:1px solid var(--rule);padding-bottom:1rem}
.query-page-heading p{margin:.3rem 0;font-size:.87rem;line-height:1.6}
.query-page-heading .eyebrow{color:#776c5a;font-size:.67rem;letter-spacing:.14em;text-transform:uppercase}
.query-page-heading #release{color:#716858;font-size:.72rem;overflow-wrap:anywhere}
.query-workbench button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;color:#39382f;background:#fffcf5;border:1px solid #c9baa2;border-radius:3px;padding:.5rem .65rem;font-size:.8rem;line-height:1.4;margin:.2rem .15rem .2rem 0;box-shadow:none}
.query-workbench button:hover:not(:disabled){border-color:#356e6d;background:#e8ede6}
.query-workbench button:disabled{opacity:.48}
.query-workbench :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #b47732;outline-offset:3px}
.query-workbench :is(input:not([type=checkbox]),select,textarea){background:#fffdf7;color:#33362f;border:1px solid #bfb39e;border-radius:3px;font:400 .84rem/1.5 Inter,sans-serif;max-width:100%;padding:.5rem .6rem}
.query-workbench label{font-size:.84rem;line-height:1.5}
.query-workbench input[type=checkbox]{accent-color:#356e6d;flex-shrink:0}
.query-workbench small{font-size:.75rem;line-height:1.55;color:#726858}
.query-tool-icon{display:inline-flex;width:1.1rem;height:1.1rem;flex-shrink:0;color:inherit;vertical-align:middle}
.query-tool-icon svg{width:100%;height:100%}
.query-entry-routes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;margin:1rem 0}
.query-entry-routes button{display:grid;grid-template-columns:1.4rem 1fr;justify-content:start;text-align:left;margin:0;padding:.7rem .8rem;font-weight:600;background:#eae4d8;gap:.2rem .5rem}
.query-entry-routes small{grid-column:2;font-weight:400;margin:0;color:inherit;opacity:.8}
.query-entry-routes button[aria-pressed=true],.query-entry-routes button[aria-pressed=true]:hover:not(:disabled){background:#356e6d;color:#fffaf0;border-color:#356e6d}
.question-toolbar{display:flex;flex-wrap:wrap;gap:.25rem;padding:.3rem 0 .8rem;margin:0;border-bottom:1px solid var(--rule)}
.query-section{border:0;border-top:1px solid var(--rule);padding:1rem 0 .6rem;margin:.8rem 0;min-width:0}
.query-section legend{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;font:600 .88rem/1.5 Inter,sans-serif;padding:0 .5rem 0 0;color:#45453a}
.query-section legend .query-context-marker{font-weight:400;font-size:.75rem}
.query-shapes-section{border:0;margin:.8rem 0 1.2rem;padding:.5rem 0}
.shape-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}
.shape-cards button{display:grid;grid-template-columns:1.3rem 1fr;align-content:start;text-align:left;justify-content:start;gap:.35rem .55rem;padding:.8rem;margin:0;font-weight:600;background:#fcf9f1;min-height:7rem}
.shape-cards button small{grid-column:2;font:400 .88rem/1.45 Spectral,Georgia,serif;color:#736957;margin:0}
.shape-cards button.selected{color:#356e6d;background:#e5ebe2;border-color:#356e6d}
.chosen-query-shape{display:flex;align-items:center;gap:.65rem;padding:.5rem .75rem;background:#e8ede4;border:1px solid #b4c5b6;border-radius:3px}
.chosen-query-shape strong{font-size:.87rem;color:#356e6d}
.chosen-query-shape button{margin-left:auto;flex-shrink:0}
.chosen-query-shape+.shape-cards{margin-top:.7rem}
.question-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:1.5rem;align-items:start}
.question-controls{min-width:0}
.question-workspace select{width:100%;display:block;margin:.35rem 0 .6rem}
.question-workspace p{font-size:.84rem;line-height:1.6}
.route-picker{background:#ebe6d9;border:1px solid #d8cbb5;border-left:2px solid #9a8f7d;padding:.8rem;margin:.7rem 0;border-radius:3px}
.route-picker p:first-child{font-weight:500;margin:0 0 .3rem}
.route-picker small{display:block}
.route-picker label{display:block;margin:.6rem 0 0}
.query-path-strip{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;margin:.6rem 0 .8rem;font-size:.78rem}
.query-context-marker{display:inline-flex;align-items:center;gap:.4rem;line-height:1.35}
.query-medallion{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.8rem;height:1.8rem;border:1px solid var(--entity-rim,#9a8f7d);border-radius:50%;background:radial-gradient(circle at 35% 20%,#ffffff29,transparent 60%),url('assets/raza/material-grain-v1.png'),var(--entity-colour,#9a8f7d);background-size:cover;background-blend-mode:normal,soft-light,normal;box-shadow:inset 0 0 0 2px #ffffff18,0 1px 3px #30251b22}
.query-medallion img{width:1.2rem;height:1.2rem;filter:invert(1);opacity:.94}
.query-path-arrow{color:#686757;font:400 .82rem/1.4 Spectral,Georgia,serif}
.query-facet-label{color:#776c5a;border-bottom:1px solid #bfb39e}
.category-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem .5rem;max-height:15rem;overflow:auto;margin:.65rem 0;padding:.15rem .2rem .15rem 0}
.category-choices .check{display:flex;align-items:flex-start;gap:.4rem;padding:.3rem;background:#fffaf066;border:0;border-radius:2px}
.query-workbench .check{gap:.45rem}
.preservation-suggestion .query-medallion{width:1.35rem;height:1.35rem}
.preservation-suggestion .query-medallion img{width:.95rem;height:.95rem}
.question-preview{position:sticky;top:1rem;min-width:0;padding:1.15rem;background:#fcfaf3;border:1px solid #cbbda6;border-top:3px solid #356e6d;border-radius:3px;box-shadow:0 3px 12px #51412a0a}
.query-preview-heading{display:flex;align-items:center;gap:.65rem;padding-bottom:.8rem;border-bottom:1px solid var(--rule);font:500 1.1rem/1.4 Spectral,Georgia,serif;color:#356e6d}
.query-preview-heading .query-medallion{width:2.1rem;height:2.1rem}
.query-preview-heading .query-context-marker>span:last-child{font-size:.87rem}
.pattern-example{font-size:.75rem;margin:.8rem 0}
.question-preview .question-sentence{font:400 1.1rem/1.6 Spectral,Georgia,serif;margin:.4rem 0 1rem;color:#333b35}
.question-blanks{display:flex;flex-wrap:wrap;gap:.3rem;margin:.7rem 0}
.question-blanks button{font-size:.72rem;padding:.3rem .45rem;background:#eef0e7;border-color:#c4ccbb}
.query-workbench table{width:100%;border-collapse:collapse;font-size:.79rem;background:#fffdf7}
.query-workbench th{background:#e9e4d7;color:#464a3e;font-weight:600;text-align:left;padding:.6rem;border:1px solid #c9bca6;vertical-align:top}
.query-workbench td{padding:.6rem;border:1px solid #ddd2bf;vertical-align:top;overflow-wrap:anywhere}
.query-workbench th small{display:block;font-weight:400;margin-top:.35rem;font-size:.7rem}
.query-workbench table a{color:#356e6d}
.question-preview>details:not(.pattern-example){margin-top:1rem;padding-top:.8rem;border-top:1px solid var(--rule)}
.execution,.query-results{padding:1.25rem 0 0;margin-top:1.6rem;border-top:1px solid var(--rule)}
.execution>p{font-size:.84rem;line-height:1.6;max-width:75rem}
.execution details,.query-results>details{padding:.7rem .85rem;background:#eae4d8;border:1px solid #d0c3ae;border-radius:3px}
.query-workbench summary{cursor:pointer;font-size:.84rem;line-height:1.5}
.query-workbench .execution textarea{display:block;width:100%;box-sizing:border-box;min-height:18rem;margin-top:.8rem;font:400 .82rem/1.7 'IBM Plex Mono',monospace;resize:vertical;padding:1rem;background:#fcfaf4}
.execution-controls{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}
.query-workbench #run{background:#8c5a3c;color:#fffaf0;border-color:#8c5a3c;padding:.65rem 1rem}
.query-workbench #run:hover:not(:disabled){background:#754a31}
#status{font-size:.78rem;line-height:1.6;padding:.45rem .65rem;margin:0;color:#776c5a}
#status[data-state=running]{border-left:2px solid #c58a47;background:#f2e6cd}
#status[data-state=complete]{border-left:2px solid #6b7f6e;background:#e6ece1}
#status[data-state=failed]{border-left:2px solid #a26868;background:#f2e3dd}
.result-actions{display:flex;flex-wrap:wrap;gap:.3rem;margin:.6rem 0}
.query-results>p{font-size:.8rem;line-height:1.6;color:#716858}
.query-results #explore-results{border-color:#356e6d;color:#356e6d}
.query-results #results{overflow:auto;margin-top:1rem}
.query-workbench pre{font:400 .8rem/1.6 'IBM Plex Mono',monospace;overflow:auto;max-height:20rem;white-space:pre-wrap;overflow-wrap:anywhere}
.result-drilldown{font-size:.7rem!important;padding:.25rem .4rem!important}
.thesis-context{background:#fcfaf3;border:1px solid #d4c6af;border-left:3px solid #356e6d;padding:1rem;margin:1rem 0;font-size:.83rem;line-height:1.6}
.thesis-context h3{margin-top:0}
.thesis-context a{color:#356e6d}
.bank-layout{display:grid;grid-template-columns:15rem minmax(0,1fr);gap:1.5rem;margin:1rem 0}
.bank-navigation{align-self:start;position:sticky;top:1rem;background:#eae4d8;border:1px solid #d0c3ae;border-radius:3px;padding:1rem}
.bank-navigation h3{margin:0 0 .7rem}
.bank-navigation label{display:block;font-size:.75rem;margin:.8rem 0}
.bank-navigation :is(input,select){display:block;width:100%;box-sizing:border-box;margin:.35rem 0}
.bank-navigation nav{border-top:1px solid #c9baa2;padding-top:.7rem;margin-top:1rem;display:flex;flex-direction:column;gap:.15rem}
.bank-navigation nav button{font-size:.75rem;display:block;text-align:left;border:0;background:transparent;padding:.4rem .25rem;margin:0}
.bank-section{scroll-margin-top:1rem;margin:0 0 1.7rem}
.bank-section>h3{color:#356e6d;border-bottom:1px solid var(--rule);padding-bottom:.6rem}
.bank-table{border:1px solid #d0c3ae;background:#fcfaf3;border-radius:3px;padding:.7rem .85rem;margin:.5rem 0}
.bank-table>summary{font-weight:500;color:#3d4037}
.bank-table[open]>summary{color:#356e6d;padding-bottom:.6rem}
.bank-table p{font-size:.81rem;line-height:1.6}
.bank-table article{padding:.6rem 0;border-top:1px solid var(--rule)}
.bank-table h4{font:600 .8rem/1.5 Inter,sans-serif;margin:.4rem 0}
.bank-table small{display:block;margin:.4rem 0}
.bank-table article>a{display:inline-block;font-size:.75rem;margin:.5rem 0;color:#356e6d}
.query-workbench [hidden]{display:none!important}
@media(max-width:1050px){.question-workspace{grid-template-columns:1fr}.question-preview{position:static}.shape-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.bank-layout{grid-template-columns:12rem minmax(0,1fr)}}
@media(max-width:650px){body:not([data-current-page=home]) main{padding:0 .6rem}#site-nav a{padding:.5rem .6rem;font-size:.72rem}:is(.query-workbench,.content-page){padding:1rem .8rem!important}.query-entry-routes{grid-template-columns:1fr;gap:.35rem}.query-entry-routes button{padding:.55rem .65rem}.query-entry-routes small{font-size:.7rem}.shape-cards{grid-template-columns:1fr}.shape-cards button{min-height:0}.chosen-query-shape{flex-wrap:wrap}.chosen-query-shape button{margin-left:0}.bank-layout{grid-template-columns:1fr;gap:.8rem}.bank-navigation{position:static}.bank-navigation nav{max-height:10rem;overflow:auto}.category-choices{grid-template-columns:1fr}.question-preview{padding:.85rem}.question-preview table{display:block;overflow:auto}.execution-controls{align-items:flex-start}:is(.query-workbench,.content-page) h1{font-size:1.75rem}.query-preview-heading{flex-wrap:wrap}.result-actions button{max-width:100%;text-align:left}.query-workbench #status{width:100%;box-sizing:border-box}}
@media(prefers-reduced-motion:reduce){.query-workbench *{scroll-behavior:auto}}

.query-entry-routes button[aria-pressed=true]:after{content:"✓ Selected";grid-column:2;font-size:.65rem;font-weight:400;opacity:.85}
.query-workbench .numeric{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.query-workbench .table-scroll{max-width:100%;overflow:auto}

.query-workbench .result-drilldown{display:flex;white-space:normal;text-align:left;justify-content:flex-start;margin:.25rem 0}

.query-workbench #result-draft-status{border-left:3px solid #c58a47;background:#f2e6cd;color:#59452e;padding:.7rem .85rem;font-size:.86rem}
.query-workbench #result-identity{font:500 1.05rem/1.5 Spectral,Georgia,serif;color:#356e6d}
.query-workbench #execution-hint{width:100%;font-size:.82rem;line-height:1.6;max-width:65rem;color:#655b4b}
.query-workbench #running-query{border-left:3px solid #c58a47;margin:.8rem 0}
.query-workbench #running-query p{font-size:.85rem;line-height:1.6}

body:not([data-current-page=home]) #site-notice:not(:empty){background:#f4efe4;color:#334238;border-left:3px solid #356e6d;padding:.75rem 1rem;margin:1rem 0;font-size:.88rem;line-height:1.6}
#site-notice:empty{display:none}

/* Type branches share one identity even when displayed below several parents. */
.type-hierarchy-choices .type-choice-row{padding:.35rem .25rem;border-bottom:1px solid #d8d4c9}
.type-hierarchy-choices .type-choice-row small{display:block;margin:.15rem 0 .2rem 1.8rem;font-size:.8rem;line-height:1.4;color:#4e5956}
.type-hierarchy-choices .type-subtypes{margin:.2rem 0 .6rem 1rem;padding-left:.7rem;border-left:2px solid #a8bfba}
.type-hierarchy-choices summary,.type-match-definition summary{cursor:pointer;padding:.4rem;font-size:.875rem}
.type-match-definition{margin:.5rem 0;overflow-wrap:anywhere}
.type-hierarchy-choices{max-height:28rem;overflow:auto}

.category-choices.type-hierarchy-choices{display:block}

.query-entry-routes button:disabled{opacity:1;background:#e4e1dc;color:#716e68;border-color:#cbc7bf;cursor:not-allowed}
.query-entry-routes button:disabled strong{grid-column:2;font-size:.7rem;font-weight:600}
