/* Reading pages: About and research posts. Loads after site.css and home.css. */

.rd-head {
    padding-top: 56px;
    padding-bottom: 8px;
}

.rd-head-inner,
.rd-body {
    max-width: 680px;
}

.rd-eyebrow,
.rd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 16px;
    font: 500 13px var(--font-mono);
    color: var(--muted);
}

.rd-h1 {
    margin: 0;
    font-size: clamp(32px, 4.6vw, 48px);
    line-height: 1.1;
    letter-spacing: -.03em;
    font-weight: 700;
    text-wrap: balance;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font: 500 13px var(--font-mono);
}

.lang-option {
    color: var(--muted);
    text-decoration: none;
}

.lang-option:hover,
.lang-option:focus-visible {
    color: var(--ink);
}

.lang-active {
    color: var(--ink);
    font-weight: 600;
}

.lang-divider {
    color: var(--faint);
}

/* The reading column */
.rd-body {
    padding-top: 24px;
    padding-bottom: 64px;
    font-size: 18px;
    line-height: 1.65;
    color: var(--ink-2);
}

.rd-body p,
.rd-body ul,
.rd-body ol {
    margin: 0 0 20px;
}

.rd-body ul,
.rd-body ol {
    padding-left: 1.2em;
}

.rd-body li {
    margin-bottom: 10px;
}

.rd-body strong {
    color: var(--ink);
}

.rd-body a {
    color: var(--action);
    text-decoration: none;
}

.rd-body a:hover,
.rd-body a:focus-visible {
    text-decoration: underline;
}

.rd-body h2 {
    margin: 40px 0 14px;
    font-size: clamp(24px, 2.6vw, 30px);
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 700;
    color: var(--ink);
}

.rd-body h3 {
    margin: 32px 0 10px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
}

.rd-body .lede {
    font-size: 20px;
    line-height: 1.55;
    font-weight: 500;
    color: var(--ink);
}

.rd-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.rd-body code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--neutral-bg);
    font: 500 .85em var(--font-mono);
    color: var(--ink);
}

.rd-body pre {
    position: relative;
    margin: 0 0 24px;
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: 8px;
    background: var(--dark);
    color: var(--dark-text);
    font: 400 13px/1.6 var(--font-mono);
}

.rd-body pre code {
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
}

.rd-body blockquote {
    margin: 0 0 24px;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--line);
    color: var(--ink-2);
}

/* A pull-quote: the one line a reader should leave with. */
.rd-body blockquote.rd-pullquote {
    padding: 4px 0 4px 20px;
    border-left-color: var(--action);
    font-size: clamp(26px, 2.8vw, 30px);
    line-height: 1.3;
    font-weight: 600;
    color: var(--ink);
}

.rd-pullquote cite {
    display: block;
    margin-top: 10px;
    font: 500 13px var(--font-mono);
    font-style: normal;
    color: var(--muted);
}

.rd-body table {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    font-size: 15px;
}

.rd-body th,
.rd-body td {
    padding: 9px 12px 9px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.rd-body th {
    font: 500 11px var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.rd-button {
    display: inline-block;
    margin: 8px 0 12px;
    padding: 12px 20px;
    border-radius: var(--r-md);
    background: var(--action);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
}

.rd-button:hover,
.rd-button:focus-visible {
    background: var(--ink);
}

/* Founder block, as on the homepage */
.rd-founder {
    margin: 40px 0 0;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.rd-founder .founder-text {
    color: var(--ink);
}

.rd-landed {
    margin: 24px 0 0;
    text-align: center;
}

.rd-landed img {
    max-width: 320px;
    width: 100%;
}

/* Closing card */
.rd-cta {
    margin-top: 40px;
    padding: 30px;
}

.rd-cta h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.rd-cta p {
    margin: 8px 0 20px;
    font-size: 16px;
}

.rd-cta p a {
    color: #fff;
    text-decoration: underline;
}

.rd-cta .cta-blue-actions a {
    text-decoration: none;
}

.rd-address {
    margin-top: 16px !important;
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .rd-head {
        padding-top: 40px;
    }

    .rd-body {
        font-size: 17px;
    }
}

/* The founder quote carries no rule, as on the homepage. */
.rd-founder blockquote.founder-text {
    padding: 0;
    border: 0;
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.35;
    font-weight: 500;
}

/* The card's buttons keep their own colours inside the reading column. */
.rd-body .cta-blue-primary {
    color: var(--ink);
}

.rd-body .cta-blue-secondary {
    color: #fff;
}

.rd-body .cta-blue-primary:hover,
.rd-body .cta-blue-primary:focus-visible,
.rd-body .cta-blue-secondary:hover,
.rd-body .cta-blue-secondary:focus-visible {
    text-decoration: none;
}

.rd-body .cta-blue-primary:hover,
.rd-body .cta-blue-primary:focus-visible {
    color: #fff;
}

.rd-body .cta-blue-secondary:hover,
.rd-body .cta-blue-secondary:focus-visible {
    color: var(--ink);
}

.rd-body hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.rd-body sup {
    font-size: .7em;
    line-height: 0;
}

.rd-body pre.has-copy {
    padding-right: 72px;
}

.docs-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 9px;
    border: 1px solid var(--dark-line);
    border-radius: 5px;
    background: #1e2026;
    color: var(--dark-text);
    font: 500 11px var(--font-mono);
    cursor: pointer;
}

.docs-copy:hover,
.docs-copy:focus-visible {
    color: #fff;
    border-color: var(--dark-text);
}

/* Wide tables scroll inside the column rather than the page. */
@media (max-width: 760px) {
    .rd-body table {
        display: block;
        overflow-x: auto;
    }
}

.rd-back {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font: 500 14px var(--font-mono);
}

/* Research index: one row per post */
.rs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0 8px;
}

.rs-filter {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    color: var(--ink-2);
    font: 500 13px var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
}

.rs-filter:hover,
.rs-filter:focus-visible {
    border-color: var(--ink-2);
}

.rs-filter.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.rs-list {
    margin: 16px 0 64px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.rs-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 4px 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.rs-row[hidden] {
    display: none;
}

.rs-date {
    padding-top: 3px;
    font: 500 13px var(--font-mono);
    color: var(--muted);
}

.rs-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
}

.rs-title a {
    color: var(--ink);
    text-decoration: none;
}

.rs-title a:hover,
.rs-title a:focus-visible {
    color: var(--action);
}

.rs-badge {
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--neutral-bg);
    font: 600 10px var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    vertical-align: middle;
}

.rs-summary {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-2);
}

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

    .rs-summary {
        -webkit-line-clamp: 2;
    }
}

.rs-lede {
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-2);
}
