/* Criminal Law practice: shared by the bank and topic-guide entry points. */
.cp {
  --cp-line: #d0d8cd;
  --cp-paper: #fffdf8;
  --cp-muted: #4a5a50;
  max-width: 1180px;
  margin: auto;
  padding: 30px 24px 60px;
  color: #1f2a24;
}
.cp * {
  box-sizing: border-box;
}
.cp [hidden] {
  display: none !important;
}
.cp a {
  color: #245c40;
}
.cp h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 10px 0;
}
.cp h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 16px;
}
.cp h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.cp p {
  line-height: 1.65;
  margin: 0 0 14px;
}
.cp-small {
  font-size: 0.84rem;
  color: var(--cp-muted);
}
.cp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-between {
  justify-content: space-between;
}
.cp-stack {
  display: grid;
  gap: 14px;
}
.cp-crumb {
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.cp-intro {
  max-width: 70ch;
}
.cp-bar {
  margin: 18px 0 22px;
  padding: 16px 0;
  border-top: 1px solid var(--cp-line);
  border-bottom: 1px solid var(--cp-line);
}
.cp button,
.cp select,
.cp input[type='file'] {
  font: inherit;
  max-width: 100%;
}
.cp button,
.cp select {
  min-height: 44px;
  border: 1px solid var(--cp-line);
  background: var(--cp-paper);
  color: #21503a;
  border-radius: 7px;
  padding: 9px 14px;
  cursor: pointer;
}
.cp button:hover {
  background: #e4eee4;
}
.cp button:disabled {
  opacity: 0.55;
  cursor: default;
}
.cp button:focus-visible,
.cp select:focus-visible,
.cp summary:focus-visible,
.cp [contenteditable]:focus-visible,
.cp a:focus-visible {
  outline: 3px solid #9b5b11;
  outline-offset: 3px;
}
.cp .cp-primary {
  background: #2f6a4d;
  color: white;
  border-color: #2f6a4d;
}
.cp .cp-primary:hover {
  background: #21503a;
}
.cp .cp-subtle {
  background: transparent;
}
.cp-select {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1 1 210px;
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.cp select {
  width: 100%;
}
.cp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cp-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: var(--cp-paper);
}
.cp-facts {
  line-height: 1.75;
  font-size: 1rem;
}
.cp .cp-fact {
  display: inline;
  min-height: 0;
  padding: 2px 0;
  line-height: inherit;
  font: inherit;
  color: inherit;
  text-align: left;
  border: 0;
  border-radius: 2px;
  background: transparent;
  text-decoration: underline;
  text-decoration-color: #447859;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.cp .cp-fact[aria-pressed='true'] {
  background: #dcebdc;
}
.cp-fact-note {
  background: #e7eee2;
  border-left: 3px solid #2f6a4d;
  padding: 16px;
  margin: 14px 0;
}
.cp-fact-note p {
  font-size: 1rem;
}
.cp-question {
  padding-top: 16px;
  border-top: 1px solid var(--cp-line);
  font-weight: 500;
}
.cp-clock {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cp-editor-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0 0;
  padding: 6px 10px;
  background: #f0f2ea;
  border: 1px solid var(--cp-line);
  border-radius: 8px 8px 0 0;
}
.cp-editor-toolbar button {
  min-width: 44px;
  font-weight: 700;
}
.cp-editor {
  min-height: 300px;
  border: 1px solid var(--cp-line);
  border-top: 0;
  padding: 18px;
  border-radius: 0 0 8px 8px;
  background: white;
  color: #1f2a24;
  line-height: 1.65;
  white-space: pre-wrap;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.cp-editor[contenteditable='false'] {
  background: #f3f2eb;
}
.cp-editor:empty::before {
  content: attr(data-placeholder);
  color: #627365;
  pointer-events: none;
}
.cp-editor p,
.cp-editor div {
  margin: 0;
}
.cp-editor b,
.cp-editor strong,
.cp-model strong {
  font-weight: 700;
}
.cp-writing-foot {
  margin-top: 10px;
}
.cp-feedback {
  margin-top: 24px;
}
.cp-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.cp-prose {
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cp-prose p {
  margin-bottom: 12px;
}
.cp-model .cp-highlight {
  background: #e1edda;
  border-left: 3px solid #2f6a4d;
  padding-left: 12px;
}
.cp details {
  border: 0;
  border-top: 1px solid var(--cp-line);
  padding: 14px 0;
  margin-top: 16px;
}
.cp summary {
  cursor: pointer;
  color: #21503a;
  font-weight: 500;
  padding: 5px 0;
  min-height: 44px;
}
.cp details > div {
  margin-top: 14px;
}
.cp-checklist {
  border: 0;
  padding: 0;
  margin: 22px 0;
  display: grid;
  gap: 12px;
}
.cp-checklist legend {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 12px;
}
.cp-checklist label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px;
  background: #f3f4ee;
  border-radius: 6px;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
}
.cp-checklist input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  accent-color: #2f6a4d;
  margin-top: 3px;
}
.cp-step-label {
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #345a3e;
}
.cp-notice {
  background: #f4ead4;
  color: #5d430e;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
}
.cp-error {
  color: #8d241d;
}
.cp-status {
  min-height: 1.6em;
}
.cp-topic-progress {
  display: grid;
  gap: 8px;
}
.cp-topic-progress > div {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 2fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cp-line);
}
.cp-history {
  padding-left: 22px;
}
.cp-history li {
  margin: 10px 0;
}
.cp-skill-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cp-skill-bars progress {
  width: 100%;
  accent-color: #2f6a4d;
}
.cp-inline-note {
  background: #e7eee2;
  padding: 14px;
  border-radius: 8px;
  margin: 14px 0;
}
.cp-integrity {
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--cp-muted);
}
@media (max-width: 800px) {
  #cp-workspace > .cp-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  #cp-part-wrap {
    grid-column: 1 / -1;
  }
  .cp select {
    padding: 9px 6px;
    font-size: 0.85rem;
  }
  .cp {
    padding: 20px 16px 40px;
  }
  .cp-grid,
  .cp-compare {
    grid-template-columns: 1fr;
  }
  .cp-panel {
    padding: 18px;
  }
  .cp-editor {
    min-height: 240px;
  }
  .cp-skill-bars {
    grid-template-columns: repeat(2, 1fr);
  }
  .cp-topic-progress > div {
    grid-template-columns: 1fr;
  }
  .cp-bar {
    align-items: stretch;
  }
}
@media (pointer: coarse) {
  .cp .cp-fact {
    display: block;
    padding: 7px 0;
    min-height: 44px;
  }
}
@media print {
  header,
  footer,
  .cp-bar,
  .cp-editor-toolbar,
  .cp button,
  .cp-integrity {
    display: none !important;
  }
  .cp-grid,
  .cp-compare {
    display: block;
  }
  .cp-panel {
    border: 0;
  }
  .cp {
    padding: 0;
  }
}

.cp-reviewing .cp-grid {
  grid-template-columns: 1fr;
}
.cp-reviewing .cp-facts {
  max-width: 85ch;
}
.cp {
  padding-top: 18px;
}
.cp .cp-crumb {
  margin-bottom: 6px;
}
.cp .cp-bar {
  padding: 10px 0;
  margin: 12px 0;
}
.cp h2 {
  margin-bottom: 8px;
}
.cp #cp-topic-name {
  display: none;
}
.cp details:not([open]) {
  margin-top: 8px;
  padding: 8px 0;
}
.cp #cp-mode-note {
  font-size: 0.8rem;
  margin: 10px 0;
}

/* Keep the footer and progress panel below the fold while the workspace loads (CLS) */
#cp-loading:not([hidden]){margin-bottom:100vh}
