/* Live demo page. Loaded after styles.css, which holds the tokens and shared components. */
.demo-intro {
  padding: 48px 0 28px;
  text-align: center;
  background: linear-gradient(to bottom, var(--surface-low), var(--bg));
}
.demo-intro h1 {
  margin: 8px auto 12px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.demo-intro .lead { margin: 0 auto 16px; }
.sim-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 10%, transparent);
  color: var(--secondary);
  font: 600 13px/18px var(--font-label);
  text-align: left;
}
.sim-note .ms { font-size: 18px; flex: none; }

/* Stage: the example page on the left, the extension panel on the right, like Chrome's side panel */
.stage {
  display: grid;
  gap: 16px;
  padding: 12px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: 0 20px 50px rgba(11, 28, 48, 0.1), inset 0 0 0 1px var(--line);
}
@media (min-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr) 400px; align-items: stretch; padding: 16px; }
}

.browser {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-low);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s;
}
.is-recording .browser { box-shadow: inset 0 0 0 3px var(--primary); }
.browser-bar {
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-mid);
}
.sharing-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--inverse);
  color: var(--inverse-text);
  font: 500 13px var(--font-label);
}
.sharing-bar[hidden] { display: none; }
.sharing-bar .ms { font-size: 18px; }
.sharing-bar span:nth-child(2) { flex: 1; }
.sharing-bar button {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0b1c30;
  font: 600 12px var(--font-label);
}
.viewport-demo {
  position: relative;
  flex: 1;
  padding: 16px;
  min-height: 200px;
}
@media (min-width: 960px) {
  .viewport-demo { min-height: 560px; padding: 24px; }
}
.page {
  position: relative;
  height: 100%;
  min-height: 180px;
  padding: 20px;
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.page-head { display: flex; justify-content: space-between; align-items: baseline; }
.page-head b { font-size: 18px; }
.page-head span { font-size: 13px; color: var(--text-muted); }
.page-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.page-stats div { padding: 12px; border-radius: 12px; background: var(--surface-low); display: flex; flex-direction: column; }
.page-stats small { font-size: 12px; color: var(--text-muted); }
.page-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.page-chart {
  flex: 1;
  min-height: 80px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-low);
}
.page-chart i {
  flex: 1;
  height: 40%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, var(--secondary), color-mix(in srgb, var(--secondary) 45%, transparent));
  transform-origin: bottom;
  animation: grow 2.4s ease-in-out infinite alternate;
}
.page-chart i:nth-child(2n) { height: 70%; animation-delay: -0.6s; }
.page-chart i:nth-child(3n) { height: 55%; animation-delay: -1.2s; background: linear-gradient(to top, var(--primary), color-mix(in srgb, var(--primary) 40%, transparent)); }
.page-chart i:nth-child(5n) { height: 90%; animation-delay: -1.8s; }
@keyframes grow { to { transform: scaleY(0.55); } }
.page-cursor {
  position: absolute;
  left: 30%;
  top: 60%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 70%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent);
  animation: wander 9s ease-in-out infinite alternate;
}
@keyframes wander {
  30% { left: 62%; top: 34%; }
  65% { left: 44%; top: 72%; }
  100% { left: 78%; top: 58%; }
}
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 28, 48, 0.45);
  color: #fff;
  font-size: 96px;
  font-weight: 800;
}
.countdown[hidden] { display: none; }

/* The panel */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 720px;
  max-height: 86vh;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  font-size: 14px;
}
.panel button { font-family: var(--font-label); }
.panel-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  z-index: 1;
}
.panel-head img { border-radius: 10px; }
.panel-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.panel-title strong { font-size: 17px; }
.panel-title span { font: 500 12px var(--font-label); color: var(--text-muted); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--secondary);
  font: 700 12px var(--font-label);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.rec { color: var(--primary); }
.status.rec i { animation: pulse 1.2s ease-in-out infinite; }
.status.paused { color: #9a5b00; }
.account {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-body:focus { outline: none; }
.panel-menu {
  flex: none;
  display: flex;
  justify-content: space-around;
  padding: 8px;
  background: var(--surface);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}
.panel-menu button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.panel-menu button[aria-current] { color: var(--primary); background: rgba(255, 218, 219, 0.55); font-weight: 700; }
.panel-menu .ms { font-size: 22px; }

.card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-h { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.card-h .ms { color: var(--primary); }
.row { display: flex; align-items: center; gap: 12px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.row-text strong { font-size: 14px; overflow-wrap: anywhere; }
.row-text small { font-size: 12.5px; color: var(--text-muted); }
.row-text.pad { padding: 0 2px; }
.tile {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-low);
  color: var(--primary);
}
.tile.ok { background: #d9f2e3; color: #0a5c2f; }
.tile .glyph { font: 800 16px var(--font-label); color: var(--text); }
.inline-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.inline-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-row h3, .sub-h { font-size: 16px; }
.screen-h { font-size: 22px; }
.hint-line { font-size: 12.5px; color: var(--text-muted); }
.panel select {
  font: 500 13px var(--font-label);
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-low);
  color: var(--text);
}

.preview {
  position: relative;
  padding: 56px 20px 48px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--surface-high), var(--surface-mid), color-mix(in srgb, var(--secondary) 22%, var(--surface-mid)));
}
.preview-window {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 110px;
  border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 700 11px var(--font-label);
  letter-spacing: 0.03em;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.dark { position: absolute; top: 12px; left: 12px; background: rgba(33, 49, 69, 0.85); color: #fff; }
.chip.dark i { color: var(--primary-container); }
.chip.dark.fps { top: auto; left: auto; right: 12px; bottom: 12px; }
.chip.soft { background: color-mix(in srgb, var(--secondary) 12%, transparent); color: var(--secondary); }
.chip.rec { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.chip.rec i { animation: pulse 1.2s ease-in-out infinite; }
.chip.warn { background: #ffe8c7; color: #7a4300; }
.res, .seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-mid);
}
.res { position: absolute; top: 10px; right: 12px; background: var(--surface); }
.res button, .seg button {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.res button[aria-pressed='true'] { background: var(--primary); color: #fff; }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-1); }
.seg.wide { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; }
.seg.wide button { padding: 9px 4px; border-radius: 12px; font-size: 12.5px; }

.plan-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-low);
}
.plan-banner > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.plan-banner small { font-size: 12.5px; color: var(--text-muted); }
.plan-banner.pro .ms { color: var(--primary); font-size: 26px; }
.bars { display: flex; gap: 4px; }
.bars i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-highest); }
.bars i.on { background: var(--primary); }
.pill-btn {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--secondary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-container), var(--primary));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(185, 5, 56, 0.3);
}
.big-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.big-btn .dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.big-btn.stop { background: var(--inverse); box-shadow: var(--shadow-2); }
.big-btn .ext { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); font-size: 11px; }
.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 700;
}
.ghost-btn.wide { width: 100%; }
.pro-chip { padding: 1px 7px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: 10px; }
.text-btn { color: var(--secondary); font-size: 13px; font-weight: 700; }
.tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-low);
  font-size: 12.5px;
}
.tip-row .ms { color: var(--secondary); font-size: 18px; }
.tip-row span:nth-child(2) { flex: 1; }
.recent {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.live-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
  text-align: center;
}
.live-card.paused { box-shadow: var(--shadow-1), inset 0 0 0 2px #ffd596; }
.live-card p { color: var(--text-muted); font-size: 13px; }
.timer { font-size: 56px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.limit { width: 100%; height: 6px; border-radius: 99px; background: var(--surface-highest); overflow: hidden; }
.limit span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width 1s linear; }
.live-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  color: #fff;
  /* A small picture of the example dashboard: a white page with a row of chart bars. */
  background:
    linear-gradient(to top, rgba(11, 28, 48, 0.35), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 4%, color-mix(in srgb, var(--secondary) 70%, transparent) 4% 9%, transparent 9% 13%, color-mix(in srgb, var(--primary) 65%, transparent) 13% 18%, transparent 18% 20%) 50% 78% / 76% 42% no-repeat,
    linear-gradient(var(--surface), var(--surface)) 50% 50% / 86% 80% no-repeat,
    linear-gradient(135deg, var(--surface-high), var(--surface-mid));
}
.thumb .ms { font-size: 44px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--primary); }
.thumb b { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(11, 28, 48, 0.8); font: 700 11px var(--font-label); }
.thumb.small { flex: none; width: 64px; border-radius: 10px; }
.rec-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
}
.rec-card small { font-size: 12.5px; color: var(--text-muted); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-actions { display: flex; justify-content: flex-end; gap: 6px; }
.icon-btn-s {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface-low);
}
.icon-btn-s .ms { font-size: 18px; }
.icon-btn-s.active { background: var(--secondary); color: #fff; }
.rename { display: flex; gap: 8px; }
.rename input, .search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
}
.rename input { padding: 6px 10px; border-radius: 10px; background: var(--surface-low); }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-low);
}
.search input:focus { outline: none; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--secondary); }
.empty, .empty-line { text-align: center; color: var(--text-muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 12px; }
.empty > .ms { font-size: 44px; }
.empty strong { color: var(--text); font-size: 16px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { padding: 10px 12px; border-radius: 14px; background: var(--surface-low); display: flex; flex-direction: column; }
.stats small { font-size: 12px; color: var(--text-muted); }
.stats strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.trim { display: grid; gap: 8px; }
.trim label { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; font: 600 12px var(--font-label); color: var(--text-muted); }
.trim input { width: 100%; accent-color: var(--secondary); }
.trim small { color: var(--text-muted); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  text-align: center;
}
.share-tile strong { font-size: 12.5px; }
.share-tile small { font-size: 11px; color: var(--text-muted); }
.share-tile:disabled { opacity: 0.45; cursor: not-allowed; }
.card.saved { flex-direction: row; align-items: center; }
.card.about { align-items: center; text-align: center; gap: 4px; padding: 22px 14px; }
.card.about img { border-radius: 16px; margin-bottom: 6px; }
.card.about strong { font-size: 20px; }
.card.about small { font: 600 12px var(--font-label); color: var(--text-muted); }
.card.about p { margin-top: 6px; color: var(--text-muted); font-size: 13.5px; }
.card.links { gap: 2px; padding: 6px; }
.card.links a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; }
.card.links a:hover { background: var(--surface-low); }
.card.links a > .ms { font-size: 16px; color: var(--text-muted); }

.toast-demo {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 76px;
  z-index: 2;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--inverse);
  color: var(--inverse-text);
  font: 500 13px/1.4 var(--font-label);
  box-shadow: var(--shadow-3);
}
.toast-demo[hidden] { display: none; }

/* Simulated dialogs */
.sim-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(11, 28, 48, 0.25);
}
.sim-dialog::backdrop { background: rgba(11, 28, 48, 0.45); }
.sim-dialog h2 { font-size: 20px; margin-bottom: 6px; }
.sim-dialog p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.picker-options { display: grid; gap: 8px; margin-bottom: 14px; }
.picker-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-low);
  font-weight: 600;
  cursor: pointer;
}
.picker-options label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--secondary); }
.picker-options input, .picker-audio input { accent-color: var(--secondary); }
.picker-audio { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 20px; }
.upgrade-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; font-size: 14px; }
.upgrade-list li { display: flex; gap: 8px; }
.upgrade-list .ms { color: var(--primary); }
.dialog-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.try-list {
  margin: 32px 0 72px;
  padding: 28px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--surface-low), var(--surface), var(--surface-mid));
}
.try-list h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.try-list ol { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 8px; }
.try-list .hero-ctas { justify-content: flex-start; margin-bottom: 0; }
