/* Emulsion: feature clips (em-media.js). One lane of chips + one phone player. */
.em-clips { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }

/* Lanes of chips */
.em-clips .lanes { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.em-clips .lane { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.em-clips .lane h3 { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.em-clips .lane > p { color: var(--sub); font-size: 14px; margin: 4px 0 14px; }
.em-clips .lane h3 .n { font-size: 12px; font-weight: 500; color: var(--sub); background: var(--card); padding: 0 8px; border-radius: 999px; line-height: 20px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fc { border: 0; font: inherit; font-size: 14px; color: var(--sub); background: var(--card); padding: 7px 13px 7px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.fc .ic { width: 16px; height: 16px; color: var(--muted); transition: color .2s; }
.fc:hover { background: var(--hover); color: var(--text); }
.fc[aria-pressed="true"] { background: var(--hover); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.fc[aria-pressed="true"] .ic { color: var(--accent-hover); }
.fc .soon { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); padding: 0 6px; border-radius: 999px; line-height: 16px; }

/* Phone: generic flat-edge Android shape, centred punch-hole in a black status strip, side keys. No brand. View 9:20 = clip size. */
.em-clips .stage { position: sticky; top: 88px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone.x200 { position: relative; width: 300px; aspect-ratio: auto; height: auto; padding: 7px; border-radius: 42px; background: #0b0a09;
  box-shadow: 0 0 0 1.5px #4a4743, 0 0 0 3.5px #252321, 0 30px 80px rgba(0,0,0,.45); }
.phone.x200::before, .phone.x200::after { content: ""; position: absolute; right: -5px; width: 3px; border-radius: 0 3px 3px 0; background: #4a4743; }
.phone.x200::before { top: 20%; height: 9%; }
.phone.x200::after { top: 32%; height: 5%; }
.phone.x200 .screen { position: relative; padding-top: 26px; border-radius: 35px; overflow: hidden; background: #000; cursor: pointer; }
.phone.x200 .view { position: relative; aspect-ratio: 9 / 20; background: var(--ink); }
.phone.x200 .screen::after { content: ""; position: absolute; top: 8px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #000; box-shadow: 0 0 0 1.5px #1c1b1a; pointer-events: none; }
.phone.x200 .view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.p-hero .phone.x200 .screen { cursor: default; }
.phone.x200 video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.phone.x200 .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); opacity: .7; }
.phone.x200 .soonmsg { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: 14px; }
.phone.x200 .missing .soonmsg { display: grid; }
.phone.x200 .missing video, .phone.x200 .missing .bar { display: none; }
.phone.x200 .flash { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(21,20,19,.72); color: var(--text); display: grid; place-items: center; opacity: 0; pointer-events: none; }
.phone.x200 .flash .ic { width: 26px; height: 26px; }
.phone.x200 .flash.on { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.15); } }

/* Caption + controls under the phone */
.em-clips .cap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.em-clips .cap .txt { min-height: 66px; }
.em-clips .cap b { font-size: 17px; font-weight: 650; }
.em-clips .cap .tier { margin-left: 8px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; background: var(--card); color: var(--sub); }
.em-clips .cap .tier.pro { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.em-clips .cap p { color: var(--sub); font-size: 15px; margin-top: 4px; }
.em-clips .cap .plat { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ctrl { display: flex; gap: 6px; }
.cb { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.cb:hover { background: var(--hover); }
.cb .ic { width: 16px; height: 16px; }
.cb.play { background: var(--accent); color: var(--ink); }
.cb.play:hover { background: var(--accent-hover); }
.clips-more { color: var(--muted); font-size: 13px; margin-top: 18px; }

@media (max-width: 860px) {
  .em-clips { grid-template-columns: 1fr; gap: 20px; }
  .em-clips .stage { position: static; order: 2; }
  .em-clips .lane { padding: 16px; }
  .em-clips .fchips { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); justify-content: start; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .em-clips .fchips::-webkit-scrollbar { display: none; }
  .fc { flex: none; white-space: nowrap; justify-self: start; }
  .phone.x200 { width: min(280px, 72vw); }
}
@media (prefers-reduced-motion: reduce) { .phone.x200 .flash.on { animation: none; } }

/* Match the hero phone: screen edge to edge, punch-hole sits in the app's top bar, no progress line. */
.em-clips .phone.x200 { container-type: inline-size; }
.em-clips .phone.x200 .screen { padding-top: 0; background: #181411; }
.em-clips .phone.x200 .screen::after { z-index: 1; top: 4.2cqw; width: 5cqw; height: 5cqw; margin-left: -2.5cqw; }
.em-clips .phone.x200 .bar { display: none; }
.em-clips .phone.x200 { padding: 5px; border-radius: 40px; }
.em-clips .phone.x200 .screen { border-radius: 35px; }

/* Layout: chips and the caption panel fill the column beside the phone, so no empty space. */
.em-clips { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "chips phone" "cap phone"; grid-template-rows: 1fr auto; column-gap: 40px; row-gap: 16px; align-items: stretch; }
.em-clips .lanes { grid-area: chips; }
.em-clips .lanes, .em-clips .lane { display: flex; flex-direction: column; }
.em-clips .lane { flex: 1; justify-content: center; padding: 24px; }
.em-clips .fchips { gap: 10px; }
.em-clips .fc { font-size: 15.5px; padding: 11px 18px 11px 14px; }
.em-clips .fc .ic { width: 17px; height: 17px; }
.em-clips .stage { grid-area: phone; position: static; justify-content: center; }
.em-clips .cap { grid-area: cap; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; }
.em-clips .cap .txt { min-height: 0; min-width: 0; }
.em-clips .ctrl { flex: none; }
@media (max-width: 860px) {
  .em-clips { grid-template-columns: 1fr; grid-template-areas: "chips" "phone" "cap"; grid-template-rows: auto; row-gap: 20px; }
  .em-clips .lane { padding: 16px; }
  .em-clips .fc { font-size: 14px; padding: 7px 13px 7px 10px; }
  .em-clips .cap { flex-direction: column; text-align: center; padding: 16px; gap: 12px; }
}

/* Chips as an even grid (2026-10-28): 3 across, 11 full rows of 33. Long names wrap inside the tile. */
@media (min-width: 861px) {
  .em-clips .fchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .em-clips .fc { justify-content: flex-start; text-align: left; min-width: 0; min-height: 44px; border-radius: 14px; font-size: 14.5px; line-height: 1.3; padding: 9px 12px; }
}

/* Phone panel (2026-10-29): the phone sits in its own panel, same style as the chips and caption panels,
   top edge level with the chips panel and bottom edge level with the caption panel. Phone is sized from the panel height. */
@media (min-width: 861px) {
  .em-clips { grid-template-columns: minmax(0, 1fr) 366px; column-gap: 16px; }
  .em-clips .stage { container-type: size; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; justify-content: center; align-items: center; }
  .em-clips .phone.x200 { width: min(100cqw, (100cqh - 10px) * 9 / 20 + 10px); }
  .em-clips .fc { padding: 9px 10px; gap: 7px; font-size: 14px; }
}
@media (max-width: 860px) {
  .em-clips .stage { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 16px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .em-clips .fc { font-size: 13px; gap: 6px; padding: 9px 8px; }
}

/* Phone chips (2026-10-29): three swipe rows of equal tiles, like the desktop grid. */
@media (max-width: 860px) {
  .em-clips .fchips { grid-auto-columns: 46%; justify-content: stretch; gap: 8px; margin-right: 0; padding-right: 0; scroll-snap-type: x mandatory; }
  .em-clips .fc { justify-self: stretch; justify-content: flex-start; border-radius: 14px; min-height: 44px; padding: 9px 12px; scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .em-clips .fchips { grid-auto-columns: 72%; }
}
[data-needs][hidden] { display: none !important; }

/* Coming soon (2026-10-29): second player for features not live yet, plus a panel of the rest. Same panel look as See it work. */
#soon [data-clips] .stage { position: relative; top: auto; overflow: visible; }
#soon [data-clips] .stage::after { content: "Coming soon"; position: absolute; top: -12px; right: 20px; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--text); font-size: 11.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.em-clips .fc .tier, .soon-more .fc .tier { margin-left: auto; flex: none; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.soon-more { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px 24px; }
.soon-more h3 { font-size: 17px; font-weight: 650; margin: 0 0 14px; }
.soon-more .fchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.soon-more .fc { cursor: default; justify-content: flex-start; min-width: 0; min-height: 44px; border-radius: 14px; font-size: 14px; line-height: 1.3; padding: 9px 12px; gap: 7px; }
.soon-more .fc:hover { background: var(--card); color: var(--sub); }
@media (max-width: 860px) {
  .soon-more { padding: 16px; }
  .soon-more .fchips { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: 46%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .soon-more .fchips::-webkit-scrollbar { display: none; }
  .soon-more .fc { white-space: nowrap; scroll-snap-align: start; justify-self: stretch; }
}
@media (max-width: 600px) { .soon-more .fchips { grid-auto-columns: 72%; } }

/* Two-column chips, bigger phone (2026-10-29, Rajhans). Rule: chips beside a phone player = 2 columns, phone big.
   The phone sets the height; chip tiles stretch to fill their panel. */
@media (min-width: 861px) {
  .em-clips { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
  .em-clips .stage { container-type: normal; padding: 28px; }
  .em-clips .phone.x200 { width: min(320px, 100%); }
  .em-clips .lane { padding: 20px; justify-content: stretch; }
  .em-clips .fchips { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
  .em-clips .fc { font-size: 15.5px; gap: 10px; padding: 10px 16px; }
  .em-clips .fc .ic { width: 18px; height: 18px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .em-clips .phone.x200 { width: min(280px, 100%); }
  .em-clips .fc { font-size: 14px; gap: 8px; padding: 9px 12px; }
}
.em-clips .fc .ft { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.em-clips .fc .ft small { display: none; }
@media (min-width: 861px) {
  .em-clips .fc { align-items: center; }
  .em-clips .fc .ft small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
  .em-clips .fc .tier { align-self: flex-start; }
}
/* No empty space beside the phone: its panel hugs the phone, chips take the rest. */
@media (min-width: 861px) {
  .em-clips { grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; }
  .em-clips .stage { padding: 24px; }
  .em-clips .phone.x200 { width: 320px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .em-clips .phone.x200 { width: 270px; }
}
