/* Rules page: the rules document, the staff edit mode and the support side panel. */

/* framed picture, the same frame as the news pictures on the home page */
.thumb{display:block;margin:0;padding:3px;border:1px solid var(--line2);background:var(--bg)}
.thumb img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}

/* sprite stamp in the page heading */
.stamp{display:flex;align-items:center;gap:14px;padding:8px 18px 8px 8px;border:1px solid var(--line2);background:var(--panel)}
.stamp-ic{flex:none;display:grid;place-items:center;width:52px;height:52px;border:1px solid var(--line);background:var(--bg)}
.stamp-ic img{display:block;max-width:40px;max-height:40px}
.stamp-t{font:600 12.5px/1.35 var(--disp);letter-spacing:.12em;text-transform:uppercase;color:var(--text)}
.stamp-t b{display:block;margin-bottom:3px;font-weight:700;letter-spacing:.2em;color:var(--gold)}

.rules-cols{margin-top:28px}

/* ---------- the rules document ---------- */
/* js/rules.js turns each line break into <br> and # lines into h1 to h3 */
.rules-b{padding:28px 34px 34px}
.rules-content{max-width:72ch;font-size:16px;line-height:1.75;color:var(--text);overflow-wrap:anywhere}
.rules-content > :first-child{margin-top:0}
.rules-content h1{margin:34px 0 16px;padding-bottom:14px;border-bottom:1px solid var(--line);font:700 27px/1.2 var(--disp);color:var(--text)}
.rules-content h2{display:flex;align-items:center;gap:12px;margin:30px 0 8px;font:700 19px/1.3 var(--disp);color:var(--gold2)}
.rules-content h2::before{content:"";flex:none;width:6px;height:15px;background:var(--gold)}
.rules-content h3{margin:24px 0 6px;font:700 13px/1.35 var(--disp);letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.rules-content strong{font-weight:600;color:var(--gold2)}
.rules-content em{color:var(--muted)}
.rules-content .muted{color:var(--muted)}
/* the line break straight after a heading, and the blank line before one, would double the gaps */
.rules-content :is(h1,h2,h3) + br,
.rules-content br:has(+ :is(h1,h2,h3)){display:none}

/* ---------- staff edit mode ---------- */
.rules-editor{display:block;min-height:440px;padding:14px 16px;font:400 14px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.rules-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
/* sits in the title strip without making it taller */
#editBtn{flex:none;height:32px;margin:-3px 0;padding:0 14px;font-size:11.5px}

/* ---------- side panel ---------- */
.rules-side .thumb{margin-bottom:16px}
.rules-side h3{font:700 20px/1.2 var(--disp);color:var(--text)}
.rules-side p{margin:10px 0 16px;font-size:14px;line-height:1.6;color:var(--muted)}

@media (min-width:901px){
  .rules-cols > aside{position:sticky;top:calc(var(--nav-h) + 20px)}
}
@media (max-width:900px){
  .stamp{align-self:flex-start}
  .rules-cols{margin-top:22px}
  .rules-b{padding:20px 16px 24px}
  .rules-content{font-size:15.5px;line-height:1.7}
  .rules-content h1{font-size:23px}
  .rules-content h2{font-size:17.5px}
  .rules-editor{min-height:360px}
  .rules-actions .btn{flex:1 1 140px}
}
