/* Dossier part: the record page (a full-screen overlay), the lightbox, the themes view, alerts.
   Shell variables only, so every design profile restyles it. */
html.dsr-open { overflow: hidden; }
.dsr-page { position: fixed; inset: 0; z-index: 15; background: var(--bg); color: var(--text); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(24px + var(--sab, 0px)); }
/* : the page stops on the top edge of the tab bar, so the bar stays visible and tappable under it */
html:not(.tabbar-off) .dsr-page { bottom: calc(var(--tabbar, 60px) + var(--sab, 0px)); bottom: var(--tabbar-h, calc(var(--tabbar, 60px) + var(--sab, 0px))); padding-bottom: 24px; }
.dsr-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: var(--sat, 0px) 8px 0;
  background: var(--bar-bg, var(--accent)); color: var(--bar-ink, var(--on-accent)); }
.dsr-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px 0 4px; border: 0; border-radius: var(--radius-btn, 10px);
  background: transparent; color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
.dsr-back svg { width: 22px; height: 22px; }
/* : the page's Refresh (bar.refresh), the same round button as the app bar's */
.dsr-refresh { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--bar-btn, transparent); color: inherit; cursor: pointer; }
.dsr-refresh svg { width: 20px; height: 20px; }
.dsr-bar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-head); font-weight: var(--head-weight-2); font-size: 16px; }
.dsr-body { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter, 16px) 32px; }
.dsr-hero { margin: 0 calc(-1 * var(--gutter, 16px)); position: relative; background: var(--surface-2); cursor: zoom-in; }
.dsr-hero img { display: block; width: 100%; max-height: 46vh; object-fit: cover; }
.dsr-credit { position: absolute; right: 0; bottom: 0; padding: 3px 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); border-top-left-radius: 6px; }
.dsr-title { font-family: var(--font-display, var(--font-head)); font-size: 24px; line-height: 1.2; font-weight: var(--head-weight); margin: 16px 0 8px; letter-spacing: var(--head-spacing, 0); overflow-wrap: anywhere; }
.dsr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dsr-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; background: var(--surface-2); color: var(--text); font-size: 13px; }
.dsr-chip-btn { border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.dsr-chip-btn:active { filter: brightness(.95); }
.dsr-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.dsr-status.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.dsr-status.bad { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.dsr-status.busy { background: var(--support-soft, var(--surface-2)); color: var(--text); }
.dsr-status.small { min-height: 22px; font-size: 12px; margin-left: 8px; vertical-align: middle; }
.dsr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.dsr-act { text-decoration: none; }
.dsr-follow.on { background: var(--ok); color: var(--on-accent, #fff); }
.dsr-follow svg, .dsr-act svg { width: 18px; height: 18px; margin-right: 4px; }
.dsr-sec { margin: 18px 0 0; }
.dsr-h2 { font-family: var(--font-head); font-size: 17px; font-weight: var(--head-weight-2); margin: 0 0 8px; }
.dsr-p { margin: 0 0 10px; line-height: var(--lh, 1.5); white-space: pre-line; }
.dsr-link, .dsr-cite { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.dsr-cite { font-size: 13px; }
.dsr-kvs { display: grid; gap: 6px; }
.dsr-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dsr-k { color: var(--muted); font-size: 13px; }
.dsr-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.dsr-ev { position: relative; padding: 0 0 14px 14px; }
.dsr-ev::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.dsr-ev-date { font-size: 12px; color: var(--muted); letter-spacing: var(--label-spacing, .04em); text-transform: uppercase; }
.dsr-ev-title { font-weight: 600; }
.dsr-ev-detail { margin: 2px 0 4px; white-space: pre-line; }
.dsr-issues, .dsr-people, .dsr-docs, .dsr-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dsr-issues li { padding: 10px 12px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); }
.dsr-issue-foot { margin-top: 4px; }
.dsr-person { display: flex; gap: 10px; align-items: flex-start; }
.dsr-person-ico svg { width: 20px; height: 20px; color: var(--muted); margin-top: 2px; }
.dsr-person-main { display: grid; gap: 2px; }
.dsr-person-name { font-weight: 600; }
.dsr-map { height: 220px; border-radius: var(--radius, 12px); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.dsr-map-foot { margin-top: 6px; }
.dsr-approx.leaflet-tooltip { background: var(--surface); color: var(--text); border-color: var(--line); font-size: 12px; }
.dsr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.dsr-thumb { display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; cursor: zoom-in; }
.dsr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dsr-card-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.dsr-docs li { display: grid; gap: 2px; }
.dsr-doc { font-weight: 500; }
.dsr-conds { margin: 0; padding: 0 0 0 0; list-style: none; display: grid; gap: 10px; }
.dsr-cond { padding: 10px 12px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); }
.dsr-cond-head { margin-bottom: 4px; }
.dsr-cond-text { white-space: pre-line; line-height: var(--lh, 1.5); }
.dsr-mine { outline: 2px solid var(--accent-soft); border-radius: var(--radius, 12px); padding: 8px; }
.dsr-ask-log { display: grid; gap: 8px; margin: 8px 0; }
.dsr-msg { padding: 10px 12px; border-radius: var(--radius, 12px); max-width: 92%; line-height: var(--lh, 1.5); }
.dsr-msg .dsr-p { margin: 0 0 6px; }
.dsr-me { justify-self: end; background: var(--accent); color: var(--on-accent); }
.dsr-app { justify-self: start; background: var(--surface); border: 1px solid var(--line); }
.dsr-err { border-color: var(--danger); }
.dsr-cites { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.dsr-ask-row { margin-top: 6px; }
.dsr-news { display: grid; gap: 10px; }
.dsr-news-item { padding: 10px 12px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 3px; }
.dsr-news-title { font-weight: 600; color: var(--text); text-decoration: none; }
a.dsr-news-title:hover { text-decoration: underline; }
.dsr-notes { width: 100%; min-height: 120px; }
.dsr-notes-state { margin-top: 4px; min-height: 18px; }
.dsr-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); }
.dsr-file > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.dsr-file-main { display: grid; gap: 2px; min-width: 0; }
.dsr-file-name { font-weight: 500; word-break: break-word; }
.dsr-file-none { padding: 6px 0; }
.dsr-foot { margin: 24px 0 0; }
/* lightbox */
.dsr-lb { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.94); color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.dsr-lb-bar { display: flex; justify-content: space-between; align-items: center; padding: calc(8px + var(--sat, 0px)) 12px 8px; font-size: 14px; }
.dsr-lb-x { background: transparent; border: 0; color: #fff; width: 44px; height: 44px; border-radius: 22px; cursor: pointer; }
.dsr-lb-x svg { width: 24px; height: 24px; }
.dsr-lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; }
.dsr-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dsr-lb-cap { padding: 10px 16px calc(14px + var(--sab, 0px)); font-size: 14px; text-align: center; }
.dsr-lb-credit { font-size: 12px; opacity: .8; margin-top: 2px; }
.dsr-lb-link { color: #fff; }
.dsr-lb-prev, .dsr-lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.dsr-lb-prev { left: 8px; }
.dsr-lb-next { right: 8px; transform: translateY(-50%) scaleX(-1); }
.dsr-lb-prev svg, .dsr-lb-next svg { width: 24px; height: 24px; }
/* themes view and alerts */
.dsr-search { margin: 8px 0 12px; }
.dsr-theme-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dsr-theme { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--radius, 12px);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.dsr-theme:active { filter: brightness(.96); }
.dsr-theme-name { font-weight: 600; }
.dsr-chev { grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 22px; }
.dsr-link-btn { background: transparent; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; text-align: left; }
.dsr-alert { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.dsr-alert.unseen { border-color: var(--accent); }
.dsr-alert-title { font-weight: 600; }
.dsr-alerts-btn { position: relative; }
.dsr-badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
/* questions and answers (the question set) */
.dsr-qa-filters { margin: 10px 0; }
.dsr-chip-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.dsr-qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dsr-qa-item { padding: 10px 12px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.dsr-qa-item .dsr-p { margin: 0; }
.dsr-qa-q { font-weight: 600; }
.dsr-qa-isgap { border-style: dashed; }
.dsr-qa-gap { color: var(--muted); font-style: italic; }
.dsr-qa-note, .dsr-qa-src { overflow-wrap: anywhere; }
@media (min-width: 700px) { .dsr-hero img { max-height: 380px; } .dsr-hero { border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); overflow: hidden; } }
/* the favourite star (28 Oct 2026): filled when following */
.dsr-follow svg.dsr-star-on { fill: currentColor; }
.dsr-cond-sec .dsr-actions { margin: 4px 0 10px; }
.dsr-compare svg { width: 18px; height: 18px; margin-right: 4px; }
.dsr-official { margin: -4px 0 10px; line-height: 1.35; }
/* the thread list: words on the left, the arrow on the right (an arrow placed on both rows was being put first) */
.dsr-theme > :not(.dsr-chev) { grid-column: 1; }
.dsr-theme > .dsr-chev { grid-column: 2; grid-row: 1 / span 2; }
/* ----  (29 Oct 2026): the project page redesign */
.dsr-summary-sec { margin-top: 4px; }
.dsr-summary.dsr-folded { max-height: calc(5 * 1.5em + 10px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.dsr-more { border: 0; background: none; padding: 4px 0; min-height: 36px; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.dsr-ask { margin-top: 12px; padding: 12px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); }
.dsr-ask .dsr-h2 { margin-bottom: 4px; }
.dsr-ask > .small.muted { margin: 0 0 4px; }
/* the photos: a strip that snaps photo by photo, with a count, dots and arrows on a laptop */
.dsr-gal { margin-top: 16px; }
.dsr-gal-frame { position: relative; margin: 0 calc(-1 * var(--gutter, 16px)); }
.dsr-gal-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; outline-offset: -3px; }
.dsr-gal-track::-webkit-scrollbar { display: none; }
.dsr-gal-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; background: var(--surface-2); aspect-ratio: 4 / 3; max-height: 52vh; }
.dsr-gal-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.dsr-gal-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dsr-gal-count { position: absolute; right: 10px; top: 10px; padding: 2px 9px; border-radius: 11px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.dsr-gal-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.dsr-gal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dsr-gal-dot.on { background: var(--accent); }
.dsr-gal-cap { margin-top: 4px; line-height: 1.35; overflow-wrap: anywhere; }
.dsr-gal-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 20px; border: 0; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; }
.dsr-gal-arrow svg { width: 22px; height: 22px; }
.dsr-gal-prev { left: 10px; }
.dsr-gal-next { right: 10px; transform: translateY(-50%) scaleX(-1); }
@media (hover: hover) and (pointer: fine) { .dsr-gal-arrow { display: grid; place-items: center; } }
@media (min-width: 700px) { .dsr-gal-frame { margin: 0; border-radius: var(--radius, 12px); overflow: hidden; } .dsr-gal-slide { max-height: 420px; } }
.dsr-chips-top { margin-top: 14px; }
/* one timeline: events and news, two switches */
.dsr-tl-note { margin: -4px 0 8px; }
.dsr-tl-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.dsr-tl-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.dsr-tl-toggle.on { color: var(--text); border-color: var(--accent); }
.dsr-tl-knob { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--line); transition: background .15s; flex: none; }
.dsr-tl-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.dsr-tl-toggle.on .dsr-tl-knob { background: var(--accent); }
.dsr-tl-toggle.on .dsr-tl-knob::after { transform: translateX(12px); }
.dsr-tl-n { font-size: 12px; color: var(--muted); }
.dsr-tl-h { margin: 6px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: var(--label-spacing, .04em); text-transform: uppercase; color: var(--muted); }
.dsr-ev-kind { margin-left: 8px; text-transform: none; letter-spacing: 0; }
.dsr-ev-up { margin-left: 8px; padding: 1px 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; text-transform: none; letter-spacing: 0; }
.dsr-ev-news::before { background: var(--surface); border: 2px solid var(--accent); width: 6px; height: 6px; }
.dsr-ev-next::before { background: var(--surface); border: 2px dashed var(--accent); width: 6px; height: 6px; }
.dsr-ev-link { display: block; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; overflow-wrap: anywhere; }
.dsr-ev-title { overflow-wrap: anywhere; }
/* people and owners, grouped */
.dsr-people-group + .dsr-people-group { margin-top: 14px; }
.dsr-h3 { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: var(--label-spacing, .04em); text-transform: uppercase; margin: 0 0 8px; }
.dsr-person-main { min-width: 0; }
.dsr-person-name, .dsr-person-meta, .dsr-person-src { overflow-wrap: anywhere; }
.dsr-people-group > .btn { margin-top: 8px; }
.dsr-checked { font-weight: 600; color: var(--text); margin-bottom: 2px; }
/* the map's other base, one tap away */
.dsr-map-foot { align-items: center; gap: 8px; flex-wrap: wrap; }
.dsr-map-swap { min-height: 32px; }
.dsr-map-aerial .dsr-approx.leaflet-tooltip { font-weight: 600; }
/* the entry at the top of the Law home */
.dsr-law-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 14px; text-align: left;
  border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.dsr-law-entry:active { filter: brightness(.96); }
.dsr-law-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dsr-law-ico svg { width: 22px; height: 22px; }
.dsr-law-main { display: grid; gap: 2px; min-width: 0; }
.dsr-law-title { font-weight: 650; }
.dsr-map { height: 260px; }
.dsr-map .leaflet-control-attribution { font-size: 9px; line-height: 1.25; padding: 1px 5px; background: rgba(255,255,255,.75); }
.dsr-law-ico { grid-column: 1; } .dsr-law-main { grid-column: 2; } .dsr-law-chev { grid-column: 3; color: var(--muted); font-size: 22px; line-height: 1; }
.dsr-card-thumb { background: var(--surface-2); flex: 0 0 56px; }
