/* ============================================================
   TECHNOLOGY PAGE — extends architecture.css
   Tech-specific elements + CTO/data/hi-tech tone via:
   A: broken joined-grid (proper gaps, individual cards, soft corners)
   B: unified code-chip style for technical identifiers
   C: soft accent-color glows on feature surfaces
   D: type polish (Inter alternates + body letter-spacing)
   E: color-coded accent borders by lane
   ============================================================ */

/* ============= D: Type polish ============= */
body.tech-page {
    font-feature-settings: "ss01", "cv11";
    letter-spacing: 0.005em;
}

/* ------ Tech pills in hero ------ */
.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--arch-line);
    border-radius: 999px;
    color: var(--arch-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.tech-pill b { color: var(--arch-text); font-weight: 600; }

/* ------ Lanes section spacing ------ */
.tech-lanes {
    position: relative;
    z-index: 1;
    padding: 24px 0 80px;
}

/* ============= B: Unified code chip — all <code> on tech page ============= */
body.tech-page code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #6ec6ff;
    background: rgba(110, 198, 255, 0.05);
    border: 1px solid rgba(110, 198, 255, 0.28);
    border-radius: 4px;
    padding: 2px 7px;
    display: inline-block;
    letter-spacing: 0;
}

/* Inline within prose — slimmer */
body.tech-page code.tech-mono-inline {
    font-size: 0.9em;
    padding: 0 5px;
    border-radius: 3px;
}

/* ------ Generic mono helpers ------ */
.tech-card-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--arch-muted);
    margin-top: 4px;
    word-break: break-word;
    letter-spacing: 0;
}

.tech-mono-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tech-mono-list li {
    font-size: 12px;
    color: var(--arch-muted);
    line-height: 1.5;
    display: block;
    padding: 0;
}

/* Plain mono "more" / flow notes (e.g. "+ 16 more", "SSE → client") */
body.tech-page .tech-mono-more {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--arch-dim);
    padding: 2px 0;
    letter-spacing: 0;
}

/* Description after a code chip (agent-hint) */
body.tech-page .arch-hint {
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    color: var(--arch-dim);
    margin-left: 4px;
}

/* Override architecture.css bullet on .arch-group ul li */
.arch-group ul.tech-mono-list li::before { display: none; }

/* ============= A: Break joined-grid pattern across all sections ============= */
/* Each card gets its own border + small radius; gaps replace the 1px hairline trick */

/* ------ Lane 01: Clients ------ */
.tech-clients {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: transparent;
    border: none;
}

@media (max-width: 1100px) { .tech-clients { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .tech-clients { grid-template-columns: 1fr; } }

.tech-client {
    background: var(--arch-panel);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 16px 18px;
}

.tech-client-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--arch-text);
    margin-bottom: 4px;
    letter-spacing: -0.005em;
}

.tech-client-sub {
    font-size: 12px;
    color: var(--arch-muted);
    line-height: 1.5;
}

/* ------ Lane 02: Edge & API ------ */
.tech-edge-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    background: transparent;
    border: none;
}

@media (max-width: 1100px) { .tech-edge-grid { grid-template-columns: 1fr; } }

.tech-card {
    background: var(--arch-panel);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 16px 18px;
}

.tech-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--arch-text);
    margin-bottom: 0;
    letter-spacing: -0.005em;
}

.tech-card-desc {
    font-size: 12.5px;
    color: var(--arch-muted);
    line-height: 1.55;
    margin-top: 8px;
}

.tech-card-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tech-card-list li {
    font-size: 13px;
    color: var(--arch-muted);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tech-card-list li::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--arch-dim);
    margin-top: 7px;
    flex-shrink: 0;
}

/* Edge gateway endpoints render inline (chips wrap horizontally) */
.tech-card .tech-mono-list {
    margin-top: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

/* ------ Lane 03: Orchestrator ------ */
.tech-orch {
    background: var(--arch-panel);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 20px 24px;
}

.tech-orch-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--arch-line);
}

.tech-orch-head .arch-orch-badge {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    font-size: 22px;
}

.tech-orch-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--arch-text);
    line-height: 1.4;
    letter-spacing: -0.005em;
}

.tech-orch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: transparent;
    border: none;
}

@media (max-width: 1200px) { .tech-orch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .tech-orch-grid { grid-template-columns: 1fr; } }

.tech-orch-block {
    background: rgba(10, 13, 26, 0.55);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 12px 14px;
}

.tech-block-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--arch-text);
    margin-bottom: 10px;
}

/* Model rows */
.tech-models {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tech-model {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--arch-line);
    border-radius: 0;
}

.tech-model-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--arch-bg);
    flex-shrink: 0;
}

.tech-model--anthropic .tech-model-logo { background: #d4a373; }
.tech-model--azure .tech-model-logo { background: #6ec6ff; }

.tech-model-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--arch-text);
    line-height: 1.2;
}

.tech-model-file {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    color: var(--arch-muted);
    margin-top: 2px;
    letter-spacing: 0;
}

/* ------ Lane 04: Agent fleet (scoped overrides for arch-groups from architecture.css) ------ */
body.tech-page .arch-groups {
    gap: 12px;
    background: transparent;
    border: none;
}

body.tech-page .arch-group {
    border: 1px solid var(--arch-line);
    border-radius: 0;
}

/* ------ Lane 05: Data + Events planes ------ */
.tech-planes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) { .tech-planes { grid-template-columns: 1fr; } }

.tech-plane {
    background: var(--arch-panel);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 18px 20px;
}

.tech-plane-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tech-plane-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--arch-text);
    letter-spacing: 0.02em;
}

.tech-plane-sub {
    font-size: 11px;
    color: var(--arch-muted);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    letter-spacing: 0;
}

.tech-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: transparent;
    border: none;
}

@media (max-width: 600px) { .tech-data-grid { grid-template-columns: 1fr; } }

.tech-data-cell {
    background: rgba(10, 13, 26, 0.55);
    border: 1px solid var(--arch-line);
    border-radius: 0;
    padding: 10px 12px;
}

.tech-data-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--arch-text);
    letter-spacing: -0.005em;
}

/* Event chips */
.tech-events {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tech-evt {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(255, 184, 108, 0.16);
    border: 1px solid rgba(255, 184, 108, 0.50);
    color: #ffd29c;
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(255, 184, 108, 0.10);
    letter-spacing: 0;
}

.tech-events-foot {
    font-size: 12px;
    color: var(--arch-muted);
    line-height: 1.55;
    margin: 14px 0 0;
}

/* ------ Lane 06: External providers ------ */
.tech-externals {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px;
    background: transparent;
    border: none;
}

@media (max-width: 1100px) { .tech-externals { grid-template-columns: 1fr; } }

/* ------ Lane 07: Cross-cutting ------ */
.tech-cross {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: transparent;
    border: none;
}

@media (max-width: 1100px) { .tech-cross { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .tech-cross { grid-template-columns: 1fr; } }

.tech-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ============= C: Soft accent-color glows on feature surfaces ============= */
body.tech-page .tech-plane--data {
    border: 1px solid rgba(124, 245, 197, 0.22);
    border-top: 2px solid var(--arch-c1);
    box-shadow: 0 8px 32px -8px rgba(124, 245, 197, 0.14);
}

body.tech-page .tech-plane--events {
    border: 1px solid rgba(255, 184, 108, 0.24);
    border-top: 2px solid var(--arch-c3);
    box-shadow: 0 8px 32px -8px rgba(255, 184, 108, 0.14);
}

/* ============= E: Color-coded vertical accents per lane ============= */
.arch-layer--clients  .tech-client { border-top: 2px solid var(--arch-c5); } /* cyan */
.arch-layer--edge     .tech-card   { border-top: 2px solid var(--arch-c2); } /* violet */
.arch-layer--external .tech-card   { border-top: 2px solid var(--arch-c6); } /* yellow */
.arch-layer--cross    .tech-card   { border-top: 2px solid var(--arch-c4); } /* pink */
/* lane 03 (orchestrator) already has its own violet border */
/* lane 04 (agent fleet) already has per-group colors via .ag1-.ag6 */
/* lane 05 (data/events) handled via plane glow + border above */

/* ============= Hero spacing tweak ============= */
body.tech-page .arch-hero { padding-bottom: 56px; }

/* ============= E (carry-over): Schematic-legend lane labels ============= */

body.tech-page .arch-layer {
    grid-template-columns: 110px 1fr;
    gap: 0 32px;
    padding: 36px 0;
}

body.tech-page .arch-layer::before,
body.tech-page .arch-layer:nth-of-type(2)::before,
body.tech-page .arch-layer:last-of-type::before {
    top: 0;
    bottom: 0;
    left: 110px;
    background: var(--arch-line);
}

body.tech-page .arch-layer-label {
    text-align: right;
    padding-right: 20px;
    align-self: stretch;
    color: var(--arch-dim);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding-top: 4px;
    line-height: 1.3;
    position: relative;
}

body.tech-page .tech-lane-num {
    display: block;
    color: var(--arch-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

body.tech-page .arch-layer + .arch-layer .arch-layer-label::after {
    content: "";
    position: absolute;
    top: 0;
    right: -3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--arch-bg);
    border: 1px solid var(--arch-muted);
    z-index: 2;
}

body.tech-page .arch-layer + .arch-layer { border-top: 1px dashed rgba(255,255,255,0.07); }

/* ============= C (background): Ambient glows + grid vignette ============= */
body.tech-page {
    background:
        radial-gradient(1400px 700px at 80% -20%, rgba(157, 140, 255, 0.10), transparent 60%),
        radial-gradient(1000px 600px at -10% 110%, rgba(124, 245, 197, 0.07), transparent 60%),
        var(--arch-bg);
}

body.tech-page .arch-grid-bg {
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    opacity: 0.65;
}

/* ============= Responsive: stack labels at narrow widths ============= */
@media (max-width: 900px) {
    body.tech-page .arch-layer {
        grid-template-columns: 1fr;
        gap: 16px 0;
    }
    body.tech-page .arch-layer-label {
        text-align: left;
        padding-right: 0;
    }
    body.tech-page .arch-layer::before { display: none; }
    body.tech-page .arch-layer + .arch-layer .arch-layer-label::after { display: none; }
}

/* ============= Strawman punchline ============= */
.tech-strawman {
    margin-top: 64px;
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 24px 40px;
    align-items: center;
    padding: 24px 28px;
    border: 1px dashed rgba(255, 122, 182, 0.28);
    border-radius: 0;
    background: linear-gradient(90deg, rgba(255, 122, 182, 0.04), transparent 70%);
}

@media (max-width: 900px) { .tech-strawman { grid-template-columns: 1fr; } }

.tech-strawman-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--arch-c4);
    margin-bottom: 8px;
    font-weight: 600;
}

.tech-strawman-headline {
    font-size: 15px;
    font-weight: 600;
    color: var(--arch-text);
}

.tech-strawman-body {
    font-size: 14px;
    color: var(--arch-muted);
    line-height: 1.65;
    margin: 0;
}
