/* NexMods — clean homepage sections (features, reviews, FAQ, Discord).
   Uses its own nmh- classes so the legacy nm-* rules in nexmods-app.css don't apply.
   One width, one spacing scale, one accent (buttons + icons only). */

html#nm {
  --nmh-max: 1080px;
  --nmh-narrow: 760px;
  --nmh-gap-section: 96px;
  --nmh-gap-head: 32px;
  --nmh-surface: #131317;
  --nmh-surface-2: #17171c;
  --nmh-line: rgba(255, 255, 255, .07);
  --nmh-line-strong: rgba(255, 255, 255, .12);
  --nmh-text: #f5f5f7;
  --nmh-text-2: #a1a1aa;
  --nmh-text-3: #71717a;
  --nmh-radius: 14px;
  --nmh-star: #f5b942;
}
@media (max-width: 768px) {
  html#nm { --nmh-gap-section: 64px; --nmh-gap-head: 24px; }
}

/* ---------- Layout ---------- */
html#nm .nmh-section { padding: var(--nmh-gap-section) 24px 0; background: none; border: 0; }
html#nm .nmh-section + .nmh-section { padding-top: var(--nmh-gap-section); }
html#nm .nmh-wrap { max-width: var(--nmh-max); margin: 0 auto; }
html#nm .nmh-wrap--narrow { max-width: var(--nmh-narrow); }

html#nm .nmh-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin: 0 0 var(--nmh-gap-head); }
html#nm .nmh-title {
  margin: 0;
  color: var(--nmh-text) !important;
  font-family: var(--nm-font) !important;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
html#nm .nmh-sub { margin: 0; max-width: 56ch; color: var(--nmh-text-2) !important; font-size: 15px !important; line-height: 1.6 !important; }

/* ---------- Buttons ---------- */
html#nm .nmh-btn-primary,
html#nm .nmh-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  font: 600 14px/1 var(--nm-font); white-space: nowrap; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
html#nm .nmh-btn-primary { background: var(--nm-accent); color: #fff; border: 1px solid transparent; }
html#nm .nmh-btn-primary:hover { background: color-mix(in srgb, var(--nm-accent), #000 12%); color: #fff; }
html#nm .nmh-btn-secondary { background: transparent; color: var(--nmh-text); border: 1px solid var(--nmh-line-strong); }
html#nm .nmh-btn-secondary:hover { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .22); color: var(--nmh-text); }
html#nm .nmh-btn-secondary i, html#nm .nmh-btn-primary i { font-size: 13px; }

/* ---------- Features: one panel, three columns ---------- */
html#nm .nmh-features-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--nmh-surface); border: 1px solid var(--nmh-line); border-radius: var(--nmh-radius);
}
html#nm .nmh-feature { display: flex; gap: 14px; align-items: flex-start; padding: 24px; min-width: 0; }
html#nm .nmh-feature + .nmh-feature { border-left: 1px solid var(--nmh-line); }
html#nm .nmh-feature-icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--nmh-line);
  color: var(--nm-accent-text, var(--nm-accent)); font-size: 16px;
}
html#nm .nmh-feature-copy { min-width: 0; }
html#nm .nmh-feature-title { margin: 0 0 4px; font-size: 15px !important; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--nmh-text) !important; }
html#nm .nmh-feature-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--nmh-text-2); }
@media (max-width: 860px) {
  html#nm .nmh-features-list { grid-template-columns: 1fr; }
  html#nm .nmh-feature + .nmh-feature { border-left: 0; border-top: 1px solid var(--nmh-line); }
  html#nm .nmh-feature { padding: 18px 20px; }
}

/* ---------- Reviews: summary + 3-column grid ---------- */
html#nm .nmh-score { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--nmh-text-2); font-size: 14px; }
html#nm .nmh-score-value { color: var(--nmh-text); font-size: 20px; font-weight: 700; line-height: 1; }
html#nm .nmh-stars { color: var(--nmh-star); letter-spacing: 2px; font-size: 14px; }

html#nm .nmh-reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
/* 1–2 reviews: same width as the FAQ column below, cards fill it edge to edge */
html#nm .nmh-reviews-grid:has(> :only-child), html#nm .nmh-reviews-grid:has(> :nth-child(2):last-child) { max-width: var(--nmh-narrow); margin-left: auto; margin-right: auto; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
html#nm .nmh-reviews-grid:has(> :nth-child(4)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html#nm .nmh-reviews-grid[hidden] { display: none; }
html#nm .nmh-reviews-grid.is-few { display: flex; flex-wrap: wrap; justify-content: center; }
html#nm .nmh-reviews-grid.is-few .nmh-review { flex: 0 1 340px; }
html#nm .nmh-review {
  margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 22px; background: var(--nmh-surface); border: 1px solid var(--nmh-line); border-radius: var(--nmh-radius);
  transition: border-color .2s;
}
html#nm .nmh-review:hover { border-color: var(--nmh-line-strong); }
html#nm .nmh-review-stars { display: flex; gap: 2px; font-size: 13px; line-height: 1; color: rgba(255, 255, 255, .15); }
html#nm .nmh-review-stars .is-on { color: var(--nmh-star); }
html#nm .nmh-review-text {
  margin: 0; flex: 1; padding: 0; border: 0;
  color: #e4e4e7; font-size: 15px; line-height: 1.6; font-style: normal;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
html#nm .nmh-review-meta { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--nmh-line); min-width: 0; }
html#nm .nmh-review-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); color: var(--nmh-text-2); font-size: 13px; font-weight: 600;
}
html#nm .nmh-review-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html#nm .nmh-review-who strong { color: var(--nmh-text); font-size: 13.5px; font-weight: 600; line-height: 1.3; text-transform: none; }
html#nm .nmh-review-who span { color: var(--nmh-text-3); font-size: 12.5px; line-height: 1.3; text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html#nm .nmh-reviews-foot { display: flex; justify-content: center; margin-top: var(--nmh-gap-head); }
@media (max-width: 960px) { html#nm .nmh-reviews-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  html#nm .nmh-reviews-grid, html#nm .nmh-reviews-grid:has(> :nth-child(4)), html#nm .nmh-reviews-grid:has(> :only-child) { grid-template-columns: 1fr !important; }
  html#nm .nmh-review:nth-child(n+4) { display: none; } /* 3 reviews are enough on a phone */
}

/* ---------- FAQ: one centered column ---------- */
html#nm .nmh-faq-list { display: flex; flex-direction: column; gap: 10px; }
html#nm .nmh-faq-item { background: var(--nmh-surface); border: 1px solid var(--nmh-line); border-radius: 12px; overflow: hidden; transition: border-color .2s; }
html#nm .nmh-faq-item:hover, html#nm .nmh-faq-item[open] { border-color: var(--nmh-line-strong); }
html#nm .nmh-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; }
html#nm .nmh-faq-q::-webkit-details-marker { display: none; }
html#nm .nmh-faq-q h3 { margin: 0; font-size: 15px !important; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--nmh-text) !important; }
html#nm .nmh-faq-icon { position: relative; flex: none; width: 14px; height: 14px; color: var(--nmh-text-2); }
html#nm .nmh-faq-icon::before, html#nm .nmh-faq-icon::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1.5px; margin-top: -.75px;
  background: currentColor; border-radius: 2px; transition: transform .2s;
}
html#nm .nmh-faq-icon::after { transform: rotate(90deg); }
html#nm .nmh-faq-item[open] .nmh-faq-icon::after { transform: rotate(0deg); }
html#nm .nmh-faq-a { padding: 0 20px 18px; }
html#nm .nmh-faq-a p { margin: 0; color: var(--nmh-text-2); font-size: 14.5px; line-height: 1.65; }
html#nm .nmh-faq-more { margin: var(--nmh-gap-head) 0 0; text-align: center; color: var(--nmh-text-2); font-size: 14px; }
html#nm .nmh-faq-more a { color: var(--nmh-text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--nmh-line-strong); padding-bottom: 1px; transition: border-color .2s; }
html#nm .nmh-faq-more a:hover { color: var(--nmh-text); border-color: var(--nmh-text); }
html#nm .nmh-faq-more a i { font-size: 12px; margin-left: 2px; }

/* ---------- Discord band ---------- */
html#nm .nmh-community { padding: var(--nmh-gap-section) 24px 0; }
html#nm .nmh-community-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; background: var(--nmh-surface); border: 1px solid var(--nmh-line); border-radius: var(--nmh-radius);
}
html#nm .nmh-community-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(88, 101, 242, .12); border: 1px solid rgba(88, 101, 242, .25); color: #8b95ff; font-size: 20px;
}
html#nm .nmh-community-copy { flex: 1; min-width: 0; }
html#nm .nmh-community-title { margin: 0 0 4px; font-size: 17px !important; font-weight: 650; line-height: 1.3; letter-spacing: -.005em; color: var(--nmh-text) !important; }
html#nm .nmh-community-text { margin: 0; color: var(--nmh-text-2); font-size: 14px; line-height: 1.55; }
@media (max-width: 680px) {
  html#nm .nmh-community-card { flex-direction: column; align-items: flex-start; }
  html#nm .nmh-community-card .nmh-btn-primary { width: 100%; }
}

/* =====================================================================
   Colour layer — one warm red family (from the theme colour), muted text,
   colour only where it carries meaning: icons, accent word, active states, buttons.
   ===================================================================== */
html#nm { --nmh-a: var(--nm-accent-rgb, 227, 17, 27); --nmh-a-soft: #ff6b61; }

/* Text selection: soft tint instead of a solid red block */
html#nm ::selection { background: rgba(var(--nmh-a), .28) !important; color: #fff !important; }

/* Heading accent word: red → lighter red, same family */
html#nm .nmh-title .nm-accent,
html#nm .nmh-title .nm-gradient,
html#nm .nmh-accent {
  background: linear-gradient(100deg, rgb(var(--nmh-a)) 0%, var(--nmh-a-soft) 100%) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  filter: none !important; box-shadow: none !important;
}

/* Very soft glow behind the section headings */
html#nm .nmh-reviews,
html#nm .nmh-faq {
  background: radial-gradient(ellipse 50% 220px at 50% 70px, rgba(var(--nmh-a), .07), transparent 70%) no-repeat;
}

/* Rating pill */
html#nm .nmh-score { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .03); border: 1px solid var(--nmh-line); }

/* Review cards: neutral surface, accent only on hover + avatar */
html#nm .nmh-review {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--nmh-surface);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
html#nm .nmh-review:hover {
  border-color: rgba(var(--nmh-a), .32);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -18px rgba(var(--nmh-a), .4);
}
html#nm .nmh-review-text { color: #e8e8ec; }
html#nm .nmh-review-avatar {
  background: rgba(var(--nmh-a), .14); border: 1px solid rgba(var(--nmh-a), .3);
  color: var(--nmh-a-soft); font-weight: 700;
}
html#nm .nmh-review-who span { color: var(--nmh-text-3); }

/* Buttons */
html#nm .nmh-btn-secondary { border-color: var(--nmh-line-strong); background: transparent; }
html#nm .nmh-btn-secondary:hover { border-color: rgba(var(--nmh-a), .55); background: rgba(var(--nmh-a), .08); }
html#nm .nmh-btn-secondary i { color: var(--nmh-a-soft); }
html#nm .nmh-btn-primary { background: rgb(var(--nmh-a)); box-shadow: 0 8px 20px -10px rgba(var(--nmh-a), .8); }
html#nm .nmh-btn-primary:hover { background: color-mix(in srgb, rgb(var(--nmh-a)), #fff 8%); }

/* FAQ: open item gets a thin red edge */
html#nm .nmh-faq-item { position: relative; }
html#nm .nmh-faq-item::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
  background: rgb(var(--nmh-a)); opacity: 0; transition: opacity .2s;
}
html#nm .nmh-faq-item[open] { border-color: rgba(var(--nmh-a), .28); }
html#nm .nmh-faq-item[open]::before { opacity: 1; }
html#nm .nmh-faq-item[open] .nmh-faq-icon { color: var(--nmh-a-soft); }
html#nm .nmh-faq-more a { border-bottom-color: rgba(var(--nmh-a), .5); }
html#nm .nmh-faq-more a:hover { border-color: var(--nmh-a-soft); }
html#nm .nmh-faq-more a i { color: var(--nmh-a-soft); }

/* Discord band: brand blurple, no red competing with the button */
html#nm .nmh-community-card {
  position: relative; overflow: hidden;
  background: radial-gradient(80% 160% at 0% 50%, rgba(88, 101, 242, .16), transparent 60%), var(--nmh-surface);
  border-color: rgba(88, 101, 242, .22);
}
html#nm .nmh-community-icon { background: #5865f2; border-color: #6f7af4; color: #fff; }
html#nm .nmh-community .nmh-accent {
  background: none !important; -webkit-text-fill-color: #9aa3ff !important; color: #9aa3ff !important;
}

@media (prefers-reduced-motion: reduce) { html#nm .nmh-review:hover { transform: none; } }

/* =====================================================================
   Search — navbar pill, hero search bar and the results dialog
   ===================================================================== */
/* Navbar pill */
html#nm .nms-navbtn {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 14px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .03);
  color: #a1a1aa; font: 500 13.5px/1 var(--nm-font); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s;
}
html#nm .nms-navbtn:hover { border-color: rgba(255, 255, 255, .18); color: #f5f5f7; background: rgba(255, 255, 255, .05); }
html#nm .nms-navbtn i { font-size: 13px; }
html#nm .nms-navbtn-text { min-width: 92px; text-align: left; }
html#nm .nms-navbtn-kbd, html#nm .nms-herobtn-kbd, html#nm .nms-esc {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04);
  color: #71717a; font: 600 11px/1 var(--nm-font); box-shadow: none;
}
@media (max-width: 1100px) { html#nm .nms-navbtn-kbd { display: none; } }
@media (max-width: 900px) {
  html#nm .nms-navbtn { width: 38px; padding: 0; justify-content: center; }
  html#nm .nms-navbtn-text { display: none; }
}

/* Hero search bar */
html#nm .nms-herobtn {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; height: 54px; margin: 22px 0 18px; padding: 0 10px 0 18px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(12, 12, 15, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #a1a1aa; font: 500 15px/1 var(--nm-font); text-align: left; cursor: text;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .8);
  transition: border-color .2s, box-shadow .2s;
}
html#nm .nms-herobtn:hover { border-color: rgba(var(--nm-accent-rgb, 227, 17, 27), .5); box-shadow: 0 0 0 4px rgba(var(--nm-accent-rgb, 227, 17, 27), .1), 0 12px 32px -16px rgba(0, 0, 0, .8); }
html#nm .nms-herobtn i { color: #ff6b61; font-size: 16px; }
html#nm .nms-herobtn-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html#nm .nm-hero-content[style*="center"] .nms-herobtn, html#nm .nm-hero-hero .text-center .nms-herobtn { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { html#nm .nms-herobtn { height: 50px; font-size: 14.5px; } html#nm .nms-herobtn-kbd { display: none; } }

/* Dialog */
html#nm .nms-dialog {
  width: min(680px, calc(100vw - 24px)); max-width: none; max-height: none; margin: 10vh auto auto; padding: 0;
  border: 0; background: transparent; color: #f5f5f7; overflow: visible;
}
html#nm .nms-dialog::backdrop { background: rgba(5, 5, 8, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html#nm .nms-dialog[open] { animation: nms-in .16s ease-out; }
@keyframes nms-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
html#nm .nms-panel {
  display: flex; flex-direction: column; max-height: min(640px, 80vh); overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: #111114;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4);
}
html#nm .nms-field {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 12px 0 18px; height: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
html#nm .nms-field-icon { color: #ff6b61; font-size: 16px; }
html#nm .nms-field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html#nm .nms-field input {
  flex: 1 !important; min-width: 0 !important; width: auto !important; height: 100% !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important;
  color: #f5f5f7 !important; font: 500 16.5px/1 var(--nm-font) !important; padding: 0 !important;
}
html#nm .nms-field input::placeholder { color: #71717a; }
html#nm .nms-field input::-webkit-search-cancel-button { display: none; }
html#nm .nms-clear, html#nm .nms-close {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: transparent; color: #a1a1aa; cursor: pointer; transition: background-color .2s, color .2s;
}
html#nm .nms-clear[hidden] { display: none; }
html#nm .nms-clear:hover, html#nm .nms-close:hover { background: rgba(255, 255, 255, .06); color: #fff; }
html#nm .nms-close { display: none; }
@media (max-width: 640px) {
  html#nm .nms-dialog { margin-top: 12px; }
  html#nm .nms-esc { display: none; }
  html#nm .nms-close { display: grid; }
}
html#nm .nms-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px 8px; overscroll-behavior: contain; }
html#nm .nms-label { margin: 6px 12px 8px; color: #71717a; font: 600 11px/1 var(--nm-font); letter-spacing: .08em; text-transform: uppercase; }
html#nm .nms-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
html#nm .nms-results[hidden] { display: none; }
html#nm .nms-row {
  display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 11px;
  color: #f5f5f7; text-decoration: none; transition: background-color .12s;
}
html#nm .nms-row img { flex: none; width: 48px; height: 48px; border-radius: 9px; object-fit: cover; background: #1a1a1f; border: 1px solid rgba(255, 255, 255, .06); }
html#nm .nms-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
html#nm .nms-row-text strong { font-size: 14.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html#nm .nms-row-meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; }
html#nm .nms-row-meta b { color: #ff6b61; font-weight: 700; }
html#nm .nms-row-meta s { color: #71717a; }
html#nm .nms-row-meta em { font-style: normal; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html#nm .nms-row-meta em::before { content: "·"; margin-right: 8px; }
html#nm .nms-row-go { color: #71717a; font-size: 13px; opacity: 0; transform: translateX(-4px); transition: opacity .12s, transform .12s; }
html#nm .nms-row.is-active, html#nm .nms-row:focus-visible { background: rgba(var(--nm-accent-rgb, 227, 17, 27), .1); outline: 0; }
html#nm .nms-row.is-active .nms-row-go { opacity: 1; transform: none; color: #ff6b61; }
html#nm .nms-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px 40px; color: #a1a1aa; text-align: center; font-size: 14px; }
html#nm .nms-empty[hidden] { display: none; }
html#nm .nms-empty i { font-size: 20px; color: #52525b; margin-bottom: 6px; }
html#nm .nms-empty strong { color: #f5f5f7; font-size: 15px; }
html#nm .nms-all {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .02);
  color: #ff6b61; font: 600 14px/1.2 var(--nm-font); text-decoration: none; transition: background-color .15s;
}
html#nm .nms-all span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html#nm .nms-all:hover { background: rgba(var(--nm-accent-rgb, 227, 17, 27), .08); color: #ff8a82; }

