/* Extend the existing research layout, filters, menus and responsive tables. */
.database-workspace{min-width:0}
.database-workspace h1{font-size:26px;letter-spacing:-.6px}
.database-source{align-items:center;flex-wrap:wrap;margin-bottom:16px;padding:12px 16px}
.database-source h2{font-size:14px}
.database-source p{margin-top:4px;max-width:760px}
.database-source button{flex-shrink:0}
.database-controls .filter-bar{margin-bottom:8px}
.database-controls .form-field{flex:1 1 150px;min-width:0;margin-bottom:0}
.database-controls .database-search{flex:2 1 220px}
.database-controls .database-page-size{flex:0 1 130px}
.database-controls .form-field label{display:block}
.database-toggles{margin-bottom:16px!important;gap:4px 20px}
.database-toggles button{margin-left:auto}
.database-section-heading{gap:12px;min-width:0}
.database-section-heading>div{min-width:0;overflow-wrap:anywhere}
.database-section-heading h2{font-size:16px}
.database-section-heading p{font-size:12px;line-height:1.5;color:var(--muted);margin-top:4px}
.database-table td{overflow-wrap:anywhere}
.database-table td:last-child button{white-space:nowrap;overflow-wrap:normal}
.database-pagination{padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.database-pagination>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.database-pagination button{font-size:12px}
.database-details-backdrop{position:fixed;inset:0;background:#0005;z-index:79}
.database-details{position:fixed;right:0;top:0;bottom:0;width:min(640px,100%);z-index:80;background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--floating-shadow);display:flex;flex-direction:column;min-width:0;max-height:100dvh;overscroll-behavior:contain}
.database-details:focus{outline:none}
.database-details-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-shrink:0;border-bottom:1px solid var(--line);padding:max(22px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 20px 24px}
.database-details-header>div{min-width:0;overflow-wrap:anywhere}
.database-details-header h2{font-size:22px;letter-spacing:-.4px;margin-top:7px}
.database-details-header p{font-size:13px;color:var(--muted);line-height:1.6;margin-top:7px}
.database-details-header button{flex-shrink:0;min-width:44px;min-height:44px}
.database-details-body{overflow:auto;overscroll-behavior:contain;padding:22px max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) 24px;min-height:0}
.database-outcome{padding:16px;background:var(--surface2);border:1px solid var(--line);border-radius:12px;margin-bottom:20px}
.database-outcome>strong{font-size:16px;line-height:1.5;display:block}
.database-outcome>p{font-size:12px;line-height:1.6;color:var(--muted);margin-top:6px}
.database-detail-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px;margin:0}
.database-outcome .database-detail-facts{margin-top:16px;gap:14px}
.database-detail-facts dt{font-size:11px;color:var(--muted);margin-bottom:5px}
.database-detail-facts dd{font-size:13px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.database-detail-section{margin-top:22px;border-top:1px solid var(--line);padding-top:20px}
.database-detail-section h3{font-size:14px;margin-bottom:12px}
.database-detail-section>p,.database-detail-explanation,.database-raw p{font-size:12px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}
.database-note{white-space:pre-wrap}
.database-milestones,.database-definition-list{padding:0;margin:0;list-style:none}
.database-milestones li{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.database-milestones li:first-child{padding-top:0}.database-milestones li:last-child{border-bottom:0;padding-bottom:0}
.database-milestones li>div{min-width:0;flex:1}
.database-milestones strong{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.database-milestones .pill{font-size:10px;margin-left:7px;vertical-align:middle}
.database-milestones p{font-size:12px;color:var(--muted);line-height:1.6;margin-top:4px;overflow-wrap:anywhere}
.database-milestone-result{text-align:right;font-size:12px;font-weight:600;line-height:1.7;flex:0 0 125px}
.database-milestone-result small{display:block;color:var(--muted);font-size:11px;font-weight:400}
.database-definition-list li{font-size:13px;line-height:1.7;padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.database-detail-explanation{margin-top:24px}
.database-raw{margin-top:20px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.database-raw summary,.database-archived-results summary{cursor:pointer;padding:12px 14px;font-size:12px;font-weight:600;min-height:44px}
.database-archived-results{margin-top:16px}.database-archived-results .database-milestones{padding:0 14px 14px}
.database-raw p{padding:0 14px 12px}
.database-raw pre{margin:0;padding:14px;border-top:1px solid var(--line);background:var(--surface2);font-size:11px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:500px;overflow:auto;max-width:100%}
.database-record-id{font-size:10px;color:var(--muted);overflow-wrap:anywhere;margin-top:20px}
.database-error{margin-bottom:16px}
.database-method{margin-top:16px}
.database-method summary{padding:14px 18px;font-size:13px;font-weight:600;cursor:pointer}
.database-method>div{padding:0 18px 18px;display:grid;gap:12px}
.database-method p{font-size:12px;line-height:1.8;color:var(--muted)}
@media(min-width:761px){.database-table th:last-child,.database-table td:last-child{width:1%;white-space:nowrap}.database-table td:first-child{min-width:150px}}
@media(max-width:760px){.database-toggles button{margin-left:0}.database-controls .form-field input,.database-controls .form-field select{font-size:16px}.database-table td .secondary{font-size:11px}.database-pagination{padding:12px}.database-pagination>div{gap:8px}}
@media(max-width:600px){.database-details{width:100%;border:0}.database-details-header{padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}.database-details-body{padding:16px max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.database-details-header h2{font-size:20px}.database-detail-facts{gap:14px}.database-outcome{padding:14px}.database-milestone-result{flex-basis:100px}.database-milestones{gap:10px}}
