/*
 * Companion page /itil-4-or-itil-5, S1 ANSWER (#answer, night + aurora).
 * Spec: docs/ux-discovery/itil-5-foundation/direction.md ("COMPANION PAGE", S1) + fold-companion.json.
 * Loaded after tokens.css, base.css, skin.css and itil-4-or-5/page.css. Tokens only; nothing under 16px.
 *
 * One-screen budget at 1366x768 (visible fold 646px, content block <= 556px). Column 7 of 12 = 643px wide.
 *   left, as designed:  crumbs 24 +16 | H1 2 x 52 = 104 +24 | answer 6 x 29 = 173 +28 | button row 52   = 421px
 *   left, worst case:   crumbs 24 +16 | H1 3 x 52 = 156 +24 | answer 7 x 29 = 202 +28 | button 52 +12 +24 = 538px
 *   right, as designed: 3 chips x 111 (18 + 25 + 24 + 24 + 18 + 2) + 2 x 12                              = 357px
 *   right, worst case:  a name on two lines makes all three rows 136 (equal rows): 3 x 136 + 24          = 432px
 * The block is the taller column: 421px as designed (225px free), 538px at the very worst (108px free).
 */

/* ---------- Grid: 7 / 5 from 1024px, one column below ---------- */
main.itil-v1 #answer .v1-q45-answer__grid { align-items: center; gap: 40px; }
@media (min-width: 1024px) {
    main.itil-v1 #answer .v1-q45-answer__grid { column-gap: 48px; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    main.itil-v1 #answer .v1-q45-answer__grid > * { grid-column: 1 / -1; }
}
main.itil-v1 #answer .v1-q45-answer__copy { min-width: 0; }

/* ---------- Breadcrumb ---------- */
main.itil-v1 #answer .v1-q45-answer__crumbs { margin: 0 0 16px; font-size: 16px; line-height: 1.5; color: var(--on-dark-2); }
main.itil-v1 #answer .v1-q45-answer__crumbs > ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
main.itil-v1 #answer .v1-q45-answer__crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin: 0; }
main.itil-v1 #answer .v1-q45-answer__crumbs .v1-link { color: var(--link-on-dark); font-weight: 500; }
main.itil-v1 #answer .v1-q45-answer__crumbs .v1-link:hover { color: var(--on-dark); }
main.itil-v1 #answer .v1-q45-answer__crumbs .v1-link:focus-visible { outline: var(--focus-on-dark); outline-offset: 3px; border-radius: 4px; }
main.itil-v1 #answer .v1-q45-answer__sep { color: var(--on-dark-2); opacity: .7; }

/* ---------- H1, answer, action row ---------- */
main.itil-v1 #answer .v1-q45-answer__h1 { margin: 0 0 24px; color: var(--on-dark); }
main.itil-v1 #answer .v1-q45-answer__text { max-width: 60ch; margin: 0 0 28px; color: var(--on-dark-2); }
main.itil-v1 #answer .v1-q45-answer__actions { margin: 0; }

/* ---------- Chips: three equal glass links ---------- */
main.itil-v1 #answer .v1-q45-answer__side { min-width: 0; }
main.itil-v1 #answer .v1-q45-answer__chips {
    display: grid;
    grid-auto-rows: 1fr;   /* equal heights: no chip looks like the recommended one */
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
main.itil-v1 #answer .v1-q45-answer__chips > li { display: flex; min-width: 0; margin: 0; }
main.itil-v1 #answer .v1-q45-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 14px;
    width: 100%;
    min-height: 88px;
    padding: 18px 20px;
    border-radius: 20px;
    color: var(--on-dark);
    text-decoration: none;
    transition: transform 240ms var(--ease-out), border-color 240ms ease, background-color 240ms ease, box-shadow 240ms ease;
}
main.itil-v1 #answer .v1-q45-chip__num { align-self: start; font-size: 16px; font-weight: 700; line-height: 25px; }
main.itil-v1 #answer .v1-q45-chip__body { display: block; min-width: 0; }
main.itil-v1 #answer .v1-q45-chip__body > span { display: block; }
main.itil-v1 #answer .v1-q45-chip__name { font-size: 19px; font-weight: 700; line-height: 25px; letter-spacing: -.01em; color: var(--on-dark); text-wrap: balance; }
main.itil-v1 #answer .v1-q45-chip__cue { font-size: 16px; line-height: 24px; color: var(--on-dark-2); }
main.itil-v1 #answer .v1-q45-chip__next { font-size: 16px; font-weight: 600; line-height: 24px; color: var(--on-dark); }
main.itil-v1 #answer .v1-q45-chip__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    color: var(--link-on-dark);
    transition: transform 240ms var(--ease-out), color 240ms ease, border-color 240ms ease, background-color 240ms ease;
}
main.itil-v1 #answer .v1-q45-chip__arrow .v1-i { width: 18px; height: 18px; }

/* Hover and keyboard focus: colour always; the 2px lift and 4px arrow nudge only when motion is welcome. */
main.itil-v1 #answer .v1-q45-chip:focus-visible { outline: var(--focus-on-dark); outline-offset: 3px; border-color: rgba(255, 255, 255, .34); }
main.itil-v1 #answer .v1-q45-chip:focus-visible .v1-q45-chip__arrow { color: var(--on-dark); border-color: rgba(255, 255, 255, .5); background-color: rgba(255, 255, 255, .1); }
@media (hover: hover) {
    main.itil-v1 #answer .v1-q45-chip:hover { border-color: rgba(255, 255, 255, .34); background-color: rgba(255, 255, 255, .04); box-shadow: var(--glass-hi), 0 24px 48px -28px rgba(124, 92, 255, .7); }
    main.itil-v1 #answer .v1-q45-chip:hover .v1-q45-chip__arrow { color: var(--on-dark); border-color: rgba(255, 255, 255, .5); background-color: rgba(255, 255, 255, .1); }
}
@media (prefers-reduced-motion: no-preference) {
    main.itil-v1 #answer .v1-q45-chip:focus-visible { transform: translateY(-2px); }
    main.itil-v1 #answer .v1-q45-chip:focus-visible .v1-q45-chip__arrow { transform: translateX(4px); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    main.itil-v1 #answer .v1-q45-chip:hover { transform: translateY(-2px); }
    main.itil-v1 #answer .v1-q45-chip:hover .v1-q45-chip__arrow { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
    main.itil-v1 #answer .v1-q45-chip,
    main.itil-v1 #answer .v1-q45-chip__arrow { transition-property: color, border-color, background-color, box-shadow; }
}

/* ---------- Motion (existing hooks; html.v1-motion is absent under reduced motion) ----------
   The answer and the action row rise 16px and fade (480ms); the chips come in from 16px to the right, 70ms apart. */
html.v1-motion main.itil-v1 #answer .v1-q45-answer__copy > [data-reveal="up"].is-in:not(.is-done) {
    animation-name: v1-q45-rise;
    animation-duration: 480ms;
}
html.v1-motion main.itil-v1 #answer .v1-q45-answer__chips[data-stagger].is-in:not(.is-done) > * {
    animation-name: v1-q45-chip-in;
    animation-duration: 480ms;
}
@keyframes v1-q45-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes v1-q45-chip-in { from { opacity: 0; transform: translate3d(16px, 0, 0); } to { opacity: 1; transform: none; } }

/* ---------- Phones: one column, sections flow ---------- */
@media (max-width: 767.98px) {
    main.itil-v1 #answer .v1-q45-answer__grid { gap: 28px; }
    main.itil-v1 #answer .v1-q45-answer__crumbs { margin-bottom: 12px; }
    main.itil-v1 #answer .v1-q45-answer__h1 { margin-bottom: 16px; }
    main.itil-v1 #answer .v1-q45-answer__text { max-width: none; margin-bottom: 24px; font-size: 17px; }
    main.itil-v1 #answer .v1-q45-chip { gap: 0 12px; padding: 16px; border-radius: 20px; }
    main.itil-v1 #answer .v1-q45-chip__name { font-size: 18px; }
    main.itil-v1 #answer .v1-q45-chip__arrow { width: 32px; height: 32px; }
}
