:root {
    --gh-font-heading: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --gh-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f4f7fa;
    --paper: #ffffff;
    --ink: #171a18;
    --muted: #57615c;
    --line: #d8e0dc;
    --teal: #00897b;
    --green: #4d9f5b;
    --coral: #e94f37;
    --sun: #f2c94c;
    --shadow: 0 18px 45px rgba(23, 26, 24, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--gh-font-body);
    line-height: 1.6;
    letter-spacing: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 100;
    transform: translateY(-140%);
    padding: 0.65rem 0.9rem;
    background: var(--ink);
    color: #fff;
    border-radius: 6px;
}

.skip-link:focus {
    transform: translateY(0);
}

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    min-height: 76px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: #fff;
    border: 3px solid var(--teal);
    border-radius: 6px;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 1.1rem;
}

.brand code,
.terminal-line,
.command-grid code,
.read-more {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.brand code {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-nav a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
}

.site-nav a:hover,
.site-nav .nav-current a {
    color: var(--ink);
    background: #e6f4f1;
}

.hero {
    position: relative;
    min-height: 58vh;
    display: grid;
    align-items: end;
    overflow: hidden;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 15, 12, 0.82), rgba(7, 15, 12, 0.38) 58%, rgba(7, 15, 12, 0.12)),
        linear-gradient(0deg, rgba(7, 15, 12, 0.66), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 5rem 0 4rem;
}

.hero h1,
.article h1,
.archive-header h1 {
    margin: 0;
    max-width: 820px;
    font-family: var(--gh-font-heading);
    font-size: 4rem;
    line-height: 1.02;
}

.hero-copy {
    max-width: 660px;
    margin: 1.25rem 0 0;
    font-size: 1.18rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
}

.button-primary {
    background: var(--sun);
    color: var(--ink);
}

.button-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.58);
}

.terminal-line {
    margin: 0 0 0.9rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.terminal-line span {
    color: var(--sun);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--teal);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.quick-commands {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 1.5rem;
    align-items: start;
    padding: 4rem 0;
}

.utility-search {
    display: grid;
    grid-template-columns: 0.58fr 1.42fr;
    gap: 1.5rem;
    align-items: start;
    padding: 3rem 0 1rem;
}

.quick-commands h2,
.feature-band h2,
.utility-search h2,
.source-panel h2,
.section-heading h2,
.site-footer h2 {
    margin: 0;
    font-family: var(--gh-font-heading);
    font-size: 2.25rem;
    line-height: 1.12;
}

.search-box {
    display: grid;
    gap: 0.8rem;
}

.search-box button {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 5px solid var(--coral);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(23, 26, 24, 0.07);
    cursor: pointer;
    text-align: left;
}

.search-box button span {
    font-weight: 900;
}

.search-box button code {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-chips a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    background: #fff7d7;
    border: 1px solid #ead47a;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}

.command-grid a {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 5px solid var(--teal);
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(23, 26, 24, 0.07);
}

.command-grid a:nth-child(2) {
    border-top-color: var(--coral);
}

.command-grid a:nth-child(3) {
    border-top-color: var(--green);
}

.command-grid code {
    color: var(--ink);
    font-weight: 800;
}

.command-grid span {
    color: var(--muted);
}

.command-grid-large a {
    min-height: 180px;
}

.feature-band {
    padding: 4rem 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split {
    display: grid;
    grid-template-columns: 1fr 0.78fr;
    gap: 2rem;
    align-items: center;
}

.split p {
    max-width: 620px;
}

.split img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hub-grid a {
    min-height: 220px;
    display: grid;
    align-content: start;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--ink);
    background: #f7faf9;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
}

.hub-grid span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    border-radius: 6px;
    font-weight: 900;
}

.hub-grid h3 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.18;
}

.hub-grid p {
    margin: 0;
    color: var(--muted);
}

.source-strip {
    padding: 4rem 0;
    background: #e9f5f2;
    border-bottom: 1px solid var(--line);
}

.source-panel {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    gap: 2rem;
    align-items: start;
}

.source-panel p {
    max-width: 620px;
}

.source-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.source-list a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
}

.last-updated {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.feed-section {
    padding: 4rem 0;
}

.section-heading {
    margin-bottom: 1.5rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.post-card {
    min-height: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(23, 26, 24, 0.07);
}

.post-card a {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.post-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
}

.post-card h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

.post-card p {
    margin: 0;
    color: var(--muted);
}

.read-more {
    margin-top: auto;
    color: var(--teal);
    font-weight: 900;
}

.tag-pill {
    display: inline-flex;
    width: fit-content;
    min-height: 28px;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #e6f4f1;
    color: #00695f;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 900;
}

.article-main {
    padding: 4rem 0;
}

.article {
    max-width: 880px;
}

.article-header {
    display: grid;
    gap: 0.9rem;
}

.article-excerpt,
.archive-header p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
    font-size: 1.15rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--muted);
    font-weight: 700;
}

.article-image {
    margin: 2rem 0;
}

.article-image img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.article-image figcaption {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-content {
    font-size: 1.08rem;
}

.article-content h2,
.article-content h3 {
    line-height: 1.18;
    margin: 2rem 0 0.75rem;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin: 0 0 1.15rem;
}

.article-content code,
.article-content pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.article-content pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 6px;
    background: #101714;
    color: #effaf5;
}

.article-content .kg-width-wide {
    width: min(1060px, calc(100vw - 32px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.article-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.archive-header {
    padding: 4rem 0 0;
}

.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.pagination a {
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    text-decoration: none;
    font-weight: 800;
}

.site-footer {
    padding: 3rem 1.5rem;
    color: #fff;
    background: var(--ink);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    text-decoration: none;
}

.image-credit {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .site-header,
    .quick-commands,
    .utility-search,
    .split,
    .source-panel,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
        display: grid;
    }

    .site-nav ul {
        justify-content: flex-start;
    }

    .hero h1,
    .article h1,
    .archive-header h1 {
        font-size: 3rem;
    }

    .command-grid,
    .hub-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .source-list {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .wrap {
        width: min(100% - 24px, 1120px);
    }

    .site-header {
        padding: 0.85rem 0.75rem;
    }

    .site-nav a {
        min-height: 34px;
        padding: 0.35rem 0.55rem;
        font-size: 0.92rem;
    }

    .hero {
        min-height: 56vh;
    }

    .hero-content {
        padding: 3.5rem 0 2.5rem;
    }

    .hero h1,
    .article h1,
    .archive-header h1 {
        font-size: 2.3rem;
    }

    .quick-commands h2,
    .feature-band h2,
    .utility-search h2,
    .source-panel h2,
    .section-heading h2,
    .site-footer h2 {
        font-size: 1.8rem;
    }

    .search-box button {
        display: grid;
        justify-items: start;
    }
}
