/* forum + thread pages */

@keyframes fm-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes fm-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes fm-pop { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.97); } }
@keyframes fm-fade { from { opacity: 0; } }
@keyframes fm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: var(--orange-2); } 100% { transform: scale(1); } }
@keyframes fm-new {
  0% { opacity: 0; transform: translate3d(0, 28px, 0) scale(.98); box-shadow: 0 0 0 2px var(--orange), 0 0 70px -6px var(--glow); }
  45% { opacity: 1; transform: none; box-shadow: 0 0 0 2px var(--orange), 0 0 70px -10px var(--glow); }
  100% { box-shadow: 0 0 0 0 rgba(255,90,0,0), 0 0 0 0 rgba(255,90,0,0); }
}

/* hero */
.fm-hero { padding-block: clamp(48px, 7vw, 110px) clamp(48px, 6vw, 90px); }
.fm-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.fm-hero__title { font-size: clamp(52px, 9.4vw, 136px); }
.fm-hero__copy .lead { max-width: 560px; }
.fm-hero .row { margin-top: 34px; }
.fm-stats { margin-top: 44px; }
.fm-stats__grid { display: flex; flex-wrap: wrap; gap: 20px 44px; margin-top: 18px; }
.fm-stat { display: flex; flex-direction: column; }
.fm-stat .stat__num { font-size: clamp(40px, 4.6vw, 64px); background: linear-gradient(180deg, var(--text) 40%, #8f877f); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.fm-stat:first-child .stat__num { background-image: linear-gradient(100deg, var(--orange), var(--amber)); }

/* hero art: css watch + floating activity bubbles */
.fm-art { position: relative; min-height: 540px; display: grid; place-items: center; }
.fm-art > .glow-orb { --size: 440px; --o: .45; left: 50%; top: 50%; margin: -220px 0 0 -220px; }
.fm-float { position: relative; z-index: 1; animation: fm-float 7s ease-in-out infinite; }
.fm-device { position: relative; rotate: -9deg; }
.fm-device::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -150px; bottom: -150px; width: 62%; translate: -50% 0;
  border-radius: 34px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 2px, transparent 2px 9px),
    linear-gradient(90deg, #0d0d0d, #1f1f1f 50%, #0d0d0d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.fm-case {
  position: relative; width: 224px; padding: 22px 18px;
  border-radius: 46px;
  background: linear-gradient(145deg, #4a4a4a, #161616 42%, #0c0c0c 60%, #333);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 6px rgba(0,0,0,.7),
    0 50px 90px -30px rgba(0,0,0,.95), 0 0 90px -20px var(--glow);
}
.fm-case::before, .fm-case::after {
  content: ""; position: absolute; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #5a5a5a, #222);
}
.fm-case::before { left: -4px; top: 34%; height: 40px; }
.fm-case::after { right: -4px; top: 24%; height: 32px; box-shadow: 0 46px 0 #3a3a3a, 0 92px 0 #3a3a3a; }
.fm-screen { width: 100%; height: auto; aspect-ratio: 200 / 228; border-radius: 10px; background: #e8e2d6; box-shadow: 0 0 0 3px #050505, 0 0 0 4px rgba(255,255,255,.06); }

.fm-bubbles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fm-bubble {
  position: absolute; display: grid; gap: 6px;
  width: min(280px, 68%); padding: 14px 16px 15px;
  border-radius: 20px 20px 20px 6px;
  background: linear-gradient(180deg, rgba(34,34,34,.78), rgba(16,16,16,.72));
  border: 1px solid rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
  pointer-events: auto;
  animation: fm-float 6s ease-in-out infinite;
  transition: border-color .3s, box-shadow .4s var(--ease), scale .4s var(--ease);
}
.fm-bubble::before { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--cat, var(--orange)), transparent); opacity: .8; }
a.fm-bubble:hover { scale: 1.04; border-color: color-mix(in srgb, var(--cat, var(--orange)) 55%, transparent); box-shadow: 0 30px 60px -24px rgba(0,0,0,.9), 0 0 40px -14px var(--cat, var(--orange)); }
.fm-bubble--1 { top: 4%; left: -2%; animation-delay: -1.2s; }
.fm-bubble--2 { top: 46%; right: -2%; animation-delay: -3.4s; border-radius: 20px 20px 6px 20px; }
.fm-bubble--3 { bottom: 5%; left: 4%; animation-delay: -4.6s; }
.fm-bubble.is-skel { width: min(240px, 60%); }
.fm-bubble.is-skel .skeleton--text:last-child { width: 70%; }
.fm-bubble__top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.fm-bubble__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text); }
.fm-bubble__when { margin-left: auto; flex: none; font: 600 11px/1 var(--font-mono); color: var(--dim); }
.fm-bubble__title { font: 700 14.5px/1.3 var(--font-body); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-bubble__cat { font: 600 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cat, var(--orange-2)); }

/* marquee band */
.fm-band { padding-block: 26px; border-bottom: 1px solid var(--line); overflow: hidden; }
.fm-band .marquee__track > span { display: inline-flex; align-items: center; gap: 48px; }
.fm-band .marquee__track > span::after { content: ""; width: .22em; height: .22em; border-radius: 50%; background: var(--orange); box-shadow: 0 0 20px var(--glow); -webkit-text-stroke: 0; }

/* section heads */
.fm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.fm-head .section-head { margin-bottom: 0; }
.fm-head__aside { max-width: 34ch; font-size: 15.5px; }
.fm-sec-title { font: 800 clamp(26px, 3.2vw, 40px)/1.05 var(--font-display); letter-spacing: -.03em; }

/* category cards */
.fm-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fm-cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  width: 100%; min-height: 236px; overflow: hidden;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.fm-cat::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--cat); box-shadow: 0 0 24px var(--cat);
  transform-origin: left; transform: scaleX(.18); transition: transform .7s var(--ease);
}
.fm-cat::after {
  content: ""; position: absolute; z-index: -1; right: -90px; top: -90px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat) 30%, transparent), transparent 68%);
  opacity: .35; transition: opacity .5s, transform .8s var(--ease);
}
.fm-cat:hover::before, .fm-cat[aria-pressed="true"]::before { transform: scaleX(1); }
.fm-cat:hover::after, .fm-cat[aria-pressed="true"]::after { opacity: 1; transform: scale(1.25); }
.fm-cat:hover { border-color: color-mix(in srgb, var(--cat) 40%, var(--line-2)); }
.fm-cat[aria-pressed="true"] { border-color: var(--cat); box-shadow: 0 0 0 1px var(--cat), 0 30px 70px -36px var(--cat); }
.fm-cat__icon {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px;
  color: var(--cat); background: color-mix(in srgb, var(--cat) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 35%, transparent);
  transition: transform .5s var(--ease), background-color .3s;
}
.fm-cat__icon .ico { width: 22px; height: 22px; }
.fm-cat:hover .fm-cat__icon { transform: rotate(-8deg) scale(1.08); background: color-mix(in srgb, var(--cat) 22%, transparent); }
.fm-cat__count {
  position: absolute; right: 22px; top: 14px;
  font: 900 clamp(56px, 6vw, 76px)/1 var(--font-display); letter-spacing: -.05em;
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--cat) 55%, transparent);
  transition: -webkit-text-stroke-color .3s, transform .6s var(--ease);
}
.fm-cat:hover .fm-cat__count { transform: translateY(-4px); -webkit-text-stroke-color: var(--cat); }
.fm-cat__name { margin-top: 6px; font: 700 clamp(19px, 1.8vw, 23px)/1.15 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.fm-cat__desc { font-size: 15px; line-height: 1.5; color: var(--muted); }
.fm-cat__go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cat); }
.fm-cat__go .ico { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.fm-cat:hover .fm-cat__go .ico { transform: translateX(5px); }
.fm-cat--skel { cursor: default; }
.fm-skel-icon { width: 50px; height: 50px; border-radius: 15px; }
.fm-cat--skel .skeleton--text { width: 90%; }
.fm-cats__error { grid-column: 1 / -1; }

/* layout */
.fm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.fm-main { min-width: 0; }
.fm-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* board toolbar */
.fm-board__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 22px; }
.fm-result { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.fm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fm-search { position: relative; flex: 1 1 300px; min-width: 0; }
.fm-search > .ico { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--dim); pointer-events: none; transition: color .2s; }
.fm-search:focus-within > .ico { color: var(--orange); }
.fm-search .input { padding-left: 48px; padding-right: 48px; border-radius: 999px; }
.fm-search .input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); cursor: pointer; }
.fm-search .kbd { position: absolute; right: 16px; top: 50%; translate: 0 -50%; pointer-events: none; transition: opacity .2s; }
.fm-search .input:focus ~ .kbd, .fm-search .input:not(:placeholder-shown) ~ .kbd { opacity: 0; }
.fm-sort { flex: none; }
.fm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.fm-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 10px var(--cat); }
.fm-chip.is-active { background: var(--cat); border-color: var(--cat); box-shadow: 0 6px 22px -8px var(--cat); }
.fm-chip.is-active::before { background: #0a0a0a; box-shadow: none; }

/* thread rows */
.fm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; transition: opacity .3s; }
.fm-list.is-loading { opacity: .55; }
.fm-row {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 22px; align-items: center;
  padding: 22px 24px 22px 20px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, #131313, #0e0e0e);
  animation: fm-in .6s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease), background-color .3s;
}
.fm-row::before {
  content: ""; position: absolute; left: -1px; top: 20px; bottom: 20px; width: 3px; border-radius: 3px;
  background: var(--cat, var(--orange)); box-shadow: 0 0 18px var(--cat, var(--orange));
  transform: scaleY(.35); opacity: .7; transition: transform .45s var(--ease), opacity .3s;
}
.fm-row::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(500px 160px at 0% 50%, color-mix(in srgb, var(--cat, var(--orange)) 12%, transparent), transparent 70%);
  opacity: 0; transition: opacity .45s;
}
.fm-row:hover { transform: translateX(6px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(0,0,0,.9); }
.fm-row:hover::before, .fm-row:focus-within::before { transform: scaleY(1); opacity: 1; }
.fm-row:hover::after, .fm-row:focus-within::after { opacity: 1; }
.fm-row:has(.fm-row__title a:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; }
.fm-row.is-pinned { border-color: rgba(255,90,0,.3); background: radial-gradient(700px 200px at 100% 0%, rgba(255,90,0,.07), transparent 60%), linear-gradient(180deg, #151210, #0e0d0c); }
.fm-row__votes {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2);
  font: 800 17px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  transition: border-color .3s, color .3s;
}
.fm-row__votes .ico { width: 16px; height: 16px; color: var(--orange); }
.fm-row:hover .fm-row__votes { border-color: rgba(255,90,0,.35); }
.fm-row__main { min-width: 0; }
.fm-row__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.fm-row__title { font: 700 clamp(17px, 1.6vw, 20px)/1.28 var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.fm-row__title a { transition: color .2s; }
.fm-row__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.fm-row__title a:focus-visible { outline: none; }
.fm-row:hover .fm-row__title a { color: var(--orange-2); }
.fm-row__excerpt { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fm-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.fm-row__last { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fm-row__last .ico { width: 14px; height: 14px; color: var(--dim); }
.fm-row__last--none { color: var(--dim); }
.fm-row__stats { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 76px; text-align: right; }
.fm-row__stat { display: flex; flex-direction: column; font: 600 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fm-row__stat b { font: 800 22px/1 var(--font-display); letter-spacing: -.03em; color: var(--text); text-transform: none; }
.fm-row__stat--dim b { font-size: 15px; color: var(--muted); }
.fm-row mark, .fm-bubble mark { background: rgba(255,90,0,.25); color: var(--text); border-radius: 3px; padding: 0 2px; }
.fm-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); flex: none; }
.fm-row--skel { grid-template-columns: 62px minmax(0, 1fr); animation: none; }
.fm-skel-vote { height: 62px; border-radius: 14px; }
.fm-skel-lines { display: block; }
.fm-skel-lines .skeleton--text { display: block; }

/* tags, badges, avatars */
.fm-tag { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cat, var(--orange)); }
.fm-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.fm-tag-link { display: inline-flex; padding: 7px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cat, var(--orange)) 35%, transparent); background: color-mix(in srgb, var(--cat, var(--orange)) 8%, transparent); transition: background-color .25s, border-color .25s; }
.fm-tag-link:hover { background: color-mix(in srgb, var(--cat, var(--orange)) 18%, transparent); border-color: var(--cat, var(--orange)); }
.fm-badge { gap: 6px; }
.fm-badge .ico { width: 12px; height: 12px; }
.fm-badge--pin { color: var(--orange-2); background: rgba(255,90,0,.1); border-color: rgba(255,90,0,.4); }
.fm-badge--solved { color: var(--success); background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.35); }
.fm-badge--hot { color: #0a0a0a; background: linear-gradient(100deg, var(--orange), var(--amber)); border-color: transparent; box-shadow: 0 0 18px -4px var(--glow); }
.fm-av {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  font: 800 11px/1 var(--font-display); color: #0a0a0a;
  background: var(--av, var(--orange));
  box-shadow: 0 0 0 2px var(--bg), 0 0 14px -3px var(--av, var(--orange));
}
.fm-av--sm { width: 22px; height: 22px; font-size: 10px; }
.fm-av--lg { width: 44px; height: 44px; font-size: 17px; }
.fm-av--team { background: radial-gradient(circle at 50% 50%, #0a0a0a 0 22%, var(--orange) 24%); color: transparent; }
.fm-author { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.fm-staff { padding: 3px 6px; border-radius: 5px; font: 700 9.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #0a0a0a; background: var(--orange); }

/* empty + error */
.fm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 56px 24px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: radial-gradient(400px 200px at 50% 0%, rgba(255,90,0,.06), transparent 70%);
}
.fm-empty .row { margin-top: 8px; }
.fm-empty__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--orange); background: rgba(255,90,0,.1); border: 1px solid rgba(255,90,0,.3); box-shadow: 0 0 40px -10px var(--glow); }
.fm-empty__icon .ico { width: 26px; height: 26px; }
.fm-empty--error .fm-empty__icon { color: var(--danger); background: rgba(255,77,77,.08); border-color: rgba(255,77,77,.3); box-shadow: none; }

/* sidebar */
.fm-card { padding: 26px; overflow: hidden; }
.fm-card .eyebrow { margin-bottom: 14px; }
.fm-card .h3 { margin-bottom: 10px; }
.fm-card > .muted { font-size: 15px; line-height: 1.55; }
.fm-card .btn--block { margin-top: 20px; }
.fm-card__note { margin-top: -4px; font-size: 13.5px !important; }
.fm-card--start { border-color: rgba(255,90,0,.3); background: radial-gradient(360px 220px at 100% 0%, rgba(255,90,0,.16), transparent 70%), linear-gradient(180deg, #161210, #0e0d0c); }
.fm-card--start .glow-orb { --size: 200px; --o: .35; right: -80px; top: -80px; }
.fm-card--start > *:not(.glow-orb) { position: relative; }
.fm-rules { list-style: none; counter-reset: rule; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fm-rules li { counter-increment: rule; position: relative; padding-left: 40px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.fm-rules li::before {
  content: counter(rule, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font: 600 11px/1 var(--font-mono); color: var(--orange); padding: 5px 6px; border-radius: 6px;
  background: rgba(255,90,0,.1); border: 1px solid rgba(255,90,0,.25);
}
.fm-rules strong { color: var(--text); }
.fm-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.fm-links li + li { border-top: 1px solid var(--line); }
.fm-links a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; font-weight: 700; font-size: 15px; transition: color .2s, padding .35s var(--ease); }
.fm-links a > .ico { width: 36px; height: 36px; padding: 8px; border-radius: 11px; color: var(--orange-2); background: var(--surface-2); border: 1px solid var(--line-2); transition: background-color .25s, color .25s, border-color .25s; }
.fm-links small { display: block; font-weight: 500; font-size: 12.5px; color: var(--dim); }
.fm-links a:hover { color: var(--orange-2); padding-left: 10px; }
.fm-links a:hover > .ico { background: var(--orange); color: #0a0a0a; border-color: var(--orange); }

/* buy card + mini watch */
.fm-buy { text-align: left; }
.fm-buy .h3 { font-size: clamp(22px, 2.2vw, 28px); }
.fm-buy__price { margin-top: 14px; font: 900 44px/1 var(--font-display); letter-spacing: -.04em; }
.fm-buy__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.fm-buy__actions .btn--block { margin-top: 18px; }
.fm-mini { position: relative; width: 132px; margin: 4px auto 22px; padding: 11px; border-radius: 30px; background: linear-gradient(145deg, #4a4a4a, #151515 45%, #333); box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 30px 50px -20px rgba(0,0,0,.9), 0 0 60px -14px var(--glow); transition: transform .6s var(--ease); }
.fm-mini::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -34px; bottom: -34px; width: 52%; translate: -50% 0; border-radius: 16px; background: linear-gradient(90deg, #0e0e0e, #1e1e1e 50%, #0e0e0e); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.fm-mini--round { border-radius: 50%; }
.fm-mini__screen { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; background: #e8e2d6; }
.fm-mini--rect { width: 120px; border-radius: 26px; padding: 12px 10px; }
.fm-mini--rect .fm-mini__screen { aspect-ratio: 200 / 228; border-radius: 6px; }
.fm-buy:hover .fm-mini { transform: rotate(-6deg) scale(1.05); }

/* big cta */
.fm-cta { overflow: hidden; border-top: 1px solid var(--line); }
.fm-cta > .glow-orb { --size: 720px; --o: .35; left: 50%; top: 50%; margin: -360px 0 0 -360px; }
.fm-cta .container { position: relative; z-index: 1; }
.fm-cta .eyebrow { margin-bottom: 22px; }
.fm-cta .lead { margin: 26px auto 0; }
.fm-cta .row { margin-top: 36px; }

/* modal */
.fm-modal {
  width: min(740px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; overflow: hidden;
  color: var(--text); background: #0d0d0d;
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.95), 0 0 0 1px rgba(255,90,0,.08), 0 0 140px -40px var(--glow);
}
.fm-modal[open] { animation: fm-pop .5s var(--ease-out); }
.fm-modal::backdrop { background: rgba(5,5,5,.74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.fm-modal[open]::backdrop { animation: fm-fade .3s ease; }
.fm-modal__box { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.fm-modal__head {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 26px 28px 20px; border-bottom: 1px solid var(--line);
  background: radial-gradient(420px 160px at 0% 0%, rgba(255,90,0,.16), transparent 70%);
}
.fm-modal__head .eyebrow { margin-bottom: 10px; }
.fm-modal__title { font: 800 clamp(24px, 3.4vw, 34px)/1.05 var(--font-display); letter-spacing: -.03em; }
.fm-modal__body { display: flex; flex-direction: column; gap: 18px; padding: 24px 28px; overflow-y: auto; overscroll-behavior: contain; }
.fm-modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 28px 22px; border-top: 1px solid var(--line); background: #0b0b0b; }
.fm-modal__tip { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }
.fm-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fm-editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fm-tabs-sm { padding: 3px; }
.fm-tabs-sm .tab { height: 32px; padding: 0 14px; font-size: 13px; }
.fm-textarea { min-height: 180px; font-size: 15.5px; line-height: 1.6; }
.fm-preview { max-width: none; min-height: 180px; padding: 16px 18px; font-size: 16px; line-height: 1.65; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--bg-2); }
.field__hint code { font: 500 11.5px/1 var(--font-mono); padding: 2px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--orange-2); }
.fm-form-error { padding: 12px 14px; border-radius: 12px; font-size: 14px; color: #ff8a8a; background: rgba(255,77,77,.08); border: 1px solid rgba(255,77,77,.3); }

/* ===== thread page ===== */
.fm-thread-hero {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: clamp(36px, 5vw, 72px) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.fm-thread-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 20%, transparent 75%);
}
.fm-thread-hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(760px, 130vw); aspect-ratio: 1; right: -14%; top: -60%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat, var(--orange)) 38%, transparent), color-mix(in srgb, var(--cat, var(--orange)) 10%, transparent) 40%, transparent 70%);
  filter: blur(40px);
  animation: pb-orb 18s ease-in-out infinite alternate;
}
.fm-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 26px; padding: 0; font: 600 11.5px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fm-crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.fm-crumbs li + li::before { content: "/"; color: var(--dim); }
.fm-crumbs a { transition: color .2s; }
.fm-crumbs a:hover { color: var(--orange-2); }
.fm-crumbs [aria-current] { color: var(--text); max-width: min(42ch, 60vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fm-thread-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fm-title { margin-top: 20px; max-width: 22ch; font: 800 clamp(32px, 5.4vw, 76px)/1 var(--font-display); letter-spacing: -.035em; overflow-wrap: break-word; hyphens: auto; }
.fm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 26px; font-size: 14.5px; color: var(--muted); }
.fm-meta__item { display: inline-flex; align-items: center; gap: 7px; }
.fm-meta__item .ico { width: 16px; height: 16px; color: var(--dim); }
.fm-thread-actions { margin-top: 30px; }
.fm-head-skel .skeleton, #op-body .skeleton, .fm-reply .skeleton--text { display: block; }
.fm-head-skel .skeleton--text { max-width: 640px; }
.fm-head-skel .fm-skel-title { height: clamp(36px, 5vw, 64px); max-width: 780px; margin: 22px 0 12px; border-radius: 12px; }

/* original post */
.fm-post {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 26px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: radial-gradient(600px 240px at 0% 0%, rgba(255,90,0,.06), transparent 65%), linear-gradient(180deg, #131313, #0d0d0d);
}
.fm-post__body { min-width: 0; }
.fm-post__body .prose { max-width: none; }
.fm-post__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fm-byline { display: inline-flex; align-items: center; gap: 12px; }
.fm-byline small { display: block; font-size: 12.5px; color: var(--dim); }

.fm-vote { position: sticky; top: calc(var(--bar-h) + 24px); align-self: start; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fm-vote__btn {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px;
  color: var(--muted); border: 1px solid var(--line-2); background: var(--bg-2);
  transition: color .2s, border-color .2s, background-color .25s, box-shadow .35s, transform .3s var(--ease);
}
.fm-vote__btn .ico { width: 22px; height: 22px; }
.fm-vote__btn:hover { color: var(--orange-2); border-color: var(--orange); transform: translateY(-2px); }
.fm-vote__btn--down .ico { rotate: 180deg; }
.fm-vote__btn--down:hover { transform: translateY(2px); color: var(--text); border-color: #666; }
.fm-vote__btn--up[aria-pressed="true"] { color: #0a0a0a; background: var(--orange); border-color: var(--orange); box-shadow: 0 0 28px -4px var(--glow); }
.fm-vote__btn--down[aria-pressed="true"] { color: var(--text); background: #2a2a2a; border-color: #777; }
.fm-vote__btn:active { transform: scale(.92); }
.fm-vote__count { display: block; min-width: 3ch; text-align: center; font: 900 26px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fm-vote__count.is-bump { animation: fm-bump .45s var(--ease-out); }
.fm-vote.is-busy .fm-vote__btn { pointer-events: none; }

.fm-solved-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px;
  padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid rgba(74,222,128,.3); background: rgba(74,222,128,.06); color: var(--text); font-size: 15px;
}
.fm-solved-note .ico { width: 20px; height: 20px; color: var(--success); }
.fm-solved-note > span { flex: 1 1 220px; min-width: 0; }
.fm-solved-note a { margin-left: auto; color: var(--success); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.fm-solved-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* replies */
.fm-replies-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin: clamp(48px, 6vw, 72px) 0 22px; }
.fm-replies-head .fm-sec-title span { color: var(--orange); }
.fm-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fm-reply {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px;
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, #121212, #0d0d0d);
  scroll-margin-top: calc(var(--bar-h) + 24px);
  transition: border-color .3s, box-shadow .45s var(--ease);
}
.fm-reply:hover { border-color: var(--line-2); }
.fm-reply:target, .fm-reply.is-target { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), 0 0 60px -24px var(--glow); }
.fm-reply.is-accepted {
  border-color: rgba(74,222,128,.45);
  background: radial-gradient(600px 200px at 0% 0%, rgba(74,222,128,.09), transparent 60%), linear-gradient(180deg, #111512, #0c0e0c);
  box-shadow: 0 0 0 1px rgba(74,222,128,.14), 0 30px 80px -44px rgba(74,222,128,.5);
}
.fm-reply.is-new { animation: fm-new 1.4s var(--ease-out); }
.fm-reply__side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fm-reply__side::after { content: ""; flex: 1; width: 1px; min-height: 20px; background: linear-gradient(180deg, var(--line-2), transparent); }
.fm-reply__main { min-width: 0; }
.fm-reply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.fm-reply__head time { color: var(--dim); font: 600 12px/1 var(--font-mono); }
.fm-op { padding: 3px 6px; border-radius: 5px; font: 700 9.5px/1 var(--font-mono); letter-spacing: .12em; color: var(--orange-2); border: 1px solid rgba(255,90,0,.4); background: rgba(255,90,0,.1); }
.fm-reply .prose { margin-top: 12px; max-width: none; font-size: 16.5px; line-height: 1.7; }
.fm-reply__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; font: 600 12px/1 var(--font-mono); color: var(--dim); }
.fm-reply__votes { display: inline-flex; align-items: center; gap: 6px; }
.fm-reply__votes .ico { width: 14px; height: 14px; color: var(--orange); }
.fm-linkbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font: inherit; transition: color .2s; }
.fm-linkbtn .ico { width: 14px; height: 14px; }
.fm-linkbtn:hover { color: var(--orange-2); }
.fm-accepted-badge { color: var(--success); background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.35); }
.fm-no-replies { padding: 36px 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* composer */
.fm-composer { margin-top: 28px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); border-color: rgba(255,90,0,.22); background: radial-gradient(500px 200px at 100% 0%, rgba(255,90,0,.1), transparent 65%), linear-gradient(180deg, #141210, #0d0c0b); scroll-margin-top: calc(var(--bar-h) + 24px); }
.fm-composer:hover { transform: none; }
.fm-composer__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.fm-composer form { display: flex; flex-direction: column; gap: 16px; }
.fm-composer .field--name { max-width: 340px; }
.fm-composer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* thread sidebar */
.fm-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fm-facts li { padding: 14px 16px; background: #101010; }
.fm-facts b { display: block; font: 800 24px/1.1 var(--font-display); letter-spacing: -.03em; color: var(--text); }
.fm-facts span { font: 600 10.5px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fm-facts li.is-wide { grid-column: 1 / -1; }
.fm-facts li.is-wide b { font-size: 15px; font-family: var(--font-body); letter-spacing: 0; }
.fm-share { display: flex; gap: 8px; margin-top: 16px; }
.fm-share .input { min-height: 44px; padding: 10px 14px; font: 500 13px/1.2 var(--font-mono); color: var(--muted); border-radius: 12px; }
.fm-share .btn { flex: none; }

/* related */
.fm-related { border-top: 1px solid var(--line); }
.fm-rel { display: flex; flex-direction: column; gap: 14px; min-height: 210px; }
.fm-rel::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; background: var(--cat, var(--orange)); box-shadow: 0 0 20px var(--cat, var(--orange)); opacity: .6; transition: opacity .3s, left .5s var(--ease), right .5s var(--ease); }
.fm-rel:hover::before { opacity: 1; left: 0; right: 0; }
.fm-rel__title { font: 700 clamp(17px, 1.6vw, 20px)/1.28 var(--font-display); letter-spacing: -.015em; transition: color .2s; overflow-wrap: anywhere; }
.fm-rel:hover .fm-rel__title { color: var(--orange-2); }
.fm-rel__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; font: 600 11.5px/1.2 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.fm-rel__meta span { display: inline-flex; align-items: center; gap: 6px; }
.fm-rel__meta .ico { width: 14px; height: 14px; color: var(--orange); }

/* not found */
.fm-missing { position: relative; text-align: center; padding-block: clamp(40px, 8vw, 110px); }
.fm-missing__num { font: 900 clamp(96px, 22vw, 280px)/.85 var(--font-display); letter-spacing: -.07em; color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.5px rgba(255,122,31,.55); filter: drop-shadow(0 0 40px rgba(255,90,0,.25)); user-select: none; }
.fm-missing h1 { margin-top: 10px; }
.fm-missing .lead { margin: 22px auto 0; }
.fm-missing .row { margin-top: 32px; }

/* responsive */
@media (max-width: 1100px) {
  .fm-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
}
@media (max-width: 1024px) {
  .fm-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .fm-art { min-height: 480px; max-width: 620px; width: 100%; margin-inline: auto; }
  .fm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-layout { grid-template-columns: minmax(0, 1fr); }
  .fm-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 760px) {
  .fm-side { grid-template-columns: minmax(0, 1fr); }
  .fm-row { grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 14px; padding: 18px 16px 18px 14px; }
  .fm-row__votes { padding: 8px 0; font-size: 15px; border-radius: 12px; }
  .fm-row__stats { grid-column: 2; flex-direction: row; align-items: center; gap: 16px; min-width: 0; text-align: left; }
  .fm-row__stat { flex-direction: row; align-items: baseline; gap: 6px; }
  .fm-row__stat b, .fm-row__stat--dim b { font-size: 15px; }
  .fm-row:hover { transform: none; }
  .fm-form-row { grid-template-columns: minmax(0, 1fr); }
  .fm-post { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .fm-vote { position: static; flex-direction: row; justify-self: start; order: 2; gap: 10px; }
  .fm-vote__btn { width: 44px; height: 44px; border-radius: 13px; }
  .fm-reply { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px 18px; }
  .fm-reply__side { flex-direction: row; }
  .fm-reply__side::after { display: none; }
  .fm-reply__side .fm-av--lg { width: 34px; height: 34px; font-size: 14px; }
  .fm-reply__side { position: absolute; left: 18px; top: 18px; }
  .fm-reply__head { min-height: 34px; padding-left: 46px; }
}
@media (max-width: 640px) {
  .fm-hero__title { font-size: clamp(48px, 15vw, 72px); }
  .fm-hero .row .btn { flex: 1 1 100%; }
  .fm-stats__grid { gap: 16px 28px; }
  .fm-art { min-height: 420px; }
  .fm-case { width: 176px; padding: 18px 14px; border-radius: 38px; }
  .fm-device::before { top: -110px; bottom: -110px; }
  .fm-art > .glow-orb { --size: 320px; margin: -160px 0 0 -160px; }
  .fm-bubble { width: min(220px, 64%); padding: 12px 13px; }
  .fm-bubble__title { font-size: 13px; }
  .fm-bubble--1 { left: 0; top: 0; }
  .fm-bubble--2 { display: none; }
  .fm-bubble--3 { left: auto; right: 0; bottom: 0; border-radius: 20px 20px 6px 20px; }
  .fm-band { padding-block: 18px; }
  .fm-cats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fm-cat { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 4px 14px; min-height: 0; padding: 18px 18px 18px 16px; }
  .fm-cat__icon { grid-row: 1 / span 3; width: 44px; height: 44px; border-radius: 13px; }
  .fm-cat__name { margin-top: 0; font-size: 18px; }
  .fm-cat__desc { font-size: 14px; }
  .fm-cat__go { margin-top: 6px; }
  .fm-cat__count { display: none; }
  .fm-kbd-tip { display: none; }
  .fm-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 2px; }
  .fm-filters::-webkit-scrollbar { display: none; }
  .fm-filters .chip { flex: none; }
  .fm-toolbar { align-items: stretch; }
  .fm-sort { align-self: flex-start; }
  .fm-row__meta { font-size: 12.5px; }
  .fm-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .fm-modal__box { max-height: calc(100dvh - 18px); }
  .fm-modal__head, .fm-modal__body { padding-inline: 18px; }
  .fm-modal__foot { padding: 14px 18px 18px; }
  .fm-modal__tip { display: none; }
  .fm-modal__foot .btn { flex: 1 1 0; }
  .fm-title { font-size: clamp(28px, 8.4vw, 40px); }
  .fm-thread-actions .btn { flex: 1 1 auto; }
  .fm-composer__foot .btn { width: 100%; }
  .fm-solved-note a { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fm-float, .fm-bubble, .fm-row, .fm-thread-hero::after { animation: none !important; }
  .fm-row:hover, a.fm-bubble:hover { transform: none; scale: none; }
}
