/* Protocol consistency checklist.
   Scoped to .pc-* so it cannot reach anything else on the site. Colours come
   from the site tokens, so the tool follows the theme rather than declaring a
   second palette that drifts from it. */

.pc-privacy {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-line);
    padding: 1rem 1.15rem;
    margin-bottom: 1.75rem;
    font-size: .93rem;
    line-height: 1.55;
}
.pc-privacy .ic { width: 1.15rem; height: 1.15rem; flex-shrink: 0; margin-top: .18rem; color: var(--accent); }

/* ---- setup fields ---- */
.pc-setup {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.pc-setup label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dim);
}
.pc-setup input {
    font: inherit;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: .55rem .7rem;
}
.pc-setup input:focus-visible,
.pc-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- progress ---- */
.pc-bar { margin-bottom: 1.1rem; }
.pc-bar-track {
    height: 6px;
    background: var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.pc-bar-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width .25s ease;
}
.pc-bar-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    margin-top: .6rem;
    font-size: .82rem;
    color: var(--text-dim);
}
.pc-bar-counts b { color: var(--text); font-variant-numeric: tabular-nums; }
.pc-k::before {
    content: "";
    display: inline-block;
    width: .55rem; height: .55rem;
    border-radius: 50%;
    margin-right: .4rem;
    vertical-align: baseline;
}
.pc-k-ok::before    { background: #2f8f5b; }
.pc-k-issue::before { background: #c2452f; }
.pc-k-na::before    { background: var(--text-dim); }

/* ---- actions ---- */
.pc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    padding-bottom: 1.6rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--line);
}
.pc-actions .btn { font-size: .87rem; padding: .5rem .95rem; }
.pc-reset { margin-left: auto; }
.pc-saved { font-size: .78rem; color: var(--text-dim); flex-basis: 100%; }

/* ---- groups and items ---- */
.pc-group { margin-top: 2.6rem; }
.pc-group h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.pc-group-note {
    margin: 0 0 1.1rem;
    font-size: .89rem;
    color: var(--text-dim);
    max-width: 66ch;
}

.pc-item {
    border: 1px solid var(--line);
    border-left: 3px solid var(--line);
    background: var(--bg);
    padding: 1.05rem 1.2rem;
    margin-bottom: .7rem;
    transition: border-color .15s ease;
}
.pc-item[data-state="ok"]    { border-left-color: #2f8f5b; }
.pc-item[data-state="issue"] { border-left-color: #c2452f; }
.pc-item[data-state="na"]    { border-left-color: var(--text-dim); opacity: .72; }

.pc-item-head { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .5rem; }
.pc-refs {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: .72rem;
    letter-spacing: .02em;
    color: var(--accent);
    font-weight: 600;
}
.pc-item h3 { margin: 0; font-size: 1rem; line-height: 1.4; }
.pc-why {
    margin: 0 0 .85rem;
    font-size: .91rem;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 72ch;
}

.pc-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pc-states { display: flex; flex-wrap: wrap; gap: .4rem; }
.pc-state {
    font: inherit;
    font-size: .8rem;
    font-weight: 550;
    color: var(--text-dim);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: .34rem .7rem;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.pc-state:hover { border-color: var(--accent); color: var(--text); }
.pc-state:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pc-state[aria-pressed="true"] { color: #fff; border-color: transparent; }
.pc-state[data-v="ok"][aria-pressed="true"]    { background: #2f8f5b; }
.pc-state[data-v="issue"][aria-pressed="true"] { background: #c2452f; }
.pc-state[data-v="na"][aria-pressed="true"]    { background: #6b7580; }

.pc-note-toggle {
    font: inherit;
    font-size: .8rem;
    color: var(--accent);
    background: none;
    border: 0;
    padding: .34rem .2rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: .18em;
    margin-left: auto;
}
.pc-note-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pc-note {
    display: block;
    width: 100%;
    margin-top: .7rem;
    font: inherit;
    font-size: .89rem;
    color: var(--text);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: .55rem .7rem;
    resize: vertical;
}
/* The UA [hidden] rule loses to any class that sets display, so state it here
   as well. This bit the curriculum accordion on the training site. */
.pc-note[hidden] { display: none; }

/* ---- closing ---- */
.pc-foot { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.pc-foot h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.pc-foot p { font-size: .93rem; color: var(--text-dim); max-width: 70ch; }
.pc-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.8rem;
    padding: 1.4rem 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
}
.pc-cta h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.pc-cta p { margin: 0; max-width: 46ch; font-size: .92rem; }
.pc-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

@media (max-width: 620px) {
    .pc-note-toggle { margin-left: 0; }
    .pc-reset { margin-left: 0; }
    .pc-state { flex: 1 1 auto; text-align: center; }
}

/* ---- print: the report, not the interface ---- */
@media print {
    .site-header, .site-footer, footer, .pc-actions, .pc-privacy,
    .pc-note-toggle, .pc-cta, canvas, .breadcrumb { display: none !important; }
    .pc-item { break-inside: avoid; border-left-width: 3px; opacity: 1; }
    .pc-state { display: none; }
    .pc-state[aria-pressed="true"] { display: inline-block; color: #000; border: 1px solid #000; background: none; }
    .pc-note[hidden] { display: none; }
    .pc-note { border: 0; padding: 0; background: none; }
    body { background: #fff; color: #000; }
}
