/* Рамка демо: стеклянная полоса сверху, под ней сайт — во всю ширину или в «телефоне» */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }

.bar {
  position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 14px;
  margin: 10px 12px 0; padding: 8px 8px 8px 16px; border-radius: 18px;
}
.bar__back { font: 500 15px/1 var(--font); color: var(--ink); text-decoration: none; white-space: nowrap; padding: 8px 4px; }
.bar__back:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar__title { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__title b { font-weight: 600; }
.bar__title span { color: var(--ink-soft); margin-left: 6px; }

.bar__view { display: flex; padding: 3px; border-radius: 999px; background: rgba(var(--shade), .06); box-shadow: inset 0 1px 2px rgba(var(--shade), .12); }
.bar__view button {
  border: 0; background: none; font: 500 14px/1 var(--font); color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background .2s ease-out, color .2s ease-out, box-shadow .2s ease-out;
}
.bar__view button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(var(--shade), .3); }
.bar__view button:focus-visible, .bar__about:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.bar__about, .bar__berg { border: 0; background: none; font: 500 14px/1 var(--font); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 8px 6px; }
.bar__cta { background: var(--ink); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(var(--shade), .7); }
.bar__cta:hover { box-shadow: 0 14px 30px -12px rgba(var(--shade), .8); }

.note {
  position: absolute; z-index: 3; top: 66px; right: 12px; width: min(380px, calc(100vw - 24px));
  padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.45;
}
.note[hidden] { display: none; }

.stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; }
.device { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 30px 60px -30px rgba(var(--shade), .5); }
.device iframe { display: block; width: 100%; height: 100%; border: 0; }

/* «Телефон»: настоящий экран 390×844, уменьшается, если не помещается по высоте */
.stage.is-phone .device {
  /* рамка 10 px снаружи экрана: сам экран ровно 390×844, как у iPhone */
  width: 410px; height: 864px; flex: none; border-radius: 46px; border: 10px solid #1d1e21;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 40px 70px -30px rgba(var(--shade), .6);
  transform: scale(var(--fit, 1)); transform-origin: center;
}

@media (max-width: 760px) {
  .bar { gap: 8px; margin: 8px 8px 0; padding: 6px 6px 6px 12px; }
  .bar__view, .bar__title span { display: none; }
  .bar__back { font-size: 14px; }
  .bar__cta { padding: 9px 14px; font-size: 14px; }
  .stage { padding: 8px; }
}

/* Айсберг: сверху светлая «надводная» часть, ниже линии воды — большая и синеватая */
.bar__berg { border: 0; background: none; font: 500 14px/1 var(--font); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 8px 6px; }
.berg {
  position: absolute; z-index: 3; top: 66px; right: 12px; width: min(400px, calc(100vw - 24px)); max-height: calc(100% - 80px); overflow-y: auto;
  padding: 16px 18px 18px; border-radius: 18px; font-size: 14px; line-height: 1.4;
  background: linear-gradient(180deg, rgba(255,255,255,.72) 0, rgba(255,255,255,.6) 150px, rgba(214,226,236,.78) 190px, rgba(186,205,222,.86) 100%);
}
.berg[hidden] { display: none; }
.berg__head { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.berg ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.berg__seen li { padding-left: 14px; position: relative; }
.berg__seen li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.berg__line { position: relative; margin: 14px -18px 12px; height: 1px; background: rgba(60, 100, 140, .45); }
.berg__line span { position: absolute; right: 18px; top: -9px; padding: 0 6px; font-size: 11px; color: #3c648c; background: rgba(221,231,239,.95); border-radius: 6px; }
.berg__hidden li { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.38); color: #1d2c3a; }
.berg__foot { margin-top: 12px; font-size: 13px; color: #2e4357; }
.berg__close { margin-top: 14px; }
@media (max-width: 760px) {
  /* на телефоне в полосе не хватает места на название рядом с «Что под водой» */
  .bar:has(.bar__berg:not([hidden])) .bar__title { display: none; }
  .bar__back { flex: 1; }
  .berg { top: 60px; right: 8px; left: 8px; width: auto; max-height: calc(100% - 70px); }
}
.berg__more { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(29,44,58,.3); color: #1d2c3a; font-size: 13px; }
/* первые пункты — самые сильные: чуть ярче */
.berg__hidden li:nth-child(-n+3) { background: rgba(255,255,255,.55); font-weight: 500; }
