/* ==========================================================================
   RAIIS design system (2026 rebuild)
   Loaded AFTER style.css. style.css is legacy and still styles the long-form
   article pages (/blog/<post>, /techblog, /privacy); everything else on the
   site is built from the r-* classes below.

   Principles: restraint. One typeface family, one accent, hairlines instead
   of shadows, no decorative motion. Light is the default theme; dark mirrors
   the palette of the company deck.
   ========================================================================== */

:root {
    --r-bg: #ffffff;
    --r-bg-alt: #f5f6f4;
    --r-surface: #ffffff;
    --r-ink: #0e1513;
    --r-ink-2: #3a4541;
    --r-muted: #68736f;
    --r-line: #dfe3e0;
    --r-line-strong: #c3cac6;
    --r-accent: #1d5b43;
    --r-accent-soft: #e9f1ec;
    --r-on-ink: #ffffff;
    --r-chip: #ffffff;
    --r-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
    --r-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --r-max: 1160px;
    --r-gutter: 28px;
    --r-radius: 3px;
}

[data-theme="dark"] {
    --r-bg: #0f1513;
    --r-bg-alt: #131b18;
    --r-surface: #161f1b;
    --r-ink: #f1f4f2;
    --r-ink-2: #c3ccc7;
    --r-muted: #8a9690;
    --r-line: #25302b;
    --r-line-strong: #38453f;
    --r-accent: #8fd0a8;
    --r-accent-soft: #1a3327;
    --r-on-ink: #0f1513;
    --r-chip: #f3f5f4;
    /* remap the legacy style.css tokens so article pages share this palette */
    --background-color: #0f1513;
    --card-bg: #161f1b;
    --surface-alt: #131b18;
    --border-subtle: #25302b;
    --muted-text: #8a9690;
    --link-color: #8fd0a8;
}

/* ---------- base ---------- */

html { background: var(--r-bg); scroll-behavior: smooth; }
html[data-theme="dark"] { background-color: var(--r-bg); }

body,
html[data-theme="dark"] body {
    font-family: var(--r-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--r-ink);
    background: var(--r-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--r-sans);
    text-transform: none;
    letter-spacing: -0.01em;
}

.scroll-progress { display: none !important; }

.r-container {
    max-width: var(--r-max);
    margin: 0 auto;
    padding: 0 var(--r-gutter);
}

.r-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--r-ink);
    color: var(--r-on-ink);
    padding: 10px 16px;
    z-index: 2000;
}
.r-skip:focus { left: 12px; top: 12px; }

:focus-visible {
    outline: 2px solid var(--r-accent);
    outline-offset: 3px;
}

/* ---------- header ---------- */

.r-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--r-bg);
    border-bottom: 1px solid var(--r-line);
}
.r-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}
.r-brand {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.22em;
    color: var(--r-ink);
    text-decoration: none;
    text-transform: uppercase;
}
.r-brand:hover { color: var(--r-ink); }
.r-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}
.r-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.r-nav-links a {
    color: var(--r-ink-2);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}
.r-nav-links a:hover,
.r-nav-links a[aria-current="page"] {
    color: var(--r-ink);
    border-bottom-color: var(--r-ink);
}
.r-nav-tools {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-left: 30px;
    border-left: 1px solid var(--r-line);
}
.r-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--r-mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--r-line-strong);
}
.r-lang a { color: var(--r-muted); text-decoration: none; padding: 4px 2px; }
.r-lang a:hover { color: var(--r-ink); }
.r-lang a.is-active { color: var(--r-ink); font-weight: 500; }
.r-header .theme-toggle {
    color: var(--r-muted);
    font-size: 0.95rem;
    padding: 6px;
    margin: 0;
    transform: none;
}
.r-header .theme-toggle:hover { color: var(--r-ink); transform: none; }
.r-login {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--r-ink-2);
    text-decoration: none;
    white-space: nowrap;
}
.r-login:hover { color: var(--r-ink); }
.r-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--r-line-strong);
    border-radius: var(--r-radius);
    color: var(--r-ink);
    font-family: var(--r-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
}

@media (max-width: 960px) {
    .r-menu-btn { display: inline-block; }
    .r-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--r-bg);
        border-bottom: 1px solid var(--r-line);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--r-gutter) 20px;
    }
    .r-nav.is-open { display: flex; }
    .r-nav-links { flex-direction: column; align-items: stretch; gap: 0; }
    .r-nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--r-line);
    }
    .r-nav-tools {
        border-left: 0;
        padding: 18px 0 0;
        flex-wrap: wrap;
    }
}

/* ---------- buttons and links ---------- */

.r-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--r-sans);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    padding: 14px 22px;
    border-radius: var(--r-radius);
    border: 1px solid var(--r-ink);
    background: var(--r-ink);
    color: var(--r-on-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.r-btn:hover {
    background: var(--r-accent);
    border-color: var(--r-accent);
    color: var(--r-on-ink);
}
.r-btn--ghost {
    background: transparent;
    color: var(--r-ink);
    border-color: var(--r-line-strong);
}
.r-btn--ghost:hover {
    background: transparent;
    color: var(--r-ink);
    border-color: var(--r-ink);
}
.r-btn--sm { padding: 10px 16px; font-size: 0.86rem; }

.r-link {
    color: var(--r-ink);
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    border-bottom: 1px solid var(--r-line-strong);
    padding-bottom: 2px;
}
.r-link:hover { color: var(--r-accent); border-bottom-color: var(--r-accent); }
.r-link::after { content: " \2192"; }
.r-link--ext::after { content: " \2197\FE0E"; }

.r-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 36px;
}

/* ---------- type ---------- */

.r-eyebrow {
    font-family: var(--r-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-muted);
    margin: 0 0 18px;
}
.r-eyebrow--accent { color: var(--r-accent); }

.r-h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--r-ink);
    margin: 0 0 26px;
    max-width: 17em;
    text-wrap: balance;
}
.r-h2 {
    font-size: clamp(1.55rem, 2.6vw, 2.1rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--r-ink);
    margin: 0 0 18px;
    text-wrap: balance;
}
.r-h3 {
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.005em;
    color: var(--r-ink);
    margin: 0 0 8px;
}
.r-lede {
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.6;
    color: var(--r-ink-2);
    max-width: 44em;
    margin: 0;
}
.r-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--r-ink-2);
    max-width: 42em;
    margin: 0 0 16px;
}
.r-body:last-child { margin-bottom: 0; }
.r-small {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--r-muted);
    margin: 0;
}
.r-note {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--r-muted);
    margin: 28px 0 0;
    max-width: 60em;
}

/* ---------- sections ---------- */

.r-hero { padding: 104px 0 88px; }
.r-hero--page { padding: 84px 0 64px; }

.r-section {
    padding: 88px 0;
    border-top: 1px solid var(--r-line);
}
.r-section--alt { background: var(--r-bg-alt); }
.r-section--tight { padding: 56px 0; }

.r-split {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 56px;
    align-items: start;
}
.r-split-head .r-h2 { margin-bottom: 14px; }
.r-section-head { max-width: 46em; margin-bottom: 48px; }

@media (max-width: 860px) {
    .r-hero { padding: 64px 0 56px; }
    .r-hero--page { padding: 56px 0 44px; }
    .r-section { padding: 60px 0; }
    .r-split { grid-template-columns: 1fr; gap: 28px; }
    .r-section-head { margin-bottom: 34px; }
}

/* ---------- figures (proof row) ---------- */

.r-figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--r-ink);
    margin: 0;
    padding: 0;
    list-style: none;
}
.r-figures li {
    padding: 26px 26px 6px 0;
    border-right: 1px solid var(--r-line);
    margin-right: 26px;
}
.r-figures li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.r-figure-value {
    display: block;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--r-ink);
    margin-bottom: 10px;
}
.r-figure-label {
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--r-muted);
}
@media (max-width: 860px) {
    .r-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r-figures li { border-right: 0; margin-right: 0; padding: 22px 18px 18px 0; border-bottom: 1px solid var(--r-line); }
}
@media (max-width: 480px) {
    .r-figures { grid-template-columns: 1fr; }
}

/* ---------- flow diagram (sources -> ingest -> core -> modules) ---------- */

.r-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.1fr);
    gap: 34px;
    align-items: stretch;
}
.r-flow-col { position: relative; display: flex; flex-direction: column; gap: 10px; }
.r-flow-col + .r-flow-col::before {
    content: "\2192";
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-20%);
    color: var(--r-accent);
    font-size: 1rem;
    line-height: 1;
}
.r-flow-label {
    font-family: var(--r-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-muted);
    margin: 0 0 6px;
}
.r-flow-box {
    border: 1px solid var(--r-line);
    background: var(--r-surface);
    border-radius: var(--r-radius);
    padding: 14px 16px;
    flex: 1 1 auto;
}
.r-flow-box strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--r-ink);
    margin-bottom: 3px;
}
.r-flow-box span,
.r-flow-box li {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--r-muted);
}
.r-flow-box ul { margin: 6px 0 0; padding: 0; list-style: none; }
.r-flow-box li { padding: 5px 0; border-top: 1px solid var(--r-line); }
.r-flow-box--core {
    background: var(--r-ink);
    border-color: var(--r-ink);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 22px;
}
.r-flow-box--core strong { color: var(--r-on-ink); font-size: 1.12rem; margin-bottom: 12px; }
.r-flow-box--core li { color: var(--r-on-ink); opacity: 0.78; border-top-color: rgba(128, 128, 128, 0.35); }
.r-flow-box--more { border-style: dashed; background: transparent; }
.r-flow-base {
    margin-top: 22px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    background: var(--r-surface);
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    align-items: baseline;
}
.r-flow-base .r-flow-label { margin: 0; }
.r-flow-base span { font-size: 0.86rem; color: var(--r-ink-2); }
@media (max-width: 960px) {
    .r-flow { grid-template-columns: 1fr; gap: 30px; }
    .r-flow-col + .r-flow-col::before {
        content: "\2193";
        left: 0;
        top: -24px;
        transform: none;
    }
}

/* ---------- product streams ---------- */

.r-streams { border-top: 1px solid var(--r-ink); }
.r-stream {
    display: grid;
    grid-template-columns: 64px minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3fr);
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid var(--r-line);
    align-items: start;
    color: inherit;
    text-decoration: none;
}
a.r-stream:hover .r-stream-name { color: var(--r-accent); }
.r-stream-num {
    font-family: var(--r-mono);
    font-size: 0.8rem;
    color: var(--r-muted);
    padding-top: 5px;
}
.r-stream-kind {
    font-family: var(--r-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-accent);
    margin: 0 0 6px;
}
.r-stream-name {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--r-ink);
    margin: 0;
    transition: color 0.15s ease;
}
.r-stream-desc { font-size: 0.98rem; line-height: 1.65; color: var(--r-ink-2); margin: 0; }
.r-stream-meta { margin: 0; }
.r-stream-meta dt {
    font-family: var(--r-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-muted);
    margin-bottom: 3px;
}
.r-stream-meta dd {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--r-ink);
    margin: 0 0 14px;
}
.r-stream-meta dd:last-child { margin-bottom: 0; }
@media (max-width: 960px) {
    .r-stream { grid-template-columns: 40px minmax(0, 1fr); gap: 14px 16px; }
    .r-stream-desc, .r-stream-meta { grid-column: 2; }
}

/* ---------- generic grids / cells ---------- */

.r-grid {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--r-line);
    border-left: 1px solid var(--r-line);
}
.r-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-cell {
    border-right: 1px solid var(--r-line);
    border-bottom: 1px solid var(--r-line);
    background: var(--r-surface);
    padding: 28px 26px;
}
.r-cell p { font-size: 0.93rem; line-height: 1.65; color: var(--r-ink-2); margin: 0; }
.r-cell .r-eyebrow { margin-bottom: 12px; }
.r-cell-meta {
    font-family: var(--r-mono);
    font-size: 0.74rem;
    color: var(--r-muted) !important;
    margin: 2px 0 14px !important;
}
.r-cell-foot {
    margin-top: 18px !important;
    padding-top: 14px;
    border-top: 1px solid var(--r-line);
    font-size: 0.82rem !important;
    color: var(--r-muted) !important;
}
@media (max-width: 960px) {
    .r-grid--3, .r-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .r-grid--2, .r-grid--3, .r-grid--4 { grid-template-columns: 1fr; }
}

/* ---------- capability matrix ---------- */

.r-caps { border-top: 1px solid var(--r-ink); }
.r-caps-group {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: 40px;
    padding: 34px 0;
    border-bottom: 1px solid var(--r-line);
}
.r-caps-group > header .r-h3 { font-size: 1.15rem; font-weight: 500; }
.r-caps-group > header p { font-size: 0.88rem; color: var(--r-muted); margin: 6px 0 0; line-height: 1.55; }
.r-caps-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 40px;
}
.r-cap h4 {
    font-family: var(--r-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--r-accent);
    margin: 0 0 8px;
}
.r-cap ul { margin: 0; padding: 0; list-style: none; }
.r-cap li {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--r-ink-2);
    padding: 7px 0;
    border-top: 1px solid var(--r-line);
}
.r-cap li b { font-weight: 600; color: var(--r-ink); }
@media (max-width: 960px) {
    .r-caps-group { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 620px) {
    .r-caps-list { grid-template-columns: 1fr; }
}

/* ---------- product screenshot ---------- */

.r-shot {
    margin: 0;
    border: 1px solid var(--r-line-strong);
    border-radius: 6px;
    overflow: hidden;
    background: #f7f7f9;
}
.r-shot img { display: block; width: 100%; height: auto; }
.r-shot figcaption {
    font-size: 0.8rem;
    color: var(--r-muted);
    padding: 12px 16px;
    border-top: 1px solid var(--r-line);
    background: var(--r-surface);
}

.r-product-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.r-product-mark { width: 44px; height: 44px; border-radius: 6px; display: block; }
.r-product-head .r-eyebrow { margin: 0; }

.r-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--r-line);
    margin: 36px 0 0;
    padding: 0;
}
.r-facts div { padding: 18px 20px 0 0; }
.r-facts dt {
    font-family: var(--r-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-muted);
    margin-bottom: 4px;
}
.r-facts dd { margin: 0; font-size: 0.98rem; font-weight: 500; color: var(--r-ink); line-height: 1.45; }
@media (max-width: 620px) { .r-facts { grid-template-columns: 1fr; } }

/* ---------- plain list with rules ---------- */

.r-rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--r-line); }
.r-rules li {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--r-line);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--r-ink-2);
}
.r-rules li b { font-weight: 600; color: var(--r-ink); }
@media (max-width: 620px) { .r-rules li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- logos ---------- */

.r-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.r-logos a,
.r-logos span.r-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 172px;
    height: 68px;
    padding: 14px 20px;
    background: var(--r-chip);
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
}
.r-logos img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.8;
    transition: filter 0.2s ease, opacity 0.2s ease;
}
.r-logos a:hover img { filter: none; opacity: 1; }
.r-logo-group + .r-logo-group { margin-top: 34px; }

/* ---------- people ---------- */

.r-people {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 28px;
}
.r-people--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-person-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(1);
    background: var(--r-bg-alt);
    border-radius: var(--r-radius);
    margin-bottom: 18px;
}
.r-people--3 .r-person-photo { aspect-ratio: 1 / 1; max-width: 148px; }
.r-person-name { font-size: 1.05rem; font-weight: 600; color: var(--r-ink); margin: 0 0 2px; letter-spacing: -0.005em; }
.r-person-role {
    font-family: var(--r-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-accent);
    margin: 0 0 12px;
}
.r-person-bio { font-size: 0.9rem; line-height: 1.6; color: var(--r-ink-2); margin: 0 0 12px; }
.r-person-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--r-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--r-line-strong);
}
.r-person-link:hover { color: var(--r-ink); border-bottom-color: var(--r-ink); }
@media (max-width: 960px) {
    .r-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r-people--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .r-people--3 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .r-people { grid-template-columns: 1fr; }
    .r-person-photo { max-width: 240px; }
}

/* ---------- publications / index rows ---------- */

.r-index { border-top: 1px solid var(--r-ink); margin: 0; padding: 0; list-style: none; }
.r-index > li { border-bottom: 1px solid var(--r-line); }
.r-entry {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 28px;
    padding: 26px 0;
    align-items: start;
    color: inherit;
    text-decoration: none;
}
a.r-entry:hover .r-entry-title { color: var(--r-accent); }
.r-entry-tag {
    font-family: var(--r-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-muted);
    padding-top: 5px;
    line-height: 1.5;
}
.r-entry-title {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--r-ink);
    margin: 0 0 6px;
    transition: color 0.15s ease;
}
.r-entry-by { font-size: 0.88rem; color: var(--r-ink-2); margin: 0 0 8px; }
.r-entry-by em { font-style: italic; }
.r-entry-abs { font-size: 0.9rem; line-height: 1.6; color: var(--r-muted); margin: 0; max-width: 46em; }
.r-entry-go {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--r-ink);
    white-space: nowrap;
    padding-top: 4px;
}
@media (max-width: 760px) {
    .r-entry { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
    .r-entry-tag { padding-top: 0; }
}

.r-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    list-style: none;
    margin: 40px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--r-line);
}
.r-subnav a {
    font-family: var(--r-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-muted);
    text-decoration: none;
}
.r-subnav a:hover { color: var(--r-ink); }

/* ---------- closing call ---------- */

.r-cta {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 40px;
    align-items: end;
}
.r-cta .r-actions { margin-top: 0; justify-content: flex-end; }
@media (max-width: 860px) {
    .r-cta { grid-template-columns: 1fr; gap: 26px; }
    .r-cta .r-actions { justify-content: flex-start; }
}

/* ---------- footer ---------- */

.r-footer {
    border-top: 1px solid var(--r-ink);
    background: var(--r-bg);
    padding: 56px 0 30px;
    color: var(--r-ink-2);
}
.r-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr));
    gap: 40px;
}
.r-footer .r-brand { display: inline-block; margin-bottom: 14px; }
.r-footer p { font-size: 0.88rem; line-height: 1.65; color: var(--r-muted); margin: 0; max-width: 26em; }
.r-footer h2 {
    font-family: var(--r-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r-muted);
    margin: 4px 0 14px;
}
.r-footer ul { list-style: none; margin: 0; padding: 0; }
.r-footer li { margin-bottom: 9px; font-size: 0.9rem; line-height: 1.5; }
.r-footer a { color: var(--r-ink-2); text-decoration: none; }
.r-footer a:hover { color: var(--r-ink); text-decoration: underline; text-underline-offset: 3px; }
.r-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--r-line);
    font-size: 0.78rem;
    color: var(--r-muted);
}
@media (max-width: 860px) {
    .r-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r-footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---------- cookie notice ---------- */

.cookie-banner {
    position: fixed;
    left: 20px;
    right: auto;
    bottom: 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    background: var(--r-surface);
    color: var(--r-ink-2);
    border: 1px solid var(--r-line-strong);
    border-radius: var(--r-radius);
    padding: 14px 16px;
    z-index: 1000;
    display: none;
}
.cookie-banner p { margin: 0; }
.cookie-banner .cb-text { font-size: 0.8rem; line-height: 1.5; color: var(--r-ink-2); }
.cookie-banner .cb-text a { color: var(--r-ink); font-weight: 500; }
.cookie-banner .cb-actions { flex-shrink: 0; }
.cookie-banner .cb-btn {
    font-family: var(--r-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: var(--r-radius);
    border: 1px solid var(--r-ink);
    background: var(--r-ink);
    color: var(--r-on-ink);
    cursor: pointer;
}

/* ---------- legacy article pages: bring them onto the new canvas ---------- */

.blog-header,
.blog-content,
.error-section { background: transparent; }
.blog-header { border-bottom: 1px solid var(--r-line); }
.blog-header h1 { font-weight: 500; letter-spacing: -0.02em; }
.error-section { padding: 120px 0 !important; }
.error-section h1 { font-family: var(--r-mono); font-weight: 500; font-size: 3rem; }
.error-section .btn-primary {
    background: var(--r-ink);
    border-color: var(--r-ink);
    color: var(--r-on-ink);
    border-radius: var(--r-radius);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

@media print {
    .r-header, .r-footer, .cookie-banner { display: none !important; }
}

/* ---------- client logo inside a cell ---------- */

.r-cell-logo {
    display: inline-flex;
    align-items: center;
    height: 54px;
    padding: 10px 14px;
    margin-bottom: 22px;
    background: var(--r-chip);
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
}
.r-cell-logo img { max-height: 100%; max-width: 150px; object-fit: contain; filter: grayscale(1); }

/* ---------- method diagrams (ported engine assets) ----------
   The SVGs carry hard-coded light fills, so the panel stays light in both
   themes, the way a figure does in a paper. */

.r-diagram {
    margin: 0;
    background: #ffffff;
    color: #0e1513;
    border: 1px solid var(--r-line-strong);
    border-radius: 6px;
    padding: 26px 26px 22px;
}
.r-diagram-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 18px;
}
.r-diagram-title {
    font-family: var(--r-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #68736f;
    margin: 0;
}
.r-diagram figcaption {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #68736f;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dfe3e0;
}
.r-toggle { display: inline-flex; border: 1px solid #c3cac6; border-radius: 3px; overflow: hidden; }
.r-toggle button {
    font-family: var(--r-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 14px;
    border: 0;
    background: #ffffff;
    color: #68736f;
    cursor: pointer;
}
.r-toggle button.active { background: #0e1513; color: #ffffff; }

.r-loop { overflow-x: auto; }
.r-loop svg { min-width: 760px; }
.r-loop .path-yes, .r-loop .label-yes, .r-loop .box-yes, .r-loop .text-yes,
.r-loop .path-no, .r-loop .label-no { transition: opacity 0.25s ease, stroke 0.25s ease, fill 0.25s ease; }
.r-loop[data-mode="drift"] .path-yes,
.r-loop[data-mode="drift"] .label-yes,
.r-loop[data-mode="drift"] .box-yes,
.r-loop[data-mode="drift"] .text-yes { opacity: 0.18; }
.r-loop[data-mode="drift"] .path-no { stroke: #27ae60; stroke-dasharray: none; }
.r-loop[data-mode="drift"] .label-no { fill: #27ae60; }
.r-loop[data-mode="drift"] .np-rebal { display: none; }
.r-loop[data-mode="drift"] .np-drift { display: block !important; }

.r-venn { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto; }
.r-zone { cursor: pointer; }
.r-zone:focus { outline: none; }
.r-zone:focus-visible ellipse { stroke: #0e1513; stroke-width: 1.5; stroke-dasharray: 4 4; }
.r-shape { transition: fill-opacity 0.25s ease; }
.r-venn.is-shared .r-shape[data-zone="shared"] { fill-opacity: 0.18; }
.r-venn.is-isolated .r-shape[data-zone="isolated"] { fill-opacity: 0.16; }
.r-venn.is-engine .r-shape[data-zone="engine"] { fill-opacity: 0.30; }
.r-venn-detail { max-width: 600px; margin: 10px auto 0; min-height: 104px; text-align: center; }
.r-venn-hint { color: #8a9690; font-size: 0.86rem; margin: 0; padding-top: 28px; }
.r-venn-card-tag { font-family: var(--r-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; color: #27ae60; }
.r-venn-card[data-detail="isolated"] .r-venn-card-tag { color: #1a3a6e; }
.r-venn-card[data-detail="engine"] .r-venn-card-tag { color: #0a4a40; }
.r-venn-card-name { font-size: 1.02rem; font-weight: 600; color: #0e1513; margin: 6px 0 6px; }
.r-venn-card-desc { color: #3a4541; font-size: 0.9rem; line-height: 1.55; margin: 0 auto; max-width: 520px; }

.r-stack > * + * { margin-top: 28px; }

.r-cell .r-eyebrow { font-size: 0.72rem; line-height: 1.5; color: var(--r-muted); }
.r-cell .r-eyebrow--accent { color: var(--r-accent); }
.r-cell .r-cell-meta { font-size: 0.76rem; }

/* spacing utilities (the CSP forbids inline style attributes) */
.r-mt-s { margin-top: 24px !important; }
.r-mt-l { margin-top: 68px !important; }
.r-mt-xl { margin-top: 84px !important; }
.r-mb-s { margin-bottom: 28px !important; }
.r-mb-m { margin-bottom: 52px !important; }

.r-loop svg { width: 100%; height: auto; display: block; font-family: var(--r-sans); }
.r-loop .np-drift { display: none; }

.r-figure-value { overflow-wrap: break-word; hyphens: auto; }

/* ==========================================================================
   Particle field (kept from the previous site). The canvas is fixed behind
   everything, so <body> stays transparent and <html> carries the page colour.
   Tinted sections are slightly translucent so the field reads through them;
   cards, the header and figures stay opaque for legibility.
   ========================================================================== */

#particles-js {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
body,
html[data-theme="dark"] body { background: transparent; }
:root { --r-bg-alt-a: rgba(245, 246, 244, 0.78); }
[data-theme="dark"] { --r-bg-alt-a: rgba(19, 27, 24, 0.78); }
.r-section--alt { background: var(--r-bg-alt-a); }
.r-footer { background: transparent; }

/* ---------- products dropdown in the header ---------- */

.r-has-menu { position: relative; }
.r-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -18px;
    min-width: 290px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--r-bg);
    border: 1px solid var(--r-line-strong);
    border-radius: var(--r-radius);
    z-index: 950;
}
.r-has-menu:hover .r-menu,
.r-has-menu:focus-within .r-menu { display: block; }
.r-nav-links .r-menu a {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: baseline;
    gap: 6px;
    padding: 10px 10px;
    border-bottom: 0;
    font-size: 0.92rem;
    color: var(--r-ink);
}
.r-nav-links .r-menu a:hover { background: var(--r-bg-alt); border-bottom: 0; }
.r-menu span { font-family: var(--r-mono); font-size: 0.72rem; color: var(--r-muted); }
.r-menu small {
    font-family: var(--r-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-accent);
}
@media (max-width: 960px) {
    .r-menu { display: block; position: static; border: 0; padding: 0 0 6px 14px; min-width: 0; }
    .r-nav-links .r-menu a { padding: 9px 0; font-size: 0.92rem; }
}

/* ---------- sticky in-page navigation ---------- */

.r-pagenav {
    position: sticky;
    top: 69px;
    z-index: 800;
    background: var(--r-bg);
    border-top: 1px solid var(--r-line);
    border-bottom: 1px solid var(--r-line);
}
.r-pagenav .r-container {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}
.r-pagenav .r-container::-webkit-scrollbar { display: none; }
.r-pagenav a {
    flex: 0 0 auto;
    font-family: var(--r-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-muted);
    text-decoration: none;
    padding: 15px 0 13px;
    border-bottom: 2px solid transparent;
}
.r-pagenav a span { color: var(--r-accent); }
.r-pagenav a:hover { color: var(--r-ink); }
.r-pagenav a.is-active { color: var(--r-ink); border-bottom-color: var(--r-ink); }
.r-pagenav + .r-section { border-top: 0; }
.r-pagenav-sub { opacity: 0.8; }
main [id] { scroll-margin-top: 132px; }
.r-hero--page { padding-bottom: 56px; }

.r-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.r-chips a {
    display: inline-block;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--r-ink-2);
    text-decoration: none;
    padding: 7px 13px;
    border: 1px solid var(--r-line-strong);
    border-radius: var(--r-radius);
    background: var(--r-surface);
}
.r-chips a:hover { color: var(--r-ink); border-color: var(--r-ink); }

.r-cap-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--r-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.r-cap-more::after { content: " \2192"; }
.r-cap-more:hover { color: var(--r-accent); border-bottom-color: var(--r-accent); }

/* ==========================================================================
   Articles: one design for every long-form page (/blog/<post>, /techblog).
   The templates differ in markup (Bootstrap utilities, .blog-content vs
   .blog-body), so the standard is imposed here on the shared article.blog-post
   wrapper instead of in ten separate templates.
   ========================================================================== */

.breadcrumb {
    font-family: var(--r-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
    --bs-breadcrumb-divider-color: var(--r-line-strong);
}
.breadcrumb a { color: var(--r-muted) !important; text-decoration: none; }
.breadcrumb a:hover { color: var(--r-ink) !important; }
.breadcrumb-item.active { color: var(--r-ink-2) !important; }

article.blog-post {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--r-ink-2);
}
article.blog-post > header { border-bottom: 1px solid var(--r-ink); padding-bottom: 6px; margin-bottom: 40px !important; }
article.blog-post .badge {
    background: transparent !important;
    color: var(--r-accent) !important;
    border: 1px solid var(--r-accent);
    border-radius: var(--r-radius);
    font-family: var(--r-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 9px;
}
article.blog-post header small,
article.blog-post header .text-muted.small { font-family: var(--r-mono); font-size: 0.72rem; letter-spacing: 0.04em; }
article.blog-post h1,
.blog-header h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem) !important;
    font-weight: 500 !important;
    line-height: 1.14;
    letter-spacing: -0.022em;
    color: var(--r-ink) !important;
    text-transform: none;
    text-wrap: balance;
}
article.blog-post header h2 {
    font-size: 1.15rem !important;
    font-weight: 400 !important;
    line-height: 1.55;
    letter-spacing: 0;
    color: var(--r-ink-2) !important;
    border: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
}
article.blog-post .author-info { border-bottom: 0; padding-bottom: 0; }
article.blog-post .author-info p { font-size: 0.86rem !important; color: var(--r-muted) !important; margin-bottom: 4px; }

article.blog-post h2 {
    font-size: 1.45rem !important;
    font-weight: 500 !important;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--r-ink) !important;
    margin-top: 3.2rem !important;
    margin-bottom: 1.1rem !important;
    padding-top: 1.6rem;
    border-top: 1px solid var(--r-line);
}
article.blog-post h3 {
    font-size: 1.12rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    color: var(--r-ink) !important;
    margin-top: 2rem !important;
    margin-bottom: 0.8rem !important;
}
article.blog-post h4,
article.blog-post h5 { font-size: 1rem !important; font-weight: 600 !important; color: var(--r-ink) !important; }
article.blog-post p,
article.blog-post li {
    font-size: 1.02rem !important;
    line-height: 1.75 !important;
    color: var(--r-ink-2) !important;
}
article.blog-post .lead { font-size: 1.14rem !important; line-height: 1.65 !important; color: var(--r-ink) !important; }
article.blog-post strong, article.blog-post b { color: var(--r-ink) !important; font-weight: 600; }
article.blog-post a {
    color: var(--r-ink) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--r-line-strong) !important;
    text-underline-offset: 3px;
}
article.blog-post a:hover { color: var(--r-accent) !important; text-decoration-color: var(--r-accent) !important; }
article.blog-post a.citation { color: var(--r-accent) !important; text-decoration: none !important; font-size: 0.86em; }

article.blog-post figure { margin: 2.4rem 0 !important; }
article.blog-post figure img,
article.blog-post .chart-wrapper {
    background: #ffffff;
    border: 1px solid var(--r-line-strong);
    border-radius: 6px;
}
article.blog-post figure img { padding: 12px; max-width: 100%; height: auto; }
article.blog-post figcaption,
article.blog-post .figure-caption {
    font-size: 0.84rem !important;
    line-height: 1.6;
    color: var(--r-muted) !important;
    text-align: left;
    margin-top: 12px !important;
}
article.blog-post .math-block,
article.blog-post .eq-row { background: transparent !important; color: var(--r-ink); }
article.blog-post .math-block { overflow-x: auto; padding: 0.6rem 0; margin: 1.2rem 0; }
article.blog-post .eqn { font-family: var(--r-mono); font-size: 0.78rem; color: var(--r-muted) !important; }

article.blog-post table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--r-ink-2);
    --bs-table-border-color: var(--r-line);
    font-size: 0.9rem;
    color: var(--r-ink-2);
    border-color: var(--r-line);
}
article.blog-post thead th {
    font-family: var(--r-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-muted) !important;
    border-bottom: 1px solid var(--r-ink) !important;
    background: transparent !important;
}
article.blog-post td { font-variant-numeric: tabular-nums; }

article.blog-post .alert,
article.blog-post .coming-soon,
article.blog-post .bg-light {
    background: var(--r-surface) !important;
    color: var(--r-ink-2) !important;
    border: 1px solid var(--r-line) !important;
    border-left: 2px solid var(--r-accent) !important;
    border-radius: var(--r-radius) !important;
    padding: 18px 20px;
}
article.blog-post .alert-heading,
article.blog-post .alert h5 { font-size: 0.98rem !important; margin-top: 0 !important; }
article.blog-post .btn {
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--r-radius);
    border: 1px solid var(--r-line-strong) !important;
    background: transparent !important;
    color: var(--r-ink) !important;
    text-decoration: none !important;
    padding: 10px 16px;
}
article.blog-post .btn:hover { border-color: var(--r-ink) !important; }
article.blog-post .references,
article.blog-post .footnotes { border-top: 1px solid var(--r-ink); padding-top: 8px; }
article.blog-post .references p,
article.blog-post .references li,
article.blog-post .footnotes p,
article.blog-post .footnotes li { font-size: 0.86rem !important; line-height: 1.6 !important; color: var(--r-muted) !important; }
article.blog-post .text-muted { color: var(--r-muted) !important; }
article.blog-post .border-top { border-top-color: var(--r-line) !important; }

/* /techblog uses a banner header and a full-width container: bring it onto the same measure */
.blog-header { padding: 72px 0 40px !important; border-bottom: 0; }
.blog-header .container,
.blog-content > .container { max-width: 800px; }
.blog-header .lead { font-size: 1.1rem; color: var(--r-ink-2); }
section.blog-content { padding-top: 0 !important; }
section.blog-content article.blog-post > h2:first-child { margin-top: 0 !important; }

/* article leftovers: same measure as the breadcrumb, and the full-width
   interactive chart bands that sit outside <article> in the Green Fees posts */
article.blog-post { max-width: none !important; margin: 0 !important; }
main > .container-fluid.py-5 {
    background: var(--r-bg-alt-a) !important;
    border-top: 1px solid var(--r-line);
    border-bottom: 1px solid var(--r-line);
}
main > .container-fluid h3,
main > .container-fluid h3.text-primary {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    color: var(--r-ink) !important;
    letter-spacing: -0.01em;
}
main > .container-fluid h3 svg { display: none; }
main > .container-fluid .lead { font-size: 0.92rem !important; color: var(--r-muted) !important; }
.chart-wrapper {
    background: #ffffff !important;
    border: 1px solid var(--r-line-strong) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Revision: colour back in, less scrolling, tabs
   ========================================================================== */

:root { --r-accent: #0b6e4c; --r-accent-soft: #e4f1ea; }
[data-theme="dark"] { --r-accent: #7fd6a6; --r-accent-soft: #173327; }

/* colour: logos and portraits as they are, accent on actions and figures */
.r-logos img, .r-cell-logo img, .r-person-photo { filter: none; opacity: 1; }
.r-btn { background: var(--r-accent); border-color: var(--r-accent); }
.r-btn:hover { background: var(--r-ink); border-color: var(--r-ink); }
.r-btn--ghost, .r-btn--ghost:hover { background: transparent; }
.r-btn--ghost { border-color: var(--r-line-strong); }
.r-btn--ghost:hover { border-color: var(--r-accent); color: var(--r-accent); }
.r-eyebrow { color: var(--r-accent); }
.r-accent { color: var(--r-accent); }
.r-figure-value { color: var(--r-accent); }
.r-figures { border-top-color: var(--r-accent); }
.r-link { color: var(--r-accent); }

/* spacing: shorter pages */
.r-section { padding: 68px 0; }
.r-section--tight { padding: 0 0 56px; }
.r-hero--page { padding: 60px 0 40px; }
.r-section-head { margin-bottom: 32px; }
@media (max-width: 860px) {
    .r-section { padding: 48px 0; }
    .r-hero--page { padding: 44px 0 30px; }
}

/* home */
.r-hero--home { padding: 128px 0 84px; }
.r-h1--xl { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.04; letter-spacing: -0.035em; }
.r-hero--home .r-lede { max-width: 34em; }
@media (max-width: 860px) { .r-hero--home { padding: 72px 0 56px; } }

.r-figures a { display: block; color: inherit; text-decoration: none; }
.r-figures a:hover .r-figure-label { color: var(--r-ink); }
.r-figure-value { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }

.r-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--r-line-strong);
}
.r-row-head .r-eyebrow { margin: 0; }
.r-row-head .r-link { font-size: 0.9rem; }

.r-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.r-card {
    display: block;
    padding: 26px 26px 28px;
    background: var(--r-surface);
    border: 1px solid var(--r-line);
    border-top: 2px solid var(--r-accent);
    border-radius: var(--r-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.r-card:hover { border-color: var(--r-accent); color: inherit; }
.r-card-kind {
    display: block;
    font-family: var(--r-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--r-accent);
    margin-bottom: 30px;
}
.r-card-name { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; color: var(--r-ink); margin: 0 0 8px; }
.r-card p { font-size: 0.95rem; line-height: 1.55; color: var(--r-ink-2); margin: 0; }
.r-card-name::after { content: " \2192"; color: var(--r-accent); opacity: 0; transition: opacity 0.15s ease; }
.r-card:hover .r-card-name::after { opacity: 1; }
@media (max-width: 860px) { .r-cards { grid-template-columns: 1fr; } }

.r-cta { align-items: center; }
.r-cta .r-h2 { margin: 0; }

/* tabs */
.is-tabbed [data-panel][hidden] { display: none !important; }
[data-tabs] { scroll-margin-top: 69px; }
.r-chips a[aria-selected="true"] { background: var(--r-accent); border-color: var(--r-accent); color: var(--r-on-ink); }
.r-section-head--tabs { max-width: none; margin-bottom: 26px; }
.is-tabbed .r-caps-group { border-top: 1px solid var(--r-line-strong); }
.r-pagenav a[aria-selected="true"] { color: var(--r-ink); border-bottom-color: var(--r-accent); }
.r-pagenav a.is-active { border-bottom-color: var(--r-accent); }
.r-tabs-page.is-tabbed .r-section { background: transparent; min-height: 46vh; }
.r-row-head + .r-index { border-top: 0; }
.r-row-head + .r-index > li:first-child .r-entry { padding-top: 6px; }

/* home, second revision: the original RAIIS opening (centred wordmark and tagline) */
.r-hero--home {
    display: flex;
    align-items: center;
    text-align: center;
    min-height: min(calc(100vh - 69px), 720px);
    padding: 72px 0;
}
.r-wordmark {
    font-family: 'Montserrat', var(--r-sans);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--r-ink);
    margin: 0 0 22px;
}
.r-tagline {
    font-family: 'Montserrat', var(--r-sans);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 400;
    color: var(--r-ink);
    margin: 0;
}
.r-brand { font-family: 'Montserrat', var(--r-sans); }
.r-statement { padding-top: 0; border-top: 0; }
.r-statement .r-container { max-width: 800px; text-align: center; }
.r-statement .r-lede { max-width: none; margin-left: auto; margin-right: auto; }
.r-statement .r-lede + .r-lede { margin-top: 18px; color: var(--r-ink); font-weight: 500; }

.r-card-mark { float: right; margin-top: -8px; border-radius: 6px; }
.r-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.r-steps li { text-align: center; padding: 30px 26px; background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--r-radius); }
.r-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--r-ink); color: var(--r-on-ink);
    font-size: 0.8rem; font-weight: 600; margin-bottom: 14px;
}
.r-step-num--on { background: var(--r-accent); }
.r-steps h3 { font-family: 'Montserrat', var(--r-sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-ink); margin: 0 0 10px; }
.r-steps p { font-size: 0.93rem; line-height: 1.6; color: var(--r-ink-2); margin: 0; }
@media (max-width: 860px) { .r-steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion: restrained, and off entirely for reduced-motion visitors
   ========================================================================== */

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }

.r-header {
    background: color-mix(in srgb, var(--r-bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.r-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(0, 0, 0, 0.45); }

/* cards */
.r-card, .r-steps li {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.25s ease;
}
.r-card::before, .r-steps li::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--r-accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.r-card > *, .r-steps li > * { position: relative; }
.r-card:hover, .r-steps li:hover {
    transform: translateY(-5px);
    border-color: var(--r-accent);
    box-shadow: 0 22px 44px -30px rgba(11, 110, 76, 0.55);
}
.r-card:hover::before, .r-steps li:hover::before { opacity: 1; }
.r-card { padding-bottom: 24px; }
.r-card p { min-height: 3.1em; }
.r-card-name::after { content: none; }
.r-card-go {
    display: inline-block;
    margin-top: 22px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--r-accent);
}
.r-card-go::after { content: "\2192"; display: inline-block; margin-left: 8px; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.r-card:hover .r-card-go::after { transform: translateX(6px); }
.r-card-mark { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.r-card:hover .r-card-mark { transform: none; }

.r-step-num { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.25s ease; }
.r-steps li:hover .r-step-num { transform: scale(1.14); background: var(--r-accent); }

.r-link::after, .r-entry-go { transition: transform 0.25s ease; }
a.r-entry:hover .r-entry-go { transform: translateX(4px); color: var(--r-accent); }
.r-logos li { transition: transform 0.3s ease, border-color 0.25s ease; }
.r-logos li:hover { transform: translateY(-3px); border-color: var(--r-line-strong); }
.r-grid .r-cell { transition: background-color 0.3s ease; }
.r-btn { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.r-btn:active { transform: scale(0.97); }

/* home opening */
.r-hero--home { position: relative; min-height: min(calc(100vh - 69px), 780px); }
.r-hero--home .r-container { width: 100%; }
.r-wordmark { font-size: clamp(3.4rem, 9vw, 6.4rem); letter-spacing: 0.03em; }
.r-scrollcue {
    display: block;
    width: 26px;
    height: 42px;
    margin: 64px auto 0;
    border: 1px solid var(--r-line-strong);
    border-radius: 14px;
    position: relative;
}
.r-scrollcue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--r-accent);
}
.r-scrollcue:hover { border-color: var(--r-accent); }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .r-wordmark { animation: r-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .r-tagline { animation: r-rise 0.9s 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .r-tagline .r-accent { display: inline-block; animation: r-rise 0.8s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .r-scrollcue { animation: r-fade 0.8s 1.3s both; }
    .r-scrollcue span { animation: r-cue 1.8s 1.6s ease-in-out infinite; }
    .r-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.25s ease; }
    .r-reveal.is-in { opacity: 1; transform: none; }
    .r-card.r-reveal.is-in:hover, .r-steps li.r-reveal.is-in:hover { transform: translateY(-5px); transition-delay: 0s !important; }
}
@keyframes r-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes r-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes r-cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .r-card, .r-steps li, .r-logos li { transition: none; }
}

/* home: pulsing mark under the tagline, statement, client rows */
.r-pulse {
    position: relative;
    display: block;
    width: 56px;
    height: 56px;
    margin: 60px auto 0;
    border-radius: 12px;
}
.r-pulse img { display: block; width: 100%; height: 100%; border-radius: 12px; position: relative; }
.r-pulse::before, .r-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid var(--r-accent);
    opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .r-pulse { animation: r-fade 0.8s 1.2s both; }
    .r-pulse img { animation: r-breathe 3.2s 1.6s ease-in-out infinite; }
    .r-pulse::before { animation: r-ring 3.2s 1.6s ease-out infinite; }
    .r-pulse::after { animation: r-ring 3.2s 2.4s ease-out infinite; }
}
@keyframes r-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes r-ring { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }

.r-statement-main {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--r-ink);
    margin: 0 0 18px;
    text-wrap: balance;
}
.r-statement-sub { font-size: 1.05rem; line-height: 1.6; color: var(--r-ink-2); margin: 0 0 26px; }
.r-statement-proof {
    display: inline-block;
    font-family: var(--r-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-accent);
    padding: 9px 16px;
    border: 1px solid var(--r-accent);
    border-radius: 100px;
    margin: 0;
}

.r-clients { list-style: none; margin: 0; padding: 0; }
.r-clients li {
    display: grid;
    grid-template-columns: 150px minmax(0, 4fr) minmax(0, 5fr);
    gap: 32px;
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--r-line);
}
.r-clients li:first-child { padding-top: 6px; }
.r-client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    padding: 12px 18px;
    background: var(--r-chip);
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    transition: border-color 0.25s ease, transform 0.3s ease;
}
.r-client-logo:hover { border-color: var(--r-accent); transform: translateY(-2px); }
.r-client-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.r-client-name { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; color: var(--r-ink); margin: 0 0 4px; }
.r-client-meta { font-size: 0.86rem; color: var(--r-muted); margin: 0; }
.r-client-work { font-size: 0.95rem; line-height: 1.6; color: var(--r-ink-2); margin: 0; }
@media (max-width: 860px) {
    .r-clients li { grid-template-columns: 1fr; gap: 14px; }
    .r-client-logo { width: 150px; }
}

/* home statement: plain proof line instead of a badge */
.r-statement-proof {
    display: block;
    font-family: var(--r-sans);
    font-size: 0.95rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--r-muted);
    padding: 0;
    border: 0;
    border-radius: 0;
}
.r-statement-sub { max-width: 40em; margin-left: auto; margin-right: auto; margin-bottom: 18px; }

/* method: the card pipeline from the original product page */
.r-ca-pipeline { max-width: 940px; margin: 0 auto; }
.r-ca-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.r-ca-divider { display: flex; align-items: center; gap: 20px; max-width: 520px; margin: 26px auto 22px; }
.r-ca-divider::before, .r-ca-divider::after { content: ""; flex: 1; height: 1px; }
.r-ca-divider--engine::before { background: linear-gradient(90deg, transparent, var(--r-accent)); }
.r-ca-divider--engine::after { background: linear-gradient(90deg, var(--r-accent), transparent); }
.r-ca-divider--output::before { background: linear-gradient(90deg, transparent, var(--r-line-strong)); }
.r-ca-divider--output::after { background: linear-gradient(90deg, var(--r-line-strong), transparent); }
.r-ca-divider span { font-family: var(--r-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; color: var(--r-ink); }
.r-ca-divider--engine span { color: var(--r-accent); }
.r-ca-card {
    position: relative;
    overflow: hidden;
    background: var(--r-surface);
    border: 1px solid var(--r-line);
    border-radius: 12px;
    padding: 26px 24px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.45s ease, border-color 0.3s ease;
}
.r-ca-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), var(--r-accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.r-ca-card > * { position: relative; }
.r-ca-card:hover { transform: translateY(-4px); border-color: var(--r-accent); box-shadow: 0 18px 36px -28px rgba(11, 110, 76, 0.5); }
.r-ca-card:hover::before { opacity: 1; }
.r-ca-ico {
    width: 38px; height: 38px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    background: var(--r-bg-alt); color: var(--r-ink);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s ease, color 0.3s ease;
}
.r-ca-card--engine .r-ca-ico { background: var(--r-accent-soft); color: var(--r-accent); }
.r-ca-card:hover .r-ca-ico { transform: scale(1.06); background: var(--r-accent); color: var(--r-on-ink); }
.r-ca-ico svg { width: 18px; height: 18px; stroke-width: 1.6; }
.r-ca-meta { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; }
.r-ca-num { font-family: var(--r-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--r-muted); }
.r-ca-name { font-size: 1rem; font-weight: 600; color: var(--r-ink); margin: 0; }
.r-ca-desc { font-size: 0.88rem; line-height: 1.6; color: var(--r-ink-2); margin: 0; }
@media (max-width: 860px) { .r-ca-row { grid-template-columns: 1fr; } }

#method .r-grid .r-cell { transition: background-color 0.3s ease, transform 0.35s ease; }
#method .r-grid .r-cell:hover { background: var(--r-accent-soft); }
#method .r-flow-box { transition: transform 0.3s ease, border-color 0.25s ease; }
#method .r-flow-box:hover { transform: translateY(-2px); border-color: var(--r-accent); }
.r-venn-card { animation: r-fade 0.25s ease; }
.r-venn .r-zone { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
    .r-loop:not([data-mode="drift"]) .path-yes { stroke-dasharray: 7 5; animation: r-march 0.9s linear infinite; }
    .r-loop[data-mode="drift"] .path-no { stroke-dasharray: 7 5 !important; animation: r-march 0.9s linear infinite; }
    .r-ca-card.r-reveal.is-in:hover { transform: translateY(-4px); transition-delay: 0s !important; }
}
@keyframes r-march { to { stroke-dashoffset: -12; } }
.r-statement-text {
    font-size: clamp(1.15rem, 1.9vw, 1.4rem);
    line-height: 1.55;
    letter-spacing: -0.005em;
    color: var(--r-ink);
    margin: 0;
    text-wrap: pretty;
}

/* architecture diagram, redrawn: four equal panels with listed rows, core tinted */
.r-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
.r-flow-col {
    gap: 0;
    padding: 20px 20px 10px;
    background: var(--r-surface);
    border: 1px solid var(--r-line);
    border-radius: 10px;
}
.r-flow-col > .r-flow-label { color: var(--r-accent); margin: 0 0 8px; }
.r-flow-col .r-flow-box,
#method .r-flow-col .r-flow-box {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--r-line);
    border-radius: 0;
    padding: 13px 0;
    transform: none;
}
.r-flow-col .r-flow-box li { border-top: 0; padding: 3px 0; }
.r-flow-col .r-flow-box ul { margin-top: 4px; }
.r-flow-col:has(.r-flow-box--core) { background: var(--r-accent-soft); border-color: var(--r-accent); }
.r-flow-col .r-flow-box--core { display: block; background: transparent; color: inherit; }
.r-flow-col .r-flow-box--core strong { color: var(--r-ink); font-size: 1.02rem; line-height: 1.35; margin-bottom: 8px; }
.r-flow-col .r-flow-box--core li { color: var(--r-ink-2); opacity: 1; border-color: transparent; }
.r-flow-col + .r-flow-col::before { left: -27px; top: 50%; transform: translateY(-50%); font-size: 1.1rem; }
.r-flow-base { margin-top: 20px; border-radius: 10px; }
#method .r-flow-col { transition: border-color 0.25s ease, transform 0.3s ease; }
#method .r-flow-col:hover { border-color: var(--r-accent); transform: translateY(-3px); }
@media (max-width: 960px) { .r-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } .r-flow-col + .r-flow-col::before { content: none; } }
@media (max-width: 620px) { .r-flow { grid-template-columns: 1fr; } }

/* method: four views behind one chip bar */
.r-chips--bar { margin: 8px 0 30px; padding-bottom: 22px; border-bottom: 1px solid var(--r-line-strong); }
.r-chips a span { font-family: var(--r-mono); font-size: 0.7rem; color: var(--r-accent); margin-right: 6px; }
.r-chips a[aria-selected="true"] span { color: inherit; opacity: 0.75; }
.r-chips a { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.r-subhead { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.015em; color: var(--r-ink); margin: 0 0 24px; }
.r-subpanel .r-split-head .r-eyebrow { display: none; }
@media (prefers-reduced-motion: no-preference) { .r-subpanel:not([hidden]) { animation: r-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; } }
.r-subtabs, #functionality { scroll-margin-top: 136px; }
.r-tabs-page.is-tabbed .r-section { min-height: 0; }
.r-tabs-page.is-tabbed > [data-panel] { min-height: 40vh; }
#people > .r-section + .r-section { border-top: 0; padding-top: 0; }

/* Company: principles as one paragraph above the team */
.r-principles { max-width: 46em; margin: 0 0 56px; padding: 0 0 0 20px; border-left: 2px solid var(--r-accent); }
.r-principles .r-eyebrow { margin-bottom: 10px; }
.r-principles-text { font-size: 1.2rem; line-height: 1.55; color: var(--r-ink); margin: 0; }
@media (max-width: 640px) { .r-principles { margin-bottom: 40px; } .r-principles-text { font-size: 1.08rem; } }

/* Architecture diagram: sources -> engine -> modules, on one platform */
.r-arch { margin: 0; }
.r-arch-main { display: grid; grid-template-columns: 1fr 56px 1.35fr 56px 1fr; align-items: center; }
.r-arch-label { font-family: var(--r-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-muted); margin: 0 0 14px; }
.r-arch-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--r-line-strong); }
.r-arch-list li { padding: 13px 0; border-bottom: 1px solid var(--r-line); font-size: 0.98rem; font-weight: 500; color: var(--r-ink); }
.r-arch-arrow { position: relative; height: 1px; margin: 0 12px; background: var(--r-line-strong); }
.r-arch-arrow::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--r-ink-2); border-right: 1px solid var(--r-ink-2); transform: rotate(45deg); }
.r-arch-core { background: var(--r-accent-soft); border: 1px solid var(--r-accent); border-radius: var(--r-radius); padding: 26px 28px 10px; }
.r-arch-core .r-arch-label { color: var(--r-accent); margin-bottom: 6px; }
.r-arch-stage { display: grid; grid-template-columns: 34px 1fr; column-gap: 6px; row-gap: 3px; padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--r-accent) 25%, transparent); }
.r-arch-stage:first-of-type { border-top: 0; }
.r-arch-num { grid-row: 1 / span 2; font-family: var(--r-mono); font-size: 0.72rem; color: var(--r-accent); padding-top: 4px; }
.r-arch-stage strong { font-size: 1.02rem; font-weight: 600; color: var(--r-ink); }
.r-arch-stage > span:last-child { font-size: 0.9rem; color: var(--r-ink-2); }
.r-arch-loop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.r-arch-loop i { font-style: normal; }
.r-arch-loop i + i::before { content: "\2192"; margin: 0 9px; color: var(--r-accent); }
.r-arch-base { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--r-line-strong); font-size: 0.88rem; color: var(--r-ink-2); }
.r-arch-base .r-arch-label { margin: 0 8px 0 0; }
@media (max-width: 820px) {
    .r-arch-main { grid-template-columns: 1fr; }
    .r-arch-arrow { width: 1px; height: 32px; margin: 10px auto; }
    .r-arch-arrow::after { right: -4px; top: auto; bottom: 0; transform: rotate(135deg); }
}

/* Home statement: display line, capability strip, proof line */
.r-statement .r-container { max-width: 920px; }
.r-statement-lead { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; font-weight: 500; letter-spacing: -0.03em; color: var(--r-ink); margin: 0 0 28px; text-wrap: balance; }
.r-statement-caps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin: 0 0 28px; padding: 16px 0; border-top: 1px solid var(--r-line); border-bottom: 1px solid var(--r-line); font-family: var(--r-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r-accent); }
.r-statement-caps li + li::before { content: "/"; margin: 0 16px; color: var(--r-line-strong); }
.r-statement-text { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--r-ink-2); }
.r-statement-text b { color: var(--r-ink); font-weight: 600; }
@media (max-width: 640px) { .r-statement-caps { font-size: 0.7rem; letter-spacing: 0.1em; } .r-statement-caps li + li::before { margin: 0 9px; } }

/* Home statement: three-stage flow replacing the capability strip */
.r-statement .r-container { max-width: 1000px; }
.r-statement-flow { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 30px; padding: 0; border-top: 1px solid var(--r-line-strong); border-bottom: 1px solid var(--r-line); text-align: left; }
.r-statement-flow li { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 22px 28px 24px; }
.r-statement-flow li + li { border-left: 1px solid var(--r-line); }
.r-statement-flow li + li::before { content: "\2192"; position: absolute; left: -0.62em; top: 50%; transform: translateY(-50%); padding: 4px 0; background: var(--r-bg); color: var(--r-accent); font-size: 1.05rem; line-height: 1; }
.r-statement-flow span { font-family: var(--r-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--r-accent); }
.r-statement-flow strong { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; color: var(--r-ink); }
.r-statement-flow small { font-size: 0.9rem; line-height: 1.45; color: var(--r-ink-2); }
@media (max-width: 720px) {
    .r-statement-flow { grid-template-columns: 1fr; }
    .r-statement-flow li { padding: 16px 4px 18px; }
    .r-statement-flow li + li { border-left: 0; border-top: 1px solid var(--r-line); }
    .r-statement-flow li + li::before { content: none; }
}

/* Architecture: only stage 03 is the engine */
.r-arch-stage--engine { margin: 6px -14px 10px; padding: 16px 14px; border: 1px solid var(--r-accent); border-radius: var(--r-radius); background: var(--r-surface); }
.r-arch-stage--engine strong em { font-style: normal; font-weight: 400; color: var(--r-ink-2); }
.r-arch-stage--engine strong em::before { content: "\00b7"; margin: 0 7px 0 3px; color: var(--r-accent); }

/* Architecture: the engine as a component inside the system */
.r-arch-engine { margin: 4px -14px 16px; padding: 16px 16px 16px; border: 1px solid var(--r-accent); border-radius: var(--r-radius); background: var(--r-surface); }
.r-arch-engine .r-arch-label { margin-bottom: 8px; }
.r-arch-engine p:last-child { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--r-ink-2); }

/* Platform: three defining properties */
.r-keys .r-cell { border-top: 2px solid var(--r-accent); padding-top: 18px; }
.r-keys .r-cell .r-eyebrow { color: var(--r-accent); margin-bottom: 8px; }
.r-keys .r-h3 { margin-bottom: 8px; }

/* Company headline: accent second line, as on the home tagline */
.r-h1-line { display: block; }
.r-h1--wide { max-width: 22em; }

.r-principles-text + .r-principles-text { margin-top: 16px; }

/* Coming-soon product block (RAIIS MCP) */
.r-soon { margin-top: 44px; padding: 22px 24px 24px; border: 1px dashed var(--r-line-strong); border-radius: var(--r-radius); background: var(--r-surface); max-width: 46em; }
.r-soon-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.r-soon-head .r-h3 { margin: 0; }
.r-soon p { margin: 0 0 12px; color: var(--r-ink-2); }
.r-badge { font-family: var(--r-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-accent); background: var(--r-accent-soft); border-radius: 2px; padding: 3px 7px; }

.r-lede--next { margin-top: 14px; }

/* Sub-tabs look the same on every page */
.r-section-head--tabs { margin-bottom: 0; }
.r-section-head--tabs .r-chips--bar { margin-top: 22px; }

#functionality.is-tabbed .r-caps-group { border-top: 0; }

#functionality.is-tabbed .r-caps, #functionality.is-tabbed .r-caps-group { border-top: 0; }
#functionality .r-chips--bar { margin-bottom: 0; }

/* Home page: more air between sections */
.r-hero--home ~ .r-section { padding: 124px 0; }
.r-hero--home ~ .r-statement { padding: 24px 0 132px; }
.r-hero--home ~ .r-section .r-row-head { margin-bottom: 52px; }
.r-hero--home ~ .r-statement .r-statement-lead { margin-bottom: 44px; }
.r-hero--home ~ .r-statement .r-statement-flow { margin-bottom: 44px; }
@media (max-width: 860px) {
    .r-hero--home ~ .r-section { padding: 76px 0; }
    .r-hero--home ~ .r-statement { padding: 8px 0 80px; }
    .r-hero--home ~ .r-section .r-row-head { margin-bottom: 34px; }
}

/* Home hero: fills the first screen, as on the current live site */
.r-hero--home { min-height: calc(100vh - 69px); min-height: calc(100svh - 69px); padding: 72px 0 96px; }
.r-wordmark { font-size: clamp(3rem, 6.4vw, 5rem); }
.r-hero--home .r-tagline { margin-top: 6px; }

/* Page spacing matched to the current live site: wider frame, taller header, airy opening */
:root { --r-max: 1280px; --r-header-h: 69px; }
@media (min-width: 961px) {
    :root { --r-header-h: 93px; }
    .r-header-inner { min-height: 92px; }
    .r-header .r-brand { font-size: 1.3rem; }
    .r-nav-links > li > a { font-size: 1rem; }
    .r-nav-links { gap: 34px; }
}
.r-pagenav { top: var(--r-header-h); }
[data-tabs] { scroll-margin-top: var(--r-header-h); }
.r-subtabs, #functionality { scroll-margin-top: calc(var(--r-header-h) + 67px); }
.r-hero--home {
    min-height: calc(100vh - var(--r-header-h));
    min-height: calc(100svh - var(--r-header-h));
    padding: 72px 0 168px;
}
.r-wordmark { font-size: clamp(2.6rem, 4.6vw, 3.5rem); letter-spacing: 0.02em; margin-bottom: 24px; }
.r-hero--home .r-tagline {
    margin-top: 0;
    font-size: clamp(0.82rem, 1.25vw, 1.08rem);
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}
@media (max-width: 640px) {
    .r-hero--home { padding: 56px 0 120px; }
    .r-hero--home .r-tagline { letter-spacing: 0.16em; line-height: 1.9; }
}

/* Home opening: wordmark sits just above the middle of the screen, as on the live site */
.r-hero--home {
    align-items: flex-start;
    padding-top: max(56px, calc(47.5vh - var(--r-header-h) - 30px));
    padding-top: max(56px, calc(47.5svh - var(--r-header-h) - 30px));
    padding-bottom: 96px;
}

/* Header written as on the live site: light, untracked RAIIS mark and Montserrat menu */
.r-header .r-brand { font-weight: 400; letter-spacing: 0.01em; font-size: 1.55rem; }
.r-nav-links > li > a { font-family: 'Montserrat', var(--r-sans); font-weight: 500; }
@media (min-width: 961px) {
    .r-header .r-brand { font-size: 1.9rem; }
    .r-nav-links > li > a { font-size: 0.98rem; }
}

.r-hero--home {
    padding-top: max(48px, calc(43vh - var(--r-header-h) - 30px));
    padding-top: max(48px, calc(43svh - var(--r-header-h) - 30px));
}
.r-wordmark { font-size: clamp(2.3rem, 3.8vw, 2.9rem); margin-bottom: 22px; }

/* Header spans the full width: RAIIS at the far left, menu at the far right */
.r-header .r-header-inner { max-width: none; width: 100%; padding-left: clamp(20px, 5vw, 96px); padding-right: clamp(20px, 5vw, 96px); }
.r-hero--home {
    padding-top: max(40px, calc(37vh - var(--r-header-h) - 30px));
    padding-top: max(40px, calc(37svh - var(--r-header-h) - 30px));
}

/* ---------- phone layout fixes ---------- */
.r-swipe-hint { display: none; }
@media (max-width: 960px) {
    /* the open menu scrolls on its own, so everything down to Contact stays reachable */
    .r-nav {
        max-height: calc(100vh - var(--r-header-h));
        max-height: calc(100dvh - var(--r-header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
    }
    html.r-menu-open { overflow: hidden; }
    .r-menu-btn { min-width: 76px; text-align: center; }
    .r-nav-links > li > a { padding: 16px 0 10px; border-bottom: 0; font-size: 1.05rem; }
    .r-nav-links > li + li { border-top: 1px solid var(--r-line); margin-top: 4px; }
    .r-menu { padding: 0 0 10px 0; }
    .r-nav-links .r-menu a { grid-template-columns: 28px 1fr auto; padding: 10px 0; border-bottom: 0; }
    .r-nav-tools { gap: 16px 20px; padding-top: 18px; border-top: 1px solid var(--r-line); }
    .r-nav-tools .r-btn { margin-left: auto; }
}
/* tab bars that run off screen fade at the edge, so more tabs are visibly there */
.r-pagenav .r-container.r-fade-r { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.r-pagenav .r-container.r-fade-l { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
.r-pagenav .r-container.r-fade-l.r-fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
@media (max-width: 760px) {
    .r-swipe-hint { display: block; margin: 10px 0 0; font-family: var(--r-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-muted); }
    .r-arch-base { flex-direction: column; gap: 8px; }
    .r-arch-base .r-arch-label { margin: 0 0 4px; }
    .r-pagenav .r-container { gap: 22px; }
}
@media (max-width: 640px) {
    .r-h1, .r-h2 { overflow-wrap: break-word; }
    :lang(de) .r-h1, :lang(de) .r-h2 { -webkit-hyphens: auto; hyphens: auto; -webkit-hyphenate-limit-before: 6; -webkit-hyphenate-limit-after: 6; hyphenate-limit-chars: 15 6 6; }
}
