@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("editorial-v4/assets/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("editorial-v4/assets/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bar-bg: #141514;
  --bar-surface: #222422;
  --bar-border: rgba(255, 255, 255, 0.12);
  --bar-text: #f5f5f2;
  --bar-muted: #b2b4ae;
  --stage-bg: #1e201e;
  --bar-height: 60px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Onest", "Segoe UI", sans-serif;
  background: var(--stage-bg);
  color: var(--bar-text);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.switcher-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--bar-height);
  padding: 8px 18px;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--bar-border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bar-brand {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.bar-divider {
  width: 1px;
  height: 16px;
  background: var(--bar-border);
  flex-shrink: 0;
}

.bar-subtitle {
  font-size: 0.8125rem;
  color: var(--bar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--bar-surface);
  border-radius: 999px;
  border: 1px solid var(--bar-border);
}

.version-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bar-muted);
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.version-tab:hover {
  color: var(--bar-text);
}

.version-tab[aria-selected="true"] {
  background: var(--bar-text);
  color: var(--bar-bg);
  font-weight: 600;
}

.tab-num {
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.version-tab[aria-selected="true"] .tab-num {
  opacity: 1;
}

.bar-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewport-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--bar-surface);
  border: 1px solid var(--bar-border);
  border-radius: 999px;
  gap: 2px;
}

.vp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78125rem;
  font-weight: 500;
  color: var(--bar-muted);
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.vp-btn:hover {
  color: var(--bar-text);
}

.vp-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: var(--bar-text);
}

.open-standalone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--bar-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bar-text);
  white-space: nowrap;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}

.open-standalone:hover {
  background: var(--bar-surface);
  border-color: rgba(255, 255, 255, 0.35);
}

.stage {
  height: calc(100vh - var(--bar-height));
  height: calc(100dvh - var(--bar-height));
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: var(--stage-bg);
  transition: padding 220ms var(--ease);
}

.stage.is-mobile {
  padding: 20px 16px;
}

.frame-shell {
  width: 100%;
  height: 100%;
  background: #ffffff;
  overflow: hidden;
  transition: width 260ms var(--ease), border-radius 260ms var(--ease), box-shadow 260ms var(--ease);
}

.stage.is-mobile .frame-shell {
  width: 390px;
  max-width: 100%;
  border-radius: 24px;
  border: 6px solid #0e0f0e;
  box-shadow: 0 28px 64px -20px rgba(0, 0, 0, 0.55);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}

@media (max-width: 1120px) {
  .bar-divider,
  .bar-subtitle,
  .vp-text {
    display: none;
  }
}

@media (max-width: 820px) {
  .switcher-bar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .version-tabs {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .version-tabs::-webkit-scrollbar {
    display: none;
  }

  .viewport-toggle {
    display: none;
  }

  .stage {
    height: calc(100vh - 108px);
    height: calc(100dvh - 108px);
  }
}
