/* R01–R21: polish the existing shell; retain its grids, routes and palette. */
:root {
  --ui-control: 44px;
  --ui-space: 8px;
  --ui-panel-padding: clamp(18px, 2vw, 24px);
  --ui-motion: 200ms;
  --ui-ease: cubic-bezier(.22, 1, .36, 1);
}
html:has(.app-shell), body:has(.app-shell) { min-width: 0; }
body .app-shell :is(h1, h2, h3, label, summary) { overflow-wrap: anywhere; }
body .app-shell :is(h1, h2) {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
}
body .app-shell h2 { font-size: 23px; letter-spacing: -.025em; }
body .app-shell h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
}
body .app-shell { color: var(--ink); }
body .app-shell :is(.muted, .row-meta, .directory-count, .inline-note, .coverage-note) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
body .app-shell :is(.dashboard-count, .dashboard-stat strong, .directory-date) {
  font-variant-numeric: tabular-nums;
}
body .app-shell :is(.panel, .directory-cell, .mini-profile > div:last-child) { min-width: 0; }
body .app-shell :is(.dashboard-panel, .settings-panel, .intake-panel, .review-panel,
  .identity-panel, .source-panel, .side-context, .dialog-conversation, .dialog-context) {
  padding: var(--ui-panel-padding);
}
body .app-shell :is(.contact-detail, .evidence-panel) { padding: var(--ui-panel-padding); }
body .app-shell :is(.detail-group, .review-group) { padding-block: 20px; }
body .app-shell .contact-tags { margin-block: 0 8px; }
body .app-shell .person-drawer .contact-tags { position: relative; }
body .app-shell .person-drawer .contact-tags > .tag-save-form > .tag-picker { position: static; }
body .app-shell .person-drawer .contact-tags > .tag-save-form > .tag-picker > .tag-picker-menu {
  left: 0;
  right: auto;
  width: min(290px, 100%);
  max-width: 100%;
}
body .app-shell .dossier-tabs { gap: 20px; margin-bottom: 20px; }
body .app-shell .dossier-tab {
  min-height: var(--ui-control);
  text-decoration: none;
  padding-block: 12px 10px;
}
body .app-shell .dossier-tab:hover { color: var(--ink); }
body .app-shell .dossier-tab.active { border-bottom-color: var(--gold); }

/* Explicitly exclude hidden controls, checkboxes and multi-row selectors. */
body .app-shell :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  transition: background-color var(--ui-motion), border-color var(--ui-motion), color var(--ui-motion);
}
body .app-shell :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select:not([multiple])) {
  height: var(--ui-control);
  min-height: var(--ui-control);
  align-self: start;
}
body .app-shell textarea { display: block; width: 100%; resize: vertical; }
body .app-shell select[multiple] { min-height: 94px; padding: 6px; }
body .app-shell :is(input, select, textarea):focus-visible {
  border-color: #7d95ad;
  outline: 2px solid #7d95ad;
  outline-offset: 2px;
}
body .app-shell :is(input, select, textarea):disabled {
  color: var(--muted);
  background: var(--soft);
  cursor: not-allowed;
}
body .app-shell :is(input[type="checkbox"], input[type="radio"]) {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--accent);
  vertical-align: middle;
}
body .app-shell :is(.retry-confirm, .attention-row, .tag-option, .person-tag-list label,
  .remove-channel) {
  gap: 8px;
  min-height: var(--ui-control);
}
body .app-shell :is(.originals-toggle, .tag-choice-list label) {
  gap: 8px;
  min-height: 32px;
  align-items: center;
}
/* The field-label grid must not override the horizontal confirmation row. */
body .app-shell .integration-settings label.retry-confirm {
  display: flex;
  align-items: flex-start;
}
body .app-shell :is(.retry-confirm, .attention-row, .choice) input[type="checkbox"] {
  margin-top: 3px;
}
body .app-shell .meeting-reminder-settings label:first-of-type > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--ui-control);
}
body .app-shell :is(.integration-settings, .identity-form, .review-edit-fields) label:not(.retry-confirm) {
  align-content: start;
  gap: 8px;
}
body .app-shell :is(.integration-settings, .identity-form, .review-edit-fields) label {
  font-size: 13px;
  line-height: 1.5;
}
body .app-shell .integration-card {
  min-width: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
body .app-shell .integration-card:last-child { border-bottom: 1px solid var(--line); }
body .app-shell .integration-card h3 { margin-bottom: 8px; }
body .app-shell .meeting-reminder-settings :is(input:not([type="checkbox"]), select) { width: 100%; }
body .app-shell .filter-grid > label { display: grid; grid-template-rows: auto auto; }
body .app-shell .filter-grid select { width: 100%; }
body .app-shell .filter-grid label:not(.retry-confirm) { gap: 6px; }
body .app-shell .dialog-header { margin-bottom: 16px; }
body .app-shell .dialog-filters .tag-filter { gap: 8px; padding: 0; border: 0; background: transparent; }
body .app-shell .dialog-modes label {
  min-height: var(--ui-control);
  gap: 8px;
  padding: 10px 12px;
  transition: background-color var(--ui-motion), border-color var(--ui-motion);
}
body .app-shell .dialog-modes label:has(input:checked) {
  border-color: #7d95ad;
  background: var(--accent-soft);
}
body .app-shell .dialog-modes label:focus-within { outline: 2px solid #7d95ad; outline-offset: 2px; }
body .app-shell .commitment-filters { padding: 20px; }
body .app-shell .commitment-filters label { gap: 8px; }
body .app-shell .tag-option { padding: 10px 8px; border-radius: 5px; }
body .app-shell .tag-option:hover { background: var(--soft); }
body .app-shell .tag-option:has(input:checked) { background: var(--accent-soft); }
body .app-shell .tag-picker-menu { padding: 16px; }
body .app-shell .tag-picker-menu .tag-filter { display: block; padding: 10px 12px; }
body .app-shell .tag-picker-chevron {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform var(--ui-motion) var(--ui-ease);
}
body .app-shell .tag-picker[open] > summary .tag-picker-chevron { transform: rotate(180deg); }
body .app-shell .tag-picker.is-closing > summary .tag-picker-chevron { transform: rotate(0deg); }

body .app-shell .button {
  min-height: var(--ui-control);
  border-radius: 7px;
  padding: 10px 16px;
  font: 500 14px/1.5 var(--sans);
  transition: background-color var(--ui-motion), border-color var(--ui-motion), color var(--ui-motion), box-shadow var(--ui-motion);
}
body .app-shell .button.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
body .app-shell .button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
body .app-shell .button:active { box-shadow: inset 0 2px 4px #16202d20; }
body .app-shell .button:disabled { background: var(--soft); border-color: var(--line); color: var(--muted); cursor: not-allowed; box-shadow: none; }
body .app-shell .button[aria-busy="true"] { cursor: progress; }
body .app-shell .nav-icon { font-size: 20px; line-height: 1; text-align: center; }
body .app-shell .nav-icon .icon { display: block; }
body .app-shell .owner { gap: 11px; line-height: 1.3; }
body .app-shell .owner strong { font-size: 13px; line-height: 17px; }
body .app-shell .owner small { font-size: 12px; line-height: 16px; margin-top: 0; }
body .app-shell .drawer-close-icon { display: block; font: 28px/1 var(--sans); }
body .app-shell #person-drawer-close { width: var(--ui-control); height: var(--ui-control); padding: 0; flex: 0 0 auto; }
body .app-shell .directory-item { min-height: 80px; padding-block: 12px; }
body .app-shell .directory-person { align-items: center; }
body .app-shell .directory-person > span:last-child { min-width: 0; }
body .app-shell .directory-person strong { overflow-wrap: anywhere; }
body .app-shell .directory-item small { margin-top: 4px; font-size: 13px; }
body .app-shell .directory-item > .icon { justify-self: center; }
body .app-shell .dashboard-stat { text-decoration: none; padding: 16px; }
body .app-shell .dashboard-stat strong { font-size: 24px; line-height: 1.3; margin-bottom: 4px; }
body .app-shell .dashboard-stat:hover { background: var(--accent-soft); }
body .app-shell .dashboard-row { border-color: transparent; border-bottom-color: var(--line); border-radius: 0; padding: 8px; }
body .app-shell .dashboard-list { gap: 0; }
body .app-shell .dashboard-people .dashboard-list { gap: 8px; }
body .app-shell .dashboard-people .dashboard-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
body .app-shell .dashboard-panel h2 { margin-bottom: 10px; }
body .app-shell .dashboard-panel .topbar { margin-bottom: 12px; }
body .app-shell .dashboard-panel .topbar h2 { margin-bottom: 0; }
body .app-shell .empty-state { margin: 0; padding: 20px 8px; font-size: 14px; line-height: 1.6; }
body .app-shell .dashboard-panel .empty-state { margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
body .app-shell .dashboard-columns > .dashboard-panel:only-child { grid-column: 1 / -1; padding: 14px 18px; }
body .app-shell .searchbar { margin-bottom: 12px; }
body .app-shell .directory-actions { min-height: 44px; margin-bottom: 8px; }
body .app-shell .search-results { padding-block: 8px; }
body .app-shell .searchbar .row-meta { margin-top: 4px; }
body .app-shell .participants-empty-state {
  display: block;
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
body .app-shell .mode-option { position: relative; min-width: 0; }
body .app-shell .mode-option > label { width: 100%; height: 100%; }
body .app-shell .mode-tooltip {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 72px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 20px #16202d1c;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity var(--ui-motion) var(--ui-ease);
}
body .app-shell .mode-option:is(:hover, :focus-within) .mode-tooltip { opacity: 1; visibility: visible; }
body .app-shell .mode-option.tooltip-dismissed .mode-tooltip { opacity: 0; visibility: hidden; }
body .app-shell #dialog-form > .composer-actions { justify-content: flex-end; }
body .app-shell .person-picker { position: relative; display: block; min-width: 0; }
body .app-shell .person-picker > input { width: 100%; }
body .app-shell .person-picker-options {
  position: absolute;
  z-index: 9;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 6px 20px #16202d1c;
}
body .app-shell .person-picker-options [role="option"] { padding: 10px; min-height: 44px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
body .app-shell .person-picker-options [aria-selected="true"] { background: var(--accent-soft); }
body .app-shell .choice { min-height: var(--ui-control); gap: 10px; }
body .app-shell .choice > span { min-width: 0; }
body .app-shell :is(.source-quote, .change-inline, .change-row) { overflow-wrap: anywhere; }
body .app-shell .change-inline > span { min-width: 0; }
body .app-shell .review-group h3 { margin-bottom: 12px; }
body .app-shell .choice-row { padding-bottom: 12px; }
body .app-shell :is(.source-text, .source-quote, .source-panel blockquote, .evidence-item blockquote) {
  font: 15px/1.75 var(--sans);
  max-width: 65ch;
  overflow-wrap: anywhere;
}
body .app-shell .source-text { padding: 20px; }
body .app-shell .source-panel blockquote { padding: 12px 16px; }
body .app-shell .intake-upload-help { margin-top: 0; line-height: 1.6; }
body .app-shell input[type="file"] { max-width: 100%; font: 14px/1.5 var(--sans); }
body .app-shell input[type="file"]::file-selector-button {
  min-height: var(--ui-control);
  margin-right: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background-color var(--ui-motion), border-color var(--ui-motion);
}
body .app-shell input[type="file"]::file-selector-button:hover { background: var(--accent-soft); border-color: #7d95ad; }
body .app-shell :is(.error, .settings-notice, .dialog-notice) { padding: 12px 16px; border-radius: 7px; line-height: 1.6; overflow-wrap: anywhere; }
body .app-shell :is(.reminder-settings-status, #owner-action-status, #meeting-brief-status) {
  min-height: 1.6em;
  font-size: 13px;
  margin-block: 8px 0;
  overflow-wrap: anywhere;
}
body .app-shell .person-edit-form .detail-group { row-gap: 8px; }
body .app-shell .person-edit-form .detail-group > :is(input:not([type="hidden"]), textarea) { margin-bottom: 8px; }
body .app-shell .disclosure-body { min-width: 0; }
/* Owner's compact dossier and settings: keep readable controls, trim empty vertical space. */
body .app-shell .brand { align-items: center; }
body .app-shell .brand-mark { align-self: center; transform: translateY(-3px); line-height: 1; }
body .app-shell .brand-name { line-height: 1.1; }
body .app-shell :is(.dashboard-columns, .dashboard-lower) { align-items: start; }
body .app-shell .contact-detail > .detail-group { padding-block: 12px; }
body .app-shell .contact-detail .detail-group > h2 { margin-bottom: 10px; }
body .app-shell .contact-detail .evidence-item { padding-block: 10px; }
body .app-shell .contact-detail .evidence-item > p { margin-bottom: 5px; line-height: 1.45; letter-spacing: normal; word-spacing: normal; }
body .app-shell .contact-detail .evidence-item .button.ghost { padding: 7px 10px; }
body .app-shell .contact-detail .summary-card .preserve-lines { letter-spacing: normal; word-spacing: normal; line-height: 1.5; }
body .app-shell .contact-detail > .row-actions { margin-block: 10px 0; }
body .app-shell .settings-wrap { gap: 18px; }
body .app-shell .settings-panel .integration-settings { gap: 8px; margin-top: 10px; padding-top: 10px; }
body .app-shell .settings-panel .integration-settings label { gap: 4px; }
body .app-shell .settings-panel .integration-card { padding-block: 10px; }
body .app-shell .settings-panel .reminder-settings-status:empty { display: none; }
body .app-shell .connection-list { align-items: start; }
body .app-shell .integration-summary .error { margin-block: 8px; font-size: 13px; line-height: 1.45; }
body .app-shell .integration-controls { min-width: 0; }
body .app-shell .dashboard-activity-more > summary { cursor: pointer; padding-block: 10px; color: var(--accent); }
body .app-shell .dashboard-review-queue { border-left: 3px solid var(--gold); padding-left: 14px; }
body .app-shell .commitment-proposals { padding: var(--ui-panel-padding); margin-block: 16px; }
body .app-shell .commitment-proposal { padding-block: 12px; border-bottom: 1px solid var(--line); }
body .app-shell .commitment-proposal:last-child { border-bottom: 0; }
body .app-shell .commitment-proposal > :is(h3, p) { margin-bottom: 6px; }
body .app-shell .commitment-proposal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body .app-shell .review-item-focus { background: var(--accent-soft); border-left: 3px solid var(--gold); padding-left: 12px; scroll-margin-top: 24px; }
body .app-shell .source-evidence-anchor { scroll-margin-top: 24px; }
body .app-shell .source-evidence-highlight { background: #f5e6b8; color: inherit; padding: 1px 0; }
body .app-shell .intake-upload-dropzone { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; margin-top: 8px; text-align: center; }
body .app-shell .intake-upload-dropzone p { margin: 0; }
body .app-shell .intake-upload-dropzone.is-dragging { border-color: var(--gold); background: var(--accent-soft); }
body .app-shell .todoist-choice-dialog { width: min(560px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
body .app-shell .todoist-choice-dialog::backdrop { background: #16202d66; }
body .app-shell dialog.motion-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity var(--ui-motion) var(--ui-ease), transform var(--ui-motion) var(--ui-ease);
}
body .app-shell dialog.motion-dialog[open].is-closing { opacity: 0; transform: translateY(6px) scale(.99); }
body .app-shell dialog.motion-dialog::backdrop { transition: background-color var(--ui-motion) var(--ui-ease); }
body .app-shell dialog.motion-dialog[open].is-closing::backdrop { background: transparent; }
@starting-style {
  body .app-shell dialog.motion-dialog[open] { opacity: 0; transform: translateY(6px) scale(.99); }
  body .app-shell dialog.motion-dialog[open]::backdrop { background: transparent; }
}
@supports (grid-template-rows: subgrid) {
  body .app-shell .connection-list { row-gap: 0; }
  body .app-shell .connection-list > .integration-card { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
}
@media (max-width: 650px) {
  body .app-shell .connection-list > .integration-card { display: block; grid-row: auto; }
}
@media (max-width: 850px) {
  body .app-shell .nav-item { padding: 10px 2px; min-height: 58px; }
  body .app-shell .nav-label { min-width: 0; text-align: center; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
  body .app-shell .nav-icon { width: 18px; height: 18px; font-size: 20px; }
  body .app-shell .nav-icon .icon { width: 18px; height: 18px; }
}
@media (max-width: 700px) {
  body .app-shell .dialog-modes { align-items: stretch; gap: 8px; }
  body .app-shell .dialog-modes .mode-option { flex: 1 1 42%; }
  body .app-shell .dialog-modes label { min-height: 60px; padding: 8px; font-size: 14px; line-height: 1.5; }
}
@media (max-width: 650px) {
  :root { --ui-panel-padding: 18px; }
  body .app-shell :is(.originals-toggle, .tag-choice-list label) { min-height: 44px; }
  body .app-shell .mode-option:nth-of-type(even) .mode-tooltip { left: auto; right: 0; }
  body .app-shell .nav-label { text-wrap: balance; hyphens: auto; }
  body .app-shell .dossier-tabs { gap: 12px; }
  body .app-shell .dossier-tab { font-size: 13px; }
  body .app-shell .mini-profile { gap: 12px; }
  body .app-shell .commitment-filters { padding: 16px; }
  body .app-shell .tag-picker-menu { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body .app-shell *, body .app-shell *::before, body .app-shell *::after { animation: none !important; transition: none !important; }
  body .app-shell dialog.motion-dialog::backdrop { animation: none !important; transition: none !important; }
}

/* Owner corrections: keep the established fonts and palette, align related controls. */
body .app-shell .contact-detail > .detail-group { padding-block: 16px; }
body .app-shell .contact-detail > .detail-group > h2 { margin-bottom: 12px; }
body .app-shell .contact-detail .summary-card { padding-block: 16px; }
body .app-shell .summary-text,
body .app-shell .contact-detail .summary-card .summary-text {
  text-align: start;
  text-align-last: start;
  hyphens: manual;
  line-height: 1.65;
  overflow-wrap: break-word;
}
body .app-shell .contact-channel-list { gap: 16px 24px; align-items: start; }
body .app-shell .contact-channel-list p { margin-top: 4px; }
body .app-shell .person-edit-form .detail-group > label { margin-bottom: -4px; }
body .app-shell .person-channel-row { align-items: start; }
body .app-shell .person-channel-row > label { gap: 6px; }
body .app-shell .person-edit-form .detail-group:last-child { padding-bottom: 0; }
body .app-shell .review-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, 260px); gap: 20px; }
body .app-shell .review-layout .side-context { position: sticky; top: 20px; }
body .app-shell .review-edit-fields { gap: 14px 16px; padding-inline: 0; }
body .app-shell .review-edit-fields .review-field-wide { grid-column: 1 / -1; }
body .app-shell .review-edit-fields textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
  overflow-y: auto;
}
body .app-shell .change-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; width: 100%; color: var(--ink); }
body .app-shell .change-inline > span { white-space: pre-wrap; }
body .app-shell .change-inline small { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
body .app-shell .change-inline > b { align-self: center; }
body .app-shell .queue-change { padding-block: 12px; border-bottom: 1px solid var(--line); }
body .app-shell .queue-change h4 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
body .app-shell .queue-confirm-form { padding-top: 16px; }
body .app-shell .commitment-proposal h3 a { color: var(--accent); text-underline-offset: 4px; }
body .app-shell .commitment-proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body .app-shell .commitment-proposal-actions form { margin: 0; }
body .app-shell .contact-detail .timeline-event { padding-block: 14px; }
@media (max-width: 760px) {
  body .app-shell .review-layout { grid-template-columns: minmax(0, 1fr); }
  body .app-shell .review-layout .side-context { position: static; }
  body .app-shell .screen[aria-labelledby="commitments-title"] > .topbar { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  body .app-shell .change-inline { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body .app-shell .change-inline > b { display: none; }
}
/* Keep one modal shell and one stable content viewport across dossier sections. */
html:has(.app-shell) { scrollbar-gutter: stable; }
body .app-shell .person-drawer {
  overflow: hidden;
  scrollbar-gutter: auto;
  transform: translateX(100%);
  opacity: 1;
  background: var(--paper);
  transition: transform 600ms ease-in-out;
}
body .app-shell .person-drawer[open] {
  display: flex;
  flex-direction: column;
  animation: none;
  transform: translateX(0);
}
body .app-shell .person-drawer[open].is-closing { transform: translateX(100%); }
body .app-shell .person-drawer .drawer-toolbar { position: relative; flex: 0 0 auto; }
body .app-shell .dossier-heading { flex: 0 0 auto; padding: 20px var(--ui-panel-padding) 0; }
body .app-shell .dossier-heading .mini-profile { padding-bottom: 16px; }
body .app-shell .dossier-heading .dossier-tabs { margin-bottom: 0; }
body .app-shell .dossier-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; overflow-anchor: none; }
body .app-shell .person-drawer::backdrop {
  background: transparent;
  backdrop-filter: none;
  transition: background-color 600ms ease-in-out;
}
body .app-shell .person-drawer[open]::backdrop { animation: none; background: #17223128; }
body .app-shell .person-drawer[open].is-closing::backdrop { background: transparent; }
@starting-style {
  body .app-shell .person-drawer[open] { transform: translateX(100%); }
  body .app-shell .person-drawer[open]::backdrop { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  body .app-shell .person-drawer,
  body .app-shell .person-drawer::backdrop { animation: none !important; transition: none !important; }
}
@media (max-width: 650px) {
  body .app-shell .dossier-heading { padding: 16px 20px 0; }
}

/* Card controls are also available when opened from the people directory. */

.inline-profile-view[hidden],.inline-profile-form[hidden]{display:none!important}.inline-profile-text{width:100%;cursor:text}.inline-profile-text:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.person-edit-form .detail-group{display:grid;gap:8px}.person-edit-form input:not([type=checkbox]),.person-edit-form textarea,.person-edit-form select{width:100%;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink)}.person-edit-form textarea{min-height:84px;resize:vertical}.person-channel-row{display:grid;grid-template-columns:minmax(95px,.7fr) minmax(125px,1fr) minmax(110px,1fr);gap:9px;padding:13px 0;border-top:1px solid var(--line)}.person-channel-row>label{display:grid;gap:5px;font-size:12px;color:var(--muted)}.person-channel-row .remove-channel{grid-column:1/-1;display:flex;align-items:center;gap:7px}.person-channel-row .remove-channel input,.person-tag-list input{width:auto}.person-tag-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.person-tag-list label{display:flex;align-items:center;gap:8px;padding:7px;border:1px solid var(--line);border-radius:5px}.person-edit-form button{justify-self:start}.person-edit-form .button.primary{margin-top:8px}
@media(max-width:650px){.person-channel-row{grid-template-columns:minmax(0,1fr)}.person-tag-list{grid-template-columns:1fr}}
