/* Ask Pete AI answer format on My Resume (PS-ASK-FIX-ANSWER-UI-001; Pete's picked format A, pictures P-0752 light and P-0756 dark).
   Loaded after resume-page.css, which it does not edit: it overrides the old fixed-height answer box (R8) and the dark question
   bubble (R12), and draws the written answer, "See sources", "Ask next" and the box's short message.
   Clear glass only: no fill and no blur on any answer pane; the card's mountains show through. Left-aligned, full card width.
   Light first; Graphite dark uses the page's own dark tokens. Built for 744px and up (phones are a later lane). */

.rp { --ax-green: #23593a; --ax-green-ring: rgba(35, 89, 58, .55); --ax-rim: rgba(15, 23, 42, .12); --ax-hi: rgba(255, 255, 255, .85); --ax-quote: #0b1d2a; --ax-link: #0a5a8f; --ax-bubble: var(--lg-ink); }
html[data-theme="dark"] .rp { --ax-green: #9fd7ad; --ax-green-ring: rgba(159, 215, 173, .55); --ax-rim: rgba(255, 255, 255, .16); --ax-hi: rgba(255, 255, 255, .10); --ax-quote: #d6dce0; --ax-link: #8cc8f2; --ax-bubble: #16396a; }

/* the conversation grows with the answers: no fixed-height scroll box, no white fill */
.rp .rp-ask .rp-ask__log { max-height: none; overflow: visible; padding: 0; margin: 16px 0 14px; background: none; box-shadow: none; border-radius: 0; display: grid; gap: 18px; }
html[data-theme="dark"] body .rp .rp-ask .rp-ask__log { box-shadow: none !important; }
.rp .rp-ask .rp-ask__log[hidden] { display: none; }
.rp .rp-ask .rp-turn { display: grid; gap: 10px; scroll-margin-top: calc(var(--rp-sticky-top, 84px) + 8px); }
.rp .rp-ask .rp-turn__me { margin: 0 0 0 auto; max-width: min(85%, 640px); font-size: .95rem; background: var(--ax-bubble); color: #fff; overflow-wrap: anywhere; }
html[data-theme="dark"] .rp .rp-ask .rp-turn__me { background: #16396a; color: #fff; }

/* the answer: a clear glass pane (edge + shadow only) */
.rp .ax-ans, .rp .rp-ask .rp-turn__ai { position: relative; padding: 16px 20px 14px; border-radius: 16px; background: transparent;
  box-shadow: inset 0 1px 0 var(--ax-hi), inset 0 0 0 1px var(--ax-hi), 0 0 0 1px var(--ax-rim), 0 14px 28px -22px rgba(15, 23, 42, .55); }
.rp .rp-ask .rp-turn__ai { color: var(--lg-ink); font: 400 1rem/1.6 var(--lg-sans); overflow-wrap: anywhere; }
.rp .rp-ask .rp-turn__ai--unavailable { color: var(--lg-ink); }
.rp .ax-ans .ax-ans__who { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 .78rem/1.2 var(--lg-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ax-green); }
.rp .ax-ans__who .rp-ask-mark { width: 18px; height: 18px; flex: none; }
.rp .ax-ans .ax-ans__ctx { margin: 0 0 8px; font: 500 .88rem/1.4 var(--lg-sans); color: var(--lg-ink2); }
.rp .ax-ans__ctx b { font-weight: 650; color: var(--lg-ink); }
.rp .ax-ans p { margin: 0; font: 400 1rem/1.6 var(--lg-sans); color: var(--lg-ink); max-width: 78ch; overflow-wrap: anywhere; }
.rp .ax-ans p.ax-ans__who { font: 700 .78rem/1.2 var(--lg-sans); color: var(--ax-green); max-width: none; }
.rp .ax-ans p.ax-ans__ctx { font: 500 .88rem/1.4 var(--lg-sans); color: var(--lg-ink2); }
.rp .ax-ans p + p, .rp .ax-ans p + .ax-list, .rp .ax-ans .ax-list + p { margin-top: 10px; }
.rp .ax-ans .ax-sub { margin: 12px 0 0; font: 650 .92rem/1.4 var(--lg-sans); letter-spacing: 0; color: var(--lg-ink); }
.rp .ax-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; max-width: 78ch; }
.rp .ax-list li { position: relative; padding-left: 20px; font: 400 1rem/1.55 var(--lg-sans); color: var(--lg-ink); overflow-wrap: anywhere; }
.rp .ax-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ax-green); }
.rp .ax-list b { font-weight: 700; }

/* the footer row: See sources (collapsed by default) and suggested follow-ups */
.rp .ax-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ax-rim); }
.rp .ax-src { flex: 1 1 100%; }
.rp .ax-src > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px; cursor: pointer; list-style: none;
  font: 650 .9rem/1 var(--lg-sans); color: var(--ax-green); box-shadow: inset 0 0 0 1.5px var(--ax-green-ring); background: transparent; }
.rp .ax-src > summary::-webkit-details-marker { display: none; }
.rp .ax-src > summary svg { width: 14px; height: 14px; flex: none; transition: transform .2s ease; }
.rp .ax-src[open] > summary svg { transform: rotate(90deg); }
.rp .ax-src > summary:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: 2px; }
.rp .ax-src__list { margin: 12px 0 2px; padding: 0; list-style: none; display: grid; gap: 12px; }
.rp .ax-src__list li { display: grid; gap: 3px; padding-left: 14px; border-left: 2px solid var(--ax-green-ring); }
.rp .ax-src__where { font: 650 .86rem/1.35 var(--lg-sans); color: var(--lg-ink); overflow-wrap: anywhere; }
.rp .ax-src__quote { font: 400 .92rem/1.5 var(--lg-sans); color: var(--ax-quote); overflow-wrap: anywhere; }
.rp .ax-src__go { justify-self: start; display: inline-flex; align-items: center; min-height: 32px; font: 650 .86rem/1.2 var(--lg-sans); color: var(--ax-link); text-decoration: underline; text-underline-offset: .2em; }
.rp .ax-src__go:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: 2px; }
.rp .ax-follow { display: flex; flex-wrap: wrap; gap: 8px; }
.rp .ax-follow__label { flex: 1 1 100%; font: 600 .82rem/1.3 var(--lg-sans); color: var(--lg-ink2); }
.rp .ax-chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; text-align: left;
  font: 600 .9rem/1.3 var(--lg-sans); color: var(--ax-green); box-shadow: inset 0 0 0 1.5px var(--ax-green-ring); }
.rp .ax-chip:hover { box-shadow: inset 0 0 0 2px var(--ax-green); }
.rp .ax-chip:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: 2px; }

/* the box's own short message: an empty send, the 500-character limit */
.rp .rp-ask__msg { margin: 8px 4px 0; font: 600 .9rem/1.4 var(--lg-sans); color: var(--lg-ink); }
.rp .rp-ask__msg:empty { margin: 0; }

/* the compact Ask in the left rail uses the same parts, smaller */
.rp .rp-ask--rail .rp-ask__log { margin: 10px 0; gap: 12px; }
.rp .rp-ask--rail .rp-turn__me { max-width: 100%; font-size: .85rem; }
.rp .rp-ask--rail .ax-ans, .rp .rp-ask--rail .rp-turn__ai { padding: 12px 12px 10px; }
.rp .rp-ask--rail .ax-ans p, .rp .rp-ask--rail .ax-list li { font-size: .9rem; }
.rp .rp-ask--rail .ax-src > summary, .rp .rp-ask--rail .ax-chip { padding: 0 12px; }
.rp .rp-ask--rail:not([data-compact="true"]):has(.rp-ask__log:not([hidden])) .rp-ask__body { max-height: none; overflow: visible; }

@media (max-width: 959px) {
  .rp .ax-ans, .rp .rp-ask .rp-turn__ai { padding: 14px 14px 12px; }
  .rp .rp-ask .rp-turn__me { max-width: 92%; }
}

/* Graphite dark: the answer text sits on clear glass over the card's mountains, where the mist is lightest the page's light ink
   (#d6dce0) measured 3.43:1 at its worst pixel (80-question test L7). White text keeps every line at 4.5:1 or better there; the pane
   stays completely clear (no fill, no blur). PS-ASK-FIX-ANSWER-CONTRACT-001. */
html[data-theme="dark"] .rp .ax-ans p, html[data-theme="dark"] .rp .ax-list li, html[data-theme="dark"] .rp .ax-ans .ax-sub,
html[data-theme="dark"] .rp .ax-ans__ctx b, html[data-theme="dark"] .rp .ax-src__where, html[data-theme="dark"] .rp .ax-src__quote,
html[data-theme="dark"] .rp .rp-ask .rp-turn__ai { color: #fff; }
html[data-theme="dark"] .rp .ax-ans p.ax-ans__who { color: var(--ax-green); }
/* The "Following up on:" label keeps the page's muted ink in dark, as on main; only its topic is white (visual QA, Nov 8). */
html[data-theme="dark"] .rp .ax-ans p.ax-ans__ctx { color: var(--lg-ink2); }

/* ===== The public main Ask card (PS-ASK-CARD-FIXED-001; Pete approved P-1092 to P-1097, Nov 11, "The new cards look great") =====
   Everything below is the approved mock's rules (round 6), nothing more. Public page, main card only; the rail, the member's own page and the
   answer's words are not touched here.
   At rest the card is tight: the suggestion buttons sit in ONE row directly above the box (three from 1280px, two from 744 to 1279, one under
   744), the "Answers come only from ..." line and its room are gone (the template no longer draws it), and the card is about 246px tall.
   While talking the card grows with the answer up to 600px, then the answer scrolls inside its own framed panel (an outer box with the border
   and shadow, an inner scroller). The panel's padding is 20px at every edge in every state, so the question never moves when the answer
   arrives. An edge fades only where text is hidden past it: resume-page-ask.js sets --ft (top) and --fb (bottom) from the scroll position,
   each growing from 0 to 32px as text scrolls out at that end. */
.rp-ask--main { --rp-ask-art-h: 263.47px; }                                   /* the mountains keep their size from before this change: the old card's height minus its 2px border, per width */
@media (min-width: 1800px) { .rp-ask--main { --rp-ask-art-h: 266.72px; } }
@media (max-width: 1279px) { .rp-ask--main { --rp-ask-art-h: 324.94px; } }
@media (max-width: 1136px) { .rp-ask--main { --rp-ask-art-h: 377.09px; } }
@media (max-width: 959px)  { .rp-ask--main { --rp-ask-art-h: 319.8px; } }
@media (max-width: 400px)  { .rp-ask--main { --rp-ask-art-h: 416.78px; } }
.rp .rp-ask--main .rp-ask__art { top: auto; bottom: 0; height: var(--rp-ask-art-h); }
.rp .rp-ask--main .rp-ask__top { min-height: 0; }
.rp .rp-ask--main .rp-ask__title { margin-bottom: 16px; }
@media (max-width: 959px) { .rp .rp-ask--main .rp-ask__title { margin-bottom: 8px; } }
.rp .rp-ask--main { padding-bottom: 26px; }
@media (max-width: 959px) { .rp .rp-ask--main { padding-bottom: 16px; } }
/* the suggestion buttons: one row, never wrapped, directly above the box */
.rp .rp-ask--main .rp-ask__chips { flex-wrap: nowrap; margin: 0 0 12px; }
@media (max-width: 1279px) { .rp .rp-ask--main .rp-ask__chips .rp-chip:nth-child(n+3) { display: none !important; } }
@media (max-width: 743px)  { .rp .rp-ask--main .rp-ask__chips .rp-chip:nth-child(n+2) { display: none !important; } }
/* the answer panel: hidden until the first question */
.rp .rp-ask--main .rp-ask__talk { display: none; }
.rp .rp-ask--main.is-talking { max-height: 600px; display: flex; flex-direction: column; }
.rp .rp-ask--main.is-talking .rp-ask__top { flex: none; }
.rp .rp-ask--main.is-talking .rp-ask__body { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rp .rp-ask--main.is-talking .rp-ask__talk { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; margin: 0 0 12px; border-radius: 16px; background: rgba(255, 255, 255, .5);
  box-shadow: 0 0 0 1px var(--ax-rim), 0 14px 28px -22px rgba(15, 23, 42, .55); }
html[data-theme="dark"] body .rp .rp-ask--main.is-talking .rp-ask__talk { background: rgba(31, 37, 45, .5) !important; box-shadow: 0 0 0 1px var(--ax-rim), 0 14px 28px -22px rgba(0, 0, 0, .7) !important; }
.rp .rp-ask--main.is-talking .rp-ask__log { flex: 0 1 auto; min-height: 0; margin: 0; padding: 20px 14px 20px 20px; border: 0; background: none; box-shadow: none; border-radius: 16px;
  display: block; overflow-y: auto; scrollbar-width: auto; scrollbar-color: auto; overscroll-behavior: contain;
  scroll-padding-block: 37px; }   /* keyboard focus scrolls a control to 37px from an edge: the fade's full depth (32px) plus the focus ring outside the control (2px offset and 3px line), so the ring clears the faded band too */
.rp .rp-ask--main.is-talking .rp-ask__talk.is-scrollable .rp-ask__log {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .15) calc(var(--ft, 0px) * 0.656), #000 var(--ft, 0px), #000 calc(100% - var(--fb, 0px)), rgba(0, 0, 0, .15) calc(100% - var(--fb, 0px) * 0.656), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .15) calc(var(--ft, 0px) * 0.656), #000 var(--ft, 0px), #000 calc(100% - var(--fb, 0px)), rgba(0, 0, 0, .15) calc(100% - var(--fb, 0px) * 0.656), transparent 100%); }
.rp .rp-ask--main.is-talking .rp-ask__log:focus-visible { outline: 3px solid var(--lg-focus, #0a66b0); outline-offset: -3px; }
.rp .rp-ask--main.is-talking .rp-ask__box { flex: none; }
.rp .rp-ask--main.is-talking .rp-ask__chips { flex: none; }
.rp .rp-ask--main .rp-turn { display: block; }
.rp .rp-ask--main .rp-turn + .rp-turn { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ax-rim); }
.rp .rp-ask--main .rp-turn__me { margin: 0 0 10px; width: auto; max-width: none; padding: 0; border-radius: 0; background: none !important; color: var(--lg-ink) !important; font: 650 1rem/1.45 var(--lg-sans); }
.rp .rp-ask--main .ax-ans, .rp .rp-ask--main .rp-turn__ai { padding: 0; border-radius: 0; box-shadow: none; background: none; }
/* the dark theme gives every .rp-turn__ai a 1.5px outline (theme-graphite-dark.css); the "Ask AI isn't available" message must not wear it inside the framed panel */
html[data-theme="dark"] body .rp .rp-ask--main .rp-turn__ai { box-shadow: none !important; }
.rp .rp-ask--main .rp-thinking { margin: 4px 0 0; }
.rp .rp-ask--main.is-talking .rp-ask__log::-webkit-scrollbar { width: 14px; }
.rp .rp-ask--main.is-talking .rp-ask__log::-webkit-scrollbar-track { background: transparent; }
.rp .rp-ask--main.is-talking .rp-ask__log::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, .30); border-radius: 8px; border: 4px solid transparent; background-clip: padding-box; }
html[data-theme="dark"] body .rp .rp-ask--main.is-talking .rp-ask__log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .34); border: 4px solid transparent; background-clip: padding-box; }
.rp .rp-ask--main .ax-ans p, .rp .rp-ask--main .ax-ans .ax-list, .rp .rp-ask--main .ax-ans li { max-width: none; }
.rp .rp-ask--main .ax-foot { margin-top: 12px; padding-top: 10px; }
/* while talking the mountains' top edge fades in: the picture keeps its size but the card is taller, so without this there is a hard seam where it starts */
.rp .rp-ask--main.is-talking .rp-ask__art { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%); mask-image: linear-gradient(180deg, transparent 0, #000 45%); }
/* from 960px up the handwriting sits at the right, over the mountains, on the heading's row; light theme, at rest only, it carries a glow that hugs the letters(z-index 3 and a pointer: it is the one thing at its spot, not a transparent box of the heading block that spans the card from 960 to 1279px) */
@media (min-width: 960px) {
  .rp-body--visitor .rp .rp-ask--main .rp-ask__script { position: absolute; top: 12px; right: 28px; left: auto; bottom: auto; z-index: 3; pointer-events: auto; margin: 0; width: max-content; }
  html:not([data-theme="dark"]) .rp-body--visitor .rp .rp-ask--main:not(.is-talking) .rp-ask__script {
    text-shadow: 0 0 2px rgba(255, 255, 255, 1), 0 0 3px rgba(255, 255, 255, 1), 0 0 5px rgba(255, 255, 255, .95), 0 0 9px rgba(255, 255, 255, .85), 0 0 14px rgba(255, 255, 255, .6); }
}
