:root {
  color-scheme: dark;
  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc05;
  --green: #34a853;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: transparent;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.demo-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.demo-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(0, 12, 18, .18);
  pointer-events: none;
}

.stage-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: none;
  opacity: 0;
  background-image:
    linear-gradient(rgba(69, 171, 224, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 171, 224, .12) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, black 33%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 4%, black 33%, black 70%, transparent 100%);
}

.stage-glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 7vh;
  width: min(1100px, 90vw);
  height: 260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 174, 240, .26), rgba(0, 90, 170, .08) 48%, transparent 72%);
  filter: blur(34px);
}

.laptop-wrap {
  width: min(1180px, calc(100vw - 54px));
  padding: 42px 0 58px;
}

.laptop {
  width: 100%;
  container-type: inline-size;
  outline: none;
  filter: drop-shadow(0 36px 52px rgba(0, 0, 0, .68));
  animation: laptop-arrive 780ms cubic-bezier(.2,.8,.2,1) both;
  cursor: pointer;
}

.laptop:focus-visible .laptop-lid { box-shadow: inset 0 0 0 .45cqw #050608, 0 0 0 3px #71ddff, 0 0 72px rgba(0, 157, 229, .28); }

.laptop-lid {
  position: relative;
  width: 91%;
  margin: 0 auto;
  padding: 1.55%;
  aspect-ratio: 16 / 9.35;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 2.5cqw 2.5cqw 1.1cqw 1.1cqw;
  background: linear-gradient(145deg, #9098a3 0%, #252a31 2.5%, #0a0d11 97%, #8a929b 100%);
  box-shadow: inset 0 0 0 .45cqw #050608, 0 0 0 1px rgba(82, 210, 255, .22), 0 0 64px rgba(0, 157, 229, .14);
}

.laptop-camera {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: .55cqw;
  width: .52cqw;
  height: .52cqw;
  min-width: 3px;
  min-height: 3px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #101923;
  box-shadow: inset 0 0 0 1px rgba(102, 218, 255, .18);
}

.laptop-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1.25cqw 1.25cqw .45cqw .45cqw;
  background: #fff;
  box-shadow: 0 0 32px rgba(101, 213, 255, .08);
  font-family: Arial, Helvetica, sans-serif;
}

.browser-chrome {
  height: 6.7%;
  min-height: 24px;
  padding: 0 2.2%;
  display: grid;
  grid-template-columns: 5.8cqw 1fr 5.8cqw;
  align-items: center;
  background: #e9edf3;
  border-bottom: 1px solid #dce1e8;
}

.browser-dots { display: flex; gap: .54cqw; }
.browser-dots span { width: .76cqw; height: .76cqw; min-width: 5px; min-height: 5px; border-radius: 50%; background: #c5cbd4; }
.browser-dots span:first-child { background: #ff6d68; }
.browser-dots span:nth-child(2) { background: #f6c453; }
.browser-dots span:nth-child(3) { background: #50c878; }

.address-bar {
  min-width: 0;
  height: 3cqw;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: .65cqw;
  padding: 0 1.1cqw;
  border-radius: 2cqw;
  color: #667084;
  background: #f8fafc;
  font-size: .86cqw;
}
.lock { color: #7d8798; font-size: .5cqw; }

.screen-viewport {
  position: relative;
  height: 93.3%;
  overflow: hidden;
  color: #202124;
  background: #fff;
}

.search-home, .results-page {
  position: absolute;
  inset: 0;
  background: #fff;
}

.search-home {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 13.6%;
  opacity: 1;
  transform: scale(1);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(.2,.8,.2,1);
}

.screen-viewport.is-results .search-home {
  opacity: 0;
  transform: scale(.975);
  pointer-events: none;
}

.google-wordmark { display: flex; align-items: center; letter-spacing: -.11em; font-weight: 500; }
.google-wordmark span:nth-child(1), .google-wordmark span:nth-child(4) { color: var(--blue); }
.google-wordmark span:nth-child(2), .google-wordmark span:nth-child(6) { color: var(--red); }
.google-wordmark span:nth-child(3) { color: var(--yellow); }
.google-wordmark span:nth-child(5) { color: var(--green); }
.google-wordmark-large { margin-bottom: 4.8%; font-size: 6.2cqw; line-height: 1; }
.google-wordmark-small { font-size: 2.55cqw; line-height: 1; }

.home-search-field {
  position: relative;
  width: 68%;
  min-height: 5.2cqw;
  padding: 0 4.3cqw 0 4.6cqw;
  display: flex;
  align-items: center;
  border: 1px solid #dfe1e5;
  border-radius: 3cqw;
  color: #202124;
  box-shadow: 0 1px 6px rgba(32, 33, 36, .12);
  font-size: 1.46cqw;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.home-search-field.is-active { border-color: transparent; box-shadow: 0 2px 12px rgba(32, 33, 36, .22); }
.typed-query { white-space: nowrap; }
.typing-caret { width: 1.5px; height: 1.7cqw; margin-left: .16cqw; background: #1a73e8; animation: caret-blink 780ms steps(1) infinite; }
.search-glass { position: absolute; left: 1.8cqw; width: 1.28cqw; height: 1.28cqw; border: .17cqw solid #9aa0a6; border-radius: 50%; }
.search-glass::after { content: ""; position: absolute; width: .62cqw; height: .17cqw; right: -.47cqw; bottom: -.2cqw; transform: rotate(45deg); background: #9aa0a6; }
.voice-dot { position: absolute; right: 1.9cqw; width: .62cqw; height: 1.35cqw; border-radius: .5cqw; background: linear-gradient(var(--blue) 0 45%, var(--red) 45% 72%, var(--yellow) 72%); }

.home-search-actions { margin-top: 2.4%; display: flex; gap: 1.15cqw; }
.home-search-actions span { padding: .9cqw 1.35cqw; border: 1px solid #f8f9fa; border-radius: .35cqw; color: #3c4043; background: #f8f9fa; font-size: .96cqw; }

.pointer {
  position: absolute;
  z-index: 5;
  left: 77%;
  top: 53%;
  width: 1.65cqw;
  height: 2.2cqw;
  opacity: 0;
  transform: translate(2cqw, 2cqw) rotate(-18deg);
  background: #1d1f22;
  -webkit-clip-path: polygon(0 0, 100% 66%, 56% 72%, 79% 100%, 62% 100%, 39% 74%, 10% 100%);
  clip-path: polygon(0 0, 100% 66%, 56% 72%, 79% 100%, 62% 100%, 39% 74%, 10% 100%);
  filter: drop-shadow(0 1px 1px rgba(255,255,255,.6));
}

.screen-viewport.is-searching .pointer { animation: pointer-search 620ms cubic-bezier(.2,.7,.2,1) both; }
.screen-viewport.is-searching .home-search-field { animation: search-submit 620ms ease both; }

.results-page {
  z-index: 1;
  opacity: 0;
  transform: translateY(1.4%);
  transition: opacity 350ms 100ms ease, transform 430ms 100ms cubic-bezier(.2,.8,.2,1);
}

.screen-viewport.is-results .results-page { opacity: 1; transform: none; }

.results-toolbar {
  min-height: 13.3%;
  padding: 2.1% 5% 1.2%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3.2%;
  align-items: center;
}

.results-query {
  min-height: 4.25cqw;
  padding: 0 1.6cqw;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.15cqw;
  align-items: center;
  border: 1px solid #dfe1e5;
  border-radius: 3cqw;
  box-shadow: 0 1px 5px rgba(32,33,36,.15);
  color: #202124;
  font-size: 1.25cqw;
}
.results-query b { color: #5f6368; font-size: 1.9cqw; font-weight: 300; }
.results-query i { position: relative; width: 1.16cqw; height: 1.16cqw; border: .17cqw solid var(--blue); border-radius: 50%; }
.results-query i::after { content: ""; position: absolute; width: .58cqw; height: .17cqw; right: -.44cqw; bottom: -.18cqw; transform: rotate(45deg); background: var(--blue); }

.search-tabs {
  height: 8.2%;
  min-height: 26px;
  padding: 0 5% 0 14.8%;
  display: flex;
  align-items: end;
  gap: 2.8%;
  border-bottom: 1px solid #edf0f5;
  color: #566078;
  font-size: .92cqw;
}
.search-tabs span { padding-bottom: 1.05cqw; }
.search-tabs .active { border-bottom: .2cqw solid #1a73e8; color: #1a73e8; }

.results-scroll {
  height: 78.5%;
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.results-scroll::-webkit-scrollbar { display: none; }
.results-document { padding: 2.1% 9% 7%; }

.ai-heading { min-height: 2.4cqw; display: flex; align-items: center; gap: .75cqw; color: #15203a; font-size: 1.38cqw; }
.sparkle { color: #246df6; font-size: 1.9cqw; animation: sparkle-pulse 1.2s ease-in-out infinite; }
.generating { margin-left: auto; color: #788398; font-size: .78cqw; font-weight: 400; opacity: 0; }
.screen-viewport.is-loading .generating { opacity: 1; }

.loading-panel { margin-top: 1.8%; padding: 2.1cqw; border: 1px solid #e0e8f4; border-radius: 1.45cqw; background: #fff; opacity: 0; }
.loading-panel span { display: block; height: .82cqw; margin: .9cqw 0; border-radius: .5cqw; background: linear-gradient(90deg, #edf1f7 20%, #dce8f7 42%, #edf1f7 64%); background-size: 260% 100%; animation: shimmer 1.05s linear infinite; }
.loading-panel span:nth-child(2) { width: 92%; }
.loading-panel span:nth-child(3) { width: 78%; }
.loading-panel span:nth-child(4) { width: 46%; }
.screen-viewport.is-loading .loading-panel { opacity: 1; }

.answer-card {
  margin-top: 1.8%;
  overflow: hidden;
  border: 1px solid #d9e8fb;
  border-radius: 1.55cqw;
  background: linear-gradient(135deg, #fff, #fbfdff 66%, #f1f7ff);
  box-shadow: 0 .7cqw 2.2cqw rgba(77,115,158,.09);
  opacity: 0;
  transform: translateY(1.2cqw);
}
.screen-viewport.is-answer .loading-panel { display: none; }
.screen-viewport.is-answer .answer-card { animation: answer-reveal 680ms cubic-bezier(.2,.8,.2,1) both; }

.answer-intro { margin: 0; padding: 1.6cqw 2cqw; border-bottom: 1px solid #e8eef6; color: #3b4659; font-size: .98cqw; line-height: 1.48; }
.brand-row { padding: 1.7cqw 2cqw 1.1cqw; display: flex; gap: 1.35cqw; align-items: center; }
.brand-row img { width: 5.15cqw; height: 5.15cqw; border-radius: 1.1cqw; }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { color: #111a31; font-size: 2.05cqw; line-height: 1.05; }
.brand-row span { margin-top: .32cqw; color: #46516a; font-size: 1.08cqw; }
.answer-copy { padding: .25cqw 2cqw 1.3cqw 8.5cqw; }
.answer-copy h1 { margin: 0 0 .58cqw; color: #111a31; font-size: 1.95cqw; line-height: 1.09; letter-spacing: -.055cqw; }
.answer-copy h1 em { font-style: normal; color: #166a9b; }
.answer-copy p { margin: 0; color: #313c53; font-size: 1.02cqw; line-height: 1.48; }

.service-list { margin: .5cqw 2cqw 1.25cqw 8.5cqw; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7cqw; }
.service-list div { min-height: 7.1cqw; padding: 1cqw; border-radius: .75cqw; background: #f0f5fd; }
.service-list span { color: #176b9d; font-size: .7cqw; font-weight: 700; }
.service-list strong { display: block; margin: .26cqw 0 .33cqw; color: #18243a; font-size: 1.02cqw; }
.service-list p { margin: 0; color: #5a6579; font-size: .72cqw; line-height: 1.34; }
.route-line { margin: 0; padding: .35cqw 2cqw 1.45cqw 8.5cqw; color: #5b657a; font-size: .82cqw; }

.source-row { min-height: 5.05cqw; padding: 0 2cqw; display: grid; grid-template-columns: auto 1fr auto; gap: .92cqw; align-items: center; border-top: 1px solid #e5ecf5; color: #1f2a43; }
.source-row img { width: 2.75cqw; height: 2.75cqw; border-radius: .62cqw; }
.source-row strong, .source-row small { display: block; }
.source-row strong { font-size: .92cqw; }
.source-row small { margin-top: .16cqw; color: #5a657b; font-size: .68cqw; }
.source-row > b { color: #1a73e8; font-size: 1.15cqw; }

.screen-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.laptop-base {
  position: relative;
  width: 100%;
  height: 5.3cqw;
  min-height: 30px;
  margin-top: -.18cqw;
  border-radius: 0 0 3.8cqw 3.8cqw;
  background: linear-gradient(180deg, #f0f2f4 0%, #aeb4bb 28%, #6f7781 72%, #cfd3d7 91%, #555d65 100%);
  -webkit-clip-path: polygon(4.4% 0, 95.6% 0, 100% 82%, 98.2% 100%, 1.8% 100%, 0 82%);
  clip-path: polygon(4.4% 0, 95.6% 0, 100% 82%, 98.2% 100%, 1.8% 100%, 0 82%);
  box-shadow: inset 0 1px 0 #fff, 0 8px 18px rgba(0, 0, 0, .48);
}
.laptop-base::before { content: ""; position: absolute; inset: 12% 10% 38%; opacity: .72; border-radius: .45cqw; background: repeating-linear-gradient(90deg, #2c3137 0 2.3%, transparent 2.3% 2.9%), repeating-linear-gradient(0deg, rgba(34,38,44,.95) 0 28%, transparent 28% 40%); }
.laptop-base span { position: absolute; z-index: 2; left: 50%; bottom: 0; width: 14%; height: 22%; transform: translateX(-50%); border-radius: 0 0 1.2cqw 1.2cqw; background: linear-gradient(180deg, rgba(70,76,84,.72), rgba(224,228,232,.95)); }

@keyframes laptop-arrive { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes caret-blink { 0%, 52% { opacity: 1; } 53%, 100% { opacity: 0; } }
@keyframes pointer-search { 0% { opacity: 0; transform: translate(2cqw, 2cqw) rotate(-18deg); } 35% { opacity: 1; } 72% { opacity: 1; transform: translate(-5.3cqw, -1.2cqw) rotate(-18deg) scale(1); } 82% { transform: translate(-5.3cqw, -1.2cqw) rotate(-18deg) scale(.86); } 100% { opacity: 0; transform: translate(-5.3cqw, -1.2cqw) rotate(-18deg) scale(1); } }
@keyframes search-submit { 0%, 72% { transform: scale(1); } 82% { transform: scale(.992); box-shadow: 0 0 0 .28cqw rgba(66,133,244,.12), 0 2px 12px rgba(32,33,36,.18); } 100% { transform: scale(1); } }
@keyframes shimmer { to { background-position: -160% 0; } }
@keyframes sparkle-pulse { 0%,100% { transform: rotate(0) scale(1); opacity: .75; } 50% { transform: rotate(12deg) scale(1.14); opacity: 1; } }
@keyframes answer-reveal { from { opacity: 0; transform: translateY(1.2cqw); } to { opacity: 1; transform: none; } }
@keyframes pointer-search-legacy { 0% { opacity: 0; transform: translate(12px, 12px) rotate(-18deg); } 35% { opacity: 1; } 72% { opacity: 1; transform: translate(-34px, -8px) rotate(-18deg) scale(1); } 82% { transform: translate(-34px, -8px) rotate(-18deg) scale(.86); } 100% { opacity: 0; transform: translate(-34px, -8px) rotate(-18deg) scale(1); } }
@keyframes answer-reveal-legacy { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .laptop-wrap { width: min(760px, calc(100vw - 18px)); padding: 22px 0 38px; }
  .laptop-lid { width: 97%; aspect-ratio: 1.34 / 1; border-radius: 12px 12px 4px 4px; padding: 2.1%; }
  .laptop-screen { border-radius: 7px 7px 2px 2px; }
  .laptop-base { height: 34px; }
  .browser-chrome { grid-template-columns: 42px 1fr 42px; min-height: 25px; }
  .browser-dots { gap: 4px; }
  .browser-dots span { width: 6px; height: 6px; }
  .address-bar { height: 18px; padding: 0 8px; border-radius: 10px; font-size: 7px; }
  .search-home { padding-top: 18%; }
  .google-wordmark-large { font-size: 34px; margin-bottom: 7%; }
  .home-search-field { width: 84%; min-height: 34px; padding: 0 30px 0 32px; font-size: 8.2px; border-radius: 20px; }
  .typing-caret { height: 11px; }
  .search-glass { left: 13px; width: 9px; height: 9px; border-width: 1.3px; }
  .voice-dot { right: 14px; width: 5px; height: 11px; }
  .home-search-actions span { padding: 6px 8px; border-radius: 3px; font-size: 6.5px; }
  .results-toolbar { min-height: 17%; padding: 3.6% 4% 2%; grid-template-columns: 1fr; gap: 5%; }
  .google-wordmark-small { display: none; }
  .results-query { min-height: 32px; padding: 0 11px; border-radius: 18px; font-size: 7.6px; }
  .search-tabs { height: 9%; min-height: 22px; padding-left: 5%; gap: 5%; font-size: 6.5px; }
  .search-tabs span:nth-child(n+5) { display: none; }
  .results-scroll { height: 74%; }
  .results-document { padding: 3.4% 5.5% 10%; }
  .ai-heading { min-height: 18px; font-size: 9px; }
  .sparkle { font-size: 13px; }
  .generating { font-size: 6px; }
  .loading-panel { padding: 14px; border-radius: 9px; }
  .loading-panel span { height: 6px; margin: 7px 0; }
  .answer-card { border-radius: 9px; }
  .answer-intro { padding: 9px 11px; font-size: 6.6px; }
  .brand-row { padding: 11px 12px 7px; gap: 9px; }
  .brand-row img { width: 34px; height: 34px; border-radius: 7px; }
  .brand-row strong { font-size: 13px; }
  .brand-row span { font-size: 7px; }
  .answer-copy { padding: 2px 12px 9px 55px; }
  .answer-copy h1 { margin-bottom: 4px; font-size: 11px; }
  .answer-copy p { font-size: 6.6px; }
  .service-list { margin: 3px 12px 8px 55px; gap: 4px; }
  .service-list div { min-height: 45px; padding: 6px; border-radius: 5px; }
  .service-list span { font-size: 4.7px; }
  .service-list strong { font-size: 6.7px; }
  .service-list p { font-size: 4.7px; }
  .route-line { padding: 2px 12px 10px 55px; font-size: 5.4px; }
  .source-row { min-height: 34px; padding: 0 12px; gap: 7px; }
  .source-row img { width: 19px; height: 19px; border-radius: 4px; }
  .source-row strong { font-size: 6.2px; }
  .source-row small { font-size: 4.7px; }
}

/* iOS Safari fallbacks for versions before container query units. */
@supports not (container-type: inline-size) {
  @media (max-width: 760px) {
    .laptop:focus-visible .laptop-lid { box-shadow: inset 0 0 0 3px #050608, 0 0 0 3px #71ddff, 0 0 72px rgba(0, 157, 229, .28); }
    .laptop-camera { top: 4px; width: 4px; height: 4px; }
    .lock { font-size: 4px; }
    .home-search-actions { gap: 7px; }
    .pointer { width: 11px; height: 15px; transform: translate(12px, 12px) rotate(-18deg); }
    .screen-viewport.is-searching .pointer { animation-name: pointer-search-legacy; }
    .results-query { gap: 8px; }
    .results-query b { font-size: 12px; }
    .results-query i { width: 8px; height: 8px; border-width: 1px; }
    .results-query i::after { width: 4px; height: 1px; right: -3px; bottom: -1px; }
    .search-tabs span { padding-bottom: 7px; }
    .ai-heading { gap: 5px; }
    .screen-viewport.is-answer .answer-card { animation-name: answer-reveal-legacy; }
    .laptop-base { margin-top: -1px; border-radius: 0 0 24px 24px; }
    .laptop-base::before { border-radius: 3px; }
    .laptop-base span { border-radius: 0 0 8px 8px; }
  }
}

/* iOS Safari 14 and earlier do not support aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {
  .laptop-lid { height: 53vw; max-height: 628px; }

  @media (max-width: 760px) {
    .laptop-lid { height: 70vw; max-height: 535px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .laptop,
  .screen-viewport.is-searching .home-search-field,
  .sparkle,
  .loading-panel span { animation: none; }
  .typing-caret, .pointer { display: none; }
  .results-page { transition: none; }
  .results-scroll { scroll-behavior: auto; }
  .screen-viewport.is-answer .answer-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
