/* Scope the photo transcription layout to the grade 10 chemistry page. */
body[data-note-subject="chemistry-10"] {
    --chem-diagram-paper: var(--bg-secondary, #fff);
    --chem-diagram-ink: var(--text-primary, #182235);
    --chem-diagram-orbital: color-mix(in srgb, var(--accent-color, #2563eb) 12%, var(--chem-diagram-paper));
    --chem-diagram-overlap: color-mix(in srgb, var(--accent-color, #2563eb) 28%, var(--chem-diagram-paper));
}
body[data-note-subject="chemistry-10"] .chem-block-title {
    display: block;
    margin-bottom: .65rem;
    font-size: 1.08em;
    line-height: 1.4;
    color: var(--text-primary);
}
body[data-note-subject="chemistry-10"] .example-box > strong.chem-block-title:first-child {
    width: auto;
    margin: 0 0 .65rem !important;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--text-primary) !important;
    font-size: 1.08em;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
}
body[data-note-subject="chemistry-10"] .chem-topic-alias {
    display: block;
    height: 0;
    scroll-margin-top: 5rem;
}
/* Nested blocks keep a visible hierarchy without repeating a label above every
   equation. Their IDs and actions remain available to the reader tools. */
body[data-note-subject="chemistry-10"] :is(.properties-box, .example-box, .derivation-box) > :is(.properties-box, .example-box, .derivation-box, .formula-box) {
    margin-block: .75rem !important;
    padding: .8rem !important;
}
body[data-note-subject="chemistry-10"] :is(.properties-box, .example-box, .derivation-box) > :is(.properties-box, .example-box, .derivation-box, .formula-box)::before {
    display: none;
}
/* Override only the notebook drawings; preserve transparent orbital interiors
   and leave formula glyphs, icons and exported SVG source colors untouched. */
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg {
    background: var(--chem-diagram-paper);
}
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg > rect[fill="#ffffff"] {
    fill: var(--chem-diagram-paper);
}
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg [fill="#182235"] {
    fill: var(--chem-diagram-ink);
}
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg [stroke="#26344a"] {
    stroke: var(--chem-diagram-ink);
}
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg :is([fill="#e8eef9"], [fill="#e2ecfa"]) {
    fill: var(--chem-diagram-orbital);
}
body[data-note-subject="chemistry-10"] :is(.chem-note-figure, .chem-note-table, .kc-table-answer) svg [fill="#bcd4f1"] {
    fill: var(--chem-diagram-overlap);
}
body[data-note-subject="chemistry-10"] .chem-note-figure {
    margin: 1rem 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--exp-border, #dbe1ea);
    border-radius: 12px;
    background: var(--chem-diagram-paper);
    break-inside: avoid;
}
body[data-note-subject="chemistry-10"] .chem-note-figure svg {
    display: block;
    max-width: none;
    height: auto;
    margin-inline: auto;
}
body[data-note-subject="chemistry-10"] .chem-note-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    margin-block: 1rem;
}
body[data-note-subject="chemistry-10"] .chem-note-table-scroll:focus-visible {
    outline: 2px solid var(--exp-accent, #2563eb);
    outline-offset: 3px;
}
body[data-note-subject="chemistry-10"] .chem-note-table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    font-size: .95em;
}
body[data-note-subject="chemistry-10"] .chem-note-table th,
body[data-note-subject="chemistry-10"] .chem-note-table td {
    padding: .75rem;
    text-align: left;
    vertical-align: middle;
    border: 1px solid var(--exp-border, #dbe1ea);
    overflow-wrap: anywhere;
}
body[data-note-subject="chemistry-10"] .chem-note-table th {
    font-weight: 650;
}
body[data-note-subject="chemistry-10"] .chem-note-table svg {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: var(--chem-diagram-paper);
}
@media screen and (max-width: 700px) {
    body[data-note-subject="chemistry-10"] .chem-note-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    body[data-note-subject="chemistry-10"] .chem-note-table,
    body[data-note-subject="chemistry-10"] .chem-note-table tbody {
        display: block;
        min-width: 0 !important;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table tr {
        display: grid;
        margin-bottom: .9rem;
        border: 1px solid var(--exp-border, #dbe1ea);
        border-radius: 10px;
        padding: .3rem .7rem;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table td {
        display: block;
        border: 0;
        padding: .4rem 0;
        min-width: 0;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table td::before {
        content: attr(data-label);
        display: block;
        font-size: .78rem;
        font-weight: 600;
        line-height: 1.4;
        opacity: .7;
        margin-bottom: .25rem;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table td:empty {
        display: none;
    }
}
@media print {
    body[data-note-subject="chemistry-10"] {
        --chem-diagram-paper: #fff;
        --chem-diagram-ink: #182235;
        --chem-diagram-orbital: #e8eef9;
        --chem-diagram-overlap: #bcd4f1;
    }
    body[data-note-subject="chemistry-10"] .chem-note-figure,
    body[data-note-subject="chemistry-10"] .chem-note-table-scroll {
        overflow: visible;
    }
    body[data-note-subject="chemistry-10"] .chem-note-figure svg {
        max-width: 100%;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table tr {
        break-inside: avoid;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table {
        min-width: 0 !important;
    }
    body[data-note-subject="chemistry-10"] .chem-note-table thead {
        display: table-header-group;
    }
}
