/* Bespoke panel workspace. Keep the global site shell and report explorer. */
.detention-body { background: #fff; }
.detention-page { width: min(100%, 100rem); padding: 3.5rem clamp(1.5rem, 3.6vw, 4rem) 5rem; color: #081b4d; }
.detention-page :is(button,input,select,summary,a) { touch-action: manipulation; }
.detention-page :is(button,input,select,summary,a):focus-visible { outline: 3px solid #1257ff; outline-offset: 4px; }
.detention-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; margin-bottom: 2.5rem; }
.detention-header h1 { font-size: clamp(2.2rem, 3.3vw, 3.25rem); line-height: 1.16; letter-spacing: -.045em; margin: 0 0 .85rem; }
.detention-subtitle { max-width: 47rem; font-size: 1.1rem; line-height: 1.65; color: #52638f; margin: 0; }
.detention-tools { display: flex; align-items: stretch; gap: 1rem; }
.detention-primary,.detention-secondary { font: inherit; font-weight: 650; border-radius: .35rem; cursor: pointer; padding: .9rem 1.25rem; min-height: 3rem; }
.detention-primary { background: #1257ff; color: white; border: 1px solid #1257ff; }
.detention-primary:hover { background: #0846d9; }
.detention-secondary { background: white; color: #1257ff; border: 1px solid #c7d3f3; }
.detention-date { position: relative; }
.detention-date summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; cursor: pointer; border: 1px solid #c7d3f3; border-radius: .35rem; padding: .7rem 1rem; min-width: 15rem; }
.detention-date summary::-webkit-details-marker { display: none; }
.detention-date summary strong,.detention-date summary small { display: block; }
.detention-date summary strong { font-size: 1rem; font-weight: 650; }
.detention-date summary small { font-size: .875rem; color: #52638f; margin-top: .25rem; }
.detention-date summary img { width: 1rem; }
.detention-date-popover { position: absolute; top: calc(100% + .7rem); right: 0; z-index: 20; display: grid; grid-template-columns: 10rem minmax(14rem,1fr); width: 30rem; max-width: calc(100vw - 3rem); gap: 1.5rem; padding: 1.5rem; border: 1px solid #d7dff1; border-radius: .5rem; background: white; box-shadow: 0 8px 32px #081b4d20; }
.detention-date-popover nav { display: flex; flex-direction: column; gap: .25rem; border-right: 1px solid #d7dff1; padding-right: 1rem; }
.detention-date-popover nav a { padding: .65rem .5rem; color: #081b4d; border-radius: .25rem; font-size: .95rem; }
.detention-date-popover nav a[aria-current] { color: #1257ff; background: #edf2ff; }
.detention-date-popover h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.detention-date-popover label { display: block; font-size: .9rem; margin: .8rem 0 .35rem; }
.detention-date-popover input { width: 100%; min-width: 0; padding: .65rem; font: inherit; border: 1px solid #c7d3f3; border-radius: .25rem; }
.detention-date-popover p { font-size: .875rem; color: #52638f; }
.detention-error { color: #b42318!important; }
.detention-metadata { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; border-block: 1px solid #d7dff1; padding: 1rem 0; color: #52638f; font-size: .95rem; }
.detention-metadata p { margin: 0; }
.detention-metadata span { padding: 0 .7rem; }
.detention-summary { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); padding: 2.75rem 0 2rem; scroll-margin-top: 2rem; }
.detention-total { padding-right: 1.5rem; }
.detention-total > strong { display: block; font-size: clamp(3.6rem, 5vw, 5.4rem); line-height: 1; font-weight: 750; letter-spacing: -.055em; margin-bottom: .8rem; }
.detention-total > span { color: #52638f; font-size: 1rem; line-height: 1.5; }
.detention-setting { min-width: 0; padding: .2rem 1.3rem .6rem; border-left: 1px solid #d7dff1; color: #52638f; display: flex; align-items: flex-start; flex-direction: column; gap: .8rem; }
.detention-setting:hover { text-decoration: none; color: #1257ff; }
.detention-setting > strong { font-size: 2rem; line-height: 1; color: #081b4d; font-weight: 750; }
.detention-setting-label { font-size: 1rem; line-height: 1.5; padding-bottom: .4rem; border-bottom: 2px solid transparent; }
.detention-setting.is-selected .detention-setting-label { border-bottom-color: #1257ff; color: #1257ff; font-weight: 700; }
.detention-ticks { display: flex; gap: 3px; width: 100%; max-width: 5.6rem; height: 2rem; }
.detention-ticks i { flex: 1; background: #e2e6ee; }
.detention-ticks i b { display: block; height: 100%; background: #1257ff; }
.detention-summary-note { font-size: .875rem; color: #52638f; padding-bottom: 1.8rem; border-bottom: 1px solid #d7dff1; margin: 0; }
.detention-concerns { padding: 2.75rem 0 0; scroll-margin-top: 1.5rem; }
.detention-section-header { display: flex; gap: 1rem 2rem; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.detention-section-header h2 { font-size: clamp(1.65rem,2.3vw,2.2rem); line-height: 1.25; letter-spacing: -.035em; margin: 0 0 .75rem; }
.detention-section-header p { font-size: 1rem; color: #52638f; margin: 0; line-height: 1.6; }
.detention-section-header > a { flex-shrink: 0; }
.detention-concern-list { list-style: none; padding: 0; margin: 0; border: 1px solid #d7dff1; border-radius: 12px; background: #f8faff; box-shadow: inset 0 1px 4px rgb(8 27 77 / 3%); }
.detention-concern-list > li { border-bottom: 1px solid #d7dff1; }
.detention-concern-list > li > a { display: grid; grid-template-columns: 2.5rem minmax(0,1fr) 7rem 1.5rem; align-items: center; gap: 1.75rem; padding: 1.8rem .4rem; color: #081b4d; }
.detention-concern-list > li > a:hover { text-decoration: none; background: #fafbff; }
.detention-rank { color: #52638f; font-size: 1.1rem; align-self: start; }
.detention-concern-copy { display: flex; flex-direction: column; gap: .4rem; }
.detention-concern-copy strong { font-size: 1.125rem; font-weight: 700; line-height: 1.5; }
.detention-concern-copy > span { color: #52638f; font-size: 1rem; line-height: 1.6; }
.detention-concern-count { padding-left: 1.5rem; border-left: 1px solid #d7dff1; font-weight: 650; white-space: nowrap; }
.detention-concern-list img { width: 1.5rem; }
.detention-pagination { display: flex; justify-content: space-between; color: #52638f; font-size: .9rem; gap: 1rem; }
.detention-pagination > div { display: flex; gap: 1.5rem; }
.detention-reports { margin-top: 4rem; padding: 3rem 0 0; border-top: 1px solid #d7dff1; border-radius: 0; box-shadow: none; background: #fff; scroll-margin-top: 2rem; }
.detention-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem!important; margin-bottom: .65rem!important; }
.detention-selected-concern { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding: 1rem 1.2rem; border-left: 3px solid #1257ff; background: #f5f8ff; margin-bottom: 1rem; }
.detention-evidence-note { max-width: none; font-size: 1rem; color: #52638f; line-height: 1.7; }
.detention-reports .response-chronology { margin-top: 2.5rem; }
.detention-reports .chronology-report-title h3 { font-size: 1.15rem; }
.detention-reports .chronology-concern-card h5,.detention-reports .chronology-response-group li > p { font-size: 1rem; line-height: 1.65; }
.detention-reports .chronology-other-concerns { font-size: .95rem; line-height: 1.65; }
.detention-reports .chronology-report-meta,.detention-reports .chronology-report-summary-button { font-size: .9rem; }
.detention-reports .chronology-evidence { gap: 2rem; }
.detention-empty { padding: 2rem 0; color: #52638f; }
.detention-empty h3 { font-size: 1.15rem; }
.detention-demo { color: #765310; background: #fff8e7; padding: .8rem 1rem; border-left: 3px solid #bd8b25; font-size: .9rem; line-height: 1.6; margin: 0 0 2rem; }
.detention-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(min-width: 1500px) { .detention-header { flex-wrap: nowrap; } .detention-header > div:first-child { max-width: 58%; } }
@media(max-width: 1150px) { .detention-summary { grid-template-columns: repeat(5,1fr); row-gap: 2rem; } .detention-total { grid-column: 1/-1; display: flex; gap: 1.5rem; align-items: center; } .detention-total > strong { margin: 0; } .detention-setting { padding-inline: .75rem; } .detention-reports .chronology-evidence { grid-template-columns: 1fr; } }
@media(max-width: 700px) { .detention-page { padding: 2rem 1.25rem 3rem; } .detention-header h1 { font-size: 2.25rem; } .detention-tools { flex-wrap: wrap; width: 100%; } .detention-date { flex: 1; } .detention-date summary { min-width: 0; } .detention-date-popover { left: 0; right: auto; width: min(30rem,calc(100vw - 2.5rem)); grid-template-columns: 1fr; } .detention-date-popover nav { flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; } .detention-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem 0; } .detention-setting { padding-left: 1rem; } .detention-total { margin-bottom: .5rem; } .detention-section-header { align-items: start; flex-direction: column; } .detention-concern-list > li > a { grid-template-columns: 1.5rem minmax(0,1fr) 1rem; gap: .75rem; padding: 1.5rem 0; } .detention-concern-count { grid-column: 2; grid-row: 2; border: 0; padding: 0; font-size: .95rem; } .detention-concern-list img { grid-column: 3; grid-row: 1; width: 1rem; } .detention-reports { margin-top: 3rem; } }
@media print { .app-sidebar,.topbar,.site-footer,.detention-tools,.detention-search,.detention-pagination,.detention-briefing,.modal-backdrop { display: none!important; } .shell,.page-frame { display: block!important; margin: 0!important; } .detention-page { padding: 0; width: 100%; } .detention-reports [data-report-accordion-panel] { display: grid!important; height: auto!important; } .detention-reports { break-before: page; } .chronology-entry { break-inside: avoid; } }
/* The site defaults to underlined links; the selectable rows have their own cues. */
.detention-page .detention-setting,
.detention-page .detention-concern-list > li > a { text-decoration: none; }
.detention-page .detention-reports { border: 0; border-top: 1px solid #d7dff1; }
.detention-page .detention-reports .chronology-report-title h3 { font-size: 1.2rem; }
.detention-page .detention-reports .chronology-response-group h4,
.detention-page .detention-reports .chronology-concern-group h4 { font-size: 1rem; }
@media(max-width: 700px) {
  .detention-tools { flex-direction: column; align-items: flex-start; }
  .detention-date { width: 100%; }
  .detention-date summary strong { white-space: nowrap; }
  .detention-tools > .detention-primary { min-height: 3.25rem; }
}

.detention-page .detention-total { color: #081b4d; text-decoration: none; }
.detention-total-label { display: inline-block; padding-bottom: .4rem; border-bottom: 2px solid transparent; }
.detention-total.is-selected .detention-total-label { border-color: #1257ff; color: #1257ff; font-weight: 700; }
.detention-total:hover .detention-total-label { color: #1257ff; }
.detention-page .detention-reset { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem .9rem; min-height: 2.75rem; background: white; border: 1px solid #c7d3f3; border-radius: .4rem; color: #1257ff; text-decoration: none; font-weight: 650; flex-shrink: 0; }
.detention-reset img { width: 1.1rem; height: 1.1rem; }
.detention-reset:hover { background: #edf2ff; border-color: #1257ff; }
.detention-selected-concern { align-items: center; }
.detention-scope-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: .5rem; line-height: 1.5; }
.detention-scope-setting { color: #52638f; font-weight: 650; }
.detention-concern-list { max-height: 36rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #bdc7e3 transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.detention-concern-list::-webkit-scrollbar { width: 6px; }
.detention-concern-list::-webkit-scrollbar-thumb { border-radius: 999px; background: #bdc7e3; }
.detention-list-note { font-size: .9rem; color: #52638f; margin: 1rem 0 0; }
/* Updates are visual spinners; status text is available to assistive technology. */
.detention-update-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.detention-update-status.detention-update-error { position: static; width: auto; height: auto; clip-path: none; padding: 1rem; color: #9b291c; background: #fff5f2; border-left: 3px solid #b42318; }
.detention-update-status[hidden] { display: none; }
.detention-concerns.is-loading, .detention-reports.is-loading { position: relative; }
.detention-page .is-loading > :not(.detention-loading) { visibility: hidden; pointer-events: none; }
.detention-loading { position: absolute; inset: 0; }
.detention-loading span { position: sticky; top: 45vh; display: block; width: 2rem; height: 2rem; margin: 3rem auto; border: 3px solid #d7dff1; border-top-color: #1257ff; border-radius: 50%; animation: detention-spin .8s linear infinite; }
@keyframes detention-spin { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .detention-loading span { animation: none; } }
.detention-concern-list .is-pending > a, .detention-summary .is-pending { background: #edf2ff; }
.detention-page { overflow-anchor: none; }
@media(max-width:700px) { .detention-concern-list { max-height: 32rem; } }
@media print { .detention-concern-list { max-height: none; overflow: visible; } .detention-reset,.detention-update-status { display: none!important; } }
.detention-reports .concern-pagination { flex-wrap: wrap; }
@media(max-width:700px) {
  .detention-selected-concern { flex-direction: column; align-items: stretch; }
  .detention-selected-concern .detention-reset { align-self: flex-end; }
}

.detention-concern-list > li.is-selected { background: #f0f5ff; border-radius: 10px; box-shadow: inset 0 0 0 1px #bdcef8; }
.detention-concern-list > li.is-selected > a:hover { background: transparent; }
.detention-concern-selected { display: none; }
.is-selected .detention-concern-selected, .is-pending .detention-concern-selected { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; color: #52638f; font-size: .875rem; font-weight: 500; }
.detention-concern-selected svg { width: 1.5rem; height: 1.5rem; color: #1257ff; flex-shrink: 0; }
.detention-concern-list > li:is(.is-selected, .is-pending) .detention-concern-count { grid-column: 3 / 5; }
.detention-concern-list > li:is(.is-selected, .is-pending) > a > img { display: none; }
@media(max-width:700px) { .detention-concern-list > li:is(.is-selected, .is-pending) .detention-concern-count { grid-column: 2 / 4; } }
.detention-export { width: min(42rem, calc(100vw - 2rem)); max-height: 90vh; overflow-y: auto; }
.detention-export-scope { display: grid; gap: .4rem; background: #f5f8ff; border-left: 3px solid #1257ff; padding: 1rem; margin: 1.2rem 0; }
.detention-export fieldset { border: 0; padding: 0; margin: 1.4rem 0; }
.detention-export legend { font-weight: 700; }
.detention-export-option { display: flex; align-items: flex-start; gap: .8rem; padding: .7rem 0; cursor: pointer; }
.detention-export-option input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: #1257ff; flex-shrink: 0; }
.detention-export-option span { display: grid; gap: .2rem; }
.detention-export-option small { font-size: .95rem; color: #52638f; line-height: 1.5; }

.detention-export .modal-close { border: 0; background: transparent; cursor: pointer; border-radius: 50%; width: 2.5rem; height: 2.5rem; }
.detention-export .modal-close:hover { background: #f5f8ff; }

/* Reserve the same status space while the requested report selection loads. */
.is-pending .detention-concern-selected { position: relative; }
.is-pending .detention-concern-selected > * { visibility: hidden; }
.is-pending .detention-concern-selected::before { content: ""; position: absolute; left: 0; top: 0; box-sizing: border-box; width: 1.5rem; height: 1.5rem; border: 2px solid #d7dff1; border-top-color: #1257ff; border-radius: 50%; animation: detention-spin .8s linear infinite; }
@media(prefers-reduced-motion:reduce) { .is-pending .detention-concern-selected::before { animation: none; } }
.detention-analysis { margin: 1.5rem 0 3rem; }
.detention-analysis .refresh-panel.is-loading { position: relative; }
.detention-analysis .detention-loading { display: grid; place-items: center; }
.detention-analysis .detention-loading span { position: static; margin: 0; }

.detention-analysis .dashboard-x-axis { grid-template-columns: repeat(var(--bar-count), minmax(0, 1fr)); }

.detention-floating-scope { position: fixed; right: 1.5rem; bottom: max(1.5rem, env(safe-area-inset-bottom)); z-index: 25; width: min(44rem, calc(100vw - 20rem)); box-sizing: border-box; padding: 1rem 1.2rem; border: 1px solid #cfdbfa; border-radius: 14px; background: #fff; box-shadow: 0 5px 24px rgb(8 27 77 / 14%); }
.detention-floating-scope header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.detention-floating-scope h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1rem; line-height: 1.5; color: #081b4d; }
.detention-floating-scope header img { width: 1.2rem; height: 1.2rem; }
.detention-scope-reset { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; color: #1257ff; font-size: .9rem; white-space: nowrap; min-height: 2rem; }
.detention-scope-chips { display: flex; flex-wrap: wrap; gap: .5rem; max-height: 30vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdc7e3 transparent; }
.detention-scope-chip { display: flex; align-items: center; gap: .8rem; max-width: 100%; min-height: 2.5rem; padding: .4rem .8rem; border-radius: 1rem; box-sizing: border-box; background: #edf2ff; color: #0b2055; font-size: .9rem; line-height: 1.5; text-decoration: none; }
.detention-scope-chip > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.detention-scope-chip:hover { background: #dfe8ff; text-decoration: none; }
.detention-chip-remove { flex-shrink: 0; margin-left: auto; font-size: 1.25rem; line-height: 1; color: #1257ff; }
.detention-scope-chip-concern { flex-basis: 100%; }
.detention-floating-scope a:focus-visible { outline: 2px solid #1257ff; outline-offset: -2px; }
.detention-scope-spacer { height: var(--detention-scope-space, 13rem); }
@media(max-width:980px) { .detention-floating-scope { right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); width: calc(100% - 2rem); } }
@media print { .detention-floating-scope, .detention-scope-spacer { display: none; } }

.detention-scope-drag { display: inline-flex; align-items: center; gap: .6rem; min-height: 2rem; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: grab; touch-action: none; user-select: none; }
.detention-floating-scope.is-dragging .detention-scope-drag { cursor: grabbing; }
.detention-scope-drag:focus-visible { outline: 2px solid #1257ff; outline-offset: 3px; border-radius: 4px; }
