/* =========================================================================
   Smart Notes — the sheet as paper.

   Loaded after ai-smart-notes.css and ai-smart-notes-v2.css, and after them on
   purpose: those two dress the generator's chrome (the dark modal, the source
   tabs, the question list), but they also styled the sheet itself as a stack of
   dark UI cards — translucent-white chips, light-grey text — while the sheet
   element has always been cream paper. Every one of those blocks was rendering
   light-on-light and could not be read.

   So the sheet stops pretending to be UI. It is a page out of a notebook:
   one ink colour for the rule, red for what goes wrong, green for the
   shortcut, a hand-drawn box around anything worth boxing, and a margin rail
   down the left. It looks the same on screen and out of the printer, because
   the print iframe loads this same file.

   Everything here is scoped under .ai-smart-notes-sheet, so nothing leaks into
   the app around it.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');

.ai-smart-notes-sheet {
    /* Ink box. Named after pens, because that is what they are. */
    --paper: #fbf7ec;
    --paper-edge: #e6ddc7;
    --ink: #1f3a93;
    --ink-strong: #16233f;
    --ink-red: #c62828;
    --ink-green: #1b5e20;
    --ink-pencil: #6d6a60;
    --highlighter: rgba(255, 226, 89, 0.72);
    --rail: 46px;

    max-width: 940px;
    margin: 0 auto;
    padding: 30px 32px 34px calc(var(--rail) + 26px);
    position: relative;
    background-color: var(--paper);
    /* Paper grain. Same trick the app's Handwritten Notes page uses, so the two
       features read as one product. */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
    border: 1px solid var(--paper-edge);
    border-radius: 3px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
    color: var(--ink-strong);
    font-family: 'Kalam', 'Comic Sans MS', cursive;
    font-size: 1.02rem;
    line-height: 1.72;
}

/* The margin rail — red pen line, exactly where a notebook puts it. */
.ai-smart-notes-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--rail);
    width: 1.5px;
    background: rgba(198, 40, 40, 0.55);
    pointer-events: none;
}

/* ------------------------------------------------------------- sheet head */

.ai-smart-notes-sheet .aisn-sheet-header {
    border-bottom: 2px solid rgba(31, 58, 147, 0.35);
    padding-bottom: 10px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.ai-smart-notes-sheet .aisn-kicker {
    font-family: 'Kalam', cursive;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink-pencil);
}

.ai-smart-notes-sheet .aisn-sheet-header h2 {
    font-size: 1.72rem;
    font-weight: 700;
    color: var(--ink-strong);
    letter-spacing: 0.2px;
}

.ai-smart-notes-sheet .aisn-sheet-meta {
    font-family: 'Kalam', cursive;
    font-size: 0.86rem;
    color: var(--ink-pencil);
}

.ai-smart-notes-sheet .aisn-stats {
    font-family: 'Kalam', cursive;
    gap: 10px;
    margin-bottom: 14px;
}

/* Chips are pencil, not UI pills. */
.ai-smart-notes-sheet .aisn-stats span,
.ai-smart-notes-sheet .aisn-qrefs,
.ai-smart-notes-sheet .aisn-focus-list span,
.ai-smart-notes-sheet .aisn-subrule,
.ai-smart-notes-sheet .aisn-pyq-badge,
.ai-smart-notes-sheet .aisn-rev-chip,
.ai-smart-notes-sheet .aisn-errtype {
    background: transparent;
    border: 1.4px solid rgba(109, 106, 96, 0.45);
    border-radius: 14px 6px 14px 6px / 6px 14px 6px 14px;
    color: var(--ink-strong);
    font-family: 'Kalam', cursive;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 11px;
}

.ai-smart-notes-sheet .aisn-pyq-badge.is-high,
.ai-smart-notes-sheet .aisn-rev-chip.is-weak,
.ai-smart-notes-sheet .aisn-errtype.is-trap {
    border-color: rgba(198, 40, 40, 0.6);
    color: var(--ink-red);
}

.ai-smart-notes-sheet .aisn-rev-chip.is-strong {
    border-color: rgba(27, 94, 32, 0.55);
    color: var(--ink-green);
}

.ai-smart-notes-sheet .aisn-errtype-advice {
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    font-size: 0.84rem;
}

/* Detail ladder: a row of tabs drawn in pencil. */
.ai-smart-notes-sheet .aisn-ladder {
    background: transparent;
    border: none;
    border-bottom: 1.5px dashed rgba(109, 106, 96, 0.4);
    border-radius: 0;
    padding: 0 0 8px;
    margin: 0 0 12px;
}

.ai-smart-notes-sheet .aisn-ladder-label {
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
}

.ai-smart-notes-sheet .aisn-ladder-btn {
    background: transparent;
    border: 1.4px solid rgba(31, 58, 147, 0.3);
    border-radius: 12px 5px 12px 5px / 5px 12px 5px 12px;
    color: var(--ink);
    font-family: 'Kalam', cursive;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 2px 12px;
}

.ai-smart-notes-sheet .aisn-ladder-btn.is-active {
    background: var(--highlighter);
    border-color: rgba(31, 58, 147, 0.6);
    color: var(--ink-strong);
}

.ai-smart-notes-sheet .aisn-coverage,
.ai-smart-notes-sheet .aisn-changelog {
    background: transparent;
    border: none;
    border-left: 3px solid rgba(109, 106, 96, 0.35);
    border-radius: 0;
    padding: 2px 0 2px 10px;
    margin: 8px 0 12px;
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    font-size: 0.84rem;
}

.ai-smart-notes-sheet .aisn-coverage b,
.ai-smart-notes-sheet .aisn-changelog span {
    color: var(--ink-strong);
}

/* ---------------------------------------------------------- concept block */

.ai-smart-notes-sheet .aisn-concepts {
    gap: 22px;
}

/* A concept is not a card. It is a stretch of the page with a heading. */
.ai-smart-notes-sheet .aisn-concept {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 16px;
    border-bottom: 1.5px dashed rgba(109, 106, 96, 0.32);
}

.ai-smart-notes-sheet .aisn-concept:last-child {
    border-bottom: none;
}

/* Priority shows as a pen mark in the margin, not as a coloured card. */
.ai-smart-notes-sheet .aisn-concept.is-high {
    border-left: none;
}

.ai-smart-notes-sheet .aisn-concept.is-high .aisn-concept-top::after {
    content: '★';
    color: var(--ink-red);
    font-size: 0.95rem;
    margin-left: 2px;
}

.ai-smart-notes-sheet .aisn-concept-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

/* Circled in red pen — never a perfect circle. */
.ai-smart-notes-sheet .aisn-concept-no {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--ink-red);
    border-radius: 49% 51% 52% 48% / 53% 47% 53% 47%;
    color: var(--ink-red);
    font-family: 'Kalam', cursive;
    font-weight: 700;
    font-size: 1rem;
    transform: rotate(-4deg);
}

.ai-smart-notes-sheet .aisn-concept h3,
.ai-smart-notes-sheet .aisn-focus h3 {
    font-family: 'Kalam', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink-strong);
    /* Underlined by hand: the line sits under the words, not under the box. */
    background: linear-gradient(180deg, transparent 82%, rgba(255, 226, 89, 0.8) 82%);
    display: inline;
    line-height: 1.5;
}

.ai-smart-notes-sheet .aisn-qrefs {
    color: var(--ink-pencil);
    font-size: 0.76rem;
}

/* -------------------------------------------------------- formula boxing */

.ai-smart-notes-sheet .aisn-formulas-wrapper {
    display: flex;
    /* The base sheet stacks these in a column, where a flex child stretches to
       full width and the box stops reading as something drawn around a
       formula. Boxes sit side by side and hug their contents instead. */
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0;
}

/* The hand-drawn box: uneven radii on both axes read as a pen stroke. It hugs
   the formula — a full-width bar would read as a UI panel again. */
.ai-smart-notes-sheet .aisn-formula-card {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(31, 58, 147, 0.75);
    border-radius: 255px 14px 225px 14px / 14px 225px 14px 255px;
    color: var(--ink-strong);
    padding: 9px 18px;
    font-size: 1.06rem;
    box-shadow: none;
    transform: rotate(-0.35deg);
}

.ai-smart-notes-sheet .aisn-formula-card:nth-child(even) {
    transform: rotate(0.4deg);
    border-radius: 14px 255px 14px 225px / 225px 14px 255px 14px;
}

.ai-smart-notes-sheet .aisn-formula-card.is-text {
    font-family: 'Kalam', cursive;
    font-size: 0.98rem;
}

.ai-smart-notes-sheet .katex {
    color: var(--ink-strong);
    font-size: 1.02em;
}

/* ------------------------------------------------------------ note lines */

.ai-smart-notes-sheet .aisn-lines {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.ai-smart-notes-sheet .aisn-lines p {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.7;
}

.ai-smart-notes-sheet .aisn-lines strong {
    color: var(--ink-strong);
    font-weight: 700;
}

.ai-smart-notes-sheet .aisn-lines .fa-bullseye {
    color: var(--ink);
}

.ai-smart-notes-sheet .aisn-line-shortcut {
    color: var(--ink-green) !important;
}

.ai-smart-notes-sheet .aisn-line-shortcut strong,
.ai-smart-notes-sheet .aisn-line-shortcut i {
    color: var(--ink-green) !important;
}

/* Traps are the one thing a student must not skim: red, and underlined the way
   you underline something twice with a pen. */
.ai-smart-notes-sheet .aisn-line-trap {
    color: var(--ink-red) !important;
    text-decoration: underline wavy rgba(198, 40, 40, 0.45);
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.ai-smart-notes-sheet .aisn-line-trap strong,
.ai-smart-notes-sheet .aisn-line-trap i {
    color: var(--ink-red) !important;
}

/* The numbered method, written down the page. */
.ai-smart-notes-sheet .aisn-steps {
    list-style: none;
    counter-reset: aisn-step;
    margin: 8px 0 2px;
    padding: 0;
    display: grid;
    gap: 5px;
}

.ai-smart-notes-sheet .aisn-steps li {
    counter-increment: aisn-step;
    position: relative;
    padding-left: 30px;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.65;
}

.ai-smart-notes-sheet .aisn-steps li::before {
    content: counter(aisn-step) ')';
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--ink-red);
    font-weight: 700;
}

/* Memory hook — the line a topper writes in the margin and boxes. */
.ai-smart-notes-sheet .aisn-hook {
    margin: 10px 0 0;
    padding: 7px 14px;
    display: inline-block;
    color: var(--ink-strong);
    font-size: 0.98rem;
    background: var(--highlighter);
    border-radius: 14px 6px 16px 5px / 5px 16px 6px 14px;
    transform: rotate(-0.5deg);
}

.ai-smart-notes-sheet .aisn-hook-tag {
    color: var(--ink-red);
    font-weight: 700;
    margin-right: 6px;
}

.ai-smart-notes-sheet .aisn-subrules {
    margin: 8px 0;
}

.ai-smart-notes-sheet .aisn-prereq {
    background: transparent;
    border: none;
    border-left: 3px solid rgba(109, 106, 96, 0.4);
    border-radius: 0;
    padding: 2px 0 2px 10px;
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    font-size: 0.86rem;
}

.ai-smart-notes-sheet .aisn-prereq-item {
    color: var(--ink-strong);
}

/* ---------------------------------------------------- example and figure */

.ai-smart-notes-sheet .aisn-example-box {
    background: rgba(255, 255, 255, 0.45);
    border: 1.6px dashed rgba(31, 58, 147, 0.45);
    border-radius: 12px 4px 12px 4px / 4px 12px 4px 12px;
    padding: 10px 14px;
    margin-top: 12px;
    color: var(--ink-strong);
}

.ai-smart-notes-sheet .aisn-example-title {
    color: var(--ink);
    font-family: 'Kalam', cursive;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.ai-smart-notes-sheet .aisn-example-content {
    color: var(--ink-strong);
    font-size: 1rem;
    line-height: 1.7;
}

.ai-smart-notes-sheet .aisn-geometry-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1.6px solid rgba(31, 58, 147, 0.4);
    border-radius: 60px 10px 60px 10px / 10px 60px 10px 60px;
    padding: 10px 12px 6px;
    margin: 12px 0;
    max-width: 320px;
}

.ai-smart-notes-sheet .aisn-geo-title {
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* ------------------------------------------- history-derived note blocks */

.ai-smart-notes-sheet .aisn-block-title {
    color: var(--ink-strong);
    font-family: 'Kalam', cursive;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 6px;
}

.ai-smart-notes-sheet .aisn-autopsy,
.ai-smart-notes-sheet .aisn-confusion,
.ai-smart-notes-sheet .aisn-variants,
.ai-smart-notes-sheet .aisn-hindi {
    background: transparent;
    border: none;
    border-top: 1.4px dashed rgba(109, 106, 96, 0.3);
    border-radius: 0;
    padding: 10px 0 0;
    margin: 12px 0 0;
    color: var(--ink-strong);
}

.ai-smart-notes-sheet .aisn-autopsy-row {
    background: transparent;
    border: none;
    border-left: 3px solid rgba(198, 40, 40, 0.5);
    border-radius: 0;
    padding: 2px 0 6px 12px;
    margin-bottom: 10px;
}

.ai-smart-notes-sheet .aisn-pick {
    background: transparent;
    border: 1.4px solid rgba(109, 106, 96, 0.4);
    border-radius: 12px 5px 12px 5px / 5px 12px 5px 12px;
    color: var(--ink-strong);
    font-family: 'Kalam', cursive;
    font-size: 0.92rem;
}

.ai-smart-notes-sheet .aisn-pick.is-wrong {
    border-color: rgba(198, 40, 40, 0.55);
    color: var(--ink-red);
}

.ai-smart-notes-sheet .aisn-pick.is-right {
    border-color: rgba(27, 94, 32, 0.5);
    color: var(--ink-green);
}

.ai-smart-notes-sheet .aisn-pick em,
.ai-smart-notes-sheet .aisn-autopsy-ref,
.ai-smart-notes-sheet .aisn-autopsy-crowd,
.ai-smart-notes-sheet .aisn-variant-ask,
.ai-smart-notes-sheet .aisn-variant-head {
    color: var(--ink-pencil);
}

.ai-smart-notes-sheet .aisn-autopsy-why {
    color: var(--ink-strong);
    font-size: 0.98rem;
}

.ai-smart-notes-sheet .aisn-confusion-table {
    font-family: 'Kalam', cursive;
    font-size: 0.94rem;
}

.ai-smart-notes-sheet .aisn-confusion-table th {
    color: var(--ink-pencil);
    border-bottom: 1.4px solid rgba(109, 106, 96, 0.4);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.84rem;
}

.ai-smart-notes-sheet .aisn-confusion-table td {
    color: var(--ink-strong);
    border-bottom: 1px dashed rgba(109, 106, 96, 0.25);
}

.ai-smart-notes-sheet .aisn-confusion-table td.is-right {
    color: var(--ink-green);
}

.ai-smart-notes-sheet .aisn-confusion-table td.is-wrong {
    color: var(--ink-red);
}

.ai-smart-notes-sheet .aisn-variant {
    background: rgba(255, 255, 255, 0.45);
    border: 1.5px solid rgba(31, 58, 147, 0.32);
    border-radius: 14px 5px 14px 5px / 5px 14px 5px 14px;
    color: var(--ink-strong);
}

.ai-smart-notes-sheet .aisn-variant-given,
.ai-smart-notes-sheet .aisn-variant-sol p {
    color: var(--ink-strong);
}

.ai-smart-notes-sheet .aisn-variant-sol summary,
.ai-smart-notes-sheet .aisn-hindi summary {
    color: var(--ink);
    font-family: 'Kalam', cursive;
}

.ai-smart-notes-sheet .aisn-hindi p {
    color: var(--ink-strong);
}

/* ------------------------------------------------------------- mind map */

.ai-smart-notes-sheet .aisn-mindmap {
    background: rgba(255, 255, 255, 0.4);
    border: 1.5px dashed rgba(31, 58, 147, 0.35);
    border-radius: 10px;
}

.ai-smart-notes-sheet .aisn-mm-head h3 {
    color: var(--ink-strong);
    background: none;
    display: flex;
    font-family: 'Kalam', cursive;
}

.ai-smart-notes-sheet .aisn-mm-head h3 i {
    color: var(--ink);
}

.ai-smart-notes-sheet .aisn-mm-head p,
.ai-smart-notes-sheet .aisn-mm-legend,
.ai-smart-notes-sheet .aisn-mm-note,
.ai-smart-notes-sheet .aisn-mm-hint {
    color: var(--ink-pencil);
}

.ai-smart-notes-sheet .aisn-mm-link {
    stroke: rgba(31, 58, 147, 0.35);
}

.ai-smart-notes-sheet .aisn-mm-link.is-weak {
    stroke: rgba(198, 40, 40, 0.45);
}

.ai-smart-notes-sheet .aisn-mm-center-glow {
    fill: none;
}

.ai-smart-notes-sheet .aisn-mm-center-ring {
    stroke: rgba(109, 106, 96, 0.5);
}

.ai-smart-notes-sheet .aisn-mm-center-core {
    fill: rgba(255, 255, 255, 0.75);
    stroke: rgba(31, 58, 147, 0.6);
    stroke-width: 1.6;
}

.ai-smart-notes-sheet .aisn-mm-dot {
    fill: rgba(255, 255, 255, 0.85);
    stroke: rgba(31, 58, 147, 0.65);
    stroke-width: 1.8;
}

.ai-smart-notes-sheet .aisn-mm-node.is-weak .aisn-mm-dot {
    stroke: var(--ink-red);
}

.ai-smart-notes-sheet .aisn-mm-node.is-strong .aisn-mm-dot {
    stroke: var(--ink-green);
}

.ai-smart-notes-sheet .aisn-mm-halo {
    fill: rgba(31, 58, 147, 0.06);
}

.ai-smart-notes-sheet .aisn-mm-center-label,
.ai-smart-notes-sheet .aisn-mm-center-sub,
.ai-smart-notes-sheet .aisn-mm-count,
.ai-smart-notes-sheet .aisn-mm-label,
.ai-smart-notes-sheet .aisn-mm-sub {
    fill: var(--ink-strong);
    font-family: 'Kalam', cursive;
}

.ai-smart-notes-sheet .aisn-mm-key {
    border: 1px solid var(--ink-strong);
}

/* --------------------------------------------------------- closing notes */

.ai-smart-notes-sheet .aisn-hidden-note {
    color: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    background: transparent;
    border: none;
}

.ai-smart-notes-sheet .aisn-focus {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 2px solid rgba(31, 58, 147, 0.35);
    background: transparent;
}

/* Last-day points get a tick box, because that is what they are for. */
.ai-smart-notes-sheet .aisn-focus-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.ai-smart-notes-sheet .aisn-focus-list span {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 28px;
    position: relative;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
}

.ai-smart-notes-sheet .aisn-focus-list span::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 6px;
    width: 13px;
    height: 13px;
    border: 1.6px solid rgba(198, 40, 40, 0.6);
    border-radius: 3px 1px 3px 1px / 1px 3px 1px 3px;
    transform: rotate(-3deg);
}

.ai-smart-notes-sheet .aisn-empty {
    color: var(--ink-pencil);
}

/* --------------------------------------------------------- failure state */

.aisn-fail {
    max-width: 420px;
    margin: 40px auto;
    text-align: center;
    color: #d6dae0;
}

.aisn-fail i {
    font-size: 2rem;
    color: #ffb199;
}

.aisn-fail h4 {
    margin: 12px 0 6px;
    font-size: 1.05rem;
    color: #eceff1;
}

.aisn-fail p {
    margin: 0 0 8px;
    font-size: 0.86rem;
    line-height: 1.6;
    color: rgba(232, 234, 237, 0.65);
}

.aisn-fail-hint {
    color: rgba(255, 202, 40, 0.85) !important;
}

.aisn-fail button {
    margin-top: 10px;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.5);
    background: rgba(0, 229, 255, 0.12);
    color: #7fe9ff;
    font-weight: 700;
    cursor: pointer;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 720px) {
    .ai-smart-notes-sheet {
        --rail: 26px;
        padding: 22px 18px 26px calc(var(--rail) + 14px);
        font-size: 0.98rem;
    }

    .ai-smart-notes-sheet .aisn-sheet-header h2 {
        font-size: 1.4rem;
    }

    .ai-smart-notes-sheet .aisn-formula-card {
        font-size: 1rem;
        padding: 8px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-smart-notes-sheet .aisn-formula-card,
    .ai-smart-notes-sheet .aisn-concept-no,
    .ai-smart-notes-sheet .aisn-hook {
        transform: none;
    }
}

/* ------------------------------------------- rules and facts (non-maths)

   English, Hindi and GK have no formula to box. Their key items are written
   lines with a pen dash in front, the way a rule gets copied into a notebook.
   ------------------------------------------------------------------------ */

.ai-smart-notes-sheet .aisn-rulelist {
    margin: 10px 0 6px;
    padding: 8px 0 8px 14px;
    border-left: 3px solid rgba(31, 58, 147, 0.4);
}

.ai-smart-notes-sheet .aisn-rulelist-title {
    color: var(--ink-pencil);
    font-size: 0.84rem;
    margin-bottom: 4px;
}

.ai-smart-notes-sheet .aisn-rulelist ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.ai-smart-notes-sheet .aisn-rulelist li {
    position: relative;
    padding-left: 20px;
    color: var(--ink-strong);
    font-size: 1rem;
    line-height: 1.62;
}

.ai-smart-notes-sheet .aisn-rulelist li::before {
    content: '–';
    position: absolute;
    left: 2px;
    color: var(--ink-red);
    font-weight: 700;
}

/* --------------------------------------------------- mind map, branch form */

.ai-smart-notes-sheet .aisn-mm-underline {
    stroke: rgba(31, 58, 147, 0.55);
    stroke-width: 1.6;
    stroke-linecap: round;
}

.ai-smart-notes-sheet .aisn-mm-node.is-weak .aisn-mm-underline {
    stroke: rgba(198, 40, 40, 0.6);
}

.ai-smart-notes-sheet .aisn-mm-node.is-strong .aisn-mm-underline {
    stroke: rgba(27, 94, 32, 0.55);
}

.ai-smart-notes-sheet .aisn-mm-subtext {
    fill: var(--ink-pencil);
    font-family: 'Kalam', cursive;
    font-size: 11.5px;
}

.ai-smart-notes-sheet .aisn-mm-label {
    font-size: 13.5px;
    font-weight: 700;
}

.ai-smart-notes-sheet .aisn-mm-count {
    font-size: 11px;
    font-weight: 700;
}

.ai-smart-notes-sheet .aisn-mm-center-core {
    fill: rgba(255, 255, 255, 0.8);
    stroke: rgba(31, 58, 147, 0.65);
    stroke-width: 2;
}

.ai-smart-notes-sheet .aisn-mm-center-label {
    font-size: 15px;
    font-weight: 700;
}

.ai-smart-notes-sheet .aisn-mm-svg {
    min-width: 680px;
}

/* ----------------------------------------------------------------- print

   The print iframe loads this same stylesheet, so what is on screen is what
   comes out of the printer. Only two things change: the paper goes white (a
   cream fill would flood the cartridge) and the inks go dark enough to survive
   a grayscale office printer, with red kept for traps because that is the one
   distinction worth the toner.
   ------------------------------------------------------------------------ */

@media print {
    .ai-smart-notes-sheet {
        --paper: #ffffff;
        --ink: #10224f;
        --ink-strong: #000000;
        --ink-pencil: #444444;
        --highlighter: rgba(0, 0, 0, 0.08);

        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0 0 0 calc(var(--rail) + 8px);
        background-image: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        font-size: 11.5pt;
        line-height: 1.6;
    }

    .ai-smart-notes-sheet .aisn-ladder,
    .ai-smart-notes-sheet .aisn-hidden-note,
    .ai-smart-notes-sheet .aisn-mm-hint {
        display: none !important;
    }

    .ai-smart-notes-sheet .aisn-concept,
    .ai-smart-notes-sheet .aisn-example-box,
    .ai-smart-notes-sheet .aisn-geometry-card,
    .ai-smart-notes-sheet .aisn-variant,
    .ai-smart-notes-sheet .aisn-autopsy,
    .ai-smart-notes-sheet .aisn-mindmap {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .ai-smart-notes-sheet .aisn-formula-card,
    .ai-smart-notes-sheet .aisn-example-box,
    .ai-smart-notes-sheet .aisn-variant,
    .ai-smart-notes-sheet .aisn-geometry-card {
        background: #ffffff;
    }

    /* details/summary would otherwise print collapsed, hiding the solution. */
    .ai-smart-notes-sheet .aisn-variant-sol > *,
    .ai-smart-notes-sheet .aisn-hindi > * {
        display: block !important;
    }
}
