/* df-bnb-infestations.css
   Scoped styles for the Infestations (HTO) rewards page.
   Loaded only on /df/infestations/ URLs.

   IMPORTANT: df-bnb-activities.css is the source of truth for the DF brand
   activity/tree styling. This file MUST mirror activities for any rule that
   activities defines (expand title 15px, sub 0.88em/0.7, summary cream tint,
   etc). When activities changes, this file updates to match.
*/

/* ── Header card (mirrors .dfbnb-evrTop in activities) ─────────────────── */

.dfbnb-hto__header {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 18px;
  padding: 18px 18px 16px;
  margin: 12px 0 14px;
}

.dfbnb-hto__title {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0;
}

.dfbnb-hto__blurb {
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 80%, transparent);
  margin: 8px 0 0;
}

.dfbnb-hto__mob-note {
  font-size: 13px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 65%, transparent);
  margin: 6px 0 0;
  font-style: italic;
}

/* ── 4-star mods section (inside header card) ─────────────────────────── */

.dfbnb-hto__mods-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.dfbnb-hto__mods-heading {
  font-weight: 700;
  font-size: 1.05em;
  color: var(--accent);
  margin: 0 0 6px;
}

.dfbnb-hto__mods-desc {
  font-size: 13px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 70%, transparent);
  margin: 0 0 12px;
}

.dfbnb-hto__mods-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.dfbnb-hto__mods-th {
  text-align: left;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.dfbnb-hto__mods-cell {
  padding: 6px 10px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
}

.dfbnb-hto__mods-cell--name {
  font-weight: 700;
  white-space: nowrap;
  width: 1%;
}

.dfbnb-hto__mods-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.025);
}

.dfbnb-hto__mods-note {
  font-size: 12px;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-style: italic;
  margin: 4px 0 0;
  line-height: 1.45;
}

/* ── Divider + Search (mirrors .dfbnb-evrDivider / .dfbnb-evrSearch) ──── */

.dfbnb-hto__divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 10px 0 0;
}

.dfbnb-hto__search {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-sizing: border-box;
  outline: none;
}

.dfbnb-hto__search::placeholder {
  color: color-mix(in srgb, var(--text) 45%, transparent);
}

.dfbnb-hto__search:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.dfbnb-hto__search:disabled {
  background: rgba(255,255,255,0.30);
  color: color-mix(in srgb, var(--text) 45%, transparent);
  cursor: not-allowed;
}

/* ── Action buttons (mirrors .dfbnb-evrActions / .dfbnb-evrBtn) ──────── */

.dfbnb-hto__btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.dfbnb-hto__btn {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 400;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}

.dfbnb-hto__btn:hover {
  background: rgba(255,255,255,0.75);
}

/* ── Base rewards (mirrors .dfbnb-act-section) ─────────────────────────── */

.dfbnb-hto__base-rewards {
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.dfbnb-hto__base-rewards .dfbnb-act-section__heading {
  padding: 10px 16px 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: rgba(0,0,0,0.025);
}

/* ── Loot wrapper (mirrors .dfbnb-tree styling — source of truth) ────── */

.dfbnb-hto__boss-loot {
  margin: 6px 0;
}

/* All loot expands use the warm cream tree background */
.dfbnb-hto__boss-loot .dfbnb-expand {
  background: rgba(245, 241, 227, 0.55);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0;
}

/* Summary gets the slightly darker cream tint (mirrors activities) */
.dfbnb-hto__boss-loot .dfbnb-expand__summary {
  background: rgba(245, 241, 227, 0.35);
}

/* Nested expands: flat left edge, 3px left border (mirrors activities) */
.dfbnb-hto__boss-loot .dfbnb-expand .dfbnb-expand {
  margin-left: 0;
  border-left: 3px solid rgba(0,0,0,0.06);
  border-radius: 0 14px 14px 0;
}

/* CRITICAL: ALL tree expand titles are forced to 15px (mirrors activities) */
.dfbnb-hto__boss-loot .dfbnb-expand__title {
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
}

/* CRITICAL: ALL tree expand subs are 0.88em / 0.7 / tabular-nums (mirrors activities) */
.dfbnb-hto__boss-loot .dfbnb-expand__sub {
  font-size: 0.88em;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ── Expand summary base layout (matches activities base spec) ─────────── */

.dfbnb-hto .dfbnb-expand__summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.dfbnb-hto .dfbnb-expand__summary::-webkit-details-marker {
  display: none;
}

.dfbnb-hto .dfbnb-expand__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dfbnb-hto .dfbnb-expand__drop-rate {
  font-size: 0.85em;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

.dfbnb-hto .dfbnb-expand__pill {
  font-size: 0.8em;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.55);
  flex-shrink: 0;
}

/* ── Expand body ─────────────────────────────────────────────────────────── */

.dfbnb-hto .dfbnb-expand__body {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ── Tables (mirrors activities .dfbnb-evr__table) ─────────────────────── */

.dfbnb-hto .dfbnb-evr__table {
  width: 100%;
  border-collapse: collapse;
}

.dfbnb-hto .dfbnb-evr__th {
  text-align: left;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 1000;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
}

.dfbnb-hto .dfbnb-evr__cell {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
}

/* Tree-table column alignment: drop-rate column right-aligned, tabular */
.dfbnb-hto__boss-loot .dfbnb-evr__table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dfbnb-hto__boss-loot .dfbnb-evr__table th:last-child {
  text-align: right;
}

/* ── Player Titles table: constrained width, left-aligned ──────────── */
.dfbnb-hto__titles-wrap {
  max-width: 740px;
}
.dfbnb-hto__titles-table td:nth-child(2),
.dfbnb-hto__titles-table th:nth-child(2) {
  text-align: center;
  white-space: nowrap;
  width: 90px;
}
.dfbnb-hto__titles-table td:last-child,
.dfbnb-hto__titles-table th:last-child {
  text-align: left;
}

/* Alternating row stripe */
.dfbnb-hto tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.025);
}

/* Condition sub-rows: left-align override (mirrors activities) */
.dfbnb-hto__boss-loot .dfbnb-evr__table td.dfbnb-act-base__cond {
  text-align: left !important;
}

/* ── Condition rows (mirrors .dfbnb-act-base__cond in activities) ──────── */

.dfbnb-hto .dfbnb-act-base__cond {
  font-size: 11px;
  color: rgba(0,0,0,0.45);
  font-style: italic;
  padding-top: 2px !important;
  padding-bottom: 4px !important;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* ── Enemy roster blurb (top of Boss / Mob / Support expand body) ────────── */

.dfbnb-hto__roster-blurb {
  font-size: 13px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 60%, transparent);
  font-style: italic;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.025);
  border-radius: 8px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ── Roster list inside blurb ─────────────────────────────────────────────── */

.dfbnb-hto__roster-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dfbnb-hto__roster-list li {
  position: relative;
  padding-left: 16px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 65%, transparent);
}

.dfbnb-hto__roster-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
}

.dfbnb-hto__roster-note {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  opacity: 0.75;
}

/* ── Pool notes ──────────────────────────────────────────────────────────── */

.dfbnb-hto__pool-note {
  font-size: 0.92em;
  opacity: 0.90;
  margin-bottom: 10px;
  line-height: 1.45;
}

/* ── Error state ─────────────────────────────────────────────────────────── */

.dfbnb-hto__error {
  padding: 18px;
  color: color-mix(in srgb, var(--text) 65%, transparent);
  font-size: 14px;
  font-style: italic;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .dfbnb-hto { overflow-x: hidden; }
  .dfbnb-hto .dfbnb-evr__cell,
  .dfbnb-hto .dfbnb-evr__th {
    padding: 8px 6px;
    font-size: 0.85rem;
  }
  .dfbnb-hto .dfbnb-expand__body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .htoGuide-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-step { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 560px) {
  .dfbnb-hto__header { padding: 14px; }
  .dfbnb-hto__btn-row { flex-direction: column; }
  .dfbnb-hto__btn { width: 100%; text-align: center; }
  .dfbnb-hto .dfbnb-evr__cell,
  .dfbnb-hto .dfbnb-evr__th {
    padding: 6px 5px;
    font-size: 13px;
  }
  .dfbnb-hto__mods-cell { padding: 5px 6px; font-size: 12px; }
  .dfbnb-hto__mods-th { padding: 5px 6px; font-size: 12px; }
  .dfbnb-hto__mods-cell--name { white-space: normal; }
}

/* =========================================================
   INFESTATION LOCATIONS PAGE
   Section-step containers + region expanders + map + finder
   ========================================================= */

/* ── Section-step container (pill-prefix heading pattern) ── */

.section-step {
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: 0 18px 18px 0;
  padding: 16px 18px;
}

.section-step + .section-step {
  margin-top: 18px !important;
}

.section-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.section-step-head::-webkit-details-marker,
.section-step-head::marker { display: none; content: ""; }


.section-step-pill {
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 10px;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.section-step-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}

.section-step-divider {
  border: 0 !important;
  border-top: 1px solid var(--stroke) !important;
  margin: 12px 0 !important;
  opacity: 1 !important;
}

/* ── Section wrapper ── */

.htoLoc-section { margin-top: 0; }

/* ── Region Expanders ── */

.htoLoc-expand {
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--panel2);
  margin-top: 10px;
  overflow: hidden;
}

.htoLoc-expandHead {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
  list-style: none;
}

.htoLoc-expandHead::-webkit-details-marker,
.htoLoc-expandHead::marker { display: none; content: ""; }

/* Expand arrows removed — style guide: no chevrons */

.htoLoc-regionDot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.htoLoc-regionCount {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.htoLoc-expandBody {
  padding: 0 14px 14px;
  border-top: 1px solid var(--stroke);
}

/* ── Location list ── */

.htoLoc-locList {
  list-style: none !important;
  padding: 0 !important;
  margin: 10px 0 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.htoLoc-locList li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.htoLoc-locList li::before { display: none !important; }

.htoLoc-locName { font-weight: 700; }

.htoLoc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #e05555 20%, transparent);
  color: #e05555;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.htoLoc-locNote {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ── Map section ── */

.htoLoc-mapWrap {
  border-radius: 16px;
  border: 1px solid var(--stroke);
  overflow: hidden;
  margin-top: 14px;
  background: #1a1a1a;
}

.htoLoc-mapImg { width: 100%; height: auto; display: block; cursor: pointer; }

.htoLoc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
}

.htoLoc-legendItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.htoLoc-legendDot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.htoLoc-legendWorkshop {
  background: transparent !important;
  border: 2px solid #e05555;
  width: 6px;
  height: 6px;
}

.htoLoc-tip {
  margin-top: 12px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  max-width: 680px;
  margin-left: 0 !important;
}

.htoLoc-tip strong { color: var(--accent) !important; }

/* ── Nearest Spawn Finder ── */

.htoLoc-control {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
}

.htoLoc-control label {
  font-size: 12px;
  letter-spacing: 0.6px;
  font-weight: 1000;
  color: var(--accent);
  text-transform: uppercase;
}

.htoLoc-control select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: var(--panel2);
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.htoLoc-selectedCard {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.htoLoc-selectedName {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
  flex-wrap: wrap;
}

.htoLoc-selectedRegion { font-size: 13px; font-weight: 700; color: var(--accent); padding-left: 18px; }
.htoLoc-selectedNote { font-size: 12px; color: var(--muted); font-style: italic; padding-left: 18px; }

.htoLoc-nearList { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }

.htoLoc-nearRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
  transition: background 0.1s;
}

.htoLoc-nearRow:hover { background: color-mix(in srgb, var(--panel2) 80%, var(--accent)); }

.htoLoc-nearRow.htoLoc-inRange {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel2));
}

.htoLoc-nearRank {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: 12px; font-weight: 900; flex-shrink: 0;
}

.htoLoc-nearInfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.htoLoc-nearName {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text); flex-wrap: wrap;
}

.htoLoc-nearRegion { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 16px; }

.htoLoc-nearDist {
  display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap;
}

.htoLoc-distUnit { font-size: 10px; font-weight: 700; color: var(--muted); opacity: 0.7; }
.htoLoc-inRangeLabel { color: var(--accent); font-weight: 900; }

/* ── Locations responsive ── */

@media (max-width: 560px) {
  .htoLoc-expandHead { font-size: 13px; padding: 10px 12px; }
  .htoLoc-locList li { padding: 5px 8px; font-size: 13px; }
  .htoLoc-nearRow { padding: 6px 8px; gap: 8px; }
  .htoLoc-nearName { font-size: 12px; }
  .htoLoc-nearDist { font-size: 12px; }
  .htoLoc-legend { gap: 6px 12px; padding: 10px 12px; }
  .htoLoc-legendItem { font-size: 11px; }
  .htoLoc-control { max-width: 100%; }
}

/* =========================================================
   INFESTATION GUIDE PAGE
   Boss profiles, health/damage tables, shared mechanics
   ========================================================= */

/* ── Guide section spacing ── */

.htoGuide-section { margin-top: 0; }

.htoGuide-section p {
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0 0 10px;
}

/* ── Boss expand (reuses htoLoc-expand pattern) ── */

.htoGuide-boss .htoLoc-expandBody {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: none;
  padding-top: 14px;
}

.htoGuide-bossMeta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel2));
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.htoGuide-bossLabel {
  font-weight: 800;
  color: var(--accent);
}

.htoGuide-bossNote {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ── Sub-section heading inside boss expand ── */

.htoGuide-subHead {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 6px;
  border-top: 1px solid var(--stroke);
  margin-top: 4px;
}

/* ── Grenade note ── */

.htoGuide-grenadeNote {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ── Special abilities list ── */

.htoGuide-specialList {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.htoGuide-specialList li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.htoGuide-specialList li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
}

.htoGuide-specialList code {
  font-size: 12px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

/* ── Trait list (shared mechanics) ── */

.htoGuide-traitList {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.htoGuide-traitList li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.htoGuide-traitList li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ── Guide tables (inherits from .dfbnb-evr__table but scoped) ── */

.htoGuide-table {
  margin-top: 6px;
}

.htoGuide-table td:first-child {
  font-weight: 700;
}

@media (min-width: 761px) {
  .htoGuide-table td:first-child { white-space: nowrap; }
}

.htoGuide-table td:last-child {
  font-variant-numeric: tabular-nums;
}

/* ── Unique Rewards — no subhead borders ── */

.htoGuide-uniqueRewards,
.htoGuide-challenges { padding-top: 6px; }

/* ── Guide responsive ── */

@media (max-width: 760px) {
  .htoGuide-boss .htoLoc-expandBody { overflow-x: auto; }
  .htoGuide-specialList code { word-break: break-all; }

  /* ── Stacked card layout for guide + titles tables ──────────────────── */
  .htoGuide-table thead,
  .dfbnb-hto__titles-table thead { display: none; }

  .htoGuide-table,
  .htoGuide-table tbody,
  .dfbnb-hto__titles-table,
  .dfbnb-hto__titles-table tbody { display: block; }

  .htoGuide-table tbody tr,
  .dfbnb-hto__titles-table tbody tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .htoGuide-table tbody tr:nth-child(even),
  .dfbnb-hto__titles-table tbody tr:nth-child(even) { background: none; }

  .htoGuide-table tbody tr:last-child,
  .dfbnb-hto__titles-table tbody tr:last-child { border-bottom: none; }

  .htoGuide-table tbody td,
  .dfbnb-hto__titles-table tbody td {
    display: block;
    padding: 2px 0;
    border: none !important;
    text-align: left !important;
    white-space: normal !important;
    width: auto !important;
    font-variant-numeric: normal;
  }

  /* First cell = card title (bold teal, no label prefix) */
  .htoGuide-table tbody td:first-child,
  .dfbnb-hto__titles-table tbody td:first-child {
    font-weight: 800;
    font-size: 14px;
    color: var(--accent);
    padding-bottom: 2px;
  }

  /* Subsequent cells show their header label inline via data-label */
  .htoGuide-table tbody td:not(:first-child)::before,
  .dfbnb-hto__titles-table tbody td:not(:first-child)::before {
    content: attr(data-label) ":\00a0 ";
    font-weight: 700;
    opacity: 0.55;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
}

@media (max-width: 560px) {
  .htoGuide-bossMeta { font-size: 12px; padding: 6px 10px; }
  .htoGuide-specialList li,
  .htoGuide-traitList li { font-size: 13px; }
  .htoGuide-subHead { font-size: 12px; }
  .section-step { padding: 12px 12px; }
  .section-step-title { font-size: 16px; }
  .htoGuide-section p { font-size: 0.88rem; }
  /* Stacked cards: slightly smaller text on narrow screens */
  .htoGuide-table tbody td,
  .dfbnb-hto__titles-table tbody td { font-size: 13px; }
  .htoGuide-table tbody td:first-child,
  .dfbnb-hto__titles-table tbody td:first-child { font-size: 13px; }
}


/* =========================================================
   WRITTEN GUIDES (flat prose)  —  .hto-guide
   Sept 2026. /df/infestations/infestations-guide/ was built on the
   section-step expand layout; it is a reference guide people read
   straight through, not a sequence they step through, so it has been
   rebuilt FLAT: no section expands, each section is an h2 block header
   plus its content, and the guide reads top to bottom in one pass.

   Same component as .ci-guide (df-bnb-camp-items.css), .as-guide
   (df-bnb-atom-shop.css) and .dm-guide (df-bnb-data-mining.css),
   re-declared here under the hto- prefix because module stylesheets do
   not cross-import (style guide → CSS Architecture). Keep all four in
   step if any is changed.

   ONE DELIBERATE DEPARTURE from the standard: Boss Profiles keeps its 7
   per-boss <details> expands. Seven full weapon tables plus special-ability
   lists inline would bury the ten other sections, and the boss cards are a
   pick-one-and-read reference rather than prose. Everything else on the
   page is flat. Because expands survive, the header card keeps Expand All /
   Close All (scoped to the boss cards only) and the Style C search opens
   any closed boss card that contains a hit.

   .section-step below/above is still live — the sibling Infestation
   Locations page uses it. Do not remove it with this block.

   Content sits inside .hto-guide-body, so it is NOT a direct child of
   .dfbnb-guideBody and the guide.css > -scoped prose rules do not reach
   it. The typography below re-applies the style-guide values locally
   (h3 1.1rem/900/text, p 0.95rem/1.75) without the 24px prose indent —
   the panel padding is the inset.
   ========================================================= */

/* ---------- Header card ----------
   title → blurb → divider → search → buttons. */

.hto-top {
  background: color-mix(in srgb, var(--text) 3%, var(--panel));
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px 18px 16px;
  margin: 12px 0 14px;
}

.hto-top-title {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0;
}

.hto-top-sub {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.80;
  margin: 8px 0 0;
}

.hto-top-divider {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: 10px 0 0;
}

.hto-top-search {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--text) 8%, var(--panel));
  border: 1px solid var(--stroke2);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hto-top-search::placeholder { color: var(--text); opacity: 0.45; }
.hto-top-search:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Buttons sit hard right under the search, no border-top separator —
   the divider above the search already carries the visual break. */
.hto-top-btnRow {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.hto-top-btn {
  background: color-mix(in srgb, var(--text) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s;
}
.hto-top-btn:hover { background: color-mix(in srgb, var(--text) 12%, var(--panel)); }

/* ---------- Guide panel ---------- */

.hto-guide {
  background: color-mix(in srgb, #ffffff 18%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 18px;
  padding: 18px 22px 22px;
  margin-top: 18px;
}

/* ---------- Section spacing ----------
   No rule between sections. Since Aug 2026 the solid H2 block header IS
   the section divider, so all a section needs is the 48px gap. */

.hto-guide-sec + .hto-guide-sec { margin-top: 48px; }

/* ---------- H2: solid block header ----------
   --headBg / --headFg are declared on #df-bnb-shell in df-bnb-guide.css,
   so this follows the brand blend automatically. One deliberate difference
   from the prose rule: NO max-width — inside the panel the header is that
   section's full-width banner. */

.hto-guide-h2 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--headFg, #e6d9b4);
  background: var(--headBg, #5b3f31);
  margin: 0 0 12px;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  max-width: none;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- Prose ---------- */

.hto-guide-body > * { margin: 0; }
.hto-guide-body > * + * { margin-top: 16px; }

.hto-guide-body h3 {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text);
  margin-top: 28px;
}
.hto-guide-body h3 + * { margin-top: 10px; }

.hto-guide-body p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 760px;
}

.hto-guide-body ul,
.hto-guide-body ol {
  padding-left: 22px;
  max-width: 760px;
}
.hto-guide-body li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
}
.hto-guide-body li + li { margin-top: 6px; }

.hto-guide-body ol > li::marker { font-weight: 900; color: var(--accent); }

.hto-guide-body strong { font-weight: 900; color: var(--text); }
.hto-guide-body em     { font-style: italic; opacity: 0.78; }

/* Aside / caveat line under a sub-section. */
.hto-guide-note {
  font-size: 0.9rem !important;
  opacity: 0.8;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.hto-guide-body a,
.hto-guide-footer a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Content carried over from the section-step build ----------
   .htoGuide-section / -subHead / -table / the boss cards keep their own
   rules further up this file, which were written for the inside of a
   .section-step card. The card is gone, so its padding no longer spaces
   anything: these re-seat the same content on the flat panel's rhythm.

   The section content is wrapped in .htoGuide-section, so it is NOT a
   direct child of .hto-guide-body and the > -scoped prose rules above do
   not reach it. Re-apply the 16px sibling gap one level down, zero the
   old per-element margins so nothing doubles up, and let the last child
   run flush to the section end (the next h2 supplies the 48px break). */

.hto-guide-body .htoGuide-section { margin: 0; }
.hto-guide-body .htoGuide-section > * { margin-top: 0; margin-bottom: 0; }
.hto-guide-body .htoGuide-section > * + * { margin-top: 16px; }

.hto-guide-body .htoGuide-section > p { max-width: 760px; }

/* Sub-headings: scoped to DIRECT children so the identically-classed
   subheads inside a boss card keep the flex gap they already have.

   The section-step build killed the hairline on every one of these with
   inline border-top:none, because the card edge was already dividing the
   content. Flat, the hairline is the only thing separating a long
   section's parts, so it is back on — except on --first, where the h2
   block header sits directly above and a second rule would double up. */
.hto-guide-body .htoGuide-section > .htoGuide-subHead { margin-top: 22px; }
.hto-guide-body .htoGuide-section > .htoGuide-subHead + * { margin-top: 10px; }
.hto-guide-body .htoGuide-section > .htoGuide-subHead--first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Tables run the panel width rather than the 760px prose cap. */
.hto-guide-body .htoGuide-table { max-width: none; }

/* Screenshots in How to Start / Infestation Locations. */
.hto-guide-body .htoLoc-mapImg {
  max-width: 900px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

/* Boss cards — the one surviving expand. Spaced like rows, not sections. */
.hto-guide-body .htoGuide-section > .htoGuide-boss + .htoGuide-boss { margin-top: 10px; }

/* ---------- Figures ---------- */

.hto-guide-fig {
  margin: 0 0 16px;
  max-width: 900px;
  padding: 8px;
  background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 14px;
}
.hto-guide-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.hto-guide-cap {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--text);
  opacity: 0.65;
}

/* ---------- Footer (closing line / credit) ---------- */

.hto-guide-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
}
.hto-guide-source {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.72;
  font-style: italic;
}

/* ---------- Style C highlight override (written guides, DF) ----------
   The shell's mark.bnb-hl is tuned for dark contexts (white text on orange
   tint). On the cream DF panel that's unreadable, so inherit the body
   colour and use a teal tint. */
.hto-guide mark.bnb-hl {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

@media (max-width: 760px) {
  .hto-guide { padding: 16px; }
  .hto-guide-h2 { font-size: 1.1rem; }
  .hto-guide-sec + .hto-guide-sec { margin-top: 36px; }
}
@media (max-width: 560px) {
  .hto-top { padding: 14px; }
  .hto-top-title { font-size: 19px; }
  .hto-top-btnRow { flex-direction: column; }
  .hto-top-btn { width: 100%; text-align: center; }
}
