.research-wide { position:relative; width:min(96vw,1500px); left:50%; transform:translateX(-50%); margin:2rem 0; color:#172b3b; }
.research-wide *, .research-dialog * { box-sizing:border-box; }
.research-wide button,.research-wide select,.research-wide input,.research-dialog button { font:inherit; }
.research-wide button,.research-dialog button { cursor:pointer; }
.research-wide button:focus-visible,.research-wide select:focus-visible,.research-wide input:focus-visible,.research-dialog button:focus-visible { outline:3px solid #9d7418; outline-offset:3px; }
.research-controls { display:flex; gap:1rem; flex-wrap:wrap; align-items:end; padding:1rem 1.25rem; background:#f1eee6; border:1px solid #dad4c7; border-radius:5px; }
.research-controls label { display:flex; flex-direction:column; gap:.3rem; margin:0; font-size:.9rem; font-weight:600; }
.research-controls label.check { flex-direction:row; align-items:center; align-self:center; }
.research-controls select,.research-controls input[type=search] { padding:.45rem; max-width:100%; border:1px solid #bdb7a9; background:#fff; color:#172b3b; border-radius:3px; }
.research-controls input[type=range] { width:180px; accent-color:#956d0a; }
.research-button { border:1px solid #a4997d; background:white; padding:.45rem .8rem; border-radius:3px; color:#172b3b; }
.research-button.primary { background:#172f48; color:white; border-color:#172f48; }
.research-stats { display:flex; flex-wrap:wrap; gap:1.5rem; margin:1.2rem 0; font-size:.95rem; }
.research-stats strong { font-size:1.4rem; color:#172f48; padding-right:.3rem; }
.research-note { color:#5a6061; font-size:.9rem!important; line-height:1.5!important; }
.research-legend { display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; margin:1rem 0; font-size:.85rem; }
.research-legend span::before { content:''; display:inline-block; width:15px; height:12px; background:var(--key,#eee); border:1px solid #8f9699; margin-right:.4rem; vertical-align:middle; }
.research-layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr); gap:1.25rem; }
.research-panel { border:1px solid #d7d8d5; border-radius:4px; background:#fff; padding:1.25rem; min-width:0; }
.research-panel h3 { margin-top:0!important; }
.research-detail { max-height:900px; overflow:auto; }
.research-detail dl { display:grid; grid-template-columns:minmax(90px,1fr) 2fr; gap:.4rem .7rem; font-size:.9rem; }
.research-detail dt { font-weight:600; }
.research-detail dd { margin:0; overflow-wrap:anywhere; }
.research-thumbs { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:.7rem; margin:1rem 0; }
.research-thumbs img { width:100%; height:120px; object-fit:contain; background:#f0efea; }
.research-thumbs button { border:1px solid #c9c4b7; padding:.4rem; background:white; text-align:left; color:#172b3b; }
.research-thumbs small { display:block; margin-top:.3rem; }
.appearance-map { width:100%; aspect-ratio:2/1; display:block; background:#e9f0f2; border:1px solid #d5dfe0; }
.appearance-map .country { fill:#e2dfd5; stroke:#fff; stroke-width:.5; }
.appearance-map .map-point { fill:#a37811; stroke:#fff; stroke-width:1.8; cursor:pointer; }
.appearance-map .map-point.selected { fill:#173a58; stroke:#a37811; stroke-width:3; }
.appearance-map .map-point:hover { fill:#173a58; }
.map-tools { display:flex; flex-wrap:wrap; gap:.5rem; margin:.7rem 0; }
.appearance-timeline { width:100%; height:120px; display:block; background:#faf9f5; margin:.8rem 0; border-bottom:1px solid #d3cbb8; }
.appearance-timeline .event-dot { fill:#a37811; stroke:#fff; cursor:pointer; }
.appearance-timeline .event-dot.acquisition { fill:#284d6d; }
.appearance-timeline .event-dot.selected { stroke:#101e2d; stroke-width:3; }
.event-list { max-height:390px; overflow:auto; display:grid; gap:.5rem; }
.event-row { display:block; width:100%; background:#fff; border:1px solid #dfdcd2; border-left:4px solid #b18b31; border-radius:3px; text-align:left; padding:.75rem; color:#172b3b; }
.event-row.acquisition { border-left-color:#284d6d; }
.event-row.selected { background:#edf3f7; border-color:#284d6d; }
.event-row strong,.event-row small { display:block; }
.event-row small { color:#62686a; margin-top:.2rem; }
.slot-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.65rem; max-height:950px; overflow:auto; padding:3px; }
.slot-card { text-align:left; border:1px solid #c5c8c6; border-top:5px solid #b39551; padding:.75rem; border-radius:3px; background:#faf8f1; color:#24323b; min-height:145px; }
.slot-card strong,.slot-card small { display:block; }
.slot-card small { margin-top:.4rem; font-size:.8rem; }
.slot-card.photographed { border-top-color:#1a516e; background:#edf4f6; }
.slot-card.gap { border-top-color:#b4b6b3; background:repeating-linear-gradient(135deg,#f4f4f0,#f4f4f0 7px,#e9e9e4 7px,#e9e9e4 9px); }
.slot-card.conflict { border-top-color:#965044; background:#f8eeea; }
.slot-card.selected { outline:3px solid #172f48; outline-offset:-2px; }
.slot-card img { height:75px; width:100%; object-fit:contain; margin:.5rem 0; }
.evidence-issue { background:#f8eeea; border-left:4px solid #965044; padding:.7rem; font-size:.9rem; }
.sura-overview { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:.5rem; max-height:370px; overflow:auto; margin:1rem 0; padding:3px; }
.sura-card { padding:.6rem; text-align:left; border:1px solid #d0d2cd; background:#fff; color:#172b3b; border-radius:3px; }
.sura-card.selected { outline:2px solid #1d506c; }
.sura-card small { display:block; color:#686d6b; margin:.25rem 0; }
.coverage-strip { display:flex; height:9px; background:#e7e7e2; }
.coverage-strip i { flex:1; min-width:0; }
.coverage-key-photo,.coverage-strip .photo { background:#c6dce6; }
.coverage-strip .partial { background:#e2d4a9; }
.coverage-strip .record { background:#c6c9c6; }
.coverage-strip .disputed { background:#d9b7ae; }
.verse-list { display:grid; gap:.6rem; }
.verse-row { border:1px solid #e0e0d9; border-radius:4px; padding:1rem 1.2rem; background:#fff; }
.verse-row.photo { background:#eaf3f7; border-left:5px solid #285774; }
.verse-row.partial { background:#faf4e2; border-left:5px dashed #aa8731; }
.verse-row.record { background:#f3f3ef; border-left:5px solid #9a9e96; }
.verse-row.disputed { border-right:5px solid #a05b4d; }
.verse-row.endpoint { border-top-style:dashed; border-bottom-style:dashed; }
.verse-arabic { direction:rtl; text-align:right; font-family:'Traditional Arabic','Amiri','Noto Naskh Arabic',serif; font-size:1.65rem!important; line-height:2.15!important; margin:.4rem 0!important; letter-spacing:0!important; }
.verse-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.5rem; font-size:.85rem; color:#555f63; }
.verse-evidence { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.6rem; }
.verse-evidence button { background:white; border:1px solid #8ca2a9; border-radius:3px; color:#234456; padding:.3rem .55rem; font-size:.85rem; }
.verse-evidence button:hover { background:#173a58; color:white; }
.research-dialog { width:min(1300px,96vw); max-width:96vw; max-height:92vh; border:1px solid #a5a89e; border-radius:5px; padding:1.5rem; color:#172b3b; background:#fff; }
.research-dialog::backdrop { background:rgba(10,24,37,.78); }
.research-dialog .dialog-close { float:right; margin:0 0 1rem 1rem; }
.research-dialog .dialog-images { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(350px,100%),1fr)); gap:1rem; }
.research-dialog figure { margin:0; padding:.5rem; background:#f4f3ed; }
.research-dialog figure img { width:100%; max-height:65vh; object-fit:contain; }
.research-dialog figcaption { font-size:.85rem; padding:.5rem; }
@media(max-width:800px) { .research-layout { grid-template-columns:1fr; } .research-controls { padding:.8rem; } .research-controls label { max-width:100%; } .research-controls input[type=range] { width:145px; } .research-detail { max-height:none; } .research-wide { width:96vw; } .slot-grid { max-height:500px; } .appearance-map { min-height:230px; } .verse-row { padding:.7rem; } }

.slot-grid { grid-auto-rows:max-content; align-content:start; }
.slot-card { display:flex; flex-direction:column; align-items:stretch; gap:.35rem; min-height:225px; }
.slot-card small { margin-top:0; }
.slot-card img { flex:0 0 75px; margin:.2rem 0; }
.appearance-map { touch-action:none; cursor:grab; }
.appearance-map:active { cursor:grabbing; }
.appearance-map .map-point.acquisition { fill:#284d6d; }
.appearance-map .map-point.selected { fill:#173a58; }
.verse-row.photo,.verse-row.partial { cursor:pointer; }

/* Keep the numerical audit readable without widening the prose column. */
#research-app details.research-panel { margin: 1rem 0; overflow-x: auto; }
#research-app details.research-panel summary { cursor: pointer; font-weight: 600; }
#research-app details.research-panel table { width: 100%; border-collapse: collapse; font-size: .9rem; }
#research-app details.research-panel th, #research-app details.research-panel td { text-align: left; padding: .6rem; border-bottom: 1px solid #ddd9ce; vertical-align: top; }
