:root {
  color-scheme: light;
  --red: #962b25;
  --red-dark: #671c1c;
  --gold: #f1c15a;
  --gold-pale: #fff4d8;
  --line: #e5c9a0;
  --paper: #fffdf8;
  --ink: #35251f;
  --muted: #725d4c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: #6f3220;
  background-image: linear-gradient(180deg, #3a19103d, #3a191085), url("rmbro-background.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font: 16px/1.75 "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--red); text-underline-offset: .2em; }
a:hover { color: var(--red-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #b87514;
  outline-offset: 3px;
}
.skip-link { position: absolute; top: -80px; left: 16px; padding: 10px 16px; background: white; z-index: 5; }
.skip-link:focus { top: 12px; }
.page-shell { max-width: 1320px; margin: 28px auto; background: var(--paper); box-shadow: 0 12px 45px #3b151729; }
.masthead {
  display: flex; justify-content: center; align-items: center;
  min-height: 330px; padding: 26px 38px;
  background: linear-gradient(180deg, #321a0d0d, #321a0d42), url("rmbro-background.png") center 48% / cover no-repeat;
  border-bottom: 4px solid var(--gold);
}
.site-logo {
  position: relative; display: block; width: min(460px, 100%); aspect-ratio: 3 / 2;
  background: url("rmbro-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 7px #29100873);
  color: #ffe3a0; text-decoration: none;
}
.logo-main, .logo-sub {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.page-nav { display: flex; flex-wrap: wrap; gap: 1px; background: #6d211e; padding: 6px; }
.page-nav a { color: #fff5d8; text-decoration: none; padding: 9px 15px; border-radius: 3px; }
.page-nav a:hover, .page-nav a[aria-current] { background: var(--gold); color: var(--red-dark); }
.site-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; padding: 24px; align-items: start; }
.sidebar { display: grid; gap: 18px; }
.side-box { border: 1px solid var(--line); background: #fff9eb; padding: 0 16px 14px; }
.side-box h2 { margin: 0 -16px 12px; background: var(--red); color: #fff1c8; padding: 8px 16px; font-size: 17px; }
.side-box p { font-size: 14px; margin: 10px 0 0; }
.server-list { font-size: 14px; margin: 0; }
.server-list div { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 5px 0; }
.server-list dt { color: var(--muted); }
.server-list dd { margin: 0; }
.content { min-width: 0; }
.content-box { border: 1px solid var(--line); padding: 24px; margin-bottom: 22px; background: #fffefa; }
.content-box:last-child { margin-bottom: 0; }
h1, h2, h3 { color: var(--red-dark); line-height: 1.45; }
h1 { margin: 0 0 20px; font-size: clamp(25px, 3vw, 32px); }
h2 { font-size: 22px; margin: 24px 0 12px; }
h3 { font-size: 18px; margin: 18px 0 10px; }
.content-box > h2:first-child { margin-top: 0; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
li { margin-bottom: 7px; }
ul, ol { padding-left: 1.7em; }
strong { font-weight: 700; }
code { padding: 1px 4px; border-radius: 3px; background: #f5e7d1; font-family: Consolas, monospace; font-size: .95em; }
.eyebrow { color: #8e631d; font-size: 14px; letter-spacing: .1em; }
.quick-links, .guide-directory-links, .ranking-categories, .ranking-pagination { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button-link, button, .guide-directory-links a, .ranking-categories a, .ranking-pagination > a {
  display: inline-block; border: 1px solid var(--red); border-radius: 3px;
  padding: 7px 13px; background: var(--red); color: #fff7dc; text-decoration: none;
  font: inherit; line-height: 1.5; cursor: pointer;
}
.button-link:hover, button:hover { background: var(--red-dark); color: white; }
.button-link.secondary, .guide-directory-links a, .ranking-pagination > a { background: var(--gold-pale); color: var(--red-dark); border-color: var(--line); }
.guide-directory-links a:hover, .ranking-pagination > a:hover { background: #ffe3a0; }
.guide-directory-section + .guide-directory-section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 5px; }
.job-step, .job-overview { margin-bottom: 28px; }
.job-step + .job-step { border-top: 1px solid var(--line); padding-top: 6px; }
.job-note, .job-warning, .notice { display: block; padding: 13px 16px; margin: 16px 0; background: var(--gold-pale); border-left: 4px solid #d69b32; }
.job-warning, .notice.error { background: #fff0df; border-left-color: #a23c2d; }
.data-table { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; color: var(--muted); padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; border: 1px solid var(--line); padding: 10px 12px; }
th { background: #f8e7bf; font-weight: 600; }
thead th { color: var(--red-dark); }
tbody tr:nth-child(even) td { background: #fff9eb; }
.plain-table th { min-width: 92px; }
details { margin: 14px 0; border: 1px solid var(--line); background: #fffefa; }
summary { cursor: pointer; padding: 13px 16px; color: var(--red-dark); background: var(--gold-pale); font-weight: 600; }
details[open] > summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.trans-build-body { padding: 16px 0; }
.trans-job-card { margin: 28px 0; }
.trans-job-hero { padding: 16px 20px; background: #f7e5bd; border-left: 5px solid var(--red); }
.trans-job-title { margin: 0 0 10px; }
.trans-job-summary { color: var(--muted); }
.trans-build-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.trans-panel { margin: 0 0 16px; }
.trans-panel h3 { margin-top: 0; }
.trans-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.trans-stat-grid div { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--gold-pale); }
.trans-stat-grid dd { margin: 0; font-weight: 700; }
.trans-build-role { color: var(--muted); font-size: 13px; font-weight: 400; }
.trans-skill-total { color: var(--red); }
.ranking-search, .ranking-jump { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
input, select { min-width: 0; max-width: 100%; border: 1px solid #bb9670; border-radius: 3px; padding: 7px 10px; color: var(--ink); background: white; font: inherit; }
.ranking-jump input { width: 76px; }
.ranking-categories a { background: var(--gold-pale); color: var(--red); }
.ranking-categories a[aria-current] { background: var(--red); color: white; }
.ranking-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.ranking-heading h2 { margin-top: 0; }
.ranking-total, .ranking-missing-time { color: var(--muted); font-size: 14px; }
.ranking-number, .ranking-position { font-variant-numeric: tabular-nums; }
.site-footer { padding: 20px; text-align: center; color: #80623a; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .page-shell { margin: 0; }
  .site-body { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .content { grid-row: 1; }
  .sidebar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sidebar > :first-child { grid-column: 1 / -1; }
  .masthead { min-height: 280px; padding: 18px 24px; }
  .site-logo { width: min(420px, 100%); }
  .page-nav a { padding: 9px 11px; }
}
@media (max-width: 560px) {
  .masthead { min-height: 0; padding: 16px; }
  .site-logo { width: min(360px, 100%); }
  .content-box { padding: 18px 15px; }
  .trans-build-layout, .sidebar { grid-template-columns: 1fr; }
  .page-nav { gap: 0; }
  .page-nav a { font-size: 14px; }
  th, td { padding: 8px; }
  .ranking-heading { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
