/* Root Brief: decisions stay in the reading flow; controls belong to the shell. */
.q-compact-brief .q-card-body { gap: 12px; }
.q-brief-title-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.q-brief-title-row > .q-brief-title, .q-brief-title-row > h3 { flex: 1; min-width: 0; margin: 0 !important; line-height: 1.5; text-wrap: balance; }
.q-brief-title-row > h3:not(.q-brief-title) { color: #3d6245; font-size: 15px; }
.q-brief-edit-toggle { flex: none; padding: 3px 0 !important; color: #829474; font-size: 11px; }
.q-node-detail-body .q-compact-brief .q-brief-text { line-height: 1.85; }
.q-brief-markdown { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.q-brief-markdown > :first-child { margin-top: 0 !important; }
.q-brief-markdown > :last-child { margin-bottom: 0 !important; }
.q-brief-markdown p { margin: 0 0 .65em !important; }
.q-brief-markdown :is(h1, h2, h3, h4, h5, h6) { margin: .9em 0 .35em !important; color: inherit; line-height: 1.6; font-size: 1em; font-weight: 650; }
.q-brief-markdown h1 { font-size: 1.15em; }
.q-brief-markdown h2 { font-size: 1.08em; }
.q-brief-markdown :is(ul, ol) { margin: .35em 0 .65em; padding-left: 1.6em; }
.q-brief-markdown li { margin: .2em 0; }
.q-brief-markdown a { color: #286f59; text-decoration: underline; text-underline-offset: 3px; }
.q-brief-markdown blockquote { margin: .65em 0; padding-left: .85em; border-left: 3px solid #cedcc3; }
.q-brief-markdown blockquote > :last-child { margin-bottom: 0 !important; }
.q-brief-markdown code { padding: 1px 3px; border-radius: 3px; background: #f0f3ed; font-size: .92em; }
.q-brief-markdown pre { max-width: 100%; padding: 9px; white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f5ef; }
.q-brief-markdown pre code { padding: 0; background: transparent; }
.q-brief-markdown hr { margin: .8em 0; border: 0; border-top: 1px solid #e1e8d9; }
.q-compact-brief .q-brief-items-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; margin-top: 2px; }
.q-compact-brief .q-brief-items-heading h3 { font-size: 14px; }
.q-compact-brief .q-brief-toggle-all { flex: none; padding: 2px 0; font-size: 11px; white-space: nowrap; color: #829474; }
.q-compact-brief .q-brief-items { gap: 8px; }
.q-brief-item-compact > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 11px 12px 11px 28px; list-style: none; }
.q-brief-item-compact > summary::-webkit-details-marker { display: none; }
.q-brief-item-compact > summary::before { content: ''; position: absolute; top: 18px; left: 13px; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.q-brief-item-compact[open] > summary::before { transform: rotate(45deg); }
.q-brief-item-compact .q-brief-item-heading { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: auto; min-width: 0; }
.q-brief-item-compact .q-brief-item-heading > strong { flex: none; min-width: 0; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.q-brief-item-compact .q-brief-item-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 3.4em; min-width: 0; overflow: hidden; white-space: normal; overflow-wrap: anywhere; font-size: 11px; line-height: 1.7; }
.q-brief-item-compact > summary > .q-badge { position: static; align-self: start; margin-top: 1px; white-space: nowrap; font-size: 9px; padding: 1px 5px; }
.q-brief-item-compact .q-brief-item-body { padding: 11px 12px 12px; gap: 9px; }
.q-brief-context { color: #75846b; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.q-brief-context > p { margin: 0; }
.q-brief-context > p + p { margin-top: 3px; }
.q-brief-context > p > span { margin-right: 7px; color: #8b987f; font-size: 10px; }
.q-brief-context q::before, .q-brief-context q::after { content: none; }
.q-brief-recommendation { display: flex; align-items: flex-start; gap: 10px; background: #f3f7ee; border: 1px solid #e1e9d9; border-radius: 6px; padding: 9px 10px; }
.q-brief-recommendation.is-selected { background: #eaf3e2; border-color: #8baa79; }
.q-brief-recommendation-copy { flex: 1; min-width: 0; }
.q-brief-item-compact .q-brief-current { font-size: 12px; line-height: 1.75; margin: 0; }
.q-brief-current > span { display: inline-block; color: #7a9268; font-size: 10px; margin-right: 7px; }
.q-brief-item-compact .q-brief-reason { display: block; margin-top: 3px; font-size: 11px; line-height: 1.75; color: #7c8b70; }
.q-brief-accept { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 29px; height: 29px; border: 1px solid #c6d5bb; border-radius: 50%; color: #83a06f; background: #fff; cursor: pointer; }
.q-brief-accept:hover { border-color: #729858; color: #456f37; }
.q-brief-accept[aria-pressed="true"] { color: #fff; border-color: #588248; background: #588248; }
.q-brief-accept:focus-visible, .q-brief-custom-input:focus-visible { outline: 2px solid #86a86e; outline-offset: 2px; }
.q-brief-accept:disabled { opacity: .45; cursor: default; }
.q-brief-item-compact .q-brief-options { gap: 5px; }
.q-brief-item-compact .q-brief-options .q-choice { padding: 7px 10px; font-size: 12px; line-height: 1.65; }
.q-brief-item-compact .q-choice-copy small { font-size: 10px; line-height: 1.65; margin-top: 0; }
.q-brief-item-compact .q-brief-custom { align-items: center; padding-block: 5px; }
.q-brief-item-compact .q-brief-custom input[type="radio"] { margin-top: 0; }
.q-brief-custom-input { flex: 1; min-width: 0; width: 100%; padding: 3px 0; margin: 0; border: 0; background: transparent; outline: none; color: #4e7043; font: inherit; line-height: 1.65; }
.q-brief-custom-input::placeholder { color: #99aa8d; }
.q-brief-item-compact .q-brief-withdraw { margin: -3px 0 -4px; padding: 2px 0; font-size: 10px; }
.q-brief-retained-comment { font-size: 10px; line-height: 1.7; color: #8a947e; }
.q-brief-retained-comment > summary { cursor: pointer; }
.q-brief-retained-comment > p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.q-brief-retained-comment .q-btn { padding: 2px 0; font-size: 10px; }
.q-brief-stale { display: flex; align-items: center; gap: 7px; color: #87977b; font-size: 11px; }
.q-brief-stale .q-btn { padding: 0; }
.q-compact-brief .q-brief-definition-editor { gap: 10px; }
.q-compact-brief .q-brief-definition-editor .q-field { gap: 4px; }
.q-compact-brief .q-brief-definition-editor textarea { min-height: 62px; }
@media (max-width: 600px) {
  .q-node-detail-body .q-compact-brief .q-brief-title { font-size: 20px; line-height: 1.45; }
  .q-brief-item-compact > summary { gap: 8px; }
  .q-brief-item-compact .q-brief-item-body { padding-inline: 10px; }
  .q-brief-item-compact .q-brief-options .q-choice { min-height: 40px; align-items: center; }
  .q-brief-custom-input { font-size: 16px; }
  .q-brief-accept { width: 34px; height: 34px; }
}
