/* Guardians of Solaria - the Codex. On top of css/site.css (palette, top bar, footer, buttons).
   Source: the game repo's tools/community/codex_site_assets/codex.css, copied here by codex_site.py. Do not edit the copy. */
:root { --r-common: #bec2cc; --r-uncommon: #66cc6e; --r-rare: #6b93ff; --r-epic: #b877ff; --r-legendary: #f5a442; --bar: 55px; }
body.cx { overflow-x: clip; }
.cx-main { padding-top: var(--bar); min-height: 70vh; }
.cx a { text-underline-offset: 2px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.topbar nav a[aria-current="page"] { color: var(--amber); }
.cx .topbar nav a, .cx .topbar .brand span { white-space: nowrap; }
@media (max-width: 1079px) { .cx .topbar nav { display: none; } }

/* section menu: one scrolling row under the top bar */
.cx-nav { position: sticky; top: var(--bar); z-index: 40; background: rgba(16, 17, 24, 0.96); border-bottom: 1px solid rgba(201, 162, 75, 0.2); }
.cx-nav .wrap { display: flex; gap: 0.4rem; overflow-x: auto; padding-block: 0.55rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cx-nav .wrap::-webkit-scrollbar { display: none; }
.cx-nav a { flex: none; padding: 0.32rem 0.8rem; border-radius: 999px; border: 1px solid rgba(201, 162, 75, 0.28); color: var(--bone-dim); text-decoration: none; font-weight: 800; font-size: 0.8rem; white-space: nowrap; }
.cx-nav a:hover { color: var(--amber); border-color: var(--amber); }
.cx-nav a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #1a1408; }

.cx-head { padding: clamp(1.6rem, 5vw, 3rem) 0 clamp(1rem, 3vw, 1.6rem); max-width: 48rem; }
.cx-head h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); margin-bottom: 0.35em; background: linear-gradient(180deg, #fff3d6, var(--gold-light) 45%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cx-head .lead { color: var(--bone-dim); margin: 0; }
.cx h2 { font-size: clamp(1.3rem, 3.6vw, 1.9rem); margin: 2.2rem 0 0.5rem; scroll-margin-top: 120px; }
.cx h3 { font-size: 1.05rem; margin: 0; }
.cx h4 { font-size: 0.98rem; margin: 0 0 0.2rem; }
[id] { scroll-margin-top: 118px; }

/* search and filters */
.cx-tools { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; }
.cx-search input { width: 100%; max-width: 30rem; padding: 0.75rem 1rem 0.75rem 2.6rem; border-radius: 999px; border: 1px solid rgba(201, 162, 75, 0.45); background: rgba(27, 29, 39, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a24b' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.9rem center / 1.1rem; color: var(--bone); font: 700 1rem var(--font-body); }
[dir="rtl"] .cx-search input { padding: 0.75rem 2.6rem 0.75rem 1rem; background-position: right 0.9rem center; }
.cx-search input:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
.cx-search input::placeholder { color: var(--bone-dim); font-weight: 400; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cx-chips .chip { padding: 0.32rem 0.8rem; font-size: 0.78rem; }
.cx-count, .cx-none { margin: 0; font-size: 0.85rem; }
[hidden] { display: none !important; }

/* index */
.cx-global { position: relative; margin-bottom: 1.6rem; }
.cx-global .cx-search input { max-width: 40rem; font-size: 1.05rem; padding-block: 0.9rem; }
.cx-results { display: grid; gap: 0.35rem; margin-top: 0.8rem; max-width: 40rem; }
.cx-results a { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.7rem; border-radius: 10px; background: rgba(42, 44, 58, 0.6); border: 1px solid rgba(201, 162, 75, 0.16); text-decoration: none; color: var(--bone); font-weight: 800; }
.cx-results a:hover, .cx-results a:focus-visible { border-color: var(--amber); }
.cx-results img { width: 36px; height: 36px; flex: none; object-fit: contain; }
.cx-results small { display: block; color: var(--bone-dim); font-weight: 400; font-size: 0.78rem; }
.cx-sections { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); padding-bottom: 3rem; }
.cx-section { display: flex; gap: 0.9rem; align-items: center; padding: 1rem; border-radius: var(--radius); text-decoration: none; color: var(--bone); background: linear-gradient(160deg, rgba(58, 44, 36, 0.55), rgba(27, 29, 39, 0.9)); border: 1px solid rgba(201, 162, 75, 0.25); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.cx-section:hover, .cx-section:focus-visible { transform: translateY(-3px); border-color: var(--amber); box-shadow: 0 12px 30px rgba(245, 164, 66, 0.16); }
.cx-section img { width: 64px; height: 64px; flex: none; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.cx-section b { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-light); }
.cx-section small { display: block; color: var(--bone-dim); font-size: 0.82rem; line-height: 1.4; }
.cx-section em { display: block; margin-top: 0.25rem; font-style: normal; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }

/* cards */
.cx-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-bottom: 1.2rem; }
.cx-card, .cx-boss, .cx-ability, .cx-chest { position: relative; min-width: 0; padding: 0.9rem; border-radius: var(--radius); background: rgba(42, 44, 58, 0.55); border: 1px solid rgba(201, 162, 75, 0.18); border-inline-start: 3px solid var(--c, rgba(201, 162, 75, 0.5)); }
.cx-card .top, .cx-boss .top { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.6rem; }
.cx-card .top > img, .cx-boss .top > img { flex: none; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }
.cx-card .top > div, .cx-boss .top > div { min-width: 0; }
.cx-card h3, .cx-boss h3 { overflow-wrap: anywhere; line-height: 1.25; font-family: var(--font-body); font-weight: 800; }
.cx-card .n { font-family: var(--font-display); font-size: 0.74rem; color: var(--amber); letter-spacing: 0.1em; }
.cx-card p, .cx-boss p { margin: 0.35rem 0 0; font-size: 0.88rem; }
.cx-card .desc { color: var(--bone-dim); font-style: italic; }
.cx-card .where { font-size: 0.8rem; color: var(--bone-dim); }
.meta { font-size: 0.8rem; color: var(--bone-dim); }
.k { color: var(--gold); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; margin-inline-end: 0.3rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fact { padding: 0.28rem 0.6rem; border-radius: 9px; background: rgba(16, 17, 24, 0.55); border: 1px solid rgba(201, 162, 75, 0.14); line-height: 1.25; }
.fact span { display: block; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bone-dim); }
.fact b { font-size: 0.92rem; color: var(--bone); }
.pill { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; background: rgba(201, 162, 75, 0.14); border: 1px solid rgba(201, 162, 75, 0.3); font-size: 0.76rem; font-weight: 800; color: var(--gold-light); white-space: nowrap; }
.pill.stat { background: rgba(63, 203, 142, 0.12); border-color: rgba(63, 203, 142, 0.35); color: #9fe6c5; }
.pill.sig { background: rgba(245, 164, 66, 0.18); border-color: var(--amber); color: var(--amber); }
.tags, .stats { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin-top: 0.5rem; }
.anchor { opacity: 0; margin-inline-start: 0.25rem; color: var(--gold); text-decoration: none; font-weight: 400; }
article:hover .anchor, section:hover > .g-head .anchor, .anchor:focus-visible { opacity: 0.8; }
@media (hover: none) { .anchor { opacity: 0.45; } }
:target { border-color: var(--amber) !important; box-shadow: 0 0 0 2px rgba(245, 164, 66, 0.55), 0 0 30px rgba(245, 164, 66, 0.25); }

/* rarity and realm colours */
.r-common { --c: var(--r-common); } .r-uncommon { --c: var(--r-uncommon); } .r-rare { --c: var(--r-rare); } .r-epic { --c: var(--r-epic); } .r-legendary { --c: var(--r-legendary); }
.rar, a.r-common, a.r-uncommon, a.r-rare, a.r-epic, a.r-legendary { color: var(--c); font-weight: 800; }
.item h3 { color: var(--c); }
.realm-1 { --c: #e0a030; } .realm-2 { --c: #6fd36c; } .realm-3 { --c: #ff7a2e; }
a.boss { color: #ff6b81; font-weight: 800; }
.odds { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.odd { padding: 0.1rem 0.45rem; border-radius: 7px; border: 1px solid var(--c); color: var(--c); font-weight: 800; font-size: 0.8rem; direction: ltr; }
.legend { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.82rem; margin-top: 0.6rem; }

/* groups */
.cx-group { padding: 0; border: 0 !important; }
.group-head { display: flex; gap: 0.8rem; align-items: center; margin: 1.6rem 0 0.9rem; }
.group-head img { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 50%; }
.group-head h2 { margin: 0; color: var(--c, var(--bone)); }
.group-head p { margin: 0; font-size: 0.88rem; }

/* guardians */
.cx-jump { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.5rem; }
.cx-jump a { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.9rem 0.3rem 0.3rem; border-radius: 999px; border: 1px solid rgba(201, 162, 75, 0.35); background: rgba(27, 29, 39, 0.8); text-decoration: none; color: var(--bone); font-weight: 800; }
[dir="rtl"] .cx-jump a { padding: 0.3rem 0.3rem 0.3rem 0.9rem; }
.cx-jump img { width: 40px; height: 40px; border-radius: 50%; }
.cx-guardian { padding: 1.6rem 0 1rem; border-top: 1px solid rgba(201, 162, 75, 0.14) !important; }
.g-gareth { --c: var(--gareth); } .g-elora { --c: var(--elora); } .g-alistair { --c: var(--alistair); } .g-lyra { --c: var(--lyra); }
.g-head { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.g-head .face { width: 128px; height: 128px; flex: none; border-radius: 50%; border: 3px solid var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); background: var(--slate-2); }
.g-head > div { flex: 1 1 260px; min-width: 0; }
.g-head h2 { margin: 0 0 0.3rem; color: var(--c); }
.g-head .eyebrow { margin-bottom: 0.3rem; } .g-head .eyebrow img { width: 22px; height: 22px; }
.g-head .lead { font-size: 1rem; margin-bottom: 0.6rem; }
.g-head .muted { font-size: 0.88rem; margin: 0.6rem 0 0; }
.cx-guardian h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 1.5rem 0 0.7rem; }
.cx-abilities { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cx-ability { display: flex; gap: 0.8rem; align-items: flex-start; }
.cx-ability > img { flex: none; width: 64px; height: 64px; border-radius: 14px; }
.cx-ability > div { min-width: 0; }
.cx-ability .slot { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--c, var(--amber)); font-weight: 800; }
.cx-ability .facts { margin-top: 0.3rem; }
.cx-tiers { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cx-tier { padding: 0.8rem; border-radius: var(--radius); background: rgba(27, 29, 39, 0.7); border: 1px solid rgba(201, 162, 75, 0.16); display: grid; gap: 0.6rem; }
.cx-tier .lvl { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c, var(--amber)); }
.talent { display: flex; gap: 0.6rem; align-items: flex-start; border-radius: 10px; }
.talent img { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.talent b { font-size: 0.92rem; margin-inline-end: 0.3rem; }
.talent p { margin: 0.1rem 0 0; font-size: 0.84rem; color: var(--bone-dim); }

/* bosses */
.cx-list { display: grid; gap: 0.9rem; }
.cx-boss { display: grid; gap: 0.9rem; }
@media (min-width: 860px) { .cx-boss { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: start; } }
.cx-boss .face { width: 72px; height: 72px; border-radius: 16px; }
.cx-boss h3 { font-family: var(--font-display); font-size: 1.25rem; color: #ff8a9b; }
.b-pic { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(201, 162, 75, 0.25); background: #1b1d27; }
.b-pic img { width: 100%; }
.spoiler { margin-top: 0.7rem; border-radius: 10px; border: 1px dashed rgba(201, 162, 75, 0.4); background: rgba(16, 17, 24, 0.5); }
.spoiler summary { cursor: pointer; padding: 0.5rem 0.8rem; font-weight: 800; font-size: 0.85rem; color: var(--gold-light); }
.spoiler[open] summary { border-bottom: 1px dashed rgba(201, 162, 75, 0.3); }
.spoiler h4, .spoiler p, .spoiler blockquote { margin: 0.6rem 0.8rem; }
.spoiler blockquote { padding-inline-start: 0.8rem; border-inline-start: 3px solid #ff6b81; font-style: italic; color: var(--bone); }
.spoiler p { color: var(--bone-dim); font-size: 0.9rem; padding-bottom: 0.3rem; }

/* chests, rules, tables */
.cx-chests { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); margin-bottom: 1.2rem; }
.cx-chest { display: flex; gap: 0.9rem; align-items: center; }
.cx-chest img { flex: none; width: 112px; height: 112px; object-fit: contain; }
.cx-chest ul, .cx-rules ul { margin: 0.4rem 0 0; padding-inline-start: 1.1rem; font-size: 0.88rem; display: grid; gap: 0.25rem; }
.cx-rules { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; padding: 1.1rem; border-radius: var(--radius); background: linear-gradient(160deg, rgba(58, 44, 36, 0.5), rgba(27, 29, 39, 0.85)); border: 1px solid rgba(201, 162, 75, 0.25); }
.cx-rules > img { width: 112px; height: 112px; flex: none; }
.cx-rules > div { flex: 1 1 280px; min-width: 0; }
.cx-rules h2 { margin-top: 0; }
.cx-rules ul { font-size: 0.95rem; gap: 0.5rem; }
.cx-rules b { color: var(--gold-light); }
.cx-scroll { overflow-x: auto; margin: 0.6rem 0 1.4rem; border-radius: var(--radius); border: 1px solid rgba(201, 162, 75, 0.2); -webkit-overflow-scrolling: touch; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: rgba(27, 29, 39, 0.7); }
.cx-table th, .cx-table td { padding: 0.55rem 0.8rem; text-align: start; vertical-align: middle; border-bottom: 1px solid rgba(201, 162, 75, 0.12); }
.cx-table th { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); background: rgba(16, 17, 24, 0.7); white-space: nowrap; }
.cx-table tr:last-child td { border-bottom: 0; }
.cx-table.tall td { padding-block: 0.35rem; }
.cx footer { margin-top: 3rem; }
@media (min-width: 720px) { .cx footer .cols { grid-template-columns: 1.3fr 1fr 1.3fr; } }
@media (max-width: 520px) { .topbar .btn-small { display: none; } .langs { margin-inline-end: 0; } .g-head .face { width: 96px; height: 96px; } .cx-chest img { width: 84px; height: 84px; } }
