.pm-academic-workbench-page .pm-main {
  width: min(1320px, calc(100% - 2rem));
  padding: 2rem 0 2.5rem;
}

.pm-observatory-shell {
  font-family: system-ui, sans-serif;
}

.pm-observatory-header {
  align-items: end;
  border-bottom: 1px solid var(--pm-border);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
  padding: 1rem 0 1.5rem;
}

.pm-observatory-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin: 0.15rem 0 0.65rem;
}

.pm-observatory-header p {
  color: var(--pm-muted);
  margin: 0;
  max-width: 68ch;
}

.pm-observatory-runtime {
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
}

.pm-observatory-runtime span {
  color: var(--pm-muted);
  font-size: 0.82rem;
}

.pm-observatory-runtime strong {
  color: var(--pm-accent);
  font-size: 1rem;
}

.pm-observatory-workspace {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 17rem minmax(0, 1fr);
  padding-top: 1.25rem;
}

.pm-observatory-nav {
  align-self: start;
  display: grid;
  gap: 0.4rem;
  position: sticky;
  top: 5rem;
}

.pm-observatory-nav__button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--pm-muted);
  cursor: pointer;
  font: inherit;
  min-height: 2.6rem;
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.pm-observatory-nav__button:hover,
.pm-observatory-nav__button:focus-visible,
.pm-observatory-nav__button.is-active {
  background: var(--pm-accent-soft);
  border-color: var(--pm-border);
  color: var(--pm-text);
  outline: none;
}

.pm-observatory-stage {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.pm-observatory-banner,
.pm-observatory-surface {
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--pm-surface) 84%, transparent);
}

.pm-observatory-banner {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr);
  padding: 1rem;
}

.pm-observatory-banner h2,
.pm-observatory-surface h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  margin: 0;
}

.pm-observatory-banner p {
  color: var(--pm-muted);
  margin: 0;
}

.pm-observatory-surface {
  padding: 1.15rem;
}

.pm-observatory-surface__header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pm-observatory-state {
  border: 1px solid #6d5c23;
  border-radius: 999px;
  color: #f5d56e;
  flex: 0 0 auto;
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
}

.pm-observatory-facts {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.pm-observatory-facts div {
  border-top: 1px solid var(--pm-border);
  min-width: 0;
  padding-top: 0.65rem;
}

.pm-observatory-facts dt {
  color: var(--pm-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pm-observatory-facts dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}

[data-theme="light"] .pm-observatory-state {
  background: #fff8dc;
  color: #5c4812;
}

@media (max-width: 920px) {
  .pm-observatory-header,
  .pm-observatory-workspace,
  .pm-observatory-banner,
  .pm-observatory-facts {
    grid-template-columns: 1fr;
  }

  .pm-observatory-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    position: static;
  }

  .pm-observatory-nav__button {
    flex: 0 0 min(14rem, 72vw);
  }

  .pm-observatory-surface__header {
    display: grid;
  }

  .pm-observatory-state {
    justify-self: start;
    white-space: normal;
  }
}

.pm-observatory-live-status {
  color: var(--pm-accent);
  font-size: 0.92rem;
  margin-top: 0.75rem !important;
}

.pm-observatory-metrics {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.pm-observatory-metrics h3 {
  font-size: 0.92rem;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.pm-observatory-metrics ul {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pm-observatory-metrics li {
  align-items: baseline;
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.pm-observatory-metrics span {
  color: var(--pm-muted);
  min-width: 0;
}

.pm-observatory-metrics strong {
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 920px) {
  .pm-observatory-metrics ul {
    grid-template-columns: 1fr;
  }

  .pm-observatory-metrics li {
    align-items: start;
    display: grid;
  }

  .pm-observatory-metrics strong {
    text-align: left;
  }
}
.pm-observatory-nav a.pm-observatory-nav__button {
  text-decoration: none;
}

.pm-observatory-glossary-workspace {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.5fr);
  padding-top: 1.25rem;
}

.pm-observatory-glossary-browser,
.pm-observatory-glossary-form {
  display: grid;
  gap: 0.65rem;
}

.pm-observatory-glossary-browser > label,
.pm-observatory-glossary-form > label:not(.pm-observatory-glossary-enabled) {
  color: var(--pm-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pm-observatory-glossary input[type="search"],
.pm-observatory-glossary input[type="text"],
.pm-observatory-glossary textarea {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  font: inherit;
  padding: 0.7rem;
  width: 100%;
}

.pm-observatory-glossary-list {
  border-block: 1px solid var(--pm-border);
  display: grid;
  max-height: 26rem;
  overflow-y: auto;
}

.pm-observatory-glossary-list-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.7rem;
  text-align: left;
}

.pm-observatory-glossary-list-item[data-selected="true"] {
  background: var(--pm-accent-soft);
  font-weight: 700;
}

.pm-observatory-glossary-enabled {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
}

.pm-observatory-glossary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (max-width: 760px) {
  .pm-observatory-glossary-workspace {
    grid-template-columns: 1fr;
  }
}

.pm-observatory-glossary-search {
  border-bottom: 1px solid var(--pm-border);
  font-family: system-ui, sans-serif;
  margin-bottom: 0.75rem;
  padding: 0 0 0.6rem;
}

.pm-observatory-glossary-search summary {
  color: var(--pm-text);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  width: fit-content;
}

.pm-observatory-glossary-search input {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  display: block;
  font: inherit;
  margin-top: 0.55rem;
  max-width: 32rem;
  padding: 0.58rem 0.68rem;
  width: 100%;
}

.pm-observatory-glossary-heading {
  align-items: end;
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.pm-observatory-glossary-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0.1rem 0 0;
}
.pm-observatory-glossary-intro {
  color: var(--pm-muted);
  margin: 0.55rem 0 0;
  max-width: 70ch;
}

.pm-observatory-glossary-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin: 0;
}

.pm-observatory-glossary-status div {
  display: grid;
  gap: 0.1rem;
}

.pm-observatory-glossary-status dt {
  color: var(--pm-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pm-observatory-glossary-status dd {
  font-size: 0.82rem;
  margin: 0;
}

.pm-observatory-glossary-status [data-state="dirty"] {
  color: var(--pm-warning);
  font-weight: 700;
}

.pm-observatory-glossary .pm-observatory-glossary-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  max-width: 52rem;
}

.pm-observatory-glossary-form > label:not(.pm-observatory-glossary-enabled) {
  color: var(--pm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.pm-observatory-glossary input[type="text"],
.pm-observatory-glossary textarea {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  font: inherit;
  padding: 0.62rem 0.68rem;
  width: 100%;
}

.pm-observatory-glossary textarea {
  resize: vertical;
}

.pm-observatory-glossary-enabled {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
  width: fit-content;
}

.pm-observatory-glossary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.pm-observatory-glossary-form .pm-observatory-live-status {
  min-height: 1.25rem;
}

.pm-observatory-glossary-definitions {
  margin-top: 1.25rem;
}

.pm-observatory-glossary-definitions h2 {
  font-size: 1rem;
  margin: 0 0 0.45rem;
}

.pm-observatory-glossary .pm-observatory-glossary-list {
  border-top: 1px solid var(--pm-border);
  border-bottom: 0;
  display: grid;
  max-height: 38rem;
  overflow-y: auto;
}

.pm-observatory-glossary .pm-observatory-glossary-list-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0.22rem;
  padding: 0.68rem 0.55rem;
  text-align: left;
  width: 100%;
}

.pm-observatory-glossary-list-item:hover,
.pm-observatory-glossary-list-item:focus-visible,
.pm-observatory-glossary-list-item[data-selected="true"] {
  background: var(--pm-accent-soft);
  outline: none;
}

.pm-observatory-glossary-list-item strong {
  font-size: 0.82rem;
  text-transform: uppercase;
}

.pm-observatory-glossary-list-item span {
  line-height: 1.4;
}

.pm-observatory-glossary-list-item small {
  color: var(--pm-muted);
}

.pm-observatory-glossary-empty {
  color: var(--pm-muted);
  margin: 0;
  padding: 0.75rem 0;
}

@media (max-width: 760px) {
  .pm-observatory-glossary-heading {
    align-items: start;
    display: grid;
  }
}


.pm-context-admin {
  display: grid;
  gap: 1.25rem;
}

.pm-context-browser,
.pm-context-editor {
  min-width: 0;
}

.pm-context-count {
  color: var(--pm-muted);
  margin: 0.25rem 0 0;
}

.pm-context-filters {
  align-items: end;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(10rem, 1fr)) auto;
}

.pm-context-filters label,
.pm-context-form-grid label,
.pm-context-child-row label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.pm-context-filters label span,
.pm-context-form-grid label span,
.pm-context-child-row label span {
  color: var(--pm-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.pm-context-admin input,
.pm-context-admin textarea,
.pm-context-admin select {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  color: var(--pm-text);
  font: inherit;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  width: 100%;
}

.pm-context-admin textarea {
  resize: vertical;
}

.pm-context-filter-actions,
.pm-context-pagination,
.pm-context-section-heading,
.pm-context-editor-heading-actions,
.pm-context-editor .pm-observatory-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.pm-context-admin button {
  min-height: 2.35rem;
}

.pm-context-record-browser {
  min-width: 0;
}

.pm-context-record-list {
  display: grid;
  gap: 0.55rem;
}

.pm-context-record-card {
  align-items: start;
  background: color-mix(in srgb, var(--pm-surface) 88%, transparent);
  border: 1px solid var(--pm-border);
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: var(--pm-text);
  display: grid;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.75rem 0.85rem;
  text-align: left;
  width: 100%;
}

.pm-context-record-card:hover,
.pm-context-record-card:focus-visible {
  border-color: var(--pm-accent);
}

.pm-context-record-card[data-selected="true"] {
  background: color-mix(in srgb, var(--pm-accent) 10%, var(--pm-surface));
  border-color: var(--pm-accent);
  border-left-color: var(--pm-accent);
}

.pm-context-record-location,
.pm-context-record-id {
  color: var(--pm-muted);
  font-size: 0.76rem;
}

.pm-context-record-title {
  font-size: 0.98rem;
  line-height: 1.3;
}

.pm-context-record-question {
  line-height: 1.45;
}

.pm-context-record-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.pm-context-badge {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  color: var(--pm-accent);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.42rem;
}

.pm-context-empty {
  color: var(--pm-muted);
  margin: 0;
  padding: 1rem 0;
}

.pm-context-pagination {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.pm-context-editor form {
  display: grid;
  gap: 1rem;
}

.pm-context-editor fieldset {
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  margin: 0;
  min-width: 0;
  padding: 0.9rem;
}

.pm-context-editor legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.pm-context-form-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pm-context-span-2 {
  grid-column: 1 / -1;
}

.pm-context-section-heading {
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.pm-context-section-heading legend {
  float: left;
}

.pm-context-child-list {
  clear: both;
  display: grid;
  gap: 0.75rem;
}

.pm-context-child-row {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0.75rem;
}

.pm-context-child-row label:has(textarea),
.pm-context-child-row label:nth-last-child(2) {
  grid-column: span 2;
}

.pm-context-remove {
  align-self: end;
  justify-self: start;
}

[data-context-status][data-state="error"] {
  color: #e88484;
}

@media (max-width: 1100px) {
  .pm-context-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-context-child-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .pm-context-filters,
  .pm-context-form-grid,
  .pm-context-child-row {
    grid-template-columns: 1fr;
  }

  .pm-context-span-2,
  .pm-context-child-row label:has(textarea),
  .pm-context-child-row label:nth-last-child(2) {
    grid-column: auto;
  }
}

/* Context Study shell frame */
.pm-context-study-page .pm-main {
  margin: 0;
  padding: 0;
  width: 100%;
}

.pm-context-study-page .pm-workbench-nav__placeholder,
.pm-context-study-page .pm-workbench-utility__placeholder {
  background: transparent;
  border: 0;
  color: var(--pm-muted);
  font: inherit;
  opacity: 0.58;
  padding: 0;
}

.pm-context-study-page .pm-workbench-topbar__actions {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}

.pm-context-study-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100dvh - 3.7rem);
}

.pm-context-study-frame {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(420px, 1fr) minmax(220px, 280px);
  min-height: 0;
}

.pm-context-study-shell[data-canon-collapsed="true"] .pm-context-study-frame {
  grid-template-columns: 64px minmax(420px, 1fr) minmax(220px, 280px);
}

.pm-context-study-canon,
.pm-context-study-desk {
  background: var(--pm-surface);
  min-width: 0;
}

.pm-context-study-canon {
  border-right: 1px solid var(--pm-border);
  padding: 0.9rem;
}

.pm-context-study-desk {
  border-left: 1px solid var(--pm-border);
  padding: 0.9rem;
}

.pm-context-study-region-heading {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.pm-context-study-region-heading h2,
.pm-context-study-workspace__header h1 {
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0.1rem 0 0;
}

.pm-context-study-region-heading h2 {
  font-size: 1.05rem;
}

.pm-context-study-region-heading .pm-kicker,
.pm-context-study-workspace__header .pm-kicker {
  margin: 0;
}

.pm-context-study-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.pm-context-study-icon-button:hover,
.pm-context-study-icon-button:focus-visible,
.pm-context-study-canon__expand:hover,
.pm-context-study-canon__expand:focus-visible,
.pm-context-study-facets button:hover,
.pm-context-study-facets button:focus-visible {
  border-color: var(--pm-accent);
  outline: none;
}

.pm-context-study-canon__fixture {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.pm-context-study-placeholder-label {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  margin: 0 0 1rem;
}

.pm-context-study-canon__fixture h3 {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0;
  margin: 0 0 0.55rem;
}

.pm-context-study-location {
  background: var(--pm-accent-soft);
  border: 1px solid var(--pm-accent);
  border-radius: 4px;
  color: var(--pm-text);
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem;
  text-align: left;
  width: 100%;
}

.pm-context-study-location span,
.pm-context-study-location strong {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.pm-context-study-location strong {
  color: var(--pm-muted);
  font-weight: 500;
}

.pm-context-study-canon__compact {
  height: 100%;
}

.pm-context-study-canon__expand {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  gap: 0.45rem;
  min-height: 11rem;
  padding: 0.65rem 0.2rem;
  width: 100%;
}

.pm-context-study-canon__expand strong {
  color: var(--pm-accent);
  font-size: 0.72rem;
}

.pm-context-study-workspace {
  background: var(--pm-bg);
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.pm-context-study-workspace__header {
  border-bottom: 1px solid var(--pm-border);
  padding-bottom: 1rem;
}

.pm-context-study-workspace__header h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.pm-context-study-empty {
  display: grid;
  margin: clamp(3rem, 10vh, 7rem) auto;
  max-width: 40rem;
  min-height: 12rem;
  place-content: center;
  text-align: center;
}

.pm-context-study-empty h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: 0;
  margin: 0;
}

.pm-context-study-empty p {
  color: var(--pm-muted);
  margin: 0.65rem 0 0;
}

.pm-context-study-facets {
  display: grid;
  margin-top: 1rem;
}

.pm-context-study-facets button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-muted);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  padding: 0.65rem 0.2rem;
  text-align: left;
}

.pm-context-study-facets button[aria-selected="true"] {
  border-bottom-color: var(--pm-accent);
  color: var(--pm-text);
  font-weight: 700;
}

.pm-context-study-desk__panels {
  padding-top: 1rem;
}

.pm-context-study-desk__panels h3 {
  font-size: 0.95rem;
  letter-spacing: 0;
  margin: 0;
}

.pm-context-study-desk__panels p {
  color: var(--pm-muted);
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
}

.pm-context-study-status {
  align-items: center;
  background: var(--pm-surface);
  border-top: 1px solid var(--pm-border);
  display: flex;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  gap: 0.75rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
}

.pm-context-study-status span:first-child {
  color: var(--pm-muted);
  text-transform: uppercase;
}

.pm-context-study-status span:last-child {
  color: var(--pm-muted);
  margin-left: auto;
}

@media (max-width: 1100px) {
  .pm-context-study-frame {
    grid-template-columns: minmax(200px, 220px) minmax(380px, 1fr) minmax(190px, 220px);
  }

  .pm-context-study-shell[data-canon-collapsed="true"] .pm-context-study-frame {
    grid-template-columns: 58px minmax(380px, 1fr) minmax(190px, 220px);
  }
}

@media (max-width: 900px) {
  .pm-context-study-frame,
  .pm-context-study-shell[data-canon-collapsed="true"] .pm-context-study-frame {
    grid-template-columns: minmax(58px, 220px) minmax(0, 1fr);
  }

  .pm-context-study-canon {
    grid-row: 1 / span 2;
  }

  .pm-context-study-desk {
    border-left: 0;
    border-top: 1px solid var(--pm-border);
    grid-column: 2;
  }

  .pm-context-study-facets {
    gap: 0.35rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .pm-context-study-frame,
  .pm-context-study-shell[data-canon-collapsed="true"] .pm-context-study-frame {
    display: block;
  }

  .pm-context-study-canon {
    border-bottom: 1px solid var(--pm-border);
    border-right: 0;
  }

  .pm-context-study-canon__expand {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 2.75rem;
  }

  .pm-context-study-workspace {
    min-height: 55vh;
    padding: 1.25rem;
  }

  .pm-context-study-facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-context-study-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .pm-context-study-status span:last-child {
    margin-left: 0;
  }
}
/* Context Study passage resolver */
.pm-context-study-passage {
  margin: 2rem auto 0;
  max-width: 52rem;
}

.pm-context-study-breadcrumb {
  color: var(--pm-muted);
  display: flex;
  flex-wrap: wrap;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  gap: 0.4rem;
}

.pm-context-study-passage__header {
  border-bottom: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.pm-context-study-passage__header h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: 0;
  margin: 0;
}

.pm-context-study-passage__header p {
  color: var(--pm-muted);
  margin: 0.4rem 0 0;
}

.pm-context-study-scripture {
  line-height: 1.75;
  padding: 1.5rem 0;
}

.pm-context-study-scripture blockquote {
  border: 0;
  margin: 0;
  padding: 0;
}

.pm-context-study-scripture p {
  margin: 0 0 1rem;
}

.pm-context-study-passage-nav {
  border-top: 1px solid var(--pm-border);
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
}

.pm-context-study-passage-nav button {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.55rem 0.8rem;
}

.pm-context-study-passage-nav button:disabled {
  cursor: default;
  opacity: 0.45;
}

.pm-context-study-passage-nav button:not(:disabled):hover,
.pm-context-study-passage-nav button:not(:disabled):focus-visible {
  border-color: var(--pm-accent);
  outline: none;
}

.pm-context-study-passage-error {
  color: var(--pm-danger, #b42318);
  margin: 2rem auto;
  max-width: 52rem;
}

/* Context Study state visibility */
.pm-context-study-shell [hidden] {
  display: none !important;
}

/* Context Study Friction Inspector */
.pm-context-study-friction-status {
  margin-bottom: 0.8rem !important;
}

.pm-context-study-friction-list {
  display: grid;
  gap: 0.7rem;
}

.pm-context-study-friction-card {
  border: 1px solid var(--pm-border);
  border-left: 3px solid var(--pm-accent);
  border-radius: 4px;
  padding: 0.7rem;
}

.pm-context-study-friction-card h4 {
  font-size: 0.88rem;
  line-height: 1.3;
  margin: 0;
}

.pm-context-study-friction-question {
  color: var(--pm-text) !important;
  line-height: 1.45;
  margin-top: 0.45rem !important;
}

.pm-context-study-friction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.pm-context-study-friction-badge {
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  color: var(--pm-accent);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.38rem;
}

.pm-context-study-friction-id {
  color: var(--pm-muted);
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  margin-top: 0.5rem;
}

.pm-context-study-friction-editor-link {
  color: var(--pm-accent);
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  margin-top: 0.9rem;
}

/* Context Study Friction summary + study surface */

.pm-context-study-friction-summary {
  border-block: 1px solid var(--pm-border);
  margin-top: 0.75rem;
  padding: 0.75rem 0;
}

.pm-context-study-friction-summary dl {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.pm-context-study-friction-summary dl div {
  display: grid;
  gap: 0.1rem;
}

.pm-context-study-friction-summary dt {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.pm-context-study-friction-summary dd {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.pm-context-study-friction-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.7rem;
}

.pm-context-study-friction-study-button {
  background: var(--pm-accent-soft);
  border: 1px solid var(--pm-accent);
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  display: block;
  font: inherit;
  margin-top: 0.8rem;
  padding: 0.55rem 0.7rem;
  width: 100%;
}

.pm-context-study-friction-study-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.pm-context-study-friction-study-button:not(:disabled):hover,
.pm-context-study-friction-study-button:not(:disabled):focus-visible {
  outline: 1px solid var(--pm-accent);
  outline-offset: 2px;
}

.pm-context-study-friction-study {
  border-top: 1px solid var(--pm-border);
  margin: 3rem auto 0;
  max-width: 52rem;
  padding-top: 2rem;
}

.pm-context-study-friction-study__header {
  align-items: start;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.pm-context-study-friction-study__header h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin: 0.1rem 0 0;
}

.pm-context-study-friction-study__header p:last-child {
  color: var(--pm-muted);
  margin: 0.45rem 0 0;
}

.pm-context-study-friction-study__close {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 0.7rem;
}

.pm-context-study-friction-study__records {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pm-context-study-friction-study-card {
  border: 1px solid var(--pm-border);
  border-left: 3px solid var(--pm-accent);
  border-radius: 5px;
  padding: 1rem;
}

.pm-context-study-friction-study-card header {
  display: grid;
  gap: 0.55rem;
}

.pm-context-study-friction-study-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}

.pm-context-study-friction-study-label {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  margin: 0.85rem 0 0;
  text-transform: uppercase;
}

.pm-context-study-friction-study-question {
  color: var(--pm-text);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0.2rem 0 0;
}

@media (max-width: 680px) {
  .pm-context-study-friction-summary dl {
    grid-template-columns: 1fr;
  }

  .pm-context-study-friction-study__header {
    display: grid;
  }

  .pm-context-study-friction-study__close {
    justify-self: start;
  }
}

/* ==========================================================
   Context Study shell modes
   Reading -> Inspection -> Assembly
   ========================================================== */

.pm-context-study-workspace__header {
  padding-bottom: 0.45rem;
}

.pm-context-study-workspace__header .pm-kicker {
  margin: 0;
}

.pm-context-study-passage {
  margin-top: 1rem;
}

/* Reading mode */
.pm-context-study-shell[data-shell-mode="reading"] .pm-context-study-frame {
  grid-template-columns:
    minmax(220px, 260px)
    minmax(520px, 1fr)
    minmax(220px, 280px);
}

/* Inspection / Assembly:
   Canon compresses, Scripture remains visible,
   provider inspection opens immediately left of Context Desk. */
.pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-frame,
.pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-frame {
  grid-template-columns:
    64px
    minmax(340px, 0.82fr)
    minmax(360px, 1.18fr)
    minmax(220px, 280px);
}

.pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-workspace,
.pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-workspace {
  padding: 1.25rem;
}

.pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-passage,
.pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-passage {
  margin-top: 0.75rem;
  max-width: 42rem;
}

.pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-scripture,
.pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-scripture {
  font-size: 0.94rem;
  line-height: 1.65;
  padding: 1rem 0;
}

/* Inspection workspace */
.pm-context-study-inspection {
  background: color-mix(in srgb, var(--pm-surface) 72%, var(--pm-bg));
  border-left: 1px solid var(--pm-border);
  min-width: 0;
  padding: 1rem;
}

.pm-context-study-inspection__header {
  align-items: start;
  border-bottom: 1px solid var(--pm-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.85rem;
}

.pm-context-study-inspection__header h2 {
  font-size: 1.25rem;
  margin: 0.1rem 0 0;
}

.pm-context-study-inspection__header p:last-child {
  color: var(--pm-muted);
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.pm-context-study-inspection__close,
.pm-context-study-assemble-button,
.pm-context-study-assembly__close,
.pm-context-study-assembly__toolbar button {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 0.65rem;
}

.pm-context-study-inspection__actions {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.pm-context-study-assemble-button {
  background: var(--pm-accent-soft);
  border-color: var(--pm-accent);
  width: 100%;
}

/* Friction records now belong to Inspection, not beneath Scripture */
.pm-context-study-inspection .pm-context-study-friction-study__records {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pm-context-study-inspection .pm-context-study-friction-study-card {
  padding: 0.8rem;
}

.pm-context-study-inspection .pm-context-study-friction-study-card h3 {
  font-size: 0.94rem;
}

/* Lower projection assembly tray */
.pm-context-study-assembly {
  background: var(--pm-surface);
  border-top: 1px solid var(--pm-border);
  padding: 0.75rem 1rem;
}

.pm-context-study-assembly__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-context-study-assembly__header .pm-kicker {
  margin: 0;
}

.pm-context-study-assembly__header strong {
  display: block;
  margin-top: 0.1rem;
}

.pm-context-study-assembly__toolbar {
  align-items: center;
  border-top: 1px solid var(--pm-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.pm-context-study-assembly__status {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  margin-right: auto;
}

.pm-context-study-assembly__toolbar button:disabled {
  cursor: default;
  opacity: 0.45;
}

/* State visibility remains authoritative */
.pm-context-study-shell [hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-frame,
  .pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-frame {
    grid-template-columns:
      58px
      minmax(320px, 0.9fr)
      minmax(340px, 1.1fr);
  }

  .pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-desk,
  .pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-desk {
    grid-column: 2 / -1;
    border-left: 0;
    border-top: 1px solid var(--pm-border);
  }
}

@media (max-width: 780px) {
  .pm-context-study-shell[data-shell-mode="reading"] .pm-context-study-frame,
  .pm-context-study-shell[data-shell-mode="inspection"] .pm-context-study-frame,
  .pm-context-study-shell[data-shell-mode="assembly"] .pm-context-study-frame {
    display: block;
  }

  .pm-context-study-inspection {
    border-left: 0;
    border-top: 1px solid var(--pm-border);
  }
}

/* ==========================================================
   Context Tools + expandable inspection cards
   ========================================================== */

.pm-context-tools {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.pm-context-tool {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  color: var(--pm-text);
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem;
  text-align: left;
  width: 100%;
}

.pm-context-tool strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
}

.pm-context-tool span {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  line-height: 1.35;
}

.pm-context-tool:hover,
.pm-context-tool:focus-visible,
.pm-context-tool[data-selected="true"] {
  background: var(--pm-accent-soft);
  border-color: var(--pm-accent);
  outline: none;
}

.pm-context-tool:disabled {
  cursor: default;
  opacity: 0.46;
}

.pm-context-tool:disabled:hover {
  background: transparent;
  border-color: var(--pm-border);
}


/* Inspection cards become disclosure rows rather than
   permanently expanded cards. */

.pm-context-study-inspection
.pm-context-study-friction-study-card {
  overflow: hidden;
  padding: 0;
}

.pm-context-study-friction-card-trigger {
  align-items: start;
  background: transparent;
  border: 0;
  color: var(--pm-text);
  cursor: pointer;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 0.8rem;
  text-align: left;
  width: 100%;
}

.pm-context-study-friction-card-trigger:hover,
.pm-context-study-friction-card-trigger:focus-visible {
  background: var(--pm-accent-soft);
  outline: none;
}

.pm-context-study-friction-card-heading {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.pm-context-study-friction-card-heading > strong {
  font-size: 0.92rem;
  line-height: 1.32;
}

.pm-context-study-friction-card-heading
.pm-context-study-friction-meta {
  margin-top: 0;
}

.pm-context-study-friction-disclosure {
  color: var(--pm-accent);
  flex: 0 0 auto;
  font-family: system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.pm-context-study-friction-card-detail {
  border-top: 1px solid var(--pm-border);
  padding: 0.8rem;
}

.pm-context-study-friction-fields {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.pm-context-study-friction-field {
  display: grid;
  gap: 0.12rem;
}

.pm-context-study-friction-field dt {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pm-context-study-friction-field dd {
  font-size: 0.86rem;
  line-height: 1.48;
  margin: 0;
}


/* The Assembly scaffold remains below the working field.
   It is no longer launched from the inspection column. */

.pm-context-study-inspection__actions {
  display: none;
}


/* ==========================================================
   Friction detail — prose first, metadata last
   ========================================================== */

.pm-context-study-friction-card-trigger {
  padding: 0.62rem 0.72rem;
}

.pm-context-study-friction-card-heading {
  gap: 0.3rem;
}

.pm-context-study-friction-card-title {
  font-size: 0.88rem;
  line-height: 1.25;
}

.pm-context-study-friction-card-heading
.pm-context-study-friction-meta {
  gap: 0.28rem;
}

.pm-context-study-friction-card-heading
.pm-context-study-friction-badge {
  font-size: 0.59rem;
  padding: 0.08rem 0.3rem;
}

.pm-context-study-friction-card-detail {
  padding: 0;
}

.pm-context-study-friction-card-detail-body {
  display: grid;
  gap: 0;
}

.pm-context-study-friction-resolution {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0;
  padding: 0.9rem 0.85rem;
}

.pm-context-study-friction-insight {
  border-top: 1px solid var(--pm-border);
  padding: 0.8rem 0.85rem;
}

.pm-context-study-friction-insight h4 {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

.pm-context-study-friction-insight p {
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

.pm-context-study-friction-more {
  border-top: 1px solid var(--pm-border);
  font-family: system-ui, sans-serif;
  padding: 0.65rem 0.85rem;
}

.pm-context-study-friction-more summary {
  color: var(--pm-muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.pm-context-study-friction-more-fields {
  display: grid;
  gap: 0.6rem;
  margin: 0.7rem 0 0;
}

.pm-context-study-friction-more-field {
  display: grid;
  gap: 0.12rem;
}

.pm-context-study-friction-more-field dt {
  color: var(--pm-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pm-context-study-friction-more-field dd {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
}

.pm-context-study-friction-record-footer {
  align-items: center;
  border-top: 1px solid var(--pm-border);
  color: var(--pm-muted);
  display: flex;
  flex-wrap: wrap;
  font-family: system-ui, sans-serif;
  font-size: 0.61rem;
  gap: 0.28rem 0.5rem;
  padding: 0.55rem 0.85rem;
}

.pm-context-study-friction-record-footer span:not(:last-child)::after {
  content: "·";
  margin-left: 0.5rem;
}

.pm-context-study-friction-detail-loading {
  color: var(--pm-muted);
  font-size: 0.78rem;
  margin: 0;
  padding: 0.85rem;
}

.pm-context-study-friction-detail-error {
  color: var(--pm-danger, #b42318);
  font-size: 0.78rem;
  margin: 0;
  padding: 0.85rem;
}


/* ==========================================================
   Workbench Contents navigation
   Reader navigation grammar, Workbench-owned behavior
   ========================================================== */

.pm-context-study-canon {
  padding: 0.8rem;
  position: relative;
}

.pm-context-study-contents-close {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

.pm-context-study-contents-close:hover,
.pm-context-study-contents-close:focus-visible {
  border-color: var(--pm-accent);
  outline: none;
}

.pm-context-study-canon-tabs {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.pm-context-study-canon-tab {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  color: var(--pm-muted);
  font: inherit;
  padding: 0.55rem;
}

.pm-context-study-canon-tab[aria-selected="true"] {
  background: var(--pm-accent-soft);
  border-color: var(--pm-accent);
  color: var(--pm-text);
  font-weight: 700;
}

.pm-context-study-canon-tab:disabled {
  opacity: 0.55;
}

.pm-context-study-canon-book {
  margin-top: 1rem;
}

.pm-context-study-canon-book .pm-context-study-placeholder-label {
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.pm-context-study-canon-book h2 {
  font-size: 1.35rem;
  margin: 0;
}

.pm-context-study-canon-navigation {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.pm-context-study-canon-movement {
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  overflow: hidden;
}

.pm-context-study-canon-movement__summary {
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  list-style: none;
  padding: 0.7rem;
}

.pm-context-study-canon-movement__summary::-webkit-details-marker {
  display: none;
}

.pm-context-study-canon-movement__summary::before {
  content: "▶";
  color: var(--pm-muted);
  float: left;
  font-size: 0.7rem;
  margin-right: 0.4rem;
}

.pm-context-study-canon-movement[open]
.pm-context-study-canon-movement__summary::before {
  content: "▼";
}

.pm-context-study-canon-movement__heading {
  display: grid;
  gap: 0.15rem;
}

.pm-context-study-canon-movement__heading strong {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.pm-context-study-canon-movement__heading span {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.pm-context-study-canon-movement__summary small {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
}

.pm-context-study-canon-pericopes {
  border-top: 1px solid var(--pm-border);
  display: grid;
  padding: 0.4rem;
}

.pm-context-study-canon-pericope {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--pm-text);
  cursor: pointer;
  display: grid;
  gap: 0.12rem;
  padding: 0.52rem 0.55rem;
  text-align: left;
  width: 100%;
}

.pm-context-study-canon-pericope strong {
  font-size: 0.79rem;
  line-height: 1.25;
}

.pm-context-study-canon-pericope span {
  color: var(--pm-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.pm-context-study-canon-pericope:hover,
.pm-context-study-canon-pericope:focus-visible,
.pm-context-study-canon-pericope[data-current="true"] {
  background: var(--pm-accent-soft);
  outline: none;
}

.pm-context-study-canon-pericope[data-current="true"] strong {
  color: var(--pm-text);
}

.pm-context-study-canon-pericope[data-current="true"] span {
  color: var(--pm-text);
}


/* Compact state: no internal IDs. Just Contents. */

.pm-context-study-shell[data-canon-collapsed="true"]
.pm-context-study-canon {
  padding: 0.4rem;
}

.pm-context-study-canon__compact {
  height: auto;
}

.pm-context-study-canon__expand {
  align-items: center;
  gap: 0.3rem;
  justify-content: flex-start;
  min-height: 4.8rem;
  padding: 0.5rem 0.15rem;
}

.pm-context-study-canon__expand span:last-child {
  font-size: 0.62rem;
  line-height: 1.05;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.pm-context-study-contents-icon {
  color: var(--pm-accent);
  font-size: 0.9rem !important;
  writing-mode: initial !important;
  transform: none !important;
}


/* Inspection prioritizes Scripture over the tool column slightly
   more than the previous layout. */

.pm-context-study-shell[data-shell-mode="inspection"]
.pm-context-study-frame,
.pm-context-study-shell[data-shell-mode="assembly"]
.pm-context-study-frame {
  grid-template-columns:
    72px
    minmax(360px, 1.05fr)
    minmax(330px, 0.9fr)
    minmax(220px, 260px);
}

.pm-context-study-inspection {
  padding: 0.8rem;
}

.pm-context-study-inspection__header {
  padding-bottom: 0.65rem;
}

.pm-context-study-inspection
.pm-context-study-friction-study__records {
  gap: 0.55rem;
  margin-top: 0.7rem;
}


/* When Contents is opened while inspecting, it behaves like the
   Reader drawer and overlays the working area instead of forcing
   another permanent wide column. */

.pm-context-study-shell[data-shell-mode="inspection"]
[data-canon-collapsed="false"]
.pm-context-study-canon__expanded,
.pm-context-study-shell[data-shell-mode="assembly"]
[data-canon-collapsed="false"]
.pm-context-study-canon__expanded {
  background: var(--pm-surface);
  border-right: 1px solid var(--pm-border);
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.24);
  left: 0;
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  padding: 0.85rem;
  position: absolute;
  top: 0;
  width: min(20rem, 82vw);
  z-index: 30;
}


/* In Reading state the full Contents navigator occupies its
   ordinary left column. */

.pm-context-study-shell[data-shell-mode="reading"]
.pm-context-study-frame {
  grid-template-columns:
    minmax(250px, 290px)
    minmax(520px, 1fr)
    minmax(220px, 280px);
}


/* The Context Study eyebrow is unnecessary once Inspection owns
   the active middle surface. */

.pm-context-study-shell[data-shell-mode="inspection"]
.pm-context-study-workspace__header,
.pm-context-study-shell[data-shell-mode="assembly"]
.pm-context-study-workspace__header {
  display: none;
}


@media (max-width: 1180px) {
  .pm-context-study-shell[data-shell-mode="inspection"]
  .pm-context-study-frame,
  .pm-context-study-shell[data-shell-mode="assembly"]
  .pm-context-study-frame {
    grid-template-columns:
      64px
      minmax(320px, 1fr)
      minmax(320px, 0.9fr);
  }

  .pm-context-study-shell[data-shell-mode="inspection"]
  .pm-context-study-desk,
  .pm-context-study-shell[data-shell-mode="assembly"]
  .pm-context-study-desk {
    grid-column: 2 / -1;
  }
}


/* Contents drawer toggle refinement */

.pm-context-study-contents-close {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  justify-content: flex-start;
  text-align: left;
}

.pm-context-study-contents-close
.pm-context-study-contents-icon {
  color: var(--pm-accent);
  flex: 0 0 auto;
  font-size: 1rem !important;
}

.pm-context-study-contents-close span:last-child {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}


/* ==========================================================
   Canon collapsed handle — remove empty navigation surface
   ========================================================== */

/* Inspection/assembly: collapsed Canon is only a small drawer handle,
   not a full-height navigation rail. */
.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-frame,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-frame {
  grid-template-columns:
    44px
    minmax(360px, 1.05fr)
    minmax(330px, 0.9fr)
    minmax(220px, 260px);
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-canon,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-canon {
  align-self: start;
  background: transparent;
  border-right: 0;
  min-height: 0;
  padding: 0.35rem 0;
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-canon__compact,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-canon__compact {
  height: auto;
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-canon__expand,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-canon__expand {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  min-height: 0;
  padding: 0.55rem 0.25rem;
  width: 42px;
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-canon__expand span:last-child,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-canon__expand span:last-child {
  display: none;
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="true"]
.pm-context-study-contents-icon,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="true"]
.pm-context-study-contents-icon {
  font-size: 1rem !important;
}


/* Important: when Contents is opened during inspection, show the
   full navigation as an overlay from the left rather than widening
   the permanent grid column. */
.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="false"]
.pm-context-study-canon,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="false"]
.pm-context-study-canon {
  align-self: start;
  background: transparent;
  border-right: 0;
  min-height: 0;
  padding: 0;
  position: relative;
}

.pm-context-study-shell[data-shell-mode="inspection"][data-canon-collapsed="false"]
.pm-context-study-canon__expanded,
.pm-context-study-shell[data-shell-mode="assembly"][data-canon-collapsed="false"]
.pm-context-study-canon__expanded {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left: 0;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.28);
  left: 0;
  max-height: calc(100dvh - 4.5rem);
  overflow-y: auto;
  padding: 0.85rem;
  position: absolute;
  top: 0;
  width: min(20rem, 82vw);
  z-index: 40;
}


/* ==========================================================
   Workbench whole-Bible navigation
   ========================================================== */

.pm-context-study-bible {
  margin-top: 1rem;
}

.pm-context-study-bible__heading {
  border-bottom: 1px solid var(--pm-border);
  padding-bottom: 0.65rem;
}

.pm-context-study-bible__heading
.pm-context-study-placeholder-label {
  margin-bottom: 0.25rem;
}

.pm-context-study-bible__heading p:last-child {
  color: var(--pm-muted);
  font-size: 0.72rem;
  margin: 0;
}

.pm-context-study-bible__books {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
}

.pm-context-study-bible-section {
  display: grid;
  gap: 0.45rem;
}

.pm-context-study-bible-section h3 {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.pm-context-study-bible-book-grid {
  display: grid;
  gap: 0.35rem;
}

.pm-context-study-bible-book {
  border: 1px solid var(--pm-border);
  border-radius: 5px;
}

.pm-context-study-bible-book[data-current="true"] {
  border-color: var(--pm-accent);
}

.pm-context-study-bible-book > summary {
  align-items: baseline;
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
  list-style: none;
  padding: 0.55rem 0.6rem;
}

.pm-context-study-bible-book > summary::-webkit-details-marker {
  display: none;
}

.pm-context-study-bible-book > summary strong {
  font-size: 0.82rem;
}

.pm-context-study-bible-book > summary small {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
}

.pm-context-study-bible-book__movements {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.7rem;
  max-height: 24rem;
  overflow-y: auto;
  padding: 0.55rem;
}

.pm-context-study-bible-movement {
  display: grid;
  gap: 0.25rem;
}

.pm-context-study-bible-movement > strong {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.64rem;
}

.pm-context-study-bible-pericope {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--pm-text);
  cursor: pointer;
  display: grid;
  gap: 0.08rem;
  padding: 0.38rem 0.45rem;
  text-align: left;
  width: 100%;
}

.pm-context-study-bible-pericope:hover,
.pm-context-study-bible-pericope:focus-visible {
  background: var(--pm-accent-soft);
  outline: none;
}

.pm-context-study-bible-pericope span {
  font-size: 0.72rem;
  font-weight: 700;
}

.pm-context-study-bible-pericope small {
  color: var(--pm-muted);
  font-size: 0.68rem;
  line-height: 1.25;
}


/* ==========================================================
   Canon density + independent navigation scroll
   ========================================================== */

.pm-context-study-canon__expanded {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 6rem);
  min-height: 0;
}

.pm-context-study-canon-toolbar {
  align-items: stretch;
  display: grid;
  flex: 0 0 auto;
  gap: 0.4rem;
  grid-template-columns: 42px minmax(0, 1fr);
}

.pm-context-study-canon-toolbar
.pm-context-study-contents-close {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.pm-context-study-canon-toolbar
.pm-context-study-canon-tabs {
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.pm-context-study-canon-book {
  margin-top: 0.8rem;
}

.pm-context-study-canon-book h2 {
  font-size: 1.35rem;
  margin: 0;
}


/* Each tab panel owns its scrolling.
   Long books / all-66-book Bible no longer lengthen the study grid. */

.pm-context-study-canon__expanded
[data-canon-panel] {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
}

.pm-context-study-canon__expanded
[data-canon-panel="contents"] {
  margin-top: 0.15rem;
}

.pm-context-study-canon__expanded
[data-canon-panel="bible"] {
  margin-top: 0.7rem;
}


/* ==========================================================
   Projection Assembly — normal-flow lower workspace
   ========================================================== */

.pm-context-study-assembly {
  background: var(--pm-surface);
  border-top: 1px solid var(--pm-border);
  padding: 0;
  position: relative;
  width: 100%;
}

.pm-context-study-assembly__handle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--pm-text);
  cursor: pointer;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  text-align: left;
  width: 100%;
}

.pm-context-study-assembly__handle:hover,
.pm-context-study-assembly__handle:focus-visible {
  background: var(--pm-accent-soft);
  outline: none;
}

.pm-context-study-assembly__handle-copy {
  display: grid;
  gap: 0.08rem;
}

.pm-context-study-assembly__handle-copy .pm-kicker {
  margin: 0;
}

.pm-context-study-assembly__handle-copy strong {
  font-size: 0.9rem;
}

.pm-context-study-assembly__handle-state {
  color: var(--pm-accent);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.pm-context-study-assembly__body {
  border-top: 1px solid var(--pm-border);
  padding: 1rem;
}


/* Important:
   Assembly grows the document. Do not give it an internal
   fixed-height scrolling box. */

.pm-context-study-assembly__workspace {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  min-height: 20rem;
  padding-top: 1rem;
}

.pm-context-study-assembly__workspace p {
  color: var(--pm-muted);
  margin: 0;
  max-width: 48rem;
}

.pm-context-study-assembly[data-expanded="false"]
.pm-context-study-assembly__body {
  display: none;
}


/* Keep upper study region viewport-oriented even when the
   Bible navigation contains the entire canon. */

.pm-context-study-frame {
  min-height: calc(100dvh - 7rem);
}


/* Preserve hidden-state authority. */

.pm-context-study-shell [hidden] {
  display: none !important;
}


/* ==========================================================
   Chronology Inspector — current window foundation
   ========================================================== */

.pm-context-study-chronology-card {
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  overflow: hidden;
}

.pm-context-study-chronology-card--current {
  border-left: 3px solid var(--pm-accent);
  padding: 0.9rem;
}

.pm-context-study-chronology-card--empty {
  color: var(--pm-muted);
  padding: 0.9rem;
}

.pm-context-study-chronology-card--empty h3 {
  color: var(--pm-text);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.pm-context-study-chronology-card--empty p {
  margin: 0;
}

.pm-context-study-chronology-display {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.4;
  margin: 0.3rem 0 0.55rem;
}

.pm-context-study-chronology-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.pm-context-study-chronology-chip {
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  color: var(--pm-accent);
  font-family: system-ui, sans-serif;
  font-size: 0.59rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.13rem 0.38rem;
}

.pm-context-study-chronology-location {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  margin: 0.7rem 0 0;
}

.pm-context-study-chronology-anchors {
  border-top: 1px solid var(--pm-border);
  margin-top: 0.8rem;
  padding-top: 0.75rem;
}

.pm-context-study-chronology-anchors h4 {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}

.pm-context-study-chronology-anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pm-context-study-chronology-support {
  border-top: 1px solid var(--pm-border);
  margin-top: 0.8rem;
  padding-top: 0.7rem;
}

.pm-context-study-chronology-support summary {
  color: var(--pm-muted);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
}

.pm-context-study-chronology-support p {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.6rem 0 0;
}


/* Temporal-neighborhood scaffold.
   Intentionally non-authoritative until governed relationships exist. */

.pm-context-study-chronology-neighborhood {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.7rem;
}

.pm-context-study-chronology-neighbor {
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  padding: 0.65rem;
}

.pm-context-study-chronology-neighbor h4 {
  color: var(--pm-accent);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.035em;
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

.pm-context-study-chronology-neighbor p {
  color: var(--pm-muted);
  font-size: 0.7rem;
  line-height: 1.35;
  margin: 0;
}

@media (max-width: 1100px) {
  .pm-context-study-chronology-neighborhood {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   Chronology Temporal Neighborhood
   ========================================================== */

.pm-context-study-chronology-neighborhood-section {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 0.85rem;
}

.pm-context-study-chronology-neighborhood-heading {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.pm-context-study-chronology-neighbor-list {
  display: grid;
  gap: 0.6rem;
}

.pm-context-study-chronology-neighbor-item {
  display: grid;
  gap: 0.3rem;
}

.pm-context-study-chronology-neighbor-item + 
.pm-context-study-chronology-neighbor-item {
  border-top: 1px solid var(--pm-border);
  padding-top: 0.55rem;
}

.pm-context-study-chronology-neighbor-item strong {
  font-size: 0.78rem;
  line-height: 1.3;
}

.pm-context-study-chronology-neighbor-item p {
  color: var(--pm-muted);
  font-size: 0.7rem;
  line-height: 1.4;
  margin: 0;
}

.pm-context-study-chronology-neighbor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}


/* Academic Workbench — compact resolved-passage heading */
.pm-context-study-passage {
  position: relative;
}

.pm-context-study-breadcrumb {
  display: grid;
  gap: 0.18rem;
  padding-right: 10.5rem;
}

.pm-context-study-breadcrumb > span:not([aria-hidden="true"]) {
  display: block;
  line-height: 1.35;
}

.pm-context-study-breadcrumb > span[aria-hidden="true"] {
  display: none;
}

.pm-context-study-passage-nav {
  border-top: 0;
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  padding-top: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.pm-context-study-passage-nav button {
  min-width: 4.5rem;
}

@media (max-width: 680px) {
  .pm-context-study-breadcrumb {
    padding-right: 0;
  }

  .pm-context-study-passage-nav {
    margin-bottom: 0.9rem;
    position: static;
  }

  .pm-context-study-passage {
    display: flex;
    flex-direction: column;
  }

  .pm-context-study-passage-nav {
    align-self: flex-end;
    order: -1;
  }
}
/* Participant Context Study Cart */

.pm-study-cart-shell {
  display: grid;
  gap: 1.25rem;
}

.pm-study-cart-focus {
  align-items: end;
  display: grid;
  gap: 0.45rem;
  max-width: 34rem;
}

.pm-study-cart-focus label {
  color: var(--pm-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.pm-study-cart-focus__controls {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.pm-study-cart-focus input {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  color: var(--pm-text);
  font: inherit;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
}

.pm-study-cart-status,
.pm-study-cart-availability > header p,
.pm-study-cart-empty,
.pm-study-cart-return {
  color: var(--pm-muted);
  margin: 0;
}

.pm-study-cart-passage {
  border-block: 1px solid var(--pm-border);
  padding: 1rem 0;
}

.pm-study-cart-passage h2,
.pm-study-cart-availability h2,
.pm-study-cart h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  margin: 0;
}

.pm-study-cart-passage h2 {
  font-size: 1.55rem;
}

.pm-study-cart-workspace {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr);
}

.pm-study-cart-availability,
.pm-study-cart {
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  min-width: 0;
  padding: 1rem;
}

.pm-study-cart-availability > header,
.pm-study-cart > header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-study-cart-provider {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 0.9rem;
}

.pm-study-cart-provider h3 {
  font-size: 0.85rem;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.pm-study-cart-options {
  display: grid;
}

.pm-study-cart-option {
  align-items: start;
  border-top: 1px solid color-mix(in srgb, var(--pm-border) 65%, transparent);
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.75rem 0;
}

.pm-study-cart-option:first-child {
  border-top: 0;
}

.pm-study-cart-option input {
  margin-top: 0.2rem;
}

.pm-study-cart-option > span,
.pm-study-cart-items li > span {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.pm-study-cart-option strong,
.pm-study-cart-items strong {
  overflow-wrap: anywhere;
}

.pm-study-cart-option span span,
.pm-study-cart-items small {
  color: var(--pm-muted);
  line-height: 1.45;
}

.pm-study-cart > header strong {
  color: var(--pm-accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.pm-study-cart-items {
  display: grid;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.pm-study-cart-items:empty {
  margin: 0;
}

.pm-study-cart-items li {
  align-items: start;
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem 0;
}

.pm-study-cart-remove {
  background: transparent;
  border: 0;
  color: var(--pm-accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.2rem;
}

.pm-study-cart-empty {
  padding: 0.8rem 0;
}

.pm-study-cart-save {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.9rem;
}

.pm-study-cart-save label {
  color: var(--pm-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.pm-study-cart-save label span {
  font-weight: 400;
}

.pm-study-cart-save input,
.pm-study-cart-save textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  color: var(--pm-text);
  font: inherit;
  padding: 0.55rem 0.65rem;
  width: 100%;
}

.pm-study-cart-save textarea {
  resize: vertical;
}

.pm-study-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.pm-study-cart-save-status {
  color: var(--pm-muted);
  margin: 0;
  min-height: 1.4em;
}

.pm-study-cart-shell [hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .pm-study-cart-workspace,
  .pm-study-cart-focus__controls {
    grid-template-columns: 1fr;
  }

  .pm-study-cart-focus__controls .pm-button {
    justify-self: start;
  }
}

/* Academic Workbench application form */

.pm-workbench-application-form {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.25rem;
  max-width: 52rem;
}

.pm-workbench-application-form .pm-field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.pm-workbench-application-form .pm-field > label {
  color: var(--pm-text);
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
}

.pm-workbench-application-form textarea {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--pm-text);
  font: 0.95rem/1.5 system-ui, sans-serif;
  min-height: 8rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  resize: vertical;
  width: 100%;
}

.pm-workbench-application-form textarea:focus {
  border-color: var(--pm-accent);
  box-shadow: 0 0 0 3px var(--pm-accent-soft);
  outline: none;
}

.pm-workbench-application-form input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.pm-workbench-application-form .pm-field:has(input[type="checkbox"]) label {
  align-items: flex-start;
  display: flex;
  font-weight: 500;
  gap: 0.55rem;
}

.pm-workbench-application-form > p {
  margin: 0;
}

@media (max-width: 720px) {
  .pm-workbench-application-form {
    max-width: none;
  }

  .pm-workbench-application-form textarea {
    min-height: 7rem;
  }
}

/* Study Desk — durable Study Unit workspace */

.pm-study-desk {
  margin: 0 auto;
  max-width: 66rem;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}

.pm-study-desk__heading {
  max-width: 46rem;
}

.pm-study-desk__heading h1 {
  margin-bottom: 0.55rem;
}

.pm-study-desk__heading > p:last-child,
.pm-study-desk__opening,
.pm-study-desk__fatal {
  color: var(--pm-muted);
  line-height: 1.6;
}

.pm-study-desk__form {
  display: grid;
  gap: 1.3rem;
  margin-top: 2rem;
}

.pm-study-desk__form[hidden],
.pm-study-desk [hidden] {
  display: none;
}

.pm-study-desk__field {
  display: grid;
  gap: 0.45rem;
}

.pm-study-desk__field label {
  font-weight: 700;
}

.pm-study-desk__field label span,
.pm-study-desk__field > p,
.pm-study-desk__record-state {
  color: var(--pm-muted);
  font-size: 0.86rem;
}

.pm-study-desk__field > p,
.pm-study-desk__record-state {
  margin: 0;
}

.pm-study-desk__field input,
.pm-study-desk__field textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  font: inherit;
  line-height: 1.55;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

.pm-study-desk__field textarea {
  resize: vertical;
}

.pm-study-desk__field--title input {
  font-size: 1.25rem;
  font-weight: 650;
}

.pm-study-desk__field--body textarea {
  min-height: 25rem;
}

.pm-study-desk__field input:focus,
.pm-study-desk__field textarea:focus {
  border-color: var(--pm-accent);
  outline: 2px solid color-mix(in srgb, var(--pm-accent) 28%, transparent);
  outline-offset: 1px;
}

.pm-study-desk__references {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

.pm-study-desk__references h2 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.75rem;
}

.pm-study-desk__references ol {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

.pm-study-desk__references li {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.2rem;
  padding-top: 0.55rem;
}

.pm-study-desk__references li span,
.pm-study-desk__references > p {
  color: var(--pm-muted);
  font-size: 0.88rem;
}

.pm-study-desk__references a,
.pm-study-desk__footer a {
  color: var(--pm-accent);
}

.pm-study-desk__save-row,
.pm-study-desk__footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}

.pm-study-desk__save-row {
  border-top: 1px solid var(--pm-border);
  padding-top: 1rem;
}

.pm-study-desk__save-status {
  color: var(--pm-muted);
  margin: 0 0 0.2rem;
}

.pm-study-desk__save-status[data-tone="editing"],
.pm-study-desk__save-status[data-tone="saving"] {
  color: var(--pm-text);
}

.pm-study-desk__save-status[data-tone="error"] {
  color: var(--pm-danger, #a13b32);
  font-weight: 650;
}

.pm-study-desk__notice {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left: 4px solid var(--pm-accent);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.pm-study-desk__notice h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.pm-study-desk__notice p {
  color: var(--pm-muted);
  margin: 0 0 0.85rem;
}

.pm-study-desk__footer {
  border-top: 1px solid var(--pm-border);
  justify-content: flex-start;
  padding-top: 1rem;
}

/* Template Workspace — governed Study Development method */

.pm-template-workspace__orientation,
.pm-template-workspace__index,
.pm-template-workspace__assistance,
.pm-template-workspace__mature,
.pm-mature-revision__boundary,
.pm-mature-revision__submission,
.pm-template-workspace__section {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 10px;
  padding: clamp(1rem, 3vw, 1.4rem);
}

.pm-template-workspace__orientation {
  border-left: 4px solid var(--pm-accent);
}

.pm-template-workspace__mature,
.pm-mature-revision__boundary,
.pm-mature-revision__submission {
  border-left: 4px solid var(--pm-accent);
}

.pm-template-workspace__mature,
.pm-mature-revision__submission {
  align-items: start;
  display: grid;
  gap: 0.8rem;
}

.pm-template-workspace__mature p,
.pm-mature-revision__boundary p,
.pm-mature-revision__submission p,
.pm-mature-revision__submissions {
  color: var(--pm-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.pm-template-workspace__mature h2,
.pm-mature-revision__boundary h2,
.pm-mature-revision__submission h2 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.55rem;
}

.pm-template-workspace__mature .pm-button,
.pm-mature-revision__submission .pm-button {
  justify-self: start;
}

.pm-mature-revision__submissions {
  display: grid;
  font-size: 0.86rem;
  gap: 0.35rem;
  margin-top: 0.2rem;
  padding-left: 1.2rem;
}

.pm-template-workspace__orientation h2,
.pm-template-workspace__index h2,
.pm-template-workspace__assistance h2,
.pm-template-workspace__section h2 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.55rem;
}

.pm-template-workspace__orientation > p:not(.pm-kicker),
.pm-template-workspace__guidance,
.pm-template-workspace__watch p {
  color: var(--pm-muted);
  line-height: 1.6;
}

.pm-template-workspace__orientation > p:last-child,
.pm-template-workspace__guidance,
.pm-template-workspace__watch p {
  margin-bottom: 0;
}

.pm-template-workspace__index ol {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.pm-template-workspace__index li {
  align-items: center;
  border-top: 1px solid var(--pm-border);
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  padding-top: 0.45rem;
}

.pm-template-workspace__index a {
  color: var(--pm-accent);
}

.pm-template-workspace__assistance {
  background: color-mix(in srgb, var(--pm-surface) 72%, transparent);
}

.pm-template-workspace__assistance > div:first-child > p:last-child,
.pm-template-workspace__assistance > [role="status"],
.pm-template-workspace__assistance-columns section > p,
.pm-template-workspace__assistance-columns li span,
.pm-template-workspace__assistance-columns li p {
  color: var(--pm-muted);
  line-height: 1.55;
}

.pm-template-workspace__assistance > [role="status"] {
  border-top: 1px solid var(--pm-border);
  font-size: 0.86rem;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
}

.pm-template-workspace__assistance-columns {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.pm-template-workspace__assistance-columns section {
  border-top: 1px solid var(--pm-border);
  padding-top: 0.85rem;
}

.pm-template-workspace__assistance-columns h3 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}

.pm-template-workspace__assistance-columns section > p {
  font-size: 0.86rem;
  margin: 0 0 0.75rem;
}

.pm-template-workspace__assistance-columns ul {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.pm-template-workspace__assistance-columns li {
  border-left: 2px solid var(--pm-border);
  display: grid;
  gap: 0.2rem;
  padding-left: 0.65rem;
}

.pm-template-workspace__assistance-columns li p,
.pm-template-workspace__assistance-columns li span {
  font-size: 0.82rem;
  margin: 0;
}

.pm-template-workspace__assistance-columns a {
  color: var(--pm-accent);
  font-size: 0.86rem;
}

.pm-template-workspace__sections {
  display: grid;
  gap: 1rem;
}

.pm-template-workspace__section {
  scroll-margin-top: 1rem;
}

.pm-template-workspace__section-heading {
  align-items: start;
  display: grid;
  grid-template-columns: 1fr auto;
}

.pm-template-workspace__section-heading .pm-kicker {
  grid-column: 1 / -1;
}

.pm-template-workspace__working-state,
.pm-template-workspace__index li span {
  color: var(--pm-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pm-template-workspace__working-state[data-state="has-notes"],
.pm-template-workspace__index li span[data-state="has-notes"] {
  color: var(--pm-text);
}

.pm-template-workspace__question {
  font-size: 1rem;
  font-weight: 650;
  margin: 0;
}

.pm-template-workspace__watch {
  border-bottom: 1px solid var(--pm-border);
  padding-bottom: 0.8rem;
}

.pm-template-workspace__watch summary {
  color: var(--pm-accent);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 650;
}

.pm-template-workspace__section textarea {
  min-height: 12rem;
}

@media (max-width: 720px) {
  .pm-study-desk__field--body textarea {
    min-height: 20rem;
  }

  .pm-study-desk__save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pm-template-workspace__index ol {
    grid-template-columns: 1fr;
  }

  .pm-template-workspace__assistance-columns {
    grid-template-columns: 1fr;
  }
}

/* Academic Workbench participant continuity */

.pm-participant-home,
.pm-participant-studies,
.pm-participant-tools {
  margin: 0 auto;
  max-width: 72rem;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}

.pm-participant-home__hero,
.pm-participant-page-heading {
  max-width: 48rem;
}

.pm-participant-home__hero h1,
.pm-participant-page-heading h1 {
  margin-bottom: 0.65rem;
}

.pm-participant-home__hero > p:last-child,
.pm-participant-page-heading > p:last-child {
  color: var(--pm-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.pm-participant-home__primary,
.pm-participant-home__secondary {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.pm-participant-home__primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pm-participant-home__secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-participant-path,
.pm-participant-continuity,
.pm-participant-tool,
.pm-participant-study-detail {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 12px;
  padding: clamp(1.15rem, 3vw, 1.75rem);
}

.pm-participant-path h2,
.pm-participant-home__secondary h2,
.pm-participant-continuity h2,
.pm-participant-tool h2,
.pm-participant-study-detail h2 {
  margin: 0.25rem 0 0.65rem;
}

.pm-participant-path__note,
.pm-participant-tools__boundary {
  color: var(--pm-muted);
  font-size: 0.9rem;
}

.pm-participant-home__secondary {
  border-top: 1px solid var(--pm-border);
  padding-top: 1.25rem;
}

.pm-participant-home__secondary > section {
  padding: 0 0.25rem;
}

.pm-participant-home a:not(.pm-button),
.pm-participant-studies a:not(.pm-button),
.pm-participant-tools a:not(.pm-button) {
  color: var(--pm-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.pm-participant-home a:not(.pm-button):focus-visible,
.pm-participant-studies a:not(.pm-button):focus-visible,
.pm-participant-tools a:not(.pm-button):focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--pm-accent);
  outline-offset: 3px;
}

.pm-participant-continuity {
  margin-top: 1rem;
}

.pm-participant-working-pads {
  border-bottom: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-bottom: 1.2rem;
}

.pm-participant-working-pads h3,
.pm-participant-continuity__studies-heading {
  font-size: 1rem;
  margin: 0.75rem 0 0.35rem;
}

.pm-participant-continuity > header,
.pm-participant-tool {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-participant-status,
.pm-participant-empty {
  color: var(--pm-muted);
}

.pm-participant-study-list {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.pm-participant-study-list a {
  border: 1px solid var(--pm-border);
  border-radius: 9px;
  color: var(--pm-text);
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.pm-participant-study-list a:hover,
.pm-participant-study-list a:focus-visible {
  border-color: var(--pm-accent);
}

.pm-participant-study-list span,
.pm-participant-study-list small {
  color: var(--pm-muted);
}

.pm-my-studies-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.pm-my-studies-filters button {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  color: var(--pm-text);
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 0.85rem;
}

.pm-my-studies-filters button[aria-pressed="true"] {
  background: var(--pm-accent);
  border-color: var(--pm-accent);
  color: var(--pm-surface);
}

.pm-my-studies-index {
  border-top: 1px solid var(--pm-border);
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.pm-my-studies-index__item {
  align-items: start;
  border-bottom: 1px solid var(--pm-border);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1.15rem 0;
}

.pm-my-studies-index__content {
  min-width: 0;
}

.pm-my-studies-index__content h2,
.pm-my-studies-index__content p {
  margin: 0;
}

.pm-my-studies-index__content h2 {
  font-size: 1.1rem;
}

.pm-my-studies-index__focus,
.pm-my-studies-index__meta,
.pm-my-studies-index__holdings {
  color: var(--pm-muted);
  font-size: 0.9rem;
}

.pm-my-studies-index__question,
.pm-my-studies-index__preview {
  line-height: 1.5;
  margin-top: 0.45rem !important;
}

.pm-my-studies-index__meta {
  margin-top: 0.7rem !important;
}

.pm-my-studies-index__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.pm-participant-studies__workspace {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(15rem, 0.85fr) minmax(20rem, 1.15fr);
  margin-top: 1rem;
}

.pm-participant-study-detail__question {
  font-size: 1.05rem;
  line-height: 1.6;
}

.pm-participant-study-facts {
  display: grid;
  gap: 0.75rem;
}

.pm-participant-study-facts > div {
  display: grid;
  gap: 0.15rem;
}

.pm-participant-study-facts dt {
  color: var(--pm-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pm-participant-study-facts dd {
  margin: 0;
}

.pm-participant-study-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.pm-participant-tools {
  display: grid;
  gap: 1rem;
}

.pm-participant-tools .pm-participant-page-heading {
  margin-bottom: 0.5rem;
}

@media (max-width: 760px) {
  .pm-participant-home__primary,
  .pm-participant-home__secondary,
  .pm-participant-studies__workspace {
    grid-template-columns: 1fr;
  }

  .pm-participant-continuity > header,
  .pm-participant-tool {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-my-studies-index__item {
    grid-template-columns: 1fr;
  }

  .pm-my-studies-index__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .pm-context-study-shell[data-canon-collapsed="true"]
  .pm-context-study-canon {
    padding: 0.65rem 0.9rem;
  }

  .pm-context-study-shell[data-canon-collapsed="true"]
  .pm-context-study-canon__compact {
    height: auto;
  }

  .pm-context-study-shell[data-canon-collapsed="true"]
  .pm-context-study-canon__expand {
    flex-direction: row;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
  }

  .pm-context-study-shell[data-canon-collapsed="true"]
  .pm-context-study-canon__expand span:last-child {
    font-size: 0.72rem;
    transform: none;
    writing-mode: horizontal-tb;
  }
}

/* Working Pad — participant-owned writing surface */

.pm-working-pad {
  margin: 0 auto;
  max-width: 58rem;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}

.pm-working-pad__heading {
  max-width: 42rem;
}

.pm-working-pad__heading h1 {
  margin-bottom: 0.55rem;
}

.pm-working-pad__heading > p:last-child,
.pm-working-pad__opening,
.pm-working-pad__fatal {
  color: var(--pm-muted);
  line-height: 1.6;
}

.pm-working-pad__form {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.pm-working-pad__form[hidden],
.pm-working-pad [hidden] {
  display: none;
}

.pm-working-pad__field {
  display: grid;
  gap: 0.45rem;
}

.pm-working-pad__field label {
  font-weight: 700;
}

.pm-working-pad__field label span {
  color: var(--pm-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.pm-working-pad__field input,
.pm-working-pad__field textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  color: var(--pm-text);
  font: inherit;
  line-height: 1.55;
  padding: 0.75rem 0.85rem;
  width: 100%;
}

.pm-working-pad__field textarea {
  resize: vertical;
}

.pm-working-pad__field--title input {
  font-size: 1.2rem;
  font-weight: 650;
}

.pm-working-pad__field--body textarea {
  min-height: 22rem;
}

.pm-working-pad__field input:focus,
.pm-working-pad__field textarea:focus {
  border-color: var(--pm-accent);
  outline: 2px solid color-mix(in srgb, var(--pm-accent) 28%, transparent);
  outline-offset: 1px;
}

.pm-working-pad__context {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-working-pad__save-row,
.pm-working-pad__footer,
.pm-working-pad__discard > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pm-working-pad__save-row {
  border-top: 1px solid var(--pm-border);
  justify-content: space-between;
  padding-top: 1rem;
}

.pm-working-pad__save-status {
  color: var(--pm-muted);
  margin: 0;
}

.pm-working-pad__save-status[data-tone="saving"],
.pm-working-pad__save-status[data-tone="editing"] {
  color: var(--pm-text);
}

.pm-working-pad__save-status[data-tone="error"] {
  color: var(--pm-danger, #a13b32);
  font-weight: 650;
}

.pm-working-pad__notice,
.pm-working-pad__discard,
.pm-working-pad__development {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left: 4px solid var(--pm-accent);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.pm-working-pad__notice h2,
.pm-working-pad__discard h2,
.pm-working-pad__development h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.pm-working-pad__notice p,
.pm-working-pad__discard p,
.pm-working-pad__development p {
  color: var(--pm-muted);
  margin: 0 0 0.85rem;
}

.pm-working-pad__material {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  margin: 1rem 0;
  padding: 0;
}

.pm-working-pad__material legend {
  font-weight: 700;
  margin-bottom: 0.55rem;
  width: 100%;
}

.pm-working-pad__material label {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

.pm-working-pad__development-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-working-pad__development-grid section {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.65rem;
  padding-top: 0.9rem;
}

.pm-working-pad__development-grid h3 {
  font-size: 0.98rem;
  margin: 0;
}

.pm-working-pad__development-grid input,
.pm-working-pad__development-grid select {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 0.35rem;
  color: var(--pm-text);
  font: inherit;
  padding: 0.7rem 0.75rem;
  width: 100%;
}

.pm-working-pad__development-grid .pm-button {
  justify-self: start;
}

.pm-working-pad__transfer-status {
  margin: 0.9rem 0 0 !important;
}

.pm-working-pad__transfer-status[data-tone="error"] {
  color: var(--pm-danger, #a13b32);
  font-weight: 650;
}

.pm-working-pad__footer {
  justify-content: space-between;
}

.pm-working-pad__footer a {
  color: var(--pm-accent);
}

.pm-working-pad__discard-link {
  background: transparent;
  border: 0;
  color: var(--pm-muted);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.pm-working-pad__discard-link:hover,
.pm-working-pad__discard-link:focus-visible {
  color: var(--pm-danger, #a13b32);
}

@media (max-width: 720px) {
  .pm-working-pad__context {
    grid-template-columns: 1fr;
  }

  .pm-working-pad__field--body textarea {
    min-height: 18rem;
  }

  .pm-working-pad__save-row,
  .pm-working-pad__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pm-working-pad__development-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================
   Context Research — first visual tuning pass
   Research-specific only. Preserve Context Study baseline.
   ========================================================== */

.pm-context-research-shell .pm-context-study-workspace {
  padding-top: 2rem;
}

/* ----------------------------------------------------------
   Research session header
   ---------------------------------------------------------- */

.pm-context-research-session-header {
  border-bottom: 1px solid var(--pm-border);
  display: grid;
  gap: 1.25rem;
  margin: 0 auto;
  max-width: 52rem;
  padding-bottom: 1.5rem;
}

.pm-context-research-session-header__identity {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-context-research-session-header__identity h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.1;
  margin: 0.2rem 0 0;
}

.pm-context-research-owner {
  color: var(--pm-muted);
  display: grid;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  gap: 0.15rem;
  justify-items: end;
  text-align: right;
}

.pm-context-research-owner strong {
  color: var(--pm-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.pm-context-research-session {
  display: grid;
  gap: 0.9rem;
}

.pm-context-research-session__title,
.pm-context-research-session__question {
  display: grid;
  gap: 0.35rem;
}

.pm-context-research-session label {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-context-research-session input,
.pm-context-research-session textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  color: var(--pm-text);
  font: inherit;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.pm-context-research-session textarea {
  min-height: 4.8rem;
  resize: vertical;
}

.pm-context-research-session input:focus,
.pm-context-research-session textarea:focus {
  border-color: var(--pm-accent);
  outline: 2px solid color-mix(in srgb, var(--pm-accent) 24%, transparent);
  outline-offset: 1px;
}

.pm-context-research-session__status {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
}

/* ----------------------------------------------------------
   Current location
   ---------------------------------------------------------- */

.pm-context-research-location {
  margin: 1.35rem auto 0;
  max-width: 52rem;
}

.pm-context-research-location__heading {
  margin-bottom: 0.25rem;
}

.pm-context-research-location__heading .pm-kicker {
  margin: 0;
}

/* ----------------------------------------------------------
   Notes at this location
   ---------------------------------------------------------- */

.pm-context-research-notes {
  border-top: 1px solid var(--pm-border);
  margin: 2rem auto 0;
  max-width: 52rem;
  padding-top: 1.4rem;
}

.pm-context-research-notes__heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-context-research-notes__heading h2 {
  font-size: 1.35rem;
  margin: 0.2rem 0 0;
}

.pm-context-research-notes__heading > span {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
}

.pm-context-research-note-buckets {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.pm-context-research-note-bucket {
  align-items: center;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  color: var(--pm-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.pm-context-research-note-bucket:hover,
.pm-context-research-note-bucket:focus-visible {
  background: var(--pm-accent-soft);
  border-color: var(--pm-accent);
  outline: none;
}

.pm-context-research-note-bucket strong {
  font-size: 0.84rem;
  min-width: 0;
}

.pm-context-research-note-bucket span {
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  color: var(--pm-muted);
  flex: 0 0 auto;
  font-family: system-ui, sans-serif;
  font-size: 0.66rem;
  min-width: 1.5rem;
  padding: 0.12rem 0.38rem;
  text-align: center;
}

.pm-context-research-current-notes {
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.pm-context-research-current-notes h3 {
  font-size: 0.88rem;
  margin: 0;
}

.pm-context-research-current-notes > p,
.pm-context-research-quick-note__status {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  margin: 0.45rem 0 0;
}

.pm-context-research-current-notes__list {
  display: grid;
  gap: 0.55rem;
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.pm-context-research-current-notes__list li {
  line-height: 1.5;
}

/* ----------------------------------------------------------
   Quick note capture
   ---------------------------------------------------------- */

.pm-context-research-quick-note {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.pm-context-research-quick-note label {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.pm-context-research-quick-note textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 6px;
  color: var(--pm-text);
  font: inherit;
  line-height: 1.5;
  min-height: 5.5rem;
  padding: 0.7rem 0.75rem;
  resize: vertical;
  width: 100%;
}

.pm-context-research-quick-note textarea:focus {
  border-color: var(--pm-accent);
  outline: 2px solid color-mix(in srgb, var(--pm-accent) 24%, transparent);
  outline-offset: 1px;
}

.pm-context-research-quick-note__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ----------------------------------------------------------
   Research Kit
   ---------------------------------------------------------- */

.pm-context-research-kit {
  border-top: 1px solid var(--pm-border);
  margin: 1.5rem auto 0;
  max-width: 52rem;
  padding-top: 0.8rem;
}

.pm-context-research-kit > details > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0.55rem 0;
}

.pm-context-research-kit > details > summary::-webkit-details-marker {
  display: none;
}

.pm-context-research-kit > details > summary::before {
  color: var(--pm-accent);
  content: "▶";
  flex: 0 0 auto;
  font-size: 0.68rem;
  margin-right: 0.55rem;
}

.pm-context-research-kit > details[open] > summary::before {
  content: "▼";
}

.pm-context-research-kit > details > summary > span {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.pm-context-research-kit > details > summary strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.pm-context-research-kit > details > summary span span {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
}

.pm-context-research-kit__body {
  border-top: 1px solid var(--pm-border);
  padding: 1rem 0 0.5rem;
}

.pm-context-research-kit__views {
  display: flex;
  gap: 0.4rem;
}

.pm-context-research-kit__views button {
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  color: var(--pm-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
}

.pm-context-research-kit__views button[aria-pressed="true"] {
  background: var(--pm-accent-soft);
  border-color: var(--pm-accent);
  color: var(--pm-text);
}

.pm-context-research-kit__content {
  margin-top: 1rem;
}

.pm-context-research-kit__content > p {
  color: var(--pm-muted);
  margin: 0;
}

.pm-context-research-kit__continue {
  border-top: 1px solid var(--pm-border);
  margin-top: 1.2rem;
  padding-top: 1rem;
}

.pm-context-research-kit__continue h3 {
  font-size: 1rem;
  margin: 0.15rem 0 0.45rem;
}

.pm-context-research-kit__continue > p {
  color: var(--pm-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  max-width: 44rem;
}

.pm-context-research-kit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

/* ----------------------------------------------------------
   Research Trail
   ---------------------------------------------------------- */

.pm-context-research-trail {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 0.9rem;
}

.pm-context-research-trail__heading h3 {
  font-size: 1rem;
  margin: 0.15rem 0 0;
}

.pm-context-research-trail__empty {
  color: var(--pm-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.65rem 0 0;
}

.pm-context-research-trail__list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

/* ----------------------------------------------------------
   Outside research rail
   ---------------------------------------------------------- */

.pm-context-research-external {
  border-top: 1px solid var(--pm-border);
  margin-top: 1rem;
  padding-top: 0.9rem;
}

.pm-context-research-external header h3 {
  font-size: 1rem;
  margin: 0.15rem 0 0;
}

.pm-context-research-external__tools {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

/* ----------------------------------------------------------
   Research status footer
   ---------------------------------------------------------- */

.pm-context-research-status {
  gap: 0.65rem;
}

.pm-context-research-status [data-research-session-status] {
  margin-left: auto;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 900px) {
  .pm-context-research-note-buckets {
    grid-template-columns: 1fr;
  }

  .pm-context-research-session-header__identity {
    display: grid;
  }

  .pm-context-research-owner {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .pm-context-research-shell .pm-context-study-workspace {
    padding-top: 1.25rem;
  }

  .pm-context-research-note-buckets {
    grid-template-columns: 1fr;
  }

  .pm-context-research-notes__heading {
    align-items: start;
    display: grid;
  }

  .pm-context-research-status [data-research-session-status] {
    margin-left: 0;
  }
}
/* ==========================================================
   Context Research — working-surface refinement
   Passage first. Research controls serve the passage.
   ========================================================== */

.pm-context-research-shell .pm-context-study-workspace {
  padding: 1.35rem clamp(1.5rem, 3vw, 2.5rem) 2rem;
}

/* Passage begins immediately */

.pm-context-research-shell .pm-context-study-passage {
  margin-top: 0;
  max-width: 52rem;
}

.pm-context-research-shell .pm-context-study-scripture {
  padding-bottom: 1.25rem;
}

/* Compact Context Research control band */

.pm-context-research-session {
  border-top: 1px solid var(--pm-border);
  display: grid;
  gap: 0.85rem;
  margin: 0 auto;
  max-width: 52rem;
  padding: 1rem 0 0;
}

.pm-context-research-session__heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pm-context-research-session__heading .pm-kicker {
  margin: 0;
}

.pm-context-research-session__heading h2 {
  font-size: 1.25rem;
  margin: 0.12rem 0 0;
}

.pm-context-research-session__status {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
}

.pm-context-research-session__fields {
  align-items: start;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(20rem, 1.6fr);
}

.pm-context-research-session__title,
.pm-context-research-session__question {
  display: grid;
  gap: 0.3rem;
}

.pm-context-research-session label {
  color: var(--pm-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-context-research-session input,
.pm-context-research-session textarea {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  box-sizing: border-box;
  color: var(--pm-text);
  font: 0.88rem/1.4 system-ui, sans-serif;
  padding: 0.55rem 0.65rem;
  width: 100%;
}

.pm-context-research-session textarea {
  min-height: 3.5rem;
  resize: vertical;
}

.pm-context-research-session input:focus,
.pm-context-research-session textarea:focus {
  border-color: var(--pm-accent);
  outline: 2px solid color-mix(in srgb, var(--pm-accent) 24%, transparent);
  outline-offset: 1px;
}

/* Tighten transition into note capture */

.pm-context-research-notes {
  margin-top: 1.35rem;
  padding-top: 1rem;
}

.pm-context-research-quick-note textarea {
  min-height: 3.75rem;
}

/* Keep Research Kit present without becoming another large region */

.pm-context-research-kit {
  margin-top: 1.1rem;
}

@media (max-width: 760px) {
  .pm-context-research-session__fields {
    grid-template-columns: 1fr;
  }

  .pm-context-research-session__heading {
    align-items: start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* ==========================================================
   Context Research — navigation density and sticky rail tuning
   Research-specific only. Preserve Context Study baseline.
   ========================================================== */

.pm-context-research-shell .pm-context-research-canon {
  align-self: start;
  height: calc(100dvh - 3.7rem);
  max-height: calc(100dvh - 3.7rem);
  position: sticky;
  top: 3.7rem;
}

.pm-context-research-shell
.pm-context-study-canon__expanded {
  max-height: 100%;
}

.pm-context-research-shell
.pm-context-study-canon-toolbar {
  gap: 0.35rem;
}

.pm-context-research-shell
.pm-context-study-canon-tabs {
  gap: 0.3rem;
}

.pm-context-research-shell
.pm-context-study-canon-tab {
  padding-block: 0.45rem;
}

.pm-context-research-shell
.pm-context-study-canon-book {
  margin-top: 0.55rem;
}

.pm-context-research-shell
.pm-context-study-canon-navigation {
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.pm-context-research-shell
.pm-context-study-canon-movement__summary {
  gap: 0.2rem;
  padding: 0.5rem 0.55rem;
}

.pm-context-research-shell
.pm-context-study-canon-pericopes {
  padding: 0.25rem;
}

.pm-context-research-shell
.pm-context-study-canon-pericope {
  gap: 0.08rem;
  padding: 0.36rem 0.42rem;
}

.pm-context-research-shell
.pm-context-study-bible__books {
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.pm-context-research-shell
.pm-context-study-bible-book > summary {
  padding: 0.45rem 0.5rem;
}

.pm-context-research-shell
.pm-context-study-bible-book__movements {
  gap: 0.5rem;
  padding: 0.4rem;
}

.pm-context-research-shell
.pm-context-study-bible-pericope {
  padding: 0.3rem 0.38rem;
}

.pm-context-research-shell[data-canon-collapsed="true"]
.pm-context-research-canon {
  height: auto;
  max-height: none;
}

@media (max-width: 680px) {
  .pm-context-research-shell .pm-context-research-canon {
    height: auto;
    max-height: none;
    position: sticky;
    top: 3.7rem;
    z-index: 25;
  }
}


/* ==========================================================
   Context Research — three-mode canon rail
   ========================================================== */

.pm-context-research-shell
.pm-context-study-canon-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pm-context-research-shell
[data-canon-panel="trail"] {
  margin-top: 0.65rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
}

.pm-context-research-shell
.pm-context-research-trail {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.pm-context-research-shell
.pm-context-research-trail__heading {
  margin-top: 0.15rem;
}

.pm-context-research-shell
.pm-context-research-trail__empty {
  margin-top: 0.65rem;
}


/* Context Research — Trail prompt state */
.pm-context-research-shell
[data-add-research-trail][data-prompt-required="true"] {
  opacity: 0.58;
}

.pm-context-research-shell
[data-add-research-trail][data-prompt-required="true"]:focus,
.pm-context-research-shell
[data-add-research-trail][data-prompt-required="true"]:hover {
  opacity: 0.82;
}


