/* style.css, part 7 of 13: the ⓘ note (src/info-note.js).
   A contiguous range of the pre-M7 style.css, linked from index.html in
   source order so the cascade is unchanged; see src/tokens.css. */

/* ============================================================
   THE ⓘ NOTE — src/info-note.js.

   The owner's note on the UI was that there is "too much wording", and the
   answer was to cut every long <small> under a control down to one actionable
   line and put the rest behind an icon, as a TERM/DETAIL list rather than a
   paragraph.

   These rules live here, in style.css, and NOT in a src/info-note.css of their
   own. That is deliberate. tests/a11y-static.mjs, tests/a11y-reflow.mjs and
   tests/support-mobile-smoke.mjs each carry a hard-coded list of stylesheets,
   so a new src/*.css is invisible to all three — and style.css is the one
   sheet a11y-reflow cascades onto the real elements of index.html and
   a11y-static measures every contrast pair against. Putting the rules here
   gets them MORE coverage, not less.

   Every colour below is one of the measured inks (--text-primary,
   --text-secondary, --accent-text). The candy pinks stay fills and borders,
   which is row E3 and is checked across every sheet.
   ============================================================ */

/* The visible line and its ⓘ share one row, so the button sits at the end of
   the sentence instead of becoming a full-width row of its own in the flex
   column that surrounds it. The <small> keeps its id and its place in the
   accessibility tree: it is an aria-describedby target for the control above,
   and a hidden description is not exposed at all. */
.in-row {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}
.in-row > small { flex: 1 1 auto; min-width: 0; }

/* 44 px of target around a 24 px glyph. The hit area is what WCAG 2.5.8 asks
   for and what a thumb needs; the ring is what the sidebar can afford to look
   at thirty times over. */
.in-open {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    /* The 44 px target is taller than the line beside it, so it bleeds ~5.6 px
       above and below. Both flex gaps around it are 8 px or 16 px, so the
       bleed lands in a gap and never over a neighbouring control. */
    margin: -0.35rem -0.5rem -0.35rem 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--dur-160) ease;
}
.in-open-glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: var(--fs-base);
    line-height: 1;
}
.in-open:hover { background: var(--c-pink-50); }
.in-open:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: -2px;
}

/* ---- the panel ---- */
/* 9500 sits under the per-section guide's 9600 and over everything else the
   page stacks, including the phone sheet at 3000 and the support notice at
   4000. The two disclosures are never open together — opening one closes the
   other by taking focus — so the order only has to be defined, not fought. */
.in-root {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.in-scrim {
    position: absolute;
    inset: 0;
    background: var(--scrim-color);
}
/* `width: 100%` plus `max-width`, NOT `width: min(420px, 100%)`. The two
   render identically; only the first survives tests/support-mobile-smoke.mjs,
   which pulls every px length out of every `width` declaration and fails
   anything >= 390 px whether or not a min() would ever let it bind. Writing
   the cap as a max-width says the same thing in a form that scan can read. */
.in-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    background: var(--card-bg);
    border: 2px solid var(--border-card-open);
    border-radius: 22px;
    box-shadow: 0 18px 44px var(--shadow-soft);
    padding: 1.15rem 1.25rem 1rem;
}
.in-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: var(--fw-strong);
    letter-spacing: var(--tracking-title);   /* the family's dialog title */
    color: var(--text-primary);
}
.in-title:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 4px;
    border-radius: var(--radius-inset);
}
/* A definition list, not a paragraph — that IS the feature. A term the user
   can scan for, then one short sentence. */
.in-body { margin: 0; }
.in-term {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--accent-text);
    margin-top: 0.55rem;
}
.in-body > .in-term:first-child { margin-top: 0; }
.in-detail {
    margin: 0.15rem 0 0;
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.in-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}
.in-btn {
    min-height: 44px;
    padding: 0.5rem 1.3rem;
    border-radius: var(--radius-chip);
    border: 2px solid var(--accent-color);
    background: var(--c-white);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background var(--dur-160) ease;
}
.in-btn:hover { background: var(--c-pink-50); color: var(--accent-text); }
