/**
 * Intelligence Hub v2 — light feed page rendered from api/intelligence.json.
 * np-int- prefix (main.css is global; never use bare class names here).
 * Spec: Claude Design handoff `design_handoff_intelligence_hub/README.md`.
 * Desktop-first per the handoff; the <1080px treatment is a provisional pass.
 */

.np-int {
    background: #F9FAFB;
    color: #111827;
    font-family: 'Plus Jakarta Sans', 'Open Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.np-int-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 48px;
    padding-right: 48px;
}

/* ---------- type accent system ---------- */

.np-int [data-type="article"],
.np-int [data-int-type="article"] {
    --np-int-c: #D97706;
    --np-int-t: rgba(217, 119, 6, 0.07);
    --np-int-g: '✶';
}

.np-int [data-type="lab"],
.np-int [data-int-type="lab"] {
    --np-int-c: #6E56CF;
    --np-int-t: rgba(110, 86, 207, 0.07);
    --np-int-g: '⌖';
}

.np-int [data-type="release"],
.np-int [data-int-type="release"] {
    --np-int-c: #2BA89E;
    --np-int-t: rgba(43, 168, 158, 0.08);
    --np-int-g: '⇡';
}

.np-int [data-type="casestudy"],
.np-int [data-int-type="casestudy"] {
    --np-int-c: #3C1361;
    --np-int-t: rgba(60, 19, 97, 0.06);
    --np-int-g: '▣';
}

.np-int [data-type="press"],
.np-int [data-int-type="press"] {
    --np-int-c: #111827;
    --np-int-t: rgba(17, 24, 39, 0.05);
    --np-int-g: '✦';
}

.np-int [data-type="testimonial"],
.np-int [data-int-type="testimonial"] {
    --np-int-c: #EA580C;
    --np-int-t: rgba(234, 88, 12, 0.06);
    --np-int-g: '❝';
}

/* ---------- focus (never removed) ---------- */

.np-int a:focus-visible,
.np-int button:focus-visible,
.np-int input:focus-visible {
    outline: 2px solid #3C1361;
    outline-offset: 2px;
}

/* ---------- hero ---------- */

.np-int-hero-inner {
    padding-top: 92px;
    padding-bottom: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: 48px;
    align-items: center;
}

.np-int-hero-text {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Brain field — contained slice of the homepage Signal engine (np-intel-brain.js) */
.np-int-hero-art {
    height: 400px;
    min-width: 0;
}

.np-int-hero-art canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.np-int-kicker {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    color: #D97706;
}

.np-int-h1 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(42px, 5.5vw, 72px);
    line-height: 1.02;
    font-weight: 200;
    letter-spacing: -2.4px;
    max-width: 940px;
    text-wrap: balance;
    color: #111827;
}

.np-int-h1 em { font-style: italic; }

.np-int-sub {
    margin: 0;
    max-width: 600px;
    font-size: 17px;
    line-height: 1.7;
    font-weight: 300;
    color: #6B7280;
    text-wrap: pretty;
}

.np-int-seam {
    height: 1px;
    background: linear-gradient(90deg, #F0A66C 0%, #D97560 18%, #9C467E 42%, #5A2A8C 58%, #4D3B8C 80%, #3C3E9E 100%);
}

/* ---------- feed layout ---------- */

.np-int-feed {
    padding-top: 48px;
    padding-bottom: 120px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 56px;
    align-items: start;
}

/* ---------- left rail ---------- */

.np-int-rail {
    position: sticky;
    top: 36px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.np-int-rail-group {
    display: flex;
    flex-direction: column;
}

.np-int-rail-head {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 2px;
    color: #9CA3AF;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.np-int-rail-head--strong {
    padding-bottom: 14px;
    border-bottom-color: #111827;
}

.np-int-rail-head--bare {
    padding-bottom: 0;
    border-bottom: none;
}

.np-int-type {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: grid;
    grid-template-columns: 16px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 13px 2px;
    border-bottom: 1px solid #E5E7EB;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.np-int-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--np-int-c, #6B7280);
    opacity: 0.35;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-type.np-int-active .np-int-type-dot { opacity: 1; }

.np-int-type-label {
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-type:hover .np-int-type-label { color: #111827; }

.np-int-type.np-int-active .np-int-type-label {
    font-weight: 600;
    color: #111827;
}

.np-int-type-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9CA3AF;
}

.np-int-topics {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    gap: 2px;
}

.np-int-topic {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: baseline;
    padding: 7px 2px;
    font-family: 'JetBrains Mono', monospace;
}

.np-int-topic-label {
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-topic:hover .np-int-topic-label { color: #111827; }

.np-int-topic.np-int-active .np-int-topic-label {
    font-weight: 500;
    color: #D97706;
}

.np-int-topic-count {
    font-size: 10.5px;
    color: #D1D5DB;
}

.np-int-synd { gap: 12px; }

.np-int-synd-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #6B7280;
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-synd-link:hover { color: #D97706; }

.np-int-synd-note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 300;
    color: #9CA3AF;
    max-width: 210px;
}

/* ---------- content column ---------- */

.np-int-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

.np-int-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 32px;
}

.np-int-query {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    min-width: 0;
}

.np-int-query-prompt { color: #D97706; }

/* min-width: 0 is load-bearing — without it the query line forces horizontal overflow */
.np-int-query-text {
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.np-int-search {
    flex-shrink: 0;
    width: 280px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #D1D5DB;
    border-radius: 0;
    padding: 6px 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: #111827;
    outline: none;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
}

.np-int-search:focus { border-bottom-color: #3C1361; }

.np-int-search::placeholder { color: #9CA3AF; }

/* ---------- featured entry ---------- */

.np-int-featured {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #111827;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(17, 24, 39, 0.10), 0 10px 10px -5px rgba(17, 24, 39, 0.04);
    border-color: #6B7280;
}

.np-int-featured-body {
    padding: 42px 44px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.np-int-featured-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.8px;
    color: var(--np-int-c);
}

.np-int-featured-title {
    font-size: 34px;
    line-height: 1.15;
    font-weight: 300;
    letter-spacing: -1px;
    text-wrap: balance;
}

.np-int-featured-excerpt {
    font-size: 15.5px;
    line-height: 1.7;
    font-weight: 300;
    color: #6B7280;
    text-wrap: pretty;
}

.np-int-featured-meta {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

.np-int-meta-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9CA3AF;
}

.np-int-tag {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9CA3AF;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-tag:hover { color: #D97706; }

.np-int-tag.np-int-active { color: #D97706; }

.np-int-featured-cta {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--np-int-c);
}

.np-int-featured-media {
    min-height: 340px;
    border-left: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.np-int-featured-media img,
.np-int-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.np-int-media--tint { background: var(--np-int-t); }

.np-int-glyph::before {
    content: var(--np-int-g);
    font-size: 34px;
    color: var(--np-int-c);
    opacity: 0.28;
}

.np-int-glyph--lg::before { font-size: 64px; }

/* ---------- card grid ---------- */

.np-int-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.np-int-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #111827;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(17, 24, 39, 0.08), 0 4px 6px -2px rgba(17, 24, 39, 0.05);
    border-color: #6B7280;
}

.np-int-card-media {
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.np-int-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
    flex: 1;
}

.np-int-card-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.6px;
    color: var(--np-int-c);
}

.np-int-card-title {
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.42;
    letter-spacing: -0.2px;
    text-wrap: pretty;
}

.np-int-card-meta {
    margin-top: auto;
    padding-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: #9CA3AF;
}

/* ---------- archive ---------- */

.np-int-archive {
    display: flex;
    flex-direction: column;
    margin-top: 24px;
}

.np-int-archive-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #111827;
}

.np-int-archive-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: #D1D5DB;
}

.np-int-arow {
    display: grid;
    grid-template-columns: 110px 130px 1fr auto;
    gap: 18px;
    align-items: baseline;
    padding: 15px 2px;
    border-bottom: 1px solid #E5E7EB;
    text-decoration: none;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-arow:hover { background: #F3F4F6; }

.np-int-arow-date,
.np-int-arow-extra {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9CA3AF;
}

.np-int-arow-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.4px;
    color: var(--np-int-c);
}

.np-int-arow-title {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-arow:hover .np-int-arow-title { color: #D97706; }

/* ---------- empty state ---------- */

.np-int-empty {
    border: 1px dashed #D1D5DB;
    border-radius: 12px;
    padding: 56px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.np-int-empty-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #6B7280;
}

.np-int-reset {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: #D97706;
    border-bottom: 1px solid #D97706;
    padding-bottom: 2px;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.np-int-reset:hover { color: #B45309; }

/* ---------- responsive (provisional — desktop-first per handoff) ---------- */

@media (max-width: 1080px) {
    .np-int-hero-inner { grid-template-columns: 1fr; }

    .np-int-hero-art { display: none; }

    .np-int-feed {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .np-int-rail {
        position: static;
        gap: 28px;
    }

    .np-int-topics {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px 18px;
    }

    .np-int-grid { grid-template-columns: repeat(2, 1fr); }

    .np-int-featured { grid-template-columns: 1fr; }

    .np-int-featured-media {
        order: -1;
        min-height: 220px;
        border-left: none;
        border-bottom: 1px solid #F3F4F6;
    }
}

@media (max-width: 640px) {
    .np-int-wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .np-int-hero-inner {
        padding-top: 56px;
        padding-bottom: 44px;
    }

    .np-int-h1 { letter-spacing: -1.2px; }

    .np-int-feed { padding-bottom: 72px; }

    .np-int-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .np-int-search { width: 100%; }

    .np-int-grid { grid-template-columns: 1fr; }

    .np-int-featured-body { padding: 28px 24px; }

    .np-int-arow {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            'type date'
            'title title';
        gap: 6px 12px;
    }

    .np-int-arow-date { grid-area: date; }
    .np-int-arow-type { grid-area: type; }
    .np-int-arow-title { grid-area: title; }
    .np-int-arow-extra { display: none; }

}

@media (prefers-reduced-motion: reduce) {
    .np-int *,
    .np-int *::before,
    .np-int *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .np-int-featured:hover,
    .np-int-card:hover { transform: none; }
}
