/**
 * /agencies — the page for agencies and production studios.
 * Scoped to .ag-* classes. Product mockups (.ag-ui) are modelled on the
 * develop UI: SkillsPanel + ShareWorkflowDialog, StylePicker, TeamSwitcher,
 * DeliverySidebar. Decorative, aria-hidden, static.
 */

.ag-page {
    padding-top: 8.5rem;
}

.ag-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ag-h2 {
    margin: 0 0 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    color: #fff;
}

.ag-body {
    margin: 0;
    max-width: 36rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(209, 213, 219, 0.88);
}

.ag-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: #05c7bb;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(5, 199, 187, 0.35);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ag-link i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.ag-link:hover,
.ag-link:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.ag-link:hover i {
    transform: translateX(3px);
}

/* ---------- Hero ---------- */
.ag-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 4.5vw, 4rem);
    align-items: center;
    padding-bottom: clamp(4rem, 8vw, 6rem);
}

.ag-hero h1 {
    margin: 0 0 1.1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.6rem, 5.2vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
    color: #fff;
}

.ag-lead {
    max-width: 34rem;
    margin: 0 0 1.75rem;
    font-size: 1.125rem;
    line-height: 1.65;
    color: rgba(209, 213, 219, 0.9);
}

.ag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.ag-actions--center {
    justify-content: center;
}

.ag-micro {
    margin: 0.85rem 0 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: rgba(156, 163, 175, 0.9);
}

.ag-proofline {
    margin: 1.5rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 34rem;
    font-size: 0.875rem;
    color: rgba(209, 213, 219, 0.78);
}

.ag-hero-visual {
    min-width: 0;
}

/* ---------- Where the money goes: the chart is index #cost (marketing-layout.css · .cost-chart) ---------- */
.ag-gains {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 64rem;
    margin: 2.5rem auto 0;
    padding: 0;
    list-style: none;
}

.ag-gains li {
    padding: 1.25rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.ag-gains h3,
.ag-delivery-points h3,
.ag-card-copy h3,
.ag-inputs h3 {
    margin: 0 0 0.4rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: #fff;
}

.ag-gains p,
.ag-delivery-points p,
.ag-card-copy p,
.ag-inputs p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(209, 213, 219, 0.85);
}

.ag-fit-note {
    max-width: 64rem;
    margin: 1.25rem auto 0;
    font-size: 0.875rem;
    color: rgba(156, 163, 175, 0.9);
    text-align: center;
}

/* ---------- Split sections (sources, receipts) ---------- */
.ag-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.ag-split--flip .ag-split-copy {
    order: 2;
}

.ag-split-copy {
    min-width: 0;
}

.ag-inputs {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.ag-inputs li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.ag-inputs__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(5, 199, 187, 0.3);
    background: rgba(5, 199, 187, 0.08);
    color: #05c7bb;
    font-size: 0.95rem;
}

/* ---------- Inputs: the CAD and its render, one new frame, as an 8 s loop ---------- */
/* Played while on screen (.is-playing from the page script). Sizes are in cqi,
   so the board scales as one piece; the base state is the finished board. */
.ag-src {
    margin: 0;
    min-width: 0;
}

.ag-src-board {
    --src-t: 8s;
    position: relative;
    aspect-ratio: 16 / 11;
    container-type: inline-size;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.2px) 0 0 / 2.5cqi 2.5cqi,
        #0b1419;
}

.ag-src-wires {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
}

.ag-src-wires path {
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.ag-src-base path { stroke: rgba(255, 255, 255, 0.2); }

.ag-src-pulse {
    stroke: #fff;
    stroke-width: 3 !important;
    stroke-linecap: round;
    stroke-dasharray: 26 100;
    stroke-dashoffset: 26;
    opacity: 0;
}

.ag-src-node {
    position: absolute;
    left: 3%;
    width: 34%;
    display: flex;
    flex-direction: column;
    gap: 0.6cqi;
    padding: 0.7cqi;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5cqi;
    background: #121c22;
    transform: translateY(-50%);
}

.ag-src-node--0 { top: 27%; }
.ag-src-node--1 { top: 73%; }

.ag-src-node--out {
    left: 56%;
    top: 50%;
    width: 41%;
    padding: 0.9cqi;
}

.ag-src-head {
    display: flex;
    align-items: center;
    gap: 0.9cqi;
    min-width: 0;
    font-size: 1.75cqi;
    line-height: 1.2;
    color: #e5e7eb;
}

.ag-src-head i {
    flex: none;
    font-size: 1.5cqi;
    color: rgba(209, 213, 219, 0.8);
}

.ag-src-head b {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-src-node img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.3cqi;
    background: #fff;
}

.ag-src-shot {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 0.3cqi;
    background: #0f1418;
}

/* The CAD reads as a drawing: black and white, no colour from the source */
.ag-src-node--0 img { filter: grayscale(1); }

.ag-src-node .ag-src-shot img {
    height: 100%;
    aspect-ratio: auto;
}

.ag-src-check {
    display: flex;
    align-items: center;
    gap: 0.8cqi;
    font-size: 1.6cqi;
    color: rgba(209, 213, 219, 0.85);
}

.ag-src-check i { font-size: 1.4cqi; color: #fff; }

/* Flat-top hex ports, just outside the node edges */
.ag-src-port {
    position: absolute;
    width: 1.3cqi;
    height: 1.15cqi;
    transform: translate(-50%, -50%);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: rgba(255, 255, 255, 0.55);
}

.ag-src figcaption {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(209, 213, 219, 0.75);
}

@media (prefers-reduced-motion: no-preference) {
    .ag-src-pulse--0 { animation: agSrcPulse0 var(--src-t) linear infinite; }
    .ag-src-pulse--1 { animation: agSrcPulse1 var(--src-t) linear infinite; }
    .ag-src-shot img { animation: agSrcShot var(--src-t) linear infinite; }
    .ag-src-check { animation: agSrcCheck var(--src-t) linear infinite; }

    .ag-src-board:not(.is-playing) * { animation-play-state: paused; }
}

@keyframes agSrcPulse0 {
    0%, 3.9% { stroke-dashoffset: 26; opacity: 0; }
    4% { stroke-dashoffset: 26; opacity: 1; }
    18% { stroke-dashoffset: -100; opacity: 1; }
    18.1%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@keyframes agSrcPulse1 {
    0%, 11.9% { stroke-dashoffset: 26; opacity: 0; }
    12% { stroke-dashoffset: 26; opacity: 1; }
    26% { stroke-dashoffset: -100; opacity: 1; }
    26.1%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

/* The frame develops left to right once both have arrived */
@keyframes agSrcShot {
    0%, 28% { clip-path: inset(0 100% 0 0); opacity: 1; }
    40%, 94% { clip-path: inset(0 0 0 0); opacity: 1; }
    99% { clip-path: inset(0 0 0 0); opacity: 0; }
    100% { clip-path: inset(0 100% 0 0); opacity: 0; }
}

@keyframes agSrcCheck {
    0%, 42% { opacity: 0; }
    46%, 94% { opacity: 1; }
    98%, 100% { opacity: 0; }
}

.ag-points {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.ag-points li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #f3f4f6;
    font-size: 0.975rem;
    line-height: 1.5;
}

.ag-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.6rem;
    color: #05c7bb;
    font-weight: 700;
}

.ag-receipts-visual {
    min-width: 0;
    padding: 0.5rem 0.75rem;
}

/* ---------- Team grid ---------- */
.ag-team-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 1.25rem;
}

.ag-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.ag-card--skills {
    grid-row: span 2;
}

.ag-card-visual {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(5, 199, 187, 0.08), transparent 70%),
        rgba(5, 12, 16, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ag-card-copy {
    padding: 1.35rem 1.5rem 1.6rem;
}

/* ---------- Shared mock chrome ---------- */
.ag-ui {
    --ag-bg: #0e171d;
    --ag-surface: #131e25;
    --ag-surface-2: #1a2730;
    --ag-border: rgba(255, 255, 255, 0.09);
    --ag-text: #e6ecef;
    --ag-muted: rgba(190, 202, 208, 0.62);
    --ag-teal: #05c7bb;
    --ag-selected: rgba(5, 199, 187, 0.12);
    font-family: Inter, system-ui, sans-serif;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--ag-text);
    user-select: none;
    pointer-events: none;
}

.ag-ui h4 {
    margin: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ag-muted);
}

.ag-btn {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 0.75rem;
    border-radius: 7px;
    font-weight: 600;
    font-size: 12px;
}

.ag-btn--ghost {
    color: var(--ag-muted);
}

.ag-btn--primary {
    background: var(--ag-teal);
    color: #04201d;
}

/* Skills panel (SkillsPanel) + share dialog (ShareWorkflowDialog) */
.ag-skills {
    position: relative;
    width: 100%;
    max-width: 34rem;
    min-height: 30rem;
}

.ag-skl {
    width: 17.5rem;
    max-width: 100%;
    padding: 0.75rem 0 0;
    border-radius: 14px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ag-skl__head {
    margin: 0 0.75rem 0.65rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--ag-border);
    font-weight: 600;
    font-size: 13px;
}

.ag-skl__search,
.ag-styles__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 28px;
    margin: 0 0.75rem 0.5rem;
    padding: 0 0.6rem;
    border-radius: 7px;
    border: 1px solid var(--ag-border);
    background: var(--ag-bg);
    color: var(--ag-muted);
}

.ag-skl__search i,
.ag-styles__search i {
    font-size: 11px;
}

.ag-skl__hint {
    margin: 0 0.75rem 0.4rem;
    font-size: 11px;
    line-height: 1.5;
    color: var(--ag-muted);
}

.ag-skl__group {
    margin-top: 0.4rem;
}

.ag-skl__group h4 {
    padding: 0.35rem 0.75rem 0.2rem;
}

.ag-skl__row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.75rem;
    border-left: 2px solid transparent;
}

.ag-skl__row.is-selected {
    background: var(--ag-selected);
    border-left-color: var(--ag-teal);
}

.ag-skl__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface-2);
    color: rgba(220, 230, 234, 0.8);
    font-size: 12px;
}

.ag-skl__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ag-skl__title,
.ag-skl__sum {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-skl__title {
    font-weight: 500;
    font-size: 12.5px;
}

.ag-skl__sum {
    font-size: 11px;
    color: var(--ag-muted);
}

.ag-skl__add {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: var(--ag-muted);
    font-size: 11px;
}

.ag-skl__row.is-selected .ag-skl__add {
    color: var(--ag-teal);
}

.ag-skl__foot {
    margin-top: 0.4rem;
    padding: 0.6rem 0.75rem 0.7rem;
    border-top: 1px solid var(--ag-border);
    color: var(--ag-teal);
    font-weight: 500;
}

.ag-share {
    position: absolute;
    right: 0;
    top: 3.25rem;
    width: 21.5rem;
    max-width: 68%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: var(--ag-surface-2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(5, 199, 187, 0.08);
}

.ag-share__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--ag-border);
    font-weight: 600;
    font-size: 13px;
}

.ag-share__head i {
    color: var(--ag-muted);
    font-size: 12px;
}

.ag-share__body {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
}

.ag-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 2px;
    border-radius: 8px;
    background: var(--ag-bg);
    border: 1px solid var(--ag-border);
}

.ag-seg span {
    padding: 0.35rem 0.25rem;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    color: var(--ag-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-seg span.is-active {
    background: var(--ag-surface-2);
    color: var(--ag-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ag-field {
    display: grid;
    gap: 0.3rem;
}

.ag-field__label,
.ag-spec dt {
    font-size: 11px;
    color: var(--ag-muted);
}

.ag-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    padding: 0 0.6rem;
    border-radius: 7px;
    border: 1px solid var(--ag-border);
    background: var(--ag-bg);
}

.ag-select i {
    font-size: 9px;
    color: var(--ag-muted);
}

.ag-spec {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.ag-spec div {
    display: grid;
    gap: 0.15rem;
}

.ag-spec dd {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
}

.ag-share__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    border-top: 1px solid var(--ag-border);
}

/* Style picker (StylePicker) */
.ag-styles {
    width: 100%;
    max-width: 19rem;
    padding: 0.75rem 0 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ag-styles h4 {
    padding: 0.35rem 0.75rem 0.4rem;
}

.ag-styles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0 0.75rem 0.4rem;
}

.ag-style {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface-2);
}

.ag-style img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-style > span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.9rem 0.35rem 0.3rem;
    background: linear-gradient(transparent, rgba(4, 10, 14, 0.85));
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-style em {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(4, 10, 14, 0.78);
    font-style: normal;
    font-size: 9px;
    color: #5ff0e6;
}

.ag-style.is-picked {
    border-color: var(--ag-teal);
    box-shadow: 0 0 0 1px var(--ag-teal);
}

.ag-style--new {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: var(--ag-muted);
    background: transparent;
}

/* Team switcher (TeamSwitcher) */
.ag-ts {
    width: 100%;
    max-width: 22rem;
}

.ag-ts__trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 14rem;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
}

.ag-ts__trigger > i {
    margin-left: auto;
    font-size: 9px;
    color: var(--ag-muted);
}

.ag-ts__mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #05c7bb, #04807a);
    color: #04201d;
    font-weight: 700;
    font-size: 11px;
}

.ag-ts__mark--sm {
    width: 22px;
    height: 22px;
    font-size: 9.5px;
}

.ag-ts__face {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ag-ts__name {
    font-weight: 600;
}

.ag-ts__ws {
    font-size: 11px;
    color: var(--ag-muted);
}

.ag-ts__menus {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 0.35rem;
    margin-top: 0.35rem;
    align-items: start;
}

.ag-ts__popup {
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface-2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.ag-ts__label {
    padding: 0.3rem 0.45rem 0.35rem;
    font-size: 10.5px;
    color: var(--ag-muted);
}

.ag-ts__org,
.ag-ts__item,
.ag-ts__action {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.45rem;
    border-radius: 6px;
    min-width: 0;
}

.ag-ts__org span:not(.ag-ts__mark),
.ag-ts__item span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-ts__org i,
.ag-ts__item i {
    margin-left: auto;
    font-size: 10px;
    color: var(--ag-teal);
}

.ag-ts__org.is-active,
.ag-ts__item.is-active {
    background: var(--ag-selected);
}

.ag-ts__divider {
    height: 1px;
    margin: 0.3rem 0;
    background: var(--ag-border);
}

.ag-ts__action {
    color: var(--ag-muted);
}

.ag-ts__action i {
    font-size: 10px;
}

/* ---------- Delivery (DeliverySidebar + ShareDeliveryModal fields) ---------- */
.ag-delivery {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}

.ag-dlv {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid var(--ag-border);
    background: var(--ag-bg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.ag-dlv__main {
    padding: 1rem;
    min-width: 0;
}

.ag-dlv__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.ag-dlv__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-weight: 600;
    font-size: 13.5px;
}

.ag-dlv__title i {
    color: var(--ag-teal);
}

.ag-dlv__title span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-pill {
    flex: none;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(5, 199, 187, 0.4);
    background: rgba(5, 199, 187, 0.1);
    color: #5ff0e6;
    font-size: 11px;
    font-weight: 600;
}

.ag-dlv__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 0.9rem;
}

.ag-dlv__meta div {
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
    min-width: 0;
}

.ag-dlv__meta dt {
    font-size: 10.5px;
    color: var(--ag-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-dlv__meta dd {
    margin: 0.2rem 0 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-dlv__meta div:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ag-dlv__meta div:last-child dd {
    margin: 0;
}

.ag-dlv__meta dd i {
    color: var(--ag-teal);
}

.ag-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
}

.ag-dlv__files {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.ag-dlv__files figure {
    margin: 0;
    overflow: hidden;
    border-radius: 9px;
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
}

.ag-dlv__files img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.ag-dlv__files figcaption {
    padding: 0.4rem 0.55rem;
    font-size: 11px;
    color: var(--ag-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-dlv__pdf span {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--ag-surface-2);
    color: #f0a3a3;
    font-size: 1.5rem;
}

.ag-dlv__side {
    min-width: 0;
    border-left: 1px solid var(--ag-border);
    background: var(--ag-surface);
}

.ag-dlv__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--ag-border);
}

.ag-dlv__tabs > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 0.2rem 0.55rem;
    font-size: 10.5px;
    color: var(--ag-muted);
    border-bottom: 2px solid transparent;
    position: relative;
    min-width: 0;
}

.ag-dlv__tabs > span > span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-dlv__tabs i {
    font-size: 13px;
}

.ag-dlv__tabs em {
    position: absolute;
    top: 0.35rem;
    right: 18%;
    min-width: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--ag-surface-2);
    font-style: normal;
    font-size: 9.5px;
    line-height: 15px;
    text-align: center;
    color: var(--ag-text);
}

.ag-dlv__tabs > span.is-active {
    color: var(--ag-text);
    border-bottom-color: var(--ag-teal);
}

.ag-dlv__tabs > span.is-active i {
    color: var(--ag-teal);
}

.ag-dlv__people {
    margin: 0;
    padding: 0.4rem 0;
    list-style: none;
}

.ag-dlv__people li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
}

.ag-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ag-surface-2);
    border: 1px solid var(--ag-border);
    font-size: 10px;
    font-weight: 600;
}

.ag-avatar--ws {
    color: var(--ag-teal);
    font-size: 10px;
}

.ag-dlv__who {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ag-dlv__who span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-dlv__who em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--ag-muted);
}

.ag-dlv__state {
    flex: none;
    font-size: 10.5px;
    color: var(--ag-muted);
}

.ag-dlv__state.is-done {
    color: #5ff0e6;
}

.ag-dlv__activity {
    padding: 0.6rem 0.8rem 0.9rem;
    border-top: 1px solid var(--ag-border);
}

.ag-dlv__activity h4 {
    margin-bottom: 0.45rem;
}

.ag-dlv__activity ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-dlv__activity li {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.3rem 0 0.3rem 0.85rem;
    font-size: 11px;
}

.ag-dlv__activity li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ag-teal);
}

.ag-dlv__activity li span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ag-dlv__activity time {
    flex: none;
    color: var(--ag-muted);
}

.ag-delivery-points {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-delivery-points li {
    padding: 1.1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-delivery-points li:first-child {
    border-top: 0;
    padding-top: 0;
}

/* ---------- OEM ---------- */
.ag-oem {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    border-radius: 1.5rem;
    border: 1px solid rgba(5, 199, 187, 0.2);
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(5, 199, 187, 0.08), transparent 60%),
        rgba(11, 29, 40, 0.5);
}

.ag-oem-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-oem-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(5, 199, 187, 0.2);
    background: rgba(5, 199, 187, 0.05);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
}

.ag-oem-list i {
    flex: none;
    width: 1.1rem;
    text-align: center;
    color: #05c7bb;
}

/* ---------- API ---------- */
.ag-api {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.ag-api-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.ag-api-points li {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8125rem;
    color: rgba(229, 231, 235, 0.9);
}

/* The endpoints, set like a terminal: method, path, what it does */
.ag-api-routes {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0d1117;
    box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.ag-api-routes li {
    display: grid;
    grid-template-columns: 3rem 13.5rem minmax(0, 1fr);
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ag-api-routes li:first-child { border-top: 0; }

.ag-api-verb {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #05c7bb;
}

.ag-api-routes code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    color: #e5e7eb;
    white-space: nowrap;
}

.ag-api-what {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: rgba(156, 163, 175, 0.95);
}

@media (max-width: 899.98px) {
    .ag-api { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 599.98px) {
    .ag-api-routes li { grid-template-columns: 2.6rem minmax(0, 1fr); row-gap: 0.15rem; }
    .ag-api-routes code { overflow: hidden; text-overflow: ellipsis; }
    .ag-api-what { grid-column: 2; }
}

/* ---------- Plans ---------- */
.ag-plans {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.ag-plans-list {
    margin: 0;
    align-self: center;
}

.ag-plans .ag-actions {
    grid-column: 1 / -1;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------- FAQ ---------- */
.ag-faq-wrap {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.ag-faq details {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-faq details:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    cursor: pointer;
    list-style: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #fff;
}

.ag-faq summary::-webkit-details-marker {
    display: none;
}

.ag-faq summary i {
    flex: none;
    font-size: 0.75rem;
    color: #05c7bb;
    transition: transform 0.25s ease;
}

.ag-faq details[open] summary i {
    transform: rotate(180deg);
}

.ag-faq summary:focus-visible {
    outline: 2px solid #05c7bb;
    outline-offset: 4px;
    border-radius: 4px;
}

.ag-faq details p {
    margin: 0 0 1.2rem;
    max-width: 40rem;
    font-size: 0.975rem;
    line-height: 1.7;
    color: rgba(209, 213, 219, 0.88);
}

/* ---------- Closing ---------- */
.ag-close-panel {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.ag-close-panel h2 {
    margin: 0 0 0.85rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #fff;
}

.ag-close-panel > p:not(.ag-micro) {
    margin: 0 0 1.75rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: rgba(209, 213, 219, 0.88);
}

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
    .ag-team-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .ag-card--skills {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .ag-delivery {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-delivery-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 1.5rem;
    }

    .ag-delivery-points li:nth-child(2) {
        border-top: 0;
        padding-top: 0;
    }
}

@media (max-width: 900px) {
    .ag-hero,
    .ag-split,
    .ag-oem,
    .ag-plans,
    .ag-faq-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-split--flip .ag-split-copy {
        order: 0;
    }

    .ag-page {
        padding-top: 7rem;
    }
}

@media (max-width: 767.98px) {
    .ag-gains,
    .ag-team-grid,
    .ag-delivery-points {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-delivery-points li:nth-child(2) {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 1.1rem;
    }

    .ag-card-visual {
        padding: 1rem;
    }

    /* The share dialog sits under the panel instead of over it. */
    .ag-skills {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        min-height: 0;
        min-width: 0;
    }

    .ag-skl {
        width: 100%;
    }

    .ag-share {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .ag-dlv {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-dlv__side {
        border-left: 0;
        border-top: 1px solid var(--ag-border);
    }

}

@media (max-width: 420px) {
    .ag-ts__menus {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ag-link i,
    .ag-faq summary i {
        transition: none;
    }
}
