/* α²Tracking — left rail (sidebar)
   Light surface, brand-orange active state. Self-scoped: tokens live on
   .rail so they don't leak into Telerik/Nordic theme. */

.rail {
    --brand-orange:      #F0532D;
    --brand-orange-soft: #FCE9E1;
    --brand-orange-deep: #C13E1D;
    --ink:               #191919;
    --ink-2:             #2D2D2D;
    --subhead:           #616161;
    --grey:              #808080;
    --grey-light:        #EEEEEE;
    --grey-semi:         #E3E3E3;
    --surface:           #ffffff;
    --bg:                #FAFAF7;
    --danger:            #D93B3B;
    --r:                 12px;

    background: var(--surface);
    color: var(--ink-2);
    border-right: 1px solid var(--grey-semi);
    padding: 18px 12px 18px;
    display: flex; flex-direction: column; gap: 4px;
    overflow-y: auto;
    position: sticky; top: 0; height: 100vh;
    font-family: 'Nexa', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Logo ---------- */
.rail-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px 18px;
    border-bottom: 1px solid var(--grey-semi);
    margin-bottom: 10px;
}
.rail-logo-mark {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    background: var(--ink); color: var(--brand-orange);
    border-radius: 8px;
    font-family: 'Rift Soft', 'Space Mono', monospace;
    font-weight: 700; font-size: 15px;
}
.rail-logo-text {
    font-family: 'Rift Soft', 'Space Mono', monospace;
    color: var(--ink);
    font-size: 17px; font-weight: 700; letter-spacing: 0.02em;
}
.rail-logo-text .o { color: var(--brand-orange); }

/* ---------- Nav ---------- */
.rail-nav { display: flex; flex-direction: column; gap: 2px; }

.rail-section {
    font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--grey); font-weight: 800;
    padding: 14px 10px 6px;
}

.rail-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 120ms ease, color 120ms ease;
}
.rail-item:hover {
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
}
.rail-item.active {
    background: var(--brand-orange-soft);
    color: var(--brand-orange-deep);
}
.rail-item.active::before {
    content: "";
    position: absolute; left: -12px; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--brand-orange);
    border-radius: 0 3px 3px 0;
}
.rail-item .ico {
    width: 22px; height: 22px; flex-shrink: 0;
    display: grid; place-items: center;
    font-size: 15px; line-height: 1;
}
.rail-item .label { flex: 1; }
.rail-item .count {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 7px;
    background: var(--grey-light);
    color: var(--subhead);
    border-radius: 999px;
    font-family: 'Space Mono', 'JetBrains Mono', monospace;
    font-weight: 600;
    min-width: 20px; text-align: center;
}
.rail-item.active .count {
    background: var(--brand-orange); color: #fff;
}
.rail-item .count.danger {
    background: var(--danger); color: #fff;
}
.rail-item .ext {
    margin-left: auto;
    font-size: 11px;
    color: var(--grey);
    font-weight: 600;
}

/* Inline SVG icon — currentColor propagates to stroke. */
.rail-item .ico svg {
    width: 18px; height: 18px;
    display: block;
}

/* Pills (soon, beta, live) */
.rail-item .pill,
.rail-card .pill {
    margin-left: auto;
    font-family: 'Nexa', 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.06em;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}
.rail-item .pill-soon {
    background: var(--grey-light);
    color: var(--subhead);
}
.rail-item .pill-beta {
    background: var(--brand-orange);
    color: #fff;
}
.rail-card .pill-live {
    background: var(--brand-orange);
    color: #fff;
    display: inline-block;
    margin-bottom: 8px;
}

/* Soon items: muted text, no pointer, not clickable. */
.rail-item.soon {
    color: var(--grey);
    cursor: default;
    pointer-events: none;
}
.rail-item.soon:hover {
    background: transparent;
    color: var(--grey);
}
.rail-item.soon .ico { opacity: 0.55; }

/* ---------- Footer card ---------- */
.rail-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--grey-semi);
}
.rail-card {
    background: var(--ink);
    color: rgba(255,255,255,0.85);
    border-radius: var(--r);
    padding: 14px;
    font-size: 12px;
    line-height: 1.45;
}
.rail-card .pill {
    display: inline-block;
    background: var(--brand-orange);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    letter-spacing: 0.08em;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.rail-card strong {
    color: #fff; font-weight: 800;
    display: block; margin-bottom: 6px;
}

/* ---------- Shell override ----------
   Outer grid still .nd-app; we tighten the rail column and let the rail
   manage its own background/border. The bracketed selectors hold higher
   specificity than the default .nd-sidebar dark theme in nordic.css. */
.nd-app:has(> .rail) { grid-template-columns: 232px 1fr; }