/* Built by Kyle Bargman
   Rise of Warriors site style: dark, readable, works from phones to wide screens.
   Colours follow the lavender of the RoW banner; legacy page markup (font, center,
   tables) is tamed below so the old pages read well without being rewritten. */

:root {
  --bg: #121019;
  --panel: #1b1826;
  --panel-2: #241f33;
  --line: #3a3352;
  --text: #e4e0ee;
  --muted: #a69fbb;
  --accent: #b9b1ff;
  --accent-2: #8f84e8;
  --up: #5fd38d;
  --down: #ef6b6b;
  --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, #2a2346 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
}

a { color: var(--accent); text-decoration-color: rgb(185 177 255 / 40%); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #000; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* header */
.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1rem .75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.banner img {
  display: block;
  width: 100%;
  max-width: 765px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgb(0 0 0 / 45%);
}
.status {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .95rem;
  color: var(--muted);
}
.status .dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--down); }
.status.up .dot { background: var(--up); box-shadow: 0 0 10px var(--up); }
.play-btn {
  margin-left: .25rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: #0d0b14;
  font-weight: 700;
  text-decoration: none;
}
.play-btn:hover { background: var(--accent); color: #0d0b14; }

/* layout */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.site-nav {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem 1rem;
  font-size: .93rem;
}
.menu-btn { display: none; }
.site-nav h2 {
  margin: 1rem 0 .3rem;
  font: 700 .72rem/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .18rem .5rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.site-nav a:hover { background: var(--panel-2); color: #fff; }
.site-nav a.current { background: var(--panel-2); color: var(--accent); font-weight: 600; }
.site-nav a.home { font-weight: 600; }

.content {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem clamp(1rem, 3vw, 2.25rem) 2rem;
}

/* typography */
h1, h2, h3, h4, h5 { font-family: var(--serif); line-height: 1.25; color: #fff; }
.content h1 { margin: 0 0 1rem; font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: .01em; }
.content h2 { margin: 2rem 0 .6rem; font-size: 1.35rem; }
.content h3, .content h4, .content h5 { margin: 1.5rem 0 .4rem; font-size: 1.12rem; color: var(--accent); }
.content p, .content li { max-width: 75ch; }
.content p { margin: 0 0 1rem; }
.content img { max-width: 100%; height: auto; vertical-align: middle; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.content center { display: block; text-align: center; }
.content center p, .content center li { margin-inline: auto; }
.content font { color: inherit !important; font-size: inherit !important; font-family: inherit !important; }
.content b, .content strong { color: #fff; }
.content code, .content kbd { background: var(--panel-2); border-radius: 4px; padding: 0 .3em; }

/* old tables (monsters, stats) */
.content table {
  border-collapse: collapse;
  margin: 1rem 0;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  background: transparent !important;
  font-size: .93rem;
}
.content th, .content td {
  border: 1px solid var(--line);
  padding: .35rem .6rem;
  background: transparent !important;
  color: inherit !important;
  vertical-align: top;
}
.content th, .content tr:first-child td[bgcolor] { background: var(--panel-2) !important; color: #fff !important; }
.content tr:nth-child(even) td { background: rgb(255 255 255 / 2.5%) !important; }

pre.strategy {
  white-space: pre-wrap;
  font: .95rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.callout { padding: .8rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.callout.up { border-color: rgb(95 211 141 / 50%); }
.callout.down { border-color: rgb(239 107 107 / 50%); }

/* footer */
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  color: var(--muted);
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
}
.site-footer p { margin: 0; }

/* phones and small tablets: the menu folds up above the page */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .site-nav { position: static; max-height: none; order: 2; scroll-margin-top: 1rem; }
  .content { order: 1; }
  .menu-btn {
    display: inline-block;
    padding: .55rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
  }
  .site-nav ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .status { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
