/* Fonts */
@font-face {
    font-family: "DM Sans";
    src: url("fonts/dm-sans-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("fonts/manrope-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

/* Base */
:root {
    --ink: #171916;
    --paper: #eff0e9;
    --paper-soft: #f7f7f2;
    --lime: #c9f45a;
    --olive: #5c7618;
    --line: rgba(23, 25, 22, 0.16);
    --muted: rgba(23, 25, 22, 0.64);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "DM Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::selection {
    color: var(--ink);
    background: var(--lime);
}

a,
button {
    color: inherit;
    font: inherit;
}

a {
    text-decoration: none;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 14px;
    left: 14px;
    padding: 11px 16px;
    border-radius: 999px;
    color: var(--ink);
    background: var(--lime);
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

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

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

.shell {
    width: min(100% - 48px, 1320px);
    margin-inline: auto;
}

.reading-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: 3px;
    background: transparent;
    pointer-events: none;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: left;
}

/* Header */
.site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    height: 104px;
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand__mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(23, 25, 22, 0.72);
    border-radius: 50%;
    font-size: 11px;
    letter-spacing: -0.08em;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    font-weight: 600;
}

.back-link span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.back-link:hover span,
.back-link:focus-visible span {
    color: white;
    background: var(--ink);
    transform: translateX(-3px);
}

/* Article header */
.article-hero {
    isolation: isolate;
    position: relative;
    overflow: hidden;
    padding: clamp(180px, 16vw, 245px) 0 clamp(90px, 9vw, 138px);
    border-bottom: 1px solid var(--line);
}

.article-hero::before {
    position: absolute;
    z-index: -1;
    top: -26rem;
    left: -19rem;
    width: 58rem;
    height: 58rem;
    border-radius: 50%;
    background: rgba(201, 244, 90, 0.38);
    filter: blur(110px);
    content: "";
}

.article-hero::after {
    position: absolute;
    z-index: -1;
    right: -9rem;
    bottom: -17rem;
    width: 38rem;
    height: 38rem;
    border: 1px solid rgba(23, 25, 22, 0.09);
    border-radius: 50%;
    content: "";
}

.article-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 60px;
    align-items: end;
}

.article-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.article-kicker::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 6px rgba(145, 186, 39, 0.12);
    content: "";
}

.article-hero h1 {
    max-width: 1050px;
    margin: 0;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(62px, 7vw, 108px);
    font-weight: 600;
    letter-spacing: -0.07em;
    line-height: 0.96;
    text-wrap: balance;
}

.article-hero h1 em {
    color: var(--olive);
    font-style: normal;
}

.article-hero__lead {
    max-width: 700px;
    margin: 38px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 1.65vw, 23px);
    line-height: 1.6;
}

.article-number {
    color: rgba(23, 25, 22, 0.07);
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(130px, 17vw, 260px);
    font-weight: 600;
    letter-spacing: -0.08em;
    line-height: 0.72;
    user-select: none;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 48px;
    color: rgba(23, 25, 22, 0.62);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.article-meta span + span {
    position: relative;
}

.article-meta span + span::before {
    position: absolute;
    top: 50%;
    left: -15px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--olive);
    content: "";
    transform: translateY(-50%);
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin-top: 32px;
    padding: 6px 7px 6px 18px;
    border: 1px solid rgba(23, 25, 22, 0.26);
    border-radius: 999px;
    color: var(--ink);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.share-button span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--ink);
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.share-button:hover,
.share-button:focus-visible {
    border-color: var(--ink);
    color: white;
    background: var(--ink);
}

.share-button:hover span,
.share-button:focus-visible span {
    color: var(--ink);
    background: var(--lime);
    transform: rotate(45deg);
}

/* Share dialog */
.share-dialog {
    width: min(100% - 32px, 580px);
    max-height: min(760px, calc(100svh - 32px));
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    color: white;
    background: #171916;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.36);
}

.share-dialog::backdrop {
    background: rgba(10, 11, 9, 0.68);
    backdrop-filter: blur(8px);
}

.share-dialog__inner {
    padding: clamp(26px, 5vw, 42px);
}

.share-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.share-dialog__kicker {
    margin: 0 0 10px;
    color: var(--lime);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.share-dialog h2 {
    margin: 0;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.share-dialog__close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.share-dialog__close:hover,
.share-dialog__close:focus-visible {
    color: var(--ink);
    background: var(--lime);
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 34px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 60px;
    padding: 9px 14px 9px 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.share-option:hover,
.share-option:focus-visible {
    border-color: rgba(201, 244, 90, 0.55);
    color: white;
    background: rgba(201, 244, 90, 0.08);
}

.share-option__icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: var(--ink);
    background: var(--lime);
    font-size: 11px;
    font-weight: 800;
}

.share-dialog__status {
    min-height: 20px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.share-dialog__privacy {
    max-width: 560px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    line-height: 1.55;
}

.clipboard-helper {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

/* Article content */
.article-body {
    padding: clamp(90px, 10vw, 150px) 0;
    background: var(--paper-soft);
}

.article-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 740px);
    gap: clamp(70px, 10vw, 160px);
    justify-content: center;
    align-items: start;
}

.article-toc {
    position: sticky;
    top: 52px;
}

.article-toc__label {
    margin: 0 0 20px;
    color: rgba(23, 25, 22, 0.62);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.article-toc ol {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.article-toc li {
    counter-increment: toc;
}

.article-toc a {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    color: rgba(23, 25, 22, 0.5);
    font-size: 12px;
    line-height: 1.45;
    transition: color 180ms ease;
}

.article-toc a::before {
    content: "0" counter(toc);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.9;
}

.article-toc a:hover,
.article-toc a:focus-visible,
.article-toc a[aria-current="true"] {
    color: var(--ink);
}

.article-copy {
    min-width: 0;
}

.article-copy > :first-child {
    margin-top: 0;
}

.article-copy .intro {
    color: var(--ink);
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.45;
}

.article-copy .intro::first-letter {
    float: left;
    margin: 0.08em 0.12em 0 0;
    color: var(--olive);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 3.15em;
    font-weight: 600;
    line-height: 0.78;
}

.article-copy h2 {
    margin: 88px 0 24px;
    scroll-margin-top: 45px;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(34px, 3.4vw, 50px);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.article-copy h3 {
    margin: 48px 0 16px;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.article-copy p,
.article-copy li {
    color: rgba(23, 25, 22, 0.72);
    font-size: 18px;
    line-height: 1.85;
}

.article-copy p {
    margin: 0 0 28px;
}

.article-copy ul:not([class]),
.article-copy ol:not([class]) {
    display: grid;
    gap: 12px;
    margin: 30px 0;
    padding-left: 22px;
}

.pullquote {
    position: relative;
    margin: 72px 0;
    padding: 4px 0 4px 34px;
    border-left: 3px solid var(--lime);
}

.pullquote p {
    margin: 0;
    color: var(--ink);
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.28;
}

.article-card {
    margin: 62px 0;
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
}

.article-card__label {
    display: block;
    margin-bottom: 22px;
    color: var(--olive);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.article-card h3 {
    margin-top: 0;
}

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

.article-figure {
    margin: 72px 0;
}

.article-figure img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    object-fit: cover;
}

.article-figure figcaption {
    margin-top: 13px;
    color: rgba(23, 25, 22, 0.62);
    font-size: 11px;
    line-height: 1.5;
}

.topic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 40px 0;
}

.topic-card {
    min-height: 190px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}

.topic-card span {
    color: var(--olive);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topic-card h3 {
    margin: 44px 0 0;
    font-size: 23px;
}

.article-signoff {
    margin-top: 90px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.article-signoff p {
    margin: 0;
    color: rgba(23, 25, 22, 0.62);
    font-size: 14px;
}

/* Article navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: white;
    background: var(--ink);
}

.article-navigation a {
    position: relative;
    display: flex;
    min-height: 280px;
    padding: clamp(40px, 6vw, 82px);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: color 200ms ease;
}

.article-navigation a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    text-align: right;
}

.article-navigation a::before {
    position: absolute;
    inset: auto auto -15rem -14rem;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: rgba(201, 244, 90, 0.14);
    filter: blur(75px);
    content: "";
    opacity: 0;
    transition: opacity 250ms ease;
}

.article-navigation a:hover::before,
.article-navigation a:focus-visible::before {
    opacity: 1;
}

.article-navigation__label {
    position: relative;
    color: rgba(255, 255, 255, 0.48);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.article-navigation strong {
    position: relative;
    max-width: 540px;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(26px, 3vw, 43px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.article-navigation a:last-child strong {
    align-self: flex-end;
}

/* Footer */
.site-footer {
    padding: 32px 0;
    color: rgba(255, 255, 255, 0.46);
    background: var(--ink);
    font-size: 11px;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.error-page {
    min-height: 100svh;
}

/* Error page */
.error-page .article-hero {
    display: flex;
    align-items: center;
    min-height: 100svh;
    padding-bottom: 110px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 42px;
}

.error-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 56px;
    padding: 7px 9px 7px 22px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    transition: color 180ms ease, background 180ms ease;
}

.error-link span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--ink);
}

.error-link:hover,
.error-link:focus-visible {
    color: white;
    background: var(--ink);
}

.error-link:hover span,
.error-link:focus-visible span {
    color: var(--ink);
    background: var(--lime);
}

/* Keyboard focus */
:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 4px;
}

@media (max-width: 860px) {
    .article-hero__grid {
        grid-template-columns: 1fr;
    }

    .article-number {
        display: none;
    }

    .article-layout {
        display: block;
        max-width: 740px;
    }

    .article-toc {
        display: none;
    }
}

@media (max-width: 620px) {
    .shell {
        width: min(100% - 32px, 1320px);
    }

    .site-header {
        height: 82px;
    }

    .brand__mark {
        width: 32px;
        height: 32px;
    }

    .back-link {
        font-size: 0;
    }

    .back-link span {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .article-hero {
        padding: 140px 0 76px;
    }

    .article-hero::before {
        top: -31rem;
        left: -30rem;
    }

    .article-kicker {
        margin-bottom: 22px;
        font-size: 9px;
    }

    .article-hero h1 {
        font-size: clamp(46px, 14vw, 62px);
    }

    .article-hero__lead {
        margin-top: 26px;
        font-size: 17px;
        line-height: 1.55;
    }

    .article-meta {
        gap: 9px 20px;
        margin-top: 34px;
        font-size: 8px;
    }

    .share-button {
        margin-top: 26px;
    }

    .share-dialog {
        border-radius: 20px;
    }

    .share-options {
        grid-template-columns: 1fr;
    }

    .article-body {
        padding: 72px 0 88px;
    }

    .article-copy .intro {
        font-size: 23px;
    }

    .article-copy h2 {
        margin-top: 68px;
        font-size: 36px;
    }

    .article-copy p,
    .article-copy li {
        font-size: 16px;
        line-height: 1.75;
    }

    .pullquote {
        margin: 56px 0;
        padding-left: 22px;
    }

    .pullquote p {
        font-size: 29px;
    }

    .article-card {
        margin: 48px 0;
        border-radius: 16px;
    }

    .article-figure {
        margin: 52px 0;
    }

    .article-figure img {
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

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

    .topic-card {
        min-height: 150px;
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }

    .article-navigation a {
        min-height: 210px;
        padding: 42px 16px;
    }

    .article-navigation a + a {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-left: 0;
    }

    .article-navigation strong {
        font-size: 28px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
