@font-face {
    font-family: "CaskaydiaMono Nerd Font";
    src: url("/assets/fonts/CaskaydiaMonoNerdFont-Regular.ttf")
        format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "CaskaydiaMono Nerd Font";
    src: url("/assets/fonts/CaskaydiaMonoNerdFont-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
    --surface: #313244;
    --surface-hover: #45475a;

    --text: #cdd6f4;
    --white: #ffffff;
    --subtext: #bac2de;
    --muted: #a6adc8;

    --lavender: #b4befe;
    --blue: #89b4fa;
    --sapphire: #74c7ec;
    --green: #a6e3a1;
    --yellow: #f9e2af;
    --peach: #fab387;
    --mauve: #cba6f7;
    --pink: #f5c2e7;
    --red: #f38ba8;

    --border: rgba(205, 214, 244, 0.14);
    --border-strong: rgba(205, 214, 244, 0.24);

    --page-width: 980px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(203, 166, 247, 0.16),
            transparent 28rem
        ),
        radial-gradient(
            circle at bottom right,
            rgba(137, 180, 250, 0.12),
            transparent 30rem
        ),
        var(--base);

    font-family:
        "CaskaydiaMono Nerd Font", ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, monospace;

    font-size: 15px;
    line-height: 1.7;
}

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

a:hover {
    color: var(--lavender);
    text-decoration: underline;
}

code {
    padding: 0.12em 0.34em;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--green);
    background: rgba(17, 17, 27, 0.54);
    font-family: inherit;
    font-size: 0.92em;
}

.page {
    width: min(var(--page-width), calc(100vw - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.site-header {
    margin-bottom: 22px;
    padding: 18px 20px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(24, 24, 37, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.site-title {
    margin: 0;

    color: var(--white);
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.site-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    padding: 7px 11px;

    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--subtext);
    background: rgba(49, 50, 68, 0.38);

    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.nav a:hover,
.nav a.active {
    color: var(--crust);
    border-color: rgba(180, 190, 254, 0.38);
    background: linear-gradient(135deg, var(--pink), var(--lavender));
}

.layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 18px;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(24, 24, 37, 0.64);
}

.sidebar-title {
    margin: 0 0 10px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
}

.toc {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc li + li {
    margin-top: 6px;
}

.toc a {
    display: block;
    padding: 6px 8px;

    border-radius: 9px;

    color: var(--muted);
    font-size: 0.86rem;
    text-decoration: none;
}

.toc a:hover {
    color: var(--white);
    background: rgba(49, 50, 68, 0.48);
}

.content {
    min-width: 0;
}

.article {
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: rgba(24, 24, 37, 0.7);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.article h2 {
    margin: 0 0 12px;
    padding-bottom: 10px;

    border-bottom: 1px solid var(--border);

    color: var(--white);
    font-size: 1.35rem;
    line-height: 1.25;
    letter-spacing: -0.04em;
}

.article h3 {
    margin: 28px 0 10px;

    color: var(--lavender);
    font-size: 1.05rem;
    line-height: 1.3;
}

.article p {
    margin: 0 0 14px;
    color: var(--subtext);
}

.article ul {
    margin: 0 0 16px;
    padding-left: 1.4rem;
    color: var(--subtext);
}

.article li + li {
    margin-top: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 22px;
}

.info-card {
    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: rgba(49, 50, 68, 0.34);
}

.info-card strong {
    display: block;
    margin-bottom: 4px;

    color: var(--white);
    font-size: 0.92rem;
}

.info-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.link-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 22px;
}

.wiki-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 14px;

    color: var(--text);
    background: rgba(49, 50, 68, 0.34);

    text-decoration: none;
}

.wiki-link:hover {
    color: var(--white);
    border-color: var(--border-strong);
    background: rgba(69, 71, 90, 0.44);
    text-decoration: none;
}

.wiki-link span {
    color: var(--muted);
    font-size: 0.84rem;
}

.crypto-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 22px;
}

.crypto-copy {
    min-height: 68px;
    padding: 12px 13px;

    display: grid;
    grid-template-columns: 38px 1fr 30px;
    align-items: center;
    gap: 12px;

    border: 1px solid var(--border);
    border-radius: 16px;

    color: var(--text);
    background: rgba(49, 50, 68, 0.34);

    font-family: "CaskaydiaMono Nerd Font", ui-monospace, monospace;

    text-align: left;
    cursor: pointer;

    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease;
}

.crypto-copy:hover {
    transform: translateY(-2px);
    border-color: rgba(180, 190, 254, 0.34);
    background: rgba(69, 71, 90, 0.46);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.crypto-copy:active {
    transform: translateY(0);
}

.coin-mark {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(205, 214, 244, 0.14);
    border-radius: 13px;

    color: var(--crust);
    background: linear-gradient(135deg, var(--pink), var(--lavender));

    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.coin-btc {
    background: linear-gradient(135deg, var(--yellow), var(--peach));
}

.coin-eth {
    background: linear-gradient(135deg, var(--lavender), var(--blue));
}

.coin-sol {
    background: linear-gradient(135deg, var(--green), var(--mauve));
}

.coin-ltc {
    background: linear-gradient(135deg, var(--sapphire), var(--lavender));
}

.coin-xmr {
    background: linear-gradient(135deg, var(--peach), var(--red));
}

.coin-info {
    min-width: 0;
}

.coin-info strong {
    display: block;
    color: var(--white);
    font-size: 0.94rem;
    line-height: 1.2;
}

.coin-info small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.copy-mark {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(205, 214, 244, 0.12);
    border-radius: 10px;

    color: var(--subtext);
    background: rgba(17, 17, 27, 0.28);

    font-size: 1rem;
    line-height: 1;
}

.crypto-copy:hover .copy-mark {
    color: var(--crust);
    background: linear-gradient(135deg, var(--pink), var(--lavender));
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 20;

    padding: 10px 14px;

    border: 1px solid rgba(205, 214, 244, 0.18);
    border-radius: 999px;

    color: var(--crust);
    background: linear-gradient(135deg, var(--green), var(--lavender));

    font-size: 0.9rem;
    font-weight: 700;

    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);

    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.liberapay-box {
    margin-top: 14px;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(49, 50, 68, 0.3);
}

.liberapay-box img {
    display: block;
    max-width: 100%;
    height: auto;
}

.note {
    margin-top: 12px;
    padding: 12px 14px;

    border-left: 3px solid var(--mauve);
    border-radius: 12px;

    color: var(--subtext);
    background: rgba(203, 166, 247, 0.1);
}

.footer {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

@media (max-width: 820px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .crypto-list {
        grid-template-columns: 1fr;
    }

    .crypto-copy {
        grid-template-columns: 36px 1fr 30px;
        min-height: 64px;
    }

    .coin-mark {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 520px) {
    .page {
        width: min(100vw - 20px, var(--page-width));
        padding-top: 18px;
    }

    .site-header,
    .article {
        padding: 16px;
        border-radius: 16px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .nav a {
        font-size: 0.8rem;
    }

    .wiki-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}
