.competency-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.competency-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e9ed;
  color: #142936;
  font-size: 18px;
}

.competency-heading i { color: #087f62; }
.competency-muted { margin: 0 0 14px; color: #536678; font-size: 14px; line-height: 1.5; }
.competency-meter { height: 10px; overflow: hidden; border-radius: 5px; background: #e7edf0; }
.competency-meter > div { height: 100%; width: 0; background: #087f62; transition: width .25s ease; }
.competency-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.competency-metrics > div { min-width: 0; padding-right: 10px; border-right: 1px solid #e5e9ed; }
.competency-metrics > div:last-child { border-right: 0; }
.competency-metrics strong { display: block; margin-bottom: 5px; color: #153c34; font-size: 20px; line-height: 1.15; }
.competency-metrics span { display: block; color: #607181; font-size: 12px; line-height: 1.4; }
.competency-note { margin: 22px 0 0; color: #637383; font-size: 12px; line-height: 1.5; }
.competency-child-picker { margin-top: 18px; }
.competency-child-picker label { display: block; margin-bottom: 5px; color: #536678; font-size: 13px; font-weight: 600; }
.competency-child-picker select { min-width: 190px; max-width: 100%; padding: 9px 12px; border: 1px solid #cbd8dd; border-radius: 6px; background: white; color: #15303b; }
.competency-history-item { display: flex; justify-content: space-between; gap: 15px; padding: 12px 10px; border-bottom: 1px solid #e8edf0; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.competency-history-item:hover, .competency-history-item:focus-visible { background: #f1faf7; outline: 0; transform: translateX(2px); }
.competency-history-item:last-child { border-bottom: 0; }
.competency-history-item strong { display: block; color: #1d3340; font-size: 13px; overflow-wrap: anywhere; }
.competency-history-item small { display: block; margin-top: 4px; color: #667687; font-size: 12px; }
.competency-history-result { flex: 0 0 auto; text-align: right; color: #087f62; font-weight: 700; font-size: 13px; }
.competency-history-result small { font-weight: 400; }
.learning-insights { margin: 0 0 28px; padding: 26px; background: #fff; border: 1px solid #e3ebe8; border-radius: 8px; box-shadow: 0 12px 30px rgba(28, 54, 49, .06); }
.insight-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.insight-heading span, .insight-panel span, .parent-plan-title span, .attempt-modal-kicker { display: block; color: #087f62; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.insight-heading h2 { margin: 4px 0 0; color: #142936; font-size: 22px; letter-spacing: 0; }
.insight-heading p { max-width: 430px; margin: 0; color: #607181; font-size: 13px; line-height: 1.5; text-align: right; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #e4ece9; border-radius: 7px; overflow: hidden; }
.insight-panel { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 20px; border-right: 1px solid #e4ece9; }
.insight-panel:last-child { border-right: 0; }
.insight-panel > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e9f8f3; color: #087f62; font-size: 17px; }
.insight-focus > i { background: #fff2eb; color: #e65322; }
.insight-pace > i { background: #eef0ff; color: #5653c8; }
.insight-panel strong { display: block; margin-top: 5px; color: #19333e; font-size: 15px; line-height: 1.35; }
.insight-panel p { margin: 7px 0 0; color: #637383; font-size: 12px; line-height: 1.5; }
.parent-plan { display: grid; grid-template-columns: minmax(190px, .7fr) 1.3fr; gap: 24px; margin-top: 22px; padding-top: 22px; border-top: 1px solid #e4ece9; }
.parent-plan-title { display: flex; gap: 12px; align-items: flex-start; }
.parent-plan-title i { color: #e65322; font-size: 22px; }
.parent-plan-title strong { display: block; margin-top: 5px; color: #18333f; font-size: 15px; }
.parent-plan ol { margin: 0; padding-left: 22px; color: #405866; font-size: 13px; line-height: 1.55; }
.parent-plan li + li { margin-top: 6px; }
.attempt-modal[hidden] { display: none; }
.attempt-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; }
.attempt-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 36, 43, .55); }
.attempt-modal-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; background: #fff; border-radius: 8px; box-shadow: 0 24px 70px rgba(8, 28, 34, .28); }
.attempt-modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 1px solid #d8e2df; border-radius: 50%; background: #fff; color: #314b55; cursor: pointer; }
.attempt-modal-dialog h2 { margin: 6px 44px 4px 0; color: #142936; font-size: 23px; letter-spacing: 0; }
.attempt-modal-date { margin: 0 0 20px; color: #657684; font-size: 13px; }
.attempt-score { padding: 18px; background: #edf9f5; border-left: 4px solid #087f62; color: #087f62; font-size: 28px; font-weight: 800; }
.attempt-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; border: 1px solid #e3ebe8; border-radius: 7px; overflow: hidden; }
.attempt-facts div { padding: 14px 16px; border-right: 1px solid #e3ebe8; border-bottom: 1px solid #e3ebe8; }
.attempt-facts div:nth-child(2n) { border-right: 0; }
.attempt-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.attempt-facts dt { color: #6a7a86; font-size: 11px; text-transform: uppercase; font-weight: 700; }
.attempt-facts dd { margin: 5px 0 0; color: #18333f; font-weight: 750; }
.attempt-guidance { padding: 16px 18px; background: #fff7f1; border-radius: 7px; }
.attempt-guidance strong { color: #b63d17; }
.attempt-guidance p, .attempt-data-note { margin: 7px 0 0; color: #586d78; font-size: 13px; line-height: 1.55; }
.attempt-data-note { margin-top: 14px; font-size: 11px; }
.attempt-modal-open { overflow: hidden; }

@media (max-width: 800px) {
  .competency-details { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .insight-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .insight-heading p { text-align: left; }
  .insight-grid { grid-template-columns: minmax(0, 1fr); }
  .insight-panel { border-right: 0; border-bottom: 1px solid #e4ece9; }
  .insight-panel:last-child { border-bottom: 0; }
  .parent-plan { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .competency-metrics { gap: 8px; }
  .competency-metrics strong { font-size: 16px; }
  .competency-history-item { flex-wrap: wrap; }
  .competency-history-result { flex-basis: 100%; text-align: left; }
  .learning-insights { padding: 20px 16px; }
  .attempt-modal-dialog { padding: 24px 18px; }
  .attempt-facts { grid-template-columns: 1fr; }
  .attempt-facts div, .attempt-facts div:nth-child(2n), .attempt-facts div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e3ebe8; }
  .attempt-facts div:last-child { border-bottom: 0; }
}
