/* Topic pages: /slow-tech, /slow-messaging, /pen-pals, /carrier-pigeon.
   Shared chrome (tokens, nav, footer, prose, accordion, call to action) is in site-light.css. */

.topic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 48px;
    align-items: center;
    padding-block: 32px 16px;
}

.topic-hero h1 {
    color: var(--heading);
    font-size: clamp(2.3rem, 5.2vw, 3.9rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.topic-lede {
    max-width: 34rem;
    margin-top: 20px;
    color: var(--ink-soft);
    font-size: 1.18rem;
    line-height: 1.6;
}

.topic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.topic-actions .store-badges {
    margin-top: 0;
}

.topic-button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--heading);
    font-weight: 800;
    text-decoration: none;
}

.topic-button:hover {
    background: #FFD12E;
}

.topic-button-quiet {
    border: 1px solid rgba(31, 30, 150, 0.25);
    background: var(--surface);
}

.topic-button-quiet:hover {
    background: var(--paper-lift);
}

.topic-button:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
}

/* Hero art: app sprites or the app map, never stock imagery */
.topic-art {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin: 0;
}

.topic-art img {
    width: min(46%, 220px);
    height: auto;
}

.topic-art-phone img {
    width: min(100%, 320px);
}

.topic-art figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Pen pals: passport stamps, dealt like postcards */
.topic-art-stamps {
    align-items: center;
    gap: 0;
}

.topic-art-stamps img {
    width: min(33%, 150px);
    filter: drop-shadow(0 10px 18px rgba(31, 30, 150, 0.16));
}

.topic-art-stamps img:nth-child(1) { transform: rotate(-7deg) translateY(10px); }
.topic-art-stamps img:nth-child(2) { transform: rotate(3deg) translateY(-12px); position: relative; z-index: 1; }
.topic-art-stamps img:nth-child(3) { transform: rotate(-2deg) translateY(14px); }

.topic-art-single img {
    width: min(100%, 300px);
}

/* Body: the article, with an "On this page" list beside it on wide screens */
.topic-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 14rem);
    gap: 64px;
    align-items: start;
    padding-top: 32px;
}

.topic-toc {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    padding-top: 56px;
}

.topic-toc h2 {
    color: var(--ink-soft);
    font-size: 0.95rem;
    font-weight: 800;
}

.topic-toc ol {
    display: grid;
    gap: 2px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.topic-toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.topic-toc a:hover,
.topic-toc a:focus-visible {
    background: rgba(31, 30, 150, 0.06);
    color: var(--heading);
}

/* A definition people can quote, with the name attached */
.topic-definition {
    margin-top: 24px;
    padding: 22px 26px;
    border-left: 6px solid var(--gold);
    border-radius: 0 18px 18px 0;
    background: var(--surface);
}

.topic-definition p {
    margin: 0;
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.6;
}

.topic-definition dfn {
    color: var(--heading);
    font-style: normal;
    font-weight: 800;
}

.topic-definition cite {
    display: block;
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-style: normal;
}

/* Principles: a short list, not a sequence */
.topic-principles {
    display: grid;
    gap: 14px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.topic-principles li {
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink-soft);
}

.topic-principles strong {
    display: block;
    color: var(--heading);
    font-size: 1.12rem;
}

/* Press quotes */
.topic-quote {
    margin: 24px 0 0;
    padding: 0 0 0 22px;
    border-left: 3px solid var(--indigo);
}

.topic-quote blockquote {
    margin: 0;
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.55;
}

.topic-quote figcaption {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.topic-headlines {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.topic-headlines li {
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.topic-headlines a {
    display: block;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.topic-headlines a:hover {
    color: var(--heading);
    text-decoration: underline;
    text-decoration-color: var(--gold);
}

.topic-headlines span {
    display: block;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

/* Questions answered on the page (no FAQ markup here; /faq owns that) */
.topic-questions {
    margin-top: 16px;
}

.topic-related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding: 0;
    list-style: none;
}

.topic-related a {
    display: inline-flex;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--heading);
    font-weight: 700;
    text-decoration: none;
}

.topic-related a:hover {
    border-color: var(--indigo);
}

@media (max-width: 960px) {
    .topic-hero,
    .topic-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .topic-toc {
        display: none;
    }

    .topic-art img {
        width: min(40%, 180px);
    }

    .topic-art-phone img {
        width: min(72vw, 280px);
    }

    .topic-art-stamps {
        padding-inline: 12px;
    }

    .topic-art-stamps img {
        width: 29%;
    }
}

/* Card and chip lists inside the article line up with the text (beats .sl-prose ul padding) */
.sl-prose :is(.topic-principles, .topic-headlines, .topic-related) {
    padding-left: 0;
}

.topic-crosslink {
    margin-top: 16px;
}
