/* =====================================================================
   scibasic.css — nuget server web front end
   style tokens are aligned with the scibasic.net content pages
   (dark technical minimalism, near black background, green accent)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #030303;
    --panel: #0a0a0a;
    --panel-2: #101010;
    --panel-3: #161616;
    --ink: #f2f2f2;
    --ink-dim: #9a9a9a;
    --ink-faint: #6b6b6b;
    --ink-ghost: #4a4a4a;
    --hairline: rgba(255, 255, 255, .16);
    --hairline2: rgba(255, 255, 255, .08);
    --green: #3fae4a;
    --green-dim: #2e8b3a;
    --green-deep: #1f6b2a;
    --warn: #ff7a6e;
    --gold: #e0c24a;
    --blue: #6fa8dc;
    --sans: 'Inter', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
    --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(63, 174, 74, .25);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== top navigation ===================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 3.4vw;
    background: rgba(3, 3, 3, .84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hairline2);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.brand img {
    width: 25px;
    height: 25px;
    border-radius: 6px;
}

.brand strong {
    font-weight: 600;
}

.brand .sub {
    color: var(--ink-faint);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: .04em;
}

.topnav {
    display: flex;
    gap: 38px;
}

.topnav a {
    font-size: 13px;
    color: var(--ink-dim);
    letter-spacing: .04em;
    transition: color .25s var(--ease);
}

.topnav a:hover,
.topnav a.on {
    color: var(--ink);
}

.topnav a.on {
    position: relative;
}

.topnav a.on::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 1px;
    background: var(--green);
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    color: var(--ink-dim);
    font-size: 15px;
    transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}

.home-btn:hover {
    color: var(--ink);
    border-color: var(--green);
    transform: translateY(-1px);
}

/* ===================== layout ===================== */

.wrap {
    width: min(1060px, 92vw);
    margin: 0 auto;
    padding: 66px 0 30px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-size: 10px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.eyebrow b {
    color: var(--green);
    font-weight: 600;
}

.headline {
    margin: 0 0 22px;
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -.01em;
}

.headline .u {
    color: var(--ink);
    border-bottom: 1px solid var(--green);
    padding-bottom: 2px;
}

.headline .accent {
    color: var(--green);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    margin: 0 0 26px;
    padding: 14px 0;
    border-top: 1px solid var(--hairline2);
    border-bottom: 1px solid var(--hairline2);
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.meta b {
    color: var(--ink-dim);
    font-weight: 500;
}

.lede {
    max-width: 66em;
    margin: 0 0 50px;
    color: var(--ink-dim);
    font-size: 15px;
    line-height: 1.9;
}

.sec-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 46px 0 20px;
    font-size: 10px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.sec-label b {
    color: var(--green);
    font-weight: 600;
}

.sec-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline2);
}

h2 {
    margin: 0 0 18px;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 400;
    letter-spacing: -.01em;
}

/* ===================== stat cards ===================== */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 26px;
    margin-bottom: 14px;
}

.stat {
    border-top: 1px solid var(--hairline);
    padding-top: 16px;
    opacity: 0;
    transform: translateY(10px);
    animation: rise .6s var(--ease) forwards;
}

.stat .no {
    font-size: 10px;
    letter-spacing: .28em;
    color: var(--green);
}

.stat .value {
    margin: 6px 0 2px;
    font-size: 34px;
    font-weight: 400;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.stat .label {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ===================== search & toolbar ===================== */

.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
    flex-wrap: wrap;
}

.search {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--panel);
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13.5px;
    outline: none;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}

.search input::placeholder {
    color: var(--ink-ghost);
}

.search input:focus {
    border-color: var(--green);
    background: var(--panel-2);
}

.search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: var(--ink-ghost);
}

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-faint);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: 2px;
    color: var(--ink-dim);
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}

.btn:hover:not(:disabled) {
    color: var(--ink);
    border-color: var(--green);
    background: var(--panel-3);
}

.btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.btn.solid {
    background: var(--green);
    border-color: var(--green);
    color: #04170a;
    font-weight: 600;
}

.btn.solid:hover {
    background: var(--green-dim);
    border-color: var(--green-dim);
    color: #04170a;
}

/* ===================== tables ===================== */

.tablewrap {
    overflow-x: auto;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    padding: 13px 18px;
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-ghost);
    border-bottom: 1px solid var(--hairline2);
    white-space: nowrap;
}

td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--hairline2);
    color: var(--ink-dim);
    vertical-align: middle;
}

tbody tr {
    transition: background .2s var(--ease);
}

tbody tr:hover td {
    background: #0d0d0d;
}

tbody tr:last-child td {
    border-bottom: none;
}

td.num,
th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--mono);
}

td .pkg-name {
    color: var(--ink);
    font-weight: 500;
}

td .pkg-desc {
    display: block;
    margin-top: 3px;
    color: var(--ink-ghost);
    font-size: 12px;
    max-width: 46ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* the latest version of the package, rendered as the third line of the
   package cell (the dedicated "Latest" column was merged into it) */
td .pkg-ver {
    display: inline-block;
    margin-top: 7px;
    color: var(--ink-faint);
    border-color: var(--hairline2);
}

.mono {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-faint);
}

.ver {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-dim);
}

a.dl {
    color: var(--ink-dim);
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1px;
    transition: color .25s var(--ease), border-color .25s var(--ease);
}

a.dl::after {
    content: " →";
    opacity: 0;
    transition: opacity .25s var(--ease);
}

a.dl:hover {
    color: var(--green);
    border-color: var(--green);
}

a.dl:hover::after {
    opacity: 1;
}

.row-link {
    cursor: pointer;
}

/* ===================== note / callout ===================== */

.note {
    margin: 26px 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid var(--green);
    color: var(--ink-dim);
    font-size: 13.5px;
    line-height: 1.8;
}

.note b {
    color: var(--ink);
}

/* ===================== code / endpoint list ===================== */

.endpoints {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px 30px;
    margin: 8px 0 10px;
}

.endpoint {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--hairline2);
}

.endpoint .method {
    flex: none;
    width: 46px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--green);
}

.endpoint .path {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-dim);
    word-break: break-all;
}

/* ===================== states ===================== */

.loading,
.empty {
    padding: 46px 18px;
    text-align: center;
    color: var(--ink-ghost);
    font-size: 13px;
    letter-spacing: .06em;
}

.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 10px;
    border: 2px solid var(--hairline);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    vertical-align: -2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: rise .5s var(--ease) forwards;
}

/* ===================== footer ===================== */

footer.site {
    margin-top: 80px;
    border-top: 1px solid var(--hairline2);
    padding: 30px 3.4vw 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

footer.site .legal {
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--ink-ghost);
}

footer.site .pn {
    display: flex;
    gap: 30px;
}

footer.site .pn a {
    font-size: 12px;
    color: var(--ink-faint);
    transition: color .25s var(--ease);
}

footer.site .pn a span {
    display: block;
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

footer.site .pn a:hover {
    color: var(--ink);
}

/* ===================== responsive ===================== */

@media (max-width: 900px) {
    .topnav {
        display: none;
    }

    .wrap {
        padding-top: 44px;
    }

    .stat .value {
        font-size: 27px;
    }

    td .pkg-desc {
        max-width: 30ch;
    }

    .pager {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===================== charts ===================== */

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart {
    margin-bottom: 4px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
    overflow: hidden;
    transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.chart:hover {
    border-color: var(--hairline);
}

.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hairline2);
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.chart-head .mono {
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: none;
    color: var(--ink-ghost);
}

.chart-canvas {
    width: 100%;
    min-height: 320px;
}

.chart-canvas canvas {
    display: block;
}

.chart-canvas-3d {
    height: 620px;
    background: radial-gradient(circle at 50% 42%, #0a0a0a 0%, #030303 72%);
}

.chart-canvas-3d canvas {
    outline: none;
}

@media (max-width: 900px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-canvas-3d {
        height: 460px;
    }
}

/* ===================== package article ===================== */

.pkg-hero {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    margin-bottom: 22px;
}

.pkg-icon {
    flex: none;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline2);
    border-radius: 4px;
    background: var(--panel);
    overflow: hidden;
}

.pkg-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pkg-hero-body {
    min-width: 0;
}

.pkg-hero-body .headline {
    margin-bottom: 10px;
}

.facts {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--hairline2);
}

.facts dt {
    padding: 11px 16px 11px 0;
    border-bottom: 1px solid var(--hairline2);
    font-size: 10.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.facts dd {
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--hairline2);
    color: var(--ink-dim);
    font-size: 13.5px;
    word-break: break-word;
}

.facts dd a {
    color: var(--ink-dim);
    border-bottom: 1px solid var(--hairline);
}

.facts dd a:hover {
    color: var(--green);
    border-color: var(--green);
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

a.chip {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
    color: var(--ink-dim);
    font-size: 12px;
    font-family: var(--mono);
    transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}

a.chip:hover {
    color: var(--green);
    border-color: var(--green);
    background: var(--panel-3);
}

.dep-group {
    margin-bottom: 18px;
}

.dep-framework {
    margin-bottom: 8px;
    color: var(--ink-ghost);
    font-size: 11px;
    letter-spacing: .08em;
}

.dep-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--hairline2);
}

.dep-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--hairline2);
}

.dep-badge {
    margin-left: auto;
    padding: 2px 8px;
    border: 1px solid rgba(63, 174, 74, .5);
    border-radius: 2px;
    color: var(--green);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dep-badge.ext {
    border-color: rgba(111, 168, 220, .5);
    color: var(--blue);
}

.article-body {
    color: var(--ink-dim);
    font-size: 14.5px;
    line-height: 1.95;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 72em;
}

details.raw {
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
}

details.raw summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    outline: none;
}

details.raw summary:hover {
    color: var(--ink);
}

details.raw pre {
    margin: 0;
    padding: 16px 18px;
    border-top: 1px solid var(--hairline2);
    overflow-x: auto;
    color: var(--ink-dim);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
}

/* ===================== package readme (marked.js output) ===================== */

.readme-body {
    max-width: 72em;
    color: var(--ink-dim);
    font-size: 14.5px;
    line-height: 1.9;
    white-space: normal;
    word-break: break-word;
}

.readme-body>*:first-child {
    margin-top: 0;
}

.readme-body h1,
.readme-body h2,
.readme-body h3,
.readme-body h4,
.readme-body h5,
.readme-body h6 {
    margin: 30px 0 12px;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.35;
}

.readme-body h1 {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline2);
    font-size: 24px;
}

.readme-body h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline2);
    font-size: 19px;
}

.readme-body h3 {
    font-size: 16px;
}

.readme-body h4,
.readme-body h5,
.readme-body h6 {
    font-size: 14.5px;
}

.readme-body p {
    margin: 0 0 14px;
}

.readme-body a {
    color: var(--ink);
    border-bottom: 1px solid var(--hairline);
    text-decoration: none;
    transition: color .25s var(--ease), border-color .25s var(--ease);
}

.readme-body a:hover {
    color: var(--green);
    border-color: var(--green);
}

.readme-body ul,
.readme-body ol {
    margin: 0 0 14px;
    padding-left: 26px;
}

.readme-body li {
    margin: 5px 0;
}

.readme-body code {
    padding: 2px 5px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: #101010;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12.5px;
}

.readme-body pre {
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
    overflow-x: auto;
}

.readme-body pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-dim);
    font-size: 12px;
    line-height: 1.7;
}

.readme-body blockquote {
    margin: 0 0 16px;
    padding: 4px 0 4px 16px;
    border-left: 2px solid var(--green);
    color: var(--ink-faint);
}

.readme-body img {
    max-width: 100%;
    height: auto;
    margin: 6px 0;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
}

.readme-body table {
    width: 100%;
    margin: 0 0 16px;
}

.readme-body hr {
    margin: 26px 0;
    border: 0;
    border-top: 1px solid var(--hairline2);
}

.readme-body .readme-raw {
    font-family: var(--mono);
    font-size: 12.5px;
    white-space: pre-wrap;
}

/* ===================== daily activity chart ===================== */

.chart-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn.tiny {
    padding: 5px 10px;
    font-size: 10px;
    letter-spacing: .12em;
}

.btn.on {
    color: var(--green);
    border-color: var(--green);
    background: rgba(63, 174, 74, .12);
}

#pkg-trend,
#feed-trend {
    height: 340px;
}

@media (max-width: 900px) {

    #pkg-trend,
    #feed-trend {
        height: 260px;
    }
}

/* ===================== package cluster legend ===================== */

.cluster-legend {
    margin-top: 14px;
}

.cluster-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid var(--hairline2);
    border-radius: 2px;
    background: var(--panel);
    color: var(--ink-dim);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .04em;
    cursor: pointer;
    appearance: none;
    transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}

.cluster-legend .legend-item:hover {
    border-color: var(--hairline);
    color: var(--ink);
    background: var(--panel-3);
}

.cluster-legend .legend-item:focus-visible {
    outline: 1px solid var(--green);
    outline-offset: 2px;
}

/* the currently selected filter */
.cluster-legend .legend-item.on {
    border-color: var(--green);
    background: rgba(63, 174, 74, .12);
    color: var(--ink);
}

.cluster-legend .legend-item.all {
    color: var(--ink-faint);
    font-family: var(--sans);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.cluster-legend .legend-item.all.on {
    border-color: var(--hairline);
    background: var(--panel-3);
    color: var(--ink);
}

.cluster-legend .dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
