/* Crosshair Hub — same tokens as the landing page (landing.css). */
.xh-page main { padding-top: 0 !important; }
.xh-hero { position: relative; padding: clamp(44px, 7vw, 84px) 0 clamp(18px, 3vw, 28px); text-align: center; }
.xh-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 70% at 50% 15%, rgba(200, 91, 242, 0.2), transparent 70%);
}
.xh-eyebrow { margin: 0 0 12px; font: 800 13px/1 var(--ln-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ln-accent); }
.xh-hero h1 { margin: 0 0 12px; font-family: var(--ln-display); color: #fff; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; }
.xh-hero p.xh-lead { margin: 0 auto 26px; max-width: 640px; color: var(--ln-text); font-size: 17px; line-height: 1.55; }

.xh-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: rgba(14, 9, 20, .85); border: 1px solid rgba(255, 255, 255, .08); }
.xh-tab {
  border: 0; cursor: pointer; padding: 10px 18px; border-radius: 10px; background: transparent; color: var(--ln-mute);
  font: 800 15px var(--ln-body); transition: color .15s, background .15s;
}
.xh-tab:hover { color: #fff; }
.xh-tab[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, rgba(200, 91, 242, .9), rgba(126, 26, 182, .9)); }

.xh-wrap { max-width: var(--ln-wrap); margin: 0 auto; padding: 0 var(--ln-gutter) clamp(56px, 8vw, 96px); }
.xh-panel[hidden] { display: none !important; }

/* search + filters */
.xh-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 14px; }
.xh-search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 13px;
  background: rgba(14, 9, 20, .85); border: 1px solid rgba(200, 91, 242, .28);
}
.xh-search:focus-within { border-color: rgba(200, 91, 242, .7); box-shadow: 0 0 0 4px rgba(200, 91, 242, .14); }
.xh-search svg { width: 20px; height: 20px; color: var(--ln-mute); flex: 0 0 auto; }
.xh-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: 600 16px var(--ln-body); }
.xh-select {
  height: 52px; padding: 0 38px 0 14px; border-radius: 13px; color: #fff; font: 700 14.5px var(--ln-body); cursor: pointer;
  background: rgba(14, 9, 20, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239f97ad' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid rgba(255, 255, 255, .1); appearance: none;
}
.xh-select:focus { outline: 0; border-color: rgba(200, 91, 242, .7); }
.xh-select option { background: #120b19; }
.xh-colors { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.xh-colors span { color: var(--ln-mute); font-size: 13px; font-weight: 700; margin-right: 4px; }
.xh-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255, 255, 255, .12); padding: 0;
}
.xh-swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 3px rgba(200, 91, 242, .5); }
.xh-swatch.any { background: conic-gradient(#ff3b3b, #ffe600, #00ff7f, #00e5ff, #6b7bff, #ff2bd6, #ff3b3b); }
.xh-meta { color: var(--ln-mute); font-size: 14px; margin: 0 0 14px; }

/* grid of cards */
.xh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.xh-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ln-text);
  background: rgba(17, 12, 24, .85); border: 1px solid rgba(255, 255, 255, .07); transition: border-color .15s, transform .15s;
}
.xh-card:hover { border-color: rgba(200, 91, 242, .55); transform: translateY(-2px); }
.xh-card canvas { display: block; width: 100%; height: 150px; background: #0b0a0f; }
.xh-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.xh-card-top { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.xh-card strong { color: #fff; font-size: 15.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-id { font: 700 11.5px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #e9d5ff; letter-spacing: .02em; white-space: nowrap; }
.xh-card small { color: var(--ln-mute); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.xh-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  background: rgba(255, 255, 255, .06); color: var(--ln-text);
}
.xh-pill.example { background: rgba(200, 91, 242, .14); color: #f5d0fe; }
.xh-pill.anim { background: rgba(0, 229, 255, .12); color: #a5f3fc; }
.xh-card-link { display: block; }
.xh-card-top a { color: inherit; text-decoration: none; min-width: 0; overflow: hidden; }
.xh-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.xh-card-actions .btn { justify-content: center; text-align: center; padding: 9px 8px; font-size: 13.5px; border-radius: 10px; }
.xh-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.xh-cat { height: 36px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(14, 9, 20, .7); color: var(--ln-text); font: 600 14px var(--ln-body); cursor: pointer; }
.xh-cat:hover { border-color: rgba(200, 91, 242, .55); color: #fff; }
.xh-cat[aria-pressed="true"] { color: #fff; border-color: transparent; background: linear-gradient(180deg, rgba(200, 91, 242, .9), rgba(126, 26, 182, .9)); }
.xh-pill.private { background: rgba(255, 255, 255, .08); color: var(--ln-mute); }
.xh-empty { text-align: center; padding: 48px 16px; color: var(--ln-mute); border: 1px dashed rgba(255, 255, 255, .12); border-radius: 18px; }
.xh-empty strong { display: block; color: #fff; font-size: 18px; margin-bottom: 6px; }
.xh-more { display: flex; justify-content: center; margin-top: 22px; }
.xh-skel { height: 220px; border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: xhsk 1.2s linear infinite; }
@keyframes xhsk { to { background-position: -200% 0; } }

/* editor */
.xh-editor { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 18px; margin-top: 22px; align-items: start; }
.xh-stage { position: sticky; top: 86px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); background: #0b0a0f; }
.xh-stage canvas { display: block; width: 100%; aspect-ratio: 16 / 10; }
.xh-stage-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; background: rgba(14, 9, 20, .92); border-top: 1px solid rgba(255, 255, 255, .06); }
.xh-bgs { display: flex; gap: 6px; }
.xh-bg { width: 30px; height: 22px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.xh-bg[aria-pressed="true"] { border-color: var(--ln-accent); }
.xh-hint { color: var(--ln-mute); font-size: 12.5px; }
.xh-controls { border-radius: 18px; padding: 16px; background: rgba(17, 12, 24, .88); border: 1px solid rgba(255, 255, 255, .08); }
.xh-group { padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.xh-group:last-child { border-bottom: 0; }
.xh-group h3 { margin: 0 0 10px; font: 800 12px var(--ln-body) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--ln-accent); }
.xh-row { display: grid; grid-template-columns: 118px 1fr 52px; gap: 10px; align-items: center; margin: 8px 0; }
.xh-row label { color: var(--ln-text); font-size: 14px; font-weight: 700; }
.xh-row output { color: #fff; font: 700 13px ui-monospace, Consolas, monospace; text-align: right; }
.xh-row input[type="range"] { width: 100%; accent-color: var(--ln-accent); }
.xh-row.two { grid-template-columns: 118px 1fr; }
.xh-input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; color: #fff; font: 600 14.5px var(--ln-body);
  background: rgba(8, 5, 12, .9); border: 1px solid rgba(255, 255, 255, .1);
}
.xh-input:focus { outline: 0; border-color: rgba(200, 91, 242, .7); }
textarea.xh-input { height: 70px; padding: 10px 12px; resize: vertical; }
.xh-color { display: flex; gap: 8px; align-items: center; }
.xh-color input[type="color"] { width: 44px; height: 40px; border: 0; border-radius: 10px; background: none; padding: 0; cursor: pointer; }
.xh-styles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.xh-style {
  height: 44px; border-radius: 10px; cursor: pointer; background: rgba(8, 5, 12, .9); border: 1px solid rgba(255, 255, 255, .1); padding: 0;
}
.xh-style canvas { width: 100%; height: 100%; display: block; }
.xh-style[aria-pressed="true"] { border-color: var(--ln-accent); box-shadow: 0 0 0 2px rgba(200, 91, 242, .3); }
.xh-arms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; flex: 1; }
.xh-arm { height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: var(--ln-text); font: 600 13px var(--ln-body); cursor: pointer; }
.xh-arm[aria-pressed="true"] { background: rgba(200, 91, 242, .22); border-color: var(--ln-accent); color: #fff; }
.xh-anim-pre { grid-template-columns: repeat(5, 1fr); margin-bottom: 10px; }
.xh-label { font: 600 14px var(--ln-body); color: var(--ln-text); }
.xh-switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; }
.xh-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.xh-switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); transition: background .15s; pointer-events: none; }
.xh-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.xh-switch input:checked + i { background: var(--ln-accent); }
.xh-switch input:checked + i::after { transform: translateX(20px); }
.xh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xh-actions .btn { padding: 11px 15px; border-radius: 11px; font-size: 14px; }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(255, 255, 255, .12); }
.btn-ghost:hover { border-color: rgba(200, 91, 242, .55); }
.xh-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 90; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: rgba(20, 13, 28, .96); border: 1px solid rgba(200, 91, 242, .45); color: #fff; font-weight: 700;
  transition: opacity .2s, transform .2s;
}
.xh-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.xh-note { font-size: 13px; color: var(--ln-mute); line-height: 1.5; margin: 8px 0 0; }
.xh-note.warn { color: #fcd34d; }
.xh-code {
  display: flex; gap: 8px; align-items: stretch; margin-top: 8px;
}
.xh-code code {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgba(8, 5, 12, .9); border: 1px solid rgba(255, 255, 255, .08);
  color: #e9d5ff; font: 600 12.5px/1.45 ui-monospace, Consolas, monospace; word-break: break-all; max-height: 92px; overflow: auto;
}
.xh-login {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 16px; margin-top: 22px;
  background: radial-gradient(70% 140% at 100% 0%, rgba(88, 101, 242, .2), transparent 60%), rgba(17, 12, 24, .85); border: 1px solid rgba(255, 255, 255, .08);
}
.xh-login p { margin: 0; color: var(--ln-text); }
.xh-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.xh-section-title h2 { margin: 0; font-family: var(--ln-display); color: #fff; font-size: 22px; }

/* detail page */
.xd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; margin-top: 26px; align-items: start; }
.xd-crumb { margin: 26px 0 0; font-size: 14px; color: var(--ln-mute); }
.xd-crumb a { color: var(--ln-text); text-decoration: none; }
.xd-crumb a:hover { color: #fff; }
.xd h1 { margin: 0 0 6px; font-family: var(--ln-display); color: #fff; font-size: clamp(28px, 4vw, 40px); }
.xd-card { border-radius: 18px; padding: 18px; background: rgba(17, 12, 24, .88); border: 1px solid rgba(255, 255, 255, .08); }
.xd-card + .xd-card { margin-top: 14px; }
.xd-idrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.xd-id { font: 800 15px ui-monospace, Consolas, monospace; color: #f5d0fe; padding: 7px 11px; border-radius: 10px; background: rgba(200, 91, 242, .12); border: 1px solid rgba(200, 91, 242, .35); }
.xd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.xd-table td { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--ln-text); }
.xd-table td:last-child { text-align: right; color: #fff; font-weight: 700; }
.xd-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xd-btns .btn { padding: 12px 16px; border-radius: 11px; font-size: 14.5px; }
.xd-support { display: flex; flex-direction: column; gap: 8px; }
.xd-support div { display: flex; gap: 10px; align-items: center; color: var(--ln-text); font-size: 14px; }
.xd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ln-on); flex: 0 0 auto; }
.xd-dot.off { background: rgba(255, 255, 255, .2); }
.xd-dot.warn { background: #fbbf24; }
.xh-fav[aria-pressed="true"] { border-color: rgba(200, 91, 242, .7); color: #f5d0fe; }

/* app pairing page */
.lk { max-width: 520px; margin: clamp(40px, 8vw, 90px) auto 0; text-align: center; }
.lk-code { font: 800 34px ui-monospace, Consolas, monospace; letter-spacing: .12em; color: #fff; margin: 10px 0 18px; }

@media (max-width: 980px) {
  .xh-editor, .xd { grid-template-columns: 1fr; }
  .xh-stage { position: relative; top: 0; }
}
@media (max-width: 560px) {
  .xh-row { grid-template-columns: 96px 1fr 44px; }
  .xh-styles { grid-template-columns: repeat(3, 1fr); }
  .xh-select { flex: 1 1 45%; }
  .xh-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .xh-card canvas { height: 118px; }
}
.xh-stage + .xd-card { margin-top: 14px; }
