/* Taskbar Fantasy - the official wiki, in the website's own skin.
   The tokens, fonts and parts are taskbar-fantasy.web.app's (static/css/tbf.css), which follow
   ui/design-system/SPEC.md: the game client's "SoC F3" UI rebuilt for the web. The chrome is the
   client's own 1.5x sprites, shown 1:1 from assets/ui/ (copied byte-for-byte from the site's static/ui/),
   so a panel here is the same window a player sees in the game and on the site's home page. */

@font-face { font-family: "Merriweather"; font-weight: 400; font-display: swap; src: url(assets/fonts/merriweather-regular.woff2) format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 700; font-display: swap; src: url(assets/fonts/merriweather-bold.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url(assets/fonts/chakrapetch-semibold.woff2) format("woff2"); }

:root {
  /* surfaces (SPEC 6) */
  --fill: #33373F; --rec: #272C37; --olive: #3B3220; --gold: #C1B47B; --goldHi: #D8CC98; --key: #46413E;
  --rib: #56586F; --ribHi: #6B6D86; --slab: #3E4152; --page: #DFD9C9; --page2: #EFE9D9;
  --tileGold: #C8B180; --pill: #3D4051; --disc: #272D35;
  /* inks (SPEC 2.4) */
  --cream: #F0EBD8; --body: #D9D3C0; --dim: #B9B3A2; --faint: #8F8D9C; --number: #E0683E; --danger: #EE8F80;
  --gain: #9FD87A; --parch: #4A4036; --parchDark: #3A3226;
  /* the desktop the game floats on */
  --desk: #1D2026; --desk2: #22252C; --black: #07080B;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: "Merriweather", Georgia, serif;
  --num: "Chakra Petch", "Merriweather", sans-serif;
  --max: 1240px; --gut: 24px;
  /* the names the page code's inline styles still use, mapped onto the site's inks */
  --text: var(--cream); --text-muted: var(--dim); --boss: var(--danger); --cardp: var(--goldHi);
  --act1: var(--gain); --act2: #E9A86A; --act3: #B7A8EE;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--desk); color: var(--body);
  font: 400 16px/1.65 var(--serif); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, .display { font-family: var(--serif); font-weight: 700; color: var(--cream); }
a { color: var(--goldHi); text-decoration: none; }
a:hover { color: var(--cream); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--goldHi); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ---------------------------------------------------------------- site header (the site's own .gnav) */
.gnav { position: sticky; top: 0; z-index: 60; height: 52px; background: rgba(10, 11, 14, .86);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08); }
.gnav .gbar { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); height: 100%; display: flex; align-items: center; gap: 28px; }
.gnav .brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--cream); font: 700 15px/1 var(--serif); }
.gnav .brand img { height: 26px; width: auto; }
.gnav nav { display: flex; gap: 26px; }
.gnav nav a { font: 400 14px/1 var(--sans); color: rgba(240, 235, 216, .78); }
.gnav nav a:hover, .gnav nav a[aria-current] { color: #fff; }

/* ---------------------------------------------------------------- the wiki's own bar: the strip's slate band */
.subnav { position: sticky; top: 52px; z-index: 50; background: var(--rec);
  border-bottom: 1px solid var(--olive); box-shadow: inset 0 -3px 0 -2px var(--gold); }
.subnav .sbar { max-width: var(--max); margin: 0 auto; padding: 10px var(--gut); display: flex; align-items: center; gap: 16px; }
.subnav .sublinks { display: flex; flex-wrap: wrap; gap: 6px 4px; flex: 1; min-width: 0; }
.subnav .sublinks::-webkit-scrollbar { display: none; }
/* capsule sub-tab (144x24 at 1x): idle slate, active gold field */
.subnav .sublinks a {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 34px; padding: 0 6px; border: 0 solid transparent; border-width: 0 18px;
  border-image: url(assets/ui/capsule_off_144x24.png) 0 20 fill / 0 18px stretch;
  font: 700 14px/1 var(--serif); color: var(--cream); white-space: nowrap;
}
.subnav .sublinks a:hover { color: var(--goldHi); }
.subnav .sublinks a.active { border-image-source: url(assets/ui/capsule_on_144x24.png); color: var(--parchDark); }

/* search: the recessed box */
.searchwrap { position: relative; flex: 0 0 300px; max-width: 100%; }
.searchbox {
  width: 100%; height: 36px; padding: 0 34px 0 34px; outline: none;
  border: 5px solid transparent; border-image: url(assets/ui/desc_box.png) 5 fill / 5px stretch;
  background: none; color: var(--cream); font: 400 14px/1 var(--serif);
}
.searchbox::placeholder { color: var(--faint); }
.searchbox:focus { filter: brightness(1.12); }
.searchwrap::before { content: "\2315"; position: absolute; left: 12px; top: 50%; transform: translateY(-55%); color: var(--faint); pointer-events: none; }
.searchwrap .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px/1 var(--num);
  color: var(--faint); border: 1px solid var(--rib); border-radius: 3px; padding: 2px 5px; pointer-events: none; }
.searchbox:focus + .kbd { display: none; }
.results {
  position: absolute; left: -6px; right: -6px; top: calc(100% + 6px); z-index: 70; display: none;
  border: 14px solid transparent; border-image: url(assets/ui/tip_card_240x180.png) 18 fill / 18px stretch;
  padding: 2px 0; max-height: 70vh; overflow-y: auto; box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.results.show { display: block; }
.results a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; color: var(--body); font-size: 14px; border-radius: 3px; }
.results a:hover, .results a.sel { background: rgba(216, 204, 152, .14); color: var(--cream); }
.results .rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .rk { flex: none; font: 700 11px/1 var(--serif); color: var(--gold); }
.results .empty { padding: 12px; font-size: 14px; color: var(--faint); text-align: center; }

/* ---------------------------------------------------------------- page hero: the title screen's sky */
.hero {
  position: relative; text-align: center; padding: 56px 20px 46px; margin: 0 calc(50% - 50vw) 34px;
  background:
    radial-gradient(120% 70% at 78% -10%, rgba(255, 247, 222, .45), rgba(255, 247, 222, 0) 55%),
    linear-gradient(180deg, #3E77BD 0%, #5E9AD8 55%, #8DBFEB 100%);
  border-bottom: 1px solid var(--olive); box-shadow: inset 0 -3px 0 -2px var(--gold);
}
.hero .eyebrow { font: 600 15px/1.2 var(--sans); color: #FFF6DA; text-shadow: 0 1px 2px rgba(20, 50, 100, .5); }
.hero h1 { margin: 12px 0 10px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.12; color: #fff;
  text-shadow: 0 2px 0 rgba(22, 52, 100, .35), 0 6px 22px rgba(18, 44, 92, .45); text-wrap: balance; }
.hero p { max-width: 720px; margin: 0 auto; font-size: 17px; color: #fff; text-shadow: 0 1px 2px rgba(20, 50, 100, .55); }
.hero p a, .hero p .xlink { color: #FFF6DA; border-bottom-color: rgba(255, 246, 218, .6); }
.hero .divider { display: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px auto 26px; color: var(--gold); max-width: 520px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider .gem { font-size: 11px; letter-spacing: .4em; }

/* ---------------------------------------------------------------- windows (panel_frame 9-slice) */
.panel {
  position: relative; border: 14px solid transparent;
  border-image: url(assets/ui/panel_frame.png) 60 fill / 60px stretch; color: var(--body);
}
.panel.pad { padding: 18px 18px 16px; }
/* a panel's first h2 is its header ribbon (310x38 at 1x: pointed ends + filigree, centre stretches) */
.block { padding: 18px 18px 16px; margin-bottom: 22px; container-type: inline-size; }
.block:has(> h2) { padding-top: 58px; }
.block > h2 {
  position: absolute; left: -8px; right: -8px; top: -6px; height: 57px; margin: 0;
  display: block; text-align: center; padding: 0;
  border: 0 solid transparent; border-width: 0 118px;
  border-image: url(assets/ui/header_hero.png) 0 118 fill / 0 118px stretch;
  font: 700 18px/55px var(--serif); color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* a narrow window (a side column, a phone) keeps the ribbon's ends but shortens them */
@container (max-width: 460px) { .block > h2 { border-width: 0 64px; border-image-width: 0 64px; font-size: 15.5px; } }
@container (max-width: 300px) { .block > h2 { border-width: 0 40px; border-image-width: 0 40px; font-size: 14px; } }
.block p { margin: 0 0 10px; font-size: 15px; color: var(--body); }
.block p:last-child { margin-bottom: 0; }
.block p b, .block li b { color: var(--cream); }
.block ul { margin: 0 0 10px; padding-left: 20px; font-size: 15px; }
.block .empty { font-size: 14px; color: var(--faint); font-style: italic; }
.block .mut, .mut { color: var(--dim); }

/* section headings between windows */
.zone-head { text-align: center; margin: 46px 0 26px; }
.zone-head .z-eyebrow { font: 700 15px/1.2 var(--serif); color: var(--gold); }
.zone-head h2 { margin: 8px 0 0; font-size: clamp(22px, 3vw, 28px); text-wrap: balance; }
.zone-head .divider { margin-top: 12px; }
.zone-note { font-size: 15px; color: var(--dim); max-width: 700px; margin: 10px auto 0; }
.act1 .z-eyebrow { color: var(--gain); } .act2 .z-eyebrow { color: #E9A86A; } .act3 .z-eyebrow { color: #B7A8EE; }
.tier-sep { display: flex; align-items: center; gap: 12px; margin: 40px 0 12px; }
.zone-head + .tier-sep { margin-top: 18px; }
.tier-sep .t-mark { font-size: 11px; flex: none; color: var(--gold); }
.tier-sep h2 { margin: 0; font: 700 17px/1.2 var(--serif); color: var(--cream); white-space: nowrap; }
.tier-sep .t-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .7; }
.tier-sep .t-count { display: inline-grid; place-items: center; min-width: 33px; height: 24px; padding: 0 6px;
  border: 4px solid transparent; border-image: url(assets/ui/level_shield.png) 4 fill / 4px stretch;
  font: 600 13px/1 var(--num); color: var(--cream); }
.tier-note { font-size: 15px; color: var(--dim); margin: 0 0 16px; }

/* ---------------------------------------------------------------- chips, pills, badges */
.chips, .droprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid;
  font: 700 12px/1.4 var(--serif); white-space: nowrap;
}
.chip.race, .chip.size, .chip.neutralchip { color: var(--body); border-color: var(--rib); background: var(--pill); }
a.chip:hover { filter: brightness(1.18); }
.el-water   { color: #9CCBFF; border-color: #3E6A9A; background: #22344A; }
.el-earth   { color: #B8D99A; border-color: #5A7A43; background: #2A3624; }
.el-wind    { color: #9DE6D6; border-color: #3F7A6E; background: #213732; }
.el-fire    { color: #FFAE86; border-color: #9A5236; background: #3E2620; }
.el-neutral { color: var(--body); border-color: var(--rib); background: var(--pill); }
.el-shadow  { color: #C7AEF0; border-color: #634F8A; background: #2D2540; }
.el-holy    { color: #F4E2A8; border-color: #8A7A45; background: #3A3424; }
.el-ghost   { color: #B9E0DC; border-color: #4F7774; background: #243634; }
.el-undead  { color: #B5C2A6; border-color: #5D6852; background: #2A2F26; }
.el-poison  { color: #D5A6E6; border-color: #74508A; background: #33243C; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 11px;
  border-radius: 999px; background: var(--pill); border: 1px solid var(--rib);
  font-size: 13.5px; color: var(--cream);
}
a.pill:hover { border-color: var(--goldHi); color: var(--cream); background: var(--slab); }
.pill .n { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.pill .r { color: var(--goldHi); font-weight: 700; flex: none; }
.pill.card { border-color: var(--tileGold); }
.pill.motes, .pill.motes .r { color: var(--dim); }

.badge {
  display: inline-grid; place-items: center; height: 24px; padding: 0 8px; margin-right: 6px;
  border: 4px solid transparent; border-image: url(assets/ui/level_shield.png) 4 fill / 4px stretch;
  font: 700 12px/1 var(--serif); color: var(--cream); vertical-align: middle; white-space: nowrap;
}
.badge.bboss { color: var(--danger); } .badge.b4, .badge.bmb { color: var(--goldHi); } .badge.bfrozen { color: #9CCBFF; }

a.xlink { color: var(--goldHi); border-bottom: 1px dotted rgba(216, 204, 152, .5); }
a.xlink:hover { color: var(--cream); border-bottom-style: solid; }
.rare a { color: var(--goldHi) !important; }
.boss-name a { color: var(--danger) !important; }
.mb-name a { color: #F0C99A !important; }

/* ---------------------------------------------------------------- stat grid and key-value lists (recessed boxes) */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin-bottom: 14px; }
.stat { border: 5px solid transparent; border-image: url(assets/ui/desc_box.png) 5 fill / 5px stretch; padding: 6px 9px; }
.stat .k { font: 700 12px/1.3 var(--serif); color: var(--dim); }
.stat .v { font: 600 17px/1.3 var(--num); color: var(--cream); }
.stat .v a { color: var(--goldHi); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; font-size: 15px; margin: 0; }
.kv dt { color: var(--dim); white-space: nowrap; }
.kv dd { margin: 0; color: var(--cream); }
.drops-title, .sec-title { font: 700 14px/1.3 var(--serif); color: var(--gold); margin: 0 0 8px; }
.mechs { list-style: none; margin: 0; padding: 0; }
.mechs li { font-size: 14px; color: var(--dim); padding: 2px 0; }
.mechs li::before { content: "\25C6  "; color: var(--gold); font-size: 10px; }
.mechs li b { color: var(--cream); }
.relgroup { margin-bottom: 14px; }
.relgroup:last-child { margin-bottom: 0; }
.relgroup .rlabel { font: 700 14px/1.3 var(--serif); color: var(--gold); margin-bottom: 6px; }

/* ---------------------------------------------------------------- filters (capsule chips) */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 16px 18px; margin-bottom: 18px; }
.fgroup { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fgroup > .flabel { font: 700 13px/1 var(--serif); color: var(--gold); margin-right: 4px; }
.fchip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 4px; cursor: pointer; background: none;
  border: 0 solid transparent; border-width: 0 14px;
  border-image: url(assets/ui/capsule_off_144x24.png) 0 20 fill / 0 14px stretch;
  font: 700 12.5px/1 var(--serif); color: var(--cream); white-space: nowrap;
}
.fchip:hover { color: var(--goldHi); }
.fchip.on { border-image-source: url(assets/ui/capsule_on_144x24.png); color: var(--parchDark); }
.ftext { height: 32px; min-width: 160px; padding: 0 10px; outline: none; background: none;
  border: 5px solid transparent; border-image: url(assets/ui/desc_box.png) 5 fill / 5px stretch;
  color: var(--cream); font: 400 13.5px/1 var(--serif); }
.ftext::placeholder { color: var(--faint); }
.fcount { font-size: 14px; color: var(--dim); margin-left: auto; }
.fcount b { font-family: var(--num); color: var(--goldHi); }

/* ---------------------------------------------------------------- tables: the Adventure Log's row plates */
.tablewrap { overflow-x: auto; margin-top: 4px; }
table.dtable { border-collapse: separate; border-spacing: 0 3px; width: 100%; min-width: 640px; font-size: 14.5px; }
table.dtable thead th {
  position: sticky; top: 0; z-index: 2; text-align: left; white-space: nowrap; cursor: pointer; user-select: none;
  background: var(--rec); color: var(--goldHi); font: 700 13px/1.2 var(--serif); padding: 9px 12px;
  border-bottom: 1px solid var(--olive); box-shadow: inset 0 -2px 0 -1px var(--gold);
}
table.dtable thead th:first-child { border-top-left-radius: 4px; }
table.dtable thead th:last-child { border-top-right-radius: 4px; }
table.dtable thead th:hover { color: var(--cream); }
table.dtable thead th[aria-sort]::after { content: " \25B4"; }
table.dtable thead th[aria-sort="descending"]::after { content: " \25BE"; }
table.dtable tbody tr { background: url(assets/ui/log_row_even.png) center / 100% 100%; }
table.dtable tbody tr:nth-child(odd) { background-image: url(assets/ui/log_row_odd.png); }
table.dtable tbody td { padding: 8px 12px; color: #E6E0CE; vertical-align: middle; }
table.dtable tbody tr:hover td { background: rgba(216, 204, 152, .07); }
table.dtable td.num { text-align: right; font-family: var(--num); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--cream); }
table.dtable td.nm a { color: var(--cream); font-weight: 700; }
table.dtable td.nm a:hover { color: var(--goldHi); }
table.dtable td.mut { color: var(--dim); }
table.dtable .pill .n { white-space: nowrap; overflow-wrap: normal; }

/* ---------------------------------------------------------------- detail pages */
.breadcrumb { font-size: 14px; color: var(--faint); margin: 26px 0 10px; }
.breadcrumb a { color: var(--goldHi); }
.breadcrumb span { opacity: .6; margin: 0 7px; }
.dhead { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.dhead h1 { margin: 0 0 4px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.dhead .sub { font-size: 15px; color: var(--dim); margin-bottom: 10px; }
.dhead.is-boss h1 { color: var(--danger); } .dhead.is-mb h1 { color: #F0C99A; }
.dhead.is-card h1, .dhead.is-rare h1 { color: var(--goldHi); }
/* the inventory cell (36 at 1x) */
.sprite-box { min-width: 84px; min-height: 84px; padding: 4px; flex: none; display: grid; place-items: center;
  border: 12px solid transparent; border-image: url(assets/ui/cell_filled.png) 12 fill / 12px stretch;
  color: var(--dim); font-size: 26px; image-rendering: pixelated; }
/* the game's own pictures: pixel art at whole-number scales only (the onload in wiki.js picks the scale) */
.art { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.withart { display: inline-flex; align-items: center; gap: 9px; }
.withart .ico { flex: none; max-height: 48px; width: auto; }
.pill .pico { flex: none; height: 32px; width: auto; margin: -7px 0 -7px -7px; }
.painting { margin: 0 0 0 auto; flex: none; }
.painting img { display: block; width: 168px; height: auto; border: 2px solid var(--tileGold); border-radius: 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
@media (max-width: 520px) { .painting { margin: 4px 0 0; } .painting img { width: 140px; } }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 22px; margin: 20px 0 44px; }
.ratebar { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: var(--disc); overflow: hidden; vertical-align: middle; }
.ratebar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--goldHi)); }
.tiertoggle { display: inline-flex; gap: 4px; }
.tiertoggle button { height: 28px; padding: 0 4px; cursor: pointer; background: none; border: 0 solid transparent; border-width: 0 14px;
  border-image: url(assets/ui/capsule_off_144x24.png) 0 20 fill / 0 14px stretch; font: 700 12.5px/1 var(--serif); color: var(--cream); }
.tiertoggle button.on { border-image-source: url(assets/ui/capsule_on_144x24.png); color: var(--parchDark); }
.notebar { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dim); margin: 16px 0 0;
  border: 5px solid transparent; border-image: url(assets/ui/desc_box.png) 5 fill / 5px stretch; padding: 10px 14px; }
.notebar b { color: var(--goldHi); }

/* ---------------------------------------------------------------- home tiles: windows of their own */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 10px 0 18px; }
.tile { display: block; padding: 18px 18px 16px; color: var(--body); transition: transform .14s ease, filter .14s ease; }
.tile:hover { transform: translateY(-2px); filter: brightness(1.08); color: var(--body); }
.tile h3 { margin: 0 0 4px; font-size: 19px; color: var(--cream); }
.tile .cnt { font: 600 30px/1.1 var(--num); color: var(--goldHi); }
.tile p { margin: 6px 0 0; font-size: 14px; color: var(--dim); }

/* ---------------------------------------------------------------- footer (the site's own) */
.site-foot { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 64px; padding: 34px 0 40px; background: var(--black); color: #A9A6A0; font: 400 13.5px/1.5 var(--sans); }
.site-foot .fbar { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.site-foot .row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-foot .who { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.site-foot .who img { height: 30px; width: auto; }
.site-foot nav { display: flex; gap: 22px; }
.site-foot nav a { color: rgba(240, 235, 216, .78); }
.site-foot nav a:hover { color: #fff; }
.site-foot .fine { margin-top: 18px; font-size: 12.5px; color: rgba(169, 166, 160, .7); }

.loading { text-align: center; padding: 80px 20px; color: var(--dim); font-size: 16px; }

/* ---------------------------------------------------------------- responsive (the site's breakpoints) */
@media (max-width: 900px) {
  :root { --gut: 16px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .gnav .gbar { gap: 14px; } .gnav .brand span { display: none; } .gnav nav { gap: 16px; }
  .panel { border-width: 10px; border-image-width: 44px; }
  .block > h2 { border-width: 0 90px; border-image-width: 0 90px; font-size: 16px; }
}
@media (max-width: 760px) {
  .subnav { position: static; }
  .subnav .sbar { flex-wrap: wrap; }
  .subnav .sublinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; }
  .subnav .sublinks::-webkit-scrollbar { display: none; }
  .searchwrap { flex: 1 1 100%; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .gnav nav { gap: 11px; } .gnav nav a { font-size: 13px; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .dhead { gap: 12px; }
  .hero { padding: 40px 16px 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { transition: none; }
}

/* site patch: Discord pill */
.gnav .pill-discord { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: var(--cta, #D2BD89);
  color: #2A2418; font: 600 13px/1 var(--sans); white-space: nowrap; transition: filter .2s; }
.gnav .pill-discord svg { width: 16px; height: 16px; fill: currentColor; }
.gnav .pill-discord:hover { filter: brightness(1.08); }
@media (max-width: 760px) { .gnav .pill-discord { font-size: 0; gap: 0; padding: 7px 10px; } }
