/* ============================================================================
   CASE NOTES (Case Note and Justification Drafter). Its own sheet, like
   Success Stories. Colors come from the tool tokens in styles.css
   (data-tool="notes", teal); nothing here hard-codes a tool color except the
   soft-check panel, which uses the shared warning yellow.
   The record button and dictation status reuse the story-record classes in
   success-stories.css.
   ============================================================================ */

/* Home: six cards fill three rows of two, so Career Pathways no longer needs
   the full-width last row (that rule only applies to an odd count). */
.tool-card:nth-child(6) { animation-delay: 300ms; }

#caseNotesPage > .page-head { margin-bottom: 2rem; }
#caseNotesPage > .page-head .feature-identifier { margin-bottom: 1rem; }
#caseNotesPage > .page-head h2 { margin: 0 0 1.25rem; }
#caseNotesPage > .page-head .page-description { margin: 0; max-width: 64ch; }
body[data-tool="notes"] #caseNotesPage.active > .page-head > h2 {
    text-decoration: underline;
    text-decoration-color: var(--tool);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}
#caseNotesPage [hidden] { display: none !important; }

.cn-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0 1.25rem;
}
.cn-row .form-group select,
.cn-row .form-group input { width: 100%; }

.cn-justification {
    margin: 0.25rem 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
}
.cn-justification-fields { margin-top: 0.75rem; }
.cn-justification-fields .form-group { margin-bottom: 0; }

.cn-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.cn-check input { width: 18px; height: 18px; accent-color: var(--tool); margin: 0; }
.cn-closing { font-weight: 400; color: var(--text-muted); font-size: 0.95rem; margin: 0.25rem 0 0.5rem; }

.cn-rule {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--tool);
    background: var(--tool-tint);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-weight: 600;
    color: var(--text-primary);
}
.cn-rule svg { flex: none; margin-top: 0.1rem; color: var(--tool-text); }

.cn-text-group textarea { width: 100%; min-height: 14rem; line-height: 1.55; }

.cn-pii {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    background: #fef9c3;
    border: 1px solid #ca8a04;
    border-radius: var(--radius-md);
    color: #422006;
}
.cn-pii-head { margin: 0 0 0.5rem; }
.cn-pii-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.cn-pii-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(202, 138, 4, 0.35);
}
.cn-pii-list li:last-child { border-bottom: 0; }
.cn-pii-kind { font-weight: 600; }
.cn-pii-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(255, 255, 255, 0.7); padding: 0 0.3rem; border-radius: 4px; }
.cn-pii-list .link-button { color: #713f12; font-weight: 600; }
.cn-pii-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cn-pii-status { flex-basis: 100%; font-size: 0.875rem; color: #713f12; }
textarea.cn-pii-target { outline: 3px solid #ca8a04; outline-offset: 2px; transition: outline-color 1.2s ease-out; }

.cn-results { margin-top: 1.5rem; padding: 1.75rem; border-top: 5px solid var(--tool); }
.cn-results h3 { margin: 0 0 0.35rem; }
.cn-results textarea {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}
.cn-missing {
    margin: 0.5rem 0 1rem;
    padding: 1rem 1.25rem;
    background: var(--tool-tint);
    border-radius: var(--radius-md);
}
.cn-missing h4 { margin: 0 0 0.25rem; color: var(--tool-text); }
.cn-missing ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }
.cn-numbers {
    margin: 0.5rem 0 1rem;
    padding: 0.75rem 1rem;
    background: #fef9c3;
    border: 1px solid #ca8a04;
    border-radius: var(--radius-md);
    color: #422006;
}
.cn-numbers mark { background: #fde047; color: #422006; padding: 0 0.2rem; border-radius: 3px; }
.cn-tweaks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.75rem; }
.cn-tweaks .link-button { min-height: 44px; }

@media (max-width: 640px) {
    .cn-row { grid-template-columns: 1fr; }
    .cn-results { padding: 1.25rem; }
    #caseNotesPage .form-actions .btn { width: 100%; }
}

/* Touch targets (test report 2026-10-18, SD-29): the "Fix" link buttons in
   the Case Notes and Fly on the Wall identifying-info lists. */
.cn-pii-list .link-button { min-height: 44px; }
