.menu-title {
    color: #ffb454 !important;
}

.content p,
.content li {
    line-height: 1.6;
}

.ferris-img {
    float: left;
    margin-right: 15px;
    width: 20%;
}

@media (max-width: 768px) {
    .ferris-img {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
        width: 80%;
    }
}

/* Hero Row: the pill, its note and the SSH demo share the middle column,
 * centered on the page, and Ferris sits in the left column spanning them.
 * Ferris has a column of his own, so he can never overlap the text. */
.hero-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* The flexible first and last rows absorb Ferris's extra height, so the
     * pill, note and SSH demo stay together as a vertically centered stack. */
    grid-template-rows: 1fr auto auto auto 1fr;
    align-items: center;
    column-gap: 2rem;
    margin: 2.4rem 0;
}

.hero-row .ferris-hero {
    grid-column: 1;
    grid-row: 1 / -1;
    justify-self: end;
}

.hero-row .agent-pill {
    grid-column: 2;
    grid-row: 2;
    margin: 0 auto;
}

.hero-row .hero-cta-note {
    grid-column: 2;
    grid-row: 3;
}

.hero-row .ssh-demo {
    grid-column: 2;
    grid-row: 4;
}

/* Side by side needs room for Ferris on both sides of the middle column, so
 * the breakpoint follows the content width (narrower with the sidebar open),
 * not the viewport. */
main:has(> .hero-row) {
    container-type: inline-size;
}

@container (max-width: 680px) {
    .hero-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        margin: 1.5rem 0 2rem 0;
    }

    .hero-row .ferris-hero {
        width: 120px;
        margin-bottom: 1.5rem;
    }
}

.ferris-hero {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    rotate: var(--ferris-tilt, 0deg);
    transform-origin: 50% 90%;
    transition: rotate 0.3s ease-out;
}

.ferris-img-hero {
    display: block;
    width: 100%;
}

/* Overlay positions are percentages of the 500x491 source image. */
.ferris-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

/* Each mood repaints the baked-in angry face from the image. */
.ferris-face-plate,
.ferris-mood-neutral,
.ferris-mood-happy,
.ferris-mood-joy,
.ferris-hearts {
    display: none;
}

.ferris-hero:not([data-mood="angry"]) .ferris-face-plate,
.ferris-hero[data-mood="neutral"] .ferris-mood-neutral,
.ferris-hero[data-mood="happy"] .ferris-mood-happy,
.ferris-hero[data-mood="joy"] .ferris-mood-joy {
    display: inline;
}

.ferris-glint {
    position: absolute;
    top: 69.95%;
    width: 1.4%;
    height: 1.43%;
    background: #fff;
    transition: transform 0.12s ease-out;
}

/* Joy closes the eyes into ^ ^, so the glints go away. */
.ferris-hero[data-mood="joy"] .ferris-glint {
    display: none;
}

.ferris-glint.ferris-eye-left {
    left: 41.1%;
}

.ferris-glint.ferris-eye-right {
    left: 57.1%;
}

.ferris-hero.jumping {
    animation: ferris-happy-jump 1s cubic-bezier(0.3, 0.7, 0.4, 1);
}

@keyframes ferris-happy-jump {
    0% { transform: translateY(0) scale(1, 1); }
    12% { transform: translateY(0) scale(1.12, 0.86); }
    32% { transform: translateY(-30%) scale(0.92, 1.1); }
    50% { transform: translateY(0) scale(1.1, 0.9); }
    64% { transform: translateY(-14%) scale(0.96, 1.05); }
    80% { transform: translateY(0) scale(1.04, 0.96); }
    100% { transform: translateY(0) scale(1, 1); }
}

.ferris-hero.jumping .ferris-hearts {
    display: inline;
}

.ferris-heart {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
}

/* Chromium runs SVG animations under a display: none parent, so the hearts
   would finish at page load. Attach the animation only while jumping. */
.ferris-hero.jumping .ferris-heart {
    animation: ferris-heart-float 1.2s ease-out forwards;
}

.ferris-hero.jumping .ferris-heart:nth-child(2) {
    animation-delay: 0.15s;
}

.ferris-hero.jumping .ferris-heart:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes ferris-heart-float {
    0% { opacity: 0; transform: translateY(40px) scale(0.4); }
    25% { opacity: 1; transform: translateY(0) scale(1.1); }
    100% { opacity: 0; transform: translateY(-110px) scale(0.9); }
}

/* Short muted explanation right under the AI setup pill */
.content .hero-cta-note {
    margin: 1rem 0 0 0;
    text-align: center;
    font-size: 1.4rem;
    color: var(--fg);
    opacity: 0.7;
}

/* SSH demo: an inline command under the AI setup pill, styled as the
 * page's inline code */
.content .ssh-demo {
    margin: 1.4rem 0 0 0;
    text-align: center;
}

.ssh-demo-command {
    padding: 0;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

.ssh-demo-command:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 2px;
}

.copy-tooltip {
    position: relative;
}

.copy-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    background: #f5f5f5;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.copy-tooltip.copied::after {
    content: attr(data-tooltip-copied);
}

.copy-tooltip.copied::after,
.copy-tooltip[data-tooltip]:hover::after,
.copy-tooltip[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.agent-pill {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 0.75rem;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    background: #33230f;
    border: 1px solid rgba(255, 180, 84, 0.8);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1.45rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(255, 180, 84, 0.08);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-pill:hover,
.agent-pill:focus-visible {
    background: #3d2a12;
    border-color: #ffb454;
    box-shadow: 0 0 32px rgba(255, 180, 84, 0.2);
    outline: none;
}

.agent-pill-copy {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    color: #ffb454;
}

.agent-logos {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.agent-logo {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    fill: currentColor;
}

.agent-logo-claude {
    fill: #d97757;
}

.agent-pill-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

@media (max-width: 768px) {
    .agent-pill {
        font-size: 1.15rem;
        padding: 0.65rem 1.25rem;
    }
}

/* Subtitle annotation under the H1 - keyword-rich but visually small */
.content h2.hero-subtitle {
    margin: -0.25rem 0 1.5rem 0;
    padding: 0;
    border: none;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--fg, #c8c8c8);
    opacity: 0.9;
}

.content h2.hero-subtitle b,
.content h2.hero-subtitle strong {
    font-weight: 600;
}

/* Follows the hero subtitle: pulled up into its bottom margin so the two
   read as one block */
.content .hero-tagline {
    margin: -0.75rem 0 1.25rem 0;
    font-size: 1.5rem;
    line-height: 1.6;
    opacity: 0.85;
}

/* Link CTAs styled as the home page's agent pill (white label on its own
   dark fill, so it reads on the light mdbook themes too) */
.content a.cta-link,
.content a.cta-link:visited,
.content a.cta-link:hover {
    color: #fff;
    text-decoration: none;
}

/* Cloud page hero: the install button with the setup offer and a muted
   reassurance line right under it */
.cloud-cta {
    /* Its own formatting context keeps the whole block beside the floated
       Ferris instead of wrapping half of it underneath him */
    display: flow-root;
    margin: 1.5rem 0 2rem 0;
}

/* Left edges line up with the offer text, inside its 3px accent border and
   1.2rem padding */
.cloud-cta .agent-pill {
    margin: 1.6rem 0 0 calc(3px + 1.2rem);
}

/* The hands-on setup offer: its own bold title, tied to the text by a thin
   amber accent rather than a colored banner */
.cloud-cta-offer {
    max-width: 60ch;
    margin: 0;
    padding-left: 1.2rem;
    border-left: 3px solid #ffb454;
}

.content .cloud-cta-offer p {
    margin: 0;
    line-height: 1.5;
}

.content .cloud-cta-offer .cloud-cta-offer-title {
    margin-bottom: 0.3rem;
    font-size: 1.9rem;
    font-weight: 700;
}

/* The Getting Started install button and its reassurance line, left-aligned
   with the section text */
.cloud-install {
    margin: 1.5rem 0;
}

.cloud-install .agent-pill {
    margin: 0;
}

.content .cloud-install .cloud-cta-meta {
    margin-left: 0;
}

/* Compact pricing and permissions reassurance under the install button */
.content .cloud-cta-meta {
    margin: 1rem 0 0 calc(3px + 1.2rem);
    font-size: 1.35rem;
    color: var(--fg);
    opacity: 0.75;
}

.content .cloud-cta-meta a,
.content .cloud-cta-meta a:visited {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
    /* On narrow screens the line breaks between the phrases, not inside one */
    white-space: nowrap;
}


@media (max-width: 768px) {
    /* Centered between the headline and the intro, small enough to keep the
       install button near the top */
    .ferris-img-cloud {
        float: none;
        display: block;
        width: 40%;
        max-width: 180px;
        margin: 0 auto 1rem auto;
    }

    .cloud-cta {
        clear: both;
    }
}

.hero-badges {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    flex-wrap: wrap;
}

.hero-badges img {
    height: 22px;
}

/* Two side-by-side "next step" blocks under the hero */
.hero-paths {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2.5rem;
    margin: 1.5rem 0 2rem 0;
}

.content .hero-path p {
    margin: 0 0 0.3rem 0;
    line-height: 1.5;
}

.content .hero-path .hero-path-title {
    font-weight: 600;
    font-size: 1.15em;
}

@media (max-width: 768px) {
    .hero-paths {
        grid-template-columns: 1fr;
    }
}

/* Trusted By */
.trusted-by {
    text-align: center;
    margin: 2rem 0;
}

.trusted-by-tagline {
    color: var(--sidebar-fg);
    margin-bottom: 1rem;
    text-align: left;
}

.trusted-by-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.trusted-by-project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.5rem 1rem;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-decoration: none;
    color: #ffb454;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.trusted-by-project,
.trusted-by-project:hover,
.trusted-by-project:active,
.trusted-by-project:visited,
.trusted-by-project:link {
    text-decoration: none !important;
}

.trusted-by-project:hover {
    border-color: rgba(255, 180, 84, 0.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 180, 84, 0.1);
}

.trusted-by-name {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #ffb454;
    -webkit-text-fill-color: #ffb454;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trusted-by-project:hover .trusted-by-name {
    text-decoration: none;
}

.trusted-by-project img {
    height: 20px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .trusted-by-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .trusted-by-project {
        padding: 0.3rem 0.6rem;
    }

    .trusted-by-name {
        font-size: 0.85em;
    }
}