/* Plan check. Secondary action under the written answer: never purple-filled. */
.plan-check { display: contents; }
.plan-check__open {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; margin-left: 8px;
    min-height: 44px; padding: 8px 4px; background: none; border: 0;
    color: #b6a6ff; font: 600 14px/1.2 var(--font-ui, 'Plus Jakarta Sans', sans-serif); cursor: pointer;
    order: 4; /* .study-response is a flex row ordered by number: sit with the other secondary actions */
}
.plan-check__open:hover { text-decoration: underline; text-underline-offset: 3px; }
.plan-check__open:focus-visible, .plan-check__go:focus-visible, .plan-check__add:focus-visible,
.plan-check__input:focus-visible { outline: 2px solid #b6a6ff; outline-offset: 2px; }
.plan-check__panel {
    display: block; flex-basis: 100%; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 16px;
    background: #18181b; border: 1px solid #2a2a30; border-radius: 10px; color: #f5f5f7;
    font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif); order: 6;
}
.plan-check__panel[hidden] { display: none; }
.plan-check__label { font: 500 11px/1 var(--font-ui); letter-spacing: .08em; color: #8e8e99; }
.plan-check__words { display: grid; gap: 10px; margin-top: 12px; }
.plan-check__chip {
    display: inline-block; padding: 3px 8px; border: 1px solid #2a2a30; border-radius: 999px;
    font: 500 11px/1.2 var(--font-ui); letter-spacing: .06em; color: #f5f5f7;
}
.plan-check__cw p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #b5b5bf; }
.plan-check__inputs { display: grid; gap: 8px; margin-top: 14px; }
.plan-check__input {
    width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; background: #111113;
    border: 1px solid #2a2a30; border-radius: 8px; color: #f5f5f7; font: 15px/1.4 var(--font-ui, sans-serif);
}
.plan-check__input::placeholder { color: #8e8e99; }
.plan-check__add {
    margin-top: 6px; min-height: 44px; padding: 8px 0; background: none; border: 0; color: #b6a6ff;
    font: 600 14px/1.2 var(--font-ui, sans-serif); cursor: pointer;
}
.plan-check__add[hidden] { display: none; }
.plan-check__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; }
.plan-check__go {
    min-height: 44px; padding: 10px 18px; background: transparent; border: 1px solid #b6a6ff; border-radius: 999px;
    color: #b6a6ff; font: 700 14px/1.2 var(--font-ui, sans-serif); cursor: pointer;
}
.plan-check__go:disabled { border-color: #2a2a30; color: #8e8e99; cursor: not-allowed; }
.plan-check__meta { font-size: 12px; color: #8e8e99; }
.plan-check__capped { margin: 10px 0 0; font-size: 13px; color: #f0c779; }
.plan-check__error { margin: 10px 0 0; font-size: 13px; color: #f3aba3; }
.plan-check__error[hidden] { display: none; }
.plan-check__result:not(:empty) { margin-top: 16px; padding-top: 14px; border-top: 1px solid #2a2a30; }
.plan-check__result-title { margin: 0 0 10px; font: 500 11px/1 var(--font-ui); letter-spacing: .08em; color: #8e8e99; text-transform: uppercase; }
.plan-check__result-title:focus { outline: none; }
.plan-check__result-title:focus-visible { outline: 2px solid #b6a6ff; outline-offset: 4px; }
.plan-check__row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; margin: 0 0 12px; align-items: baseline; }
.plan-check__tag { font: 600 13px/1.4 var(--font-ui, sans-serif); white-space: nowrap; }
.plan-check__row--covered .plan-check__tag { color: #9ddbb5; }
.plan-check__row--missing .plan-check__tag { color: #f0c779; }
.plan-check__row--add .plan-check__tag { color: #b6a6ff; }
.plan-check__text { font: 400 16px/1.5 var(--font-body); color: #f5f5f7; }
.plan-check__note { margin: 4px 0 0; font-size: 12px; color: #8e8e99; }
/* Gone once the answer has a mark: a plan check is only for before writing. */
.written-answer-wrap:has(.grade-result:not([style*="display:none"]):not([style*="display: none"])) .plan-check { display: none; }
@media (max-width: 480px) {
    .plan-check__row { grid-template-columns: 1fr; gap: 2px; }
    .plan-check__go { width: 100%; }
    .plan-check__words { gap: 12px; }
}
