:root {
    --bg: #f4efe2;
    --ink: #1f2933;
    --muted: #5d6a75;
    --panel: #fffaf0;
    --line: #161616;
    --accent: #f6bd60;
    --accent-soft: #ffe5b4;
    --blue: #8ecae6;
    --green: #90be6d;
    --pink: #ffafcc;
    --violet: #cdb4db;
    --shadow: 0 6px 0 rgba(22, 22, 22, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans", sans-serif;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.65)),
        repeating-linear-gradient(0deg, #e8dcc6 0, #e8dcc6 24px, #f4efe2 24px, #f4efe2 48px);
    color: var(--ink);
}

.page-shell {
    width: min(1320px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.hero,
.board,
.agent-card,
.flow-step {
    border: 4px solid var(--line);
    box-shadow: var(--shadow);
}

.hero,
.board {
    background: var(--panel);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    padding: 24px;
    margin-bottom: 22px;
}

.eyebrow,
.section-tag,
.detail-box h3,
.info-block h3 {
    font-family: "Press Start 2P", monospace;
    font-size: 0.65rem;
    color: #8b5e34;
}

.hero h1,
.section-head h2,
.detail-top h2 {
    margin: 12px 0 10px;
    font-family: "Press Start 2P", monospace;
    line-height: 1.4;
}

.hero h1 {
    font-size: clamp(1.2rem, 2vw, 1.9rem);
}

.hero-text,
.section-head p,
.detail-role,
.info-block p,
.detail-box p,
.matrix-table td,
.management-list li {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
}

.hero-actions,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--ink);
    background: var(--accent);
    border: 4px solid var(--line);
    box-shadow: 0 4px 0 rgba(22, 22, 22, 0.26);
    font-family: "Press Start 2P", monospace;
    font-size: 0.68rem;
}

.hero-btn.secondary {
    background: var(--blue);
}

.board {
    padding: 22px;
    margin-bottom: 22px;
}

.section-head {
    margin-bottom: 18px;
}

.order-flow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.flow-step {
    position: relative;
    padding: 16px;
    background: #fff4d8;
}

.flow-step::after {
    content: ">";
    position: absolute;
    top: 50%;
    right: -17px;
    transform: translateY(-50%);
    font-family: "Press Start 2P", monospace;
    font-size: 1rem;
    color: #9a6f34;
}

.flow-step:last-child::after {
    content: "";
}

.flow-step.active {
    background: #ffe082;
}

.step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    border: 3px solid var(--line);
    background: white;
    font-family: "Press Start 2P", monospace;
    font-size: 0.75rem;
}

.flow-step h3 {
    margin: 0 0 8px;
    font-family: "Press Start 2P", monospace;
    font-size: 0.66rem;
    line-height: 1.5;
}

.flow-step p {
    margin: 0;
    line-height: 1.5;
    color: var(--muted);
}

.workspace {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 22px;
    align-items: start;
}

.agent-list {
    display: grid;
    gap: 14px;
}

.agent-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: #fffdf6;
    cursor: pointer;
    transition: transform 0.16s ease;
}

.agent-card:hover,
.agent-card.is-active {
    transform: translateY(-3px);
}

.agent-card.is-active {
    outline: 4px solid #7ec8e3;
}

.agent-card h3 {
    margin: 0 0 4px;
    font-family: "Press Start 2P", monospace;
    font-size: 0.68rem;
    line-height: 1.5;
}

.agent-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.meta-pill,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border: 2px solid var(--line);
    background: white;
    font-size: 0.76rem;
    font-weight: 700;
}

.management-list {
    margin: 0;
    padding-left: 20px;
}

.management-list li + li {
    margin-top: 12px;
}

.detail-board {
    position: sticky;
    top: 18px;
}

.detail-top {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.detail-role {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.detail-box {
    padding: 14px;
    border: 3px solid var(--line);
    background: #fffdf6;
}

.detail-box h3,
.info-block h3 {
    margin: 0 0 10px;
}

.detail-box p,
.info-block p {
    margin: 0;
}

.detail-stack {
    display: grid;
    gap: 16px;
}

.info-block {
    padding: 14px;
    border: 3px solid var(--line);
    background: #fffdf6;
}

.table-wrap {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffdf6;
}

.matrix-table th,
.matrix-table td {
    padding: 14px;
    border: 3px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.matrix-table th {
    font-family: "Press Start 2P", monospace;
    font-size: 0.65rem;
    background: #ffe9bf;
}

.sprite {
    position: relative;
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
}

.sprite::before,
.sprite::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
}

.sprite.large {
    transform: scale(2);
    transform-origin: left top;
    margin-left: 10px;
}

.sprite-itsm::before {
    background: #111;
    box-shadow: 7px 0 #111,14px 0 #111,21px 0 #111,28px 0 #111,0 7px #111,7px 7px #f6bd60,14px 7px #f6bd60,21px 7px #f6bd60,28px 7px #111,0 14px #111,7px 14px #f6bd60,14px 14px #111,21px 14px #f6bd60,28px 14px #111,0 21px #111,7px 21px #f6bd60,14px 21px #f6bd60,21px 21px #f6bd60,28px 21px #111,0 28px #111,7px 28px #3a86ff,14px 28px #3a86ff,21px 28px #3a86ff,28px 28px #111,0 35px #111,7px 35px #3a86ff,14px 35px #3a86ff,21px 35px #3a86ff,28px 35px #111,0 42px #111,7px 42px #2a9d8f,14px 42px #111,21px 42px #2a9d8f,28px 42px #111,0 49px #111,7px 49px #2a9d8f,14px 49px #111,21px 49px #2a9d8f,28px 49px #111;
}

.sprite-devsecops::before {
    background: #111;
    box-shadow: 7px 0 #111,14px 0 #111,21px 0 #111,28px 0 #111,0 7px #111,7px 7px #58508d,14px 7px #58508d,21px 7px #58508d,28px 7px #111,0 14px #111,7px 14px #ffd6a5,14px 14px #111,21px 14px #ffd6a5,28px 14px #111,0 21px #111,7px 21px #ffd6a5,14px 21px #ffd6a5,21px 21px #ffd6a5,28px 21px #111,0 28px #111,7px 28px #bc4749,14px 28px #bc4749,21px 28px #bc4749,28px 28px #111,0 35px #111,7px 35px #bc4749,14px 35px #bc4749,21px 35px #bc4749,28px 35px #111,0 42px #111,7px 42px #6a4c93,14px 42px #111,21px 42px #6a4c93,28px 42px #111,0 49px #111,7px 49px #6a4c93,14px 49px #111,21px 49px #6a4c93,28px 49px #111;
}

.sprite-cloud::before {
    background: #111;
    box-shadow: 7px 0 #111,14px 0 #111,21px 0 #111,28px 0 #111,0 7px #111,7px 7px #8ecae6,14px 7px #8ecae6,21px 7px #8ecae6,28px 7px #111,0 14px #111,7px 14px #ffe8d6,14px 14px #111,21px 14px #ffe8d6,28px 14px #111,0 21px #111,7px 21px #ffe8d6,14px 21px #ffe8d6,21px 21px #ffe8d6,28px 21px #111,0 28px #111,7px 28px #219ebc,14px 28px #219ebc,21px 28px #219ebc,28px 28px #111,0 35px #111,7px 35px #219ebc,14px 35px #219ebc,21px 35px #219ebc,28px 35px #111,0 42px #111,7px 42px #adb5bd,14px 42px #111,21px 42px #adb5bd,28px 42px #111,0 49px #111,7px 49px #adb5bd,14px 49px #111,21px 49px #adb5bd,28px 49px #111;
}

.sprite-data::before {
    background: #111;
    box-shadow: 7px 0 #111,14px 0 #111,21px 0 #111,28px 0 #111,0 7px #111,7px 7px #90be6d,14px 7px #90be6d,21px 7px #90be6d,28px 7px #111,0 14px #111,7px 14px #f1faee,14px 14px #111,21px 14px #f1faee,28px 14px #111,0 21px #111,7px 21px #f1faee,14px 21px #f1faee,21px 21px #f1faee,28px 21px #111,0 28px #111,7px 28px #588157,14px 28px #588157,21px 28px #588157,28px 28px #111,0 35px #111,7px 35px #588157,14px 35px #588157,21px 35px #588157,28px 35px #111,0 42px #111,7px 42px #344e41,14px 42px #111,21px 42px #344e41,28px 42px #111,0 49px #111,7px 49px #344e41,14px 49px #111,21px 49px #344e41,28px 49px #111;
}

.sprite-edtech::before {
    background: #111;
    box-shadow: 7px 0 #111,14px 0 #111,21px 0 #111,28px 0 #111,0 7px #111,7px 7px #ffafcc,14px 7px #ffafcc,21px 7px #ffafcc,28px 7px #111,0 14px #111,7px 14px #ffe5ec,14px 14px #111,21px 14px #ffe5ec,28px 14px #111,0 21px #111,7px 21px #ffe5ec,14px 21px #ffe5ec,21px 21px #ffe5ec,28px 21px #111,0 28px #111,7px 28px #f77f00,14px 28px #f77f00,21px 28px #f77f00,28px 28px #111,0 35px #111,7px 35px #f77f00,14px 35px #f77f00,21px 35px #f77f00,28px 35px #111,0 42px #111,7px 42px #8338ec,14px 42px #111,21px 42px #8338ec,28px 42px #111,0 49px #111,7px 49px #8338ec,14px 49px #111,21px 49px #8338ec,28px 49px #111;
}

@media (max-width: 1080px) {
    .workspace,
    .order-flow {
        grid-template-columns: 1fr;
    }

    .detail-board {
        position: static;
    }

    .flow-step::after {
        content: "v";
        right: auto;
        left: 50%;
        top: auto;
        bottom: -17px;
        transform: translateX(-50%);
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 16px, 100%);
        padding-top: 16px;
    }

    .hero,
    .detail-top,
    .agent-card {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
    }

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