/* Websites hero window: one landing page in phone, tablet and desktop frames, ad events in a tracking log.
   Shell and tokens (.app, .app__bar, .status, .mod, .tabs, .tab) come from /style.css. */
.web .app__main { container: web / inline-size; }
.web .side__pill { transform: translateY(64px); } /* no JS: the pill rests on Tracking, the third module (2 x 30px + 2 x 2px gap) */
.web-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(132px, 34%, 168px); gap: 10px; }
.web-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.web-card__head { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.web-card__head b { font-weight: 600; white-space: nowrap; }

/* Device switch: icon tabs, the current one white (shared .tab[aria-current] style) */
.web-dev { margin-left: auto; padding: 2px; }
.web-dev .tab { flex: none; width: 28px; height: 24px; padding: 0; }
.web-dev svg { width: 14px; height: 14px; }

/* Stage: the three frames share one grid cell and swap with opacity and scale */
.web-stage { display: grid; place-items: center; min-height: 226px; padding: 12px; background: var(--sunk); }
.web-frame { grid-area: 1 / 1; position: relative; display: grid; max-width: 100%; border: 1px solid #d4d4d8; background: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 24px -14px rgba(0, 0, 0, .3); }
.web-frame[data-frame="desktop"] { width: min(100%, 300px); aspect-ratio: 16 / 10; padding: 12px 3px 3px; border-radius: 8px; }
.web-frame[data-frame="desktop"]::before { content: ""; position: absolute; top: 4px; left: 6px; width: 4px; height: 4px; border-radius: 50%; background: #a1a1aa; box-shadow: 6px 0 #a1a1aa, 12px 0 #a1a1aa; }
.web-frame[data-frame="tablet"] { height: 100%; aspect-ratio: 3 / 4; padding: 6px; border-radius: 12px; }
.web-frame[data-frame="phone"] { height: 100%; aspect-ratio: 9 / 19; padding: 10px 4px 6px; border-radius: 16px; }
.web-frame[data-frame="phone"]::before { content: ""; position: absolute; top: 4px; left: 50%; width: 20px; height: 3px; margin-left: -10px; border-radius: 2px; background: #a1a1aa; }

/* The demo company page: one markup, laid out by the width of its own frame (container queries) */
.web-page { container-type: inline-size; display: grid; align-content: start; gap: 6px; min-height: 0; overflow: hidden; padding: 6px; border-radius: 4px; background: var(--bg); }
.web-nav { display: flex; align-items: center; gap: 4px; }
.web-logo { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--coral); }
.web-nav b { font-size: 7px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.web-links { display: none; gap: 4px; margin-left: auto; }
.web-links i { width: 14px; height: 3px; border-radius: 2px; background: var(--line); }
.web-burger { flex: none; width: 8px; height: 6px; margin-left: auto; border-block: 1.5px solid var(--muted-fg); }
.web-hero { display: grid; gap: 6px; }
.web-img { order: -1; height: 40px; border-radius: 3px; border: 1px solid var(--line); background: var(--muted); }
.web-copy { display: grid; gap: 3px; justify-items: start; }
.web-h, .web-t { display: block; height: 5px; width: 92%; border-radius: 2px; background: #a1a1aa; }
.web-h + .web-h { width: 62%; }
.web-t { height: 3px; width: 100%; background: var(--line); }
.web-t + .web-t { width: 74%; }
.web-btn { margin-top: 3px; padding: 2px 5px; border-radius: 3px; background: var(--coral); color: var(--fg); font-size: 6.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.web-cards { display: grid; gap: 4px; }
.web-cards i { height: 16px; border-radius: 3px; border: 1px solid var(--line); }
@container (min-width: 110px) { /* tablet: wider picture, cards in two columns */
  .web-page { gap: 8px; padding: 8px; }
  .web-nav b { font-size: 8px; }
  .web-img { height: 52px; }
  .web-btn { font-size: 7px; }
  .web-cards { grid-template-columns: 1fr 1fr; }
  .web-cards i { height: 22px; }
}
@container (min-width: 150px) { /* desktop: menu links, copy beside the picture, three cards */
  .web-links { display: flex; }
  .web-burger { display: none; }
  .web-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  .web-img { order: 0; height: 56px; }
  .web-cards { grid-template-columns: repeat(3, 1fr); }
}

/* Tracking log: event, clock time, the device it came from */
.web-log ol { display: grid; align-content: start; }
.web-log li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "e i" "t i"; align-items: center; column-gap: 6px; row-gap: 2px; padding: 5px 12px; }
.web-log li + li { border-top: 1px solid var(--line); }
.web-ev { grid-area: e; justify-self: start; padding: 0 5px; border-radius: 4px; background: var(--muted); color: var(--fg); font-size: 11.5px; font-weight: 600; line-height: 17px; white-space: nowrap; }
.web-ev--lead { background: var(--ok-bg); color: var(--ok); }
.web-log time { grid-area: t; color: var(--muted-fg); font-size: 11.5px; line-height: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.web-log li > svg { grid-area: i; width: 14px; height: 14px; color: var(--muted-fg-2); }
.web-live { flex: none; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* Narrow windows (phones, and the hero column at 600-700px): the log goes under the preview, one line per event */
@container web (max-width: 329px) {
  .web-grid { grid-template-columns: minmax(0, 1fr); }
  .web-log li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t e i"; column-gap: 10px; }
}
