/* Bing EMD Tracker — "desk of slabs": every panel is a physical block with a visible edge. */
:root {
  --ink: #15202e; --slate: #566476; --faint: #8794a6;
  --desk: #dfe5ec; --desk-deep: #c5ced9; --panel: #fbfcfd; --line: #e3e8ee;
  --teal: #007f9c; --teal-deep: #005c72; --teal-soft: #d6eef3;
  --navy: #0e2536; --navy-edge: #071620;
  --win: #16895b; --win-soft: #d9f1e6; --amber: #b87400; --amber-soft: #fbecc9; --coral: #cf3f2a; --coral-soft: #fbdfd9;
  --edge: 6px; --r: 14px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--body); color: var(--ink); background: var(--desk);
  background-image: radial-gradient(1200px 600px at 80% -10%, #eef3f8 0, transparent 70%); background-attachment: fixed; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 800; } h2 { font-size: 19px; font-weight: 700; } h3 { font-size: 15px; font-weight: 700; }
a { color: var(--teal-deep); } .muted { color: var(--slate); } .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; border-radius: 6px; }

/* the slab: top face + side edge + cast shadow */
.slab { background: var(--panel); border-radius: var(--r); border: 1px solid #fff;
  box-shadow: 0 var(--edge) 0 var(--desk-deep), 0 calc(var(--edge) + 14px) 28px -12px rgba(21, 44, 68, .28); }
.pad { padding: 20px 22px; }

.btn { font: 600 14px var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; cursor: pointer;
  box-shadow: 0 4px 0 var(--desk-deep); transform: translateY(0); transition: transform .08s, box-shadow .08s; white-space: nowrap; }
.btn:hover { background: #f4f7fa; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--desk-deep); }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 0 var(--teal-deep); }
.btn.primary:hover { background: #008aa9; } .btn.primary:active { box-shadow: 0 0 0 var(--teal-deep); }
.btn.danger { color: var(--coral); } .btn.small { padding: 5px 11px; font-size: 13px; box-shadow: 0 3px 0 var(--desk-deep); }
.btn.wide { width: 100%; padding: 12px; font-size: 15px; } .btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
input, select, textarea { font: 15px var(--body); color: var(--ink); background: #fff; border: 1px solid #cfd7e0; border-radius: 9px; padding: 9px 11px; width: 100%;
  box-shadow: inset 0 2px 3px rgba(21, 44, 68, .08); }
textarea { resize: vertical; line-height: 1.45; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 12px; } label input, label select, label textarea { margin-top: 5px; font-weight: 400; }
.hint { font-weight: 400; color: var(--slate); font-size: 13px; display: block; margin-top: 4px; }
.form-error { color: var(--coral); font-weight: 600; min-height: 1.4em; margin: 4px 0 10px; }

/* sign in */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; background: var(--navy); }
.auth-card { width: min(410px, 100%); padding: 30px 30px 26px; position: relative; --desk-deep: #9fb0c2; }
.auth-card h1 { margin: 18px 0 6px; } .auth-card p { margin: 0 0 18px; }
.auth-stage { position: absolute; inset: 0; perspective: 900px; }
.auth-block { position: absolute; border-radius: 18px; transform: rotateX(58deg) rotateZ(-32deg); }
.auth-block.b1 { width: 420px; height: 420px; left: 6%; top: 46%; background: #123247; box-shadow: -14px 14px 0 #0a1c29, -44px 60px 60px rgba(0,0,0,.4); }
.auth-block.b2 { width: 300px; height: 300px; right: 8%; top: 4%; background: var(--teal); box-shadow: -14px 14px 0 var(--teal-deep), -44px 60px 60px rgba(0,0,0,.4); }
.auth-block.b3 { width: 160px; height: 160px; right: 30%; bottom: 6%; background: #f2a900; box-shadow: -10px 10px 0 #b87400, -30px 40px 40px rgba(0,0,0,.4); }
.brand { font: 800 17px/1.15 var(--display); display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--teal); box-shadow: 3px 3px 0 #f2a900; flex: none; }

/* shell */
.app { display: grid; grid-template-columns: 216px 1fr; min-height: 100%; }
.side { background: var(--navy); color: #dbe6ee; padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh;
  box-shadow: inset -6px 0 0 var(--navy-edge); }
.side .brand { color: #fff; padding: 0 8px; }
.side nav { display: grid; gap: 4px; }
.side nav a { color: #b9c8d4; text-decoration: none; font-weight: 600; padding: 9px 12px; border-radius: 9px; }
.side nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.side nav a.on { color: var(--navy); background: #fff; box-shadow: 0 4px 0 #8fa3b5; transform: translateY(-2px); }
.side-foot { margin-top: auto; font-size: 13px; display: grid; gap: 8px; padding: 0 8px; color: #9db0bf; }
.market { color: #fff; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.flag { width: 18px; height: 12px; border-radius: 2px; background: linear-gradient(#cf3f2a 0 20%, #fff 20% 40%, #cf3f2a 40% 60%, #fff 60% 80%, #cf3f2a 80%); position: relative; overflow: hidden; }
.flag::after { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 7px; background: #1e3f73; }
.who { overflow: hidden; text-overflow: ellipsis; } .side-foot .link { justify-self: start; }
main { padding: 0 30px 60px; min-width: 0; }
.demo-bar { background: var(--amber-soft); color: #5e3c00; font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: 0 0 10px 10px; text-align: center; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 22px; flex-wrap: wrap; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.run-status { min-width: 220px; font-size: 13px; color: var(--slate); }
.bar { height: 7px; background: var(--desk-deep); border-radius: 9px; overflow: hidden; margin-top: 4px; } .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s; }
.view { display: grid; gap: 26px; }
.grid { display: grid; gap: 26px; } .g-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .g-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* podium */
.podium svg { width: 100%; height: auto; display: block; }
.podium .blk { cursor: pointer; } .podium .blk:hover .front { filter: brightness(1.06); }
.podium text { font-family: var(--display); }
.attention { display: grid; gap: 10px; }
.att { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: 0 3px 0 var(--desk-deep); }
.att:hover { transform: translateY(-1px); } .att b { font: 800 22px var(--display); min-width: 38px; }
.att.bad b { color: var(--coral); } .att.warn b { color: var(--amber); } .att.zero b { color: var(--faint); } .att span { font-weight: 600; } .att small { display: block; color: var(--slate); font-weight: 400; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--slate); font-size: 13px; padding: 8px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: #f1f6f9; }
td.dom { font-weight: 600; } td.r, th.r { text-align: right; }
.rank { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 8px; border-radius: 8px; font: 700 14px var(--display); background: #edf1f5; color: var(--slate); }
.rank.t3 { background: #f2a900; color: #3d2900; box-shadow: 0 3px 0 #b87400; } .rank.t10 { background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-deep); }
.rank.t50 { background: var(--teal-soft); color: var(--teal-deep); }
.delta { font-size: 12.5px; font-weight: 700; margin-left: 6px; } .delta.up { color: var(--win); } .delta.down { color: var(--coral); }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.pill.ok { background: var(--win-soft); color: #0b5a3a; } .pill.warn { background: var(--amber-soft); color: #6b4300; } .pill.bad { background: var(--coral-soft); color: #8c2415; } .pill.off { background: #edf1f5; color: var(--slate); }
.score { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; } .score i { width: 54px; height: 7px; border-radius: 9px; background: #e3e8ee; overflow: hidden; display: block; }
.score i b { display: block; height: 100%; border-radius: 9px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; } .toolbar input[type=search] { max-width: 260px; } .toolbar select { width: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 600 13.5px var(--body); padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--slate); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--slate); font-size: 13.5px; }
.empty { text-align: center; padding: 44px 20px; color: var(--slate); } .empty h2 { color: var(--ink); margin-bottom: 6px; } .empty .btn { margin-top: 16px; }

/* product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.pcard { padding: 18px 20px; text-decoration: none; color: var(--ink); display: block; transition: transform .12s; }
.pcard:hover { transform: translateY(-3px); }
.pcard .meter { display: flex; height: 10px; border-radius: 9px; overflow: hidden; background: #e3e8ee; margin: 14px 0 10px; } .pcard .meter i { background: var(--teal); }
.pcard .row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--slate); } .pcard .big { font: 800 26px var(--display); color: var(--ink); }
.compare td:first-child { color: var(--slate); } .compare td.better { font-weight: 700; color: var(--win); }
.insight { margin: 0; padding-left: 18px; } .insight li { margin-bottom: 6px; }
.serp li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .serp { list-style: none; margin: 0; padding: 0; }
.serp .mine { font-weight: 700; color: var(--teal-deep); } .serp span { width: 22px; color: var(--faint); font-weight: 700; flex: none; }

/* chart */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; } .chart text { font: 12px var(--body); fill: var(--slate); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--slate); } .legend i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* alerts */
.alert-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start; font-size: 14px; }
.alert-row:last-child { border: 0; } .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.dot.good { background: var(--win); } .dot.bad { background: var(--coral); } .dot.warn { background: var(--amber); }
.alert-row .when { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.phone { background: #e7ddd3; border-radius: 22px; padding: 16px 14px; border: 8px solid var(--navy); box-shadow: 0 var(--edge) 0 var(--navy-edge), 0 22px 30px -12px rgba(21,44,68,.4); max-height: 640px; overflow: auto; }
.bubble { background: #fff; border-radius: 4px 12px 12px 12px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.15); }

/* drawer + modal */
.drawer, .modal { position: fixed; inset: 0; background: rgba(14, 37, 54, .45); z-index: 20; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--desk); overflow-y: auto; padding: 22px; box-shadow: -8px 0 0 var(--navy-edge), -30px 0 60px rgba(0,0,0,.25); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-panel .slab { margin-bottom: 22px; } .drawer-panel .tiles .slab { margin-bottom: 0; } .x { float: right; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px; margin-bottom: 22px; }
.tile { padding: 12px 14px; } .tile small { color: var(--slate); display: block; font-weight: 600; } .tile strong { font: 800 22px var(--display); }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; } .facts dt { color: var(--slate); } .facts dd { margin: 0; word-break: break-word; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; } .issues li { display: flex; gap: 9px; align-items: baseline; font-size: 14px; }
.reasons { margin: 0; padding-left: 18px; } .reasons li { margin-bottom: 6px; }
.modal { display: grid; place-items: center; padding: 20px; } .modal-card { width: min(560px, 100%); padding: 24px; max-height: 90vh; overflow: auto; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; z-index: 30; box-shadow: 0 5px 0 var(--navy-edge); max-width: 90vw; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 26px; align-items: start; } .settings h2 { margin-bottom: 4px; } .settings .slab > p { margin: 0 0 16px; color: var(--slate); font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; box-shadow: inset 0 -5px 0 var(--navy-edge); }
  .side .brand br { display: none; } .side nav { display: flex; flex-wrap: wrap; } .side-foot { margin: 0 0 0 auto; display: flex; gap: 12px; align-items: center; } .who, .market { display: none; }
  main { padding: 0 16px 50px; } .g-hero, .g-2 { grid-template-columns: 1fr; } h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
