:root {
  --rs-ink: #2f251c;
  --rs-muted: #6f6253;
  --rs-forest: #244a3a;
  --rs-forest-deep: #18372c;
  --rs-moss: #52745c;
  --rs-gold: #c9953f;
  --rs-gold-ink: #77490a;
  --rs-gold-soft: #e6c878;
  --rs-cream: #f4ecd9;
  --rs-paper: #fffaf0;
  --rs-sand: #e4d5b9;
  --rs-line: #c7b38e;
  --rs-danger: #9b342d;
  --rs-shadow: 0 18px 50px rgba(52, 37, 22, .14);
  --rs-radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.rs-public {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--rs-ink);
  background:
    radial-gradient(circle at 20% 0, rgba(255, 252, 241, .9), transparent 34rem),
    #e9dfcb;
  font: 16px/1.58 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rs-public a { color: inherit; }
.rs-public img { max-width: 100%; }
.rs-public button, .rs-public input { font: inherit; }
.rs-public button, .rs-public a { -webkit-tap-highlight-color: transparent; }
.rs-public :focus-visible { outline: 3px solid var(--rs-gold); outline-offset: 3px; }
.rs-skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--rs-forest-deep); border-radius: 0 0 8px 8px; }
.rs-skip:focus { top: 0; }

.rs-container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.rs-site-header {
  position: relative;
  z-index: 20;
  color: #fffaf0;
  background: linear-gradient(180deg, #2c5543, var(--rs-forest-deep));
  border-bottom: 3px solid var(--rs-gold);
  box-shadow: 0 7px 24px rgba(23, 39, 31, .24);
}

.rs-header-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.rs-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.rs-brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255, 245, 213, .7); transform: rotate(45deg); background: var(--rs-gold); box-shadow: inset 0 0 0 4px rgba(62, 39, 18, .14); }
.rs-brand-mark::before { content: "R"; transform: rotate(-45deg); color: #2c2117; font: 800 17px/1 Georgia, serif; }
.rs-brand-word { font: 800 30px/1 Georgia, "Times New Roman", serif; letter-spacing: .055em; text-transform: uppercase; }
.rs-brand-word span { color: var(--rs-gold-soft); }

.rs-nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.46); border-radius: 8px; color: #fff; background: rgba(8, 25, 19, .26); cursor: pointer; }
.rs-nav-toggle span, .rs-nav-toggle::before, .rs-nav-toggle::after { content: ""; display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; }
.rs-main-nav { display: flex; align-items: center; gap: 5px; }
.rs-main-nav a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 7px; color: #f7f1e6; font-size: 14px; font-weight: 700; text-decoration: none; }
.rs-main-nav a:hover, .rs-main-nav a[aria-current="page"] { background: rgba(255,255,255,.12); }
.rs-main-nav .rs-nav-login { margin-left: 7px; border: 1px solid rgba(255,255,255,.55); }
.rs-main-nav .rs-nav-register { color: #2e2218; background: var(--rs-gold-soft); border: 1px solid #efd991; }
.rs-main-nav .rs-nav-register:hover, .rs-main-nav .rs-nav-register[aria-current="page"] { background: #f1d786; }

.rs-main { min-height: 0; flex: 1 0 auto; }
.rs-eyebrow { margin: 0 0 11px; color: var(--rs-gold-ink); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.rs-display, .rs-page-title, .rs-section-title { font-family: Georgia, "Times New Roman", serif; }
.rs-display { max-width: 760px; margin: 0; font-size: clamp(48px, 7vw, 88px); line-height: .98; letter-spacing: -.035em; }
.rs-page-title { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.06; letter-spacing: -.025em; }
.rs-section-title { margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 43px); line-height: 1.12; }
.rs-lead { max-width: 700px; margin: 19px 0 0; color: var(--rs-muted); font-size: 18px; line-height: 1.65; }

.rs-button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid transparent; border-radius: 8px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.rs-button:hover { transform: translateY(-1px); }
.rs-button-primary { color: #fff; background: var(--rs-forest); border-color: var(--rs-forest-deep); box-shadow: 0 7px 16px rgba(30, 65, 49, .22); }
.rs-public a.rs-button-primary { color: #fff; }
.rs-button-primary:hover { background: #315e4a; }
.rs-button-gold { color: #2d2116; background: var(--rs-gold-soft); border-color: #aa792d; box-shadow: 0 7px 18px rgba(35, 24, 14, .2); }
.rs-public a.rs-button-gold { color: #2d2116; }
.rs-button-quiet { color: var(--rs-forest-deep); background: transparent; border-color: #8ca093; }
.rs-public a.rs-button-quiet { color: var(--rs-forest-deep); }

/* Home */
.rs-home-hero { position: relative; isolation: isolate; min-height: 650px; display: grid; align-items: center; color: #fff; background: #345645 url("/img/raidstead/home-hero.webp") 58% 53% / cover no-repeat; }
.rs-home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(19, 27, 22, .94) 0%, rgba(19, 28, 22, .76) 43%, rgba(19, 28, 22, .1) 78%), linear-gradient(0deg, rgba(20, 18, 13, .67), transparent 58%); }
.rs-home-hero .rs-eyebrow { color: #f1cf79; }
.rs-home-copy { max-width: 650px; margin: 24px 0 31px; color: #fffaf0; font-size: 20px; line-height: 1.58; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.rs-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.rs-home-hero .rs-button-quiet { color: #fff; background: rgba(20, 25, 20, .44); border-color: rgba(255,255,255,.68); }
.rs-public .rs-home-hero a.rs-button-quiet { color: #fff; }
.rs-stats { position: relative; z-index: 2; width: min(940px, calc(100% - 40px)); margin: -54px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--rs-line); border-radius: var(--rs-radius); background: rgba(255, 250, 240, .97); box-shadow: var(--rs-shadow); }
.rs-stats-note { grid-column: 1 / -1; display: flex; justify-content: center; gap: 9px; margin: 0; padding: 10px 18px; color: var(--rs-muted); border-bottom: 1px solid var(--rs-line); background: #f2e8d4; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.rs-stats-note strong { color: var(--rs-forest-deep); }
.rs-stat { padding: 25px 22px; text-align: center; }
.rs-stat + .rs-stat { border-left: 1px solid var(--rs-line); }
.rs-stat strong { display: block; color: var(--rs-forest); font: 800 36px/1 Georgia, serif; }
.rs-stat span { display: block; margin-top: 8px; color: var(--rs-muted); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.rs-section { padding: 94px 0; }
.rs-section-head { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.rs-section-head .rs-lead { margin-inline: auto; }
.rs-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rs-card { border: 1px solid var(--rs-line); border-radius: var(--rs-radius); background: var(--rs-paper); box-shadow: 0 10px 28px rgba(62, 44, 27, .075); }
.rs-feature { padding: 28px; }
.rs-feature-kicker { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 50%; color: #fff; background: var(--rs-forest); font: 800 17px/1 Georgia, serif; }
.rs-feature h3 { margin: 0 0 8px; font: 700 25px/1.2 Georgia, serif; }
.rs-feature p { margin: 0; color: var(--rs-muted); }
.rs-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rs-shot { margin: 0; overflow: hidden; }
.rs-shot img { display: block; width: 100%; height: clamp(170px, 20vw, 250px); object-fit: cover; object-position: top center; }
.rs-shot figcaption { padding: 18px 21px; color: var(--rs-muted); }
.rs-shot strong { display: block; margin-bottom: 3px; color: var(--rs-ink); font: 700 20px/1.3 Georgia, serif; }
.rs-join { margin-bottom: 90px; padding: 48px; text-align: center; color: #fff; border-radius: 16px; background: linear-gradient(135deg, var(--rs-forest-deep), #4e7057); box-shadow: var(--rs-shadow); }
.rs-join p { max-width: 650px; margin: 0 auto 24px; color: #edf2e9; }

/* Entry and content pages */
.rs-page-hero { padding: 70px 0 42px; border-bottom: 1px solid rgba(109, 88, 58, .18); background: linear-gradient(145deg, #f8f1e2, #e9dbc0); }
.rs-page-body { padding: 46px 0 88px; }
.rs-entry-grid { display: grid; grid-template-columns: minmax(0, 660px) minmax(260px, 1fr); gap: 28px; align-items: start; }
.rs-panel { padding: 30px; border: 1px solid var(--rs-line); border-radius: var(--rs-radius); background: var(--rs-paper); box-shadow: var(--rs-shadow); }
.rs-panel h2 { margin: 0 0 8px; font: 700 31px/1.18 Georgia, serif; }
.rs-panel-intro { margin: 0 0 25px; color: var(--rs-muted); }
.rs-form { display: grid; gap: 17px; }
.rs-field label { display: block; margin-bottom: 6px; color: #45382b; font-size: 14px; font-weight: 800; }
.rs-field input[type="text"], .rs-field input[type="password"], .rs-field input[type="email"] { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--rs-ink); border: 1px solid #8f7852; border-radius: 7px; background: #fffdf8; box-shadow: inset 0 1px 2px rgba(50, 37, 24, .08); }
.rs-field input:focus { border-color: var(--rs-forest); outline: 3px solid rgba(36, 74, 58, .16); }
.rs-error { display: block; margin-top: 5px; color: var(--rs-danger); font-size: 13px; font-weight: 700; }
.rs-alert { margin: 0 0 20px; padding: 12px 14px; border: 1px solid #c98e85; border-radius: 8px; color: #6f241f; background: #fff0ed; }
.rs-alert a { font-weight: 800; }
.rs-form-note { margin: 0; color: var(--rs-muted); font-size: 13px; }
.rs-form-note a { color: var(--rs-forest); font-weight: 750; }
.rs-status-wrap { max-width: 820px; }
.rs-status-panel { padding: clamp(24px, 4vw, 42px); }
.rs-status-panel h2 { margin-top: 0; }
.rs-status-panel p { color: var(--rs-muted); }
.rs-status-actions { margin-top: 26px; }
.rs-entry-aside { padding: 27px; color: #f7f2e7; border: 1px solid #17372a; border-radius: var(--rs-radius); background: linear-gradient(150deg, var(--rs-forest), var(--rs-forest-deep)); box-shadow: var(--rs-shadow); }
.rs-entry-aside h2 { margin: 0 0 13px; font: 700 28px/1.2 Georgia, serif; }
.rs-entry-aside p { color: #e8eee8; }
.rs-entry-aside ul { margin: 20px 0 0; padding: 0; list-style: none; }
.rs-entry-aside li { position: relative; margin: 11px 0; padding-left: 24px; }
.rs-entry-aside li::before { content: "◆"; position: absolute; left: 0; color: var(--rs-gold-soft); font-size: 11px; }

/* Registration */
.rs-register-wrap { max-width: 900px; margin-inline: auto; scroll-margin-top: 20px; }
.rs-wizard-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.rs-step-list { display: flex; gap: 7px; margin: 0; padding: 0; list-style: none; }
.rs-step-list li { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--rs-line); border-radius: 50%; color: var(--rs-muted); background: #f0e6d2; font-size: 12px; font-weight: 800; }
.rs-step-list li.is-active { color: #fff; background: var(--rs-forest); border-color: var(--rs-forest-deep); }
.rw-step { display: none; }
.rw-step.on { display: block; }
.rw-intro { max-width: 690px; margin: 0 0 23px; color: var(--rs-muted); }
.rw-tribes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.rw-tribe { min-height: 190px; padding: 18px; text-align: left; border: 1px solid var(--rs-line); border-radius: 10px; color: var(--rs-ink); background: #fbf4e6; cursor: pointer; }
.rw-tribe:hover { border-color: #7e9a87; }
.rw-tribe.sel { border: 2px solid var(--rs-forest); padding: 17px; background: #f0f3e9; box-shadow: 0 5px 14px rgba(36, 74, 58, .12); }
.rw-tribe-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rw-tribe-name { font: 700 23px/1.2 Georgia, serif; }
.rw-tribe-rune { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--rs-forest); font: 800 15px/1 Georgia, serif; }
.rw-badge { display: inline-block; margin-top: 12px; padding: 4px 7px; border-radius: 999px; color: #614716; background: #f0d68e; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.rw-lines { display: block; margin: 0; color: var(--rs-muted); font-size: 13px; }
.rw-lines > span { position: relative; display: block; margin: 4px 0; padding-left: 14px; }
.rw-lines > span::before { content: "•"; position: absolute; left: 1px; color: var(--rs-moss); }
.rw-world { max-width: 600px; margin-inline: auto; padding: 20px; border: 1px solid var(--rs-line); border-radius: 12px; background: linear-gradient(145deg, #dfd4b6, #c7c596); }
.rw-map { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rw-q, .rw-rand { min-height: 108px; padding: 14px; border: 1px solid #927f5a; border-radius: 8px; color: #3a3024; background: rgba(255, 250, 232, .72); cursor: pointer; }
.rw-q:hover, .rw-rand:hover { background: #fff7df; }
.rw-q.sel, .rw-rand.sel { border: 3px solid var(--rs-forest); padding: 12px; background: #edf1df; }
.rw-q strong { display: block; margin-bottom: 3px; font: 700 20px/1.25 Georgia, serif; }
.rw-q span { color: var(--rs-muted); font-size: 13px; }
.rw-rand { width: 100%; min-height: 48px; margin-top: 8px; text-align: center; }
.rw-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.rw-summary-card { padding: 16px; border: 1px solid var(--rs-line); border-radius: 9px; background: #f4ead5; }
.rw-summary-card span { display: block; color: var(--rs-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rw-summary-card strong { display: block; margin-top: 4px; font: 700 23px/1.25 Georgia, serif; }
.rw-change, .rw-back { display: inline-flex; min-height: 44px; align-items: center; padding: 0; border: 0; color: var(--rs-forest); background: none; font-weight: 800; text-decoration: underline; cursor: pointer; }
.rw-controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.rw-controls .rs-button { min-width: 150px; }
.rw-agree { display: flex; gap: 9px; align-items: flex-start; margin: 3px 0; }
.rw-agree input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--rs-forest); }
.rw-errors { margin: 0; padding: 12px 14px; color: var(--rs-danger); border: 1px solid #c98e85; border-radius: 8px; background: #fff0ed; font-weight: 700; }
.rw-errors span { display: block; }

/* Help and legal pages */
.rs-content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 30px; align-items: start; }
.rs-toc { position: sticky; top: 20px; padding: 18px; border: 1px solid var(--rs-line); border-radius: 11px; background: rgba(255,250,240,.82); }
.rs-toc strong { display: block; margin-bottom: 10px; font: 700 18px/1.2 Georgia, serif; }
.rs-toc a { min-height: 39px; display: flex; align-items: center; padding: 0 9px; border-radius: 6px; color: var(--rs-muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.rs-toc a:hover, .rs-toc a.is-active { color: var(--rs-forest); background: #e8ebdc; }
.rs-prose { min-width: 0; }
.rs-prose-section { scroll-margin-top: 20px; padding: 27px 29px; border: 1px solid var(--rs-line); border-radius: 12px; background: var(--rs-paper); box-shadow: 0 8px 24px rgba(62, 44, 27, .07); }
.rs-prose-section + .rs-prose-section { margin-top: 17px; }
.rs-prose-section h2 { margin: 0 0 12px; color: var(--rs-forest-deep); font: 700 29px/1.2 Georgia, serif; }
.rs-prose-section h3 { margin: 22px 0 8px; font: 700 20px/1.25 Georgia, serif; }
.rs-prose-section p { margin: 10px 0; }
.rs-prose-section ul, .rs-prose-section ol { padding-left: 23px; }
.rs-prose-section li { margin: 7px 0; }
.rs-prose-section a { color: var(--rs-forest); font-weight: 750; }
.rs-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.rs-tabs a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--rs-line); border-radius: 7px; color: var(--rs-muted); background: #f8f0df; font-size: 14px; font-weight: 750; text-decoration: none; }
.rs-tabs a.is-active { color: #fff; background: var(--rs-forest); border-color: var(--rs-forest-deep); }
.rs-callout { margin: 18px 0; padding: 15px 17px; border-left: 4px solid var(--rs-gold); background: #f1e7d1; }

.rs-footer { color: #ddd7ca; background: #172d25; border-top: 3px solid var(--rs-gold); }
.rs-footer-row { min-height: 116px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.rs-footer small { color: #bbb8ae; }
.rs-footer a { color: #eee8db; }
.rs-footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; font-size: 13px; font-weight: 700; }
.rs-footer-nav a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 860px) {
  .rs-nav-toggle { display: block; }
  .rs-main-nav { position: absolute; left: 20px; right: 20px; top: calc(100% + 1px); display: none; padding: 10px; flex-direction: column; align-items: stretch; border: 1px solid #617c6d; border-top: 0; border-radius: 0 0 10px 10px; background: var(--rs-forest-deep); box-shadow: 0 14px 26px rgba(17, 31, 25, .3); }
  .rs-site-header.is-open .rs-main-nav { display: flex; }
  .rs-main-nav a { min-height: 46px; }
  .rs-main-nav .rs-nav-login { margin-left: 0; }
  .rs-entry-grid { grid-template-columns: 1fr; }
  .rs-content-layout { grid-template-columns: 1fr; }
  .rs-toc { position: static; }
  .rs-toc nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .rs-feature-grid { grid-template-columns: 1fr; }
  .rw-tribes { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .rs-container { width: calc(100% - 28px); }
  .rs-header-row { min-height: 68px; }
  .rs-brand-word { font-size: 24px; }
  .rs-brand-mark { width: 27px; height: 27px; }
  .rs-main-nav { left: 14px; right: 14px; }
  .rs-home-hero { min-height: 610px; background-position: 66% 50%; }
  .rs-home-hero::before { background: linear-gradient(90deg, rgba(19,27,22,.95), rgba(19,27,22,.62)), linear-gradient(0deg, rgba(20,18,13,.7), transparent 55%); }
  .rs-home-copy { font-size: 18px; }
  .rs-display { font-size: clamp(45px, 14vw, 62px); }
  .rs-actions { display: grid; grid-template-columns: 1fr; }
  .rs-stats { width: calc(100% - 28px); margin-top: -28px; }
  .rs-stats-note { justify-content: space-between; padding-inline: 10px; font-size: 9px; }
  .rs-stat { padding: 19px 7px; }
  .rs-stat strong { font-size: 28px; }
  .rs-stat span { font-size: 9px; letter-spacing: .045em; }
  .rs-section { padding: 72px 0; }
  .rs-gallery { grid-template-columns: 1fr; }
  .rs-join { margin-bottom: 64px; padding: 37px 20px; }
  .rs-page-hero { padding: 50px 0 32px; }
  .rs-page-body { padding: 28px 0 64px; }
  .rs-lead { font-size: 17px; }
  .rs-panel { padding: 20px; }
  .rs-entry-aside { padding: 22px; }
  .rw-tribes { grid-template-columns: 1fr; }
  .rw-tribe { min-height: 0; }
  .rw-map { grid-template-columns: 1fr; }
  .rw-q { min-height: 78px; }
  .rw-summary { grid-template-columns: 1fr; }
  .rw-controls { flex-direction: column-reverse; }
  .rw-controls .rs-button { width: 100%; }
  .rw-back { justify-content: center; }
  .rs-prose-section { padding: 21px 19px; }
  .rs-footer-row { padding: 27px 0; flex-direction: column; align-items: flex-start; }
  .rs-footer-nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
