.gpi-page {
    min-height: 100vh;

    background:
        linear-gradient(
            rgba(3,9,16,.72),
            rgba(3,9,16,.96)
        ),
        url("/assets/img/home-bg.png")
        center top / cover fixed;
}

.gpi-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}


/* HERO */

.gpi-hero {
    padding: 90px 0 48px;
}

.gpi-hero h1 {
    max-width: 900px;

    margin: 7px 0 0;

    font-size: clamp(48px, 6vw, 80px);
    line-height: .96;

    letter-spacing: -.05em;
}

.gpi-lead {
    max-width: 800px;

    margin: 27px 0 0;

    font-size: clamp(21px, 2.1vw, 29px);
    line-height: 1.4;
}

.gpi-description {
    max-width: 730px;

    margin-top: 17px;
}


/* CONTEXT */

.gpi-context-section {
    padding: 13px 0 20px;
}

.gpi-context {
    min-height: 79px;

    display: grid;
    grid-template-columns: 1fr auto auto;

    gap: 31px;

    align-items: center;

    padding: 0 22px;

    border: 1px solid var(--as-border);
    border-radius: 10px;

    background: rgba(255,255,255,.035);
}

.gpi-context > div:first-child strong,
.gpi-context > div:first-child small {
    display: block;
}

.gpi-context > div:first-child strong {
    margin-top: 4px;

    font-size: 16px;
}

.gpi-context > div:first-child small {
    margin-top: 5px;

    font-size: 13px;

    color: var(--as-text-muted);
}

.gpi-context-node {
    padding-left: 25px;

    border-left: 1px solid var(--as-divider);
}

.gpi-context-node span,
.gpi-context-node strong {
    display: block;
}

.gpi-context-node span {
    margin-bottom: 4px;

    font-size: 12px;

    color: var(--as-text-muted);
}

.gpi-context-node strong {
    font-size: 14px;
}

.gpi-context > a {
    min-height: 39px;

    display: flex;
    align-items: center;

    padding: 0 14px;

    border: 1px solid var(--as-border);
    border-radius: 6px;

    color: inherit;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;
}


/* WORKSPACE */

.gpi-workspace-section {
    padding: 15px 0 110px;
}

.gpi-workspace {
    overflow: hidden;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 365px;

    min-height: 720px;

    border: 1px solid var(--as-border-strong);
    border-radius: 15px;

    background: rgba(4,10,17,.80);

    box-shadow: 0 30px 90px rgba(0,0,0,.30);

    backdrop-filter: blur(12px);
}

.gpi-diagram-panel {
    min-width: 0;

    border-right: 1px solid var(--as-divider);
}

.gpi-panel-head {
    min-height: 67px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 0 20px;

    border-bottom: 1px solid var(--as-divider);
}

.gpi-panel-head strong {
    display: block;

    margin-top: 4px;

    font-size: 15px;
}

.gpi-panel-head > small {
    font-size: 13px;

    color: var(--as-text-muted);
}


/* TOOLBAR */

.gpi-tools {
    display: flex;

    gap: 5px;
}

.gpi-tools button {
    min-width: 37px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid var(--as-border);
    border-radius: 5px;

    background: rgba(255,255,255,.035);
    color: inherit;

    font: inherit;
    font-size: 12px;
}


/* CANVAS */

.gpi-canvas {
    position: relative;

    min-height: 652px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.045),
            transparent 58%
        ),
        linear-gradient(
            rgba(255,255,255,.015) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.015) 1px,
            transparent 1px
        );

    background-size:
        auto,
        28px 28px,
        28px 28px;
}

.gpi-diagram-image {
    position: absolute;

    inset: 35px;

    width: calc(100% - 70px);
    height: calc(100% - 70px);

    object-fit: contain;

    filter:
        grayscale(1)
        contrast(1.08)
        brightness(.95);
}


/* DEMO ABSTRACT DIAGRAM */

.gpi-demo-diagram {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 520px;
    height: 420px;

    transform: translate(-50%, -50%);
}

.gpi-demo-ring {
    position: absolute;

    left: 50%;
    top: 50%;

    border: 2px solid rgba(255,255,255,.18);
    border-radius: 50%;

    transform: translate(-50%, -50%);
}

.gpi-demo-ring::after {
    content: "";

    position: absolute;

    inset: 14%;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
}

.ring-1 {
    width: 270px;
    height: 270px;
}

.ring-2 {
    width: 190px;
    height: 190px;
}

.ring-3 {
    width: 100px;
    height: 100px;
}

.gpi-demo-shaft {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 400px;
    height: 50px;

    border: 2px solid rgba(255,255,255,.15);
    border-radius: 25px;

    transform: translate(-50%, -50%);
}

.gpi-demo-part {
    position: absolute;

    border: 2px solid rgba(255,255,255,.14);
    border-radius: 10px;

    background: rgba(255,255,255,.015);
}

.part-a {
    width: 110px;
    height: 170px;

    left: 12px;
    top: 125px;

    transform: rotate(-12deg);
}

.part-b {
    width: 100px;
    height: 150px;

    right: 16px;
    top: 138px;

    transform: rotate(11deg);
}

.part-c {
    width: 230px;
    height: 75px;

    left: 145px;
    bottom: 5px;
}


/* HOTSPOTS */

.gpi-hotspot {
    position: absolute;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50%;

    background: rgba(4,10,17,.88);
    color: #fff;

    font: inherit;
    font-size: 12px;
    font-weight: 800;

    box-shadow: 0 5px 17px rgba(0,0,0,.30);

    cursor: pointer;
}

.gpi-hotspot::after {
    content: "";

    position: absolute;

    inset: -6px;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
}

.gpi-hotspot.active {
    width: 46px;
    height: 46px;

    border-width: 2px;

    background: #fff;
    color: #111820;
}

.hs-18 {
    left: 21%;
    top: 35%;
}

.hs-22 {
    left: 35%;
    top: 60%;
}

.hs-34 {
    left: 52%;
    top: 41%;
}

.hs-38 {
    right: 25%;
    top: 57%;
}

.hs-47 {
    right: 15%;
    top: 29%;
}

.gpi-canvas-info {
    position: absolute;

    left: 18px;
    bottom: 17px;

    display: flex;

    gap: 10px;

    align-items: center;

    padding: 9px 11px;

    border: 1px solid var(--as-border);
    border-radius: 6px;

    background: rgba(4,10,17,.76);

    font-size: 11px;
}

.gpi-canvas-info span {
    color: var(--as-text-muted);
}

.gpi-canvas-info strong {
    font-size: 12px;
}


/* POSITIONS */

.gpi-position-search {
    margin: 14px;

    padding: 11px 12px;

    border: 1px solid var(--as-border);
    border-radius: 6px;

    background: rgba(255,255,255,.025);

    font-size: 12px;

    color: var(--as-text-muted);
}

.gpi-position-list {
    padding: 0 12px;
}

.gpi-position {
    width: 100%;

    min-height: 69px;

    display: grid;
    grid-template-columns: 45px 1fr;

    gap: 11px;

    align-items: center;

    margin-bottom: 5px;

    padding: 0 12px;

    border: 1px solid transparent;
    border-radius: 7px;

    background: transparent;
    color: inherit;

    text-align: left;

    font: inherit;
}

.gpi-position:hover {
    background: rgba(255,255,255,.035);
}

.gpi-position.active {
    border-color: var(--as-border-strong);

    background: var(--as-panel-active);
}

.gpi-position-no {
    width: 39px;
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--as-border);
    border-radius: 50%;

    font-size: 12px;
    font-weight: 800;
}

.gpi-position strong,
.gpi-position small {
    display: block;
}

.gpi-position strong {
    font-size: 14px;
}

.gpi-position small {
    margin-top: 4px;

    font-size: 12px;

    color: var(--as-text-muted);
}


/* SELECTED */

.gpi-selected {
    margin: 15px;

    padding: 20px;

    border: 1px solid var(--as-border-strong);
    border-radius: 9px;

    background: rgba(255,255,255,.05);
}

.gpi-selected-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gpi-selected-top > strong {
    font-size: 20px;
}

.gpi-selected h3 {
    margin: 18px 0 7px;

    font-size: 19px;
}

.gpi-selected > p {
    margin: 0;

    font-size: 13px;
    line-height: 1.65;

    color: var(--as-text-secondary);
}

.gpi-linked-articles {
    margin-top: 18px;

    border-top: 1px solid var(--as-divider);
}

.gpi-linked-articles a {
    min-height: 49px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border-bottom: 1px solid var(--as-divider);

    color: inherit;

    text-decoration: none;
}

.gpi-linked-articles span {
    font-size: 12px;

    color: var(--as-text-muted);
}

.gpi-linked-articles strong {
    font-size: 13px;
}

.gpi-open-article {
    display: inline-block;

    margin-top: 18px;

    color: inherit;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;
}


/* HEADINGS */

.gpi-heading {
    max-width: 800px;

    margin-bottom: 50px;
}

.gpi-heading h2,
.gpi-detail-layout h2,
.gpi-final h2 {
    margin: 8px 0 0;

    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.08;

    letter-spacing: -.035em;
}

.gpi-heading p {
    max-width: 720px;

    margin-top: 18px;
}


/* FLOW */

.gpi-flow-section {
    padding: 105px 0;

    border-top: 1px solid var(--as-divider);

    background: rgba(0,0,0,.17);
}

.gpi-flow {
    display: grid;

    grid-template-columns:
        1fr auto
        1fr auto
        1fr auto
        1fr;

    gap: 12px;

    align-items: center;
}

.gpi-flow > div {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 20px;

    border: 1px solid var(--as-border);
    border-radius: 9px;

    background: var(--as-panel-soft);
}

.gpi-flow > div.active {
    border-color: var(--as-border-strong);

    background: var(--as-panel-active);
}

.gpi-flow div > span {
    margin-bottom: auto;

    font-size: 11px;
    font-weight: 800;

    color: var(--as-text-faint);
}

.gpi-flow strong {
    font-size: 17px;
}

.gpi-flow small {
    margin-top: 5px;

    font-size: 13px;

    color: var(--as-text-muted);
}

.gpi-flow > b {
    font-weight: normal;

    color: var(--as-text-faint);
}


/* DETAIL */

.gpi-detail-section {
    padding: 105px 0;
}

.gpi-detail-layout {
    display: grid;
    grid-template-columns: 1fr 500px;

    gap: 80px;

    align-items: center;
}

.gpi-detail-layout p {
    max-width: 640px;

    margin-top: 18px;
}

.gpi-detail-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    margin-top: 33px;

    border-top: 1px solid var(--as-divider);
    border-left: 1px solid var(--as-divider);
}

.gpi-detail-list > div {
    min-height: 81px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 0 15px;

    border-right: 1px solid var(--as-divider);
    border-bottom: 1px solid var(--as-divider);
}

.gpi-detail-list span {
    margin-bottom: 6px;

    font-size: 13px;

    color: var(--as-text-muted);
}

.gpi-detail-list strong {
    font-size: 15px;
}


/* JSON */

.gpi-json-panel {
    overflow: hidden;

    border: 1px solid var(--as-border);
    border-radius: 11px;

    background: rgba(4,10,17,.68);
}

.gpi-json-top {
    min-height: 49px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 18px;

    border-bottom: 1px solid var(--as-divider);

    font-size: 12px;
    font-weight: 700;

    color: var(--as-text-muted);
}

.gpi-json-panel pre {
    overflow: auto;

    margin: 0;

    padding: 23px;

    font-size: var(--as-code-size);
    line-height: 1.7;
}


/* API */

.gpi-api-section {
    padding: 105px 0;

    background: rgba(0,0,0,.18);
}

.gpi-api-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 13px;
}

.gpi-api-card {
    min-height: 190px;

    display: flex;
    flex-direction: column;

    padding: 23px;

    border: 1px solid var(--as-border);
    border-radius: 9px;

    background: var(--as-panel-soft);
}

.gpi-api-card > span {
    font-size: 11px;
    font-weight: 800;

    color: var(--as-text-faint);
}

.gpi-api-card strong {
    margin-top: auto;

    font-size: 18px;
}

.gpi-api-card code {
    margin-top: 13px;

    font-size: 12px;
    line-height: 1.5;

    color: var(--as-text-secondary);

    word-break: break-word;
}


/* FINAL */

.gpi-final {
    padding: 70px 0 110px;
}

.gpi-final-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 45px;

    padding: 43px;

    border: 1px solid var(--as-border);
    border-radius: 12px;

    background: rgba(255,255,255,.05);
}

.gpi-final-actions {
    display: flex;

    gap: 10px;

    flex-shrink: 0;
}

.gpi-final-actions a {
    min-height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    border-radius: 7px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;
}

.gpi-primary {
    background: #fff;
    color: #111820;
}

.gpi-secondary {
    border: 1px solid var(--as-border-strong);

    color: inherit;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .gpi-workspace {
        grid-template-columns: 1fr;
    }

    .gpi-diagram-panel {
        border-right: 0;
        border-bottom: 1px solid var(--as-divider);
    }

    .gpi-detail-layout {
        grid-template-columns: 1fr;
    }

    .gpi-api-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {

    .gpi-shell {
        width: min(100% - 28px, 1240px);
    }

    .gpi-hero {
        padding: 65px 0 35px;
    }

    .gpi-context {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 17px;
    }

    .gpi-context-node {
        padding-left: 0;

        border-left: 0;
    }

    .gpi-context > a {
        justify-content: center;
    }

    .gpi-canvas {
        min-height: 520px;
    }

    .gpi-demo-diagram {
        transform:
            translate(-50%, -50%)
            scale(.72);
    }

    .gpi-flow {
        grid-template-columns: 1fr;
    }

    .gpi-flow > b {
        text-align: center;

        transform: rotate(90deg);
    }

    .gpi-detail-list {
        grid-template-columns: 1fr;
    }

    .gpi-final-panel {
        display: block;
    }

    .gpi-final-actions {
        display: block;

        margin-top: 28px;
    }

    .gpi-final-actions a {
        margin-top: 8px;
    }
}


/* ============================================================
   REAL GRAPHICAL DEMO 13315
   Existing GPI design intentionally preserved
   ============================================================ */

.gpi-canvas {
    position: relative;
}


/* Exact calibrated viewport */

.gpi-live-stage {
    position: relative;

    width: 600px;
    height: 400px;

    max-width: calc(100% - 40px);

    margin: 28px auto 0;

    overflow: hidden;

    background: #000;

    border-radius: 5px;
}


.gpi-live-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
    pointer-events: none;
}


/* Invisible click targets */

.gpi-live-hotspots {
    position: absolute;
    inset: 0;
}


.gpi-live-hotspot {
    position: absolute;

    width: 30px;
    height: 30px;

    transform: translate(-50%, -50%);

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;

    cursor: pointer;
}


/*
 * Very subtle hover only.
 * Number itself is already drawn in the image.
 */

.gpi-live-hotspot:hover {
    outline: 2px solid rgba(255,255,255,.45);
    outline-offset: 2px;
}


/*
 * SELECTED POSITION
 * Covers the orange number in the image with blue.
 */

.gpi-selected-badge {
    position: absolute;

    width: 30px;
    height: 30px;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 5;

    border: 2px solid #dcecff;
    border-radius: 50%;

    background: #1677ff;

    color: #fff;

    font-size: 11px;
    line-height: 1;
    font-weight: 800;

    box-shadow:
        0 0 0 3px rgba(22,119,255,.20),
        0 3px 12px rgba(0,0,0,.45);

    pointer-events: none;
}


.gpi-selected-badge[hidden] {
    display: none;
}


/* OEM output reuses existing linked article look */

.gpi-oem-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 48px;

    color: rgba(255,255,255,.55);
}


.gpi-oem-empty span {
    font-size: 12px;
}


.gpi-oem-empty strong {
    font-size: 13px;
}


/* Mobile: scale 600x400 stage proportionally */

@media (max-width: 720px) {

    .gpi-live-stage {
        width: calc(100% - 24px);
        height: auto;
        aspect-ratio: 3 / 2;

        max-width: none;
    }
}
