/* UO Reforged wiki, laid out like the OSRS wiki: sidebar, article on parchment, infobox on the right,
   drop tables with rarity chips. Loaded after site.css. */

.wiki {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ---------- sidebar ---------- */

.wiki-side {
  position: sticky;
  top: 84px;
  color: #e2cf9f;
  font-size: 15px;
}
.wiki-side .wiki-name {
  display: block;
  font-family: var(--title-font);
  font-size: 24px;
  line-height: 1.05;
  color: var(--gold-hi);
  text-decoration: none;
  margin: 0 0 12px;
}
.wiki-search {
  width: 100%;
  margin: 0 0 18px;
  padding: 8px 10px;
  font: 15px var(--body-font);
  color: #f0e4c6;
  background: rgba(10, 7, 4, .7);
  border: 1px solid var(--gold-lo);
  border-radius: var(--radius);
}
.wiki-search::placeholder { color: #8f7d5c; }
.wiki-side h4 {
  margin: 16px 0 4px;
  font: 13px/1 var(--body-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.wiki-side ul { list-style: none; margin: 0; padding: 0; }
.wiki-side li a {
  display: block;
  padding: 3px 8px;
  color: #e2cf9f;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.wiki-side li a:hover { color: var(--gold-hi); border-left-color: var(--gold-lo); }
.wiki-side li a[aria-current="page"] { color: var(--gold-hi); border-left-color: var(--gold); background: rgba(214, 174, 88, .08); }

.wiki-side .soon {
  display: block;
  padding: 3px 8px;
  color: #7d6c50;
  border-left: 2px solid transparent;
  cursor: default;
}
.wiki-side .soon::after { content: " · soon"; font-size: 12px; color: #5f523c; }

/* search: results drop down under the box */
.wiki-search-box { position: relative; margin: 0 0 18px; }
.wiki-search-box .wiki-search { margin: 0; }
.wiki-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #f0e6cc;
  border: 1px solid var(--gold-lo);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .6);
}
.wiki-results a {
  display: block;
  padding: 5px 10px;
  color: #2b1e10;
  text-decoration: none;
  border-left: 0;
}
.wiki-results a span { display: block; font-size: 12px; color: var(--ink-soft); }
.wiki-results a:hover, .wiki-results a.active { background: #dcc9a0; }
.wiki-results .none { padding: 5px 10px; color: var(--ink-soft); }

/* ---------- article ---------- */

.article {
  padding: 18px 28px 30px;
}
.crumbs { font-size: 14px; color: var(--ink-soft); margin: 0 0 4px; }
.crumbs a { color: var(--ink-soft); }
.article h1 {
  font-family: var(--title-font);
  font-weight: normal;
  font-size: 44px;
  line-height: 1.05;
  color: #2c1d0c;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(92, 66, 30, .45);
}
.article h2 {
  font-family: var(--title-font);
  font-weight: normal;
  font-size: 30px;
  color: #2c1d0c;
  margin: 26px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(92, 66, 30, .35);
  clear: left;
}
.article h3 { font-size: 22px; margin: 18px 0 6px; }
.article p { margin: 0 0 12px; }

/* ---------- infobox ---------- */

.infobox {
  float: right;
  width: 300px;
  margin: 0 0 18px 24px;
  border: 1px solid #3b2a14;
  outline: 1px solid var(--gold-lo);
  outline-offset: 2px;
  background: #e4d6b4;
  font-size: 15px;
  border-collapse: collapse;
}
.infobox caption {
  caption-side: top;
  font-family: var(--title-font);
  font-size: 24px;
  color: #f3dc9e;
  background: linear-gradient(180deg, #2c1f12, #1b130b);
  padding: 9px 10px 6px;
  border: 1px solid #3b2a14;
  border-bottom: 0;
  text-shadow: 0 2px 0 #000;
}
.infobox .pic td {
  text-align: center;
  padding: 16px 0;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(255, 248, 225, .9), rgba(214, 196, 156, .6) 70%);
  border-bottom: 1px solid rgba(92, 66, 30, .35);
}
.infobox .pic img { image-rendering: pixelated; width: auto; height: 150px; }
.infobox .head th {
  background: #c9b48a;
  color: #2c1d0c;
  font-family: var(--title-font);
  font-weight: normal;
  font-size: 17px;
  padding: 5px 10px 3px;
  text-align: center;
  border-top: 1px solid rgba(92, 66, 30, .4);
  border-bottom: 1px solid rgba(92, 66, 30, .4);
}
.infobox th[scope="row"] {
  text-align: left;
  font-weight: 600;
  color: #4a3720;
  padding: 4px 10px;
  width: 44%;
  vertical-align: top;
}
.infobox td { padding: 4px 10px; vertical-align: top; }
.infobox tr + tr th[scope="row"], .infobox tr + tr td { border-top: 1px solid rgba(92, 66, 30, .15); }
.infobox .stats td { text-align: center; padding: 6px 4px; }
.infobox .stats b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b5435; font-weight: 600; }

/* ---------- tables ---------- */

.wikitable {
  width: auto;                    /* sits beside the infobox instead of dropping below it */
  min-width: min(100%, 560px);
  border-collapse: collapse;
  margin: 6px 0 16px;
  background: #e4d6b4;
  font-size: 16px;
}
.wikitable th {
  background: #c9b48a;
  color: #2c1d0c;
  text-align: left;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid #9e8659;
}
.wikitable td {
  padding: 5px 10px;
  border: 1px solid #b59f72;
  vertical-align: middle;
}
.wikitable tbody tr:nth-child(even) td { background: rgba(255, 250, 235, .35); }
.wikitable .icon { width: 52px; text-align: center; padding: 2px; }
.wikitable .icon img { image-rendering: pixelated; max-width: 44px; max-height: 40px; vertical-align: middle; }
.wikitable .num { text-align: right; white-space: nowrap; }
.wikitable .rarity { width: 90px; }
.wikitable .magic { color: #1d4f8a; font-weight: 600; }
.wikitable .note { display: block; font-size: 13px; color: var(--ink-soft); }

/* rarity chips, the OSRS wiki's colors */
.rarity { text-align: center; white-space: nowrap; font-weight: 600; color: #1b1208; }
.r-always   { background: #afeeee !important; }
.r-common   { background: #56e156 !important; }
.r-uncommon { background: #ffed4c !important; }
.r-rare     { background: #ff863c !important; }
.r-veryrare { background: #ff6262 !important; }

.article .rewards { padding-left: 22px; margin: 6px 0 14px; }
.article .rewards li { margin: 6px 0; }

.drops-note { font-size: 14px; color: var(--ink-soft); margin-top: -6px; }

.generated { clear: both; margin: 28px 0 0; font-size: 13px; color: var(--ink-soft); }
.link-row { line-height: 1.9; }
.article .link-list { padding-left: 20px; }
.article .link-list li { margin: 3px 0; }

/* monster lists: small pictures */
.monster-list .icon img { max-width: 40px; max-height: 40px; }
.monster-list td { padding-top: 3px; padding-bottom: 3px; }

/* monsters page: bestiary tiles + picture grid (mockup C) */
.article .lead { color: var(--ink-soft); margin-bottom: 6px; }
.bestiary-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}
.bestiary-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: #f3dc9e;
  background: linear-gradient(180deg, #2c1f12, #1b130b);
  border: 1px solid var(--gold-lo);
  border-radius: 3px;
}
.bestiary-tile:hover { border-color: var(--gold); color: var(--gold-hi); }
.bestiary-tile img { image-rendering: pixelated; max-height: 44px; max-width: 52px; }
.bestiary-tile b { display: block; font-family: var(--title-font); font-weight: normal; font-size: 20px; line-height: 1; }
.bestiary-tile small { color: #cbb685; font-size: 13px; }
.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}
.bestiary-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 6px;
  text-decoration: none;
  color: #3a2810;
  background: rgba(255, 250, 235, .38);
  border: 1px solid rgba(181, 159, 114, .5);
  border-radius: 3px;
}
.bestiary-cell:hover { background: rgba(255, 250, 235, .75); border-color: #9e8659; color: var(--link-hover); }
.bestiary-cell .pic { height: 58px; display: flex; align-items: flex-end; }
.bestiary-cell img { image-rendering: pixelated; max-height: 58px; max-width: 90px; }
.bestiary-cell span { font-size: 14px; text-align: center; line-height: 1.2; margin-top: 5px; }
.bestiary-cell small { font-size: 12px; text-align: center; line-height: 1.2; margin-top: 2px; color: var(--ink-soft); font-style: italic; }

/* main page */
.wiki-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin: 18px 0 6px;
}
.wiki-card {
  display: block;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 250, 235, .45);
  border: 1px solid #b59f72;
  box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .35);
}
a.wiki-card:hover { background: rgba(255, 250, 235, .75); color: var(--ink); }
.wiki-card h3 { margin: 0 0 4px; }
.wiki-card p { margin: 0; font-size: 15px; }
.soon-card { opacity: .7; }

@media (max-width: 980px) {
  .wiki { grid-template-columns: 1fr; }
  .wiki-side { position: static; }
  .infobox { float: none; width: 100%; margin: 0 0 18px; }
}

/* guides (Getting started) */
.toc { display: inline-block; margin: 4px 0 6px; padding: 10px 22px 12px 16px; background: rgba(255,250,235,.5); border: 1px solid #b59f72; font-size: 15px; }
.toc b { display: block; font-family: var(--title-font); font-weight: normal; font-size: 19px; color: #3d2810; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 40px; }
.toc li { margin: 2px 0; }
.toc a { color: var(--link); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.tip { margin: 12px 0 16px; padding: 10px 14px 10px 14px; background: rgba(214,174,88,.16); border-left: 4px solid var(--gold-lo); font-size: 16px; }
.tip b { color: #5a3a14; }
.note-alpha { margin: 12px 0 16px; padding: 10px 14px; background: rgba(140,60,40,.1); border-left: 4px solid #8a3a28; font-size: 16px; }
.guide ul { padding-left: 22px; margin: 4px 0 12px; }
.guide li { margin: 4px 0; }
.guide kbd { font: 600 14px/1 Consolas, monospace; background: rgba(90,60,20,.12); border: 1px solid rgba(92,66,30,.35); border-radius: 3px; padding: 2px 6px; }
.play-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 8px; }
.play-cards .wiki-card h3 { font-size: 20px; }
.play-cards .wiki-card p { font-size: 15px; }
.placeholder { color: var(--ink-soft); font-style: italic; }

/* slayer (wiki/slayer, written by [WikiGen) */
.slayer-tasks { width: 100%; }
.slayer-tasks td, .slayer-tasks th { vertical-align: middle; }
.slayer-tasks tr.boss td { background: rgba(140, 60, 40, .08) !important; }
.slayer-tasks .icon img { max-height: 36px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #fff4dc; background: #8a3a28; border-radius: 3px; vertical-align: 2px; }
.wikitable.compact td, .wikitable.compact th { padding: 4px 9px; }
.table-scroll { overflow-x: auto; margin-bottom: 12px; }
.table-scroll .wikitable { margin-bottom: 0; }
.navbox { width: 100%; clear: both; margin: 28px 0 6px; border-collapse: collapse; border: 1px solid #b59f72; font-size: 15px; background: rgba(255,250,235,.45); }
.navbox th, .navbox td { padding: 6px 10px; border-top: 1px solid rgba(92, 66, 30, .18); text-align: left; }
.navbox th { width: 110px; background: rgba(181, 159, 114, .35); color: #3d2810; font-weight: 600; white-space: nowrap; }
.navbox .navbox-title { width: auto; text-align: center; font-family: var(--title-font); font-weight: normal; font-size: 19px; background: rgba(61, 40, 16, .85); }
.navbox .navbox-title a { color: #f0d690; text-decoration: none; }
