/* Point metadata remains distinct from progress, question difficulty and personal results. */
.pe-badges{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;vertical-align:middle}
.pe-badge{display:inline-flex;align-items:center;max-width:100%;padding:2px 7px;border-radius:5px;font-size:11px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}
.pe-outline{background:#edf3fc;color:#496991}.pe-key{background:#fff0d7;color:#885319}.pe-difficult{background:#f1eafa;color:#73508f}.pe-custom{background:#edf3f2;color:#476f65}
.pe-history-link{display:inline-flex;align-items:center;justify-content:flex-start;gap:4px;flex:none;min-height:32px;max-width:100%;margin:0;padding:4px 0;border:0;border-radius:5px;background:transparent;color:#5c7595;font:inherit;font-size:11px;font-weight:400;line-height:1.5;text-align:left;white-space:nowrap;cursor:pointer}
.pe-history-caption{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-history-link:hover{color:#245fae;text-decoration:underline}.pe-history-link:focus-visible{outline:2px solid #397fcb;outline-offset:2px}
.pe-row-meta,.pe-detail-meta{display:inline-flex;align-items:center;gap:10px;min-width:0;white-space:nowrap;flex-wrap:nowrap}
.pe-row-meta .pe-badges,.pe-detail-meta .pe-badges{flex:none;flex-wrap:nowrap}
.pe-row-meta .pe-badge,.pe-detail-meta .pe-badge{white-space:nowrap;flex:none}
.pe-row-meta .pe-badges:empty,.pe-detail-meta .pe-badges:empty{display:none}
.pe-title-cluster{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
.pe-title-cluster>.completion-tree-name{flex:0 0 auto;min-width:0!important;white-space:nowrap}
.pe-title-cluster>.pe-row-meta{flex:none}
.completion-tree-point.pe-horizontal-point{flex-wrap:nowrap}
.pe-horizontal-point>.completion-tree-name,.pe-horizontal-point>.ep-point-title{flex:0 1 auto;min-width:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-point-entry{display:flex;align-items:center;gap:10px;min-width:0;border-bottom:1px solid #edf1f6;padding-right:12px}
.pe-point-entry>.ep-point,.pe-point-entry>.completion-tree-point{display:flex!important;flex:0 1 auto;min-width:0;width:auto;border-bottom:0;padding-right:0!important}
.pe-point-entry>.pe-row-meta{flex:none}
.pe-point-entry>.completion-status,.pe-point-entry>.ep-point-arrow{margin-left:auto;flex:none}
.pe-point-entry>.completion-tree-go{flex:none;white-space:nowrap}
.pe-point-entry>.ep-point-arrow{padding-right:8px}
.pe-point-entry:has(>.ep-point.is-selected){background:var(--ep-row-selected-bg,#edf5ff)}
.pe-chapter-history{display:inline-flex;align-items:center;flex:none;min-width:0;line-height:1.4}
.pe-chapter-title-cluster{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0}
.fs-chapter-name>.pe-chapter-title-cluster{flex:0 1 auto}
.pe-chapter-title-cluster>b,.pe-chapter-title-cluster>strong{flex:0 1 auto!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.completion-chapter>summary.pe-chapter-summary,.ep-chapter>summary.pe-chapter-summary{display:flex;align-items:center;flex-wrap:nowrap!important;gap:12px}
.pe-chapter-history .pe-history-link{min-width:0;font-size:11px;color:#6e829b}
.u-card-meta:has(>.pe-detail-meta){display:flex;align-items:center;gap:12px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.u-card-meta:has(>.pe-detail-meta)>span{flex:none;white-space:nowrap}
.u-card-meta>.pe-detail-meta{flex:0 0 auto;justify-content:flex-start}
.u-card-meta:has(>.pe-detail-meta)>span:last-child:not(.pe-detail-meta){margin-left:auto}
.pe-history-dialog{min-width:0}.pe-history-dialog>h2{font-size:19px;line-height:1.6;margin:0 0 16px}
.pe-evidence-summary{display:flex;flex-direction:column;gap:5px;padding:14px 16px;border:1px solid #dfe8f3;border-radius:10px;background:#f5f8fc;font-size:14px;color:#365471}
.pe-evidence-summary>span,.pe-method,.pe-pending-note{font-size:12px;line-height:1.7;color:#708298}
.pe-pending-note{color:#8b652d}.pe-method{margin:12px 0}
.pe-evidence-list{list-style:none;margin:0;padding:0}.pe-evidence-list>li{padding:18px 0;border-bottom:1px solid #e5ebf3}.pe-evidence-list>li:last-child{border-bottom:0}
.pe-evidence-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:#405e7f}
.pe-record-state{flex:none;padding:3px 7px;border-radius:5px;background:#fff1db;color:#876027;font-size:11px}.pe-record-state.is-accepted{background:#e9f4ee;color:#3d7560}
.pe-question-stem{font-size:14px;line-height:1.8;color:#314b6a;white-space:pre-wrap;overflow-wrap:anywhere}
.pe-question-options{font-size:13px;color:#506984;line-height:1.8;padding-left:22px}
.pe-sources p{margin:6px 0;font-size:11px;line-height:1.8;color:#718397;overflow-wrap:anywhere}.pe-sources p>span{display:block;color:#58728f}.pe-sources a{color:#34699f;text-decoration:underline}
.pe-empty{padding:24px 16px;border:1px dashed #dce6f1;border-radius:10px;text-align:center;color:#7a8b9e;font-size:13px;line-height:1.8}
.pe-evidence-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;flex-wrap:wrap}
.pe-admin-tags{margin:18px 0;padding:16px;border:1px solid #dfe7f0;border-radius:10px;background:#f9fbfd}
.pe-admin-tags h3{margin:0 0 12px;font-size:15px}.pe-admin-tags .pe-admin-help{font-size:12px;line-height:1.8;color:#73859a}
.pe-admin-preview{padding:12px 0}.pe-admin-history{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}
body[data-surface=mini] .pe-history-link{min-height:44px;font-size:11px}
body[data-surface=mini] .pe-row-meta,body[data-surface=mini] .pe-title-cluster{gap:6px}
body[data-surface=mini] .pe-point-entry{gap:6px;padding-right:6px}
body[data-surface=mini] .pe-chapter-title-cluster{gap:6px}
body[data-surface=mini] .pe-evidence-heading{align-items:flex-start;gap:8px}
body[data-surface=mini] .pe-history-dialog>h2{font-size:17px}
.pe-overview-help{margin:0 0 16px;font-size:13px;line-height:1.8;color:#6d8096}
[data-pe-summary] .pe-empty .op-button{margin:4px}
[data-pe-summary] td .pe-badges{gap:6px}
/* Keep metadata in the same row even where the home directory uses a fixed grid. */
body[data-surface] .sh-home .completion-tree-point.pe-horizontal-point{display:flex!important;flex-wrap:nowrap!important}
.completion-chapter>summary.pe-chapter-summary .fs-chapter-name{display:flex;align-items:center;flex-wrap:nowrap!important;min-width:0}

/* Mobile rows may scroll their title metadata without widening the home grid. */
body[data-surface=mini] .sh-home{grid-template-columns:minmax(0,1fr)}
body[data-surface=mini] .sh-home .completion-home-layout{min-width:0;width:100%;max-width:100%}
body[data-surface=mini] .sh-home .completion-tree-point.pe-horizontal-point{display:grid!important;grid-template-columns:24px minmax(0,1fr) auto auto;gap:6px 8px;min-width:0}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-tree-number{grid-column:1;grid-row:1;min-width:0;align-self:center}
body[data-surface=mini] .sh-home .pe-horizontal-point>.pe-title-cluster{grid-column:2/-1;grid-row:1;min-width:0;max-width:100%;overflow:visible}
body[data-surface=mini] .sh-home .pe-horizontal-point>.pe-title-cluster>.completion-tree-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-surface=mini] .sh-home .pe-horizontal-point>.pe-title-cluster>.pe-row-meta{margin-left:auto}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-tree-actions{grid-column:3/-1;grid-row:2;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-tree-actions>.completion-tree-go{flex:none;min-width:0;min-height:36px;padding:4px 8px;margin:0;border-radius:7px;font-size:12px;line-height:1.4}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-status{align-self:center}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-status{grid-column:2;grid-row:2;min-width:0}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-tree-go{grid-column:4;grid-row:2;min-width:0}
body[data-surface=mini] .sh-home .pe-horizontal-point>.completion-tree-practice{grid-column:3}
body[data-surface=mini] .pe-point-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;max-width:100%}
body[data-surface=mini] .pe-point-entry>.pe-horizontal-point{grid-column:1;grid-row:1}
body[data-surface=mini] .pe-point-entry>.pe-row-meta{grid-column:2;grid-row:1}
body[data-surface=mini] .pe-point-entry>.completion-status{grid-column:1;grid-row:2;margin-left:0}
body[data-surface=mini] .pe-point-entry>.completion-tree-go{grid-column:2;grid-row:2}

/* Chapter evidence stays by its name; learning progress stays at the right edge. */
.completion-chapter>summary.pe-chapter-summary .fs-chapter-name>.ps-module-progress{margin-left:auto!important}

/* Keep source-backed counts in their own curriculum table column. */
.pe-catalog-evidence .pe-evidence-column,.pe-catalog-evidence .pe-evidence-cell{white-space:nowrap;min-width:110px}
.pe-catalog-evidence .pe-evidence-cell small{font-size:11px;color:#718397}

/* Outline requirements use the same three colors throughout the learner views. */
.pe-outline-master{background:#fff0d9;color:#89561a}.pe-outline-familiar{background:#e7f3ec;color:#376c52}.pe-outline-understand{background:#e9f0fc;color:#42669a}

/* Give the point title its own line before wrapping the count. */
.pe-reader-point {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 gap: 0 4px;
 min-width: 0;
}
:is(#demo-learning-directory,#u-tree) .pe-reader-point > button[data-action] {
 flex: 1 1 max-content;
 width: auto;
 min-width: 0;
 max-width: 100%;
}
.pe-reader-point > button[data-action] > span:nth-child(2) {
 min-width: 0;
 overflow-wrap: break-word;
}
.pe-reader-point > .pe-history-link {
 margin-inline-start: auto;
}
.pe-reader-point > .pe-history-link,
:is(#demo-learning-directory,#u-tree) summary > .pe-history-link {
 padding-inline: 4px;
 font-size: 11px;
}

/* Match the reader's evidence labels in the desktop home directory. */
body[data-surface=pc] .sh-chapter-scroll :is(.pe-title-cluster,.pe-chapter-title-cluster){
 flex-wrap:wrap;
 gap:2px 8px;
 overflow:visible;
}
body[data-surface=pc] .sh-chapter-scroll .pe-title-cluster>.completion-tree-name{
 flex:0 1 auto;
 white-space:normal;
 overflow-wrap:anywhere;
}
body[data-surface=pc] .sh-chapter-scroll .pe-title-cluster>.pe-row-meta{display:contents}
body[data-surface=pc] .sh-chapter-scroll .pe-title-cluster .pe-badges{flex-wrap:wrap}
body[data-surface=pc] .sh-chapter-scroll .pe-history-link{
 padding-inline:4px;
 color:#5c7595;
}

/* Requirements follow the point title; selection covers its evidence hint. */
:is(#demo-learning-directory,#u-tree) :is(button[data-action^="sw-point:"],button[data-action^="u-open:"])>span:nth-child(2){flex:0 1 auto;min-width:0}
body[data-surface=pc] #demo-learning-directory .pe-reader-point:has(>button[aria-current=page]){background:#fff;border-radius:8px}
