/* Find your Main: alles hangt onder .mf en heeft een mf-voorvoegsel, zodat het naast de site-stijlen kan staan.
   De kleuren volgen de site-tokens (ook het Horde-thema) en vallen buiten de site terug op eigen waarden. */
.mf {
  --mf-gold: var(--gold, #e6b84f);
  --mf-gold-hi: var(--gold-hi, #f1c765);
  --mf-gold-lo: var(--gold-lo, #c8952f);
  --mf-gold-ink: var(--gold-ink, #1a1205);
  --mf-gold-rgb: var(--gold-rgb, 230, 184, 79);
  --mf-ink: var(--text, #e8e6df);
  --mf-muted: var(--muted, #8f98b3);
  --mf-line: var(--line, #263150);
  --mf-panel: var(--panel, #121a2e);
  --mf-panel2: var(--panel2, #18223b);
  --mf-bg2: var(--bg2, #0d1220);
  --mf-tip: #070c1b;
  --mf-tip-line: #59627a;
  --mf-uncommon: #1eff00;
  --mf-quest: #ffd100;
  --mf-narrow: #e8b84f;
  --mf-poor: #9d9d9d;
  --mf-rare: #4a9bff;
  --mf-epic: #b973f5;
  --mf-legendary: #ff8000;
  --mf-display: "Cinzel", Georgia, serif;
  --mf-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--mf-ink);
  font-family: var(--mf-body);
  font-size: 16px;
  line-height: 1.5;
}
.mf *, .mf *::before, .mf *::after { box-sizing: border-box; }
.mf button { font: inherit; color: inherit; cursor: pointer; }
.mf button:focus-visible, .mf summary:focus-visible, .mf a:focus-visible { outline: 2px solid var(--mf-quest); outline-offset: 3px; }

/* Ornamented frame */
.mf-frame {
  position: relative;
  background: linear-gradient(180deg, var(--mf-panel) 0%, var(--mf-bg2) 100%);
  border: 1px solid rgba(var(--mf-gold-rgb), .38);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .6), inset 0 0 0 5px rgba(var(--mf-gold-rgb), .06), inset 0 0 60px rgb(0 0 0 / .35), 0 18px 50px rgb(0 0 0 / .45);
}
.mf-frame::before, .mf-frame::after {
  content: ""; position: absolute; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  background: linear-gradient(135deg, #fff1c2, var(--mf-gold) 45%, var(--mf-gold-lo));
  transform: rotate(45deg); box-shadow: 0 0 0 2px var(--mf-bg2), 0 0 12px rgba(var(--mf-gold-rgb), .45);
}
.mf-frame::before { top: -7px; }
.mf-frame::after { bottom: -7px; }

/* Top bar (only in the standalone version) */
.mf-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-bottom: 10px; font-size: 14px; }
.mf-textbtn { background: none; border: 0; padding: 4px 6px; color: var(--mf-muted); font-weight: 600; }
.mf-textbtn:hover { color: var(--mf-ink); }
.mf-textbtn[aria-pressed="true"] { color: var(--mf-quest); }
.mf-confirm { display: inline-flex; gap: 6px; align-items: center; }

/* XP bar */
.mf-xp { margin: 0 auto 18px; max-width: 780px; }
.mf-xp-bar { position: relative; height: 12px; border-radius: 3px; background: #120b1b; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(var(--mf-gold-rgb), .4); overflow: hidden; }
.mf-xp-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #c27cf4 0%, #7d35c4 55%, #4f1c87 100%); transition: width .35s ease; }
.mf-xp-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), rgb(0 0 0 / .55) calc(5% - 1px) 5%); }
.mf-xp-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--mf-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.mf-xp-label button { background: none; border: 0; padding: 0; color: var(--mf-muted); font-size: 13px; font-weight: 600; }
.mf-xp-label button:hover { color: var(--mf-ink); }

/* Step window */
.mf-stage { max-width: 780px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 42px) 28px; }
.mf-eyebrow { font-family: var(--mf-display); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mf-gold); margin: 0 0 10px; }
.mf-stage h2 { font-family: var(--mf-body); font-weight: 700; font-size: clamp(22px, 3.2vw, 28px); line-height: 1.25; letter-spacing: 0; margin: 0 0 6px; text-wrap: balance; color: var(--mf-ink); }
.mf-sub { color: var(--mf-muted); margin: 0; font-size: 15px; }

.mf-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 18px; }
.mf-opts.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mf-opt {
  position: relative; text-align: left;
  background: linear-gradient(180deg, var(--mf-panel2) 0%, var(--mf-panel) 100%);
  border: 1px solid var(--mf-line); border-radius: 10px;
  padding: 13px 14px 13px 48px; font-size: 16px; font-weight: 500; line-height: 1.35;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.mf-opt:hover { border-color: rgba(var(--mf-gold-rgb), .55); }
.mf-opt:active { transform: translateY(1px); }
.mf-key {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid rgba(var(--mf-gold-rgb), .45); border-radius: 5px; background: var(--mf-bg2);
  font-family: var(--mf-display); font-size: 12px; font-weight: 700; color: var(--mf-gold);
}
.mf-opt[aria-pressed="true"] { border-color: var(--mf-quest); box-shadow: 0 0 0 1px var(--mf-quest), 0 0 22px rgb(255 209 0 / .16), inset 0 0 24px rgb(255 209 0 / .07); }
.mf-opt[aria-pressed="true"] .mf-key { background: var(--mf-quest); color: #1a1205; border-color: var(--mf-quest); }
.mf-opt small { display: block; color: var(--mf-muted); font-size: 14px; font-weight: 400; margin-top: 3px; }

.mf-opt.big { padding: 16px 40px 16px 68px; min-height: 86px; display: flex; flex-direction: column; justify-content: center; }
.mf-opt.big svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; stroke: var(--mf-gold); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mf-opt.big[aria-pressed="true"] svg { stroke: var(--mf-quest); filter: drop-shadow(0 0 6px rgb(255 209 0 / .5)); }
.mf-opt.big .mf-key { left: auto; right: 10px; top: 10px; transform: none; width: 20px; height: 20px; font-size: 11px; }

.mf-group { font-family: var(--mf-display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mf-muted); margin: 24px 0 -8px; }

.mf-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.mf-nav-right { display: flex; gap: 16px; align-items: center; margin-left: auto; }
.mf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--mf-gold-hi); border-radius: 10px;
  background: linear-gradient(180deg, var(--mf-gold-hi), var(--mf-gold-lo));
  color: var(--mf-gold-ink); font-family: var(--mf-display); font-weight: 700; letter-spacing: .05em; font-size: 15px;
  padding: 10px 22px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 4px 18px rgba(var(--mf-gold-rgb), .22);
  text-decoration: none;
}
.mf-btn:hover { filter: brightness(1.08); color: var(--mf-gold-ink); }
.mf-btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.mf-btn.lg { font-size: 17px; padding: 13px 30px; }
.mf-btn.dark { background: linear-gradient(180deg, var(--mf-panel2), var(--mf-panel)); color: var(--mf-ink); border-color: rgba(var(--mf-gold-rgb), .4); box-shadow: none; }
.mf-btn.dark:hover { border-color: var(--mf-gold); color: var(--mf-ink); }
.mf-back { background: none; border: 0; color: var(--mf-muted); font-weight: 600; padding: 6px 0; }
.mf-back:hover { color: var(--mf-ink); }
.mf-hint { text-align: center; color: var(--mf-muted); font-size: 13px; margin: 14px 0 0; }
.mf-hint kbd { font-family: var(--mf-display); font-size: 11px; border: 1px solid rgba(var(--mf-gold-rgb), .45); border-radius: 3px; padding: 1px 5px; color: var(--mf-gold); background: var(--mf-bg2); }
@media (hover: none) { .mf-hint { display: none; } }

/* Party pips: one per spec */
.mf-party { max-width: 780px; margin: 18px auto 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.mf-party-label { font-size: 14px; color: var(--mf-muted); font-variant-numeric: tabular-nums; }
.mf-party-label b { color: var(--mf-ink); }
.mf-pips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.mf-pip { width: 11px; height: 11px; border-radius: 2px; background: var(--c); box-shadow: 0 0 0 1px #000, 0 0 6px var(--c); transition: opacity .25s, filter .25s; flex: none; }
.mf-pip.out { opacity: .2; filter: grayscale(1); box-shadow: 0 0 0 1px #000; }

/* Intro */
.mf-intro { text-align: center; padding: 56px clamp(18px, 5vw, 56px) 44px; max-width: 780px; margin: 3vh auto 0; }
.mf-intro .mf-eyebrow { margin-bottom: 16px; }
.mf-intro h1 {
  font-family: var(--mf-display); font-weight: 900; font-size: clamp(42px, 8vw, 72px); line-height: 1; margin: 0 0 18px; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--h1-a, #fff3cf) 0%, var(--h1-b, #e6b84f) 50%, var(--h1-c, #a8771c) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 24px rgba(var(--mf-gold-rgb), .25));
}
.mf-intro p { color: var(--mf-muted); max-width: 52ch; margin: 0 auto 28px; font-size: 17px; }
.mf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mf-crests { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--mf-line); }
.mf-crests .mf-crest { width: 40px; height: 40px; border-radius: 8px; }
.mf-crests .mf-crest svg { width: 24px; height: 24px; }

/* Class emblem */
.mf-crest {
  width: 60px; height: 60px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / .55), transparent 58%), var(--c);
  box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(var(--mf-gold-rgb), .55), 0 0 18px color-mix(in srgb, var(--c) 55%, transparent);
}
.mf-crest svg { width: 36px; height: 36px; fill: none; stroke: #0b0d13; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mf-crest svg .f { fill: #0b0d13; stroke: none; }
.mf-crest svg .h { fill: var(--c); stroke: none; }
.mf-crest svg .hs { stroke: var(--c); stroke-width: 1.3; }

/* Results */
.mf-res-title { text-align: center; margin: 8px 0 0; }
.mf-res-title h1 { font-family: var(--mf-display); font-weight: 900; font-size: clamp(32px, 5vw, 46px); margin: 0; color: var(--mf-gold); text-shadow: 0 2px 0 #000, 0 0 24px rgba(var(--mf-gold-rgb), .25); }
.mf-res-title p { color: var(--mf-muted); margin: 6px auto 0; max-width: 56ch; }

/* Podium: #1 in the middle and always the largest; #2 and #3 step down. Bottoms line up. */
.mf-loot { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; margin: 30px 0 30px; }
.mf-loot .mf-card:nth-child(2) { margin-top: 30px; }
.mf-loot .mf-card:nth-child(3) { margin-top: 30px; }
.mf-loot.n2 { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); max-width: 820px; margin-inline: auto; }
.mf-loot.n2 .mf-card:nth-child(1) { order: 1; }
.mf-loot.n2 .mf-card:nth-child(2) { order: 2; }
.mf-loot.n1 { grid-template-columns: minmax(0, 440px); justify-content: center; }
@media (max-width: 860px) {
  .mf-loot, .mf-loot.n2 { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .mf-loot .mf-card:nth-child(n) { order: 0; margin-top: 0; }
}
.mf-card {
  --r: var(--c);
  display: flex; flex-direction: column;
  background: rgb(7 12 27 / .97); border: 1px solid var(--mf-tip-line); border-radius: 9px;
  padding: 16px 18px 18px; font-size: 15px; line-height: 1.4; color: #fff;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--r) 35%, transparent), 0 0 34px color-mix(in srgb, var(--r) 20%, transparent), 0 18px 40px rgb(0 0 0 / .55);
}
.mf-card.legendary { --r: var(--c); padding: 20px 22px 22px; font-size: 15.5px; box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--r) 55%, transparent), 0 0 50px color-mix(in srgb, var(--r) 28%, transparent), 0 22px 50px rgb(0 0 0 / .6); }
.mf-card.epic { --r: var(--c); }
.mf-rar { display: flex; justify-content: space-between; font-family: var(--mf-display); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--r); margin-bottom: 10px; }
.mf-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mf-card h3 { margin: 0; font-family: var(--mf-body); font-size: 25px; font-weight: 800; letter-spacing: 0; color: var(--r); line-height: 1.15; }
.mf-card.legendary h3 { font-size: 31px; }
.mf-card.legendary .mf-crest { width: 72px; height: 72px; }
.mf-card.legendary .mf-crest svg { width: 44px; height: 44px; }
.mf-cls { color: var(--c); font-weight: 700; font-size: 16px; margin-top: 2px; }
.mf-bind { margin-top: 8px; }
.mf-trow { display: flex; justify-content: space-between; gap: 10px; }
.mf-match { margin: 12px 0 4px; }
.mf-match .mf-trow { font-weight: 700; font-size: 16px; }
.mf-match b { color: var(--r); font-variant-numeric: tabular-nums; }
.mf-meter { height: 6px; border-radius: 3px; background: #1a2033; overflow: hidden; margin-top: 5px; }
.mf-meter span { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--r) 55%, #000), var(--r)); }
.mf-alt { color: var(--mf-muted); font-size: 14px; margin-top: 8px; }
.mf-alt b { color: #fff; font-variant-numeric: tabular-nums; }
.mf-card ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.mf-card li { color: var(--mf-uncommon); }
.mf-card li.y { color: var(--mf-narrow); }
.mf-card li small { display: block; color: var(--mf-muted); font-size: 12.5px; }
.mf-flavor { color: var(--mf-quest); font-style: italic; margin: auto 0 0; padding-top: 14px; }

@keyframes mf-rise { from { opacity: 0; transform: translateY(28px) scale(.96); } }
.mf-reveal .mf-card { animation: mf-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.mf-reveal .mf-card:nth-child(3) { animation-delay: .1s; }
.mf-reveal .mf-card:nth-child(2) { animation-delay: .45s; }
.mf-reveal .mf-card:nth-child(1) { animation-duration: .75s; animation-delay: .85s; }

.mf-res-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }

.mf-panel { padding: 22px clamp(16px, 3vw, 28px) 18px; margin-bottom: 26px; }
.mf-panel h2 { font-family: var(--mf-display); font-size: 20px; color: var(--mf-gold); margin: 0; letter-spacing: .04em; }
.mf-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.mf-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mf-muted); }
.mf-switch { width: 40px; height: 22px; border-radius: 999px; border: 1px solid rgba(var(--mf-gold-rgb), .45); background: var(--mf-bg2); position: relative; padding: 0; flex: none; }
.mf-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--mf-muted); transition: transform .15s, background .15s; }
.mf-switch[aria-checked="true"] { background: rgba(var(--mf-gold-rgb), .25); border-color: var(--mf-gold); }
.mf-switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--mf-gold); }

.mf-rank { list-style: none; margin: 0; padding: 0; }
.mf-rank > li { border-top: 1px solid var(--mf-line); }
.mf-rank-row { display: grid; grid-template-columns: 26px 12px minmax(0, 1fr) minmax(60px, 160px) 46px; gap: 12px; align-items: center; width: 100%; padding: 9px 4px; background: none; border: 0; text-align: left; }
.mf-rank-row:hover { background: rgb(255 255 255 / .03); }
.mf-rank-row .n { color: var(--mf-muted); font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; }
.mf-rank-row .nm b { font-weight: 700; }
.mf-rank-row .nm span { color: var(--c); margin-left: 6px; }
.mf-rank-row .mf-meter { margin: 0; --r: var(--mf-gold); }
.mf-rank-row .pc { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .mf-rank-row { grid-template-columns: 22px 12px minmax(0, 1fr) 44px; } .mf-rank-row .mf-meter { display: none; } }
.mf-detail { padding: 2px 4px 14px 62px; font-size: 14.5px; display: grid; gap: 6px; }
.mf-detail .meta { color: var(--mf-muted); }
.mf-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mf-detail li.x { color: var(--mf-poor); }
.mf-detail li.y { color: var(--mf-narrow); }
.mf-detail li small { color: var(--mf-muted); margin-left: 6px; }
.mf-link { background: none; border: 0; padding: 0; color: var(--mf-gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }

details.mf-more { border-top: 1px solid var(--mf-line); margin-top: 8px; }
details.mf-more summary { padding: 14px 4px 6px; cursor: pointer; color: var(--mf-muted); font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.mf-more summary::-webkit-details-marker { display: none; }
details.mf-more summary::after { content: "+"; color: var(--mf-gold); }
details.mf-more[open] summary::after { content: "–"; }
.mf-out { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; gap: 6px; }
.mf-out li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; color: var(--mf-poor); padding: 2px 4px; }
.mf-out li small { display: block; font-size: 13px; }
.mf-out .mf-pip { width: 10px; height: 10px; }
.mf-reflect { color: var(--mf-muted); padding-left: 20px; margin: 4px 0 8px; display: grid; gap: 4px; }
.mf-empty { text-align: center; padding: 30px 20px; margin: 30px 0; }
.mf-empty p { color: var(--mf-muted); max-width: 50ch; margin: 0 auto 18px; }
.mf-foot { text-align: center; color: var(--mf-muted); font-size: 13px; max-width: 70ch; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .mf *, .mf *::before, .mf *::after { animation: none !important; transition: none !important; }
}

.mf-multi { margin: -6px 0 14px; color: var(--muted, #9aa3b5); font-size: 13.5px; }

.mf-excl { --c: #ccc; position: relative; }
.mf-excl .mf-crest.sm { width: 34px; height: 34px; margin: 0 4px 0 0; }
.mf-excl[aria-pressed="true"] { border-color: #d24848; background: rgba(210,72,72,.14); text-decoration: line-through; opacity: .85; }

.mf-stage.mf-q { display: flex; flex-direction: column; min-height: 392px; }
.mf-stage.mf-q .mf-nav { margin-top: auto; }
@media (max-width: 700px) { .mf-stage.mf-q { min-height: 530px; } }

.mf-excl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mf-excl { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 58px; }
.mf-excl .mf-key { position: static; margin-left: auto; }
@media (max-width: 700px) { .mf-excl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mf-excl .mf-crest.sm { width: 30px; height: 30px; } }
