/* THE AGENT PAGE (card redesign step 12a, COO hands 2026-10-12; a real
   page since Steven 2026-11-12: "why isnt this an actual pace?"). Page
   sheet for templates/cards/agent_page.html: the name and model in the top
   row beside the round button, the picture big, its words, the four
   numbers. No card: no frame, no ring, no floating panel, no list of its
   receipts. On a wide screen the picture stands on the left and the words
   read down the right. Everything is scoped under .agp. */

.agent-page .main-area,
.agent-page .main-area__content { background: var(--surface-primary, #fff); }

.agp {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    color: var(--text-primary);
    font-family: var(--font-body, sans-serif);
}

/* ---- the top row: the name beside the round button (Steven 2026-11-12:
   "make sure that the titles go up beside the buttons") ----------------- */
.agp__top {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 76px;
    margin-top: var(--ds-pf-top, 4px);
    padding: 0 var(--space-4, 16px) 0 calc(var(--ds-pf-left, 4px) + 75px + 14px);
}
.agp__name {
    margin: 0;
    font-family: var(--font-heading, sans-serif);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}
.agp__model {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
}
.agp__mark { flex: none; width: 16px; height: 16px; font-size: 16px; color: var(--text-primary); }

/* ---- the picture ------------------------------------------------------ */
.agp__photo {
    position: relative;
    margin: var(--space-3, 12px) 0 0;
    overflow: hidden;
    background: var(--color-dark-900, #0b0d17);
    aspect-ratio: 4 / 5;
    max-height: 62svh;
    width: 100%;
}
.agp__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
}
.agp__media--art > .agent-art,
.agp__media--art svg { display: block; width: 100%; height: 100%; }

/* ---- the words and the four numbers ------------------------------------ */
.agp__main { padding: var(--space-5, 20px) var(--space-5, 20px) var(--space-6, 24px); min-width: 0; }
.agp__verified {
    margin: 0 0 var(--space-2, 8px);
    color: var(--highlight-purple, #5534a5);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.agp__pitch {
    margin: 0 0 var(--space-5, 20px);
    max-width: 34em;
    font-size: 19px;
    line-height: 1.5;
}
.agp__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--border-default, #e5e8f0);
}
.agp__stat {
    padding: var(--space-4, 16px) 0;
    border-bottom: 1px solid var(--border-default, #e5e8f0);
}
.agp__stat:nth-child(odd) { padding-right: var(--space-4, 16px); }
.agp__stat:nth-child(even) { padding-left: var(--space-4, 16px); border-left: 1px solid var(--border-default, #e5e8f0); }
.agp__stat dt { color: var(--text-secondary); font-size: 14px; }
.agp__stat dd {
    margin: 4px 0 0;
    font-family: var(--font-heading, sans-serif);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ---- See its N paths, on the bottom line between Market and the + ---- */
.agp-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: var(--space-4, 16px) var(--space-5, 20px);
    min-height: 48px;
    padding: 0 var(--space-5, 20px);
    border-radius: 999px;
    background: var(--accent-neon, #39e75f);
    color: var(--color-gray-800, #1f2937);
    font-family: var(--font-heading, sans-serif);
    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.agp-cta:hover, .agp-cta:focus-visible { color: var(--color-gray-800, #1f2937); }
.agent-page .app-shell--deck-shell .agp-cta {
    position: fixed;
    z-index: var(--z-fab-above);
    left: calc(var(--ds-dock-side) + var(--ds-dock-h) + var(--ds-dock-gap));
    right: calc(var(--ds-dock-side) + var(--ds-dock-h) + var(--ds-dock-gap));
    bottom: var(--ds-dock-bottom);
    height: var(--ds-dock-h);
    min-height: 0;
    margin: 0;
}

/* ---- a wide screen: the name in the top row, then the picture on the
   left and the words down the right ------------------------------------- */
@media (min-width: 900px) {
    .agp {
        display: grid;
        grid-template-columns: minmax(0, 440px) minmax(0, 620px);
        grid-template-areas: "top top" "photo main";
        justify-content: center;
        align-items: start;
        column-gap: 56px;
        padding: 0 var(--space-8, 32px);
    }
    .agp__top { grid-area: top; padding-left: 0; min-height: 76px; }
    .agp__name { font-size: 48px; }
    .agp__photo {
        grid-area: photo;
        position: sticky;
        top: var(--space-6, 24px);
        margin-top: var(--space-5, 20px);
        border-radius: 24px;
        max-height: calc(100vh - 96px - 112px);
    }
    .agp__main { grid-area: main; padding: var(--space-5, 20px) 0 0; }
    .agp__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .agp__stat:nth-child(n) { padding: var(--space-4, 16px); border-left: 1px solid var(--border-default, #e5e8f0); }
    .agp__stat:first-child { padding-left: 0; border-left: 0; }
    .agent-page .app-shell--deck-shell .agp-cta {
        left: 50%;
        right: auto;
        width: 360px;
        transform: translateX(-50%);
    }
}

/* OVER THE FEED (Steven 2026-11-13: a tap on the agent on a card opens this
   page over the deck, js/shell/page-over.js THE AGENT, TAPPED): the layer's
   top row says the name beside the club, over this page's own top row, so
   here the model line comes down under that row and the name is not said
   twice. */
html.ds-in-over .agp__name { display: none; }
html.ds-in-over .agp__top {
    min-height: 0;
    margin-top: calc(var(--ds-pf-top, 4px) + var(--ds-pf-head, 80px));
    padding-left: var(--space-4, 16px);
}
@media (min-width: 900px) {
    html.ds-in-over .agp__top { padding-left: 0; }
}
