/* Option B: phrase-level evidence, using the existing IntentHound type and colours. */
.intent-annotations {
 --annotation-paper: #fafbf9;
 --annotation-highlight: #e4eed7;
 /* Reserve the pinned span before Scrollcraft initializes to avoid layout shift. */
 height: 230vh;
 background: var(--annotation-paper);
 color: var(--ink);
 --sc-ink: var(--ink);
 --sc-ink-soft: var(--muted);
}
.annotation-stage { display: flex; align-items: center; }
.annotation-inner { width: min(1240px, calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 88px 0 72px; }
.annotation-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 44px; }
.annotation-heading h2 { font-size: clamp(40px, 4vw, 58px); font-weight: 500; letter-spacing: -.055em; line-height: 1.06; min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.annotation-heading > p { max-width: 320px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.annotation-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 7%; align-items: center; }
.annotation-reading { border-top: 1px solid var(--line); padding-top: 24px; }
.annotation-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.annotation-meta > span:last-child { font-size: 11px; white-space: nowrap; }
.annotation-source { display: flex; align-items: center; gap: 8px; }
.annotation-source > span { width: 24px; height: 24px; display: grid; place-items: center; font-size: 11px; border: 1px solid var(--line); border-radius: 50%; }
.annotation-reading blockquote { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.35; letter-spacing: -.035em; margin: 28px 0 24px; }
.annotation-phrase { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 7px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: color 160ms ease-out, background-color 160ms ease-out; }
.annotation-phrase[aria-pressed="true"] { background: var(--annotation-highlight); color: var(--green); text-decoration-color: var(--green); }
.annotation-caption { color: var(--muted); font-size: 13px; }
.annotation-notes { display: flex; flex-direction: column; }
.annotation-notes button { width: 100%; display: flex; gap: 20px; text-align: left; align-items: start; padding: 24px 0; min-height: 44px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--muted); font: inherit; cursor: pointer; }
.annotation-notes button:first-child { border-top: 1px solid var(--line); }
.annotation-number { font-size: 12px; padding-top: 4px; }
.annotation-notes strong { display: block; font-size: 18px; font-weight: 500; line-height: 1.3; }
.annotation-notes small { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; max-width: 240px; }
.annotation-notes button[aria-pressed="true"] { color: var(--green); }
.annotation-footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.annotation-replay { min-height: 44px; padding: 8px 0 8px 16px; white-space: nowrap; border: 0; background: none; color: var(--green); font: inherit; cursor: pointer; }
.annotation-replay span { font-size: 20px; vertical-align: -1px; margin-left: 8px; }
.annotation-phrase:focus-visible, .annotation-notes button:focus-visible, .annotation-replay:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.annotation-notes button:active, .annotation-replay:active { opacity: .8; }
.annotation-notes button:disabled, .annotation-replay:disabled { opacity: .5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
 .annotation-phrase:hover, .annotation-notes button:hover, .annotation-replay:hover { color: var(--green); }
}
/* A tall annotation must remain scrollable on compact screens, with no pin trap. */
@media (max-width: 800px), (max-height: 790px) {
 .intent-annotations { height: auto !important; }
 .annotation-stage { position: relative !important; top: auto !important; height: auto !important; min-height: 0 !important; }
 .annotation-inner { padding: 64px 0; }
 .annotation-heading { align-items: start; }
 .annotation-heading h2 { font-size: 40px; }
 .annotation-heading > p { font-size: 14px; max-width: 240px; }
 .annotation-layout { gap: 5%; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
 .annotation-reading blockquote { font-size: 32px; }
 .annotation-notes strong { font-size: 16px; }
 .annotation-notes small { font-size: 13px; }
}
@media (max-width: 600px) {
 .annotation-inner { width: calc(100% - var(--gutter) * 2); padding: 56px 0; }
 .annotation-heading { display: block; margin-bottom: 28px; }
 .annotation-heading h2 { font-size: clamp(34px, 8.8vw, 42px); }
 .annotation-heading > p { font-size: 15px; margin-top: 20px; max-width: none; }
 .annotation-layout { display: block; }
 .annotation-meta { font-size: 11px; gap: 8px; }
 .annotation-meta > span:last-child { font-size: 10px; }
 .annotation-reading blockquote { font-size: clamp(29px, 8vw, 36px); margin: 24px 0; }
 .annotation-caption { font-size: 12px; }
 .annotation-notes { margin-top: 28px; }
 .annotation-notes button { padding: 20px 0; }
 .annotation-notes strong { font-size: 17px; }
 .annotation-notes small { max-width: none; }
 .annotation-footer { margin-top: 28px; gap: 12px; font-size: 11px; align-items: center; }
 .annotation-footer > p { max-width: 170px; }
 .annotation-replay { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
 .intent-annotations { height: auto !important; }
 .annotation-stage { position: relative !important; top: auto !important; height: auto !important; min-height: 0 !important; }
 .annotation-phrase { transition: none; }
}
