/* Cloud9 RP - full rulebook (rules.html). Uses the site tokens from style.css. */
.rb-wrap { padding: 28px 0 80px; }
.rb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }

/* contents rail */
.rb-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; padding: 18px; border-radius: 14px;
  background: rgba(10, 24, 40, .72); border: 1px solid rgba(125, 234, 250, .14); }
.rb-toc h2 { font: 600 12px 'Barlow Condensed', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #7deafa; margin: 0 0 10px; }
.rb-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rb-toc a { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 8px; color: #b7c8d6; text-decoration: none; font-size: 14px; line-height: 1.3; }
.rb-toc a b { font: 600 13px 'Barlow Condensed', sans-serif; color: #5d7b92; min-width: 22px; }
.rb-toc a:hover { background: rgba(125, 234, 250, .07); color: #fff; }
.rb-toc a.on { background: rgba(125, 234, 250, .12); color: #fff; box-shadow: inset 3px 0 0 #7deafa; }
.rb-toc a.on b { color: #7deafa; }

/* toolbar */
.rb-bar { position: sticky; top: 72px; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 22px;
  border-radius: 14px; background: rgba(7, 19, 32, .92); border: 1px solid rgba(125, 234, 250, .16); backdrop-filter: blur(10px); }
.rb-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 10px;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(125, 234, 250, .14); }
.rb-search input { flex: 1; background: none; border: 0; outline: 0; color: #e7f2f8; font-size: 15px; }
.rb-search:focus-within { border-color: #7deafa; }
.rb-count { font-size: 13px; color: #7d97a8; white-space: nowrap; }
.rb-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(125, 234, 250, .22);
  background: rgba(125, 234, 250, .08); color: #e7f2f8; font: 600 15px 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.rb-btn:hover { background: rgba(125, 234, 250, .16); }
.rb-btn svg { width: 18px; height: 18px; }
.rb-btn.primary { background: #7deafa; color: #041119; border-color: #7deafa; }

/* intro + key */
.rb-intro { padding: 22px 24px; border-radius: 14px; background: linear-gradient(135deg, rgba(125, 234, 250, .1), rgba(10, 24, 40, .6)); border: 1px solid rgba(125, 234, 250, .18); margin-bottom: 28px; }
.rb-intro p { margin: 0 0 10px; color: #c9d7e2; line-height: 1.65; }
.rb-intro p:last-child { margin: 0; }
.rb-key { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rb-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font: 600 12px 'Barlow Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.rb-tag.ban { background: rgba(255, 90, 79, .14); color: #ff8a80; border: 1px solid rgba(255, 90, 79, .35); }
.rb-tag.perm { background: rgba(255, 90, 79, .9); color: #fff; }
.rb-tag.staff { background: rgba(245, 180, 0, .14); color: #ffd36b; border: 1px solid rgba(245, 180, 0, .35); }
.rb-tag.info { background: rgba(125, 234, 250, .12); color: #7deafa; border: 1px solid rgba(125, 234, 250, .3); }

/* chapters */
.rb-chapter { scroll-margin-top: 150px; margin-bottom: 34px; padding: 26px 26px 10px; border-radius: 16px; background: rgba(10, 24, 40, .55); border: 1px solid rgba(125, 234, 250, .1); }
.rb-chapter > header { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.rb-chapter > header .num { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; font: 700 22px 'Oswald', sans-serif;
  color: #041119; background: linear-gradient(135deg, #7deafa, #3fb6cc); }
.rb-chapter > header h2 { margin: 0; font: 600 30px 'Oswald', sans-serif; letter-spacing: .02em; color: #fff; }
.rb-chapter > header small { display: block; color: #7d97a8; font-size: 14px; margin-top: 2px; }
.rb-chapter > p.lead { color: #b7c8d6; line-height: 1.65; margin: 0 0 16px; }
.rb-rule { position: relative; scroll-margin-top: 150px; padding: 16px 0 16px 64px; border-top: 1px solid rgba(125, 234, 250, .08); }
.rb-rule:first-of-type { border-top: 0; }
.rb-rule .id { position: absolute; left: 0; top: 17px; font: 700 15px 'Barlow Condensed', sans-serif; color: #7deafa; text-decoration: none; letter-spacing: .04em; }
.rb-rule .id:hover { text-decoration: underline; }
.rb-rule h3 { margin: 0 0 6px; font: 600 19px 'Barlow Condensed', sans-serif; letter-spacing: .02em; color: #fff; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rb-rule p, .rb-rule li { color: #c2d1dc; line-height: 1.65; font-size: 15.5px; }
.rb-rule p { margin: 0 0 8px; }
.rb-rule ul { margin: 4px 0 8px; padding-left: 20px; }
.rb-rule li { margin: 3px 0; }
.rb-rule .eg { margin: 8px 0; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, .22); border-left: 3px solid #3fb6cc; font-size: 14.5px; color: #a9bccb; }
.rb-rule .eg b { color: #7deafa; font-weight: 600; }
.rb-rule .eg.bad { border-left-color: #ff5a4f; }
.rb-rule .eg.bad b { color: #ff8a80; }
.rb-rule[hidden] { display: none; }
.rb-rule mark { background: rgba(125, 234, 250, .3); color: #fff; border-radius: 3px; padding: 0 2px; }
.rb-chapter.none { display: none; }
.rb-empty { text-align: center; color: #7d97a8; padding: 40px; }

/* glossary */
.rb-glossary dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 20px; margin: 0 0 18px; }
.rb-glossary dt { font: 600 17px 'Barlow Condensed', sans-serif; color: #7deafa; letter-spacing: .03em; }
.rb-glossary dd { margin: 0; color: #c2d1dc; line-height: 1.6; }

.rb-foot { margin-top: 10px; padding: 20px 24px; border-radius: 14px; border: 1px dashed rgba(125, 234, 250, .25); color: #9fb3c2; line-height: 1.6; }
.rb-foot a { color: #7deafa; }

/* big screen: the rulebook fills the screen with larger type */
body.rb-big .nav, body.rb-big .page-head, body.rb-big .site-footer { display: none; }
body.rb-big .rb-wrap { padding-top: 10px; }
body.rb-big .rb-bar { top: 10px; }
body.rb-big .container { max-width: 1500px; }
@media (min-width: 961px) { body.rb-big .rb-layout { grid-template-columns: 300px minmax(0, 1fr); } }
body.rb-big .rb-toc { top: 84px; }
body.rb-big .rb-rule p, body.rb-big .rb-rule li { font-size: 18px; }
body.rb-big .rb-rule h3 { font-size: 22px; }
body.rb-big .rb-chapter > header h2 { font-size: 36px; }

/* "open the full rulebook" call-out on the info page */
.rules-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(125, 234, 250, .14), rgba(10, 24, 40, .7)); border: 1px solid rgba(125, 234, 250, .25); }
.rules-cta b { display: block; font: 600 20px 'Oswald', sans-serif; color: #fff; }
.rules-cta > div:first-child > span { color: #b7c8d6; font-size: 14.5px; }
.rules-cta .rb-btns { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .rb-layout { grid-template-columns: 1fr; }
  .rb-toc { position: static; max-height: none; }
  .rb-toc ol { display: grid; grid-template-columns: 1fr 1fr; }
  .rb-rule { padding-left: 0; }
  .rb-rule .id { position: static; display: inline-block; margin-bottom: 4px; }
  .rb-glossary dl { grid-template-columns: 1fr; }
  .rb-chapter { padding: 20px 16px 6px; }
}
@media print {
  .nav, .page-head, .site-footer, .rb-bar, .rb-toc { display: none !important; }
  .rb-layout { display: block; }
  .rb-chapter { background: none; border: 0; break-inside: avoid-page; }
  .rb-rule p, .rb-rule li, .rb-rule h3, .rb-chapter h2 { color: #000 !important; }
}

/* long-form reading: body text in sentence case (headings keep the site's caps style) */
.rb-intro p, .rb-chapter > p.lead, .rb-rule p, .rb-rule li, .rb-glossary dd, .rb-foot, .rb-search input, .rb-empty, .rules-cta > div:first-child > span {
  text-transform: none; font-family: Arial, sans-serif; letter-spacing: 0; }
.rb-rule .eg { font-family: Arial, sans-serif; text-transform: none; }

/* the info page styles its links; keep the call-out buttons readable */
.rules-cta a.rb-btn { text-decoration: none; color: #e7f2f8; }
.rules-cta a.rb-btn.primary, .rules-cta a.rb-btn.primary span { color: #041119; }
.rules-cta a.rb-btn.primary:hover { filter: brightness(1.08); }
