/* The Murmur interface, rebuilt in HTML for the site: the story window and the small fragments on cards.
   Mirrors the app's light theme (src/renderer/style.css). */

/* controls inside the interface start from nothing, so their own classes style them */
:where(.app) button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; cursor: pointer; }
.app [data-act] { cursor: pointer; }
.app {
  width: var(--app-w, 1280px); height: var(--app-h, 780px);
  position: relative;
  transform: translate(var(--cx, 0px), var(--cy, 0px)) scale(calc(var(--s, 1) * var(--cz, 1))); transform-origin: top left;
  will-change: transform;
  display: flex; flex-direction: column;
  background: #fff; color: #0a0a0a;
  font-size: 14px; line-height: 1.45; letter-spacing: -0.005em;
}
.app-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: #f2f4f7; font-size: 12.5px; color: #5f6368; }
.app-bar .tl { width: 12px; height: 12px; border-radius: 50%; background: #d4d7dc; transition: filter .15s; }
.app-bar .tl:hover { filter: brightness(.85); }
.app-bar .tl-close { background: #ff5f57; } .app-bar .tl-min { background: #febc2e; } .app-bar .tl-max { background: #28c840; }
.app-bar span { margin: 0 auto; transform: translateX(-30px); }
.app-body { flex: 1; min-height: 0; display: flex; }

/* sidebar */
.app-side { flex: none; width: 250px; display: flex; flex-direction: column; padding: 12px; background: #f2f4f7; }
.acct { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #e3e5e9; }
.acct small { display: block; font-size: 11.5px; color: #5f6368; line-height: 1.3; }
.acct strong { display: block; font-size: 14px; line-height: 1.3; }
.av-acct { width: 34px !important; height: 34px !important; border-radius: 9px !important; overflow: hidden; background: none !important; }
.av-acct img { width: 100%; height: 100%; }
.side-nav { margin-top: 14px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px !important; border-radius: 8px; color: #3c4043; transition: background-color .2s; }
.side-item:hover, .side-servers li:hover { background: #e9ecf0; }
.side-item svg, .side-foot svg { width: 16px; height: 16px; }
.side-item.on { background: #e4e7ec; color: #0a0a0a; }
.side-head { display: flex; justify-content: space-between; margin: 18px 10px 6px; font-size: 12.5px; color: #5f6368; }
.side-head button { color: #0a0a0a; text-decoration: underline; }
.side-servers li {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; white-space: nowrap;
  opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s var(--ease), background-color .3s;
}
.side-servers li.in { opacity: 1; transform: none; }
.side-servers li.on { background: #e4e7ec; }
.side-servers em { margin-left: auto; font-style: normal; font-size: 12.5px; color: #1d5fbf; opacity: 0; transition: opacity .3s; }
.side-servers li.read em { opacity: 1; }
.side-servers li.reading { background: #e8eefa; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; color: #3c4043; }

/* avatars */
.av { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; font-weight: 600; font-style: normal; }
/* server icons: round, like Discord's, each logo on its own colour */
.av[class*="s-"] { border-radius: 50%; color: #fff; font-weight: 600; letter-spacing: -0.02em; }
.av img { width: 62%; height: 62%; object-fit: contain; }
.s-openai { background: #0d0d0d; } .s-claude { background: #d97757; } .s-mihoyo { background: #3b4fa0; }
.s-minecraft { background: #3c8527; } .s-reddit { background: #ff4500; } .s-valorant { background: #fa4454; }
.s-python { background: #3776ab; } .s-fortnite { background: #1f1f3a; } .s-roblox { background: #111; } .s-leagueoflegends { background: #0a1428; }
.av-xl { width: 64px; height: 64px; border-radius: 50%; font-size: 28px; }

/* main area: one long page that scrolls with the site */
.app-main { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.scroller { position: relative; height: 100%; }
.scene {
  position: absolute; inset: 0;
  padding: 28px var(--pad-r, 40px) 32px 40px;
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .35s, transform .45s var(--ease), visibility 0s .35s;
}
.scene.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s .05s, transform .45s .05s var(--ease), visibility 0s; }
.page-title h4 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.page-title p { margin: 2px 0 0; color: #5f6368; }

.panel { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #e3e5e9; padding: 16px 18px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.panel-h span { font-weight: 400; font-size: 12.5px; color: #5f6368; }
.ui-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; background: #141414; color: #fff; font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.ui-btn.big { height: 42px; padding: 0 18px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #eef0f3; font-size: 12.5px; color: #3c4043; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; box-shadow: 0 0 0 1px #e3e5e9; font-size: 13px; }
.chip.dark { background: #141414; color: #fff; box-shadow: none; }

/* scene 1: picker */
.picker { display: flex; flex-direction: column; padding: 12px; max-width: 560px; }
.picker-filter { height: 34px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: #f2f4f7; color: #8a8f96; margin-bottom: 6px; }
.picker-list li { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: #5f6368; transition: background-color .25s, color .25s; }
.box { margin-left: auto; width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #c4c8ce; transition: background-color .2s, box-shadow .2s; }
.picker-list li:hover { background: #f2f4f7; }
.picker-list li.on { color: #0a0a0a; background: #f6f7f9; }
.picker-list li.on .box { box-shadow: none; background: #141414 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 8px 10px 2px; color: #5f6368; font-size: 13px; }

/* scene 2: reading */
.working { max-width: 640px; padding: 20px 22px; }
.working-top { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #dfe2e7; border-top-color: #1d5fbf; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; margin: 16px 0 10px; border-radius: 3px; background: #e7e9ed; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: #1d5fbf; border-radius: 3px; }
.read-sub { font-size: 13px; color: #5f6368; }
.read-log { margin-top: 14px; display: grid; gap: 6px; }
.read-log li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #3c4043; }
.read-log li::after { content: attr(data-n); margin-left: auto; color: #5f6368; font-variant-numeric: tabular-nums; }
.composer { margin-top: auto; display: flex; gap: 8px; }

/* scene 3: brief */
.overview { padding: 14px 16px; border-radius: 12px; background: #f6f7f9; box-shadow: 0 0 0 1px #e3e5e9; font-size: 15px; line-height: 1.55; }
.overview.small { font-size: 14px; max-width: 520px; background: #fff; }
.module { padding: 0; overflow: hidden; }
.module-head { display: flex; justify-content: space-between; padding: 10px 16px; background: #f2f4f7; font-weight: 600; font-size: 13px; }
.module-head span { color: #5f6368; font-weight: 400; }
.signals { padding: 8px; display: grid; gap: 6px; }
.signals li { padding: 8px 10px; border-radius: 8px; background: #f8f9fa; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease); }
.signals li.in { opacity: 1; transform: none; }
.tag:hover { background: #e8eefa; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 3px; margin-right: 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px #b9cbe9; color: #1d5fbf; font-size: 12.5px; vertical-align: 1px; }
.tag .av { width: 16px; height: 16px; font-size: 9.5px; border-radius: 50%; }

/* scene 4: dashboard */
.kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; padding: 0; }
.kpis > div { padding: 14px 18px; }
.kpis > div + div { box-shadow: -1px 0 0 #e3e5e9; }
.kpis small { display: block; font-size: 12.5px; color: #5f6368; }
.kpis strong { display: block; margin-top: 4px; font-size: 26px; font-weight: 550; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpis i { font-style: normal; font-size: 14px; color: #5f6368; font-weight: 400; }
.strip { display: flex; gap: 2px; height: 30px; border-radius: 6px; overflow: hidden; }
.strip span {
  flex: 0 0 calc(var(--w) * 1% * var(--p, 1)); background: var(--c); color: #fff;
  font-size: 12px; line-height: 30px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: flex-basis .3s linear;
}
.matrix { display: grid; gap: 6px; }
.mx-row { display: grid; grid-template-columns: 150px repeat(8, 20px); gap: 10px; align-items: center; font-size: 13.5px; }
.mx-row i { width: 20px; height: 20px; border-radius: 5px; box-shadow: inset 0 0 0 1px #e3e5e9; transition: background-color .4s, transform .4s var(--ease); }
.mx-row i.m1 { background: #c4c4c4; } .mx-row i.m2 { background: #777; } .mx-row i.m3 { background: #0a0a0a; }
.scene[data-step="3"] .mx-row i[class] { transform: scale(var(--pop, 1)); }

/* scene 5: deep dive */
.srv-hero { display: flex; align-items: center; gap: 16px; }
.srv-hero h4 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; }
.srv-hero p { margin: 2px 0 0; color: #5f6368; display: flex; gap: 10px; align-items: center; }
.dive { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; }
.dive-label { color: #5f6368; font-size: 13px; }
.seg { position: relative; display: flex; padding: 3px; border-radius: 9px; background: #eef0f3; margin-right: auto; }
.seg button { position: relative; z-index: 1; width: 82px; text-align: center; height: 28px; line-height: 28px; font-size: 13px; color: #5f6368; transition: color .2s; }
.seg button:hover, .seg button.on { color: #0a0a0a; }
.seg-thumb { position: absolute; top: 3px; left: 3px; width: 82px; height: 28px; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); transform: translateX(calc(var(--seg, 0) * 82px)); transition: transform .4s var(--ease); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.spark i { flex: 1; border-radius: 2px 2px 0 0; background: #c9d6ee; height: calc(var(--h) * 1% * var(--p, 1)); transition: height .3s linear; }
.spark i.hot { background: #1d5fbf; }
.timeline { padding: 10px 16px; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 14px; font-size: 13.5px; opacity: 0; transition: opacity .35s; }
.timeline li.in { opacity: 1; }
.timeline time { flex: none; width: 82px; color: #5f6368; font-variant-numeric: tabular-nums; }

/* scene 6: search */
.ask { display: flex; align-items: center; min-height: 52px; padding: 0 8px 0 18px; border-radius: 14px; box-shadow: 0 0 0 1px #d6d9de, 0 6px 20px -12px rgba(0,0,0,.2); font-size: 16px; }
.caret { width: 2px; height: 20px; margin-left: 1px; background: #1d5fbf; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.send { margin-left: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #141414; color: #fff; font-size: 16px; }
.results-overview, .scene[data-step="5"] .module { transition: opacity .4s, transform .4s var(--ease); }
.scene[data-step="5"]:not(.answered) .results-overview, .scene[data-step="5"]:not(.answered) .module { opacity: 0; transform: translateY(8px); }
.who { padding: 6px 16px; }
.who li:hover .who-name { text-decoration: underline; }
.who li { display: grid; grid-template-columns: 22px 1fr 110px 36px 120px; align-items: center; gap: 12px; height: 44px; }
.who li + li { box-shadow: 0 -1px 0 #eef0f3; }
.who-n { text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 5px; border-radius: 3px; background: #e7e9ed; position: relative; overflow: hidden; }
.meter::after { content: ""; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: #3c4043; border-radius: 3px; }

/* ---------- fragments on cards ---------- */
.mini {
  position: relative; width: 100%; max-width: 262px; padding: 14px 15px; border-radius: 11px; font-size: 12px;
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, .55),
    0 0 26px 8px rgba(255, 255, 255, .85),
    0 0 70px 14px rgba(120, 175, 255, .35),
    0 10px 24px -14px rgba(40, 80, 160, .35);
}
.mini-label { font-weight: 550; margin-bottom: 5px; }
.mini-label span { font-weight: 400; color: #5f6368; }
.mini-field {
  display: flex; align-items: center; height: 29px; padding: 0 9px; margin-bottom: 10px; border-radius: 7px;
  box-shadow: inset 0 0 0 1px #e3e5e9; white-space: nowrap; overflow: hidden; transition: box-shadow .2s;
}
.mini-field.typing { box-shadow: inset 0 0 0 1.5px #196ede, 0 0 0 3px rgba(25, 110, 222, .16); }
.mf-caret { display: none; flex: none; width: 1.5px; height: 13px; margin-left: 1px; background: #196ede; animation: blink 1s steps(1) infinite; }
.mini-field.typing .mf-caret { display: block; }
.mini .ui-btn { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12px; background: #196ede; transition: transform .15s var(--ease), background-color .2s; }
.mini .ui-btn.big { height: 34px; padding: 0 15px; font-size: 13px; }
.mini .ui-btn.press { transform: scale(.94); background: #1259bf; }
.mini-go { margin-bottom: 10px; }
/* the status line: empty, then working, then done */
.mini-status { display: flex; align-items: center; gap: 7px; min-height: 16px; margin-bottom: 8px; font-size: 11.5px; color: #5f6368; opacity: 0; transition: opacity .25s; }
.mini-status .spinner { width: 12px; height: 12px; border-width: 1.5px; display: none; }
.mini-status.busy, .mini-status.ok { opacity: 1; }
.mini-status.busy .spinner { display: block; }
.mini-status.ok { color: #1d7a3a; }
.mini-status.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #28a745; }
.mini-note { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.45; color: #5f6368; }
.mini-note svg { flex: none; width: 13px; height: 13px; margin-top: 1px; transition: color .3s; }
.mini.done .mini-note svg { color: #1d7a3a; }
.mini[data-anim="ai"] .mini-status { margin: 2px 0 0; }

/* Press Summarize: a pointer clicks the button, the bar fills server by server */
.mini.center { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px 18px 20px; }
.mini.center .mini-note { align-items: center; min-height: 18px; }
.mini-bar { width: 86%; height: 6px; border-radius: 3px; background: #e7e9ed; overflow: hidden; }
.mini-bar span { display: block; height: 100%; width: calc(var(--p, 1) * 100%); background: #196ede; border-radius: 3px; transition: width .4s var(--ease); }
.mn-av:empty { display: none; }
.mn-av .av { width: 16px; height: 16px; font-size: 7.5px; }
.mini-cursor { position: absolute; left: 82%; top: 88%; width: 20px; height: 20px; opacity: 0; transition: left .7s var(--ease), top .7s var(--ease), opacity .3s; pointer-events: none; }
.mini.aim .mini-cursor { left: 62%; top: 30%; opacity: 1; }

.mini-signals { display: grid; gap: 8px; width: 100%; max-width: 300px; }
.mini-signals li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #e3e5e9; font-size: 13.5px; }
.mini-matrix .mx-row { grid-template-columns: 70px repeat(5, 20px); font-size: 13px; }
.quote { max-width: 320px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e3e5e9; font-size: 13.5px; line-height: 1.5; }
.who-tag { display: block; margin-bottom: 6px; color: #1d5fbf; font-size: 12.5px; }
.mini-rows { width: 100%; max-width: 340px; display: grid; gap: 6px; }
.mini-rows li { display: grid; grid-template-columns: 1fr 70px 60px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #e3e5e9; font-size: 13px; }
.mini-rows .pill { justify-self: start; }
.spark-static { width: 100%; height: 130px; }

/* Phone: the window drops the sidebar and the screens tighten */
.compact .app-side { display: none; }
.compact .scene { padding: 20px 18px 24px; gap: 12px; }
.compact .dive { flex-wrap: wrap; }
.compact .page-title h4 { font-size: 22px; }
.compact .kpis { grid-template-columns: 1fr 1fr; }
.compact .kpis > div:nth-child(3) { box-shadow: 0 -1px 0 #e3e5e9; }
.compact .kpis > div:nth-child(4) { box-shadow: -1px 0 0 #e3e5e9, 0 -1px 0 #e3e5e9; }
.compact .mx-row { grid-template-columns: 120px repeat(8, 18px); gap: 6px; }
.compact .mx-row i { width: 18px; height: 18px; }
.compact .who li { grid-template-columns: 22px 1fr 90px 30px; }
.compact .who .meter { display: none; }
.compact .seg button, .compact .seg-thumb { width: 64px; }
.compact .seg-thumb { transform: translateX(calc(var(--seg, 0) * 64px)); }
.compact .dive-label { display: none; }
.compact .srv-hero h4 { font-size: 24px; }
.compact .srv-hero p { flex-wrap: wrap; gap: 6px; }
