@font-face {
    font-family: "Cordata";
    src: url("/_assets/cordata.woff") format("woff");
    font-display: swap;
}

:root {
    --bg: #030406;
    --card: #060908;
    --text: #ffffff;
    --dim: rgba(255, 255, 255, 0.55);
    --mint: #5dffb3;
    --pink: #ff6b88;
    --iris: #b4afd9;
    --font: "Cordata", "IBM Plex Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.25;
    color: var(--text);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
    background:
        linear-gradient(rgb(3 4 6 / 55%), rgb(3 4 6 / 55%)) fixed,
        url("/_assets/bg.jpg") center top / 100% auto repeat-y var(--bg);
    image-rendering: pixelated;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgb(0 0 0 / 15%),
        rgb(0 0 0 / 15%) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    animation: scanline-move 8s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgb(0 0 0 / 30%) 100%);
    pointer-events: none;
    z-index: 9998;
}

@keyframes scanline-move {
    to {
        transform: translateY(2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }
}

a {
    color: var(--pink);
    text-decoration: none;
}

a:hover {
    color: var(--mint);
}

.shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header.top {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

header.top h1 {
    margin: 0 0 0.9rem;
    font-size: 32px;
    font-weight: normal;
    color: var(--mint);
}

header.top h1 a {
    color: inherit;
}

.tagline {
    margin: 0 0 1.2rem;
    color: var(--dim);
}

.cursor {
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

nav.top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.5rem;
}

nav.top a {
    font-size: 18.4px;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    background: rgba(3, 4, 6, 0.35);
}

nav.top a::before {
    content: "[ ";
    color: var(--iris);
}

nav.top a::after {
    content: " ]";
    color: var(--iris);
}

nav.top a:hover,
nav.top a[aria-current] {
    border-color: var(--iris);
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--iris);
    padding: 1.1rem 1.1rem 1.25rem;
}

.card.side {
    border-color: var(--mint);
    border-radius: 5px;
}

.card h2 {
    margin: 0 0 1rem;
    font-size: 20px;
    font-weight: normal;
    color: var(--pink);
    text-transform: uppercase;
}

.card h2::before {
    content: "[ ";
    color: var(--iris);
}

.card h2::after {
    content: " ]";
    color: var(--iris);
}

.card p {
    margin: 0 0 0.9rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.mint {
    color: var(--mint);
}

.pink {
    color: var(--pink);
}

.dim {
    color: var(--dim);
}

.bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.bullets li::before {
    content: ">> ";
    color: var(--iris);
}

dl.kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.55rem 1rem;
    margin: 0;
}

dl.kv dt {
    color: var(--dim);
}

dl.kv dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.code {
    position: relative;
    margin: 0 0 0.9rem;
    padding: 0.85rem 4.5rem 0.85rem 0.9rem;
    background: #000;
    border: 1px dashed var(--iris);
    color: var(--mint);
    font-family: var(--font);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.code .copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

button,
.btn {
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--iris);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
}

button:hover,
.btn:hover {
    border-color: var(--mint);
    color: var(--mint);
}

.repo-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
}

.repo-links a {
    display: block;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--iris);
    color: var(--text);
}

.repo-links a span {
    display: block;
    margin-top: 0.25rem;
    font-size: 13px;
    color: var(--dim);
}

.repo-links a:hover {
    border-color: var(--mint);
    color: var(--mint);
}

.dot {
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    margin-right: 0.4em;
    border-radius: 50%;
    background: var(--dim);
    vertical-align: 0.05em;
}

.dot.ok {
    background: var(--mint);
    box-shadow: 0 0 6px var(--mint);
}

.dot.warn {
    background: var(--pink);
    box-shadow: 0 0 6px var(--pink);
}

/* * directory listings */

.crumbs {
    font-size: 20px;
    overflow-wrap: anywhere;
}

.crumbs a {
    color: var(--mint);
}

.crumbs .sep {
    color: var(--iris);
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 0.75rem;
    color: var(--dim);
}

.filter {
    margin-left: auto;
    font: inherit;
    color: var(--text);
    background: #000;
    border: 1px solid var(--iris);
    padding: 0.3rem 0.5rem;
    min-width: 14rem;
}

.filter:focus {
    outline: none;
    border-color: var(--mint);
}

table.listing {
    width: 100%;
    border-collapse: collapse;
}

table.listing th {
    text-align: left;
    font-weight: normal;
    color: var(--dim);
    padding: 0 0.6rem 0.6rem;
    border-bottom: 1px dashed var(--iris);
}

table.listing th a {
    color: var(--dim);
}

table.listing th a:hover,
table.listing th a.active {
    color: var(--mint);
}

table.listing td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid rgba(180, 175, 217, 0.12);
    white-space: nowrap;
}

table.listing td.name {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

table.listing td.size,
table.listing th.size {
    text-align: right;
}

table.listing tr:hover td {
    background: rgba(93, 255, 179, 0.05);
}

table.listing a.dir {
    color: var(--mint);
}

table.listing a.file {
    color: var(--text);
}

table.listing a.file:hover {
    color: var(--pink);
}

table.listing .kind {
    display: inline-block;
    width: 1.6em;
    color: var(--iris);
}

@media (max-width: 640px) {
    table.listing .time {
        display: none;
    }
}

footer.bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 1.25rem;
    background: rgba(3, 4, 6, 0.85);
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    z-index: 10;
}

footer.bar a {
    color: inherit;
}

footer.bar a:hover {
    color: var(--mint);
}

.code:last-child {
    margin-bottom: 0;
}

.mirror-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin-bottom: 0.75rem;
}

.mirror-head h2 {
    margin: 0;
}

.mirror-state {
    font-size: 14px;
    color: var(--dim);
}

.mirror-meta {
    color: var(--dim);
}

.card .dim + .code {
    margin-top: -0.5rem;
}

.code.spaced {
    margin-top: 1rem;
}

/* * live stats: series color #2aa673 is the mint step validated against the card surface */

.live {
    --series: #2aa673;
}

.stat-label {
    margin: 0 0 0.3rem;
    font-size: 13px;
    color: var(--dim);
}

.card .hero {
    margin: 0 0 0.6rem;
    font-size: 40px;
    line-height: 1.1;
    color: var(--text);
}

.spark-wrap {
    position: relative;
}

.spark {
    display: block;
    width: 100%;
    height: 72px;
    cursor: crosshair;
    touch-action: none;
}

.spark-base {
    stroke: rgba(180, 175, 217, 0.35);
    stroke-width: 1;
}

.spark-area {
    fill: var(--series);
    opacity: 0.18;
}

.spark-line {
    fill: none;
    stroke: var(--series);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.spark-cross {
    stroke: var(--iris);
    stroke-width: 1;
}

.spark-tip {
    position: absolute;
    top: -2rem;
    transform: translateX(-50%);
    padding: 0.2rem 0.45rem;
    font-size: 13px;
    white-space: nowrap;
    color: var(--text);
    background: #000;
    border: 1px solid var(--iris);
    pointer-events: none;
}

.spark-axis {
    display: flex;
    justify-content: space-between;
    margin: 0.3rem 0 1rem;
    font-size: 12px;
    color: var(--dim);
}

.kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card .kpi {
    margin: 0;
    font-size: 18px;
}

.meter {
    height: 8px;
    border-radius: 4px;
    background: rgba(42, 166, 115, 0.22);
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--series);
    transition: width 0.4s ease;
}

.card .meter-label {
    margin: 0.4rem 0 0.9rem;
    font-size: 13px;
}

.numbers summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--dim);
}

.numbers table {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 13px;
    border-collapse: collapse;
}

.numbers th {
    text-align: left;
    font-weight: normal;
    color: var(--dim);
}

.numbers td:last-child,
.numbers th:last-child {
    text-align: right;
}
