/* An editing proposal shown as tracked changes (public pages).
   Markup: templates/v2/partials/public_tracked_changes_figure.html
   The radio buttons in .eb-tc__views choose what the passage shows; no script. */

.eb-tc {
    --tc-insert: #146c43;
    --tc-delete: #b42318;
    --tc-navy: var(--eb-navy, #0b1c3f);
    margin: 0;
}
.eb-tc__card {
    background: #fff;
    border: 1px solid rgba(11, 28, 63, 0.12);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(11, 28, 63, 0.16);
    overflow: hidden;
}

/* ── The three views ── */
.eb-tc__views {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
    margin: 0;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid #ede8dd;
    background: #fcfbf8;
}
.eb-tc__views label {
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tc-navy);
    cursor: pointer;
}
.eb-tc__views label:hover { background: rgba(11, 28, 63, 0.06); }
.eb-tc__views input:checked + label { background: var(--tc-navy); color: #fff; }
.eb-tc__views input:focus-visible + label {
    outline: 3px solid var(--eb-amber, #c8913a);
    outline-offset: 2px;
}

/* ── Passage and explanations ── */
.eb-tc__body {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
}
@media (min-width: 576px) {
    .eb-tc__body { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem; }
}
.eb-tc__page p {
    margin: 0 0 0.9rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #1b2333;
}
.eb-tc del {
    color: var(--tc-delete);
    text-decoration: line-through;
}
.eb-tc ins {
    color: var(--tc-insert);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.eb-tc__ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--tc-navy);
    color: #fff;
    font-family: system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
}
sup.eb-tc__ref { vertical-align: super; }
.eb-tc__notes {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.eb-tc__notes li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.3rem 0.45rem;
    padding: 0.6rem 0.75rem 0.7rem;
    background: #fbf6ea;
    border: 1px solid #eadfc8;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #3f4a5c;
}
.eb-tc__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a5312;
}
.eb-tc__note { grid-column: 1 / -1; }
.eb-tc__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1rem;
    margin: 0;
    padding: 0.75rem 1.5rem 0.9rem;
    border-top: 1px solid #ede8dd;
    font-size: 0.85rem;
    color: #4b5563;
}

/* Tracked changes: keep a deletion and the insertion that replaces it apart. */
.eb-tc:has(#eb-tc-view-changes:checked) .eb-tc__page del + ins { margin-left: 0.25em; }
/* Original text: without the insertions, deletions read as ordinary text. */
.eb-tc:has(#eb-tc-view-original:checked) .eb-tc__page ins { display: none; }
.eb-tc:has(#eb-tc-view-original:checked) .eb-tc__page del { color: inherit; text-decoration: none; }
.eb-tc:has(#eb-tc-view-original:checked) .eb-tc__page .eb-tc__ref { display: none; }
.eb-tc:has(#eb-tc-view-original:checked) .eb-tc__notes { visibility: hidden; }
/* Accepted: without the deletions, insertions read as ordinary text. */
.eb-tc:has(#eb-tc-view-accepted:checked) .eb-tc__page del { display: none; }
.eb-tc:has(#eb-tc-view-accepted:checked) .eb-tc__page ins { color: inherit; text-decoration: none; }

.eb-tc figcaption a { color: var(--tc-navy); text-underline-offset: 0.2em; }
.eb-tc figcaption a:focus-visible { outline: 3px solid var(--eb-amber, #c8913a); outline-offset: 2px; }
