/* The modern monitor: a browser showing one client's example website, plus the Day 2 windows.
   Colours from the brand. The example shop has its own calm look (kaolin + teal) so it reads as a client's site. */
.os { --muted: var(--ink-muted); --accent: var(--indigo); --shop: var(--teal);
  position: fixed; left: 0; top: 0; z-index: 2; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; pointer-events: auto;
  display: grid; grid-template-rows: 56px 1fr; font: 400 18px/1.35 var(--sans); color: var(--ink); background: var(--paper); user-select: none; will-change: transform; }
.os[hidden] { visibility: hidden; }   /* laid out once while loading: showing it later costs nothing */

/* browser bar */
.br-bar { display: flex; align-items: center; gap: 18px; padding: 0 20px; background: var(--mist); border-bottom: 1px solid var(--line); }
.br-dots { display: inline-flex; gap: 8px; } .br-dots b { width: 12px; height: 12px; border-radius: 50%; background: var(--periwinkle); } .br-dots b:first-child { background: var(--night); }
.br-url { flex: 1; max-width: 560px; height: 34px; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 999px; background: var(--raised); font: 500 16px/1 var(--sans); color: var(--muted); }
.br-lock { width: 10px; height: 10px; background: var(--shop); }
.br-tag { margin-left: auto; height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 6px; background: var(--line); font: 500 14px/1 var(--sans); }
.br-tag::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.br-tag[data-t="testing"] { background: var(--warning-soft); color: var(--warning); }
.br-tag[data-t="tested"], .br-tag[data-t="live"] { background: var(--teal-soft); color: var(--shop); }

/* the example site. --b (0..1, Day 1) turns grey sketch bars into real text */
.site { --b: 1; position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 26px; padding: 26px 48px 32px; background: var(--kaolin); overflow: hidden; }
.site :is(b, p, span, i) { font-style: normal; color: rgb(var(--ink-rgb) / var(--b)); background-color: rgb(var(--ink-rgb) / calc(.12 * (1 - var(--b)))); border-radius: 4px; transition: color .3s; }
.s-nav { display: flex; align-items: center; gap: 28px; }
.s-logo { font: 600 26px/1 var(--sans); letter-spacing: -.02em; }
.s-links { display: inline-flex; gap: 22px; font: 500 17px/1 var(--sans); } .s-links i { background: none !important; }
.s-ml, .s-phone { font: 500 16px/1 var(--sans); padding: 8px 12px; transition: opacity .35s; }
.js .site:not(.c3) .s-ml, .js .site:not(.c4) .s-phone { opacity: 0; }
.s-ml { margin-left: auto; border: 1px solid var(--ink-a30); }
.s-phone { background: var(--raised) !important; }
.s-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.s-copy .s-h { margin: 0; display: inline; font: 600 58px/1.02 var(--sans); letter-spacing: -.035em; }
.s-copy p { margin: 18px 0 0; font-size: 21px; color: rgb(var(--ink-muted-rgb) / var(--b)); }
.s-wa { display: inline-flex; margin-top: 24px; height: 52px; align-items: center; padding: 0 24px; border-radius: 10px; font: 500 18px/1 var(--sans);
  color: var(--raised) !important; background: var(--shop) !important; transition: opacity .35s, transform .35s; }
/* parts the Day 2 checks fill in: hidden only when the script that fills them is running */
.js .site:not(.c4) .s-wa { opacity: 0; transform: translateY(8px); }
.s-photo { height: 300px; border-radius: 14px; background: var(--ink-a10); position: relative; overflow: hidden; }
.s-photo::after, .s-card i::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .45s;
  background: radial-gradient(60% 70% at 30% 30%, var(--bread-light), transparent), radial-gradient(70% 60% at 75% 75%, var(--bread-dark), transparent), var(--bread); }
.s-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.s-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: 12px; background: rgb(var(--raised-rgb) / calc(.4 + .5 * var(--b))); }
.s-card i { width: 64px; height: 64px; border-radius: 10px; position: relative; overflow: hidden; background: var(--ink-a10) !important; }
.s-card b { font: 600 20px/1.1 var(--sans); }
.s-card span { font: 500 19px/1 var(--sans); min-width: 3.4em; text-align: right; }
.s-card span::before { content: "₹ —"; } .site.c1 .s-card span::before { content: none; }
.site:not(.c1) .s-card span { font-size: 0; } .site:not(.c1) .s-card span::before { font-size: 19px; color: var(--ink-a35); }
.s-mobile { position: absolute; right: 30px; bottom: 26px; width: 92px; height: 170px; border-radius: 16px; border: 4px solid var(--night); background: var(--kaolin);
  display: grid; align-content: start; gap: 8px; padding: 18px 10px; transition: opacity .35s, transform .35s; box-shadow: 0 16px 30px var(--ink-a25); }
.js .site:not(.c0) .s-mobile { opacity: 0; transform: translateY(16px); }
.s-mobile b { height: 8px; border-radius: 3px; background: var(--ink-a70); } .s-mobile b:nth-child(2) { width: 70%; } .s-mobile b:nth-child(3) { height: 40px; background: var(--bread); } .s-mobile b:nth-child(4) { height: 16px; background: var(--shop); }
/* each passed check fills in a part of the page: c0 phones · c1 prices · c2 photos · c3 Malayalam · c4 WhatsApp */
.site.c2 :is(.s-photo, .s-card i)::after { opacity: 1; }

/* windows: centred on the screen. On mid-size screens .os-pops is scaled up so the window is readable (main.js sets --win) */
.os-pops { position: absolute; inset: 56px 0 0; display: grid; place-items: center; pointer-events: none; transform: scale(var(--win, 1)); transform-origin: 50% 50%; }
.os-pops[hidden] { visibility: hidden; }
.os-win { grid-area: 1 / 1; width: 560px; padding: 30px 32px 28px; border-radius: 16px; background: var(--raised); color: var(--ink); pointer-events: auto;
  box-shadow: 0 1px 2px var(--ink-a06), 0 24px 60px var(--night-deep-a30); opacity: 0; scale: .96; transition: opacity .25s ease-out, scale .3s ease-out; }
.os-win.in { opacity: 1; scale: 1; }
.os-win[hidden] { display: none; }
.w-kicker { margin: 0 0 8px; font: 500 15px/1.2 var(--sans); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.w-kicker::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.os-win .os-h { margin: 0; font: 600 30px/1.1 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.os-win > p:not(.w-kicker, .os-h) { margin: 10px 0 0; font-size: 20px; color: var(--muted); }
.w-checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.w-checks li { display: flex; align-items: center; gap: 12px; font: 500 18px/1.2 var(--sans); color: var(--muted); transition: color .2s; }
.w-checks li::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--line-strong); transition: background .2s, border-color .2s; }
.w-checks li.ok { color: var(--ink); } .w-checks li.ok::before { background: var(--shop); border-color: var(--shop); }
.os-bar { height: 8px; margin: 22px 0 0; border-radius: 999px; background: var(--mist); overflow: hidden; }
.os-bar b { display: block; height: 100%; width: 0; background: var(--accent); }
.os-btn { display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 24px; margin-top: 22px; border: 0; border-radius: 10px; cursor: pointer;
  font: 500 18px/1 var(--sans); white-space: nowrap; color: var(--raised); background: var(--accent); text-decoration: none; touch-action: none; -webkit-user-select: none; user-select: none;
  transition: background .15s ease-out, scale .12s ease-out; }
.os-hold { width: 100%; }
.os-btn:hover, .os-btn.down { background: var(--night); }
.os-btn.down { scale: .985; }
.os-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.os-btn:disabled { background: var(--shop); cursor: default; }
.os-quiet { background: transparent; color: var(--accent); } .os-quiet:hover { background: var(--mist); }
.w-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* phones: the windows lift off the monitor at a readable size; the screen must not clip them */
.os.phone { overflow: visible; }
.os.phone .os-win { box-shadow: 0 30px 90px var(--night-deep-a55); }
/* phones: the window is drawn at ~0.63× of these sizes, so these give ~17 px text and a ~50 px tall button on screen */
.os.phone .os-win { width: 560px; padding: 40px 38px 36px; border-radius: 22px; }
.os.phone .w-kicker { font-size: 24px; } .os.phone .w-kicker::before { width: 12px; height: 12px; }
.os.phone .os-win .os-h { font-size: 46px; line-height: 1.08; }
.os.phone .os-win > p:not(.w-kicker, .os-h) { font-size: 30px; }
.os.phone .w-checks { gap: 14px; margin-top: 26px; } .os.phone .w-checks li { font-size: 28px; gap: 16px; } .os.phone .w-checks li::before { width: 24px; height: 24px; }
.os.phone .os-bar { height: 12px; }
.os.phone .os-btn { height: 80px; font-size: 28px; padding: 0 28px; border-radius: 14px; }
.os.phone .w-btns { flex-direction: column; } .os.phone .w-btns .os-btn { width: 100%; }

/* narrow screens: the windows leave the monitor and dock as a panel at the bottom of the screen, above the skip pill
   (main.js moves .os-pops out of the monitor and adds .sheet; the camera lifts the monitor into the space above) */
.os-pops.sheet { --muted: var(--ink-muted); --accent: var(--indigo); --shop: var(--teal);
  position: fixed; z-index: 41; inset: auto max(12px, env(safe-area-inset-right)) calc(max(clamp(16px, 3vh, 32px), env(safe-area-inset-bottom)) + 56px) max(12px, env(safe-area-inset-left));
  transform: none; place-items: end center; font: 400 17px/1.35 var(--sans); color: var(--ink); -webkit-user-select: none; user-select: none; }
.os-pops.sheet .os-win { width: 100%; max-width: 480px; padding: 20px 20px 18px; border-radius: 20px; box-shadow: 0 24px 70px var(--night-deep-a55);
  scale: 1; translate: 0 12px; transition: opacity .25s ease-out, translate .3s ease-out; }
.os-pops.sheet .os-win.in { translate: 0 0; }
.os-pops.sheet .w-kicker { margin-bottom: 6px; font-size: 14px; }
.os-pops.sheet .os-win .os-h { font-size: 24px; }
.os-pops.sheet .os-win > p:not(.w-kicker, .os-h) { margin-top: 6px; font-size: 17px; }
.os-pops.sheet .w-checks { margin-top: 14px; gap: 8px; } .os-pops.sheet .w-checks li { font-size: 16px; }
.os-pops.sheet .os-bar { margin-top: 16px; }
.os-pops.sheet .os-btn { height: 52px; margin-top: 16px; font-size: 17px; }
.os-pops.sheet .w-btns { flex-direction: column; gap: 0; } .os-pops.sheet .w-btns .os-btn { width: 100%; margin-top: 8px; }
/* landscape screens: the panel docks on the right and the monitor moves to the left of it (main.js adds .side) */
.os-pops.sheet.side { inset: calc(var(--top-h) + 4px) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto; width: min(44vw, 420px); place-items: center end; }
.os-pops.sheet.side .os-win { max-height: 100%; overflow: auto; }
@media (orientation: landscape) and (max-height: 519px) {
  .os-pops.sheet .os-win { padding: 14px 16px 14px; }
  .os-pops.sheet .w-kicker { margin-bottom: 2px; font-size: 13px; } .os-pops.sheet .os-win .os-h { font-size: 19px; }
  .os-pops.sheet .w-checks { margin-top: 8px; gap: 3px; } .os-pops.sheet .w-checks li { font-size: 14px; } .os-pops.sheet .w-checks li::before { width: 13px; height: 13px; }
  .os-pops.sheet .os-bar { margin-top: 10px; height: 6px; } .os-pops.sheet .os-btn { height: 44px; margin-top: 10px; font-size: 16px; }
}

/* the cue: the button that moves the story on wears a soft ring that keeps widening while it waits, and a line under
   it says what to do; a refused scroll flashes both (os.js adds .nudged). Transform and opacity only. */
.os-btn { position: relative; }
.os-hold::after, .os-btn[data-gate="live"]:not(.os-quiet)::after, .lite-btn::after {
  content: ""; position: absolute; inset: -4px; border: 2px solid var(--periwinkle); border-radius: 14px; pointer-events: none; opacity: 0;
  animation: cue-ring 1.8s ease-out infinite; }
.os-hold.down::after, .os-hold:disabled::after { content: none; }      /* held, or all five passed: no ring */
@keyframes cue-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06, 1.3); } }
.w-cue { margin: 10px 0 0; font: 500 14px/1.3 var(--sans); color: var(--muted); text-align: center; transition: color .2s ease-out; }
.os-win.nudged .w-cue { color: var(--accent); }
.os-win.nudged .os-btn::after { animation-duration: .6s; }
.os.phone .w-cue { font-size: 22px; margin-top: 14px; }
.os-pops.sheet .w-cue { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .os-hold::after, .os-btn[data-gate="live"]:not(.os-quiet)::after, .lite-btn::after { animation: none; opacity: .9; } }
.reduce-motion .os-hold::after, .reduce-motion .os-btn[data-gate="live"]:not(.os-quiet)::after, .reduce-motion .lite-btn::after { animation: none; opacity: .9; }
