/* Meridian Gear — Self-hosted synthetic multi-stack benchmark lab */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #171e26;
  --muted: #5a6573;
  --line: #dfe4ea;
  --pri: #1f4d3a;
  --pri-h: #2b644d;
  --warn: #b45309;
  --danger: #b91c1c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.5; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.x9-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.x9-hdr { position: sticky; top: 0; z-index: 60; background: #141c24; color: #f3f6f8; border-bottom: 1px solid #26323f; }
.x9-hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 60px; }
.x9-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.x9-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #30634d; color: #e9f5ee; font-weight: 700; font-size: 16px; }
.x9-bname { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.x9-bsub { font-size: 11px; color: #9aa7b6; }

.x9-search-bar { display: flex; flex: 1; max-width: 560px; }
.x9-search-in { flex: 1; height: 38px; padding: 0 12px; border: 1px solid #394859; border-right: 0; border-radius: 8px 0 0 8px; background: #fff; color: var(--ink); font-size: 14px; }
.x9-search-go { height: 38px; padding: 0 18px; border: 0; border-radius: 0 8px 8px 0; background: #e8a43a; color: #161c22; font-weight: 700; font-size: 14px; cursor: pointer; }
.x9-search-go:hover { background: #f2b450; }
.x9-back { color: #c7d9cf; font-size: 13px; text-decoration: none; white-space: nowrap; }
.x9-back:hover { text-decoration: underline; }

.x9-tabs { background: #1d2833; border-top: 1px solid #283644; }
.x9-tabs-in { display: flex; gap: 6px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; }
.x9-tab { border: 1px solid transparent; background: transparent; color: #b7c4d0; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.x9-tab:hover { background: #263544; color: #fff; }
.x9-tab.active { background: #2d5946; color: #ffffff; border-color: #467f66; }

.x9-main { padding-top: 22px; padding-bottom: 64px; }
.x9-banner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.x9-h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.02em; }
.x9-h2 { margin: 0 0 12px; font-size: 16px; }
.x9-sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.x9-note { font-size: 12.5px; color: var(--muted); }

.x9-sort-row { display: flex; gap: 8px; flex-wrap: wrap; }
.x9-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; cursor: pointer; user-select: none; }
.x9-chip.active { background: var(--pri); color: #fff; border-color: var(--pri); }

.x9-layout-2col { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.x9-side { display: flex; flex-direction: column; gap: 14px; }
.x9-side-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.x9-side-t { font-weight: 650; font-size: 13px; margin-bottom: 8px; }
.x9-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 5px 0; cursor: pointer; }

.x9-list { display: flex; flex-direction: column; gap: 14px; }
/* Obfuscated div-soup style product rows */
.k4m1q { display: grid; grid-template-columns: 156px 1fr 164px; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 16px; align-items: center; }
.k4m1q.sp-row { border-color: #e6d7b8; background: #fffdf8; }
.p8v3z { height: 112px; border-radius: 8px; background: linear-gradient(135deg, #e7edf2, #d4dde6); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; color: #3d4f60; border: 1px solid #cfd8e2; }
.p8v3z strong { font-size: 14px; color: #1a2835; margin-bottom: 2px; }
.r2d9x { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 4px; margin-bottom: 5px; }
.r2d9x.sp { background: #fef3c7; color: #92400e; }
.r2d9x.pick { background: #dcfce7; color: #166534; }
.t6y8w { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; color: #112233; line-height: 1.38; }
.m5n7b { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.z3q1v { display: flex; gap: 6px; flex-wrap: wrap; }
.z3q1v span { font-size: 11.5px; background: #eef2f6; color: #3a4754; padding: 2px 7px; border-radius: 5px; }
.c8p4f { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.v1w9k { font-size: 20px; font-weight: 750; color: #111827; letter-spacing: -0.02em; }
.v1w9s { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.v1w9o { font-size: 13px; font-weight: 600; color: #24577a; background: #e8f3fa; border: 1px solid #bfd8ea; border-radius: 7px; padding: 6px 12px; cursor: pointer; }
.x9-btn-pri, .x9-btn-sec, .x9-btn-warn, .x9-btn-danger {
  padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer;
}
.x9-btn-pri { background: var(--pri); color: #fff; }
.x9-btn-pri:hover { background: var(--pri-h); }
.x9-btn-sec { background: #fff; color: var(--ink); border-color: #c5ced8; }
.x9-btn-warn { background: #d97706; color: #fff; }
.x9-btn-danger { background: var(--danger); color: #fff; }
.x9-hidden-noise { display: none; }

/* Scene 2: Modal Occlusion */
.x9-board { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-height: 440px; }
.x9-board-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.x9-status-pill { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; background: #edf3ef; color: #1e4635; border: 1px solid #c9dcd0; }
.x9-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.x9-tbl th, .x9-tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.x9-tbl th { background: #f3f6f8; font-weight: 650; font-size: 12.5px; color: var(--muted); }

.x9-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 32, 0.56); display: grid; place-items: center; padding: 20px; }
.x9-modal { width: 100%; max-width: 470px; background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); border: 1px solid #d7dee6; }
.x9-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.x9-modal-head h2 { margin: 0; font-size: 17px; }
.x9-modal-tag { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.x9-shadow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .x9-shadow-grid { grid-template-columns: 1fr; } }
.x9-modal-body { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.x9-modal-foot { display: flex; gap: 10px; justify-content: flex-end; }

/* Scene 4: DataGrid + Combobox + Guard */
.x9-grid-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.x9-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.x9-combo-wrap { position: relative; margin-bottom: 16px; }
.x9-lbl { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: #2a3440; }
.x9-in { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #c4cdd7; border-radius: 8px; font-size: 13.5px; }
.x9-listbox { position: absolute; left: 0; right: 0; top: 64px; z-index: 30; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #bfc9d4; border-radius: 8px; box-shadow: 0 10px 26px rgba(0,0,0,0.12); }
.x9-listbox li { padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.x9-listbox li:hover { background: #eaf2ee; }
.x9-grid { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.x9-grow { display: grid; grid-template-columns: 84px 1.4fr 130px 96px; border-bottom: 1px solid var(--line); font-size: 13px; }
.x9-grow:last-child { border-bottom: 0; }
.x9-grow > div { padding: 10px 10px; }
.x9-ghead { background: #f3f6f8; font-weight: 650; font-size: 12px; color: var(--muted); }
.x9-edit-cell { background: #fafdff; border-left: 1px dashed #c8d8e6; border-right: 1px dashed #c8d8e6; font-family: var(--mono); font-weight: 600; }

.x9-guard-card { border-color: #e6c6c6; background: #fffafa; }
.x9-guard-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; background: #fee2e2; color: #991b1b; margin-bottom: 8px; }
.x9-field { margin: 12px 0; }
.x9-guard-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.x9-guard-log { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: #5b6673; padding: 8px 10px; background: #fff; border: 1px solid #ecdcdc; border-radius: 7px; }

/* Scene 5: Embedded iframe */
.x9-iframe-shell { padding: 0; overflow: hidden; }
.x9-iframe-bar { padding: 8px 14px; background: #eef2f6; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.x9-iframe { width: 100%; height: 390px; border: 0; display: block; background: #f8fafc; }

/* Scene 6: Virtualized 500-Row Ledger */
.x9-vrow { display: grid; grid-template-columns: 74px 104px 1.6fr 110px 100px 84px 104px; align-items: center; font-size: 13px; border-bottom: 1px solid var(--line); }
.x9-vrow > div { padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x9-vhead { background: #f3f6f8; font-weight: 650; font-size: 12px; color: var(--muted); }
.x9-vscroll { height: 440px; overflow-y: auto; position: relative; background: #fff; }
.x9-vspacer { position: relative; width: 100%; }
.x9-vviewport { position: absolute; left: 0; right: 0; top: 0; }
.x9-vrow-item { height: 44px; }
.x9-vrow-item:nth-child(even) { background: #fafcfb; }
.x9-vpill { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; }
.x9-vpill.ok { background: #dcfce7; color: #166534; }
.x9-vpill.warn { background: #fef3c7; color: #92400e; }
.x9-vpill.hold { background: #fee2e2; color: #991b1b; }

/* Scene 7: Body-Mounted Portals & Opacity-0 Native Control */
.x9-portal-trigger { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #bfc9d4; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 550; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.x9-portal-trigger:hover { border-color: var(--pri); }
.x9-portal-hint { font-size: 12px; color: var(--muted); }
.x9-trans-shell { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--pri); color: #fff; padding: 10px 18px; font-size: 13.5px; font-weight: 650; overflow: hidden; }
.x9-trans-shell:hover { background: var(--pri-h); }
.x9-trans-visual { position: relative; z-index: 1; }
.x9-trans-native { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; margin: 0; padding: 0; }
.x9-bullets { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.x9-bullets li { margin-bottom: 8px; }
.x9-portal-pop { position: fixed; z-index: 950; background: #fff; border: 1px solid #c5ced8; border-radius: 12px; box-shadow: 0 18px 44px rgba(15, 23, 32, 0.22); padding: 14px; width: 310px; }
.x9-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13.5px; font-weight: 700; }
.x9-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.x9-cal-dow { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.x9-cal-day { border: 1px solid transparent; background: #f8fafc; color: var(--ink); border-radius: 6px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.x9-cal-day:hover { background: #e6f2ec; border-color: #9dc5b2; }
.x9-cal-day.active { background: var(--pri); color: #fff; font-weight: 700; }
.x9-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.x9-pop-opt { width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; }
.x9-pop-opt:hover { background: #eaf2ee; }
.x9-pop-opt.active { background: #dbe8c9; color: #163a2b; font-weight: 650; }

/* Scene 8: Canvas2D & Control Deck */
.x9-canvas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.x9-canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfb; }
.x9-check-grid { display: flex; flex-direction: column; gap: 8px; }
.x9-chk-card { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; font-size: 13px; cursor: pointer; }
.x9-chk-card:hover { border-color: var(--pri); }

@media (max-width: 900px) {
  .x9-layout-2col, .x9-grid-split { grid-template-columns: 1fr; }
  .k4m1q { grid-template-columns: 1fr; }
  .c8p4f { text-align: left; align-items: flex-start; }
  .x9-vrow { grid-template-columns: 60px 92px 1fr 80px 80px; }
  .x9-vrow > div:nth-child(4), .x9-vrow > div:nth-child(6) { display: none; }
}

@media (max-width: 520px) {
  .x9-wrap { padding: 0 12px; }
  .x9-hdr-in { height: auto; padding: 8px 0; gap: 8px; flex-wrap: wrap; }
  .x9-bsub, .x9-back { display: none; }
  .x9-search-bar { order: 3; flex: 1 1 100%; max-width: none; }
  .x9-search-in { height: 34px; font-size: 13px; }
  .x9-search-go { height: 34px; padding: 0 14px; font-size: 13px; }
  .x9-tabs-in { padding-top: 5px; padding-bottom: 5px; gap: 4px; }
  .x9-tab { padding: 5px 10px; font-size: 12px; }
  .x9-main { padding-top: 12px; padding-bottom: 24px; }
  .x9-banner { margin-bottom: 12px; padding-bottom: 10px; gap: 8px; }
  .x9-h1 { font-size: 17px; }
  .x9-sub { font-size: 12.5px; }
  .x9-card, .x9-board { padding: 12px; }
  .x9-modal { padding: 16px; }
  .x9-modal-head h2 { font-size: 15.5px; }
  .x9-modal-body { font-size: 13px; margin-bottom: 14px; }
  .x9-iframe { height: 365px; }
  .x9-grid-split { gap: 12px; }
}
