/*
 * Resources (blog): the /resources index and article pages.
 * Loaded only on those pages, and every rule is scoped under .rc-article,
 * so nothing here affects the rest of the site. Article rules follow the
 * resource-article reference template.
 */

.rc-article {
  --ink: #0B0F19; --signal: #3B82F6; --signal-hover: #2563EB; --signal-text: #2563EB; --on-signal: #FFFFFF;
  --bone: #F4F2ED; --paper: #FFFFFF; --stone: #5E6470; --mist: #A9B1C0; --line: #D9D5CC; --line-strong: #0B0F19;
  --f-sans: 'Geist', 'Helvetica Neue', Arial, sans-serif; --f-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --t-display: clamp(40px, 6vw, 96px); --t-h2: clamp(26px, 3vw, 44px); --t-h3: clamp(20px, 1.8vw, 28px); --t-lead: clamp(18px, 1.5vw, 23px);
  --gutter: clamp(20px, 4.5vw, 72px); --max: 1440px; --section: clamp(80px, 10vw, 160px); --ease: cubic-bezier(0.2, 0.7, 0, 1);
  font-family: var(--f-sans); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.rc-article * { box-sizing: border-box; }
.rc-article a, .rc-article a:hover { color: inherit; text-decoration: none; }
.rc-article img { max-width: 100%; }
.rc-wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.rc-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }
.rc-label--signal { color: var(--signal-text); }

/* ---------- Article header and cover ---------- */

.rc-head { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); display: flex; flex-direction: column; gap: 28px; }
.rc-back { font-size: 15px; align-self: flex-start; }
.rc-article .rc-back:hover { color: var(--signal-hover); }
.rc-title { margin: 0; font-weight: 400; font-size: var(--t-display); line-height: .98; letter-spacing: -.045em; max-width: 1200px; text-wrap: balance; }
.rc-sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; align-items: end; border-top: 1px solid var(--line-strong); padding-top: 28px; }
.rc-sub p { margin: 0; font-size: var(--t-lead); line-height: 1.4; max-width: 640px; }
.rc-sub .rc-label { justify-self: end; display: flex; gap: 24px; }
.rc-cover { margin: 0 auto; }
.rc-cover img { width: 100%; height: auto; aspect-ratio: 16/8; object-fit: cover; display: block; background: var(--bone); }
.rc-credit { margin: 10px 0 0; font-size: 13px; color: var(--stone); }
.rc-article .rc-credit a { border-bottom: 1px solid currentColor; }

/* ---------- Article body ---------- */

.rc-body { padding-top: clamp(56px, 7vw, 112px); padding-bottom: var(--section); display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 720px); gap: clamp(40px, 6vw, 120px); align-items: start; }
@media (max-width: 900px) { .rc-body { grid-template-columns: minmax(0, 1fr); } .rc-side { position: static !important; max-width: none !important; } }
@media (max-width: 359px) { .rc-cta-btns { grid-template-columns: 1fr; } }
.rc-side { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 32px; max-width: 320px; }
.rc-block { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; }
.rc-block.strong { border-color: var(--line-strong); }
.rc-toc-h { margin: 0; font-weight: 500; font-size: 30px; line-height: 1.1; letter-spacing: -.025em; }
.rc-toc { display: flex; flex-direction: column; gap: 4px; }
.rc-toc a { padding: 8px 10px; font-size: 15px; line-height: 1.4; }
.rc-article .rc-toc a:hover { color: var(--signal-hover); }
.rc-cta { background: var(--signal); color: var(--on-signal); padding: 28px 26px; border-radius: 8px; display: flex; flex-direction: column; gap: 20px; }
.rc-cta > span { font-size: 21px; line-height: 1.25; letter-spacing: -.015em; font-weight: 500; }
.rc-cta-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-cta-btns a { display: flex; align-items: center; justify-content: center; padding: 11px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: all 160ms; }
.rc-article .rc-cta-btns a:first-child { background: #fff; color: var(--ink); }
.rc-article .rc-cta-btns a:first-child:hover { background: var(--ink); color: #fff; }
.rc-article .rc-cta-btns a:last-child { border: 1px solid #fff; color: #fff; padding: 10px 8px; }
.rc-article .rc-cta-btns a:last-child:hover { background: #fff; color: var(--ink); }
.rc-strong { font-weight: 600; font-size: 15px; }
.rc-share { display: flex; gap: 10px; }
.rc-share a, .rc-share button { all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background: var(--bone); display: flex; align-items: center; justify-content: center; transition: background 160ms; }
.rc-share a:hover, .rc-share button:hover { background: var(--line); }
.rc-share a:focus-visible, .rc-share button:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.rc-sub-form { display: flex; align-items: center; gap: 6px; border: 1px solid var(--mist); border-radius: 999px; padding: 4px 4px 4px 16px; }
.rc-sub-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; border: 0; outline: none; background: transparent; color: var(--ink); padding: 8px 0; }
.rc-sub-form:focus-within { border-color: var(--ink); }
.rc-sub-form button { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: 14px; font-weight: 500; }
.rc-sub-form button:hover { background: var(--signal-hover); }
.rc-sub-form button:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.rc-sub-done { font-size: 15px; }
.rc-fine { font-size: 12px; color: var(--stone); }
.rc-article .rc-fine a { color: var(--ink); border-bottom: 1px solid currentColor; }
.rc-content { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.rc-sec { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 110px; }
.rc-sec h2 { margin: 0; font-weight: 400; font-size: var(--t-h2); line-height: 1.05; letter-spacing: -.03em; }
.rc-sec p { margin: 0; font-size: 19px; line-height: 1.65; color: #2A303C; text-wrap: pretty; }
.rc-sec ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rc-sec li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 1.5; color: #2A303C; }
.rc-sec li::before { content: '→'; color: var(--signal-text); font-family: var(--f-mono); font-size: 13px; padding-top: 4px; }
.rc-faq { padding: 20px 0; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 8px; }
.rc-faq h3 { margin: 0; font-weight: 500; font-size: 20px; }
.rc-faq p { font-size: 18px; line-height: 1.6; }
.rc-svc { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 32px; background: var(--bone); }
.rc-article .rc-svc:hover { color: var(--signal-hover); }
.rc-svc b { display: block; font-weight: 400; font-size: var(--t-h3); letter-spacing: -.02em; margin-top: 6px; }

/* ---------- Related and cards ---------- */

.rc-related { border-top: 1px solid var(--line); }
.rc-related .rc-wrap { padding-top: var(--section); padding-bottom: var(--section); display: flex; flex-direction: column; gap: 40px; }
.rc-rel-h { display: flex; align-items: flex-end; gap: 16px; }
.rc-rel-h h2 { margin: 0; font-weight: 600; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1; }
.rc-rel-h > span { flex: 1; height: 1px; background: var(--line-strong); margin-bottom: 5px; }
.rc-rel-h a { font-size: 15px; }
.rc-article .rc-rel-h a:hover { color: var(--signal-hover); }
.rc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px clamp(24px, 3vw, 40px); }
/* The card link wraps image, label, and title; the photo credit sits outside it (links cannot nest). */
.rc-card { display: flex; flex-direction: column; gap: 14px; }
.rc-card-link { display: flex; flex-direction: column; gap: 14px; }
.rc-article .rc-card-link:hover { color: var(--signal-hover); }
.rc-card img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--bone); }
.rc-card h3 { margin: 0; font-weight: 400; font-size: var(--t-h3); line-height: 1.15; letter-spacing: -.02em; }
.rc-card .rc-credit { margin: 0; }
.rc-read { font-size: 14px; color: var(--stone); }

/* ---------- Index page ---------- */

.rc-index-head { padding-top: clamp(56px, 8vw, 128px); padding-bottom: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: end; }
.rc-index-title { margin: 0; font-weight: 400; font-size: clamp(52px, 9.6vw, 164px); line-height: .92; letter-spacing: -.045em; }
.rc-index-head p { margin: 0; font-size: var(--t-lead); line-height: 1.4; max-width: 560px; }

.rc-feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(28px, 4vw, 64px); align-items: center; border-top: 1px solid var(--line-strong); padding-top: clamp(28px, 3vw, 48px); }
.rc-feature img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--bone); }
.rc-feature-body { display: flex; flex-direction: column; gap: 20px; }
.rc-feature-title { margin: 0; font-weight: 400; font-size: clamp(32px, 4vw, 60px); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.rc-article .rc-feature-title a:hover { color: var(--signal-hover); }
.rc-feature-body p { margin: 0; font-size: var(--t-lead); line-height: 1.45; color: var(--stone); max-width: 560px; }
.rc-read-link { align-self: flex-start; font-size: 17px; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.rc-article .rc-read-link:hover { color: var(--signal-hover); border-color: var(--signal-hover); }

.rc-list { padding-top: clamp(56px, 7vw, 112px); padding-bottom: var(--section); display: flex; flex-direction: column; gap: 40px; }
.rc-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-pill { cursor: pointer; font: inherit; font-size: 15px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); transition: background 160ms, color 160ms; }
.rc-pill:hover { background: var(--bone); }
.rc-pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rc-pill:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.rc-empty { margin: 0; color: var(--stone); }

.rc-news { background: var(--bone); }
.rc-news .rc-wrap { padding-top: var(--section); padding-bottom: var(--section); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: end; }
.rc-news h2 { margin: 0; font-weight: 400; font-size: clamp(36px, 4.6vw, 72px); line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.rc-news-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; width: 100%; justify-self: end; }
.rc-news .rc-sub-form { background: var(--paper); padding: 6px 6px 6px 20px; }
.rc-news .rc-sub-form input { font-size: 17px; }
.rc-news .rc-sub-form button { padding: 12px 22px; font-size: 15px; }

.rc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.rc-sub-error { margin: 0; font-size: 14px; color: #B42318; }
