/* Rød Sol / Aktivitets Forum case study.
   Its own look, taken from the forum's Figma screens: wine red, signal red and pinks,
   Merriweather Black for titles and Poppins for text. The story is told as the
   workshop table it came from: post-its, sticker votes, speech bubbles and stamps. */

.rs-case {
  --rs-wine: #600a0f;
  --rs-red: #d9071a;
  --rs-pink: #f6aeba;
  --rs-blush: #fceaea;
  --rs-plum: #844248;
  --rs-ink: #2a1214;
  --rs-accent: #f6aeba;            /* accent text on the dark page */
  --rs-line: color-mix(in srgb, var(--fg) 14%, transparent);
  --rs-serif: "Merriweather", Georgia, serif;
  --rs-sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
}
[data-theme="light"] .rs-case { --rs-accent: #b00616; }
/* On the light page, white surfaces need an edge; bubbles take the blush instead */
[data-theme="light"] .rs-concepts li:not(.is-chosen), [data-theme="light"] .rs-polaroid { box-shadow: 0 0 0 1px #eadada, 0 14px 30px -20px rgba(96, 10, 15, 0.35); }
[data-theme="light"] .rs-bubble blockquote, [data-theme="light"] .rs-bubble blockquote::after { background: var(--rs-blush); }

/* ---------- Hero ---------- */
.rsc-hero { background: var(--rs-wine); color: #fff; border-radius: 20px; padding: clamp(24px, 5vw, 64px); display: grid; gap: 22px; }
.rsc-logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; display: grid; place-items: center; }
.rsc-logo img { width: 40px; height: auto; }
.rsc-hero h1 { font-family: var(--rs-serif); font-weight: 900; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.375rem); line-height: 1.12; letter-spacing: 0; max-width: 20ch; color: #fff; text-wrap: balance; }
.rsc-lede { font-family: var(--rs-sans); font-size: 1.0625rem; line-height: 1.7; color: var(--rs-blush); }
.rsc-facts { display: flex; flex-wrap: wrap; gap: 14px clamp(24px, 4vw, 56px); margin-top: 6px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.22); font-family: var(--rs-sans); }
.rsc-facts dt { font-size: 12px; color: var(--rs-pink); }
.rsc-facts dd { margin-top: 2px; font-size: 15px; font-weight: 500; color: #fff; }

/* Encounter rail: the comment-thread line from the forum, laid sideways */
.rsc-rail { margin-top: clamp(32px, 5vw, 48px); }
.rsc-rail ol { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rsc-rail ol::before { content: ""; position: absolute; top: 8px; left: 9px; right: 9px; height: 2px; background: var(--rs-red); }
.rsc-rail a { position: relative; display: grid; gap: 4px; padding-top: 30px; text-decoration: none; color: var(--fg); }
.rsc-rail i { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--rs-red); transition: background-color 0.2s; }
.rsc-rail span { font-family: var(--rs-sans); font-size: 13px; color: var(--fg-3); }
.rsc-rail b { font-family: var(--rs-serif); font-weight: 900; font-size: 16px; line-height: 1.3; }
.rsc-rail a:hover i { background: var(--rs-red); }
.rsc-rail a:hover b { color: var(--rs-accent); }

/* ---------- Encounters ---------- */
.rsc-body { padding-bottom: clamp(48px, 7vw, 96px); }
.rsc-enc { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--rs-line); scroll-margin-top: 80px; }
.rsc-aside { position: sticky; top: 96px; align-self: start; display: grid; justify-items: start; gap: 10px; }
.sheet-scroll .rsc-aside { top: 24px; }
.rsc-when { font-family: var(--rs-serif); font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; color: var(--fg); }
.rsc-mode { padding: 4px 12px; border-radius: 999px; background: var(--rs-blush); color: var(--rs-wine); font-family: var(--rs-sans); font-weight: 600; font-size: 13px; }
.rsc-num { font-family: var(--rs-sans); font-size: 13px; line-height: 1.5; color: var(--fg-3); }
.rsc-main { display: grid; gap: 28px; min-width: 0; }
.rsc-main > h2 { font-family: var(--rs-serif); font-weight: 900; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.18; letter-spacing: 0; max-width: 22ch; color: var(--fg); text-wrap: balance; }
.rsc-main > p { font-family: var(--rs-sans); font-size: 1rem; line-height: 1.75; color: var(--fg-2); }
.rsc-main > p + p { margin-top: -12px; }

/* Polaroids: photos from the workshop table */
.rs-polaroid { background: #fff; padding: 10px 10px 14px; border-radius: 4px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.6); transform: rotate(-0.8deg); max-width: 620px; }
.rs-polaroid img { width: 100%; height: auto; border-radius: 2px; }
.rs-polaroid figcaption { margin-top: 10px; padding-inline: 4px; font-family: var(--rs-sans); font-size: 13px; line-height: 1.5; color: var(--rs-wine); }
.rs-polaroid.is-wide { max-width: none; transform: rotate(-0.3deg); }
.rs-polaroids { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.rs-polaroids .rs-polaroid:nth-child(2) { transform: rotate(1.2deg); margin-top: 18px; }

/* Post-it findings */
.rs-notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rs-notes li { min-height: 170px; padding: 20px 18px; border-radius: 2px; background: var(--rs-blush); color: var(--rs-wine); display: grid; gap: 8px; align-content: start; box-shadow: 0 12px 22px -16px rgba(0, 0, 0, 0.65); transform: rotate(-1deg); }
.rs-notes li:nth-child(even) { background: var(--rs-pink); transform: rotate(1.1deg); }
.rs-notes b { font-family: var(--rs-serif); font-weight: 900; font-size: 17px; line-height: 1.3; }
.rs-notes span { font-family: var(--rs-sans); font-size: 14px; line-height: 1.55; color: #4a1a1e; }

/* Sticker vote */
.rs-vote { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-vote li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--rs-line); font-family: var(--rs-sans); }
.rs-vote b { font-weight: 500; font-size: 15px; line-height: 1.45; color: var(--fg-2); }
.rs-vote span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--fg-3); }
.rs-vote li.is-chosen { background: var(--rs-blush); border-color: transparent; }
.rs-vote li.is-chosen b { font-family: var(--rs-serif); font-weight: 900; color: var(--rs-wine); }
.rs-vote li.is-chosen span { color: #4a1a1e; }
.rs-sticker { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff4a57 0 18%, var(--rs-red) 46%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); transform: rotate(-12deg); }
.rs-sticker.is-empty { background: none; box-shadow: inset 0 0 0 1.5px var(--rs-line); }

/* Speech bubbles, like the ready-made ones on the storyboards */
.rs-bubbles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rs-bubble { width: 100%; max-width: 620px; margin: 0; }
.rs-bubble blockquote { margin: 0; max-width: none; border: 0; position: relative; padding: 20px 24px; border-radius: 24px; background: #fff; color: var(--rs-ink); }
.rs-bubble blockquote::after { content: ""; position: absolute; left: 34px; bottom: -11px; width: 22px; height: 22px; background: #fff; transform: rotate(45deg); border-radius: 0 0 4px 0; }
.rs-bubble p { position: relative; z-index: 1; font-family: var(--rs-serif); font-style: italic; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.55; }
.rs-bubble figcaption { margin-top: 20px; padding-left: 26px; font-family: var(--rs-sans); font-size: 13px; color: var(--fg-3); }

/* Concepts with verdict stamps */
.rs-concepts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rs-concepts li { position: relative; display: grid; gap: 6px; align-content: start; padding: 0 0 20px; border-radius: 14px; background: #fff; overflow: hidden; color: var(--rs-ink); font-family: var(--rs-sans); }
.rs-concept-img { aspect-ratio: 16 / 8; background: var(--rs-blush); margin-bottom: 12px; overflow: hidden; }
.rs-concept-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rs-concepts b, .rs-concepts li > span:not(.rs-stamp), .rs-concepts em { padding-inline: 20px; }
.rs-concepts b { font-family: var(--rs-serif); font-weight: 900; font-size: 18px; color: var(--rs-wine); }
.rs-concepts li > span:not(.rs-stamp) { font-size: 14px; line-height: 1.55; color: #5a4446; }
.rs-concepts em { margin-top: 6px; font-style: normal; font-size: 14px; line-height: 1.5; color: var(--rs-plum); }
.rs-stamp { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border: 2px solid currentColor; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: var(--rs-plum); font-family: var(--rs-sans); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; transform: rotate(-5deg); }
.rs-concepts li.is-chosen { box-shadow: 0 0 0 3px var(--rs-red); }
.rs-concepts li.is-chosen .rs-stamp { color: #fff; background: var(--rs-red); border-color: var(--rs-red); }
.rs-concepts li.is-chosen em { color: var(--rs-red); font-weight: 600; }

/* Ideas that came from the volunteers */
.rs-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.rs-tags li { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--rs-accent); color: var(--rs-accent); font-family: var(--rs-sans); font-weight: 500; font-size: 14px; }

/* Live idea card from the forum, with the like-count decision built in */
.rs-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(20px, 4vw, 44px); border-radius: 18px; background: var(--rs-blush); color: var(--rs-ink); }
.rs-demo-side { display: grid; gap: 14px; justify-items: start; }
.rs-demo-label { font-family: var(--rs-sans); font-size: 14px; color: #5a4446; }
.rs-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 1px 0 rgba(96, 10, 15, 0.12); }
.rs-seg button { padding: 8px 16px; border: 0; border-radius: 999px; background: none; color: var(--rs-wine); font-family: var(--rs-sans); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.rs-seg button[aria-pressed="true"] { background: var(--rs-wine); color: #fff; }
.rs-demo-note { font-family: var(--rs-sans); font-size: 15px; line-height: 1.6; color: var(--rs-ink); }
.rs-idea { display: grid; gap: 12px; padding: 18px; border-radius: 14px; background: #fff; box-shadow: 0 16px 30px -18px rgba(96, 10, 15, 0.45); font-family: var(--rs-sans); }
.rs-idea-head { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; }
.rs-idea-ill { width: 52px; height: 52px; border-radius: 50%; background: var(--rs-blush); color: var(--rs-wine); display: grid; place-items: center; }
.rs-idea-ill svg { width: 30px; height: 30px; }
.rs-idea h4 { font-family: var(--rs-serif); font-weight: 900; font-size: 19px; line-height: 1.25; color: #1d0d0f; }
.rs-by { font-size: 13px; color: var(--rs-red); }
.rs-idea p { font-size: 14px; line-height: 1.55; color: #4a3a3b; }
.rs-idea-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid #f3dede; }
.rs-like, .rs-comments { white-space: nowrap; }
.rs-idea-foot { flex-wrap: wrap; }
.rs-like { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid #f0c3ca; background: #fff; color: var(--rs-wine); font-family: var(--rs-sans); font-weight: 600; font-size: 13px; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.rs-like svg { width: 16px; height: 16px; color: transparent; stroke: var(--rs-red); }
.rs-like svg path { fill: currentColor; stroke: var(--rs-red); }
.rs-like[aria-pressed="true"] { background: var(--rs-wine); border-color: var(--rs-wine); color: #fff; }
.rs-like[aria-pressed="true"] svg { color: var(--rs-pink); }
.rs-like[aria-pressed="true"] svg path { stroke: var(--rs-pink); }
.rs-like b { min-width: 2ch; padding-left: 7px; border-left: 1px solid currentColor; font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-demo[data-view="youth"] .rs-like b { display: none; }
.rs-comments { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4a3a3b; }
.rs-comments svg { width: 18px; height: 18px; color: var(--rs-red); }

/* Decisions as a comment thread */
.rs-thread { display: grid; gap: 0; padding-left: 4px; }
.rs-thread li { position: relative; padding: 0 0 26px 34px; }
.rs-thread li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--rs-red); opacity: 0.55; }
.rs-thread li:last-child { padding-bottom: 0; }
.rs-thread li:last-child::before { display: none; }
.rs-thread li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rs-red); background: var(--bg); }
.rs-thread h3 { font-family: var(--rs-serif); font-weight: 900; font-size: 18px; line-height: 1.3; color: var(--fg); }
.rs-why { display: block; margin-top: 2px; font-family: var(--rs-sans); font-weight: 500; font-size: 14px; color: var(--rs-accent); }
.rs-thread p { margin-top: 6px; font-family: var(--rs-sans); font-size: 15px; line-height: 1.65; color: var(--fg-2); }

/* Looking back */
.rs-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: n; }
.rs-next li { position: relative; padding: 22px 20px 22px; border-radius: 14px; border: 1px solid var(--rs-line); counter-increment: n; font-family: var(--rs-sans); }
.rs-next li::before { content: counter(n); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%; background: var(--rs-red); color: #fff; font-weight: 600; font-size: 14px; }
.rs-next b { font-family: var(--rs-serif); font-weight: 900; font-size: 17px; line-height: 1.35; color: var(--fg); }
.rs-next p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--fg-2); }

.rs-case .case-end { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .rs-polaroid, .rs-polaroids .rs-polaroid:nth-child(2), .rs-notes li, .rs-sticker, .rs-stamp { transform: none; }
}
@media (max-width: 1000px) {
  .rs-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .rsc-enc { grid-template-columns: 1fr; gap: 20px; }
  .rsc-aside { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .rsc-num { flex-basis: 100%; }
  .rs-demo { grid-template-columns: 1fr; }
  .rs-next { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rsc-rail ol { grid-template-columns: 1fr; gap: 0; }
  .rsc-rail ol::before { top: 9px; bottom: 9px; left: 8px; right: auto; width: 2px; height: auto; }
  .rsc-rail a { padding: 0 0 16px 32px; }
  .rsc-rail li:last-child a { padding-bottom: 0; }
  .rs-polaroids, .rs-vote, .rs-bubbles, .rs-concepts { grid-template-columns: 1fr; }
  .rs-polaroids .rs-polaroid:nth-child(2) { margin-top: 0; }
  .rs-notes li { min-height: 0; }
}
