/* In-Console Native OS Modules (Projects & Support inside the 3-column workstation) */

.os-view {
    width: 100%;
    max-width: 680px;
}

.os-view[hidden] {
    display: none !important;
}

/* Compact hero when an OS module is open so the console stays balanced */
body.os-window-open .os-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 680px;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2);
}

body.os-window-open .os-hero .os-eyebrow {
    display: none;
}

body.os-window-open .os-hero .os-logo {
    max-width: 175px;
    margin: 0;
    animation: none;
}

body.os-window-open .os-hero .os-tagline {
    margin: 0;
    font-size: 0.88rem;
    font-family: var(--os-mono);
    letter-spacing: 0.04em;
    color: var(--os-muted);
}

/* Native OS Window Shell */
.os-window {
    display: flex;
    flex-direction: column;
    background: rgba(4, 13, 23, 0.9);
    border: 1px solid rgba(0, 191, 255, 0.45);
    box-shadow:
        inset 0 0 36px rgba(0, 191, 255, 0.1),
        0 10px 32px rgba(0, 0, 0, 0.5);
    text-align: left;
    animation: bootIn 0.2s ease forwards;
    position: relative;
}

.os-window::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--os-cyan-hot);
    box-shadow: 0 0 12px var(--os-cyan-hot);
}

/* Window Titlebar + Sub-tabs */
.os-win-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.48rem 0.75rem 0.48rem 0.9rem;
    background: rgba(0, 32, 54, 0.78);
    border-bottom: 1px solid rgba(0, 191, 255, 0.32);
    font-family: var(--os-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: var(--os-cyan-hot);
}

.os-win-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.os-win-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.os-subtab {
    appearance: none;
    background: rgba(0, 18, 32, 0.65);
    border: 1px solid rgba(0, 191, 255, 0.28);
    color: var(--os-muted);
    font-family: var(--os-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.24rem 0.58rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.os-subtab:hover,
.os-subtab:focus-visible {
    color: #fff;
    border-color: var(--os-cyan);
    outline: none;
}

.os-subtab.is-active {
    background: rgba(0, 191, 255, 0.22);
    border-color: var(--os-cyan-hot);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
}

.os-win-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(138, 160, 181, 0.35);
    color: var(--os-muted);
    font-family: var(--os-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    padding: 0.22rem 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.os-win-close:hover,
.os-win-close:focus-visible {
    background: rgba(255, 95, 95, 0.22);
    border-color: #ff6b6b;
    color: #fff;
    outline: none;
}

/* Tab Panes inside Window */
.os-win-body {
    height: 310px;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    scrollbar-width: thin;
    scrollbar-color: var(--os-cyan) rgba(0, 20, 35, 0.5);
}

.os-win-body::-webkit-scrollbar {
    width: 6px;
}

.os-win-body::-webkit-scrollbar-track {
    background: rgba(0, 20, 35, 0.5);
}

.os-win-body::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.45);
}

.os-pane[hidden] {
    display: none !important;
}

/* Spotlight Module Grid (2-column tactical cards) */
.os-mod-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.os-mod-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.42rem;
    padding: 0.65rem 0.78rem;
    text-decoration: none;
    color: var(--os-text);
    background: linear-gradient(135deg, rgba(0, 42, 70, 0.48) 0%, rgba(5, 14, 24, 0.85) 100%);
    border: 1px solid rgba(0, 191, 255, 0.28);
    border-left: 3px solid var(--os-cyan);
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.os-mod-card--wide {
    grid-column: 1 / -1;
}

.os-mod-card:hover,
.os-mod-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--os-cyan-hot);
    border-left-color: var(--os-green);
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2) 0%, rgba(8, 22, 38, 0.92) 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    outline: none;
}

.os-mod-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.os-mod-id {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.os-mod-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.os-mod-fa {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid rgba(0, 191, 255, 0.3);
    color: var(--os-cyan-hot);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.os-mod-id h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-mod-tag {
    font-family: var(--os-mono);
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--os-green);
    background: rgba(61, 255, 160, 0.08);
    border: 1px solid rgba(61, 255, 160, 0.35);
    padding: 0.12rem 0.38rem;
    flex-shrink: 0;
}

.os-mod-desc {
    font-size: 0.76rem;
    color: var(--os-muted);
    line-height: 1.38;
}

.os-mod-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--os-mono);
    font-size: 0.6rem;
    color: var(--os-cyan);
    padding-top: 0.25rem;
    border-top: 1px solid rgba(0, 191, 255, 0.14);
}

/* Compact 2-Column Diagnostic Rows (Tools, Hubs, Affiliates) */
.os-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
}

.os-item-row {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.65rem;
    text-decoration: none;
    color: var(--os-text);
    background: rgba(7, 18, 31, 0.82);
    border: 1px solid rgba(0, 191, 255, 0.24);
    border-left: 2px solid var(--os-cyan);
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.os-item-row:hover,
.os-item-row:focus-visible {
    background: rgba(0, 191, 255, 0.16);
    border-color: var(--os-cyan-hot);
    border-left-color: var(--os-green);
    transform: translateX(2px);
    outline: none;
}

.os-item-ico {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: rgba(0, 35, 58, 0.6);
    border: 1px solid rgba(0, 191, 255, 0.28);
    color: var(--os-cyan-hot);
    font-size: 0.85rem;
}

.os-item-ico img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.os-item-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.os-item-txt strong {
    font-size: 0.84rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-item-txt span {
    font-size: 0.7rem;
    color: var(--os-muted);
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.os-item-arrow {
    font-size: 0.68rem;
    color: var(--os-cyan);
    opacity: 0.85;
}

/* Affiliate Code Pill */
.os-code-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--os-mono);
    font-size: 0.58rem;
    color: var(--os-amber);
    background: rgba(255, 179, 71, 0.12);
    border: 1px dashed rgba(255, 179, 71, 0.5);
    padding: 0.14rem 0.42rem;
    letter-spacing: 0.04em;
}

@media (max-width: 680px) {
    .os-mod-grid,
    .os-row-grid {
        grid-template-columns: 1fr;
    }

    body.os-window-open .os-hero .os-tagline {
        display: none;
    }
}
