/* Server and Discord rules – gold look: a full first screen with jump links, then one card per rule. */
:root {
  --bg: #07080d; --fg: #f4efe4; --muted: #9a958a; --line: rgba(255, 214, 120, .12);
  --card: #0f1017; --accent: #f6c453; --accent-fg: #1a1203; --head-bg: rgba(7, 8, 13, .72);
  --hover: rgba(246, 196, 83, .08);
  --tone: 246, 196, 83; /* the Discord page tints numbers and glow in Discord blurple */
}
.tone-discord { --tone: 140, 150, 255; }
::selection { background: rgba(246, 196, 83, .35); }
@keyframes spin { to { rotate: 360deg; } }

/* first screen */
.r-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 100px 16px 110px; text-align: center; }
.r-bg { position: absolute; inset: 0; z-index: -1; }
.glow { position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 50% 42%, rgba(var(--tone), .16), transparent 70%); }
.r-bg .circle { position: absolute; left: 50%; top: 45%; width: min(820px, 150vw); max-width: none; translate: calc(-50% + var(--mx, 0) * -24px) calc(-50% + var(--my, 0) * -24px); opacity: .14; filter: drop-shadow(0 0 12px rgba(255, 200, 90, .5)); animation: spin 150s linear infinite; transition: translate .6s ease-out; }
.tone-discord .r-bg .circle { filter: hue-rotate(200deg) saturate(1.1) drop-shadow(0 0 12px rgba(140, 150, 255, .5)); }
.r-hero h1 { font-size: clamp(46px, 8.5vw, 104px); font-weight: 800; letter-spacing: -.035em; background: linear-gradient(180deg, #fff6dc 20%, #f2b134); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.lead { font: 400 clamp(17px, 2vw, 21px)/1.4 'Outfit', sans-serif; color: #e0d6c2; }
.r-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin-top: 10px; }
.r-jump a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 18, 14, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 600; color: #d9d1c0; transition: color .2s, border-color .2s, transform .2s; }
.r-jump a:hover { color: var(--fg); border-color: rgba(var(--tone), .6); transform: translateY(-2px); }
.r-jump .r-jump-wide { border-color: rgba(255, 107, 107, .3); color: #ffb3b3; }
.scroll { position: absolute; bottom: 26px; left: 50%; translate: -50%; width: 26px; height: 42px; border: 1.5px solid rgba(246, 196, 83, .4); border-radius: 14px; }
.scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* rules */
.r-body { width: min(1100px, 100% - 32px); margin: 0 auto; padding: 90px 0 110px; display: grid; gap: 18px; scroll-margin-top: 20px; }
.state { text-align: center; color: var(--muted); }
.r-intro { padding: 24px 28px; border-radius: 22px; border: 1px solid rgba(var(--tone), .35); background: radial-gradient(ellipse 80% 80% at 0% 0%, rgba(var(--tone), .1), transparent 70%), var(--card); font: 400 18px/1.6 'Outfit', sans-serif; color: #e8dfcc; }
.r-intro p { margin: 0; }
.r-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.r-card { position: relative; display: grid; align-content: start; gap: 14px; padding: 28px 30px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 60%), var(--card); border: 1px solid var(--line); overflow: hidden; scroll-margin-top: 90px; transition: border-color .3s; }
.r-card:hover { border-color: rgba(var(--tone), .35); }
.r-num { position: absolute; top: 14px; right: 22px; font: 800 72px/1 'Outfit', sans-serif; letter-spacing: -.04em; color: rgba(var(--tone), .09); pointer-events: none; user-select: none; }
.r-card h2 { font-size: 24px; font-weight: 600; padding-right: 70px; }
.r-text { color: #cfc7b6; font-size: 15px; line-height: 1.65; }
.r-text p { margin: 0 0 10px; }
.r-text ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.r-text li { position: relative; padding-left: 22px; }
.r-text li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; rotate: 45deg; background: rgb(var(--tone)); box-shadow: 0 0 10px rgba(var(--tone), .6); }
.r-text a { color: var(--accent); }
.r-text strong { color: var(--fg); }
.r-wide { grid-column: 1 / -1; border-color: rgba(255, 107, 107, .25); background: radial-gradient(ellipse 60% 100% at 0% 0%, rgba(255, 107, 107, .08), transparent 70%), var(--card); }
.r-wide h2 { color: #ffb3b3; }
.r-other { text-align: center; color: var(--muted); font-size: 15px; margin-top: 10px; }
.r-other a { color: var(--accent); font-weight: 600; }

/* punishments as a list: steps that get harsher from left to right */
.r-wide .r-text ul { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 4px 0 16px; counter-reset: step; }
.r-wide .r-text li { counter-increment: step; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 14px; border: 1px solid rgba(255, 107, 107, calc(.15 + var(--s, 0) * .12)); background: rgba(255, 107, 107, calc(.04 + var(--s, 0) * .04)); color: var(--fg); font-weight: 600; }
.r-wide .r-text li::before { content: counter(step); position: static; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; rotate: none; background: rgba(255, 107, 107, calc(.2 + var(--s, 0) * .2)); box-shadow: none; color: #fff; font: 700 13px 'Outfit', sans-serif; }
.r-wide .r-text li:nth-child(2) { --s: 1; } .r-wide .r-text li:nth-child(3) { --s: 2; } .r-wide .r-text li:nth-child(n+4) { --s: 3; }
.r-wide .r-text li:not(:last-child)::after { content: ''; position: absolute; right: -19px; top: 50%; width: 8px; height: 8px; border: solid rgba(255, 107, 107, .6); border-width: 2px 2px 0 0; rotate: 45deg; translate: 0 -50%; }

/* punishment table: reason, then what happens */
.r-text .md-table { margin: 6px 0 16px; overflow-x: auto; border: 1px solid rgba(255, 107, 107, .2); border-radius: 16px; }
.r-text table { width: 100%; border-collapse: collapse; font-size: 15px; }
.r-text th, .r-text td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.r-text tr:last-child td { border-bottom: 0; }
.r-text th { background: rgba(255, 107, 107, .07); color: #ffb3b3; font: 600 12px 'Outfit', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.r-text td.r-reason { color: var(--fg); }
.r-text td.r-code { width: 1%; padding-right: 4px; }
.p-code { display: inline-block; min-width: 42px; padding: 4px 9px; border-radius: 8px; background: rgba(var(--tone), .12); color: rgb(var(--tone)); font: 700 13px 'Outfit', sans-serif; text-align: center; font-variant-numeric: tabular-nums; }
a.p-code:hover { background: rgba(var(--tone), .22); }
.r-text li { scroll-margin-top: 100px; }
.r-text li:target { color: var(--fg); }
.r-text li:target strong { color: rgb(var(--tone)); }
.r-text tbody tr:hover { background: rgba(255, 255, 255, .02); }
.p-pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.p-warn { background: rgba(246, 196, 83, .12); color: #f6d488; }
.p-time { background: rgba(255, 159, 67, .14); color: #ffbf80; }
.p-ban { background: rgba(255, 107, 107, .16); color: #ff9e9e; }
.p-perm { background: rgba(255, 70, 85, .28); color: #fff; }

/* report box at the end */
.r-help { display: flex; align-items: center; justify-content: space-between; gap: 20px 30px; margin-top: 10px; padding: 26px 30px; border-radius: 24px; border: 1px solid rgba(140, 150, 255, .3); background: radial-gradient(ellipse 60% 120% at 100% 50%, rgba(88, 101, 242, .16), transparent 70%), var(--card); }
.r-help h2 { font-size: 22px; font-weight: 600; }
.r-help p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.r-help p a { color: var(--accent); font-weight: 600; }
.dc-btn { flex: none; display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; background: #5865f2; color: #fff; font-weight: 600; transition: transform .2s, background .2s; }
.dc-btn:hover { transform: translateY(-2px); background: #6974f5; }

@media (max-width: 760px) {
  .r-help { flex-direction: column; align-items: stretch; padding: 22px; }
  .dc-btn { justify-content: center; }
  .r-wide .r-text ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .r-wide .r-text li::after { display: none; }
  /* each row becomes a small card: the reason, then one line per column */
  .r-text .md-table { border: 0; overflow: visible; }
  .r-text table, .r-text tbody, .r-text tr, .r-text td { display: block; }
  .r-text thead { display: none; }
  .r-text tbody { display: grid; gap: 10px; }
  .r-text tr { padding: 14px 16px; border: 1px solid rgba(255, 107, 107, .2); border-radius: 14px; background: rgba(255, 255, 255, .02); }
  .r-text td { padding: 0; border: 0; }
  .r-text tr { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
  .r-text td.r-reason { grid-column: 1 / -1; margin-bottom: 6px; font-weight: 600; }
  .r-text td.r-code + td.r-reason { grid-column: 2; margin-bottom: 0; }
  .r-text td.r-code { width: auto; padding: 0; }
  .r-text td.r-code ~ td.r-pun:first-of-type, .r-text td.r-reason + td.r-pun { margin-top: 4px; }
  .r-text td.r-pun { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; }
  .r-text td.r-none { display: none; }
  .r-text td.r-pun::before { content: attr(data-label); color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
  .r-grid { grid-template-columns: 1fr; }
  .r-card { padding: 22px; }
  .r-num { font-size: 56px; }
  .r-intro { padding: 20px; font-size: 16px; }
  .r-jump a { padding: 8px 13px; font-size: 13px; }
}
/* an odd number of rules: the last one fills the row instead of leaving a gap */
.r-card:not(.r-wide):nth-child(odd):has(+ .r-wide), .r-card:not(.r-wide):nth-child(odd):last-child { grid-column: 1 / -1; }
