/* WorkMade Research: the index at /research, the overview, the field guide and every paper.
   The look borrows a research lab's conventions (cover grid, centred article header, sticky
   contents, charts in cards with their sources) in WorkMade's own type and colour. Each
   research area has a colour family; it shows in the cover art and in small swatches. */

.rs-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
[data-area] { --a1: #6a5ae6; --a2: #b9adff; --a3: #ffd3b4; --ag: #ece8ff; }
[data-area="history"] { --a1: #c48a48; --a2: #efd6a8; --a3: #a9bfcf; --ag: #f5ead8; }
[data-area="licensing"] { --a1: #2e6b50; --a2: #9fd0b1; --a3: #ead9a0; --ag: #e5f0e8; }
[data-area="systems"] { --a1: #2f63d2; --a2: #8fc4f3; --a3: #d6f2f1; --ag: #e4eefb; }
[data-area="trust"] { --a1: #ef9a68; --a2: #ffd8ac; --a3: #bbaaf3; --ag: #fbede3; }
[data-area="economics"] { --a1: #3f8f88; --a2: #f3dc8a; --a3: #bcd9b0; --ag: #eef3e6; }
[data-area="evaluation"] { --a1: #21857d; --a2: #a0e1d4; --a3: #8d7ef0; --ag: #e2f3ef; }
.rs-cov, .rs-hero-art, .rs-area-art { background: radial-gradient(120% 90% at 20% 10%, var(--a2), transparent 60%), radial-gradient(90% 90% at 90% 90%, var(--a3), transparent 60%), var(--ag); }

/* ---- index head ---- */
.rs-head { padding: clamp(116px, 13vw, 160px) 0 0; }
.rs-head h1 { font-size: clamp(48px, 6vw, 84px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.rs-head .lede { max-width: 620px; margin-top: 20px; }
.rs-head-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.rs-head-links a { height: 36px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: #f0f0f0; font-size: 14px; font-weight: 500; transition: background .2s; }
.rs-head-links a:hover { background: #e6e6e6; }
.rs-tabs { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-top: 56px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rs-tabs button { font-size: clamp(16px, 1.4vw, 19px); letter-spacing: -.02em; color: var(--faint); transition: color .2s; padding: 0; }
.rs-tabs button:hover { color: var(--ink2); }
.rs-tabs button.on { color: var(--ink); }
.rs-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0 38px; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-chips button { height: 32px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: #f2f2f2; font-size: 13.5px; font-weight: 500; color: var(--ink2); transition: background .2s, color .2s; }
.rs-chips button:hover { background: #e9e9e9; }
.rs-chips button.on { background: var(--ink); color: #fff; }
.rs-chips button i { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--a1), var(--a2) 60%, var(--a3)); }
.rs-view { display: flex; gap: 2px; flex: none; }
.rs-view button { width: 34px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); }
.rs-view button.on { color: var(--ink); background: #f2f2f2; }
.rs-view i { display: block; width: 14px; height: 14px; }
.rs-view i.g { background: radial-gradient(circle, currentColor 0 0) 0 0/6px 6px, radial-gradient(circle, currentColor 0 0) 8px 0/6px 6px, radial-gradient(circle, currentColor 0 0) 0 8px/6px 6px, radial-gradient(circle, currentColor 0 0) 8px 8px/6px 6px; background-repeat: no-repeat; border-radius: 2px; }
.rs-view i.l { background: linear-gradient(currentColor, currentColor) 0 1px/14px 2px, linear-gradient(currentColor, currentColor) 0 6px/14px 2px, linear-gradient(currentColor, currentColor) 0 11px/14px 2px; background-repeat: no-repeat; }
.rs-empty { padding: 40px 0; color: var(--muted); }

/* ---- cards ---- */
.rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 24px; }
.rs-card { display: block; }
.rs-card .rs-cov { aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.rs-card picture, .rs-card img, .rs-hero-art img, .rs-area-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rs-card img { transition: transform 1s var(--out); }
.rs-card:hover img { transform: scale(1.035); }
.rs-txt b { display: block; margin-top: 16px; font-size: 18px; font-weight: 500; letter-spacing: -.03em; line-height: 1.25; max-width: 30ch; }
.rs-txt small { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.rs-meta { display: flex; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.rs-meta span:first-child { color: var(--ink); font-weight: 500; }
.rs-card.big { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 36px; align-items: end; }
.rs-card.big .rs-cov { aspect-ratio: 2 / 1; }
.rs-card.big .rs-txt b { font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.05em; line-height: 1.04; margin-top: 0; }
.rs-card.big .rs-txt small { font-size: 16.5px; }
.rs-card[hidden], .rs-row[hidden] { display: none !important; }

/* ---- list view ---- */
.rs-rows { border-top: 1px solid var(--line); }
.rs-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 170px; gap: 24px; align-items: baseline; padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.rs-row .t { font-size: 14px; font-weight: 500; }
.rs-row .t em { display: block; font-style: normal; font-weight: 400; color: var(--muted); margin-top: 6px; }
.rs-row b { font-size: 19px; font-weight: 500; letter-spacing: -.03em; line-height: 1.25; transition: opacity .2s; }
.rs-row:hover b { opacity: .6; }
.rs-row b small { display: block; margin-top: 8px; font-size: 15px; font-weight: 400; letter-spacing: -.006em; line-height: 1.5; color: var(--muted); }
.rs-row .m { font-size: 13.5px; color: var(--muted); text-align: right; }

/* ---- sections on the index and overview ---- */
.rs-sec { padding: 120px 0 0; }
.rs-sec-h { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 34px; }
.rs-sec-h h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.06; letter-spacing: -.05em; font-weight: 500; max-width: 20ch; }
.rs-sec-h h2 span { color: var(--muted); }
.rs-beliefs { background: #f6f6f5; border-radius: 10px; padding: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rs-beliefs div { background: #fff; border-radius: 7px; padding: 22px 22px 26px; }
.rs-beliefs em { display: block; font-style: normal; font-size: 13px; color: var(--signal); margin-bottom: 30px; font-variant-numeric: tabular-nums; }
.rs-beliefs b { display: block; font-weight: 500; font-size: 18px; letter-spacing: -.03em; line-height: 1.25; }
.rs-beliefs p { margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.rs-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.rs-area { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rs-area-art { width: 76px; height: 76px; border-radius: 8px; overflow: hidden; }
.rs-area b { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.rs-area small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rs-area span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.rs-area:hover b { opacity: .6; }

/* ---- a paper ---- */
.rs-paper > header { max-width: 900px; margin: 0 auto; padding: clamp(116px, 13vw, 160px) var(--pad) 44px; text-align: center; }
.rs-pmeta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.rs-pmeta b { color: var(--ink); font-weight: 500; }
.rs-pmeta a:hover { color: var(--ink); }
.rs-paper > header h1 { margin: 22px auto 0; font-size: clamp(40px, 5.2vw, 74px); line-height: 1.03; letter-spacing: -.055em; font-weight: 500; max-width: 17ch; text-wrap: balance; }
.rs-paper > header .lede { max-width: 640px; margin: 22px auto 0; }
.rs-byline { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.rs-byline img { width: 22px; height: 22px; }
.rs-hero-art { max-width: calc(var(--max) - 2 * var(--pad)); margin: 0 auto; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; }
@media (max-width: 1240px) { .rs-hero-art { margin: 0 var(--pad); } }
.rs-layout { max-width: var(--max); margin: 0 auto; padding: 64px var(--pad) 40px; display: grid; grid-template-columns: 210px minmax(0, 700px) 210px; justify-content: space-between; gap: 40px; }
.rs-toc { position: sticky; top: 92px; align-self: start; font-size: 13.5px; }
.rs-toc span { display: block; color: var(--muted); margin-bottom: 12px; }
.rs-toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); color: var(--faint); line-height: 1.35; transition: color .2s, border-color .2s; }
.rs-toc a:hover { color: var(--ink2); }
.rs-toc a.on { color: var(--ink); border-color: var(--ink); }
.rs-side { position: sticky; top: 92px; align-self: start; display: grid; gap: 8px; justify-items: start; }
.rs-side button, .rs-side a { height: 32px; padding: 0 13px; display: inline-flex; align-items: center; border-radius: 999px; background: #f2f2f2; font-size: 13px; font-weight: 500; transition: background .2s; }
.rs-side button:hover, .rs-side a:hover { background: #e8e8e8; }
.rs-body p, .rs-body li { font-size: 18px; line-height: 1.7; color: var(--ink2); }
.rs-body p { margin-bottom: 20px; }
.rs-body p a, .rs-body li a { color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.rs-body p a:hover, .rs-body li a:hover { text-decoration-color: var(--ink); }
.rs-body h2 { font-size: clamp(25px, 2.5vw, 32px); line-height: 1.15; letter-spacing: -.04em; font-weight: 500; margin: 72px 0 20px; color: var(--ink); scroll-margin-top: 90px; }
.rs-body ul, .rs-body ol:not(.rs-src):not(.rs-ladder) { margin: 0 0 22px 22px; display: grid; gap: 8px; }
.rs-body b { font-weight: 500; color: var(--ink); }
.rs-tldr { margin: 0 0 44px; background: #f6f6f5; border-radius: 10px; padding: 24px 26px 8px; }
.rs-tldr span { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 12px; }
.rs-tldr ul { margin-left: 18px !important; }
.rs-tldr li { font-size: 16px !important; line-height: 1.55 !important; color: var(--ink) !important; }
.rs-quote { margin: 44px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--signal); }
.rs-quote p { font-size: clamp(23px, 2.4vw, 30px) !important; line-height: 1.25 !important; letter-spacing: -.04em; color: var(--ink) !important; font-weight: 500; margin: 0 !important; }
.rs-table { margin: 30px 0 34px; border-top: 1px solid var(--ink); }
.rs-table div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--ink2); }
.rs-table div.h { font-size: 13px; color: var(--muted); }
.rs-table div > :first-child { color: var(--ink); font-weight: 500; }
.rs-table div.h > :first-child { font-weight: 400; color: var(--muted); }
.rs-table.three div { grid-template-columns: 1.1fr 1fr 1fr; }
.rs-note { font-size: 14px !important; color: var(--muted) !important; }
.rs-sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.rs-sources > span, .rs-cite > span { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 12px; }
.rs-sources ol { margin-left: 18px !important; gap: 6px !important; }
.rs-sources li { font-size: 14px !important; line-height: 1.55 !important; color: var(--muted) !important; }
.rs-cite { margin-top: 36px; background: #f6f6f5; border-radius: 10px; padding: 20px 22px; }
.rs-cite p { font-size: 14px !important; line-height: 1.6 !important; margin: 0 0 14px !important; color: var(--ink2) !important; }
.rs-cite button { height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; }
.rs-more { padding: 90px 0 130px; margin-top: 40px; border-top: 1px solid var(--line); }
.rs-more-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 30px; }
.rs-more-h h2 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.045em; font-weight: 500; }

/* ---- charts and diagrams ---- */
.rs-chart { margin: 40px 0 44px; border: 1px solid #e7e7e7; border-radius: 14px; padding: 22px 24px 18px; background: #fff; }
.rs-chart header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rs-chart header b { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.rs-chart header small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.rs-chart-mark { flex: none; opacity: .9; }
.rs-plot svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.rs-chart-note { margin: 12px 0 0 !important; font-size: 13px !important; line-height: 1.5 !important; color: var(--muted) !important; }
.rs-chart footer { margin-top: 14px; }
.rs-src-btn { height: 30px; padding: 0 13px; border-radius: 999px; background: #f2f2f2; font-size: 12.5px; font-weight: 500; transition: background .2s; }
.rs-src-btn:hover { background: #e8e8e8; }
.rs-src { margin: 12px 0 0 18px !important; display: grid; gap: 4px; }
.rs-src li { font-size: 13px !important; line-height: 1.5 !important; color: var(--muted) !important; }
.rs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs-tiles div { background: #f6f6f5; border-radius: 10px; padding: 18px 18px 20px; }
.rs-tiles b { display: block; font-size: clamp(24px, 2.6vw, 34px); font-weight: 500; letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.rs-tiles small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.rs-ladder { list-style: none; margin: 0 !important; display: grid; gap: 8px; }
.rs-ladder li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border-radius: 10px; background: color-mix(in srgb, var(--signal) calc(var(--i) * 6% + 4%), #fff); margin-left: calc(var(--i) * 18px) !important; }
.rs-ladder em { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 13px; font-weight: 500; color: var(--signal); }
.rs-ladder b { display: block; font-size: 15px !important; font-weight: 500; color: var(--ink); }
.rs-ladder small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink2); }
.rs-stack3 { display: grid; gap: 8px; }
.rs-stack3 div { display: grid; grid-template-columns: 150px minmax(0, 1fr) 190px; gap: 16px; align-items: baseline; padding: 16px 18px; border-radius: 10px; background: #f6f6f5; }
.rs-stack3 div.hi { background: var(--signal); }
.rs-stack3 div.hi b, .rs-stack3 div.hi small, .rs-stack3 div.hi span { color: #fff; }
.rs-stack3 b { font-size: 15px; font-weight: 500; }
.rs-stack3 small { font-size: 13.5px; line-height: 1.45; color: var(--ink2); }
.rs-stack3 span { font-size: 12.5px; color: var(--muted); text-align: right; }

/* ---- overview and field guide ---- */
.rs-wide-art { max-width: calc(var(--max) - 2 * var(--pad)); margin: 0 auto; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; }
.rs-wide-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-agenda { counter-reset: q; border-top: 1px solid var(--line); }
.rs-agenda li { list-style: none; display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rs-agenda li::before { counter-increment: q; content: counter(q, decimal-leading-zero); font-size: 13px; color: var(--signal); padding-top: 4px; }
.rs-agenda b { font-size: 19px; font-weight: 500; letter-spacing: -.03em; line-height: 1.3; }
.rs-agenda p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.rs-agenda p a { color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 3px; }
.rs-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: #f6f6f5; border-radius: 10px; padding: 10px; }
.rs-rules div { background: #fff; border-radius: 7px; padding: 22px; }
.rs-rules b { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.rs-rules p { margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.rs-az { position: sticky; top: 60px; z-index: 5; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: flex; flex-wrap: wrap; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rs-az a { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink2); }
.rs-az a:hover { background: #f2f2f2; }
.rs-az input { margin-left: auto; height: 32px; width: min(260px, 100%); padding: 0 14px; border-radius: 999px; background: #f2f2f2; font-size: 14px; }
.rs-terms { margin-top: 10px; }
.rs-term { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 30px; padding: 26px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.rs-term h3 { font-size: 19px; font-weight: 500; letter-spacing: -.03em; line-height: 1.3; }
.rs-term h3 small { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.rs-term p { font-size: 16px; line-height: 1.65; color: var(--ink2); max-width: 680px; }
.rs-term p + p { margin-top: 10px; }
.rs-term p a { color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c9; text-underline-offset: 3px; }
.rs-term[hidden] { display: none; }
.rs-letter { padding-top: 40px; font-size: 13px; color: var(--signal); scroll-margin-top: 130px; }

@media (max-width: 1100px) {
  .rs-layout { grid-template-columns: minmax(0, 700px); justify-content: center; }
  .rs-toc, .rs-side { display: none; }
}
@media (max-width: 900px) {
  .rs-beliefs, .rs-rules { grid-template-columns: 1fr 1fr; }
  .rs-grid { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .rs-card.big { grid-template-columns: 1fr; gap: 20px; }
  .rs-areas { grid-template-columns: 1fr; }
  .rs-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rs-row .m { text-align: left; }
  .rs-bar { align-items: start; }
  .rs-stack3 div { grid-template-columns: 1fr; gap: 4px; }
  .rs-stack3 span { text-align: left; }
  .rs-agenda li { grid-template-columns: 40px minmax(0, 1fr); }
  .rs-agenda li p { grid-column: 2; }
  .rs-term { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 600px) {
  .rs-beliefs, .rs-rules, .rs-tiles { grid-template-columns: 1fr; }
  .rs-grid { grid-template-columns: 1fr; }
  .rs-view { display: none; }
  .rs-body p, .rs-body li { font-size: 17px; }
  .rs-table div, .rs-table.three div { grid-template-columns: 1fr; gap: 4px; }
  .rs-chart { padding: 18px 16px 14px; margin-left: -6px; margin-right: -6px; }
  .rs-ladder li { margin-left: 0 !important; }
  .rs-paper > header { text-align: left; }
  .rs-pmeta { justify-content: flex-start; }
  .rs-paper > header h1, .rs-paper > header .lede { margin-left: 0; }
  .rs-hero-art, .rs-wide-art { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { .rs-card img { transition: none; } }
/* `hidden` must win over the display rules above */
.rs-src[hidden], .rs-grid[hidden], .rs-rows[hidden], .rs-empty[hidden], .rs-letter[hidden], .rs-term[hidden] { display: none !important; }
