/* ============================================================
   CHANGELOG — Achromatic Minimalism · AMOLED Black & White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-margin-top: 5rem;
}

:root {
    --black:      #000000;
    --white:      #ffffff;
    --grey-100:   #f8f8f8;
    --grey-200:   #e8e8e8;
    --grey-300:   #c8c8c8;
    --grey-500:   #888888;
    --grey-700:   #444444;
    --grey-800:   #1e1e1e;
    --grey-900:   #111111;

    --font-body:  'Inter', system-ui, sans-serif;
    --font-mono:  'JetBrains Mono', monospace;

    --easing:     cubic-bezier(0.4, 0, 0.2, 1);
    --duration:   200ms;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Links ────────────────────────────────────────────── */
a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--grey-700);
    transition: border-color var(--duration) var(--easing),
                color var(--duration) var(--easing);
}

a:hover {
    color: var(--grey-300);
    border-bottom-color: var(--grey-300);
    cursor: pointer;
}

/* ── Layout ───────────────────────────────────────────── */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header, main, footer {
    width: 100%;
    max-width: 820px;
    padding: 0 1.5rem;
}

/* ── Site Header ──────────────────────────────────────── */
body > header {
    padding-top: 3.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--grey-800);
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

body > header h1 {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: center;
    color: var(--white);
    margin: 0;
}

body > header h1 a {
    border-bottom: none;
    color: inherit;
}

body > header h1 a:hover {
    color: var(--grey-300);
}

/* ── Main ─────────────────────────────────────────────── */
main {
    padding-top: 2rem;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Version Headers (generated by logmaker.js) ───────── */
main > header {
    all: unset;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 3.5rem;
    margin-bottom: 0.25rem;
    border-left: 2px solid var(--white);
    padding-left: 1rem;
}

main > header:first-of-type {
    margin-top: 0;
}

main > header h1 {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--white);
    margin: 0;
}

/* ── Copy Link Icon ───────────────────────────────────── */
.copy-link-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.3;
    transition: opacity var(--duration) var(--easing),
                transform var(--duration) var(--easing);
    cursor: pointer;
}

.copy-link-icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

.copy-link-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: var(--white);
    margin-left: 6px;
}

/* ── Date Paragraph ───────────────────────────────────── */
p.date {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--grey-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-left: 1.05rem;
    margin-left: 0;
}

/* ── Tables ───────────────────────────────────────────── */
table.changelog {
    width: 100%;
    border-collapse: collapse;
    margin-left: 0;
    margin-bottom: 0;
    border: 1px solid var(--grey-800);
    border-radius: 6px;
    overflow: hidden;
}

table.changelog thead th {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-500);
    padding: 0.55rem 0.75rem;
    text-align: left;
    background: var(--grey-900);
    box-shadow: none;
    border-radius: 0;
    border: 1px solid var(--grey-800);
}

table.changelog tbody tr {
    border-bottom: 1px solid var(--grey-800);
    transition: background-color var(--duration) var(--easing);
}

table.changelog tbody tr:last-child {
    border-bottom: none;
}

table.changelog tbody tr:hover {
    background-color: var(--grey-900);
}

table.changelog tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    background: transparent;
    border-right: 1px solid var(--grey-800);
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    font-size: 0.9rem;
    color: var(--grey-200);
    line-height: 1.5;
}

table.changelog tbody td:last-child {
    border-right: none;
}

table.changelog tbody td ul {
    list-style: none;
    padding: 0 !important;
    margin: 0;
}

/* Badge column — fixed narrow width */
table.changelog colgroup .col-badge,
table.changelog thead th:first-child,
table.changelog tbody td:first-child {
    width: 110px;
    min-width: 90px;
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.28em 0.65em;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    line-height: 1;
    white-space: nowrap;
    margin: 0;
    border: 1px solid transparent;
}

/* NEW / ADDED — emerald green */
.badge-new,
.badge-added {
    background-color: #0d2b1a;
    color: #4ade80;
    border-color: #166534;
}

/* IMPROVED — sky blue */
.badge-improved {
    background-color: #0b1e2e;
    color: #38bdf8;
    border-color: #0c4a6e;
}

/* FIXED — rose red */
.badge-fixed {
    background-color: #2b0d12;
    color: #f87171;
    border-color: #7f1d1d;
}

/* CHANGED — amber */
.badge-changed {
    background-color: #271d08;
    color: #fbbf24;
    border-color: #78350f;
}

/* REMOVED — muted grey with strikethrough */
.badge-removed {
    background-color: transparent;
    color: var(--grey-500);
    border-color: var(--grey-700);
    text-decoration: line-through;
    text-decoration-color: var(--grey-600);
}

/* ── Footer ───────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--grey-800);
    font-size: 0.78rem;
    color: var(--grey-500);
    letter-spacing: 0.03em;
    margin-top: auto;
}

footer a {
    border-bottom: none;
    color: var(--grey-300);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.7rem;
    transition: color var(--duration) var(--easing);
}

footer a:hover {
    color: var(--white);
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--black);
}
::-webkit-scrollbar-thumb {
    background: var(--grey-800);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--grey-700);
}

/* ── Selection ────────────────────────────────────────── */
::selection {
    background: var(--white);
    color: var(--black);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
    body > header {
        padding-top: 2.5rem;
    }

    main > header {
        margin-top: 3rem;
    }

    table.changelog thead th:first-child,
    table.changelog tbody td:first-child {
        width: 80px;
        min-width: 70px;
    }

    table.changelog tbody td {
        font-size: 0.82rem;
        padding: 0.7rem 0.5rem;
    }

    .badge {
        font-size: 0.58rem;
        padding: 0.22em 0.5em;
    }
}

/* ── Hide old dark mode toggle ────────────────────────── */
#darkbutton {
    display: none !important;
}
