/* The hero's animated Tark window. Drawn at 960 × 560 and scaled to fit
   (hero.js sets --s); every colour comes from site.css's tokens. */

.demo { margin: 56px auto 0; max-width: 1000px; overflow-anchor: none }
.stage { position: relative; height: calc(560px * var(--s, 1)); }
.win {
  position: absolute; left: 50%; top: 0; width: 960px; height: 560px;
  transform: translateX(-50%) scale(var(--s, 1)); transform-origin: top center;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px;
  overflow: hidden; text-align: left; font-size: 14px; color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(20, 20, 43, .35);
}
@media (prefers-color-scheme: dark) { .win { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7) } }

/* one row: lights, mark, tabs, buttons, address pill, extensions */
.w-bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; }
.w-lights { display: flex; gap: 7px; margin-right: 4px }
.w-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57 }
.w-lights i:nth-child(2) { background: #febc2e } .w-lights i:nth-child(3) { background: #28c840 }
.w-mark { width: 18px; height: 15px; flex: none; margin-right: 4px }
.w-tabs { display: flex; align-items: center; gap: 4px; min-width: 0 }
.w-tab { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; color: var(--faint); white-space: nowrap; max-width: 170px; overflow: hidden; font-size: 13px }
.w-tab.on { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06) }
.w-tab .t { overflow: hidden; text-overflow: ellipsis; transition: opacity .2s }
.w-fav { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--indigo); transition: background .3s }
.w-fav.news { background: var(--coral) } .w-fav.wiki { background: var(--soft) }
.w-plus { color: var(--faint); padding: 0 6px; font-size: 18px }
.w-navs { display: flex; gap: 14px; color: var(--soft); margin: 0 6px 0 auto }
.w-navs svg { width: 16px; height: 16px }
.w-omni {
  flex: 0 0 380px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--raised); border: 2px solid transparent; transition: border-color .2s;
  white-space: nowrap; overflow: hidden; font-size: 14px;
}
.w-omni.focus { border-color: var(--indigo) }
.w-omni .host { color: var(--faint) }
.w-chip { background: var(--tint); color: var(--indigo); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; display: none }
.w-chip.show { display: inline-block; animation: pop .28s cubic-bezier(.2, 1.4, .4, 1) }
.w-caret { width: 1.5px; height: 17px; background: var(--ink); margin-left: -6px; opacity: 0 }
.w-omni.focus .w-caret { opacity: 1; animation: blink 1.1s steps(1) infinite }
.w-ext { position: relative; color: var(--soft); width: 22px; height: 22px; margin-left: 4px }
.w-ext svg { width: 20px; height: 20px }
.w-count { position: absolute; right: -9px; top: -7px; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; transform: scale(0); transition: transform .2s }
.w-count.show { transform: scale(1) }
.w-count.bump { animation: bump .18s }

/* suggestions under the pill */
.w-drop {
  position: absolute; top: 48px; right: 50px; width: 420px; background: var(--raised);
  border: 1px solid var(--rule); border-radius: 14px; padding: 6px; z-index: 3;
  box-shadow: 0 18px 40px -16px rgba(20, 20, 43, .35); opacity: 0; transform: translateY(-6px);
  transition: opacity .18s, transform .18s; pointer-events: none;
}
.w-drop.show { opacity: 1; transform: none }
.w-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 15px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s, background .2s }
.w-row.show { opacity: 1; transform: none }
.w-row.on { background: var(--tint) }
.w-row .src { margin-left: auto; color: var(--faint); font-size: 12px }
.w-row .ico { width: 14px; height: 14px; color: var(--faint); flex: none }
.w-row.lang .txt { font-size: 17px }

/* the page under the row */
.w-page { position: absolute; inset: 52px 0 0; background: var(--raised); border-top: 1px solid var(--rule) }
.w-view { position: absolute; inset: 0; padding: 34px 56px; opacity: 0; transition: opacity .35s; overflow: hidden }
.w-view.show { opacity: 1 }
.sk { height: 10px; border-radius: 5px; background: var(--rule); opacity: .7; margin: 0 0 12px }
.v-home { text-align: center; padding-top: 90px }
.v-home .w-bigmark { width: 64px; height: 52px; margin: 0 auto 22px }
.v-home .pill { width: 440px; height: 44px; margin: 0 auto 40px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper) }
.v-home .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 640px; margin: 0 auto }
.v-home .cards div { height: 92px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule) }
.v-wiki h4 { font: 400 40px/1.2 Georgia, "Tiro Devanagari Hindi", "Kohinoor Devanagari", serif; margin: 0 0 6px }
.v-wiki .under { color: var(--faint); font-size: 13px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); padding-bottom: 12px }
.v-wiki .cols { display: grid; grid-template-columns: 1fr 230px; gap: 34px }
.v-wiki .box { height: 230px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule) }
.v-news .head { height: 26px; width: 70%; border-radius: 6px; background: var(--ink); opacity: .85; margin-bottom: 18px }
.v-news .cols { display: grid; grid-template-columns: 1fr 250px; gap: 34px }
.w-ad {
  display: grid; place-items: center; border-radius: 10px; margin-bottom: 14px; overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--warm), var(--warm) 10px, transparent 10px, transparent 20px);
  border: 1px dashed var(--amber); color: var(--warm-ink); font-size: 12px; font-weight: 600; letter-spacing: .06em;
  transition: height .35s ease, margin .35s ease, opacity .25s, border-width .35s;
}
.w-ad.gone { height: 0 !important; margin: 0; opacity: 0; border-width: 0 }
.w-toast {
  position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; transition: opacity .25s, transform .3s cubic-bezier(.2, 1.3, .4, 1); z-index: 4;
}
.w-toast.show { opacity: 1; transform: translate(-50%, 0) }
.w-toast svg { width: 16px; height: 16px; color: var(--good) }

/* scene picker under the window */
.scenes { display: flex; justify-content: center; gap: 10px; margin: 22px auto 0; flex-wrap: wrap; align-items: center }
.scene {
  position: relative; overflow: hidden; border: 1px solid var(--rule); background: var(--raised); color: var(--soft);
  border-radius: 999px; padding: 8px 16px; font: 500 14px/1.2 inherit; cursor: pointer;
}
.scene[aria-selected="true"] { color: var(--ink); border-color: var(--indigo) }
.scene .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--indigo) }
.scene[aria-selected="true"] .bar { animation: fill var(--d, 6s) linear forwards }
.demo.paused .scene .bar { animation-play-state: paused }
.pause { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 8px; border-radius: 999px; display: grid; place-items: center }
.pause svg { width: 16px; height: 16px }
.caption { text-align: center; color: var(--soft); margin: 14px 0 0; padding-bottom: 40px; min-height: 1.6em; font-size: 15px }

@keyframes pop { from { transform: scale(.6); opacity: 0 } }
@keyframes bump { 50% { transform: scale(1.35) } }
@keyframes fill { to { width: 100% } }
@media (prefers-reduced-motion: reduce) {
  .win *, .scene .bar { transition: none !important; animation: none !important }
}

/* Live captions scene: a video page, Tark's CC button on it, the caption bar. */
.w-fav.video { background: var(--coral) }
.v-video .vid { position: relative; width: 600px; height: 338px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #2b3a55, #141a2a) }
.v-video .vt { position: absolute; left: 18px; top: 16px; color: #c9d2e8; font-size: 15px }
.v-video .vctl { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)) }
.v-video .vctl i { position: absolute; left: 14px; right: 14px; bottom: 26px; height: 3px; border-radius: 2px; background: #555 }
.v-video .vctl b { display: block; width: 38%; height: 100%; border-radius: 2px; background: var(--coral) }
.v-video .cols { width: 600px; margin-top: 18px }
.v-video .side { position: absolute; left: 690px; top: 34px; width: 214px }
.v-video .side div { height: 66px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); margin-bottom: 12px }
.w-cc { position: absolute; left: 616px; top: 300px; width: 30px; height: 22px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 10.5px; line-height: 1; letter-spacing: .02em; color: var(--ink); background: var(--raised);
  border: 1px solid var(--rule); box-shadow: 0 1px 6px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s, background .15s }
.w-cc.show { opacity: 1 }
.w-cc.on { background: var(--indigo); border-color: var(--indigo); color: var(--on-indigo) }
.w-ptr { position: absolute; left: 700px; top: 360px; width: 22px; height: 22px; opacity: 0; transition: left .6s, top .6s, opacity .2s, transform .1s }
.w-ptr.show { opacity: 1; left: 628px; top: 309px }
.w-ptr.click { transform: scale(.85) }
.w-cap { position: absolute; left: 50%; bottom: 22px; width: 560px; transform: translate(-50%, 10px); opacity: 0;
  transition: opacity .3s, transform .3s; background: rgba(20, 20, 43, .94); color: #f3efe6; border-radius: 14px;
  padding: 12px 16px 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35) }
.w-cap.show { opacity: 1; transform: translate(-50%, 0) }
.w-cap .orig { font-size: 19px; line-height: 1.4; min-height: 1.4em }
.w-cap.translated .orig { font-size: 14px; color: #bdb6a8 }
.w-cap .tr { font-size: 19px; line-height: 1.4 }
.w-cap .tr:empty { display: none }
.w-cap .row { display: flex; gap: 8px; margin-top: 8px; align-items: center }
.w-cap .row span { font-size: 12px; border: 1px solid #4a4a63; border-radius: 999px; padding: 2px 10px; color: #e5e1d8 }
.w-cap .row .tbtn.on { background: #4338ca; border-color: #4338ca; color: #fff }
.w-cap .row .x { margin-left: auto; border: 0 }

