/* ============================================================================
   JOB MATCH MEMO (one participant and one posting to a staff-only memo).
   Its own sheet, like Case Notes. Colors come from the tool tokens in
   styles.css (data-tool="match", indigo); the soft check and the warnings use
   the shared warning yellow, as Case Notes does.
   ============================================================================ */

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

#jobMatchMemoPage [hidden] { display: none !important; }
#jobMatchMemoPage .card { margin-bottom: 1.5rem; }
#jobMatchMemoPage .form-group input,
#jobMatchMemoPage .form-group select,
#jobMatchMemoPage .form-group textarea { width: 100%; }
#jobMatchMemoPage .form-group .form-help { margin: 0 0 0.4rem; }
#jobMatchMemoPage .form-group .jmm-counter { margin: 0.35rem 0 0; }
.jmm-form .story-sub + .story-row,
.jmm-form .story-sub + .jmm-rule { margin-top: 0.5rem; }
.jmm-form .form-group + .story-sub { margin-top: 1.5rem; }

.jmm-results h3:focus:not(:focus-visible) { outline: none; }

.jmm-rule {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.25rem 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--tool);
    background: var(--tool-tint);
    border-radius: var(--radius-md);
    font-weight: 600;
}
.jmm-rule svg { flex: none; margin-top: 0.15rem; }

.jmm-profile {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.jmm-profile .form-group { margin-bottom: 0.5rem; }
.jmm-profile .form-actions { margin: 0; }
#jmmProfileStatus:empty { display: none; }
#jmmProfileStatus { margin: 0.6rem 0 0; }

.jmm-check,
.jmm-warnings {
    margin: 0 0 1rem;
    padding: 0.85rem 1.1rem;
    background: #fef9c3;
    border: 1px solid #ca8a04;
    border-radius: var(--radius-md);
    color: #422006;
}
.jmm-warnings { list-style: disc; padding-left: 2.1rem; }
.jmm-warnings li + li { margin-top: 0.35rem; }
.jmm-check p { margin: 0 0 0.5rem; }
.jmm-check ul { margin: 0 0 0.5rem; padding-left: 1.2rem; }
.jmm-check code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(255, 255, 255, 0.7); padding: 0 0.3rem; border-radius: 4px; overflow-wrap: anywhere; }

.jmm-results { margin-top: 0.5rem; padding-top: 1.25rem; border-top: 5px solid var(--tool); }
.jmm-results > h3 { margin: 0 0 0.75rem; }
.jmm-staff-only {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.9rem;
    border: 2px solid var(--tool);
    border-radius: var(--radius-md);
    color: var(--tool-text);
    font-weight: 600;
}
.jmm-title { margin: 0 0 1rem; font-weight: 700; font-size: 1.05rem; }
.jmm-title:empty { display: none; }

.jmm-section { border-left: 4px solid var(--tool); }
.jmm-section h4 { margin: 0 0 0.5rem; }
.jmm-disclosure { border-left-color: #ca8a04; }
.jmm-out-text {
    width: 100%;
    font: inherit;
    line-height: 1.55;
    padding: 0.85rem 1rem;
    margin: 0;
    background: #fbfaf8;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    resize: vertical;
}

.jmm-intro { border-style: dashed; }
.jmm-intro h3 { margin: 0 0 0.35rem; }
.jmm-intro p { margin: 0; }

#jobMatchMemoPage .form-actions .btn { min-height: 44px; }

@media (max-width: 600px) {
    #jobMatchMemoPage .story-row { grid-template-columns: minmax(0, 1fr); }
    #jobMatchMemoPage .form-actions .btn { flex: 1 1 100%; width: 100%; }
}
