/* Round 4 primitives. Load after page styles. Glass belongs on a light field.
   Raster slot: <img class="g-field__image" width="..." height="..."
   decoding="async" alt="" src="/assets/img/fields/...webp"> or --g-field-image.
   Steps use data-g-delay in milliseconds from the start (default: 600 per step).
   Keep at most six frosted surfaces visible. Nest bubbles with --g-glass-blur:none. */
.g-field, .g-field * { box-sizing: border-box; }
.g-field { --g-field-image: none; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-stage); background-color: var(--color-canvas); background-image: radial-gradient(ellipse at 12% 8%, #c2f3f3, transparent 60%), radial-gradient(ellipse at 90% 84%, #fed4b9, transparent 62%), linear-gradient(120deg, #b0c1ec, #ddc7f9 60%, #f8cadb); color: var(--color-ink); }
.g-field::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: var(--g-field-image); background-size: cover; background-position: center; pointer-events: none; }
.g-field--warm { background-image: radial-gradient(ellipse at 5% 4%, #fec9af, transparent 66%), radial-gradient(ellipse at 52% 48%, #f4add9, transparent 65%), linear-gradient(120deg, #fec9af, #caa9fc); }
.g-field--cool { background-image: radial-gradient(ellipse at 10% 6%, #8ce6d9, transparent 62%), radial-gradient(ellipse at 53% 28%, #82c7fc, transparent 65%), linear-gradient(120deg, #8ce6d9, #b8a1fb); }
.g-field--stage { background-image: radial-gradient(ellipse at 8% 2%, #c2f3f3, transparent 60%), radial-gradient(ellipse at 92% 82%, #fed4b9, transparent 60%), linear-gradient(130deg, #b0c1ec, #ddc7f9 60%, #f6c9dd); }
.g-field--tall { min-height: 640px; }
.g-field--wide { aspect-ratio: 1.6; }
.g-field__image { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.g-glass, .g-pill, .g-bubble, .g-source, .g-chip { border: 1px solid var(--glass-border); background: var(--glass-fill); border-radius: var(--radius-panel); box-shadow: var(--shadow-glass); backdrop-filter: var(--g-glass-blur, var(--glass-blur)); -webkit-backdrop-filter: var(--g-glass-blur, var(--glass-blur)); color: var(--color-ink); }
.g-glass { padding: clamp(20px, 2.2vw, 32px); }
.g-glass :is(.g-pill, .g-bubble, .g-source, .g-chip) { --g-glass-blur: none; box-shadow: none; }
.g-pill { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; border-radius: 16px; font-size: 16px; line-height: 1.4; }
.g-pill__mark, .g-bubble__mark { display: block; width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }
.g-pill__text { min-width: 0; display: grid; }
.g-pill__text > span { grid-area: 1 / 1; transition: opacity 450ms var(--ease-out); }
.g-pill__text > span[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.g-bubble { display: flex; align-items: flex-start; gap: 12px; width: fit-content; max-width: 90%; padding: 16px 20px; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.g-bubble--user { margin-left: auto; background: rgb(255 255 255 / 48%); }
.g-bubble--agent { background: rgb(255 255 255 / 72%); }
.g-source { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 16px; min-width: 0; font-size: 16px; line-height: 1.4; text-align: center; }
.g-source svg { width: 32px; height: 32px; flex-shrink: 0; }
.g-source__tick { color: var(--color-success); }
.g-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 8px; padding: 10px 20px; border-radius: var(--radius-button); font-size: 16px; line-height: 1.4; }
.g-line { overflow: visible; fill: none; stroke: rgb(255 255 255 / 90%); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.g-display { margin: 0; color: var(--color-display); font-family: var(--font-body); font-size: var(--g-text-display); font-weight: 700; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.g-lead { margin: 24px 0 0; color: var(--color-muted); font-family: var(--font-body); font-size: var(--g-text-lead); font-weight: 400; line-height: 1.45; text-wrap: pretty; }
.g-btn { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 56px; max-width: 100%; padding: 14px 32px; border: 1px solid rgb(255 255 255 / 85%); border-radius: var(--radius-button); background: #fff; color: var(--color-display); font: 600 20px/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer; }
.g-btn:hover { background: #f6f3ff; }
.g-btn--ghost { background: transparent; border-color: var(--color-muted); color: var(--color-display); }
.g-btn--ghost:hover { background: rgb(255 255 255 / 35%); }
.g-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.g-btn:focus-visible, .g-field a:focus-visible, .g-field button:focus-visible { outline: 3px solid var(--color-accent-hover); outline-offset: 5px; }
.g-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Static markup is the finished presentation. Enhancement only softens future steps. */
[data-g-sequence].g-sequence--enhanced [data-g-step]:not([data-g-revealed]) { opacity: .35; }
[data-g-sequence].g-sequence--enhanced .g-source[data-g-step]:not([data-g-revealed]) { opacity: 1; }
[data-g-sequence].g-sequence--enhanced .g-source[data-g-step]:not([data-g-revealed]) .g-source__tick { opacity: .35; }
[data-g-sequence].g-sequence--enhanced .g-line [data-g-draw]:not([data-g-revealed]) { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 1; }
@media (max-width: 760px) { .g-field--tall { min-height: 440px; } .g-field--wide { aspect-ratio: auto; } .g-bubble { font-size: 16px; max-width: 95%; padding: 12px 16px; } .g-pill { font-size: 14px; } .g-btn { font-size: 18px; padding-inline: 24px; } }
@media (prefers-reduced-motion: reduce), (scripting: none) {
  [data-g-sequence].g-sequence--enhanced [data-g-step]:not([data-g-revealed]) { opacity: 1; transform: none; filter: none; }
  [data-g-sequence].g-sequence--enhanced .g-line [data-g-draw]:not([data-g-revealed]) { stroke-dashoffset: 0; }
  [data-g-sequence].g-sequence--enhanced .g-source[data-g-step]:not([data-g-revealed]) .g-source__tick { opacity: 1; }
  .g-pill__text > span { transition: none; }
}
@media (forced-colors: active) { .g-field, .g-glass, .g-pill, .g-bubble, .g-source, .g-chip, .g-btn { border: 1px solid CanvasText; } .g-line { stroke: CanvasText; } }
